@genesislcap/foundation-utils 14.178.0 → 14.180.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.
package/README.md CHANGED
@@ -1,41 +1,49 @@
1
1
  # Genesis Foundation Utils
2
2
 
3
- Shared utils for foundation packages. *Please note that this shouldn't have any cross dependencies to other parts of
4
- foundation.*
5
-
6
- ### [Module Federation Details](https://webpack.js.org/concepts/module-federation):
7
-
8
- | Remote Name | Port |
9
- | --------------------- | ----- |
10
- | foundationUtils | 3040 |
11
-
12
- [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
13
- [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](https://www.typescriptlang.org/)
14
-
3
+ The `@genesislcap/foundation-utils` package provides a collection of utility services and helpers designed to facilitate common development tasks within Genesis applications. It aims to enhance productivity by offering reusable solutions for patterns and problems encountered across different projects.
4
+
5
+ ## API Documentation
6
+
7
+ For more detailed information on API and configurations, please refer to the [API documentation](docs/api/index.md) in the `docs/api` directory.
8
+
9
+ ## Features
10
+
11
+ The library encompasses a broad range of features, including:
12
+
13
+ - **[Data](src/data/README.md)** - Manages in-memory databases and data storage solutions.
14
+ - **[Decorators](src/decorators/README.md)** - Provides decorators for enhancing class functionalities, such as rendering on change.
15
+ - **[Design System](src/design-system/README.md)** - Holds the design system configurations and utilities.
16
+ - **[Directives](src/directives/README.md)** - Offers Angular-like directives for DOM manipulations, including conditional rendering and synchronization functionalities.
17
+ - **[ENV](src/env/README.md)** - Contains utilities for environment variable management and detection of development environments.
18
+ - **[Error](src/error/README.md)** - Deals with error mapping and handling strategies.
19
+ - **[Formatters](src/formatters/README.md)** - Includes functions for formatting dates and numbers according to locale settings.
20
+ - **[Logger](src/logger/README.md)** - A simple logging utility for debugging and information tracking.
21
+ - **[Mappers](src/mappers/README.md)** - Focuses on data transformation, especially for DTOs (Data Transfer Objects).
22
+ - **[Mixins](src/mixins/README.md)** - Provides mixins for common functionalities like lifecycle hooks and state management.
23
+ - **[Observer](src/observer/README.md)** - Implements the Observer pattern for reactive programming.
24
+ - **[Resource](src/observer/README.md)** - Defines types and interfaces for resource management.
25
+ - **[Serializers](src/serializers/README.md)** - Contains serializers, particularly for JSON data handling.
26
+ - **[State](src/state/README.md)** - Manages reactive state and provides utilities for state observation.
27
+ - **[Styles](src/styles/README.md)** - Includes utilities for styling, dealing with colors, typography, and DOM styles.
28
+ - **[UUID](src/uuid/README.md)** - Utilities for generating and managing UUIDs.
29
+ - **[Window](src/window/README.md)** - Provides abstractions and utilities for window object manipulations.
15
30
 
16
31
  ## Installation
17
32
 
18
- To enable this module in your application, follow the steps below.
19
-
20
- 1. Add `@genesislcap/foundation-utils` as a dependency in your `package.json` file. Whenever you change the dependencies of your project, ensure you run the `$ npm run bootstrap` command again. You can find more information in the [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) page.
33
+ To include `@genesislcap/foundation-utils` in your project, add it as a dependency in your `package.json` file and follow your project's routine for dependency installation.
21
34
 
22
35
  ```json
23
36
  {
24
- ...
25
37
  "dependencies": {
26
- ...
27
38
  "@genesislcap/foundation-utils": "latest"
28
- ...
29
- },
30
- ...
39
+ }
31
40
  }
32
41
  ```
33
42
 
34
- ## [API Docs](./docs/api/index.md)
35
-
36
43
  ## License
37
44
 
38
45
  Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
39
46
 
40
47
  ### Licensed components
41
- Genesis low-code platform
48
+
49
+ Genesis low-code platform
@@ -1551,41 +1551,6 @@
1551
1551
  }
1552
1552
  ]
1553
1553
  },
1554
- {
1555
- "kind": "javascript-module",
1556
- "path": "src/utils/index.ts",
1557
- "declarations": [],
1558
- "exports": [
1559
- {
1560
- "kind": "js",
1561
- "name": "*",
1562
- "declaration": {
1563
- "name": "*",
1564
- "package": "./logger"
1565
- }
1566
- }
1567
- ]
1568
- },
1569
- {
1570
- "kind": "javascript-module",
1571
- "path": "src/utils/logger.ts",
1572
- "declarations": [
1573
- {
1574
- "kind": "variable",
1575
- "name": "logger"
1576
- }
1577
- ],
1578
- "exports": [
1579
- {
1580
- "kind": "js",
1581
- "name": "logger",
1582
- "declaration": {
1583
- "name": "logger",
1584
- "module": "src/utils/logger.ts"
1585
- }
1586
- }
1587
- ]
1588
- },
1589
1554
  {
1590
1555
  "kind": "javascript-module",
1591
1556
  "path": "src/styles/color.ts",
@@ -1935,7 +1900,7 @@
1935
1900
  },
1936
1901
  {
1937
1902
  "kind": "javascript-module",
1938
- "path": "src/uuid/index.ts",
1903
+ "path": "src/utils/index.ts",
1939
1904
  "declarations": [],
1940
1905
  "exports": [
1941
1906
  {
@@ -1943,36 +1908,34 @@
1943
1908
  "name": "*",
1944
1909
  "declaration": {
1945
1910
  "name": "*",
1946
- "package": "./uuid"
1911
+ "package": "./logger"
1947
1912
  }
1948
1913
  }
1949
1914
  ]
1950
1915
  },
1951
1916
  {
1952
1917
  "kind": "javascript-module",
1953
- "path": "src/uuid/uuid.ts",
1918
+ "path": "src/utils/logger.ts",
1954
1919
  "declarations": [
1955
1920
  {
1956
1921
  "kind": "variable",
1957
- "name": "UUID",
1958
- "description": "A dependency injection token for the UUID interface.",
1959
- "privacy": "public"
1922
+ "name": "logger"
1960
1923
  }
1961
1924
  ],
1962
1925
  "exports": [
1963
1926
  {
1964
1927
  "kind": "js",
1965
- "name": "UUID",
1928
+ "name": "logger",
1966
1929
  "declaration": {
1967
- "name": "UUID",
1968
- "module": "src/uuid/uuid.ts"
1930
+ "name": "logger",
1931
+ "module": "src/utils/logger.ts"
1969
1932
  }
1970
1933
  }
1971
1934
  ]
1972
1935
  },
1973
1936
  {
1974
1937
  "kind": "javascript-module",
1975
- "path": "src/directives/sync/index.ts",
1938
+ "path": "src/uuid/index.ts",
1976
1939
  "declarations": [],
1977
1940
  "exports": [
1978
1941
  {
@@ -1980,146 +1943,29 @@
1980
1943
  "name": "*",
1981
1944
  "declaration": {
1982
1945
  "name": "*",
1983
- "package": "./sync"
1946
+ "package": "./uuid"
1984
1947
  }
1985
1948
  }
1986
1949
  ]
1987
1950
  },
1988
1951
  {
1989
1952
  "kind": "javascript-module",
1990
- "path": "src/directives/sync/sync.ts",
1953
+ "path": "src/uuid/uuid.ts",
1991
1954
  "declarations": [
1992
1955
  {
1993
1956
  "kind": "variable",
1994
- "name": "defaultEventMap",
1995
- "type": {
1996
- "text": "Map<string, EventName>"
1997
- },
1998
- "default": "new Map([\n ['FAST-TEXT-AREA', 'input'],\n ['FAST-TEXT-FIELD', 'input'],\n ['FOUNDATION-TEXT-AREA', 'input'],\n ['FOUNDATION-TEXT-FIELD', 'input'],\n ['INPUT', 'input'],\n ['ZERO-TEXT-FIELD', 'input'],\n])",
1999
- "description": "A map that associates specific HTML element tags with their corresponding default event names.",
2000
- "privacy": "public"
2001
- },
2002
- {
2003
- "kind": "function",
2004
- "name": "sync",
2005
- "return": {
2006
- "type": {
2007
- "text": "CaptureType<TSource>"
2008
- }
2009
- },
2010
- "parameters": [
2011
- {
2012
- "name": "binding",
2013
- "type": {
2014
- "text": "Binding<TSource, TReturn>"
2015
- }
2016
- },
2017
- {
2018
- "name": "conversionType",
2019
- "default": "'string'",
2020
- "type": {
2021
- "text": "ConversionType"
2022
- }
2023
- },
2024
- {
2025
- "name": "eventName",
2026
- "default": "'default'",
2027
- "type": {
2028
- "text": "EventName"
2029
- }
2030
- },
2031
- {
2032
- "name": "keyAttr",
2033
- "optional": true,
2034
- "type": {
2035
- "text": "string"
2036
- }
2037
- }
2038
- ],
2039
- "description": "Creates a synchronization directive that binds a data source to an HTML element,",
2040
- "privacy": "public"
2041
- }
2042
- ],
2043
- "exports": [
2044
- {
2045
- "kind": "js",
2046
- "name": "defaultEventMap",
2047
- "declaration": {
2048
- "name": "defaultEventMap",
2049
- "module": "src/directives/sync/sync.ts"
2050
- }
2051
- },
2052
- {
2053
- "kind": "js",
2054
- "name": "sync",
2055
- "declaration": {
2056
- "name": "sync",
2057
- "module": "src/directives/sync/sync.ts"
2058
- }
2059
- }
2060
- ]
2061
- },
2062
- {
2063
- "kind": "javascript-module",
2064
- "path": "src/directives/when-else/index.ts",
2065
- "declarations": [],
2066
- "exports": [
2067
- {
2068
- "kind": "js",
2069
- "name": "*",
2070
- "declaration": {
2071
- "name": "*",
2072
- "package": "./when-else"
2073
- }
2074
- }
2075
- ]
2076
- },
2077
- {
2078
- "kind": "javascript-module",
2079
- "path": "src/directives/when-else/when-else.ts",
2080
- "declarations": [
2081
- {
2082
- "kind": "function",
2083
- "name": "whenElse",
2084
- "return": {
2085
- "type": {
2086
- "text": "CaptureType<TSource>"
2087
- }
2088
- },
2089
- "parameters": [
2090
- {
2091
- "name": "binding",
2092
- "type": {
2093
- "text": "Binding<TSource, TReturn>"
2094
- },
2095
- "description": "The condition to test for rendering."
2096
- },
2097
- {
2098
- "name": "trueTemplateOrTemplateBinding",
2099
- "type": {
2100
- "text": "WhenTemplate<TSource>"
2101
- },
2102
- "description": "The template or a binding that gets the template to render when the condition is true."
2103
- },
2104
- {
2105
- "name": "falseTemplateOrTemplateBinding",
2106
- "type": {
2107
- "text": "WhenTemplate<TSource>"
2108
- },
2109
- "description": "The template or a binding that gets the template to render when the condition is false."
2110
- }
2111
- ],
2112
- "description": "Directive that allows supplying an \"else\" template to the traditional https://www.fast.design/docs/api/fast-element.when/#when-function directive",
1957
+ "name": "UUID",
1958
+ "description": "A dependency injection token for the UUID interface.",
2113
1959
  "privacy": "public"
2114
1960
  }
2115
1961
  ],
2116
1962
  "exports": [
2117
1963
  {
2118
1964
  "kind": "js",
2119
- "name": "whenElse",
1965
+ "name": "UUID",
2120
1966
  "declaration": {
2121
- "name": "whenElse",
2122
- "module": "src/directives/when-else/when-else.ts"
1967
+ "name": "UUID",
1968
+ "module": "src/uuid/uuid.ts"
2123
1969
  }
2124
1970
  }
2125
1971
  ]
@@ -2272,6 +2118,160 @@
2272
2118
  }
2273
2119
  ]
2274
2120
  },
2121
+ {
2122
+ "kind": "javascript-module",
2123
+ "path": "src/directives/sync/index.ts",
2124
+ "declarations": [],
2125
+ "exports": [
2126
+ {
2127
+ "kind": "js",
2128
+ "name": "*",
2129
+ "declaration": {
2130
+ "name": "*",
2131
+ "package": "./sync"
2132
+ }
2133
+ }
2134
+ ]
2135
+ },
2136
+ {
2137
+ "kind": "javascript-module",
2138
+ "path": "src/directives/sync/sync.ts",
2139
+ "declarations": [
2140
+ {
2141
+ "kind": "variable",
2142
+ "name": "defaultEventMap",
2143
+ "type": {
2144
+ "text": "Map<string, EventName>"
2145
+ },
2146
+ "default": "new Map([\n ['FAST-TEXT-AREA', 'input'],\n ['FAST-TEXT-FIELD', 'input'],\n ['FOUNDATION-TEXT-AREA', 'input'],\n ['FOUNDATION-TEXT-FIELD', 'input'],\n ['INPUT', 'input'],\n ['ZERO-TEXT-FIELD', 'input'],\n])",
2147
+ "description": "A map that associates specific HTML element tags with their corresponding default event names.",
2148
+ "privacy": "public"
2149
+ },
2150
+ {
2151
+ "kind": "function",
2152
+ "name": "sync",
2153
+ "return": {
2154
+ "type": {
2155
+ "text": "CaptureType<TSource>"
2156
+ }
2157
+ },
2158
+ "parameters": [
2159
+ {
2160
+ "name": "binding",
2161
+ "type": {
2162
+ "text": "Binding<TSource, TReturn>"
2163
+ }
2164
+ },
2165
+ {
2166
+ "name": "conversionType",
2167
+ "default": "'string'",
2168
+ "type": {
2169
+ "text": "ConversionType"
2170
+ }
2171
+ },
2172
+ {
2173
+ "name": "eventName",
2174
+ "default": "'default'",
2175
+ "type": {
2176
+ "text": "EventName"
2177
+ }
2178
+ },
2179
+ {
2180
+ "name": "keyAttr",
2181
+ "optional": true,
2182
+ "type": {
2183
+ "text": "string"
2184
+ }
2185
+ }
2186
+ ],
2187
+ "description": "Creates a synchronization directive that binds a data source to an HTML element,",
2188
+ "privacy": "public"
2189
+ }
2190
+ ],
2191
+ "exports": [
2192
+ {
2193
+ "kind": "js",
2194
+ "name": "defaultEventMap",
2195
+ "declaration": {
2196
+ "name": "defaultEventMap",
2197
+ "module": "src/directives/sync/sync.ts"
2198
+ }
2199
+ },
2200
+ {
2201
+ "kind": "js",
2202
+ "name": "sync",
2203
+ "declaration": {
2204
+ "name": "sync",
2205
+ "module": "src/directives/sync/sync.ts"
2206
+ }
2207
+ }
2208
+ ]
2209
+ },
2210
+ {
2211
+ "kind": "javascript-module",
2212
+ "path": "src/directives/when-else/index.ts",
2213
+ "declarations": [],
2214
+ "exports": [
2215
+ {
2216
+ "kind": "js",
2217
+ "name": "*",
2218
+ "declaration": {
2219
+ "name": "*",
2220
+ "package": "./when-else"
2221
+ }
2222
+ }
2223
+ ]
2224
+ },
2225
+ {
2226
+ "kind": "javascript-module",
2227
+ "path": "src/directives/when-else/when-else.ts",
2228
+ "declarations": [
2229
+ {
2230
+ "kind": "function",
2231
+ "name": "whenElse",
2232
+ "return": {
2233
+ "type": {
2234
+ "text": "CaptureType<TSource>"
2235
+ }
2236
+ },
2237
+ "parameters": [
2238
+ {
2239
+ "name": "binding",
2240
+ "type": {
2241
+ "text": "Binding<TSource, TReturn>"
2242
+ },
2243
+ "description": "The condition to test for rendering."
2244
+ },
2245
+ {
2246
+ "name": "trueTemplateOrTemplateBinding",
2247
+ "type": {
2248
+ "text": "WhenTemplate<TSource>"
2249
+ },
2250
+ "description": "The template or a binding that gets the template to render when the condition is true."
2251
+ },
2252
+ {
2253
+ "name": "falseTemplateOrTemplateBinding",
2254
+ "type": {
2255
+ "text": "WhenTemplate<TSource>"
2256
+ },
2257
+ "description": "The template or a binding that gets the template to render when the condition is false."
2258
+ }
2259
+ ],
2260
+ "description": "Directive that allows supplying an \"else\" template to the traditional https://www.fast.design/docs/api/fast-element.when/#when-function directive",
2261
+ "privacy": "public"
2262
+ }
2263
+ ],
2264
+ "exports": [
2265
+ {
2266
+ "kind": "js",
2267
+ "name": "whenElse",
2268
+ "declaration": {
2269
+ "name": "whenElse",
2270
+ "module": "src/directives/when-else/when-else.ts"
2271
+ }
2272
+ }
2273
+ ]
2274
+ },
2275
2275
  {
2276
2276
  "kind": "javascript-module",
2277
2277
  "path": "src/mappers/dto/index.ts",
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.178.0",
4
+ "version": "14.180.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -19,17 +19,17 @@
19
19
  "test": "genx test"
20
20
  },
21
21
  "devDependencies": {
22
- "@genesislcap/foundation-testing": "14.178.0",
23
- "@genesislcap/genx": "14.178.0",
24
- "@genesislcap/rollup-builder": "14.178.0",
25
- "@genesislcap/ts-builder": "14.178.0",
26
- "@genesislcap/uvu-playwright-builder": "14.178.0",
27
- "@genesislcap/vite-builder": "14.178.0",
28
- "@genesislcap/webpack-builder": "14.178.0",
22
+ "@genesislcap/foundation-testing": "14.180.0",
23
+ "@genesislcap/genx": "14.180.0",
24
+ "@genesislcap/rollup-builder": "14.180.0",
25
+ "@genesislcap/ts-builder": "14.180.0",
26
+ "@genesislcap/uvu-playwright-builder": "14.180.0",
27
+ "@genesislcap/vite-builder": "14.180.0",
28
+ "@genesislcap/webpack-builder": "14.180.0",
29
29
  "rimraf": "^3.0.2"
30
30
  },
31
31
  "dependencies": {
32
- "@genesislcap/foundation-logger": "14.178.0",
32
+ "@genesislcap/foundation-logger": "14.180.0",
33
33
  "@microsoft/fast-components": "^2.30.6",
34
34
  "@microsoft/fast-element": "^1.12.0",
35
35
  "@microsoft/fast-foundation": "^2.49.4",
@@ -47,5 +47,5 @@
47
47
  "access": "public"
48
48
  },
49
49
  "customElements": "dist/custom-elements.json",
50
- "gitHead": "fd55a5cd2e3b0fa048377835c73186df1e75b849"
50
+ "gitHead": "24ddbaf4c43ccfe2c323ec1178b1829451b1721a"
51
51
  }