angular-toolbox 1.3.3 → 1.4.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/README.md +1 -1
- package/esm2022/lib/framework/index.mjs +2 -1
- package/esm2022/lib/framework/mock/documentation/component/atx-mock-description/atx-mock-description.component.mjs +27 -0
- package/esm2022/lib/framework/mock/documentation/component/atx-mock-documentation/atx-mock-documentation.component.mjs +77 -0
- package/esm2022/lib/framework/mock/documentation/component/atx-mock-full-description/atx-mock-full-description.component.mjs +27 -0
- package/esm2022/lib/framework/mock/documentation/component/atx-mock-methods/atx-mock-methods.component.mjs +71 -0
- package/esm2022/lib/framework/mock/documentation/component/atx-mock-param/atx-mock-param.component.mjs +27 -0
- package/esm2022/lib/framework/mock/documentation/index.mjs +2 -0
- package/esm2022/lib/framework/mock/documentation/model/business/full-description.type.mjs +9 -0
- package/esm2022/lib/framework/mock/documentation/model/business/method-doc-descriptor.type.mjs +9 -0
- package/esm2022/lib/framework/mock/http/util/http-mock-response.builder.mjs +5 -17
- package/esm2022/lib/framework/mock/http/util/http-status-text-finder.mjs +146 -0
- package/esm2022/lib/framework/mock/http/util/http-status-text.enum.mjs +260 -0
- package/esm2022/lib/framework/mock/http/util/index.mjs +3 -1
- package/esm2022/lib/model/business/mock/http/http-method-mock.mjs +1 -1
- package/esm2022/lib/model/business/mock/http/http-mock-config.mjs +1 -1
- package/esm2022/lib/model/business/mock/http/http-mock-endpoint-descriptor.mjs +9 -0
- package/esm2022/lib/model/business/mock/http/http-mock-endpoint.mjs +1 -1
- package/esm2022/lib/model/business/mock/http/http-mock-interceptor.mjs +1 -1
- package/esm2022/lib/model/business/mock/http/http-mock-method-descriptor.mjs +9 -0
- package/esm2022/lib/model/business/mock/http/http-mock-parameter-descriptor.mjs +9 -0
- package/esm2022/lib/model/business/mock/http/index.mjs +4 -1
- package/esm2022/lib/model/service/version/angular-toolbox-version.service.mjs +4 -4
- package/fesm2022/angular-toolbox.mjs +640 -17
- package/fesm2022/angular-toolbox.mjs.map +1 -1
- package/lib/framework/index.d.ts +1 -0
- package/lib/framework/mock/documentation/component/atx-mock-description/atx-mock-description.component.d.ts +14 -0
- package/lib/framework/mock/documentation/component/atx-mock-documentation/atx-mock-documentation.component.d.ts +43 -0
- package/lib/framework/mock/documentation/component/atx-mock-full-description/atx-mock-full-description.component.d.ts +15 -0
- package/lib/framework/mock/documentation/component/atx-mock-methods/atx-mock-methods.component.d.ts +29 -0
- package/lib/framework/mock/documentation/component/atx-mock-param/atx-mock-param.component.d.ts +15 -0
- package/lib/framework/mock/documentation/index.d.ts +1 -0
- package/lib/framework/mock/documentation/model/business/full-description.type.d.ts +21 -0
- package/lib/framework/mock/documentation/model/business/method-doc-descriptor.type.d.ts +22 -0
- package/lib/framework/mock/http/util/http-mock-response.builder.d.ts +0 -8
- package/lib/framework/mock/http/util/http-status-text-finder.d.ts +23 -0
- package/lib/framework/mock/http/util/http-status-text.enum.d.ts +252 -0
- package/lib/framework/mock/http/util/index.d.ts +2 -0
- package/lib/model/business/mock/http/http-method-mock.d.ts +5 -0
- package/lib/model/business/mock/http/http-mock-config.d.ts +4 -0
- package/lib/model/business/mock/http/http-mock-endpoint-descriptor.d.ts +21 -0
- package/lib/model/business/mock/http/http-mock-endpoint.d.ts +5 -0
- package/lib/model/business/mock/http/http-mock-interceptor.d.ts +4 -0
- package/lib/model/business/mock/http/http-mock-method-descriptor.d.ts +29 -0
- package/lib/model/business/mock/http/http-mock-parameter-descriptor.d.ts +20 -0
- package/lib/model/business/mock/http/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -585,9 +585,9 @@ class AbstractVersionManager {
|
|
|
585
585
|
*/
|
|
586
586
|
const ATX_VERSION_CONFIG = {
|
|
587
587
|
major: 1,
|
|
588
|
-
minor:
|
|
589
|
-
patch:
|
|
590
|
-
buildTimestamp:
|
|
588
|
+
minor: 4,
|
|
589
|
+
patch: 1,
|
|
590
|
+
buildTimestamp: 1727868693957
|
|
591
591
|
};
|
|
592
592
|
/**
|
|
593
593
|
* The public service that exposes the current version of the Angular Toolbox library.
|
|
@@ -1332,6 +1332,30 @@ var DropdownEventType;
|
|
|
1332
1332
|
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
1333
1333
|
*/
|
|
1334
1334
|
|
|
1335
|
+
/**
|
|
1336
|
+
* @license
|
|
1337
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
1338
|
+
*
|
|
1339
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
1340
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
1341
|
+
*/
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* @license
|
|
1345
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
1346
|
+
*
|
|
1347
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
1348
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
1349
|
+
*/
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* @license
|
|
1353
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
1354
|
+
*
|
|
1355
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
1356
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
1357
|
+
*/
|
|
1358
|
+
|
|
1335
1359
|
/**
|
|
1336
1360
|
* @license
|
|
1337
1361
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
@@ -6218,6 +6242,266 @@ class HttpHeadersUtil {
|
|
|
6218
6242
|
*/
|
|
6219
6243
|
const HTTP_MOCK_MAX_DELAY = 10000;
|
|
6220
6244
|
|
|
6245
|
+
/**
|
|
6246
|
+
* @license
|
|
6247
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
6248
|
+
*
|
|
6249
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6250
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
6251
|
+
*/
|
|
6252
|
+
/**
|
|
6253
|
+
* The list of all HTTP status text.
|
|
6254
|
+
*/
|
|
6255
|
+
var HttpStatusText;
|
|
6256
|
+
(function (HttpStatusText) {
|
|
6257
|
+
//https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
|
|
6258
|
+
// Informational
|
|
6259
|
+
/**
|
|
6260
|
+
* The status text associated with the status code `100`.
|
|
6261
|
+
*/
|
|
6262
|
+
HttpStatusText["CONTINUE"] = "Continue";
|
|
6263
|
+
/**
|
|
6264
|
+
* The status text associated with the status code `101`.
|
|
6265
|
+
*/
|
|
6266
|
+
HttpStatusText["SWITCHING_PROTOCOLS"] = "Switching Protocols";
|
|
6267
|
+
/**
|
|
6268
|
+
* The status text associated with the status code `102`.
|
|
6269
|
+
*/
|
|
6270
|
+
HttpStatusText["PROCESSING"] = "Processing";
|
|
6271
|
+
/**
|
|
6272
|
+
* The status text associated with the status code `103`.
|
|
6273
|
+
*/
|
|
6274
|
+
HttpStatusText["EARLY_HINTS"] = "Early Hints";
|
|
6275
|
+
// Success
|
|
6276
|
+
/**
|
|
6277
|
+
* The status text associated with the status code `200`.
|
|
6278
|
+
*/
|
|
6279
|
+
HttpStatusText["OK"] = "OK";
|
|
6280
|
+
/**
|
|
6281
|
+
* The status text associated with the status code `201`.
|
|
6282
|
+
*/
|
|
6283
|
+
HttpStatusText["CREATED"] = "Created";
|
|
6284
|
+
/**
|
|
6285
|
+
* The status text associated with the status code `202`.
|
|
6286
|
+
*/
|
|
6287
|
+
HttpStatusText["ACCEPTED"] = "Accepted";
|
|
6288
|
+
/**
|
|
6289
|
+
* The status text associated with the status code `203`.
|
|
6290
|
+
*/
|
|
6291
|
+
HttpStatusText["NON_AUTHORITATIVE_INFORMATION"] = "Non-authoritative Information";
|
|
6292
|
+
/**
|
|
6293
|
+
* The status text associated with the status code `204`.
|
|
6294
|
+
*/
|
|
6295
|
+
HttpStatusText["NO_CONTENT"] = "No Content";
|
|
6296
|
+
/**
|
|
6297
|
+
* The status text associated with the status code `205`.
|
|
6298
|
+
*/
|
|
6299
|
+
HttpStatusText["RESET_CONTENT"] = "Reset Content";
|
|
6300
|
+
/**
|
|
6301
|
+
* The status text associated with the status code `206`.
|
|
6302
|
+
*/
|
|
6303
|
+
HttpStatusText["PARTIAL_CONTENT"] = "Partial Content";
|
|
6304
|
+
/**
|
|
6305
|
+
* The status text associated with the status code `207`.
|
|
6306
|
+
*/
|
|
6307
|
+
HttpStatusText["MULTI_STATUS"] = "Multi-Status";
|
|
6308
|
+
/**
|
|
6309
|
+
* The status text associated with the status code `208`.
|
|
6310
|
+
*/
|
|
6311
|
+
HttpStatusText["ALREADY_REPORTED"] = "Already Reported";
|
|
6312
|
+
/**
|
|
6313
|
+
* The status text associated with the status code `226`.
|
|
6314
|
+
*/
|
|
6315
|
+
HttpStatusText["IM_USED"] = "IM Used";
|
|
6316
|
+
// Redirection
|
|
6317
|
+
/**
|
|
6318
|
+
* The status text associated with the status code `300`.
|
|
6319
|
+
*/
|
|
6320
|
+
HttpStatusText["MULTIPLE_CHOICES"] = "Multiple Choices";
|
|
6321
|
+
/**
|
|
6322
|
+
* The status text associated with the status code `301`.
|
|
6323
|
+
*/
|
|
6324
|
+
HttpStatusText["MOVED_PERMANENTLY"] = "Moved Permanently";
|
|
6325
|
+
/**
|
|
6326
|
+
* The status text associated with the status code `302`.
|
|
6327
|
+
*/
|
|
6328
|
+
HttpStatusText["FOUND"] = "Found";
|
|
6329
|
+
/**
|
|
6330
|
+
* The status text associated with the status code `303`.
|
|
6331
|
+
*/
|
|
6332
|
+
HttpStatusText["SEE_OTHER"] = "See Other";
|
|
6333
|
+
/**
|
|
6334
|
+
* The status text associated with the status code `304`.
|
|
6335
|
+
*/
|
|
6336
|
+
HttpStatusText["NOT_MODIFIED"] = "Not Modified";
|
|
6337
|
+
/**
|
|
6338
|
+
* The status text associated with the status code `307`.
|
|
6339
|
+
*/
|
|
6340
|
+
HttpStatusText["TEMPORARY_REDIRECT"] = "Temporary Redirect";
|
|
6341
|
+
/**
|
|
6342
|
+
* The status text associated with the status code `308`.
|
|
6343
|
+
*/
|
|
6344
|
+
HttpStatusText["PERMANENT_REDIRECT"] = "Permanent Redirect";
|
|
6345
|
+
// Client Error
|
|
6346
|
+
/**
|
|
6347
|
+
* The status text associated with the status code `400`.
|
|
6348
|
+
*/
|
|
6349
|
+
HttpStatusText["BAD_REQUEST"] = "Bad Request";
|
|
6350
|
+
/**
|
|
6351
|
+
* The status text associated with the status code `401`.
|
|
6352
|
+
*/
|
|
6353
|
+
HttpStatusText["UNAUTHORIZED"] = "Unauthorized";
|
|
6354
|
+
/**
|
|
6355
|
+
* The status text associated with the status code `402`.
|
|
6356
|
+
*/
|
|
6357
|
+
HttpStatusText["PAYMENT_REQUIRED"] = "Payment Required";
|
|
6358
|
+
/**
|
|
6359
|
+
* The status text associated with the status code `403`.
|
|
6360
|
+
*/
|
|
6361
|
+
HttpStatusText["FORBIDDEN"] = "Forbidden";
|
|
6362
|
+
/**
|
|
6363
|
+
* The status text associated with the status code `404`.
|
|
6364
|
+
*/
|
|
6365
|
+
HttpStatusText["NOT_FOUND"] = "Not Found";
|
|
6366
|
+
/**
|
|
6367
|
+
* The status text associated with the status code `405`.
|
|
6368
|
+
*/
|
|
6369
|
+
HttpStatusText["METHOD_NOT_ALLOWED"] = "Method Not Allowed";
|
|
6370
|
+
/**
|
|
6371
|
+
* The status text associated with the status code `406`.
|
|
6372
|
+
*/
|
|
6373
|
+
HttpStatusText["NOT_ACCEPTABLE"] = "Not Acceptable";
|
|
6374
|
+
/**
|
|
6375
|
+
* The status text associated with the status code `407`.
|
|
6376
|
+
*/
|
|
6377
|
+
HttpStatusText["PROXY_AUTHENTICATION_REQUIRED"] = "Proxy Authentication Required";
|
|
6378
|
+
/**
|
|
6379
|
+
* The status text associated with the status code `408`.
|
|
6380
|
+
*/
|
|
6381
|
+
HttpStatusText["REQUEST_TIMEOUT"] = "Request Timeout";
|
|
6382
|
+
/**
|
|
6383
|
+
* The status text associated with the status code `409`.
|
|
6384
|
+
*/
|
|
6385
|
+
HttpStatusText["CONFLICT"] = "Conflict";
|
|
6386
|
+
/**
|
|
6387
|
+
* The status text associated with the status code `410`.
|
|
6388
|
+
*/
|
|
6389
|
+
HttpStatusText["GONE"] = "Gone";
|
|
6390
|
+
/**
|
|
6391
|
+
* The status text associated with the status code `411`.
|
|
6392
|
+
*/
|
|
6393
|
+
HttpStatusText["LENGTH_REQUIRED"] = "Length Required";
|
|
6394
|
+
/**
|
|
6395
|
+
* The status text associated with the status code `412`.
|
|
6396
|
+
*/
|
|
6397
|
+
HttpStatusText["PRECONDITION_FAILED"] = "Precondition Failed";
|
|
6398
|
+
/**
|
|
6399
|
+
* The status text associated with the status code `413`.
|
|
6400
|
+
*/
|
|
6401
|
+
HttpStatusText["PAYLOAD_TOO_LARGE"] = "Payload Too Large";
|
|
6402
|
+
/**
|
|
6403
|
+
* The status text associated with the status code `414`.
|
|
6404
|
+
*/
|
|
6405
|
+
HttpStatusText["URI_TOO_LONG"] = "URI Too Long";
|
|
6406
|
+
/**
|
|
6407
|
+
* The status text associated with the status code `415`.
|
|
6408
|
+
*/
|
|
6409
|
+
HttpStatusText["UNSUPPORTED_MEDIA_TYPE"] = "Unsupported Media Type";
|
|
6410
|
+
/**
|
|
6411
|
+
* The status text associated with the status code `416`.
|
|
6412
|
+
*/
|
|
6413
|
+
HttpStatusText["RANGE_NOT_SATISFIABLE"] = "Range Not Satisfiable";
|
|
6414
|
+
/**
|
|
6415
|
+
* The status text associated with the status code `417`.
|
|
6416
|
+
*/
|
|
6417
|
+
HttpStatusText["EXPECTATION_FAILED"] = "Expectation Failed";
|
|
6418
|
+
/**
|
|
6419
|
+
* The status text associated with the status code `418`.
|
|
6420
|
+
*/
|
|
6421
|
+
HttpStatusText["I_M_A_TEAPOT"] = "I'm a teapot";
|
|
6422
|
+
/**
|
|
6423
|
+
* The status text associated with the status code `421`.
|
|
6424
|
+
*/
|
|
6425
|
+
HttpStatusText["MISDIRECTED_REQUEST"] = "Misdirected Request";
|
|
6426
|
+
/**
|
|
6427
|
+
* The status text associated with the status code `422`.
|
|
6428
|
+
*/
|
|
6429
|
+
HttpStatusText["UNPROCESSABLE_ENTITY"] = "Unprocessable Entity";
|
|
6430
|
+
/**
|
|
6431
|
+
* The status text associated with the status code `423`.
|
|
6432
|
+
*/
|
|
6433
|
+
HttpStatusText["LOCKED"] = "Locked";
|
|
6434
|
+
/**
|
|
6435
|
+
* The status text associated with the status code `424`.
|
|
6436
|
+
*/
|
|
6437
|
+
HttpStatusText["FAILED_DEPENDENCY"] = "Failed Dependency";
|
|
6438
|
+
/**
|
|
6439
|
+
* The status text associated with the status code `426`.
|
|
6440
|
+
*/
|
|
6441
|
+
HttpStatusText["UPGRADE_REQUIRED"] = "Upgrade Required";
|
|
6442
|
+
/**
|
|
6443
|
+
* The status text associated with the status code `428`.
|
|
6444
|
+
*/
|
|
6445
|
+
HttpStatusText["PRECONDITION_REQUIRED"] = "Precondition Required";
|
|
6446
|
+
/**
|
|
6447
|
+
* The status text associated with the status code `429`.
|
|
6448
|
+
*/
|
|
6449
|
+
HttpStatusText["TOO_MANY_REQUESTS"] = "Too Many Requests";
|
|
6450
|
+
/**
|
|
6451
|
+
* The status text associated with the status code `431`.
|
|
6452
|
+
*/
|
|
6453
|
+
HttpStatusText["REQUEST_HEADER_FIELDS_TOO_LARGE"] = "Request Header Fields Too Large";
|
|
6454
|
+
/**
|
|
6455
|
+
* The status text associated with the status code `451`.
|
|
6456
|
+
*/
|
|
6457
|
+
HttpStatusText["UNAVAILABLE_FOR_LEGAL_REASONS"] = "Unavailable For Legal Reasons";
|
|
6458
|
+
//Server Error
|
|
6459
|
+
/**
|
|
6460
|
+
* The status text associated with the status code `500`.
|
|
6461
|
+
*/
|
|
6462
|
+
HttpStatusText["INTERNAL_SERVER_ERROR"] = "Internal Server Error";
|
|
6463
|
+
/**
|
|
6464
|
+
* The status text associated with the status code `501`.
|
|
6465
|
+
*/
|
|
6466
|
+
HttpStatusText["NOT_IMPLEMENTED"] = "Not Implemented";
|
|
6467
|
+
/**
|
|
6468
|
+
* The status text associated with the status code `502`.
|
|
6469
|
+
*/
|
|
6470
|
+
HttpStatusText["BAD_GATEWAY"] = "Bad Gateway";
|
|
6471
|
+
/**
|
|
6472
|
+
* The status text associated with the status code `503`.
|
|
6473
|
+
*/
|
|
6474
|
+
HttpStatusText["SERVICE_UNAVAILABLE"] = "Service Unavailable";
|
|
6475
|
+
/**
|
|
6476
|
+
* The status text associated with the status code `504`.
|
|
6477
|
+
*/
|
|
6478
|
+
HttpStatusText["GATEWAY_TIMEOUT"] = "Gateway Timeout";
|
|
6479
|
+
/**
|
|
6480
|
+
* The status text associated with the status code `505`.
|
|
6481
|
+
*/
|
|
6482
|
+
HttpStatusText["HTTP_VERSION_NOT_SUPPORTED"] = "HTTP Version Not Supported";
|
|
6483
|
+
/**
|
|
6484
|
+
* The status text associated with the status code `506`.
|
|
6485
|
+
*/
|
|
6486
|
+
HttpStatusText["VARIANT_ALSO_NEGOTIATES"] = "Variant Also Negotiates";
|
|
6487
|
+
/**
|
|
6488
|
+
* The status text associated with the status code `507`.
|
|
6489
|
+
*/
|
|
6490
|
+
HttpStatusText["INSUFFICIENT_STORAGE"] = "Insufficient Storage";
|
|
6491
|
+
/**
|
|
6492
|
+
* The status text associated with the status code `508`.
|
|
6493
|
+
*/
|
|
6494
|
+
HttpStatusText["LOOP_DETECTED"] = "Loop Detected";
|
|
6495
|
+
/**
|
|
6496
|
+
* The status text associated with the status code `510`.
|
|
6497
|
+
*/
|
|
6498
|
+
HttpStatusText["NOT_EXTENDED"] = "Not Extended";
|
|
6499
|
+
/**
|
|
6500
|
+
* The status text associated with the status code `511`.
|
|
6501
|
+
*/
|
|
6502
|
+
HttpStatusText["NETWORK_AUTHENTICATION_REQUIRED"] = "Network Authentication Required";
|
|
6503
|
+
})(HttpStatusText || (HttpStatusText = {}));
|
|
6504
|
+
|
|
6221
6505
|
/**
|
|
6222
6506
|
* @license
|
|
6223
6507
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
@@ -6227,8 +6511,148 @@ const HTTP_MOCK_MAX_DELAY = 10000;
|
|
|
6227
6511
|
*/
|
|
6228
6512
|
/**
|
|
6229
6513
|
* @private
|
|
6514
|
+
* A utility class that helps to retreive a status text depending on its status code.
|
|
6515
|
+
*/
|
|
6516
|
+
class HttpStatusTextFinder {
|
|
6517
|
+
/**
|
|
6518
|
+
* @private
|
|
6519
|
+
* Retreives and return a status text depending on its status code.
|
|
6520
|
+
*
|
|
6521
|
+
* @param code The status code for which to find the status text.
|
|
6522
|
+
* @returns A `HttpStatusText` constant.
|
|
6523
|
+
*/
|
|
6524
|
+
static getStatusText(code) {
|
|
6525
|
+
if (code === HttpStatusCode.Continue)
|
|
6526
|
+
return HttpStatusText.CONTINUE;
|
|
6527
|
+
if (code === HttpStatusCode.SwitchingProtocols)
|
|
6528
|
+
return HttpStatusText.SWITCHING_PROTOCOLS;
|
|
6529
|
+
if (code === HttpStatusCode.Processing)
|
|
6530
|
+
return HttpStatusText.PROCESSING;
|
|
6531
|
+
if (code === HttpStatusCode.EarlyHints)
|
|
6532
|
+
return HttpStatusText.EARLY_HINTS;
|
|
6533
|
+
if (code === HttpStatusCode.Ok)
|
|
6534
|
+
return HttpStatusText.OK;
|
|
6535
|
+
if (code === HttpStatusCode.Created)
|
|
6536
|
+
return HttpStatusText.CREATED;
|
|
6537
|
+
if (code === HttpStatusCode.Accepted)
|
|
6538
|
+
return HttpStatusText.ACCEPTED;
|
|
6539
|
+
if (code === HttpStatusCode.NonAuthoritativeInformation)
|
|
6540
|
+
return HttpStatusText.NON_AUTHORITATIVE_INFORMATION;
|
|
6541
|
+
if (code === HttpStatusCode.NoContent)
|
|
6542
|
+
return HttpStatusText.NO_CONTENT;
|
|
6543
|
+
if (code === HttpStatusCode.ResetContent)
|
|
6544
|
+
return HttpStatusText.RESET_CONTENT;
|
|
6545
|
+
if (code === HttpStatusCode.PartialContent)
|
|
6546
|
+
return HttpStatusText.PARTIAL_CONTENT;
|
|
6547
|
+
if (code === HttpStatusCode.MultiStatus)
|
|
6548
|
+
return HttpStatusText.MULTI_STATUS;
|
|
6549
|
+
if (code === HttpStatusCode.AlreadyReported)
|
|
6550
|
+
return HttpStatusText.ALREADY_REPORTED;
|
|
6551
|
+
if (code === HttpStatusCode.ImUsed)
|
|
6552
|
+
return HttpStatusText.IM_USED;
|
|
6553
|
+
if (code === HttpStatusCode.MultipleChoices)
|
|
6554
|
+
return HttpStatusText.MULTIPLE_CHOICES;
|
|
6555
|
+
if (code === HttpStatusCode.MovedPermanently)
|
|
6556
|
+
return HttpStatusText.MOVED_PERMANENTLY;
|
|
6557
|
+
if (code === HttpStatusCode.Found)
|
|
6558
|
+
return HttpStatusText.FOUND;
|
|
6559
|
+
if (code === HttpStatusCode.SeeOther)
|
|
6560
|
+
return HttpStatusText.SEE_OTHER;
|
|
6561
|
+
if (code === HttpStatusCode.NotModified)
|
|
6562
|
+
return HttpStatusText.NOT_MODIFIED;
|
|
6563
|
+
if (code === HttpStatusCode.TemporaryRedirect)
|
|
6564
|
+
return HttpStatusText.TEMPORARY_REDIRECT;
|
|
6565
|
+
if (code === HttpStatusCode.PermanentRedirect)
|
|
6566
|
+
return HttpStatusText.PERMANENT_REDIRECT;
|
|
6567
|
+
if (code === HttpStatusCode.BadRequest)
|
|
6568
|
+
return HttpStatusText.BAD_REQUEST;
|
|
6569
|
+
if (code === HttpStatusCode.Unauthorized)
|
|
6570
|
+
return HttpStatusText.UNAUTHORIZED;
|
|
6571
|
+
if (code === HttpStatusCode.PaymentRequired)
|
|
6572
|
+
return HttpStatusText.PAYMENT_REQUIRED;
|
|
6573
|
+
if (code === HttpStatusCode.Forbidden)
|
|
6574
|
+
return HttpStatusText.FORBIDDEN;
|
|
6575
|
+
if (code === HttpStatusCode.NotFound)
|
|
6576
|
+
return HttpStatusText.NOT_FOUND;
|
|
6577
|
+
if (code === HttpStatusCode.MethodNotAllowed)
|
|
6578
|
+
return HttpStatusText.METHOD_NOT_ALLOWED;
|
|
6579
|
+
if (code === HttpStatusCode.NotAcceptable)
|
|
6580
|
+
return HttpStatusText.NOT_ACCEPTABLE;
|
|
6581
|
+
if (code === HttpStatusCode.ProxyAuthenticationRequired)
|
|
6582
|
+
return HttpStatusText.PROXY_AUTHENTICATION_REQUIRED;
|
|
6583
|
+
if (code === HttpStatusCode.RequestTimeout)
|
|
6584
|
+
return HttpStatusText.REQUEST_TIMEOUT;
|
|
6585
|
+
if (code === HttpStatusCode.Conflict)
|
|
6586
|
+
return HttpStatusText.CONFLICT;
|
|
6587
|
+
if (code === HttpStatusCode.Gone)
|
|
6588
|
+
return HttpStatusText.GONE;
|
|
6589
|
+
if (code === HttpStatusCode.LengthRequired)
|
|
6590
|
+
return HttpStatusText.LENGTH_REQUIRED;
|
|
6591
|
+
if (code === HttpStatusCode.PreconditionFailed)
|
|
6592
|
+
return HttpStatusText.PRECONDITION_FAILED;
|
|
6593
|
+
if (code === HttpStatusCode.PayloadTooLarge)
|
|
6594
|
+
return HttpStatusText.PAYLOAD_TOO_LARGE;
|
|
6595
|
+
if (code === HttpStatusCode.UriTooLong)
|
|
6596
|
+
return HttpStatusText.URI_TOO_LONG;
|
|
6597
|
+
if (code === HttpStatusCode.UnsupportedMediaType)
|
|
6598
|
+
return HttpStatusText.UNSUPPORTED_MEDIA_TYPE;
|
|
6599
|
+
if (code === HttpStatusCode.RangeNotSatisfiable)
|
|
6600
|
+
return HttpStatusText.RANGE_NOT_SATISFIABLE;
|
|
6601
|
+
if (code === HttpStatusCode.ExpectationFailed)
|
|
6602
|
+
return HttpStatusText.EXPECTATION_FAILED;
|
|
6603
|
+
if (code === HttpStatusCode.ImATeapot)
|
|
6604
|
+
return HttpStatusText.I_M_A_TEAPOT;
|
|
6605
|
+
if (code === HttpStatusCode.MisdirectedRequest)
|
|
6606
|
+
return HttpStatusText.MISDIRECTED_REQUEST;
|
|
6607
|
+
if (code === HttpStatusCode.UnprocessableEntity)
|
|
6608
|
+
return HttpStatusText.UNPROCESSABLE_ENTITY;
|
|
6609
|
+
if (code === HttpStatusCode.Locked)
|
|
6610
|
+
return HttpStatusText.LOCKED;
|
|
6611
|
+
if (code === HttpStatusCode.FailedDependency)
|
|
6612
|
+
return HttpStatusText.FAILED_DEPENDENCY;
|
|
6613
|
+
if (code === HttpStatusCode.UpgradeRequired)
|
|
6614
|
+
return HttpStatusText.UPGRADE_REQUIRED;
|
|
6615
|
+
if (code === HttpStatusCode.PreconditionRequired)
|
|
6616
|
+
return HttpStatusText.PRECONDITION_REQUIRED;
|
|
6617
|
+
if (code === HttpStatusCode.TooManyRequests)
|
|
6618
|
+
return HttpStatusText.TOO_MANY_REQUESTS;
|
|
6619
|
+
if (code === HttpStatusCode.RequestHeaderFieldsTooLarge)
|
|
6620
|
+
return HttpStatusText.REQUEST_HEADER_FIELDS_TOO_LARGE;
|
|
6621
|
+
if (code === HttpStatusCode.UnavailableForLegalReasons)
|
|
6622
|
+
return HttpStatusText.UNAVAILABLE_FOR_LEGAL_REASONS;
|
|
6623
|
+
if (code === HttpStatusCode.InternalServerError)
|
|
6624
|
+
return HttpStatusText.INTERNAL_SERVER_ERROR;
|
|
6625
|
+
if (code === HttpStatusCode.NotImplemented)
|
|
6626
|
+
return HttpStatusText.NOT_IMPLEMENTED;
|
|
6627
|
+
if (code === HttpStatusCode.BadGateway)
|
|
6628
|
+
return HttpStatusText.BAD_GATEWAY;
|
|
6629
|
+
if (code === HttpStatusCode.ServiceUnavailable)
|
|
6630
|
+
return HttpStatusText.SERVICE_UNAVAILABLE;
|
|
6631
|
+
if (code === HttpStatusCode.GatewayTimeout)
|
|
6632
|
+
return HttpStatusText.GATEWAY_TIMEOUT;
|
|
6633
|
+
if (code === HttpStatusCode.HttpVersionNotSupported)
|
|
6634
|
+
return HttpStatusText.HTTP_VERSION_NOT_SUPPORTED;
|
|
6635
|
+
if (code === HttpStatusCode.VariantAlsoNegotiates)
|
|
6636
|
+
return HttpStatusText.VARIANT_ALSO_NEGOTIATES;
|
|
6637
|
+
if (code === HttpStatusCode.InsufficientStorage)
|
|
6638
|
+
return HttpStatusText.INSUFFICIENT_STORAGE;
|
|
6639
|
+
if (code === HttpStatusCode.LoopDetected)
|
|
6640
|
+
return HttpStatusText.LOOP_DETECTED;
|
|
6641
|
+
if (code === HttpStatusCode.NotExtended)
|
|
6642
|
+
return HttpStatusText.NOT_EXTENDED;
|
|
6643
|
+
if (code === HttpStatusCode.NetworkAuthenticationRequired)
|
|
6644
|
+
return HttpStatusText.NETWORK_AUTHENTICATION_REQUIRED;
|
|
6645
|
+
return HttpStatusText.INTERNAL_SERVER_ERROR;
|
|
6646
|
+
}
|
|
6647
|
+
}
|
|
6648
|
+
|
|
6649
|
+
/**
|
|
6650
|
+
* @license
|
|
6651
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
6652
|
+
*
|
|
6653
|
+
* Use of this source code is governed by an MIT-style license that can be found in
|
|
6654
|
+
* the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
6230
6655
|
*/
|
|
6231
|
-
const OK = "OK";
|
|
6232
6656
|
/**
|
|
6233
6657
|
* A statefull builder for creating new `HttpResponseMock` instances.
|
|
6234
6658
|
*/
|
|
@@ -6241,7 +6665,7 @@ class HttpResponseMockBuilder {
|
|
|
6241
6665
|
url: null,
|
|
6242
6666
|
body: null,
|
|
6243
6667
|
status: HttpStatusCode.Ok,
|
|
6244
|
-
statusText:
|
|
6668
|
+
statusText: EMPTY_STRING,
|
|
6245
6669
|
error: null,
|
|
6246
6670
|
delay: 0
|
|
6247
6671
|
};
|
|
@@ -6297,17 +6721,6 @@ class HttpResponseMockBuilder {
|
|
|
6297
6721
|
this._response.status = status;
|
|
6298
6722
|
return this;
|
|
6299
6723
|
}
|
|
6300
|
-
/**
|
|
6301
|
-
* Sets the `statusText` property of the new `HttpResponseMock` instance with the specified `statusText` value.
|
|
6302
|
-
*
|
|
6303
|
-
* @param statusText The value used to set the `statusText` property of the new `HttpResponseMock` instance.
|
|
6304
|
-
*
|
|
6305
|
-
* @returns A reference to this `HttpResponseMockBuilder` instance.
|
|
6306
|
-
*/
|
|
6307
|
-
statusText(statusText) {
|
|
6308
|
-
this._response.statusText = statusText;
|
|
6309
|
-
return this;
|
|
6310
|
-
}
|
|
6311
6724
|
/**
|
|
6312
6725
|
* Sets the `url` property of the new `HttpResponseMock` instance with the specified `url` value.
|
|
6313
6726
|
*
|
|
@@ -6358,6 +6771,7 @@ class HttpResponseMockBuilder {
|
|
|
6358
6771
|
*/
|
|
6359
6772
|
response(error = null) {
|
|
6360
6773
|
this._response.error = error;
|
|
6774
|
+
this._response.statusText = HttpStatusTextFinder.getStatusText(this._response.status);
|
|
6361
6775
|
return this._response;
|
|
6362
6776
|
}
|
|
6363
6777
|
}
|
|
@@ -7445,6 +7859,215 @@ const httpMockFactory = () => {
|
|
|
7445
7859
|
return new XhrProxyFactoryImpl(inject(HttpMockService), inject(HttpMockLoggingService));
|
|
7446
7860
|
};
|
|
7447
7861
|
|
|
7862
|
+
/**
|
|
7863
|
+
* @license
|
|
7864
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
7865
|
+
*
|
|
7866
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7867
|
+
* found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7868
|
+
*/
|
|
7869
|
+
/**
|
|
7870
|
+
* @private
|
|
7871
|
+
* Displays documentation for HTTP fragment parameters, or query parameters.
|
|
7872
|
+
*/
|
|
7873
|
+
class AtxMockParamComponent {
|
|
7874
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AtxMockParamComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7875
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.3", type: AtxMockParamComponent, isStandalone: true, selector: "atx-mock-param", inputs: { params: "params" }, ngImport: i0, template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n\r\n@if (params) {\r\n <div class=\"atx-mock-param-container\">\r\n @for (param of params; track param) {\r\n <dl class=\"param\">\r\n <dt><code>{{ param.ref }}</code></dt>\r\n <dd [innerHTML]=\"param.description | safeHtml\"></dd>\r\n </dl>\r\n }\r\n </div>\r\n}\r\n", styles: [".param dt{font-weight:400;min-width:70px}.param dt:before{padding-right:.2em;content:\"-\"}\n/**\n * @license\n * Copyright Pascal ECHEMANN. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\n */\n"], dependencies: [{ kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] }); }
|
|
7876
|
+
}
|
|
7877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AtxMockParamComponent, decorators: [{
|
|
7878
|
+
type: Component,
|
|
7879
|
+
args: [{ selector: 'atx-mock-param', standalone: true, imports: [
|
|
7880
|
+
SafeHtmlPipe
|
|
7881
|
+
], template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n\r\n@if (params) {\r\n <div class=\"atx-mock-param-container\">\r\n @for (param of params; track param) {\r\n <dl class=\"param\">\r\n <dt><code>{{ param.ref }}</code></dt>\r\n <dd [innerHTML]=\"param.description | safeHtml\"></dd>\r\n </dl>\r\n }\r\n </div>\r\n}\r\n", styles: [".param dt{font-weight:400;min-width:70px}.param dt:before{padding-right:.2em;content:\"-\"}\n/**\n * @license\n * Copyright Pascal ECHEMANN. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\n */\n"] }]
|
|
7882
|
+
}], propDecorators: { params: [{
|
|
7883
|
+
type: Input
|
|
7884
|
+
}] } });
|
|
7885
|
+
|
|
7886
|
+
/**
|
|
7887
|
+
* @license
|
|
7888
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
7889
|
+
*
|
|
7890
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7891
|
+
* found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7892
|
+
*/
|
|
7893
|
+
/**
|
|
7894
|
+
* @private
|
|
7895
|
+
* A conmponent that renders mock config description ppoperties.
|
|
7896
|
+
*/
|
|
7897
|
+
class AtxMockDescriptionComponent {
|
|
7898
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AtxMockDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7899
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.3", type: AtxMockDescriptionComponent, isStandalone: true, selector: "atx-mock-description", inputs: { description: "description" }, ngImport: i0, template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n\r\n<div [innerHTML]=\"description | safeHtml\"></div>\r\n", dependencies: [{ kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] }); }
|
|
7900
|
+
}
|
|
7901
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AtxMockDescriptionComponent, decorators: [{
|
|
7902
|
+
type: Component,
|
|
7903
|
+
args: [{ selector: 'atx-mock-description', standalone: true, imports: [
|
|
7904
|
+
SafeHtmlPipe
|
|
7905
|
+
], template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n\r\n<div [innerHTML]=\"description | safeHtml\"></div>\r\n" }]
|
|
7906
|
+
}], propDecorators: { description: [{
|
|
7907
|
+
type: Input
|
|
7908
|
+
}] } });
|
|
7909
|
+
|
|
7910
|
+
/**
|
|
7911
|
+
* @license
|
|
7912
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
7913
|
+
*
|
|
7914
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7915
|
+
* found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7916
|
+
*/
|
|
7917
|
+
/**
|
|
7918
|
+
* @private
|
|
7919
|
+
* A convenient component that displays the description and the origin of a mock config section.
|
|
7920
|
+
*/
|
|
7921
|
+
class AtxMockFullDescriptionComponent {
|
|
7922
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AtxMockFullDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7923
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.3", type: AtxMockFullDescriptionComponent, isStandalone: true, selector: "atx-mock-full-description", inputs: { config: "config" }, ngImport: i0, template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n \r\n@if (config) {\r\n <div class=\"description\">\r\n @if (config.description) {\r\n <atx-mock-description [description]=\"config.description\"/>\r\n }\r\n @if (config.origin) {\r\n <dl>\r\n <dt>origin:</dt>\r\n <dd><a [href]=\"config.origin\" [title]=\"config.origin\"><code>{{ config.origin }}</code></a></dd>\r\n </dl>\r\n }\r\n </div>\r\n}\r\n", dependencies: [{ kind: "component", type: AtxMockDescriptionComponent, selector: "atx-mock-description", inputs: ["description"] }] }); }
|
|
7924
|
+
}
|
|
7925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AtxMockFullDescriptionComponent, decorators: [{
|
|
7926
|
+
type: Component,
|
|
7927
|
+
args: [{ selector: 'atx-mock-full-description', standalone: true, imports: [
|
|
7928
|
+
AtxMockDescriptionComponent
|
|
7929
|
+
], template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n \r\n@if (config) {\r\n <div class=\"description\">\r\n @if (config.description) {\r\n <atx-mock-description [description]=\"config.description\"/>\r\n }\r\n @if (config.origin) {\r\n <dl>\r\n <dt>origin:</dt>\r\n <dd><a [href]=\"config.origin\" [title]=\"config.origin\"><code>{{ config.origin }}</code></a></dd>\r\n </dl>\r\n }\r\n </div>\r\n}\r\n" }]
|
|
7930
|
+
}], propDecorators: { config: [{
|
|
7931
|
+
type: Input
|
|
7932
|
+
}] } });
|
|
7933
|
+
|
|
7934
|
+
/**
|
|
7935
|
+
* @license
|
|
7936
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
7937
|
+
*
|
|
7938
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7939
|
+
* found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
7940
|
+
*/
|
|
7941
|
+
/**
|
|
7942
|
+
* @private
|
|
7943
|
+
*/
|
|
7944
|
+
const ROUTE = "route";
|
|
7945
|
+
/**
|
|
7946
|
+
* @private
|
|
7947
|
+
*/
|
|
7948
|
+
const DESCRIPTOR = "descriptor";
|
|
7949
|
+
/**
|
|
7950
|
+
* @private
|
|
7951
|
+
* A convenient component that allows to display documentation for HTTP methods of an endpoint.
|
|
7952
|
+
*/
|
|
7953
|
+
class AtxMockMethodsComponent {
|
|
7954
|
+
constructor() {
|
|
7955
|
+
/**
|
|
7956
|
+
* @private
|
|
7957
|
+
*/
|
|
7958
|
+
this.methods = [];
|
|
7959
|
+
}
|
|
7960
|
+
/**
|
|
7961
|
+
* @private
|
|
7962
|
+
* The endpoint for which to show HTTP methods documentation.
|
|
7963
|
+
*/
|
|
7964
|
+
set endpoint(value) {
|
|
7965
|
+
this._endpoint = value;
|
|
7966
|
+
this.methods = this.initMethodList(value);
|
|
7967
|
+
}
|
|
7968
|
+
get endpoint() {
|
|
7969
|
+
return this._endpoint;
|
|
7970
|
+
}
|
|
7971
|
+
/**
|
|
7972
|
+
* @private
|
|
7973
|
+
*/
|
|
7974
|
+
initMethodList(endpoint) {
|
|
7975
|
+
const keys = Object.keys(endpoint);
|
|
7976
|
+
const methods = [];
|
|
7977
|
+
keys.forEach(key => {
|
|
7978
|
+
if (key !== ROUTE && key !== DESCRIPTOR) {
|
|
7979
|
+
const mock = endpoint[key];
|
|
7980
|
+
methods.push({
|
|
7981
|
+
method: key,
|
|
7982
|
+
descriptor: mock.descriptor
|
|
7983
|
+
});
|
|
7984
|
+
}
|
|
7985
|
+
});
|
|
7986
|
+
return methods;
|
|
7987
|
+
}
|
|
7988
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AtxMockMethodsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7989
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.3", type: AtxMockMethodsComponent, isStandalone: true, selector: "atx-mock-methods", inputs: { endpoint: "endpoint" }, ngImport: i0, template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n \r\n@if (methods.length) {\r\n <h3>Methods</h3>\r\n <ul>\r\n @for (item of methods; track item; let last = $last) {\r\n <li>\r\n <span>{{ item.method }}</span>\r\n @if (item.descriptor) {\r\n <div class=\"method-descriptor\">\r\n @if (item.descriptor.description) {\r\n <atx-mock-description [description]=\"item.descriptor.description\"/>\r\n }\r\n @if (item.descriptor.payload) {\r\n <dl>\r\n <dt>payload:</dt>\r\n <dd [innerHTML]=\"item.descriptor.payload\"></dd>\r\n </dl>\r\n }\r\n @if (item.descriptor.body) {\r\n <dl>\r\n <dt>body:</dt>\r\n <dd [innerHTML]=\"item.descriptor.body\"></dd>\r\n </dl>\r\n }\r\n @if (item.descriptor.queryParams) {\r\n <h4>Query Parameters</h4>\r\n <atx-mock-param [params]=\"item.descriptor.queryParams\"/>\r\n }\r\n </div>\r\n \r\n }\r\n </li>\r\n @if (!last) {\r\n <hr>\r\n }\r\n }\r\n </ul>\r\n}\r\n", dependencies: [{ kind: "component", type: AtxMockParamComponent, selector: "atx-mock-param", inputs: ["params"] }, { kind: "component", type: AtxMockDescriptionComponent, selector: "atx-mock-description", inputs: ["description"] }] }); }
|
|
7990
|
+
}
|
|
7991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AtxMockMethodsComponent, decorators: [{
|
|
7992
|
+
type: Component,
|
|
7993
|
+
args: [{ selector: 'atx-mock-methods', standalone: true, imports: [
|
|
7994
|
+
AtxMockParamComponent,
|
|
7995
|
+
AtxMockDescriptionComponent
|
|
7996
|
+
], template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n \r\n@if (methods.length) {\r\n <h3>Methods</h3>\r\n <ul>\r\n @for (item of methods; track item; let last = $last) {\r\n <li>\r\n <span>{{ item.method }}</span>\r\n @if (item.descriptor) {\r\n <div class=\"method-descriptor\">\r\n @if (item.descriptor.description) {\r\n <atx-mock-description [description]=\"item.descriptor.description\"/>\r\n }\r\n @if (item.descriptor.payload) {\r\n <dl>\r\n <dt>payload:</dt>\r\n <dd [innerHTML]=\"item.descriptor.payload\"></dd>\r\n </dl>\r\n }\r\n @if (item.descriptor.body) {\r\n <dl>\r\n <dt>body:</dt>\r\n <dd [innerHTML]=\"item.descriptor.body\"></dd>\r\n </dl>\r\n }\r\n @if (item.descriptor.queryParams) {\r\n <h4>Query Parameters</h4>\r\n <atx-mock-param [params]=\"item.descriptor.queryParams\"/>\r\n }\r\n </div>\r\n \r\n }\r\n </li>\r\n @if (!last) {\r\n <hr>\r\n }\r\n }\r\n </ul>\r\n}\r\n" }]
|
|
7997
|
+
}], propDecorators: { endpoint: [{
|
|
7998
|
+
type: Input
|
|
7999
|
+
}] } });
|
|
8000
|
+
|
|
8001
|
+
/**
|
|
8002
|
+
* @license
|
|
8003
|
+
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
8004
|
+
*
|
|
8005
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
8006
|
+
* found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
|
|
8007
|
+
*/
|
|
8008
|
+
/**
|
|
8009
|
+
* @private
|
|
8010
|
+
*/
|
|
8011
|
+
const OPEN = "open";
|
|
8012
|
+
/**
|
|
8013
|
+
* @private
|
|
8014
|
+
*/
|
|
8015
|
+
const DETAILS = "details";
|
|
8016
|
+
/**
|
|
8017
|
+
* An easy-to-use component that displays the documentation of a `HttpMockConfig` object.
|
|
8018
|
+
*/
|
|
8019
|
+
class AtxMockDocumentation {
|
|
8020
|
+
/**
|
|
8021
|
+
* Gets or sets the `HttpMockConfig` object for which to display documentation.
|
|
8022
|
+
*/
|
|
8023
|
+
set config(value) {
|
|
8024
|
+
this.configApi = value;
|
|
8025
|
+
this.expanded = false;
|
|
8026
|
+
}
|
|
8027
|
+
get config() {
|
|
8028
|
+
return this.configApi;
|
|
8029
|
+
}
|
|
8030
|
+
/**
|
|
8031
|
+
* @private
|
|
8032
|
+
*/
|
|
8033
|
+
constructor(elmRef) {
|
|
8034
|
+
this.elmRef = elmRef;
|
|
8035
|
+
/**
|
|
8036
|
+
* @private
|
|
8037
|
+
*/
|
|
8038
|
+
this.expanded = false;
|
|
8039
|
+
/**
|
|
8040
|
+
* Specifies the title of the current display.
|
|
8041
|
+
*/
|
|
8042
|
+
this.title = "HTTP Mock API";
|
|
8043
|
+
}
|
|
8044
|
+
/**
|
|
8045
|
+
* @private
|
|
8046
|
+
*/
|
|
8047
|
+
toggleExpandState() {
|
|
8048
|
+
const details = this.elmRef.nativeElement.querySelectorAll(DETAILS);
|
|
8049
|
+
this.expanded = !this.expanded;
|
|
8050
|
+
if (this.expanded)
|
|
8051
|
+
return details.forEach((elm) => elm.setAttribute(OPEN, EMPTY_STRING));
|
|
8052
|
+
details.forEach((elm) => elm.removeAttribute(OPEN));
|
|
8053
|
+
}
|
|
8054
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AtxMockDocumentation, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8055
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.3", type: AtxMockDocumentation, isStandalone: true, selector: "atx-mock-documentation", inputs: { title: "title", config: "config" }, ngImport: i0, template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n \r\n@if (configApi) {\r\n <section>\r\n <h1>{{ title }}</h1>\r\n <h2>Description</h2>\r\n @if (configApi.description || configApi.origin) {\r\n <atx-mock-full-description [config]=\"configApi\"/>\r\n }\r\n </section>\r\n <section>\r\n <h2>Interceptors</h2>\r\n <button (click)=\"toggleExpandState()\">{{ expanded ? 'Collapse' : 'Expand' }} all</button>\r\n @if (configApi.interceptors) {\r\n @for (inteceptor of configApi.interceptors; track inteceptor) {\r\n <details>\r\n <summary>\r\n {{ inteceptor.id }}\r\n </summary>\r\n @if (inteceptor.description || inteceptor.origin) {\r\n <atx-mock-full-description [config]=\"inteceptor\"/>\r\n }\r\n @for (endpoint of inteceptor.endpoints; track endpoint; let last = $last) {\r\n <section class=\"endpoint\">\r\n <dl>\r\n <dt>route:</dt>\r\n <dd><code>{{ endpoint.route }}</code></dd>\r\n </dl>\r\n @if (endpoint.descriptor) {\r\n @if (endpoint.descriptor.description) {\r\n <atx-mock-description [description]=\"endpoint.descriptor.description\"/>\r\n }\r\n @if (endpoint.descriptor.params) {\r\n <h3>Parameters</h3>\r\n <atx-mock-param [params]=\"endpoint.descriptor.params\"/>\r\n }\r\n }\r\n <atx-mock-methods [endpoint]=\"endpoint\"/>\r\n </section>\r\n @if (!last) {\r\n <hr>\r\n }\r\n }\r\n </details>\r\n }\r\n }\r\n </section>\r\n}\r\n", styles: [":host,:host::ng-deep{font-family:Arial,Helvetica,sans-serif;line-height:1.5;-webkit-text-size-adjust:100%;margin:0;font-size:.95em}:host h1,:host h2,:host h3,:host h4,:host::ng-deep h1,:host::ng-deep h2,:host::ng-deep h3,:host::ng-deep h4{font-weight:700}:host h1,:host::ng-deep h1{font-size:1.5em;margin:.67em 0}:host h2,:host::ng-deep h2{font-size:1.25em}:host h3,:host::ng-deep h3{font-size:1em;text-decoration:underline}:host h4,:host::ng-deep h4{font-size:1em;margin:1em 0 0}:host hr,:host::ng-deep hr{box-sizing:content-box;height:0;overflow:visible}:host div,:host::ng-deep div{margin-top:1em;margin-bottom:1em}:host a,:host::ng-deep a{background-color:transparent}:host code,:host::ng-deep code{font-family:monospace,monospace;font-size:1.05em;color:orchid}:host button,:host::ng-deep button{font-family:inherit;font-size:.9em;line-height:1.15;margin:-45px 0 0;text-transform:none;padding:5px 10px;border:1px solid #aaa;border-radius:5px;float:right}:host details,:host::ng-deep details{display:block;border:1px solid #aaa;border-radius:4px;padding:.5em .5em 0;margin-bottom:.5em}:host summary,:host::ng-deep summary{display:list-item;font-weight:700;margin:-.5em -.5em 0;padding:.5em}:host details[open],:host::ng-deep details[open]{padding:.5em 1.5em}:host details[open] summary,:host::ng-deep details[open] summary{border-bottom:1px solid #aaa;margin-bottom:1em;padding:.5em 0}:host dl,:host::ng-deep dl{display:flex;margin:.5em 0}:host dt,:host::ng-deep dt{margin:0;font-weight:700}:host dd,:host::ng-deep dd{margin:0;margin-inline-start:10px}:host ul,:host::ng-deep ul{margin:0;padding-inline-start:40px;margin-block-start:1em;margin-block-end:1em}:host li,:host::ng-deep li{margin:0;display:flex;align-items:baseline}:host .endpoint,:host::ng-deep .endpoint{padding:.25em 1em;background-color:#eee;color:#000}:host .description,:host::ng-deep .description{margin-bottom:1em}:host span,:host::ng-deep span{text-transform:uppercase;display:inline-block;width:80px}:host .method-descriptor,:host::ng-deep .method-descriptor{line-height:.95em;margin:0}:host .method-descriptor dt,:host::ng-deep .method-descriptor dt{width:80px}:host .atx-mock-param-container,:host::ng-deep .atx-mock-param-container{padding-inline-start:40px;line-height:.95em}\n/**\n * @license\n * Copyright Pascal ECHEMANN. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\n */\n"], dependencies: [{ kind: "component", type: AtxMockParamComponent, selector: "atx-mock-param", inputs: ["params"] }, { kind: "component", type: AtxMockDescriptionComponent, selector: "atx-mock-description", inputs: ["description"] }, { kind: "component", type: AtxMockFullDescriptionComponent, selector: "atx-mock-full-description", inputs: ["config"] }, { kind: "component", type: AtxMockMethodsComponent, selector: "atx-mock-methods", inputs: ["endpoint"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8056
|
+
}
|
|
8057
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AtxMockDocumentation, decorators: [{
|
|
8058
|
+
type: Component,
|
|
8059
|
+
args: [{ selector: 'atx-mock-documentation', standalone: true, imports: [
|
|
8060
|
+
AtxMockParamComponent,
|
|
8061
|
+
AtxMockDescriptionComponent,
|
|
8062
|
+
AtxMockFullDescriptionComponent,
|
|
8063
|
+
AtxMockMethodsComponent
|
|
8064
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n \r\n@if (configApi) {\r\n <section>\r\n <h1>{{ title }}</h1>\r\n <h2>Description</h2>\r\n @if (configApi.description || configApi.origin) {\r\n <atx-mock-full-description [config]=\"configApi\"/>\r\n }\r\n </section>\r\n <section>\r\n <h2>Interceptors</h2>\r\n <button (click)=\"toggleExpandState()\">{{ expanded ? 'Collapse' : 'Expand' }} all</button>\r\n @if (configApi.interceptors) {\r\n @for (inteceptor of configApi.interceptors; track inteceptor) {\r\n <details>\r\n <summary>\r\n {{ inteceptor.id }}\r\n </summary>\r\n @if (inteceptor.description || inteceptor.origin) {\r\n <atx-mock-full-description [config]=\"inteceptor\"/>\r\n }\r\n @for (endpoint of inteceptor.endpoints; track endpoint; let last = $last) {\r\n <section class=\"endpoint\">\r\n <dl>\r\n <dt>route:</dt>\r\n <dd><code>{{ endpoint.route }}</code></dd>\r\n </dl>\r\n @if (endpoint.descriptor) {\r\n @if (endpoint.descriptor.description) {\r\n <atx-mock-description [description]=\"endpoint.descriptor.description\"/>\r\n }\r\n @if (endpoint.descriptor.params) {\r\n <h3>Parameters</h3>\r\n <atx-mock-param [params]=\"endpoint.descriptor.params\"/>\r\n }\r\n }\r\n <atx-mock-methods [endpoint]=\"endpoint\"/>\r\n </section>\r\n @if (!last) {\r\n <hr>\r\n }\r\n }\r\n </details>\r\n }\r\n }\r\n </section>\r\n}\r\n", styles: [":host,:host::ng-deep{font-family:Arial,Helvetica,sans-serif;line-height:1.5;-webkit-text-size-adjust:100%;margin:0;font-size:.95em}:host h1,:host h2,:host h3,:host h4,:host::ng-deep h1,:host::ng-deep h2,:host::ng-deep h3,:host::ng-deep h4{font-weight:700}:host h1,:host::ng-deep h1{font-size:1.5em;margin:.67em 0}:host h2,:host::ng-deep h2{font-size:1.25em}:host h3,:host::ng-deep h3{font-size:1em;text-decoration:underline}:host h4,:host::ng-deep h4{font-size:1em;margin:1em 0 0}:host hr,:host::ng-deep hr{box-sizing:content-box;height:0;overflow:visible}:host div,:host::ng-deep div{margin-top:1em;margin-bottom:1em}:host a,:host::ng-deep a{background-color:transparent}:host code,:host::ng-deep code{font-family:monospace,monospace;font-size:1.05em;color:orchid}:host button,:host::ng-deep button{font-family:inherit;font-size:.9em;line-height:1.15;margin:-45px 0 0;text-transform:none;padding:5px 10px;border:1px solid #aaa;border-radius:5px;float:right}:host details,:host::ng-deep details{display:block;border:1px solid #aaa;border-radius:4px;padding:.5em .5em 0;margin-bottom:.5em}:host summary,:host::ng-deep summary{display:list-item;font-weight:700;margin:-.5em -.5em 0;padding:.5em}:host details[open],:host::ng-deep details[open]{padding:.5em 1.5em}:host details[open] summary,:host::ng-deep details[open] summary{border-bottom:1px solid #aaa;margin-bottom:1em;padding:.5em 0}:host dl,:host::ng-deep dl{display:flex;margin:.5em 0}:host dt,:host::ng-deep dt{margin:0;font-weight:700}:host dd,:host::ng-deep dd{margin:0;margin-inline-start:10px}:host ul,:host::ng-deep ul{margin:0;padding-inline-start:40px;margin-block-start:1em;margin-block-end:1em}:host li,:host::ng-deep li{margin:0;display:flex;align-items:baseline}:host .endpoint,:host::ng-deep .endpoint{padding:.25em 1em;background-color:#eee;color:#000}:host .description,:host::ng-deep .description{margin-bottom:1em}:host span,:host::ng-deep span{text-transform:uppercase;display:inline-block;width:80px}:host .method-descriptor,:host::ng-deep .method-descriptor{line-height:.95em;margin:0}:host .method-descriptor dt,:host::ng-deep .method-descriptor dt{width:80px}:host .atx-mock-param-container,:host::ng-deep .atx-mock-param-container{padding-inline-start:40px;line-height:.95em}\n/**\n * @license\n * Copyright Pascal ECHEMANN. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\n */\n"] }]
|
|
8065
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { title: [{
|
|
8066
|
+
type: Input
|
|
8067
|
+
}], config: [{
|
|
8068
|
+
type: Input
|
|
8069
|
+
}] } });
|
|
8070
|
+
|
|
7448
8071
|
/**
|
|
7449
8072
|
* @license
|
|
7450
8073
|
* Copyright Pascal ECHEMANN. All Rights Reserved.
|
|
@@ -9016,5 +9639,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
|
|
|
9016
9639
|
* Generated bundle index. Do not edit.
|
|
9017
9640
|
*/
|
|
9018
9641
|
|
|
9019
|
-
export { APP_PRIDGE_REF, ATX_LOGGER_CONFIG, AbstractLogger, AbstractSubscriptionManager, AbstractVersionManager, AbstractWindowService, AnchorLinklDirective, AngularToolboxLogoComponent, AngularToolboxModule, AngularToolboxVersionService, AppBridgeError, AppBridgeService, ArrayList, ArrayListEvent, ArrayListEventType, AtxHttpMockConsoleService, AtxMonitoringConsoleComponent, BIGINT, BOOLEAN, BUTTON_ROLE, BorderLayout, BorderLayoutContainer, ButtonRoleDirective, CSS_PROP, ConsoleLogConnector, ContentRendererDirective, DARK_MODE_CONFIG, DEFAULT_LOG_CONNECTOR, DarkModeService, DefaultLogConnector, DropdownComponent, DropdownEvent, DropdownEventType, EMPTY_STRING, FEATURES, FUNCTION, FetchClient, FetchClientBuilder, FetchClientResponseType, HTTP_MOCKING_FRAMEWORK_CONFIG, HTTP_MOCK_MAX_DELAY, HTTP_MOCK_SERVICE, HtmlLogConnector, HttpHeadersMockBuilder, HttpMock, HttpMockLoggingService, HttpMockProductionPolicy, HttpMockService, HttpMockServiceError, HttpResponseMockBuilder, IdentifiableComponent, IntegrityError, LINK_ROLE, LOG_CONFIG_STRING, LOG_ERROR_STRING, LOG_INFO_STRING, LOG_WARNING_STRING, LayoutDragEvent, LayoutDragEventType, LayoutRegion, LogBuilder, LogImpl, LogLevel, LogUtil, LoggerService, NUMBER, NavigateToUrlDirective, OBJECT, STORAGE_KEY, STRING, SYMBOL, SafeHtmlPipe, ScrollService, SubscriptionError, SubscriptionService, UNDEFINED, Uuid, VERSION_CONFIG, VersionService, VersionUtil, WindowFeatureState, WindowService, WindowTarget, httpHeadersMock, httpMockFactory, httpResponseMock };
|
|
9642
|
+
export { APP_PRIDGE_REF, ATX_LOGGER_CONFIG, AbstractLogger, AbstractSubscriptionManager, AbstractVersionManager, AbstractWindowService, AnchorLinklDirective, AngularToolboxLogoComponent, AngularToolboxModule, AngularToolboxVersionService, AppBridgeError, AppBridgeService, ArrayList, ArrayListEvent, ArrayListEventType, AtxHttpMockConsoleService, AtxMockDocumentation, AtxMonitoringConsoleComponent, BIGINT, BOOLEAN, BUTTON_ROLE, BorderLayout, BorderLayoutContainer, ButtonRoleDirective, CSS_PROP, ConsoleLogConnector, ContentRendererDirective, DARK_MODE_CONFIG, DEFAULT_LOG_CONNECTOR, DarkModeService, DefaultLogConnector, DropdownComponent, DropdownEvent, DropdownEventType, EMPTY_STRING, FEATURES, FUNCTION, FetchClient, FetchClientBuilder, FetchClientResponseType, HTTP_MOCKING_FRAMEWORK_CONFIG, HTTP_MOCK_MAX_DELAY, HTTP_MOCK_SERVICE, HtmlLogConnector, HttpHeadersMockBuilder, HttpMock, HttpMockLoggingService, HttpMockProductionPolicy, HttpMockService, HttpMockServiceError, HttpResponseMockBuilder, HttpStatusText, HttpStatusTextFinder, IdentifiableComponent, IntegrityError, LINK_ROLE, LOG_CONFIG_STRING, LOG_ERROR_STRING, LOG_INFO_STRING, LOG_WARNING_STRING, LayoutDragEvent, LayoutDragEventType, LayoutRegion, LogBuilder, LogImpl, LogLevel, LogUtil, LoggerService, NUMBER, NavigateToUrlDirective, OBJECT, STORAGE_KEY, STRING, SYMBOL, SafeHtmlPipe, ScrollService, SubscriptionError, SubscriptionService, UNDEFINED, Uuid, VERSION_CONFIG, VersionService, VersionUtil, WindowFeatureState, WindowService, WindowTarget, httpHeadersMock, httpMockFactory, httpResponseMock };
|
|
9020
9643
|
//# sourceMappingURL=angular-toolbox.mjs.map
|