@genesislcap/foundation-utils 14.275.3 → 14.276.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -367,6 +367,91 @@
367
367
  }
368
368
  ]
369
369
  },
370
+ {
371
+ "kind": "javascript-module",
372
+ "path": "src/design-system/design-system.ts",
373
+ "declarations": [
374
+ {
375
+ "kind": "function",
376
+ "name": "assureDesignSystem",
377
+ "return": {
378
+ "type": {
379
+ "text": "DesignSystemModule"
380
+ }
381
+ },
382
+ "parameters": [
383
+ {
384
+ "name": "module",
385
+ "type": {
386
+ "text": "DesignSystemModule"
387
+ }
388
+ }
389
+ ],
390
+ "description": "assureDesignSystem.",
391
+ "privacy": "public"
392
+ },
393
+ {
394
+ "kind": "function",
395
+ "name": "getCurrentDesignSystemPrefix",
396
+ "return": {
397
+ "type": {
398
+ "text": ""
399
+ }
400
+ },
401
+ "parameters": [
402
+ {
403
+ "name": "element",
404
+ "type": {
405
+ "text": "HTMLElement"
406
+ },
407
+ "description": "The starting HTML element"
408
+ },
409
+ {
410
+ "name": "fallbackPrefix",
411
+ "type": {
412
+ "text": "string"
413
+ },
414
+ "description": "The prefix to fallback to if the provider is not available"
415
+ }
416
+ ],
417
+ "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
418
+ "privacy": "public"
419
+ }
420
+ ],
421
+ "exports": [
422
+ {
423
+ "kind": "js",
424
+ "name": "assureDesignSystem",
425
+ "declaration": {
426
+ "name": "assureDesignSystem",
427
+ "module": "src/design-system/design-system.ts"
428
+ }
429
+ },
430
+ {
431
+ "kind": "js",
432
+ "name": "getCurrentDesignSystemPrefix",
433
+ "declaration": {
434
+ "name": "getCurrentDesignSystemPrefix",
435
+ "module": "src/design-system/design-system.ts"
436
+ }
437
+ }
438
+ ]
439
+ },
440
+ {
441
+ "kind": "javascript-module",
442
+ "path": "src/design-system/index.ts",
443
+ "declarations": [],
444
+ "exports": [
445
+ {
446
+ "kind": "js",
447
+ "name": "*",
448
+ "declaration": {
449
+ "name": "*",
450
+ "package": "./design-system"
451
+ }
452
+ }
453
+ ]
454
+ },
370
455
  {
371
456
  "kind": "javascript-module",
372
457
  "path": "src/decorators/index.ts",
@@ -899,91 +984,6 @@
899
984
  }
900
985
  ]
901
986
  },
902
- {
903
- "kind": "javascript-module",
904
- "path": "src/design-system/design-system.ts",
905
- "declarations": [
906
- {
907
- "kind": "function",
908
- "name": "assureDesignSystem",
909
- "return": {
910
- "type": {
911
- "text": "DesignSystemModule"
912
- }
913
- },
914
- "parameters": [
915
- {
916
- "name": "module",
917
- "type": {
918
- "text": "DesignSystemModule"
919
- }
920
- }
921
- ],
922
- "description": "assureDesignSystem.",
923
- "privacy": "public"
924
- },
925
- {
926
- "kind": "function",
927
- "name": "getCurrentDesignSystemPrefix",
928
- "return": {
929
- "type": {
930
- "text": ""
931
- }
932
- },
933
- "parameters": [
934
- {
935
- "name": "element",
936
- "type": {
937
- "text": "HTMLElement"
938
- },
939
- "description": "The starting HTML element"
940
- },
941
- {
942
- "name": "fallbackPrefix",
943
- "type": {
944
- "text": "string"
945
- },
946
- "description": "The prefix to fallback to if the provider is not available"
947
- }
948
- ],
949
- "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
950
- "privacy": "public"
951
- }
952
- ],
953
- "exports": [
954
- {
955
- "kind": "js",
956
- "name": "assureDesignSystem",
957
- "declaration": {
958
- "name": "assureDesignSystem",
959
- "module": "src/design-system/design-system.ts"
960
- }
961
- },
962
- {
963
- "kind": "js",
964
- "name": "getCurrentDesignSystemPrefix",
965
- "declaration": {
966
- "name": "getCurrentDesignSystemPrefix",
967
- "module": "src/design-system/design-system.ts"
968
- }
969
- }
970
- ]
971
- },
972
- {
973
- "kind": "javascript-module",
974
- "path": "src/design-system/index.ts",
975
- "declarations": [],
976
- "exports": [
977
- {
978
- "kind": "js",
979
- "name": "*",
980
- "declaration": {
981
- "name": "*",
982
- "package": "./design-system"
983
- }
984
- }
985
- ]
986
- },
987
987
  {
988
988
  "kind": "javascript-module",
989
989
  "path": "src/error/errorMap.ts",
@@ -2257,11 +2257,55 @@
2257
2257
  }
2258
2258
  ]
2259
2259
  },
2260
+ {
2261
+ "kind": "javascript-module",
2262
+ "path": "src/utils/delay.ts",
2263
+ "declarations": [
2264
+ {
2265
+ "kind": "function",
2266
+ "name": "delay",
2267
+ "return": {
2268
+ "type": {
2269
+ "text": ""
2270
+ }
2271
+ },
2272
+ "parameters": [
2273
+ {
2274
+ "name": "ms",
2275
+ "type": {
2276
+ "text": "number"
2277
+ },
2278
+ "description": "The number of milliseconds to delay"
2279
+ }
2280
+ ],
2281
+ "description": "Delay for a given number of milliseconds",
2282
+ "privacy": "public"
2283
+ }
2284
+ ],
2285
+ "exports": [
2286
+ {
2287
+ "kind": "js",
2288
+ "name": "delay",
2289
+ "declaration": {
2290
+ "name": "delay",
2291
+ "module": "src/utils/delay.ts"
2292
+ }
2293
+ }
2294
+ ]
2295
+ },
2260
2296
  {
2261
2297
  "kind": "javascript-module",
2262
2298
  "path": "src/utils/index.ts",
2263
2299
  "declarations": [],
2264
2300
  "exports": [
2301
+ {
2302
+ "kind": "js",
2303
+ "name": "*",
2304
+ "declaration": {
2305
+ "name": "*",
2306
+ "package": "./delay"
2307
+ }
2308
+ },
2265
2309
  {
2266
2310
  "kind": "js",
2267
2311
  "name": "*",
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Delay for a given number of milliseconds
3
+ * @param ms - The number of milliseconds to delay
4
+ * @returns A promise that resolves after the given number of milliseconds
5
+ * @public
6
+ * @example
7
+ * ```ts
8
+ * await delay(1000);
9
+ * console.log('1 second later');
10
+ * ```
11
+ */
12
+ export declare const delay: (ms: number) => Promise<void>;
13
+ //# sourceMappingURL=delay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delay.d.ts","sourceRoot":"","sources":["../../../src/utils/delay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,OAAQ,MAAM,KAAG,QAAQ,IAAI,CAG3C,CAAC"}
@@ -1,2 +1,3 @@
1
+ export * from './delay';
1
2
  export * from './logger';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Delay for a given number of milliseconds
3
+ * @param ms - The number of milliseconds to delay
4
+ * @returns A promise that resolves after the given number of milliseconds
5
+ * @public
6
+ * @example
7
+ * ```ts
8
+ * await delay(1000);
9
+ * console.log('1 second later');
10
+ * ```
11
+ */
12
+ export const delay = (ms) => new Promise((resolve) => {
13
+ setTimeout(resolve, ms);
14
+ });
@@ -1 +1,2 @@
1
+ export * from './delay';
1
2
  export * from './logger';
@@ -2471,6 +2471,38 @@
2471
2471
  }
2472
2472
  ]
2473
2473
  },
2474
+ {
2475
+ "kind": "Variable",
2476
+ "canonicalReference": "@genesislcap/foundation-utils!delay:var",
2477
+ "docComment": "/**\n * Delay for a given number of milliseconds\n *\n * @param ms - The number of milliseconds to delay\n *\n * @returns A promise that resolves after the given number of milliseconds\n *\n * @example\n * ```ts\n * await delay(1000);\n * console.log('1 second later');\n * ```\n *\n * @public\n */\n",
2478
+ "excerptTokens": [
2479
+ {
2480
+ "kind": "Content",
2481
+ "text": "delay: "
2482
+ },
2483
+ {
2484
+ "kind": "Content",
2485
+ "text": "(ms: number) => "
2486
+ },
2487
+ {
2488
+ "kind": "Reference",
2489
+ "text": "Promise",
2490
+ "canonicalReference": "!Promise:interface"
2491
+ },
2492
+ {
2493
+ "kind": "Content",
2494
+ "text": "<void>"
2495
+ }
2496
+ ],
2497
+ "fileUrlPath": "src/utils/delay.ts",
2498
+ "isReadonly": true,
2499
+ "releaseTag": "Public",
2500
+ "name": "delay",
2501
+ "variableTypeTokenRange": {
2502
+ "startIndex": 1,
2503
+ "endIndex": 4
2504
+ }
2505
+ },
2474
2506
  {
2475
2507
  "kind": "Interface",
2476
2508
  "canonicalReference": "@genesislcap/foundation-utils!DesignSystemModule:interface",
@@ -336,6 +336,19 @@ export declare class DefaultServerRowDTOMapper implements ServerRowDTOMapper {
336
336
  toDTO: (entity: ServerRowEntity) => ServerRowDTO;
337
337
  }
338
338
 
339
+ /**
340
+ * Delay for a given number of milliseconds
341
+ * @param ms - The number of milliseconds to delay
342
+ * @returns A promise that resolves after the given number of milliseconds
343
+ * @public
344
+ * @example
345
+ * ```ts
346
+ * await delay(1000);
347
+ * console.log('1 second later');
348
+ * ```
349
+ */
350
+ export declare const delay: (ms: number) => Promise<void>;
351
+
339
352
  /**
340
353
  * DesignSystemModule.
341
354
  * @public
@@ -0,0 +1,22 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-utils](./foundation-utils.md) &gt; [delay](./foundation-utils.delay.md)
4
+
5
+ ## delay variable
6
+
7
+ Delay for a given number of milliseconds
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ delay: (ms: number) => Promise<void>
13
+ ```
14
+
15
+ ## Example
16
+
17
+
18
+ ```ts
19
+ await delay(1000);
20
+ console.log('1 second later');
21
+ ```
22
+
@@ -91,6 +91,7 @@
91
91
  | [defaultEventMap](./foundation-utils.defaulteventmap.md) | A map that associates specific HTML element tags with their corresponding default event names. |
92
92
  | [defaultJSONSerializerConfig](./foundation-utils.defaultjsonserializerconfig.md) | A Default JSONSerializer Config for serializing and deserializing functions. |
93
93
  | [defaultLoggerOptions](./foundation-utils.defaultloggeroptions.md) | The default logger options. |
94
+ | [delay](./foundation-utils.delay.md) | Delay for a given number of milliseconds |
94
95
  | [encodeToBase64](./foundation-utils.encodetobase64.md) | Encodes the given value to base64. |
95
96
  | [encodeToBase64WithPrefix](./foundation-utils.encodetobase64withprefix.md) | Encodes the given value with a prefix to base64. |
96
97
  | [FORCE\_HTTP](./foundation-utils.force_http.md) | The path to a JSON config file for the HTTP mode. |
@@ -177,6 +177,9 @@ export class DefaultServerRowDTOMapper implements ServerRowDTOMapper {
177
177
  toDTO: (entity: ServerRowEntity) => ServerRowDTO;
178
178
  }
179
179
 
180
+ // @public
181
+ export const delay: (ms: number) => Promise<void>;
182
+
180
183
  // @public
181
184
  export interface DesignSystemModule {
182
185
  // (undocumented)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-utils",
3
3
  "description": "Genesis Foundation Utils",
4
- "version": "14.275.3",
4
+ "version": "14.276.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -27,19 +27,19 @@
27
27
  }
28
28
  },
29
29
  "devDependencies": {
30
- "@genesislcap/foundation-testing": "14.275.3",
31
- "@genesislcap/genx": "14.275.3",
32
- "@genesislcap/rollup-builder": "14.275.3",
33
- "@genesislcap/ts-builder": "14.275.3",
34
- "@genesislcap/uvu-playwright-builder": "14.275.3",
35
- "@genesislcap/vite-builder": "14.275.3",
36
- "@genesislcap/webpack-builder": "14.275.3",
30
+ "@genesislcap/foundation-testing": "14.276.0",
31
+ "@genesislcap/genx": "14.276.0",
32
+ "@genesislcap/rollup-builder": "14.276.0",
33
+ "@genesislcap/ts-builder": "14.276.0",
34
+ "@genesislcap/uvu-playwright-builder": "14.276.0",
35
+ "@genesislcap/vite-builder": "14.276.0",
36
+ "@genesislcap/webpack-builder": "14.276.0",
37
37
  "@types/json-schema": "^7.0.11",
38
38
  "rimraf": "^5.0.0"
39
39
  },
40
40
  "dependencies": {
41
41
  "@genesislcap/expression-builder": "14.258.1",
42
- "@genesislcap/foundation-logger": "14.275.3",
42
+ "@genesislcap/foundation-logger": "14.276.0",
43
43
  "@microsoft/fast-components": "2.30.6",
44
44
  "@microsoft/fast-element": "1.14.0",
45
45
  "@microsoft/fast-foundation": "2.49.6",
@@ -57,5 +57,5 @@
57
57
  "access": "public"
58
58
  },
59
59
  "customElements": "dist/custom-elements.json",
60
- "gitHead": "bf879e49257ab5a47f2307ef75e3170e75a1c49f"
60
+ "gitHead": "5ece673bf91cdbd37bff15d8125d57c027244c68"
61
61
  }