@genesislcap/foundation-utils 14.22.1 → 14.23.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.
Files changed (178) hide show
  1. package/dist/custom-elements.json +286 -169
  2. package/dist/dts/data/inMemoryDatabase.d.ts +17 -0
  3. package/dist/dts/data/inMemoryDatabase.d.ts.map +1 -1
  4. package/dist/dts/directives/sync/sync.d.ts +16 -0
  5. package/dist/dts/directives/sync/sync.d.ts.map +1 -1
  6. package/dist/dts/directives/when-else/when-else.d.ts +1 -1
  7. package/dist/dts/env/is-dev.d.ts +4 -0
  8. package/dist/dts/env/is-dev.d.ts.map +1 -1
  9. package/dist/dts/env/variables.d.ts +37 -0
  10. package/dist/dts/env/variables.d.ts.map +1 -1
  11. package/dist/dts/formatters/datetime.d.ts +2 -2
  12. package/dist/dts/logger/logger.d.ts +29 -3
  13. package/dist/dts/logger/logger.d.ts.map +1 -1
  14. package/dist/dts/mappers/dto/serverRow.d.ts +46 -14
  15. package/dist/dts/mappers/dto/serverRow.d.ts.map +1 -1
  16. package/dist/dts/mappers/dto/types.d.ts +3 -0
  17. package/dist/dts/mappers/dto/types.d.ts.map +1 -1
  18. package/dist/dts/mixins/lifecycle/lifecycle.d.ts +11 -5
  19. package/dist/dts/mixins/lifecycle/lifecycle.d.ts.map +1 -1
  20. package/dist/dts/mixins/pendingState/pendingState.d.ts +55 -9
  21. package/dist/dts/mixins/pendingState/pendingState.d.ts.map +1 -1
  22. package/dist/dts/observer/observer.d.ts +19 -4
  23. package/dist/dts/observer/observer.d.ts.map +1 -1
  24. package/dist/dts/resource/types.d.ts +2 -0
  25. package/dist/dts/resource/types.d.ts.map +1 -1
  26. package/dist/dts/serializers/json/json.d.ts +28 -0
  27. package/dist/dts/serializers/json/json.d.ts.map +1 -1
  28. package/dist/dts/styles/color.d.ts +4 -0
  29. package/dist/dts/styles/color.d.ts.map +1 -1
  30. package/dist/dts/styles/dom.d.ts +13 -0
  31. package/dist/dts/styles/dom.d.ts.map +1 -1
  32. package/dist/dts/styles/slotted-styles.d.ts +13 -0
  33. package/dist/dts/styles/slotted-styles.d.ts.map +1 -1
  34. package/dist/dts/styles/typography.d.ts +27 -1
  35. package/dist/dts/styles/typography.d.ts.map +1 -1
  36. package/dist/dts/tsdoc-metadata.json +11 -0
  37. package/dist/dts/uuid/uuid.d.ts +22 -3
  38. package/dist/dts/uuid/uuid.d.ts.map +1 -1
  39. package/dist/dts/window/window.d.ts +27 -0
  40. package/dist/dts/window/window.d.ts.map +1 -1
  41. package/dist/esm/data/inMemoryDatabase.js +1 -0
  42. package/dist/esm/directives/sync/sync.js +8 -0
  43. package/dist/esm/directives/when-else/when-else.js +1 -1
  44. package/dist/esm/env/is-dev.js +4 -0
  45. package/dist/esm/env/variables.js +37 -0
  46. package/dist/esm/formatters/datetime.js +2 -2
  47. package/dist/esm/logger/logger.js +11 -0
  48. package/dist/esm/mappers/dto/serverRow.js +20 -0
  49. package/dist/esm/mixins/pendingState/pendingState.js +37 -1
  50. package/dist/esm/observer/observer.js +5 -1
  51. package/dist/esm/resource/types.js +1 -0
  52. package/dist/esm/serializers/json/json.js +14 -0
  53. package/dist/esm/styles/color.js +11 -1
  54. package/dist/esm/styles/dom.js +13 -0
  55. package/dist/esm/styles/slotted-styles.js +13 -0
  56. package/dist/esm/styles/typography.js +26 -0
  57. package/dist/esm/uuid/uuid.js +20 -11
  58. package/dist/esm/window/window.js +27 -0
  59. package/dist/foundation-utils.api.json +10996 -0
  60. package/dist/foundation-utils.d.ts +1462 -0
  61. package/docs/api/foundation-utils.activecolorscheme.md +13 -0
  62. package/docs/api/foundation-utils.api_host.md +18 -0
  63. package/docs/api/foundation-utils.assuredesignsystem.md +23 -0
  64. package/docs/api/foundation-utils.constructablelifecyclehandler.md +12 -0
  65. package/docs/api/foundation-utils.constructablependingstate.md +13 -0
  66. package/docs/api/foundation-utils.conversiontype.md +13 -0
  67. package/docs/api/foundation-utils.createlogger.md +27 -0
  68. package/docs/api/foundation-utils.createobserver.md +13 -0
  69. package/docs/api/foundation-utils.database.create.md +22 -0
  70. package/docs/api/foundation-utils.database.delete.md +22 -0
  71. package/docs/api/foundation-utils.database.isworking.md +11 -0
  72. package/docs/api/foundation-utils.database.md +32 -0
  73. package/docs/api/foundation-utils.database.onafterupdate.md +22 -0
  74. package/docs/api/foundation-utils.database.onbeforeupdate.md +22 -0
  75. package/docs/api/foundation-utils.database.read.md +22 -0
  76. package/docs/api/foundation-utils.database.update.md +23 -0
  77. package/docs/api/foundation-utils.database.visit.md +22 -0
  78. package/docs/api/foundation-utils.databaseaccessresult.access.md +18 -0
  79. package/docs/api/foundation-utils.databaseaccessresult.access.value.md +11 -0
  80. package/docs/api/foundation-utils.databaseaccessresult.create.md +13 -0
  81. package/docs/api/foundation-utils.databaseaccessresult.delete.id.md +11 -0
  82. package/docs/api/foundation-utils.databaseaccessresult.delete.md +19 -0
  83. package/docs/api/foundation-utils.databaseaccessresult.delete.success.md +11 -0
  84. package/docs/api/foundation-utils.databaseaccessresult.md +24 -0
  85. package/docs/api/foundation-utils.databaseaccessresult.read.md +13 -0
  86. package/docs/api/foundation-utils.databaseaccessresult.update.md +13 -0
  87. package/docs/api/foundation-utils.databaseevent.afterupdate.md +13 -0
  88. package/docs/api/foundation-utils.databaseevent.beforeupdate.md +19 -0
  89. package/docs/api/foundation-utils.databaseevent.beforeupdate.newvalue.md +11 -0
  90. package/docs/api/foundation-utils.databaseevent.md +22 -0
  91. package/docs/api/foundation-utils.databaseevent.update.md +18 -0
  92. package/docs/api/foundation-utils.databaseevent.update.value.md +11 -0
  93. package/docs/api/foundation-utils.databaserecord.id.md +11 -0
  94. package/docs/api/foundation-utils.databaserecord.md +20 -0
  95. package/docs/api/foundation-utils.default_organisation.md +18 -0
  96. package/docs/api/foundation-utils.default_password.md +18 -0
  97. package/docs/api/foundation-utils.default_user.md +18 -0
  98. package/docs/api/foundation-utils.defaulteventmap.md +13 -0
  99. package/docs/api/foundation-utils.defaultloggeroptions.md +13 -0
  100. package/docs/api/foundation-utils.defaultserverrowdtomapper.fromdto.md +13 -0
  101. package/docs/api/foundation-utils.defaultserverrowdtomapper.md +22 -0
  102. package/docs/api/foundation-utils.defaultserverrowdtomapper.todto.md +13 -0
  103. package/docs/api/foundation-utils.designsystemmodule.md +19 -0
  104. package/docs/api/foundation-utils.designsystemmodule.providedesignsystem.md +23 -0
  105. package/docs/api/foundation-utils.designsystemresource.md +14 -0
  106. package/docs/api/foundation-utils.dtomapper.fromargs.md +11 -0
  107. package/docs/api/foundation-utils.dtomapper.fromdto.md +11 -0
  108. package/docs/api/foundation-utils.dtomapper.md +21 -0
  109. package/docs/api/foundation-utils.dtomapper.todto.md +11 -0
  110. package/docs/api/foundation-utils.eventname.md +13 -0
  111. package/docs/api/foundation-utils.fontstyle.md +21 -0
  112. package/docs/api/foundation-utils.fontweight.md +25 -0
  113. package/docs/api/foundation-utils.force_http.md +18 -0
  114. package/docs/api/foundation-utils.formatdatetimestamp.md +24 -0
  115. package/docs/api/foundation-utils.formatdatetimetimestamp.md +24 -0
  116. package/docs/api/foundation-utils.formattimestamp.md +25 -0
  117. package/docs/api/foundation-utils.getfontmixin.md +13 -0
  118. package/docs/api/foundation-utils.http_config.md +18 -0
  119. package/docs/api/foundation-utils.iniframe.md +13 -0
  120. package/docs/api/foundation-utils.inmemorydatabase._constructor_.md +20 -0
  121. package/docs/api/foundation-utils.inmemorydatabase.create.md +22 -0
  122. package/docs/api/foundation-utils.inmemorydatabase.delete.md +22 -0
  123. package/docs/api/foundation-utils.inmemorydatabase.isworking.md +11 -0
  124. package/docs/api/foundation-utils.inmemorydatabase.md +39 -0
  125. package/docs/api/foundation-utils.inmemorydatabase.onafterupdate.md +22 -0
  126. package/docs/api/foundation-utils.inmemorydatabase.onbeforeupdate.md +22 -0
  127. package/docs/api/foundation-utils.inmemorydatabase.read.md +22 -0
  128. package/docs/api/foundation-utils.inmemorydatabase.update.md +23 -0
  129. package/docs/api/foundation-utils.inmemorydatabase.visit.md +22 -0
  130. package/docs/api/foundation-utils.insertdocumentcssrule.md +13 -0
  131. package/docs/api/foundation-utils.insertdocumentlink.md +13 -0
  132. package/docs/api/foundation-utils.insymphonydesktop.md +13 -0
  133. package/docs/api/foundation-utils.isdev.md +13 -0
  134. package/docs/api/foundation-utils.jsonserializer.deserialize.md +26 -0
  135. package/docs/api/foundation-utils.jsonserializer.deserialize_1.md +26 -0
  136. package/docs/api/foundation-utils.jsonserializer.deserialize_2.md +26 -0
  137. package/docs/api/foundation-utils.jsonserializer.md +13 -0
  138. package/docs/api/foundation-utils.jsonserializer.serialize.md +26 -0
  139. package/docs/api/foundation-utils.layoutcachedocument.md +13 -0
  140. package/docs/api/foundation-utils.lifecyclemixin.md +342 -0
  141. package/docs/api/foundation-utils.listener.md +13 -0
  142. package/docs/api/foundation-utils.loadfontfaces.md +13 -0
  143. package/docs/api/foundation-utils.logger.deprecated.md +45 -0
  144. package/docs/api/foundation-utils.logger.md +25 -0
  145. package/docs/api/foundation-utils.loggeroptions.md +15 -0
  146. package/docs/api/foundation-utils.md +111 -0
  147. package/docs/api/foundation-utils.observer.md +21 -0
  148. package/docs/api/foundation-utils.observer.publish.md +11 -0
  149. package/docs/api/foundation-utils.observer.subscribe.md +11 -0
  150. package/docs/api/foundation-utils.openpopup.md +13 -0
  151. package/docs/api/foundation-utils.pendingstate.md +334 -0
  152. package/docs/api/foundation-utils.pendingstateerrorevent.md +13 -0
  153. package/docs/api/foundation-utils.pendingstateevent.md +13 -0
  154. package/docs/api/foundation-utils.pendingstateevents.md +21 -0
  155. package/docs/api/foundation-utils.popup_default_height.md +13 -0
  156. package/docs/api/foundation-utils.popup_default_width.md +13 -0
  157. package/docs/api/foundation-utils.publish.md +13 -0
  158. package/docs/api/foundation-utils.renderonchange.md +51 -0
  159. package/docs/api/foundation-utils.resourcetype.md +16 -0
  160. package/docs/api/foundation-utils.respondtovisibility.md +13 -0
  161. package/docs/api/foundation-utils.serverrowdto.md +18 -0
  162. package/docs/api/foundation-utils.serverrowdtomapper.md +13 -0
  163. package/docs/api/foundation-utils.serverrowentity.md +18 -0
  164. package/docs/api/foundation-utils.slottedstyles.md +27 -0
  165. package/docs/api/foundation-utils.slottedstyles.styles.md +13 -0
  166. package/docs/api/foundation-utils.slottedstyles.styleschanged.md +25 -0
  167. package/docs/api/foundation-utils.socket_ext.md +18 -0
  168. package/docs/api/foundation-utils.subscribe.md +15 -0
  169. package/docs/api/foundation-utils.sync.md +27 -0
  170. package/docs/api/foundation-utils.typerampvalues.md +22 -0
  171. package/docs/api/foundation-utils.uuid.createid.md +26 -0
  172. package/docs/api/foundation-utils.uuid.createremoteid.md +26 -0
  173. package/docs/api/foundation-utils.uuid.md +13 -0
  174. package/docs/api/foundation-utils.uuidconfig.md +13 -0
  175. package/docs/api/foundation-utils.whenelse.md +26 -0
  176. package/docs/api/index.md +12 -0
  177. package/docs/api-report.md +1075 -0
  178. package/package.json +6 -9
@@ -1,6 +1,19 @@
1
1
  import { ElementStyles, FASTElement } from '@microsoft/fast-element';
2
+ /**
3
+ * A custom element that encapsulates a set of styles that can be applied to slotted elements.
4
+ * @public
5
+ */
2
6
  export declare class SlottedStyles extends FASTElement {
7
+ /**
8
+ * The styles to apply to slotted elements.
9
+ */
3
10
  styles: ElementStyles;
11
+ /**
12
+ * Called when the `styles` property changes.
13
+ * Removes the previous styles from the parent element's FAST controller and adds the new styles.
14
+ * @param prev - The previous value of the `styles` property.
15
+ * @param next - The new value of the `styles` property.
16
+ */
4
17
  stylesChanged(prev: ElementStyles, next: ElementStyles): void;
5
18
  }
6
19
  //# sourceMappingURL=slotted-styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slotted-styles.d.ts","sourceRoot":"","sources":["../../../src/styles/slotted-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAE,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAEhG,qBAGa,aAAc,SAAQ,WAAW;IAChC,MAAM,EAAE,aAAa,CAAC;IAElC,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI;CAO9D"}
1
+ {"version":3,"file":"slotted-styles.d.ts","sourceRoot":"","sources":["../../../src/styles/slotted-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAE,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAEhG;;;GAGG;AACH,qBAMa,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACS,MAAM,EAAE,aAAa,CAAC;IAElC;;;;;OAKG;IACH,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI;CAO9D"}
@@ -1,8 +1,22 @@
1
- export declare const loadFontFaces: (fontFaceRules: any, styleElementId: any) => void;
1
+ /**
2
+ * Loads font faces by inserting a style element with the specified font face rules into the document.
3
+ * @param fontFaceRules - The CSS rules for the font faces.
4
+ * @param styleElementId - The ID of the style element to insert into the document.
5
+ * @public
6
+ */
7
+ export declare const loadFontFaces: (fontFaceRules: string, styleElementId: string) => void;
8
+ /**
9
+ * An enum of possible font styles.
10
+ * @public
11
+ */
2
12
  export declare enum FontStyle {
3
13
  Italic = "italic",
4
14
  Normal = "normal"
5
15
  }
16
+ /**
17
+ * An enum of possible font weights.
18
+ * @public
19
+ */
6
20
  export declare enum FontWeight {
7
21
  Thin = 100,
8
22
  Light = 300,
@@ -11,7 +25,19 @@ export declare enum FontWeight {
11
25
  Bold = 700,
12
26
  Black = 900
13
27
  }
28
+ /**
29
+ * Generates a CSS mixin for the specified font family, style, and weight.
30
+ * @param family - The font family.
31
+ * @param style - Optional. The font style. Defaults to FontStyle.Normal.
32
+ * @param weight - Optional. The font weight. Defaults to FontWeight.Regular.
33
+ * @returns The generated CSS mixin.
34
+ * @public
35
+ */
14
36
  export declare const getFontMixin: (family: string, style?: FontStyle, weight?: FontWeight) => string;
37
+ /**
38
+ * An object containing type ramp values.
39
+ * @public
40
+ */
15
41
  export declare const TypeRampValues: {
16
42
  readonly minusOne: -1;
17
43
  readonly minusTwo: -2;
@@ -1 +1 @@
1
- {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../src/styles/typography.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,mDAEzB,CAAC;AAEF,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,UAAU;IACpB,IAAI,MAAM;IACV,KAAK,MAAM;IACX,OAAO,MAAM;IACb,MAAM,MAAM;IACZ,IAAI,MAAM;IACV,KAAK,MAAM;CACZ;AAED,eAAO,MAAM,YAAY,WACf,MAAM,UACP,SAAS,WACR,UAAU,WAKnB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;CASjB,CAAC"}
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../src/styles/typography.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,aAAa,kBAAmB,MAAM,kBAAkB,MAAM,KAAG,IAE7E,CAAC;AAEF;;;GAGG;AACH,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED;;;GAGG;AACH,oBAAY,UAAU;IACpB,IAAI,MAAM;IACV,KAAK,MAAM;IACX,OAAO,MAAM;IACb,MAAM,MAAM;IACZ,IAAI,MAAM;IACV,KAAK,MAAM;CACZ;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,WACf,MAAM,UACP,SAAS,WACR,UAAU,KACjB,MAIF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;CASjB,CAAC"}
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.34.4"
9
+ }
10
+ ]
11
+ }
@@ -1,11 +1,30 @@
1
1
  /**
2
- * Allow apps to tailor UUID generation, see constructor note.
2
+ * A configuration object for customizing UUID generation.
3
+ * @public
3
4
  */
4
5
  export interface UUIDConfig {
5
6
  }
7
+ /**
8
+ * An interface for generating UUIDs.
9
+ * @public
10
+ */
6
11
  export interface UUID {
7
- createId(): string;
8
- createRemoteId(): Promise<string>;
12
+ /**
13
+ * Generates a new UUID.
14
+ * @param withLogging - Optional. Whether to log the generated UUID to the console. Defaults to false.
15
+ * @returns The generated UUID.
16
+ */
17
+ createId(withLogging?: boolean): string;
18
+ /**
19
+ * Generates a new UUID for a remote object.
20
+ * @param withLogging - Optional. Whether to log the generated UUID to the console. Defaults to false.
21
+ * @returns A promise that resolves to the generated UUID.
22
+ */
23
+ createRemoteId(withLogging?: boolean): Promise<string>;
9
24
  }
25
+ /**
26
+ * A dependency injection token for the UUID interface.
27
+ * @public
28
+ */
10
29
  export declare const UUID: import("@microsoft/fast-foundation").InterfaceSymbol<UUID>;
11
30
  //# sourceMappingURL=uuid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../../src/uuid/uuid.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,UAAU;CAE1B;AAED,MAAM,WAAW,IAAI;IACnB,QAAQ,IAAI,MAAM,CAAC;IACnB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACnC;AAoCD,eAAO,MAAM,IAAI,4DAA4D,CAAC"}
1
+ {"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../../src/uuid/uuid.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,WAAW,UAAU;CAE1B;AAED;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAExC;;;;OAIG;IACH,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACxD;AAyCD;;;GAGG;AACH,eAAO,MAAM,IAAI,4DAA4D,CAAC"}
@@ -1,6 +1,33 @@
1
+ /**
2
+ * Returns a boolean value indicating whether the current window is inside an iframe.
3
+ * @returns true if the window is inside an iframe, false otherwise.
4
+ * @public
5
+ */
1
6
  export declare const inIFrame: () => boolean;
7
+ /**
8
+ * Returns a boolean value indicating whether the user is running the Symphony desktop app.
9
+ * @returns true if the user is running the Symphony desktop app, false otherwise.
10
+ * @public
11
+ */
2
12
  export declare const inSymphonyDesktop: () => boolean;
13
+ /**
14
+ * The default width (in pixels) for pop-up windows.
15
+ * @public
16
+ */
3
17
  export declare const POPUP_DEFAULT_WIDTH = 483;
18
+ /**
19
+ * The default height (in pixels) for pop-up windows.
20
+ * @public
21
+ */
4
22
  export declare const POPUP_DEFAULT_HEIGHT = 600;
23
+ /**
24
+ * Opens a new browser window with the specified URL, target, width, and height.
25
+ * @param urlNavigate - The URL to navigate to.
26
+ * @param target - The name of the new window.
27
+ * @param popUpWidth - The width of the new window (optional).
28
+ * @param popUpHeight - The height of the new window (optional).
29
+ * @returns A reference to the new window.
30
+ * @public
31
+ */
5
32
  export declare const openPopup: (urlNavigate: string, target: string, popUpWidth?: number, popUpHeight?: number) => Window;
6
33
  //# sourceMappingURL=window.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/window/window.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,eAMpB,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAG7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,eAAO,MAAM,SAAS,gBACP,MAAM,UACX,MAAM,eACF,MAAM,gBACL,MAAM,WAuBpB,CAAC"}
1
+ {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/window/window.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,QAAQ,QAAO,OAM3B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAO,OAGpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,gBACP,MAAM,UACX,MAAM,eACF,MAAM,gBACL,MAAM,KAClB,MAsBF,CAAC"}
@@ -3,6 +3,7 @@ import { createObserver } from '../observer';
3
3
  import { logger } from '../utils';
4
4
  /**
5
5
  * An in memory database of specific DatabaseRecord types.
6
+ * @public
6
7
  */
7
8
  export class InMemoryDatabase {
8
9
  constructor(uuid) {
@@ -1,4 +1,8 @@
1
1
  import { HTMLBindingDirective, } from '@microsoft/fast-element';
2
+ /**
3
+ * A map that associates specific HTML element tags with their corresponding default event names.
4
+ * @public
5
+ */
2
6
  export const defaultEventMap = new Map([
3
7
  ['FAST-TEXT-AREA', 'input'],
4
8
  ['FAST-TEXT-FIELD', 'input'],
@@ -84,6 +88,10 @@ class SyncDirective extends HTMLBindingDirective {
84
88
  }
85
89
  }
86
90
  }
91
+ /**
92
+ * Creates a synchronization directive that binds a data source to an HTML element,
93
+ * @public
94
+ */
87
95
  export function sync(binding, conversionType = 'string', eventName = 'default', keyAttr) {
88
96
  return new SyncDirective(binding, conversionType, eventName, keyAttr);
89
97
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Directive that allows supplying an "else" template to the traditional {@link @link @microsoft/fast-element#when} directive
2
+ * Directive that allows supplying an "else" template to the traditional {@link https://www.fast.design/docs/api/fast-element.when/#when-function} directive
3
3
  *
4
4
  * @param binding - The condition to test for rendering.
5
5
  * @param trueTemplateOrTemplateBinding - The template or a binding that gets the template to render when the condition is true.
@@ -1 +1,5 @@
1
+ /**
2
+ * Determines if the current environment is a development environment.
3
+ * @public
4
+ */
1
5
  export const isDev = () => !process.env.NODE_ENV || process.env.NODE_ENV === 'development';
@@ -1,40 +1,77 @@
1
1
  /* eslint-disable import/no-mutable-exports */
2
+ /**
3
+ * The Genesis Server (host0 to establish a connection (WebSocket or HTTP)).
4
+ * Example: wss://localhost:9064
5
+ * @remarks Required.
6
+ * @public
7
+ */
2
8
  let _API_HOST;
3
9
  try {
4
10
  _API_HOST = API_HOST;
5
11
  }
6
12
  catch (_a) { }
7
13
  export { _API_HOST as API_HOST };
14
+ /**
15
+ * The path to a JSON config file for the HTTP mode.
16
+ * @remarks Optional.
17
+ * @public
18
+ */
8
19
  let _FORCE_HTTP;
9
20
  try {
10
21
  _FORCE_HTTP = FORCE_HTTP;
11
22
  }
12
23
  catch (_b) { }
13
24
  export { _FORCE_HTTP as FORCE_HTTP };
25
+ /**
26
+ * Configuration settings for HTTP, used in http connect flow [`genesislcap-foundation-comms.HttpConnectConfig`](https://link-to-docs).
27
+ * @remarks Optional.
28
+ * @public
29
+ */
14
30
  let _HTTP_CONFIG;
15
31
  try {
16
32
  _HTTP_CONFIG = HTTP_CONFIG;
17
33
  }
18
34
  catch (_c) { }
19
35
  export { _HTTP_CONFIG as HTTP_CONFIG };
36
+ /**
37
+ * The default Organisation value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).
38
+ * @remarks Optional.
39
+ * @public
40
+ */
20
41
  let _DEFAULT_ORGANISATION;
21
42
  try {
22
43
  _DEFAULT_ORGANISATION = DEFAULT_ORGANISATION;
23
44
  }
24
45
  catch (_d) { }
25
46
  export { _DEFAULT_ORGANISATION as DEFAULT_ORGANISATION };
47
+ /**
48
+ * The default Password value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).
49
+ * @remarks Optional.
50
+ * @public
51
+ */
26
52
  let _DEFAULT_PASSWORD;
27
53
  try {
28
54
  _DEFAULT_PASSWORD = DEFAULT_PASSWORD;
29
55
  }
30
56
  catch (_e) { }
31
57
  export { _DEFAULT_PASSWORD as DEFAULT_PASSWORD };
58
+ /**
59
+ * The default Username value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).
60
+ * @remarks Optional.
61
+ * @public
62
+ */
32
63
  let _DEFAULT_USER;
33
64
  try {
34
65
  _DEFAULT_USER = DEFAULT_USER;
35
66
  }
36
67
  catch (_f) { }
37
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
+ */
38
75
  let _SOCKET_EXT;
39
76
  try {
40
77
  _SOCKET_EXT = SOCKET_EXT;
@@ -21,8 +21,8 @@ export function formatDateTimeTimestamp(timestamp) {
21
21
  /**
22
22
  * Formats [DATE|DATETIME] Unix Timestamps to readable strings
23
23
  * @public
24
- * @param {number} timestamp - The UNIX Timestamp.
25
- * @param {boolean} withTime - The flag to determine if formatted value should contain 'time' info.
24
+ * @param timestamp - The UNIX Timestamp.
25
+ * @param withTime - The flag to determine if formatted value should contain 'time' info.
26
26
  */
27
27
  export function formatTimestamp(timestamp, withTime) {
28
28
  if (withTime) {
@@ -1,9 +1,20 @@
1
1
  import consola from 'consola/src/browser';
2
2
  export { LogLevel } from 'consola';
3
3
  const logLevelDebug = 4;
4
+ /**
5
+ * The default logger options.
6
+ * @public
7
+ */
4
8
  export const defaultLoggerOptions = {
5
9
  level: logLevelDebug,
6
10
  };
11
+ /**
12
+ * Creates a logger with the given name and options.
13
+ * @param name - The name to give the logger.
14
+ * @param options - The options to use when creating the logger.
15
+ * @returns The resulting logger.
16
+ * @public
17
+ */
7
18
  export function createLogger(name, options = defaultLoggerOptions) {
8
19
  const baseLogger = consola.create(options);
9
20
  const logger = baseLogger.withTag(name);
@@ -1,6 +1,16 @@
1
1
  import { DI } from '@microsoft/fast-foundation';
2
+ /**
3
+ * The default `ServerRowDTOMapper`.
4
+ * @public
5
+ */
2
6
  export class DefaultServerRowDTOMapper {
3
7
  constructor() {
8
+ /**
9
+ * Converts a server row DTO to an entity.
10
+ * @param dto - The DTO to convert.
11
+ * @returns The resulting entity.
12
+ * @public
13
+ */
4
14
  this.fromDTO = (dto) => {
5
15
  var _a, _b, _c;
6
16
  return ({
@@ -10,6 +20,12 @@ export class DefaultServerRowDTOMapper {
10
20
  },
11
21
  });
12
22
  };
23
+ /**
24
+ * Converts a server row entity to a DTO.
25
+ * @param entity - The entity to convert.
26
+ * @returns The resulting DTO.
27
+ * @public
28
+ */
13
29
  this.toDTO = (entity) => {
14
30
  var _a, _b, _c;
15
31
  return ({
@@ -21,4 +37,8 @@ export class DefaultServerRowDTOMapper {
21
37
  };
22
38
  }
23
39
  }
40
+ /**
41
+ * A DI token used to obtain a `ServerRowDTOMapper` instance.
42
+ * @public
43
+ */
24
44
  export const ServerRowDTOMapper = DI.createInterface((x) => x.singleton(DefaultServerRowDTOMapper));
@@ -1,23 +1,50 @@
1
1
  import { __awaiter, __decorate } from "tslib";
2
2
  import { observable } from '@microsoft/fast-element';
3
3
  import { logger } from '../../utils';
4
+ /**
5
+ * An enum that defines the names of the events that can be raised by the `PendingState` mixin.
6
+ * @public
7
+ */
4
8
  export var PendingStateEvents;
5
9
  (function (PendingStateEvents) {
6
10
  PendingStateEvents["state"] = "pending-state";
7
11
  PendingStateEvents["error"] = "pending-state-error";
8
12
  })(PendingStateEvents || (PendingStateEvents = {}));
9
- // WIP
13
+ /**
14
+ * The `PendingState` mixin.
15
+ * @public
16
+ */
10
17
  export const PendingState = (Base) => {
11
18
  class Pending extends Base {
12
19
  constructor() {
13
20
  super(...arguments);
21
+ /**
22
+ * The number of promises that are currently pending.
23
+ * @public
24
+ */
14
25
  this.pendingCount = 0;
26
+ /**
27
+ * The number of promises that have been resolved.
28
+ * @public
29
+ */
15
30
  this.resolvedCount = 0;
31
+ /**
32
+ * A boolean indicating whether there are any pending children.
33
+ * @public
34
+ */
16
35
  this.hasPendingChildren = false;
17
36
  }
37
+ /**
38
+ * Gets the progress of the pending promises as a percentage between 0 and 1.
39
+ * @public
40
+ */
18
41
  get progress() {
19
42
  return this.resolvedCount / this.pendingCount;
20
43
  }
44
+ /**
45
+ * Called when the element is connected to the DOM.
46
+ * @internal
47
+ */
21
48
  connectedCallback() {
22
49
  super.connectedCallback();
23
50
  logger.debug(`PendingState mixin is now connected to the DOM`);
@@ -26,11 +53,20 @@ export const PendingState = (Base) => {
26
53
  */
27
54
  this.addEventListener(PendingStateEvents.state, this.onPendingState);
28
55
  }
56
+ /**
57
+ * Called when the element is disconnected from the DOM.
58
+ * @internal
59
+ */
29
60
  disconnectedCallback() {
30
61
  super.disconnectedCallback();
31
62
  logger.debug(`PendingState mixin is now disconnected from the DOM`);
32
63
  this.removeEventListener(PendingStateEvents.state, this.onPendingState);
33
64
  }
65
+ /**
66
+ * Handles the `pending-state` event.
67
+ * @param event - The `pending-state` event.
68
+ * @internal
69
+ */
34
70
  onPendingState({ detail }) {
35
71
  return __awaiter(this, void 0, void 0, function* () {
36
72
  const { promise } = detail;
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Creates a new event observer instance.
3
+ * @public
4
+ */
1
5
  export const createObserver = () => {
2
6
  let listeners = [];
3
7
  return {
@@ -13,7 +17,7 @@ export const createObserver = () => {
13
17
  /**
14
18
  * Setup an `IntersectionObserver` which will activate a callback function when an element becomes visible on screen
15
19
  * @param element - HTMLElement to observe
16
- * @param callback - (boolean) => any function called when the visibility changes
20
+ * @param callback - any function called when the visibility changes
17
21
  * @public
18
22
  */
19
23
  export const respondToVisibility = (element, callback) => {
@@ -1,4 +1,5 @@
1
1
  /**
2
+ * An object that defines two resource types: "local" and "remote".
2
3
  * @public
3
4
  */
4
5
  export const ResourceType = {
@@ -1,8 +1,18 @@
1
1
  import { DI } from '@microsoft/fast-foundation';
2
2
  class DefaultJSONSerializer {
3
3
  constructor() {
4
+ /**
5
+ * Serializes an object to a JSON string using `JSON.stringify`.
6
+ * @param object - The object to serialize.
7
+ * @returns The serialized JSON string.
8
+ */
4
9
  this.serialize = (object) => JSON.stringify(object);
5
10
  }
11
+ /**
12
+ * Deserializes a response object from a HTTP request to a JavaScript object using `JSON.parse`.
13
+ * @param input - The HTTP response object.
14
+ * @returns A promise that resolves to the deserialized JavaScript object.
15
+ */
6
16
  deserialize(input) {
7
17
  if (input && input.ok) {
8
18
  return input.text().then((text) => JSON.parse(text));
@@ -13,4 +23,8 @@ class DefaultJSONSerializer {
13
23
  return JSON.parse(input);
14
24
  }
15
25
  }
26
+ /**
27
+ * A DI token for the JSON serializer.
28
+ * @public
29
+ */
16
30
  export const JSONSerializer = DI.createInterface((x) => x.singleton(DefaultJSONSerializer));
@@ -1,4 +1,14 @@
1
1
  import { baseLayerLuminance, StandardLuminance } from '@microsoft/fast-components';
2
2
  import { DesignToken } from '@microsoft/fast-foundation';
3
3
  const { create } = DesignToken;
4
- export const activeColorScheme = create('active-color-scheme').withDefault((elem) => baseLayerLuminance.getValueFor(elem) === StandardLuminance.LightMode ? 'light' : 'dark');
4
+ /**
5
+ * A design token that represents the active color scheme (light or dark).
6
+ * @public
7
+ */
8
+ export const activeColorScheme = create('active-color-scheme').withDefault(
9
+ /**
10
+ * A callback function that returns the active color scheme based on the base layer luminance of the provided element.
11
+ * @param {HTMLElement} elem The element to get the active color scheme for.
12
+ * @returns {string} The active color scheme ('light' or 'dark').
13
+ */
14
+ (elem) => baseLayerLuminance.getValueFor(elem) === StandardLuminance.LightMode ? 'light' : 'dark');
@@ -1,4 +1,12 @@
1
1
  import { logger } from '../utils/logger';
2
+ /**
3
+ * Inserts a CSS rule into the document by creating a new style element or using an existing one with the specified ID.
4
+ * Returns a function that can be called to remove the rule from the document.
5
+ * @public
6
+ * @param cssRule - The CSS rule to insert.
7
+ * @param styleElementId - The ID of the style element to use or create.
8
+ * @returns A function that removes the rule from the document.
9
+ */
2
10
  export const insertDocumentCSSRule = (cssRule, styleElementId) => {
3
11
  var _a;
4
12
  let styleElement = document.getElementById(styleElementId);
@@ -21,6 +29,11 @@ export const insertDocumentCSSRule = (cssRule, styleElementId) => {
21
29
  headElement.removeChild(styleElement);
22
30
  };
23
31
  };
32
+ /**
33
+ * Inserts a CSS link into the document if it doesn't already exist.
34
+ * @public
35
+ * @param href - The URL of the CSS file to insert.
36
+ */
24
37
  export const insertDocumentLink = (href) => {
25
38
  const links = document.head.querySelectorAll('link');
26
39
  // Already been injected
@@ -1,6 +1,16 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, FASTElement, observable } from '@microsoft/fast-element';
3
+ /**
4
+ * A custom element that encapsulates a set of styles that can be applied to slotted elements.
5
+ * @public
6
+ */
3
7
  let SlottedStyles = class SlottedStyles extends FASTElement {
8
+ /**
9
+ * Called when the `styles` property changes.
10
+ * Removes the previous styles from the parent element's FAST controller and adds the new styles.
11
+ * @param prev - The previous value of the `styles` property.
12
+ * @param next - The new value of the `styles` property.
13
+ */
4
14
  stylesChanged(prev, next) {
5
15
  if (prev) {
6
16
  this.parentElement.$fastController.removeStyles(prev);
@@ -15,5 +25,8 @@ SlottedStyles = __decorate([
15
25
  customElement({
16
26
  name: 'slotted-styles',
17
27
  })
28
+ /**
29
+ * A custom element that encapsulates a set of styles that can be applied to slotted elements.
30
+ */
18
31
  ], SlottedStyles);
19
32
  export { SlottedStyles };
@@ -1,12 +1,26 @@
1
1
  import { insertDocumentCSSRule } from './dom';
2
+ /**
3
+ * Loads font faces by inserting a style element with the specified font face rules into the document.
4
+ * @param fontFaceRules - The CSS rules for the font faces.
5
+ * @param styleElementId - The ID of the style element to insert into the document.
6
+ * @public
7
+ */
2
8
  export const loadFontFaces = (fontFaceRules, styleElementId) => {
3
9
  insertDocumentCSSRule(fontFaceRules, styleElementId);
4
10
  };
11
+ /**
12
+ * An enum of possible font styles.
13
+ * @public
14
+ */
5
15
  export var FontStyle;
6
16
  (function (FontStyle) {
7
17
  FontStyle["Italic"] = "italic";
8
18
  FontStyle["Normal"] = "normal";
9
19
  })(FontStyle || (FontStyle = {}));
20
+ /**
21
+ * An enum of possible font weights.
22
+ * @public
23
+ */
10
24
  export var FontWeight;
11
25
  (function (FontWeight) {
12
26
  FontWeight[FontWeight["Thin"] = 100] = "Thin";
@@ -16,11 +30,23 @@ export var FontWeight;
16
30
  FontWeight[FontWeight["Bold"] = 700] = "Bold";
17
31
  FontWeight[FontWeight["Black"] = 900] = "Black";
18
32
  })(FontWeight || (FontWeight = {}));
33
+ /**
34
+ * Generates a CSS mixin for the specified font family, style, and weight.
35
+ * @param family - The font family.
36
+ * @param style - Optional. The font style. Defaults to FontStyle.Normal.
37
+ * @param weight - Optional. The font weight. Defaults to FontWeight.Regular.
38
+ * @returns The generated CSS mixin.
39
+ * @public
40
+ */
19
41
  export const getFontMixin = (family, style = FontStyle.Normal, weight = FontWeight.Regular) => `
20
42
  font-family: ${family};
21
43
  font-style: ${style};
22
44
  font-weight: ${weight};
23
45
  `;
46
+ /**
47
+ * An object containing type ramp values.
48
+ * @public
49
+ */
24
50
  export const TypeRampValues = {
25
51
  minusOne: -1,
26
52
  minusTwo: -2,
@@ -2,32 +2,37 @@ import { __awaiter } from "tslib";
2
2
  import { DI } from '@microsoft/fast-foundation';
3
3
  import { v4 as uuidv4 } from 'uuid';
4
4
  import { logger } from '../utils';
5
+ /**
6
+ * A service that implements the UUID interface and provides default UUID generation using the uuidv4 library.
7
+ */
5
8
  class UUIDService {
6
9
  /**
7
- * @UUIDConfig private config: UUIDConfig;
8
- *
9
- * // Could inject something like this from the app level:
10
- * export const AppUUIDConfig = DI.createInterface<UUIDConfig>(); // < Strongly typed key
11
- * container.register(
12
- * Registration.instance(AppUUIDConfig, {
13
- * random: [...]
14
- * })
15
- * );
10
+ * Constructs a new instance of the UUIDService.
16
11
  */
17
12
  constructor() { }
13
+ /**
14
+ * Generates a new UUID.
15
+ * @param withLogging - Optional. Whether to log the generated UUID to the console. Defaults to false.
16
+ * @returns The generated UUID.
17
+ */
18
18
  createId(withLogging = false) {
19
19
  /**
20
- * Use this.config to customise uuidv4
20
+ * Use this.config to customize uuidv4.
21
21
  */
22
22
  const id = uuidv4();
23
23
  withLogging && logger.debug(`UUID.createID ${id}`);
24
24
  return id;
25
25
  }
26
+ /**
27
+ * Generates a new UUID for a remote object.
28
+ * @param withLogging - Optional. Whether to log the generated UUID to the console. Defaults to false.
29
+ * @returns A promise that resolves to the generated UUID.
30
+ */
26
31
  createRemoteId(withLogging = false) {
27
32
  return __awaiter(this, void 0, void 0, function* () {
28
33
  /**
29
34
  * TODO: Revisit async nature of id generation with potential server involvement
30
- * Use this.config to customise uuidv4
35
+ * Use this.config to customize uuidv4.
31
36
  */
32
37
  const id = uuidv4();
33
38
  withLogging && logger.debug(`UUID.createRemoteID ${id}`);
@@ -35,4 +40,8 @@ class UUIDService {
35
40
  });
36
41
  }
37
42
  }
43
+ /**
44
+ * A dependency injection token for the UUID interface.
45
+ * @public
46
+ */
38
47
  export const UUID = DI.createInterface((x) => x.singleton(UUIDService));