@genesislcap/foundation-utils 14.67.5 → 14.68.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.
@@ -1,11 +1,14 @@
1
1
  /**
2
- * The Genesis Server (host0 to establish a connection (WebSocket or HTTP)).
3
- * Example: wss://localhost:9064
4
- * @remarks Required.
2
+ * The sub-path used for WebSocket connections when API_HOST is not set
5
3
  * @public
4
+ * @defaultValue `'gwf'`
5
+ * @remarks Optional.
6
+ * @example
7
+ * If `API_HOST` is not set, `SOCKET_EXT` is set to `/custom` and UI is served on `https://localhost:1234`
8
+ * API host URL will be `wss://localhost:1234/custom`
6
9
  */
7
- declare let _API_HOST: string;
8
- export { _API_HOST as API_HOST };
10
+ declare let _SOCKET_EXT: string;
11
+ export { _SOCKET_EXT as SOCKET_EXT };
9
12
  /**
10
13
  * The path to a JSON config file for the HTTP mode.
11
14
  * @remarks Optional.
@@ -13,6 +16,8 @@ export { _API_HOST as API_HOST };
13
16
  */
14
17
  declare let _FORCE_HTTP: string;
15
18
  export { _FORCE_HTTP as FORCE_HTTP };
19
+ declare let _API_HOST: string;
20
+ export { _API_HOST as API_HOST };
16
21
  /**
17
22
  * Configuration settings for HTTP, used in http connect flow [`genesislcap-foundation-comms.HttpConnectConfig`](https://link-to-docs).
18
23
  * @remarks Optional.
@@ -41,12 +46,4 @@ export { _DEFAULT_PASSWORD as DEFAULT_PASSWORD };
41
46
  */
42
47
  declare let _DEFAULT_USER: string;
43
48
  export { _DEFAULT_USER as DEFAULT_USER };
44
- /**
45
- * The sub-path used for WebSocket connections.
46
- * Example: API_HOST + '/' + SOCKET_EXT - wss://localhost:9064/gwf.
47
- * @remarks Optional. Default is "API_HOST/gwf"
48
- * @public
49
- */
50
- declare let _SOCKET_EXT: string;
51
- export { _SOCKET_EXT as SOCKET_EXT };
52
49
  //# sourceMappingURL=variables.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../../src/env/variables.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,QAAA,IAAI,SAAS,EAAE,MAAM,CAAC;AAMtB,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,CAAC;AAGjC;;;;GAIG;AACH,QAAA,IAAI,WAAW,EAAE,MAAM,CAAC;AAMxB,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC;AAGrC;;;;GAIG;AACH,QAAA,IAAI,YAAY,EAAE,MAAM,CAAC;AAMzB,OAAO,EAAE,YAAY,IAAI,WAAW,EAAE,CAAC;AAKvC;;;;GAIG;AACH,QAAA,IAAI,qBAAqB,EAAE,MAAM,CAAC;AAMlC,OAAO,EAAE,qBAAqB,IAAI,oBAAoB,EAAE,CAAC;AAGzD;;;;GAIG;AACH,QAAA,IAAI,iBAAiB,EAAE,MAAM,CAAC;AAM9B,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,CAAC;AAGjD;;;;GAIG;AACH,QAAA,IAAI,aAAa,EAAE,MAAM,CAAC;AAM1B,OAAO,EAAE,aAAa,IAAI,YAAY,EAAE,CAAC;AAGzC;;;;;GAKG;AACH,QAAA,IAAI,WAAW,EAAE,MAAM,CAAC;AAMxB,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../../src/env/variables.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,QAAA,IAAI,WAAW,EAAE,MAAc,CAAC;AAMhC,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC;AAGrC;;;;GAIG;AACH,QAAA,IAAI,WAAW,EAAE,MAAM,CAAC;AAMxB,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC;AAYrC,QAAA,IAAI,SAAS,EAAE,MAAwD,CAAC;AAMxE,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,CAAC;AAGjC;;;;GAIG;AACH,QAAA,IAAI,YAAY,EAAE,MAAM,CAAC;AAMzB,OAAO,EAAE,YAAY,IAAI,WAAW,EAAE,CAAC;AAKvC;;;;GAIG;AACH,QAAA,IAAI,qBAAqB,EAAE,MAAM,CAAC;AAMlC,OAAO,EAAE,qBAAqB,IAAI,oBAAoB,EAAE,CAAC;AAGzD;;;;GAIG;AACH,QAAA,IAAI,iBAAiB,EAAE,MAAM,CAAC;AAM9B,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,CAAC;AAGjD;;;;GAIG;AACH,QAAA,IAAI,aAAa,EAAE,MAAM,CAAC;AAM1B,OAAO,EAAE,aAAa,IAAI,YAAY,EAAE,CAAC"}
@@ -1,16 +1,19 @@
1
1
  /* eslint-disable import/no-mutable-exports */
2
2
  /**
3
- * The Genesis Server (host0 to establish a connection (WebSocket or HTTP)).
4
- * Example: wss://localhost:9064
5
- * @remarks Required.
3
+ * The sub-path used for WebSocket connections when API_HOST is not set
6
4
  * @public
5
+ * @defaultValue `'gwf'`
6
+ * @remarks Optional.
7
+ * @example
8
+ * If `API_HOST` is not set, `SOCKET_EXT` is set to `/custom` and UI is served on `https://localhost:1234`
9
+ * API host URL will be `wss://localhost:1234/custom`
7
10
  */
8
- let _API_HOST;
11
+ let _SOCKET_EXT = 'gwf';
9
12
  try {
10
- _API_HOST = API_HOST;
13
+ _SOCKET_EXT = SOCKET_EXT;
11
14
  }
12
15
  catch (_a) { }
13
- export { _API_HOST as API_HOST };
16
+ export { _SOCKET_EXT as SOCKET_EXT };
14
17
  /**
15
18
  * The path to a JSON config file for the HTTP mode.
16
19
  * @remarks Optional.
@@ -22,6 +25,20 @@ try {
22
25
  }
23
26
  catch (_b) { }
24
27
  export { _FORCE_HTTP as FORCE_HTTP };
28
+ /**
29
+ * The Genesis Server URL (WebSocket or HTTP).
30
+ * @remarks Optional.
31
+ * @defaultValue `${PROTOCOL}//${location.host}/${_SOCKET_EXT}/`
32
+ * @example ws://localhost/gwf/, ws://localhost:9064
33
+ * @public
34
+ */
35
+ const PROTOCOL = _FORCE_HTTP === 'true' ? location.protocol : location.protocol.replace('http', 'ws');
36
+ let _API_HOST = `${PROTOCOL}//${location.host}/${_SOCKET_EXT}/`;
37
+ try {
38
+ _API_HOST = API_HOST;
39
+ }
40
+ catch (_c) { }
41
+ export { _API_HOST as API_HOST };
25
42
  /**
26
43
  * Configuration settings for HTTP, used in http connect flow [`genesislcap-foundation-comms.HttpConnectConfig`](https://link-to-docs).
27
44
  * @remarks Optional.
@@ -31,7 +48,7 @@ let _HTTP_CONFIG;
31
48
  try {
32
49
  _HTTP_CONFIG = HTTP_CONFIG;
33
50
  }
34
- catch (_c) { }
51
+ catch (_d) { }
35
52
  export { _HTTP_CONFIG as HTTP_CONFIG };
36
53
  /**
37
54
  * The default Organisation value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).
@@ -42,7 +59,7 @@ let _DEFAULT_ORGANISATION;
42
59
  try {
43
60
  _DEFAULT_ORGANISATION = DEFAULT_ORGANISATION;
44
61
  }
45
- catch (_d) { }
62
+ catch (_e) { }
46
63
  export { _DEFAULT_ORGANISATION as DEFAULT_ORGANISATION };
47
64
  /**
48
65
  * The default Password value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).
@@ -53,7 +70,7 @@ let _DEFAULT_PASSWORD;
53
70
  try {
54
71
  _DEFAULT_PASSWORD = DEFAULT_PASSWORD;
55
72
  }
56
- catch (_e) { }
73
+ catch (_f) { }
57
74
  export { _DEFAULT_PASSWORD as DEFAULT_PASSWORD };
58
75
  /**
59
76
  * The default Username value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).
@@ -64,17 +81,5 @@ let _DEFAULT_USER;
64
81
  try {
65
82
  _DEFAULT_USER = DEFAULT_USER;
66
83
  }
67
- catch (_f) { }
68
- export { _DEFAULT_USER as DEFAULT_USER };
69
- /**
70
- * The sub-path used for WebSocket connections.
71
- * Example: API_HOST + '/' + SOCKET_EXT - wss://localhost:9064/gwf.
72
- * @remarks Optional. Default is "API_HOST/gwf"
73
- * @public
74
- */
75
- let _SOCKET_EXT;
76
- try {
77
- _SOCKET_EXT = SOCKET_EXT;
78
- }
79
84
  catch (_g) { }
80
- export { _SOCKET_EXT as SOCKET_EXT };
85
+ export { _DEFAULT_USER as DEFAULT_USER };
@@ -207,7 +207,7 @@
207
207
  {
208
208
  "kind": "Variable",
209
209
  "canonicalReference": "@genesislcap/foundation-utils!API_HOST:var",
210
- "docComment": "/**\n * The Genesis Server (host0 to establish a connection (WebSocket or HTTP)). Example: wss://localhost:9064\n *\n * @remarks\n *\n * Required.\n *\n * @public\n */\n",
210
+ "docComment": "",
211
211
  "excerptTokens": [
212
212
  {
213
213
  "kind": "Content",
@@ -11443,7 +11443,7 @@
11443
11443
  {
11444
11444
  "kind": "Variable",
11445
11445
  "canonicalReference": "@genesislcap/foundation-utils!SOCKET_EXT:var",
11446
- "docComment": "/**\n * The sub-path used for WebSocket connections. Example: API_HOST + '/' + SOCKET_EXT - wss://localhost:9064/gwf.\n *\n * @remarks\n *\n * Optional. Default is \"API_HOST/gwf\"\n *\n * @public\n */\n",
11446
+ "docComment": "/**\n * The sub-path used for WebSocket connections when API_HOST is not set\n *\n * @remarks\n *\n * Optional.\n *\n * @defaultValue\n *\n * `'gwf'`\n *\n * @example\n *\n * If `API_HOST` is not set, `SOCKET_EXT` is set to `/custom` and UI is served on `https://localhost:1234` API host URL will be `wss://localhost:1234/custom`\n *\n * @public\n */\n",
11447
11447
  "excerptTokens": [
11448
11448
  {
11449
11449
  "kind": "Content",
@@ -18,12 +18,6 @@ import { SyntheticViewTemplate } from '@microsoft/fast-element';
18
18
  */
19
19
  export declare const activeColorScheme: CSSDesignToken<string>;
20
20
 
21
- /**
22
- * The Genesis Server (host0 to establish a connection (WebSocket or HTTP)).
23
- * Example: wss://localhost:9064
24
- * @remarks Required.
25
- * @public
26
- */
27
21
  export declare let API_HOST: string;
28
22
 
29
23
  /**
@@ -1513,10 +1507,13 @@ export declare class SlottedStyles extends FASTElement {
1513
1507
  }
1514
1508
 
1515
1509
  /**
1516
- * The sub-path used for WebSocket connections.
1517
- * Example: API_HOST + '/' + SOCKET_EXT - wss://localhost:9064/gwf.
1518
- * @remarks Optional. Default is "API_HOST/gwf"
1510
+ * The sub-path used for WebSocket connections when API_HOST is not set
1519
1511
  * @public
1512
+ * @defaultValue `'gwf'`
1513
+ * @remarks Optional.
1514
+ * @example
1515
+ * If `API_HOST` is not set, `SOCKET_EXT` is set to `/custom` and UI is served on `https://localhost:1234`
1516
+ * API host URL will be `wss://localhost:1234/custom`
1520
1517
  */
1521
1518
  export declare let SOCKET_EXT: string;
1522
1519
 
@@ -4,15 +4,8 @@
4
4
 
5
5
  ## API\_HOST variable
6
6
 
7
- The Genesis Server (host0 to establish a connection (WebSocket or HTTP)). Example: wss://localhost:9064
8
-
9
7
  **Signature:**
10
8
 
11
9
  ```typescript
12
10
  _API_HOST: string
13
11
  ```
14
-
15
- ## Remarks
16
-
17
- Required.
18
-
@@ -66,7 +66,7 @@
66
66
  | Variable | Description |
67
67
  | --- | --- |
68
68
  | [activeColorScheme](./foundation-utils.activecolorscheme.md) | A design token that represents the active color scheme (light or dark). |
69
- | [API\_HOST](./foundation-utils.api_host.md) | The Genesis Server (host0 to establish a connection (WebSocket or HTTP)). Example: wss://localhost:9064 |
69
+ | [API\_HOST](./foundation-utils.api_host.md) | |
70
70
  | [createErrorMap](./foundation-utils.createerrormap.md) | A factory to create the error map. |
71
71
  | [createObserver](./foundation-utils.createobserver.md) | Creates a new event observer instance. |
72
72
  | [DEFAULT\_ORGANISATION](./foundation-utils.default_organisation.md) | The default Organisation value, used in auth/login flow \[<code>genesislcap-foundation-login</code>\](https://link-to-docs). |
@@ -93,7 +93,7 @@
93
93
  | [ResourceType](./foundation-utils.resourcetype.md) | An object that defines two resource types: "local" and "remote". |
94
94
  | [respondToVisibility](./foundation-utils.respondtovisibility.md) | Setup an <code>IntersectionObserver</code> which will activate a callback function when an element becomes visible on screen |
95
95
  | [ServerRowDTOMapper](./foundation-utils.serverrowdtomapper.md) | A DI token used to obtain a <code>ServerRowDTOMapper</code> instance. |
96
- | [SOCKET\_EXT](./foundation-utils.socket_ext.md) | The sub-path used for WebSocket connections. Example: API\_HOST + '/' + SOCKET\_EXT - wss://localhost:9064/gwf. |
96
+ | [SOCKET\_EXT](./foundation-utils.socket_ext.md) | The sub-path used for WebSocket connections when API\_HOST is not set |
97
97
  | [TypeRampValues](./foundation-utils.typerampvalues.md) | An object containing type ramp values. |
98
98
  | [UUID](./foundation-utils.uuid.md) | A dependency injection token for the UUID interface. |
99
99
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## SOCKET\_EXT variable
6
6
 
7
- The sub-path used for WebSocket connections. Example: API\_HOST + '/' + SOCKET\_EXT - wss://localhost:9064/gwf.
7
+ The sub-path used for WebSocket connections when API\_HOST is not set
8
8
 
9
9
  **Signature:**
10
10
 
@@ -14,5 +14,9 @@ _SOCKET_EXT: string
14
14
 
15
15
  ## Remarks
16
16
 
17
- Optional. Default is "API\_HOST/gwf"
17
+ Optional.
18
+
19
+ ## Example
20
+
21
+ If `API_HOST` is not set, `SOCKET_EXT` is set to `/custom` and UI is served on `https://localhost:1234` API host URL will be `wss://localhost:1234/custom`
18
22
 
@@ -21,7 +21,7 @@ import { SyntheticViewTemplate } from '@microsoft/fast-element';
21
21
  // @public
22
22
  export const activeColorScheme: CSSDesignToken<string>;
23
23
 
24
- // @public
24
+ // @public (undocumented)
25
25
  export let API_HOST: string;
26
26
 
27
27
  // @public (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.67.5",
4
+ "version": "14.68.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -39,5 +39,5 @@
39
39
  "access": "public"
40
40
  },
41
41
  "customElements": "dist/custom-elements.json",
42
- "gitHead": "e6b35381e1991f74ecfb1e3ed59043a59985ffcf"
42
+ "gitHead": "7d9d99e30e5f1b77e1ece7d72f9657d6a801795d"
43
43
  }