@skyux/errors 5.5.0-beta.0 → 5.6.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/bundles/skyux-errors.umd.js +54 -54
- package/documentation.json +17 -17
- package/esm2015/lib/modules/error/error-description.component.js.map +1 -1
- package/esm2015/lib/modules/error/error-modal-form.component.js.map +1 -1
- package/esm2015/lib/modules/error/error-modal.service.js.map +1 -1
- package/esm2015/lib/modules/error/error-title.component.js.map +1 -1
- package/esm2015/lib/modules/error/error.component.js +2 -2
- package/esm2015/lib/modules/error/error.component.js.map +1 -1
- package/esm2015/lib/modules/error/error.module.js +5 -5
- package/esm2015/lib/modules/error/error.module.js.map +1 -1
- package/esm2015/lib/modules/shared/sky-errors-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/sky-errors-resources.module.js.map +1 -1
- package/esm2015/testing/error-fixture.js.map +1 -1
- package/fesm2015/skyux-errors-testing.js.map +1 -1
- package/fesm2015/skyux-errors.js +48 -48
- package/fesm2015/skyux-errors.js.map +1 -1
- package/package.json +12 -10
|
@@ -151,30 +151,23 @@
|
|
|
151
151
|
}] });
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
|
-
* Specifies
|
|
154
|
+
* Specifies an action to include in the error message.
|
|
155
|
+
* For example, you can include a button to reload the page or to refresh data.
|
|
155
156
|
*/
|
|
156
|
-
var
|
|
157
|
-
function
|
|
158
|
-
/**
|
|
159
|
-
* Indicates whether to replace the default title. If `false`, the title
|
|
160
|
-
* from this component is added after the default title.
|
|
161
|
-
* @default false
|
|
162
|
-
*/
|
|
163
|
-
this.replaceDefaultTitle = false;
|
|
157
|
+
var SkyErrorActionComponent = /** @class */ (function () {
|
|
158
|
+
function SkyErrorActionComponent() {
|
|
164
159
|
}
|
|
165
|
-
return
|
|
160
|
+
return SkyErrorActionComponent;
|
|
166
161
|
}());
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
162
|
+
SkyErrorActionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyErrorActionComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
163
|
+
SkyErrorActionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyErrorActionComponent, selector: "sky-error-action", ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
|
|
164
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyErrorActionComponent, decorators: [{
|
|
170
165
|
type: i0.Component,
|
|
171
166
|
args: [{
|
|
172
|
-
selector: 'sky-error-
|
|
167
|
+
selector: 'sky-error-action',
|
|
173
168
|
template: '<ng-content></ng-content>',
|
|
174
169
|
}]
|
|
175
|
-
}]
|
|
176
|
-
type: i0.Input
|
|
177
|
-
}] } });
|
|
170
|
+
}] });
|
|
178
171
|
|
|
179
172
|
/**
|
|
180
173
|
* Specifies a description to provide additional details in the error message.
|
|
@@ -202,6 +195,50 @@
|
|
|
202
195
|
type: i0.Input
|
|
203
196
|
}] } });
|
|
204
197
|
|
|
198
|
+
/**
|
|
199
|
+
* Specifies an image to display in the error message.
|
|
200
|
+
*/
|
|
201
|
+
var SkyErrorImageComponent = /** @class */ (function () {
|
|
202
|
+
function SkyErrorImageComponent() {
|
|
203
|
+
}
|
|
204
|
+
return SkyErrorImageComponent;
|
|
205
|
+
}());
|
|
206
|
+
SkyErrorImageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyErrorImageComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
207
|
+
SkyErrorImageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyErrorImageComponent, selector: "sky-error-image", ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
|
|
208
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyErrorImageComponent, decorators: [{
|
|
209
|
+
type: i0.Component,
|
|
210
|
+
args: [{
|
|
211
|
+
selector: 'sky-error-image',
|
|
212
|
+
template: '<ng-content></ng-content>',
|
|
213
|
+
}]
|
|
214
|
+
}] });
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Specifies a title to display in the error message.
|
|
218
|
+
*/
|
|
219
|
+
var SkyErrorTitleComponent = /** @class */ (function () {
|
|
220
|
+
function SkyErrorTitleComponent() {
|
|
221
|
+
/**
|
|
222
|
+
* Indicates whether to replace the default title. If `false`, the title
|
|
223
|
+
* from this component is added after the default title.
|
|
224
|
+
* @default false
|
|
225
|
+
*/
|
|
226
|
+
this.replaceDefaultTitle = false;
|
|
227
|
+
}
|
|
228
|
+
return SkyErrorTitleComponent;
|
|
229
|
+
}());
|
|
230
|
+
SkyErrorTitleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyErrorTitleComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
231
|
+
SkyErrorTitleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyErrorTitleComponent, selector: "sky-error-title", inputs: { replaceDefaultTitle: "replaceDefaultTitle" }, ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
|
|
232
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyErrorTitleComponent, decorators: [{
|
|
233
|
+
type: i0.Component,
|
|
234
|
+
args: [{
|
|
235
|
+
selector: 'sky-error-title',
|
|
236
|
+
template: '<ng-content></ng-content>',
|
|
237
|
+
}]
|
|
238
|
+
}], propDecorators: { replaceDefaultTitle: [{
|
|
239
|
+
type: i0.Input
|
|
240
|
+
}] } });
|
|
241
|
+
|
|
205
242
|
/**
|
|
206
243
|
* Displays a SKY UX-themed error message.
|
|
207
244
|
*/
|
|
@@ -297,43 +334,6 @@
|
|
|
297
334
|
args: [SkyErrorDescriptionComponent]
|
|
298
335
|
}] } });
|
|
299
336
|
|
|
300
|
-
/**
|
|
301
|
-
* Specifies an image to display in the error message.
|
|
302
|
-
*/
|
|
303
|
-
var SkyErrorImageComponent = /** @class */ (function () {
|
|
304
|
-
function SkyErrorImageComponent() {
|
|
305
|
-
}
|
|
306
|
-
return SkyErrorImageComponent;
|
|
307
|
-
}());
|
|
308
|
-
SkyErrorImageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyErrorImageComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
309
|
-
SkyErrorImageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyErrorImageComponent, selector: "sky-error-image", ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
|
|
310
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyErrorImageComponent, decorators: [{
|
|
311
|
-
type: i0.Component,
|
|
312
|
-
args: [{
|
|
313
|
-
selector: 'sky-error-image',
|
|
314
|
-
template: '<ng-content></ng-content>',
|
|
315
|
-
}]
|
|
316
|
-
}] });
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Specifies an action to include in the error message.
|
|
320
|
-
* For example, you can include a button to reload the page or to refresh data.
|
|
321
|
-
*/
|
|
322
|
-
var SkyErrorActionComponent = /** @class */ (function () {
|
|
323
|
-
function SkyErrorActionComponent() {
|
|
324
|
-
}
|
|
325
|
-
return SkyErrorActionComponent;
|
|
326
|
-
}());
|
|
327
|
-
SkyErrorActionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyErrorActionComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
328
|
-
SkyErrorActionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyErrorActionComponent, selector: "sky-error-action", ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
|
|
329
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyErrorActionComponent, decorators: [{
|
|
330
|
-
type: i0.Component,
|
|
331
|
-
args: [{
|
|
332
|
-
selector: 'sky-error-action',
|
|
333
|
-
template: '<ng-content></ng-content>',
|
|
334
|
-
}]
|
|
335
|
-
}] });
|
|
336
|
-
|
|
337
337
|
var SkyErrorModule = /** @class */ (function () {
|
|
338
338
|
function SkyErrorModule() {
|
|
339
339
|
}
|
package/documentation.json
CHANGED
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"sources": [
|
|
194
194
|
{
|
|
195
195
|
"fileName": "projects/errors/src/modules/error/error-modal.service.ts",
|
|
196
|
-
"line":
|
|
196
|
+
"line": 14,
|
|
197
197
|
"character": 2
|
|
198
198
|
}
|
|
199
199
|
],
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
"sources": [
|
|
237
237
|
{
|
|
238
238
|
"fileName": "projects/errors/src/modules/error/error-modal.service.ts",
|
|
239
|
-
"line":
|
|
239
|
+
"line": 18,
|
|
240
240
|
"character": 9
|
|
241
241
|
}
|
|
242
242
|
],
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
"sources": [
|
|
292
292
|
{
|
|
293
293
|
"fileName": "projects/errors/src/modules/error/error-modal.service.ts",
|
|
294
|
-
"line":
|
|
294
|
+
"line": 13,
|
|
295
295
|
"character": 13
|
|
296
296
|
}
|
|
297
297
|
]
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
"sources": [
|
|
352
352
|
{
|
|
353
353
|
"fileName": "projects/errors/src/modules/error/error.module.ts",
|
|
354
|
-
"line":
|
|
354
|
+
"line": 33,
|
|
355
355
|
"character": 13
|
|
356
356
|
}
|
|
357
357
|
]
|
|
@@ -739,7 +739,7 @@
|
|
|
739
739
|
"sources": [
|
|
740
740
|
{
|
|
741
741
|
"fileName": "projects/errors/src/modules/error/error.component.ts",
|
|
742
|
-
"line":
|
|
742
|
+
"line": 61,
|
|
743
743
|
"character": 2
|
|
744
744
|
}
|
|
745
745
|
],
|
|
@@ -782,7 +782,7 @@
|
|
|
782
782
|
"sources": [
|
|
783
783
|
{
|
|
784
784
|
"fileName": "projects/errors/src/modules/error/error.component.ts",
|
|
785
|
-
"line":
|
|
785
|
+
"line": 40,
|
|
786
786
|
"character": 9
|
|
787
787
|
}
|
|
788
788
|
],
|
|
@@ -824,7 +824,7 @@
|
|
|
824
824
|
"sources": [
|
|
825
825
|
{
|
|
826
826
|
"fileName": "projects/errors/src/modules/error/error.component.ts",
|
|
827
|
-
"line":
|
|
827
|
+
"line": 37,
|
|
828
828
|
"character": 9
|
|
829
829
|
}
|
|
830
830
|
],
|
|
@@ -845,7 +845,7 @@
|
|
|
845
845
|
"sources": [
|
|
846
846
|
{
|
|
847
847
|
"fileName": "projects/errors/src/modules/error/error.component.ts",
|
|
848
|
-
"line":
|
|
848
|
+
"line": 39,
|
|
849
849
|
"character": 9
|
|
850
850
|
}
|
|
851
851
|
],
|
|
@@ -878,7 +878,7 @@
|
|
|
878
878
|
"sources": [
|
|
879
879
|
{
|
|
880
880
|
"fileName": "projects/errors/src/modules/error/error.component.ts",
|
|
881
|
-
"line":
|
|
881
|
+
"line": 23,
|
|
882
882
|
"character": 13
|
|
883
883
|
}
|
|
884
884
|
],
|
|
@@ -941,7 +941,7 @@
|
|
|
941
941
|
"sources": [
|
|
942
942
|
{
|
|
943
943
|
"fileName": "projects/errors/src/modules/error/error.component.ts",
|
|
944
|
-
"line":
|
|
944
|
+
"line": 46,
|
|
945
945
|
"character": 13
|
|
946
946
|
}
|
|
947
947
|
],
|
|
@@ -970,7 +970,7 @@
|
|
|
970
970
|
"sources": [
|
|
971
971
|
{
|
|
972
972
|
"fileName": "projects/errors/src/modules/error/error.component.ts",
|
|
973
|
-
"line":
|
|
973
|
+
"line": 42,
|
|
974
974
|
"character": 13
|
|
975
975
|
}
|
|
976
976
|
],
|
|
@@ -999,7 +999,7 @@
|
|
|
999
999
|
"sources": [
|
|
1000
1000
|
{
|
|
1001
1001
|
"fileName": "projects/errors/src/modules/error/error.component.ts",
|
|
1002
|
-
"line":
|
|
1002
|
+
"line": 63,
|
|
1003
1003
|
"character": 9
|
|
1004
1004
|
}
|
|
1005
1005
|
],
|
|
@@ -1036,7 +1036,7 @@
|
|
|
1036
1036
|
"sources": [
|
|
1037
1037
|
{
|
|
1038
1038
|
"fileName": "projects/errors/src/modules/error/error.component.ts",
|
|
1039
|
-
"line":
|
|
1039
|
+
"line": 69,
|
|
1040
1040
|
"character": 9
|
|
1041
1041
|
}
|
|
1042
1042
|
],
|
|
@@ -1093,7 +1093,7 @@
|
|
|
1093
1093
|
"sources": [
|
|
1094
1094
|
{
|
|
1095
1095
|
"fileName": "projects/errors/src/modules/error/error.component.ts",
|
|
1096
|
-
"line":
|
|
1096
|
+
"line": 16,
|
|
1097
1097
|
"character": 13
|
|
1098
1098
|
}
|
|
1099
1099
|
],
|
|
@@ -1190,7 +1190,7 @@
|
|
|
1190
1190
|
{
|
|
1191
1191
|
"fileName": "error-demo.module.ts",
|
|
1192
1192
|
"filePath": "/projects/errors/documentation/code-examples/error/embedded/error-demo.module.ts",
|
|
1193
|
-
"rawContents": "import {
|
|
1193
|
+
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyErrorModule } from '@skyux/errors';\n\nimport { ErrorDemoComponent } from './error-demo.component';\n\n@NgModule({\n imports: [CommonModule, SkyErrorModule],\n declarations: [ErrorDemoComponent],\n exports: [ErrorDemoComponent],\n})\nexport class ErrorDemoModule {}\n"
|
|
1194
1194
|
},
|
|
1195
1195
|
{
|
|
1196
1196
|
"fileName": "error-demo.component.html",
|
|
@@ -1200,12 +1200,12 @@
|
|
|
1200
1200
|
{
|
|
1201
1201
|
"fileName": "error-demo.component.ts",
|
|
1202
1202
|
"filePath": "/projects/errors/documentation/code-examples/error/modal/error-demo.component.ts",
|
|
1203
|
-
"rawContents": "import { Component } from '@angular/core';\
|
|
1203
|
+
"rawContents": "import { Component } from '@angular/core';\nimport { ErrorModalConfig, SkyErrorModalService } from '@skyux/errors';\n\n@Component({\n selector: 'app-error-demo',\n templateUrl: './error-demo.component.html',\n providers: [SkyErrorModalService],\n})\nexport class ErrorDemoComponent {\n constructor(private errorService: SkyErrorModalService) {}\n\n public openErrorModal(): void {\n const config: ErrorModalConfig = {\n errorTitle: 'Something went wrong.',\n errorDescription: 'Close the modal, and come back later.',\n errorCloseText: 'Close',\n };\n this.errorService.open(config);\n }\n}\n"
|
|
1204
1204
|
},
|
|
1205
1205
|
{
|
|
1206
1206
|
"fileName": "error-demo.module.ts",
|
|
1207
1207
|
"filePath": "/projects/errors/documentation/code-examples/error/modal/error-demo.module.ts",
|
|
1208
|
-
"rawContents": "import {
|
|
1208
|
+
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyErrorModule } from '@skyux/errors';\n\nimport { ErrorDemoComponent } from './error-demo.component';\n\n@NgModule({\n imports: [CommonModule, SkyErrorModule],\n declarations: [ErrorDemoComponent],\n exports: [ErrorDemoComponent],\n})\nexport class ErrorDemoModule {}\n"
|
|
1209
1209
|
}
|
|
1210
1210
|
]
|
|
1211
1211
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-description.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error-description.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;AAEjD;;GAEG;AAKH,MAAM,OAAO,4BAA4B;IAJzC;QAKE;;;;WAIG;QAEI,8BAAyB,
|
|
1
|
+
{"version":3,"file":"error-description.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error-description.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;AAEjD;;GAEG;AAKH,MAAM,OAAO,4BAA4B;IAJzC;QAKE;;;;WAIG;QAEI,8BAAyB,GAAG,KAAK,CAAC;KAC1C;;0HARY,4BAA4B;8GAA5B,4BAA4B,iIAF7B,2BAA2B;4FAE1B,4BAA4B;kBAJxC,SAAS;mBAAC;oBACT,QAAQ,EAAE,uBAAuB;oBACjC,QAAQ,EAAE,2BAA2B;iBACtC;8BAQQ,yBAAyB;sBAD/B,KAAK","sourcesContent":["import { Component, Input } from '@angular/core';\n\n/**\n * Specifies a description to provide additional details in the error message.\n */\n@Component({\n selector: 'sky-error-description',\n template: '<ng-content></ng-content>',\n})\nexport class SkyErrorDescriptionComponent {\n /**\n * Indicates whether to replace the default description. If `false`, the description\n * from this component is added after the default description.\n * @default false\n */\n @Input()\n public replaceDefaultDescription = false;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-modal-form.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error-modal-form.component.ts","../../../../../../../../libs/components/errors/src/lib/modules/error/error-modal-form.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"error-modal-form.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error-modal-form.component.ts","../../../../../../../../libs/components/errors/src/lib/modules/error/error-modal-form.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;;;;AAExD;;GAEG;AAMH,MAAM,OAAO,0BAA0B;IACrC,YACS,OAAyB,EACzB,QAA0B;QAD1B,YAAO,GAAP,OAAO,CAAkB;QACzB,aAAQ,GAAR,QAAQ,CAAkB;IAChC,CAAC;;wHAJO,0BAA0B;4GAA1B,0BAA0B,4DCbvC,+jBAmBA;4FDNa,0BAA0B;kBALtC,SAAS;mBAAC;oBACT,QAAQ,EAAE,sBAAsB;oBAChC,WAAW,EAAE,mCAAmC;oBAChD,SAAS,EAAE,CAAC,mCAAmC,CAAC;iBACjD","sourcesContent":["import { Component } from '@angular/core';\nimport { SkyModalInstance } from '@skyux/modals';\n\nimport { ErrorModalConfig } from './error-modal-config';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-error-modal-form',\n templateUrl: './error-modal-form.component.html',\n styleUrls: ['./error-modal-form.component.scss'],\n})\nexport class SkyErrorModalFormComponent {\n constructor(\n public context: ErrorModalConfig,\n public instance: SkyModalInstance\n ) {}\n}\n","<sky-modal>\n <sky-modal-content>\n <div class=\"sky-error-modal-container\">\n <span class=\"sky-error-modal-title\">{{ context.errorTitle }}</span>\n <span class=\"sky-error-modal-description\">{{\n context.errorDescription\n }}</span>\n <div class=\"sky-error-modal-close\">\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n (click)=\"instance.close()\"\n >\n {{ context.errorCloseText }}\n </button>\n </div>\n </div>\n </sky-modal-content>\n</sky-modal>\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-modal.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error-modal.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"error-modal.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error-modal.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;;;AAE1E;;GAEG;AAIH,MAAM,OAAO,oBAAoB;IAC/B,YAAoB,KAAsB;QAAtB,UAAK,GAAL,KAAK,CAAiB;IAAG,CAAC;IAC9C;;OAEG;IACI,IAAI,CAAC,MAAwB;QAClC,MAAM,SAAS,GAAG,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QAEpE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,0BAA0B,EAAE;YAC1C,QAAQ,EAAE,aAAa;YACvB,SAAS,EAAE,SAAS;SACrB,CAAC,CAAC;IACL,CAAC;;kHAZU,oBAAoB;sHAApB,oBAAoB,cAFnB,MAAM;4FAEP,oBAAoB;kBAHhC,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { SkyModalService } from '@skyux/modals';\n\nimport { ErrorModalConfig } from './error-modal-config';\nimport { SkyErrorModalFormComponent } from './error-modal-form.component';\n\n/**\n * Opens a modal to display a SKY UX-themed error message.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkyErrorModalService {\n constructor(private modal: SkyModalService) {}\n /**\n * Specifies text for the the error message, including title, description, and action label.\n */\n public open(config: ErrorModalConfig) {\n const providers = [{ provide: ErrorModalConfig, useValue: config }];\n\n this.modal.open(SkyErrorModalFormComponent, {\n ariaRole: 'alertdialog',\n providers: providers,\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-title.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error-title.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;AAEjD;;GAEG;AAKH,MAAM,OAAO,sBAAsB;IAJnC;QAKE;;;;WAIG;QAEI,wBAAmB,
|
|
1
|
+
{"version":3,"file":"error-title.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error-title.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;AAEjD;;GAEG;AAKH,MAAM,OAAO,sBAAsB;IAJnC;QAKE;;;;WAIG;QAEI,wBAAmB,GAAG,KAAK,CAAC;KACpC;;oHARY,sBAAsB;wGAAtB,sBAAsB,+GAFvB,2BAA2B;4FAE1B,sBAAsB;kBAJlC,SAAS;mBAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,QAAQ,EAAE,2BAA2B;iBACtC;8BAQQ,mBAAmB;sBADzB,KAAK","sourcesContent":["import { Component, Input } from '@angular/core';\n\n/**\n * Specifies a title to display in the error message.\n */\n@Component({\n selector: 'sky-error-title',\n template: '<ng-content></ng-content>',\n})\nexport class SkyErrorTitleComponent {\n /**\n * Indicates whether to replace the default title. If `false`, the title\n * from this component is added after the default title.\n * @default false\n */\n @Input()\n public replaceDefaultTitle = false;\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, ContentChild, Input } from '@angular/core';
|
|
2
2
|
import { SkyLibResourcesService } from '@skyux/i18n';
|
|
3
|
-
import { SkyErrorTitleComponent } from './error-title.component';
|
|
4
3
|
import { SkyErrorDescriptionComponent } from './error-description.component';
|
|
4
|
+
import { SkyErrorTitleComponent } from './error-title.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
import * as i1 from "@skyux/i18n";
|
|
7
7
|
import * as i2 from "@angular/common";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error.component.ts","../../../../../../../../libs/components/errors/src/lib/modules/error/error.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,
|
|
1
|
+
{"version":3,"file":"error.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error.component.ts","../../../../../../../../libs/components/errors/src/lib/modules/error/error.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;;;;AAGjE;;GAEG;AAMH,MAAM,OAAO,iBAAiB;IA6C5B,YAAoB,gBAAwC;QAAxC,qBAAgB,GAAhB,gBAAgB,CAAwB;QA7B5D;;;WAGG;QAEI,cAAS,GAAG,IAAI,CAAC;QAEjB,UAAK,GAAW,SAAS,CAAC;QAC1B,gBAAW,GAAW,SAAS,CAAC;IAqBwB,CAAC;IA5ChE;;;;OAIG;IACH,IACW,SAAS,CAAC,KAAmB;QACtC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;IAED,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAYD,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAC7E,CAAC;IAED,IAAW,eAAe;QACxB,OAAO,CACL,IAAI,CA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AAE,MAAM,EAAE,OAAO,EAAE,EAAE,GAAG,CAAC,CAAC;IAC5E,CAAC;;+GA1EU,iBAAiB;mGAAjB,iBAAiB,mJAqCd,sBAAsB,iFAGtB,4BAA4B,gDCvD5C,m6BAiCA;4FDlBa,iBAAiB;kBAL7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,WAAW;oBACrB,SAAS,EAAE,CAAC,wBAAwB,CAAC;oBACrC,WAAW,EAAE,wBAAwB;iBACtC;6GAQY,SAAS;sBADnB,KAAK;gBAeC,SAAS;sBADf,KAAK;gBAkBE,QAAQ;sBADf,YAAY;uBAAC,sBAAsB;gBAI5B,cAAc;sBADrB,YAAY;uBAAC,4BAA4B","sourcesContent":["import { Component, ContentChild, Input, OnInit } from '@angular/core';\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { SkyErrorDescriptionComponent } from './error-description.component';\nimport { SkyErrorTitleComponent } from './error-title.component';\nimport { SkyErrorType } from './error-type';\n\n/**\n * Displays a SKY UX-themed error message.\n */\n@Component({\n selector: 'sky-error',\n styleUrls: ['./error.component.scss'],\n templateUrl: './error.component.html',\n})\nexport class SkyErrorComponent implements OnInit {\n /**\n * Specifies an error type to use a set of pre-defined values for the image,\n * title, and description. The valid options are `\"broken\"`, `\"construction\"`,\n * `\"notfound\"`, and `\"security\"`.\n */\n @Input()\n public set errorType(value: SkyErrorType) {\n this._errorType = value;\n this.setErrorTypeFields();\n }\n\n public get errorType() {\n return this._errorType;\n }\n\n /**\n * Indicates whether to display the error image.\n * @default true\n */\n @Input()\n public showImage = true;\n\n public title: string = undefined;\n public description: string = undefined;\n\n public get showTitle(): boolean {\n return this.title && !(this.titleCmp && this.titleCmp.replaceDefaultTitle);\n }\n\n public get showDescription(): boolean {\n return (\n this.description &&\n !(this.descriptionCmp && this.descriptionCmp.replaceDefaultDescription)\n );\n }\n\n @ContentChild(SkyErrorTitleComponent)\n private titleCmp: SkyErrorTitleComponent;\n\n @ContentChild(SkyErrorDescriptionComponent)\n private descriptionCmp: SkyErrorDescriptionComponent;\n\n private _errorType: SkyErrorType;\n\n constructor(private resourcesService: SkyLibResourcesService) {}\n\n public ngOnInit() {\n if (this.errorType) {\n this.setErrorTypeFields();\n }\n }\n\n public setErrorTypeFields() {\n if (this.errorType.toLowerCase() === 'broken') {\n this.title = this.getString('skyux_errors_broken_title');\n this.description = this.getString('skyux_errors_broken_description');\n } else if (this.errorType.toLowerCase() === 'notfound') {\n this.title = this.getString('skyux_errors_not_found_title');\n this.description = this.getString('skyux_errors_not_found_description');\n } else if (this.errorType.toLowerCase() === 'construction') {\n this.title = this.getString('skyux_errors_construction_title');\n this.description = this.getString(\n 'skyux_errors_construction_description'\n );\n } else if (this.errorType.toLowerCase() === 'security') {\n this.title = this.getString('skyux_errors_security_title');\n this.description = this.getString('skyux_errors_security_description');\n }\n }\n\n private getString(key: string): string {\n // TODO: Need to implement the async `getString` method in a breaking change.\n return this.resourcesService.getStringForLocale({ locale: 'en-US' }, key);\n }\n}\n","<div class=\"sky-error\">\n <div\n *ngIf=\"showImage\"\n class=\"sky-error-image-container sky-margin-stacked-lg\"\n >\n <div\n *ngIf=\"errorType\"\n class=\"sky-error-image-svg\"\n [ngClass]=\"['sky-error-' + errorType + '-image']\"\n ></div>\n <ng-content select=\"sky-error-image\"></ng-content>\n </div>\n\n <div class=\"sky-error-title sky-font-heading-1 sky-margin-stacked-lg\">\n <ng-container *ngIf=\"showTitle\">\n {{ title }}\n </ng-container>\n <ng-content select=\"sky-error-title\"></ng-content>\n </div>\n\n <div\n class=\"sky-error-description sky-font-body-default sky-margin-stacked-xl\"\n >\n <span *ngIf=\"showDescription\">\n {{ description }}\n </span>\n <ng-content select=\"sky-error-description\"></ng-content>\n </div>\n\n <div class=\"sky-error-action\">\n <ng-content select=\"sky-error-action\"></ng-content>\n </div>\n</div>\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
3
|
import { SkyModalModule } from '@skyux/modals';
|
|
4
4
|
import { SkyErrorsResourcesModule } from '../shared/sky-errors-resources.module';
|
|
5
|
-
import { SkyErrorComponent } from './error.component';
|
|
6
|
-
import { SkyErrorImageComponent } from './error-image.component';
|
|
7
|
-
import { SkyErrorTitleComponent } from './error-title.component';
|
|
8
|
-
import { SkyErrorDescriptionComponent } from './error-description.component';
|
|
9
5
|
import { SkyErrorActionComponent } from './error-action.component';
|
|
6
|
+
import { SkyErrorDescriptionComponent } from './error-description.component';
|
|
7
|
+
import { SkyErrorImageComponent } from './error-image.component';
|
|
10
8
|
import { SkyErrorModalFormComponent } from './error-modal-form.component';
|
|
9
|
+
import { SkyErrorTitleComponent } from './error-title.component';
|
|
10
|
+
import { SkyErrorComponent } from './error.component';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
export class SkyErrorModule {
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"error.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/error/error.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;;AAqBtD,MAAM,OAAO,cAAc;;4GAAd,cAAc;6GAAd,cAAc,iBAjBvB,iBAAiB;QACjB,sBAAsB;QACtB,sBAAsB;QACtB,4BAA4B;QAC5B,uBAAuB;QACvB,0BAA0B,aAElB,YAAY,EAAE,wBAAwB,EAAE,cAAc,aAE9D,iBAAiB;QACjB,sBAAsB;QACtB,sBAAsB;QACtB,4BAA4B;QAC5B,uBAAuB;6GAId,cAAc,YAVhB,CAAC,YAAY,EAAE,wBAAwB,EAAE,cAAc,CAAC;4FAUtD,cAAc;kBAnB1B,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,iBAAiB;wBACjB,sBAAsB;wBACtB,sBAAsB;wBACtB,4BAA4B;wBAC5B,uBAAuB;wBACvB,0BAA0B;qBAC3B;oBACD,OAAO,EAAE,CAAC,YAAY,EAAE,wBAAwB,EAAE,cAAc,CAAC;oBACjE,OAAO,EAAE;wBACP,iBAAiB;wBACjB,sBAAsB;wBACtB,sBAAsB;wBACtB,4BAA4B;wBAC5B,uBAAuB;qBACxB;oBACD,eAAe,EAAE,CAAC,0BAA0B,CAAC;iBAC9C","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyModalModule } from '@skyux/modals';\n\nimport { SkyErrorsResourcesModule } from '../shared/sky-errors-resources.module';\n\nimport { SkyErrorActionComponent } from './error-action.component';\nimport { SkyErrorDescriptionComponent } from './error-description.component';\nimport { SkyErrorImageComponent } from './error-image.component';\nimport { SkyErrorModalFormComponent } from './error-modal-form.component';\nimport { SkyErrorTitleComponent } from './error-title.component';\nimport { SkyErrorComponent } from './error.component';\n\n@NgModule({\n declarations: [\n SkyErrorComponent,\n SkyErrorImageComponent,\n SkyErrorTitleComponent,\n SkyErrorDescriptionComponent,\n SkyErrorActionComponent,\n SkyErrorModalFormComponent,\n ],\n imports: [CommonModule, SkyErrorsResourcesModule, SkyModalModule],\n exports: [\n SkyErrorComponent,\n SkyErrorImageComponent,\n SkyErrorTitleComponent,\n SkyErrorDescriptionComponent,\n SkyErrorActionComponent,\n ],\n entryComponents: [SkyErrorModalFormComponent],\n})\nexport class SkyErrorModule {}\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* To update this file, simply rerun the command.
|
|
6
6
|
*/
|
|
7
7
|
import { NgModule } from '@angular/core';
|
|
8
|
-
import {
|
|
8
|
+
import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } from '@skyux/i18n';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
const RESOURCES = {
|
|
11
11
|
'EN-US': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sky-errors-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/shared/sky-errors-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"sky-errors-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/errors/src/lib/modules/shared/sky-errors-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,2BAA2B,EAE3B,aAAa,EAGb,qBAAqB,GACtB,MAAM,aAAa,CAAC;;AAErB,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE;QACP,+BAA+B,EAAE;YAC/B,OAAO,EAAE,sDAAsD;SAChE;QACD,yBAAyB,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;QACvD,qCAAqC,EAAE;YACrC,OAAO,EAAE,0DAA0D;SACpE;QACD,+BAA+B,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;QACjE,kCAAkC,EAAE;YAClC,OAAO,EAAE,oDAAoD;SAC9D;QACD,4BAA4B,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;QACjE,iCAAiC,EAAE;YACjC,OAAO,EAAE,oCAAoC;SAC9C;QACD,2BAA2B,EAAE;YAC3B,OAAO,EAAE,yCAAyC;SACnD;KACF;CACF,CAAC;AAEF,MAAM,OAAO,0BAA0B;IAC9B,SAAS,CAAC,UAA4B,EAAE,IAAY;QACzD,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;CACF;AAED;;GAEG;AAWH,MAAM,OAAO,wBAAwB;;sHAAxB,wBAAwB;uHAAxB,wBAAwB,YATzB,aAAa;uHASZ,wBAAwB,aARxB;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,0BAA0B;YACpC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,wBAAwB;kBAVpC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,0BAA0B;4BACpC,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF","sourcesContent":["/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-errors' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_errors_broken_description: {\n message: 'Something went wrong.\\nTry again or come back later.',\n },\n skyux_errors_broken_title: { message: \"That's odd...\" },\n skyux_errors_construction_description: {\n message: 'We appreciate your patience while we\\nmake improvements.',\n },\n skyux_errors_construction_title: { message: 'Work in progress.' },\n skyux_errors_not_found_description: {\n message: 'Pardon us, but this page\\nis missing or has moved.',\n },\n skyux_errors_not_found_title: { message: 'Nothing to see here.' },\n skyux_errors_security_description: {\n message: 'Ask your administrator for access.',\n },\n skyux_errors_security_title: {\n message: \"Heads up!\\nYou're in a restricted area.\",\n },\n },\n};\n\nexport class SkyErrorsResourcesProvider implements SkyLibResourcesProvider {\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyErrorsResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyErrorsResourcesModule {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-fixture.js","sourceRoot":"","sources":["../../../../../../libs/components/errors/testing/src/error-fixture.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error-fixture.js","sourceRoot":"","sources":["../../../../../../libs/components/errors/testing/src/error-fixture.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,yBAAyB,GAAG,yBAAyB,CAAC;AAE5D;;GAEG;AACH,MAAM,OAAO,eAAe;IA4B1B,YAAY,OAA8B,EAAE,SAAiB;QAC3D,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;IAjCD;;OAEG;IACH,IAAW,SAAS;QAClB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAChC,EAAE,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAC3C,CAAC;QAEF,IAAI,OAAO,EAAE;YACX,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC;YAElD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;gBAChD,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC9B,MAAM,OAAO,GAAG,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAEpD,0BAA0B;gBAC1B,IAAI,OAAO,EAAE;oBACX,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;iBACnB;aACF;SACF;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CAWF","sourcesContent":["import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\nconst SKY_ERROR_IMAGE_CLS_REGEX = /^sky-error-(\\w*)-image$/;\n\n/**\n * Allows interaction with a SKY UX error component.\n */\nexport class SkyErrorFixture {\n /**\n * The error's current type.\n */\n public get errorType(): string {\n const imageEl = this.debugEl.query(\n By.css('.sky-error-image-container > div')\n );\n\n if (imageEl) {\n const classList = imageEl.nativeElement.classList;\n\n for (let i = 0, n = classList.length; i < n; i++) {\n const cls = classList.item(i);\n const matches = SKY_ERROR_IMAGE_CLS_REGEX.exec(cls);\n\n /* istanbul ignore else */\n if (matches) {\n return matches[1];\n }\n }\n }\n\n return undefined;\n }\n\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-error'\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-errors-testing.js","sources":["../../../../../libs/components/errors/testing/src/error-fixture.ts","../../../../../libs/components/errors/testing/src/skyux-errors-testing.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"skyux-errors-testing.js","sources":["../../../../../libs/components/errors/testing/src/error-fixture.ts","../../../../../libs/components/errors/testing/src/skyux-errors-testing.ts"],"sourcesContent":["import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\nconst SKY_ERROR_IMAGE_CLS_REGEX = /^sky-error-(\\w*)-image$/;\n\n/**\n * Allows interaction with a SKY UX error component.\n */\nexport class SkyErrorFixture {\n /**\n * The error's current type.\n */\n public get errorType(): string {\n const imageEl = this.debugEl.query(\n By.css('.sky-error-image-container > div')\n );\n\n if (imageEl) {\n const classList = imageEl.nativeElement.classList;\n\n for (let i = 0, n = classList.length; i < n; i++) {\n const cls = classList.item(i);\n const matches = SKY_ERROR_IMAGE_CLS_REGEX.exec(cls);\n\n /* istanbul ignore else */\n if (matches) {\n return matches[1];\n }\n }\n }\n\n return undefined;\n }\n\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-error'\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAKA,MAAM,yBAAyB,GAAG,yBAAyB,CAAC;AAE5D;;;MAGa,eAAe;IA4B1B,YAAY,OAA8B,EAAE,SAAiB;QAC3D,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,WAAW,CACZ,CAAC;KACH;;;;IA9BD,IAAW,SAAS;QAClB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAChC,EAAE,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAC3C,CAAC;QAEF,IAAI,OAAO,EAAE;YACX,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC;YAElD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;gBAChD,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC9B,MAAM,OAAO,GAAG,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;;gBAGpD,IAAI,OAAO,EAAE;oBACX,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;iBACnB;aACF;SACF;QAED,OAAO,SAAS,CAAC;KAClB;;;AClCH;;;;;;"}
|
package/fesm2015/skyux-errors.js
CHANGED
|
@@ -120,29 +120,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
120
120
|
}] });
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* Specifies
|
|
123
|
+
* Specifies an action to include in the error message.
|
|
124
|
+
* For example, you can include a button to reload the page or to refresh data.
|
|
124
125
|
*/
|
|
125
|
-
class
|
|
126
|
-
constructor() {
|
|
127
|
-
/**
|
|
128
|
-
* Indicates whether to replace the default title. If `false`, the title
|
|
129
|
-
* from this component is added after the default title.
|
|
130
|
-
* @default false
|
|
131
|
-
*/
|
|
132
|
-
this.replaceDefaultTitle = false;
|
|
133
|
-
}
|
|
126
|
+
class SkyErrorActionComponent {
|
|
134
127
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
128
|
+
SkyErrorActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
129
|
+
SkyErrorActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyErrorActionComponent, selector: "sky-error-action", ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorActionComponent, decorators: [{
|
|
138
131
|
type: Component,
|
|
139
132
|
args: [{
|
|
140
|
-
selector: 'sky-error-
|
|
133
|
+
selector: 'sky-error-action',
|
|
141
134
|
template: '<ng-content></ng-content>',
|
|
142
135
|
}]
|
|
143
|
-
}]
|
|
144
|
-
type: Input
|
|
145
|
-
}] } });
|
|
136
|
+
}] });
|
|
146
137
|
|
|
147
138
|
/**
|
|
148
139
|
* Specifies a description to provide additional details in the error message.
|
|
@@ -169,6 +160,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
169
160
|
type: Input
|
|
170
161
|
}] } });
|
|
171
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Specifies an image to display in the error message.
|
|
165
|
+
*/
|
|
166
|
+
class SkyErrorImageComponent {
|
|
167
|
+
}
|
|
168
|
+
SkyErrorImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
169
|
+
SkyErrorImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyErrorImageComponent, selector: "sky-error-image", ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorImageComponent, decorators: [{
|
|
171
|
+
type: Component,
|
|
172
|
+
args: [{
|
|
173
|
+
selector: 'sky-error-image',
|
|
174
|
+
template: '<ng-content></ng-content>',
|
|
175
|
+
}]
|
|
176
|
+
}] });
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Specifies a title to display in the error message.
|
|
180
|
+
*/
|
|
181
|
+
class SkyErrorTitleComponent {
|
|
182
|
+
constructor() {
|
|
183
|
+
/**
|
|
184
|
+
* Indicates whether to replace the default title. If `false`, the title
|
|
185
|
+
* from this component is added after the default title.
|
|
186
|
+
* @default false
|
|
187
|
+
*/
|
|
188
|
+
this.replaceDefaultTitle = false;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
SkyErrorTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
192
|
+
SkyErrorTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyErrorTitleComponent, selector: "sky-error-title", inputs: { replaceDefaultTitle: "replaceDefaultTitle" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorTitleComponent, decorators: [{
|
|
194
|
+
type: Component,
|
|
195
|
+
args: [{
|
|
196
|
+
selector: 'sky-error-title',
|
|
197
|
+
template: '<ng-content></ng-content>',
|
|
198
|
+
}]
|
|
199
|
+
}], propDecorators: { replaceDefaultTitle: [{
|
|
200
|
+
type: Input
|
|
201
|
+
}] } });
|
|
202
|
+
|
|
172
203
|
/**
|
|
173
204
|
* Displays a SKY UX-themed error message.
|
|
174
205
|
*/
|
|
@@ -251,37 +282,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
251
282
|
args: [SkyErrorDescriptionComponent]
|
|
252
283
|
}] } });
|
|
253
284
|
|
|
254
|
-
/**
|
|
255
|
-
* Specifies an image to display in the error message.
|
|
256
|
-
*/
|
|
257
|
-
class SkyErrorImageComponent {
|
|
258
|
-
}
|
|
259
|
-
SkyErrorImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
260
|
-
SkyErrorImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyErrorImageComponent, selector: "sky-error-image", ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
261
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorImageComponent, decorators: [{
|
|
262
|
-
type: Component,
|
|
263
|
-
args: [{
|
|
264
|
-
selector: 'sky-error-image',
|
|
265
|
-
template: '<ng-content></ng-content>',
|
|
266
|
-
}]
|
|
267
|
-
}] });
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Specifies an action to include in the error message.
|
|
271
|
-
* For example, you can include a button to reload the page or to refresh data.
|
|
272
|
-
*/
|
|
273
|
-
class SkyErrorActionComponent {
|
|
274
|
-
}
|
|
275
|
-
SkyErrorActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
276
|
-
SkyErrorActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyErrorActionComponent, selector: "sky-error-action", ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorActionComponent, decorators: [{
|
|
278
|
-
type: Component,
|
|
279
|
-
args: [{
|
|
280
|
-
selector: 'sky-error-action',
|
|
281
|
-
template: '<ng-content></ng-content>',
|
|
282
|
-
}]
|
|
283
|
-
}] });
|
|
284
|
-
|
|
285
285
|
class SkyErrorModule {
|
|
286
286
|
}
|
|
287
287
|
SkyErrorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-errors.js","sources":["../../../../../libs/components/errors/src/lib/modules/error/error-modal-config.ts","../../../../../libs/components/errors/src/lib/modules/error/error-modal-form.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error-modal-form.component.html","../../../../../libs/components/errors/src/lib/modules/error/error-modal.service.ts","../../../../../libs/components/errors/src/lib/modules/shared/sky-errors-resources.module.ts","../../../../../libs/components/errors/src/lib/modules/error/error-title.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error-description.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error.component.html","../../../../../libs/components/errors/src/lib/modules/error/error-image.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error-action.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error.module.ts","../../../../../libs/components/errors/src/skyux-errors.ts"],"sourcesContent":["/* istanbul ignore next */\nexport class ErrorModalConfig {\n /**\n * Specifies a title to display in the modal error message.\n * @required\n */\n public errorTitle: string;\n /**\n * Specifies a description to provide additional details in the modal error message.\n * @required\n */\n public errorDescription: string;\n /**\n * Specifies a label for the action button that closes the modal error message.\n * @required\n */\n public errorCloseText: string;\n}\n","import { Component } from '@angular/core';\n\nimport { SkyModalInstance } from '@skyux/modals';\n\nimport { ErrorModalConfig } from './error-modal-config';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-error-modal-form',\n templateUrl: './error-modal-form.component.html',\n styleUrls: ['./error-modal-form.component.scss'],\n})\nexport class SkyErrorModalFormComponent {\n constructor(\n public context: ErrorModalConfig,\n public instance: SkyModalInstance\n ) {}\n}\n","<sky-modal>\n <sky-modal-content>\n <div class=\"sky-error-modal-container\">\n <span class=\"sky-error-modal-title\">{{ context.errorTitle }}</span>\n <span class=\"sky-error-modal-description\">{{\n context.errorDescription\n }}</span>\n <div class=\"sky-error-modal-close\">\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n (click)=\"instance.close()\"\n >\n {{ context.errorCloseText }}\n </button>\n </div>\n </div>\n </sky-modal-content>\n</sky-modal>\n","import { Injectable } from '@angular/core';\n\nimport { SkyModalService } from '@skyux/modals';\n\nimport { ErrorModalConfig } from './error-modal-config';\n\nimport { SkyErrorModalFormComponent } from './error-modal-form.component';\n\n/**\n * Opens a modal to display a SKY UX-themed error message.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkyErrorModalService {\n constructor(private modal: SkyModalService) {}\n /**\n * Specifies text for the the error message, including title, description, and action label.\n */\n public open(config: ErrorModalConfig) {\n const providers = [{ provide: ErrorModalConfig, useValue: config }];\n\n this.modal.open(SkyErrorModalFormComponent, {\n ariaRole: 'alertdialog',\n providers: providers,\n });\n }\n}\n","/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-errors' schematic.\n * To update this file, simply rerun the command.\n */\n\nimport { NgModule } from '@angular/core';\nimport {\n getLibStringForLocale,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n SKY_LIB_RESOURCES_PROVIDERS,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_errors_broken_description: {\n message: 'Something went wrong.\\nTry again or come back later.',\n },\n skyux_errors_broken_title: { message: \"That's odd...\" },\n skyux_errors_construction_description: {\n message: 'We appreciate your patience while we\\nmake improvements.',\n },\n skyux_errors_construction_title: { message: 'Work in progress.' },\n skyux_errors_not_found_description: {\n message: 'Pardon us, but this page\\nis missing or has moved.',\n },\n skyux_errors_not_found_title: { message: 'Nothing to see here.' },\n skyux_errors_security_description: {\n message: 'Ask your administrator for access.',\n },\n skyux_errors_security_title: {\n message: \"Heads up!\\nYou're in a restricted area.\",\n },\n },\n};\n\nexport class SkyErrorsResourcesProvider implements SkyLibResourcesProvider {\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyErrorsResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyErrorsResourcesModule {}\n","import { Component, Input } from '@angular/core';\n\n/**\n * Specifies a title to display in the error message.\n */\n@Component({\n selector: 'sky-error-title',\n template: '<ng-content></ng-content>',\n})\nexport class SkyErrorTitleComponent {\n /**\n * Indicates whether to replace the default title. If `false`, the title\n * from this component is added after the default title.\n * @default false\n */\n @Input()\n public replaceDefaultTitle: boolean = false;\n}\n","import { Component, Input } from '@angular/core';\n\n/**\n * Specifies a description to provide additional details in the error message.\n */\n@Component({\n selector: 'sky-error-description',\n template: '<ng-content></ng-content>',\n})\nexport class SkyErrorDescriptionComponent {\n /**\n * Indicates whether to replace the default description. If `false`, the description\n * from this component is added after the default description.\n * @default false\n */\n @Input()\n public replaceDefaultDescription: boolean = false;\n}\n","import { Component, Input, OnInit, ContentChild } from '@angular/core';\n\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { SkyErrorTitleComponent } from './error-title.component';\n\nimport { SkyErrorDescriptionComponent } from './error-description.component';\n\nimport { SkyErrorType } from './error-type';\n\n/**\n * Displays a SKY UX-themed error message.\n */\n@Component({\n selector: 'sky-error',\n styleUrls: ['./error.component.scss'],\n templateUrl: './error.component.html',\n})\nexport class SkyErrorComponent implements OnInit {\n /**\n * Specifies an error type to use a set of pre-defined values for the image,\n * title, and description. The valid options are `\"broken\"`, `\"construction\"`,\n * `\"notfound\"`, and `\"security\"`.\n */\n @Input()\n public set errorType(value: SkyErrorType) {\n this._errorType = value;\n this.setErrorTypeFields();\n }\n\n public get errorType() {\n return this._errorType;\n }\n\n /**\n * Indicates whether to display the error image.\n * @default true\n */\n @Input()\n public showImage: boolean = true;\n\n public title: string = undefined;\n public description: string = undefined;\n\n public get showTitle(): boolean {\n return this.title && !(this.titleCmp && this.titleCmp.replaceDefaultTitle);\n }\n\n public get showDescription(): boolean {\n return (\n this.description &&\n !(this.descriptionCmp && this.descriptionCmp.replaceDefaultDescription)\n );\n }\n\n @ContentChild(SkyErrorTitleComponent)\n private titleCmp: SkyErrorTitleComponent;\n\n @ContentChild(SkyErrorDescriptionComponent)\n private descriptionCmp: SkyErrorDescriptionComponent;\n\n private _errorType: SkyErrorType;\n\n constructor(private resourcesService: SkyLibResourcesService) {}\n\n public ngOnInit() {\n if (this.errorType) {\n this.setErrorTypeFields();\n }\n }\n\n public setErrorTypeFields() {\n if (this.errorType.toLowerCase() === 'broken') {\n this.title = this.getString('skyux_errors_broken_title');\n this.description = this.getString('skyux_errors_broken_description');\n } else if (this.errorType.toLowerCase() === 'notfound') {\n this.title = this.getString('skyux_errors_not_found_title');\n this.description = this.getString('skyux_errors_not_found_description');\n } else if (this.errorType.toLowerCase() === 'construction') {\n this.title = this.getString('skyux_errors_construction_title');\n this.description = this.getString(\n 'skyux_errors_construction_description'\n );\n } else if (this.errorType.toLowerCase() === 'security') {\n this.title = this.getString('skyux_errors_security_title');\n this.description = this.getString('skyux_errors_security_description');\n }\n }\n\n private getString(key: string): string {\n // TODO: Need to implement the async `getString` method in a breaking change.\n return this.resourcesService.getStringForLocale({ locale: 'en-US' }, key);\n }\n}\n","<div class=\"sky-error\">\n <div\n *ngIf=\"showImage\"\n class=\"sky-error-image-container sky-margin-stacked-lg\"\n >\n <div\n *ngIf=\"errorType\"\n class=\"sky-error-image-svg\"\n [ngClass]=\"['sky-error-' + errorType + '-image']\"\n ></div>\n <ng-content select=\"sky-error-image\"></ng-content>\n </div>\n\n <div class=\"sky-error-title sky-font-heading-1 sky-margin-stacked-lg\">\n <ng-container *ngIf=\"showTitle\">\n {{ title }}\n </ng-container>\n <ng-content select=\"sky-error-title\"></ng-content>\n </div>\n\n <div\n class=\"sky-error-description sky-font-body-default sky-margin-stacked-xl\"\n >\n <span *ngIf=\"showDescription\">\n {{ description }}\n </span>\n <ng-content select=\"sky-error-description\"></ng-content>\n </div>\n\n <div class=\"sky-error-action\">\n <ng-content select=\"sky-error-action\"></ng-content>\n </div>\n</div>\n","import { Component } from '@angular/core';\n\n/**\n * Specifies an image to display in the error message.\n */\n@Component({\n selector: 'sky-error-image',\n template: '<ng-content></ng-content>',\n})\nexport class SkyErrorImageComponent {}\n","import { Component } from '@angular/core';\n\n/**\n * Specifies an action to include in the error message.\n * For example, you can include a button to reload the page or to refresh data.\n */\n@Component({\n selector: 'sky-error-action',\n template: '<ng-content></ng-content>',\n})\nexport class SkyErrorActionComponent {}\n","import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { SkyModalModule } from '@skyux/modals';\n\nimport { SkyErrorsResourcesModule } from '../shared/sky-errors-resources.module';\n\nimport { SkyErrorComponent } from './error.component';\n\nimport { SkyErrorImageComponent } from './error-image.component';\n\nimport { SkyErrorTitleComponent } from './error-title.component';\n\nimport { SkyErrorDescriptionComponent } from './error-description.component';\n\nimport { SkyErrorActionComponent } from './error-action.component';\n\nimport { SkyErrorModalFormComponent } from './error-modal-form.component';\n\n@NgModule({\n declarations: [\n SkyErrorComponent,\n SkyErrorImageComponent,\n SkyErrorTitleComponent,\n SkyErrorDescriptionComponent,\n SkyErrorActionComponent,\n SkyErrorModalFormComponent,\n ],\n imports: [CommonModule, SkyErrorsResourcesModule, SkyModalModule],\n exports: [\n SkyErrorComponent,\n SkyErrorImageComponent,\n SkyErrorTitleComponent,\n SkyErrorDescriptionComponent,\n SkyErrorActionComponent,\n ],\n entryComponents: [SkyErrorModalFormComponent],\n})\nexport class SkyErrorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;MACa,gBA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B;QACjB,sBAAsB;QACtB,sBAAsB;QACtB,4BAA4B;QAC5B,uBAAuB;QACvB,0BAA0B,aAElB,YAAY,EAAE,wBAAwB,EAAE,cAAc,aAE9D,iBAAiB;QACjB,sBAAsB;QACtB,sBAAsB;QACtB,4BAA4B;QAC5B,uBAAuB;6GAId,cAAc,YAVhB,CAAC,YAAY,EAAE,wBAAwB,EAAE,cAAc,CAAC;4FAUtD,cAAc;kBAnB1B,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,iBAAiB;wBACjB,sBAAsB;wBACtB,sBAAsB;wBACtB,4BAA4B;wBAC5B,uBAAuB;wBACvB,0BAA0B;qBAC3B;oBACD,OAAO,EAAE,CAAC,YAAY,EAAE,wBAAwB,EAAE,cAAc,CAAC;oBACjE,OAAO,EAAE;wBACP,iBAAiB;wBACjB,sBAAsB;wBACtB,sBAAsB;wBACtB,4BAA4B;wBAC5B,uBAAuB;qBACxB;oBACD,eAAe,EAAE,CAAC,0BAA0B,CAAC;iBAC9C;;;ACtCD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"skyux-errors.js","sources":["../../../../../libs/components/errors/src/lib/modules/error/error-modal-config.ts","../../../../../libs/components/errors/src/lib/modules/error/error-modal-form.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error-modal-form.component.html","../../../../../libs/components/errors/src/lib/modules/error/error-modal.service.ts","../../../../../libs/components/errors/src/lib/modules/shared/sky-errors-resources.module.ts","../../../../../libs/components/errors/src/lib/modules/error/error-action.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error-description.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error-image.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error-title.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error.component.ts","../../../../../libs/components/errors/src/lib/modules/error/error.component.html","../../../../../libs/components/errors/src/lib/modules/error/error.module.ts","../../../../../libs/components/errors/src/skyux-errors.ts"],"sourcesContent":["/* istanbul ignore next */\nexport class ErrorModalConfig {\n /**\n * Specifies a title to display in the modal error message.\n * @required\n */\n public errorTitle: string;\n /**\n * Specifies a description to provide additional details in the modal error message.\n * @required\n */\n public errorDescription: string;\n /**\n * Specifies a label for the action button that closes the modal error message.\n * @required\n */\n public errorCloseText: string;\n}\n","import { Component } from '@angular/core';\nimport { SkyModalInstance } from '@skyux/modals';\n\nimport { ErrorModalConfig } from './error-modal-config';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-error-modal-form',\n templateUrl: './error-modal-form.component.html',\n styleUrls: ['./error-modal-form.component.scss'],\n})\nexport class SkyErrorModalFormComponent {\n constructor(\n public context: ErrorModalConfig,\n public instance: SkyModalInstance\n ) {}\n}\n","<sky-modal>\n <sky-modal-content>\n <div class=\"sky-error-modal-container\">\n <span class=\"sky-error-modal-title\">{{ context.errorTitle }}</span>\n <span class=\"sky-error-modal-description\">{{\n context.errorDescription\n }}</span>\n <div class=\"sky-error-modal-close\">\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n (click)=\"instance.close()\"\n >\n {{ context.errorCloseText }}\n </button>\n </div>\n </div>\n </sky-modal-content>\n</sky-modal>\n","import { Injectable } from '@angular/core';\nimport { SkyModalService } from '@skyux/modals';\n\nimport { ErrorModalConfig } from './error-modal-config';\nimport { SkyErrorModalFormComponent } from './error-modal-form.component';\n\n/**\n * Opens a modal to display a SKY UX-themed error message.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkyErrorModalService {\n constructor(private modal: SkyModalService) {}\n /**\n * Specifies text for the the error message, including title, description, and action label.\n */\n public open(config: ErrorModalConfig) {\n const providers = [{ provide: ErrorModalConfig, useValue: config }];\n\n this.modal.open(SkyErrorModalFormComponent, {\n ariaRole: 'alertdialog',\n providers: providers,\n });\n }\n}\n","/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-errors' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_errors_broken_description: {\n message: 'Something went wrong.\\nTry again or come back later.',\n },\n skyux_errors_broken_title: { message: \"That's odd...\" },\n skyux_errors_construction_description: {\n message: 'We appreciate your patience while we\\nmake improvements.',\n },\n skyux_errors_construction_title: { message: 'Work in progress.' },\n skyux_errors_not_found_description: {\n message: 'Pardon us, but this page\\nis missing or has moved.',\n },\n skyux_errors_not_found_title: { message: 'Nothing to see here.' },\n skyux_errors_security_description: {\n message: 'Ask your administrator for access.',\n },\n skyux_errors_security_title: {\n message: \"Heads up!\\nYou're in a restricted area.\",\n },\n },\n};\n\nexport class SkyErrorsResourcesProvider implements SkyLibResourcesProvider {\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyErrorsResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyErrorsResourcesModule {}\n","import { Component } from '@angular/core';\n\n/**\n * Specifies an action to include in the error message.\n * For example, you can include a button to reload the page or to refresh data.\n */\n@Component({\n selector: 'sky-error-action',\n template: '<ng-content></ng-content>',\n})\nexport class SkyErrorActionComponent {}\n","import { Component, Input } from '@angular/core';\n\n/**\n * Specifies a description to provide additional details in the error message.\n */\n@Component({\n selector: 'sky-error-description',\n template: '<ng-content></ng-content>',\n})\nexport class SkyErrorDescriptionComponent {\n /**\n * Indicates whether to replace the default description. If `false`, the description\n * from this component is added after the default description.\n * @default false\n */\n @Input()\n public replaceDefaultDescription = false;\n}\n","import { Component } from '@angular/core';\n\n/**\n * Specifies an image to display in the error message.\n */\n@Component({\n selector: 'sky-error-image',\n template: '<ng-content></ng-content>',\n})\nexport class SkyErrorImageComponent {}\n","import { Component, Input } from '@angular/core';\n\n/**\n * Specifies a title to display in the error message.\n */\n@Component({\n selector: 'sky-error-title',\n template: '<ng-content></ng-content>',\n})\nexport class SkyErrorTitleComponent {\n /**\n * Indicates whether to replace the default title. If `false`, the title\n * from this component is added after the default title.\n * @default false\n */\n @Input()\n public replaceDefaultTitle = false;\n}\n","import { Component, ContentChild, Input, OnInit } from '@angular/core';\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { SkyErrorDescriptionComponent } from './error-description.component';\nimport { SkyErrorTitleComponent } from './error-title.component';\nimport { SkyErrorType } from './error-type';\n\n/**\n * Displays a SKY UX-themed error message.\n */\n@Component({\n selector: 'sky-error',\n styleUrls: ['./error.component.scss'],\n templateUrl: './error.component.html',\n})\nexport class SkyErrorComponent implements OnInit {\n /**\n * Specifies an error type to use a set of pre-defined values for the image,\n * title, and description. The valid options are `\"broken\"`, `\"construction\"`,\n * `\"notfound\"`, and `\"security\"`.\n */\n @Input()\n public set errorType(value: SkyErrorType) {\n this._errorType = value;\n this.setErrorTypeFields();\n }\n\n public get errorType() {\n return this._errorType;\n }\n\n /**\n * Indicates whether to display the error image.\n * @default true\n */\n @Input()\n public showImage = true;\n\n public title: string = undefined;\n public description: string = undefined;\n\n public get showTitle(): boolean {\n return this.title && !(this.titleCmp && this.titleCmp.replaceDefaultTitle);\n }\n\n public get showDescription(): boolean {\n return (\n this.description &&\n !(this.descriptionCmp && this.descriptionCmp.replaceDefaultDescription)\n );\n }\n\n @ContentChild(SkyErrorTitleComponent)\n private titleCmp: SkyErrorTitleComponent;\n\n @ContentChild(SkyErrorDescriptionComponent)\n private descriptionCmp: SkyErrorDescriptionComponent;\n\n private _errorType: SkyErrorType;\n\n constructor(private resourcesService: SkyLibResourcesService) {}\n\n public ngOnInit() {\n if (this.errorType) {\n this.setErrorTypeFields();\n }\n }\n\n public setErrorTypeFields() {\n if (this.errorType.toLowerCase() === 'broken') {\n this.title = this.getString('skyux_errors_broken_title');\n this.description = this.getString('skyux_errors_broken_description');\n } else if (this.errorType.toLowerCase() === 'notfound') {\n this.title = this.getString('skyux_errors_not_found_title');\n this.description = this.getString('skyux_errors_not_found_description');\n } else if (this.errorType.toLowerCase() === 'construction') {\n this.title = this.getString('skyux_errors_construction_title');\n this.description = this.getString(\n 'skyux_errors_construction_description'\n );\n } else if (this.errorType.toLowerCase() === 'security') {\n this.title = this.getString('skyux_errors_security_title');\n this.description = this.getString('skyux_errors_security_description');\n }\n }\n\n private getString(key: string): string {\n // TODO: Need to implement the async `getString` method in a breaking change.\n return this.resourcesService.getStringForLocale({ locale: 'en-US' }, key);\n }\n}\n","<div class=\"sky-error\">\n <div\n *ngIf=\"showImage\"\n class=\"sky-error-image-container sky-margin-stacked-lg\"\n >\n <div\n *ngIf=\"errorType\"\n class=\"sky-error-image-svg\"\n [ngClass]=\"['sky-error-' + errorType + '-image']\"\n ></div>\n <ng-content select=\"sky-error-image\"></ng-content>\n </div>\n\n <div class=\"sky-error-title sky-font-heading-1 sky-margin-stacked-lg\">\n <ng-container *ngIf=\"showTitle\">\n {{ title }}\n </ng-container>\n <ng-content select=\"sky-error-title\"></ng-content>\n </div>\n\n <div\n class=\"sky-error-description sky-font-body-default sky-margin-stacked-xl\"\n >\n <span *ngIf=\"showDescription\">\n {{ description }}\n </span>\n <ng-content select=\"sky-error-description\"></ng-content>\n </div>\n\n <div class=\"sky-error-action\">\n <ng-content select=\"sky-error-action\"></ng-content>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyModalModule } from '@skyux/modals';\n\nimport { SkyErrorsResourcesModule } from '../shared/sky-errors-resources.module';\n\nimport { SkyErrorActionComponent } from './error-action.component';\nimport { SkyErrorDescriptionComponent } from './error-description.component';\nimport { SkyErrorImageComponent } from './error-image.component';\nimport { SkyErrorModalFormComponent } from './error-modal-form.component';\nimport { SkyErrorTitleComponent } from './error-title.component';\nimport { SkyErrorComponent } from './error.component';\n\n@NgModule({\n declarations: [\n SkyErrorComponent,\n SkyErrorImageComponent,\n SkyErrorTitleComponent,\n SkyErrorDescriptionComponent,\n SkyErrorActionComponent,\n SkyErrorModalFormComponent,\n ],\n imports: [CommonModule, SkyErrorsResourcesModule, SkyModalModule],\n exports: [\n SkyErrorComponent,\n SkyErrorImageComponent,\n SkyErrorTitleComponent,\n SkyErrorDescriptionComponent,\n SkyErrorActionComponent,\n ],\n entryComponents: [SkyErrorModalFormComponent],\n})\nexport class SkyErrorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;MACa,gBAAgB;;;ACI7B;;;MAQa,0BAA0B;IACrC,YACS,OAAyB,EACzB,QAA0B;QAD1B,YAAO,GAAP,OAAO,CAAkB;QACzB,aAAQ,GAAR,QAAQ,CAAkB;KAC/B;;wHAJO,0BAA0B;4GAA1B,0BAA0B,4DCbvC,+jBAmBA;4FDNa,0BAA0B;kBALtC,SAAS;mBAAC;oBACT,QAAQ,EAAE,sBAAsB;oBAChC,WAAW,EAAE,mCAAmC;oBAChD,SAAS,EAAE,CAAC,mCAAmC,CAAC;iBACjD;;;AEND;;;MAMa,oBAAoB;IAC/B,YAAoB,KAAsB;QAAtB,UAAK,GAAL,KAAK,CAAiB;KAAI;;;;IAIvC,IAAI,CAAC,MAAwB;QAClC,MAAM,SAAS,GAAG,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QAEpE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,0BAA0B,EAAE;YAC1C,QAAQ,EAAE,aAAa;YACvB,SAAS,EAAE,SAAS;SACrB,CAAC,CAAC;KACJ;;kHAZU,oBAAoB;sHAApB,oBAAoB,cAFnB,MAAM;4FAEP,oBAAoB;kBAHhC,UAAU;mBAAC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
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^12.2.16",
|
|
6
|
-
"@angular/core": "^12.2.16",
|
|
7
|
-
"@skyux/modals": "5.5.0-beta.0",
|
|
8
|
-
"@skyux/i18n": "5.5.0-beta.0"
|
|
9
|
-
},
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"tslib": "^2.3.1"
|
|
12
|
-
},
|
|
3
|
+
"version": "5.6.1",
|
|
13
4
|
"author": "Blackbaud, Inc.",
|
|
14
5
|
"keywords": [
|
|
15
6
|
"blackbaud",
|
|
@@ -24,6 +15,17 @@
|
|
|
24
15
|
"url": "https://github.com/blackbaud/skyux/issues"
|
|
25
16
|
},
|
|
26
17
|
"homepage": "https://github.com/blackbaud/skyux#readme",
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@angular/common": "^12.2.16",
|
|
20
|
+
"@angular/core": "^12.2.16",
|
|
21
|
+
"@angular/platform-browser": "^12.2.16",
|
|
22
|
+
"@skyux-sdk/testing": "5.6.1",
|
|
23
|
+
"@skyux/i18n": "5.6.1",
|
|
24
|
+
"@skyux/modals": "5.6.1"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"tslib": "^2.3.1"
|
|
28
|
+
},
|
|
27
29
|
"main": "bundles/skyux-errors.umd.js",
|
|
28
30
|
"module": "fesm2015/skyux-errors.js",
|
|
29
31
|
"es2015": "fesm2015/skyux-errors.js",
|