@genesislcap/web-core 14.408.0 → 14.409.0-FUI-2495.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 CHANGED
@@ -1,60 +1,18 @@
1
- # Genesis Foundation Web Core
1
+ # @genesislcap/web-core
2
2
 
3
- [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
4
- [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](https://www.typescriptlang.org/)
3
+ Documentation for this package is published on the Genesis docs site:
5
4
 
6
- `foundation-web-core` re-exports FAST classes.
7
-
8
- ## [API Docs](./docs/api/index.md)
5
+ **Docs: [Custom components](https://docs.genesis.global/docs/develop/client-capabilities/custom-components/)**
9
6
 
10
7
  ## Installation
11
8
 
12
- ```sh
13
- npm i @genesislcap/foundation-web-core
14
- ```
15
-
16
- ## Features
17
-
18
- ### Re-exported FAST Packages
19
-
20
- This package re-exports the following Microsoft FAST packages:
21
-
22
- - **fast-colors**: Provides color utilities and color system support.
23
- - **fast-components**: Collection of web components designed according to the FAST Design System.
24
- - **fast-element**: Lightweight base class for creating custom elements.
25
- - **fast-foundation**: Provides foundational behaviors and utilities for web components.
26
- - **fast-router**: Router implementation for single-page applications.
27
- - **fast-web-utilities**: Collection of utility functions for web component development.
28
-
29
- ### Directives
30
-
31
- Additionally, this package exports a `directives` folder containing the following files:
32
-
33
- - **sync.ts**: Implementation of a directive for synchronous data binding.
34
- - **when-else.ts**: Implementation of a directive for conditional rendering using `whenElse` clause.
35
-
36
- ## Usage
37
-
38
- To utilize the features provided by this package, you can import `@genesislcap/foundation-web-core`.
39
-
40
- ```typescript
41
- import { css, customElement, FASTElement, html, sync } from '@genesislcap/foundation-web-core';
9
+ Add the package to your `package.json` dependencies. After changing dependencies, run `npm run bootstrap` (or your project's equivalent). See [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) for more information.
42
10
 
43
- @customElement({
44
- name: 'my-custom-element',
45
- template: html`
46
- <other-custom-element
47
- value="${sync((x) => x.syncedValue)}"
48
- ></other-custom-element>
49
- `,
50
- styles: css`
51
- :host {
52
- ...
53
- }
54
- `,
55
- })
56
- export class MyCustomElement extends FASTElement {
57
- ...
11
+ ```json
12
+ {
13
+ "dependencies": {
14
+ "@genesislcap/web-core": "latest"
15
+ }
58
16
  }
59
17
  ```
60
18
 
package/package.json CHANGED
@@ -1,19 +1,18 @@
1
1
  {
2
2
  "name": "@genesislcap/web-core",
3
3
  "description": "Genesis Foundation Web Core",
4
- "version": "14.408.0",
4
+ "version": "14.409.0-FUI-2495.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
8
8
  "types": "dist/dts/index.d.ts",
9
9
  "scripts": {
10
10
  "api:extract": "api-extractor run",
11
- "api:document": "api-documenter markdown -i dist -o docs/api",
12
11
  "build": "genx build -b ts && npm run build:webpack",
13
12
  "build:webpack": "genx build",
14
13
  "circular": "npx -y madge --extensions ts --circular ./src",
15
14
  "clean": "rimraf dist temp tsconfig.tsbuildinfo",
16
- "dev": "tsc -b ./tsconfig.json -w",
15
+ "dev": "genx dev -b ts",
17
16
  "lint": "genx lint --profile",
18
17
  "lint:fix": "genx lint --fix"
19
18
  },
@@ -40,5 +39,5 @@
40
39
  "publishConfig": {
41
40
  "access": "public"
42
41
  },
43
- "gitHead": "26b08831fd001b4ee95c8a0d3364a18c0ec4005b"
42
+ "gitHead": "1587391f8f98599f221c4fe75b20868382f73144"
44
43
  }
package/docs/api/index.md DELETED
@@ -1,30 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md)
4
-
5
- ## API Reference
6
-
7
- ## Packages
8
-
9
- <table><thead><tr><th>
10
-
11
- Package
12
-
13
-
14
- </th><th>
15
-
16
- Description
17
-
18
-
19
- </th></tr></thead>
20
- <tbody><tr><td>
21
-
22
- [@genesislcap/web-core](./web-core.md)
23
-
24
-
25
- </td><td>
26
-
27
-
28
- </td></tr>
29
- </tbody></table>
30
-
@@ -1,13 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/web-core](./web-core.md) &gt; [ConversionType](./web-core.conversiontype.md)
4
-
5
- ## ConversionType type
6
-
7
- Represents the possible types of value conversion for data synchronization.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- export type ConversionType = 'string' | 'number' | 'time' | 'boolean';
13
- ```
@@ -1,13 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/web-core](./web-core.md) &gt; [defaultEventMap](./web-core.defaulteventmap.md)
4
-
5
- ## defaultEventMap variable
6
-
7
- A map that associates specific HTML element tags with their corresponding default event names.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- defaultEventMap: Map<string, EventName>
13
- ```
@@ -1,99 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/web-core](./web-core.md) &gt; [defineFactory](./web-core.definefactory.md)
4
-
5
- ## defineFactory() function
6
-
7
- > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
- Defines a platform custom element based on the provided type and definition.
11
-
12
- **Signature:**
13
-
14
- ```typescript
15
- defineFactory: <TType extends Constructable<GenesisElement>>(Type: TType, overriderOrBase: DefinitionOverrider | PartialGenesisElementDefinition) => DefineFunction<TType>
16
- ```
17
-
18
- ## Parameters
19
-
20
- <table><thead><tr><th>
21
-
22
- Parameter
23
-
24
-
25
- </th><th>
26
-
27
- Type
28
-
29
-
30
- </th><th>
31
-
32
- Description
33
-
34
-
35
- </th></tr></thead>
36
- <tbody><tr><td>
37
-
38
- Type
39
-
40
-
41
- </td><td>
42
-
43
- TType
44
-
45
-
46
- </td><td>
47
-
48
- The custom element Type / Class to define.
49
-
50
-
51
- </td></tr>
52
- <tr><td>
53
-
54
- overriderOrBase
55
-
56
-
57
- </td><td>
58
-
59
- [DefinitionOverrider](./web-core.definitionoverrider.md) \| PartialGenesisElementDefinition
60
-
61
-
62
- </td><td>
63
-
64
- A function that merges definitions, or the base definition if custom merging is not needed.
65
-
66
-
67
- </td></tr>
68
- </tbody></table>
69
-
70
- **Returns:**
71
-
72
- [DefineFunction](./web-core.definefunction.md)<!-- -->&lt;TType&gt;
73
-
74
- The type class.
75
-
76
- ## Example 1
77
-
78
- An example using custom definition merge logic, useful if you need to impose hard restrictions.
79
-
80
- ```ts
81
- const definitionOverrider = (definition) => ({
82
- ...baseDefinition,
83
- ...definition,
84
- styles: baseDefinition.styles,
85
- shadowOptions: {
86
- mode: 'closed,
87
- },
88
- });
89
- export const define = defineFactory(LoginForm, definitionOverrider);
90
- ```
91
-
92
- ## Example 2
93
-
94
- You can provide the base definition if you're happy with the default spread operator merge logic.
95
-
96
- ```ts
97
- export const define = defineFactory(LoginForm, baseDefinition);
98
- ```
99
-
@@ -1,15 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/web-core](./web-core.md) &gt; [DefineFunction](./web-core.definefunction.md)
4
-
5
- ## DefineFunction type
6
-
7
- > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
-
11
- **Signature:**
12
-
13
- ```typescript
14
- export type DefineFunction<TType> = (definition: PartialGenesisElementDefinition) => TType;
15
- ```
@@ -1,15 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/web-core](./web-core.md) &gt; [DefinitionOverrider](./web-core.definitionoverrider.md)
4
-
5
- ## DefinitionOverrider type
6
-
7
- > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
- >
9
-
10
-
11
- **Signature:**
12
-
13
- ```typescript
14
- export type DefinitionOverrider = (override: PartialGenesisElementDefinition) => PartialGenesisElementDefinition;
15
- ```
@@ -1,54 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/web-core](./web-core.md) &gt; [deprecatedAttr](./web-core.deprecatedattr.md)
4
-
5
- ## deprecatedAttr() function
6
-
7
- Decorator: Specifies an HTML attribute.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- export declare function deprecatedAttr(config?: ExtendedDecoratorAttributeConfiguration): (target: {}, property: string) => void;
13
- ```
14
-
15
- ## Parameters
16
-
17
- <table><thead><tr><th>
18
-
19
- Parameter
20
-
21
-
22
- </th><th>
23
-
24
- Type
25
-
26
-
27
- </th><th>
28
-
29
- Description
30
-
31
-
32
- </th></tr></thead>
33
- <tbody><tr><td>
34
-
35
- config
36
-
37
-
38
- </td><td>
39
-
40
- ExtendedDecoratorAttributeConfiguration
41
-
42
-
43
- </td><td>
44
-
45
- _(Optional)_ The configuration for the attribute.
46
-
47
-
48
- </td></tr>
49
- </tbody></table>
50
-
51
- **Returns:**
52
-
53
- (target: {}, property: string) =&gt; void
54
-
@@ -1,70 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/web-core](./web-core.md) &gt; [deprecatedAttr](./web-core.deprecatedattr_1.md)
4
-
5
- ## deprecatedAttr() function
6
-
7
- Decorator: Specifies an HTML attribute.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- export declare function deprecatedAttr(target: {}, prop: string): void;
13
- ```
14
-
15
- ## Parameters
16
-
17
- <table><thead><tr><th>
18
-
19
- Parameter
20
-
21
-
22
- </th><th>
23
-
24
- Type
25
-
26
-
27
- </th><th>
28
-
29
- Description
30
-
31
-
32
- </th></tr></thead>
33
- <tbody><tr><td>
34
-
35
- target
36
-
37
-
38
- </td><td>
39
-
40
- {}
41
-
42
-
43
- </td><td>
44
-
45
- The class to define the attribute on.
46
-
47
-
48
- </td></tr>
49
- <tr><td>
50
-
51
- prop
52
-
53
-
54
- </td><td>
55
-
56
- string
57
-
58
-
59
- </td><td>
60
-
61
- The property name to be associated with the attribute.
62
-
63
-
64
- </td></tr>
65
- </tbody></table>
66
-
67
- **Returns:**
68
-
69
- void
70
-
@@ -1,13 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/web-core](./web-core.md) &gt; [EventName](./web-core.eventname.md)
4
-
5
- ## EventName type
6
-
7
- Represents the possible event names for data synchronization.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- export type EventName = 'input' | 'change' | 'default';
13
- ```
@@ -1,194 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/web-core](./web-core.md)
4
-
5
- ## web-core package
6
-
7
- ## Functions
8
-
9
- <table><thead><tr><th>
10
-
11
- Function
12
-
13
-
14
- </th><th>
15
-
16
- Description
17
-
18
-
19
- </th></tr></thead>
20
- <tbody><tr><td>
21
-
22
- [defineFactory(Type, overriderOrBase)](./web-core.definefactory.md)
23
-
24
-
25
- </td><td>
26
-
27
- **_(BETA)_** Defines a platform custom element based on the provided type and definition.
28
-
29
-
30
- </td></tr>
31
- <tr><td>
32
-
33
- [deprecatedAttr(config)](./web-core.deprecatedattr.md)
34
-
35
-
36
- </td><td>
37
-
38
- Decorator: Specifies an HTML attribute.
39
-
40
-
41
- </td></tr>
42
- <tr><td>
43
-
44
- [deprecatedAttr(target, prop)](./web-core.deprecatedattr_1.md)
45
-
46
-
47
- </td><td>
48
-
49
- Decorator: Specifies an HTML attribute.
50
-
51
-
52
- </td></tr>
53
- <tr><td>
54
-
55
- [sync(binding, conversionType, eventName, keyAttr)](./web-core.sync.md)
56
-
57
-
58
- </td><td>
59
-
60
- Creates a synchronization directive that binds a data source to an HTML element,
61
-
62
-
63
- </td></tr>
64
- <tr><td>
65
-
66
- [tagFor(dependency)](./web-core.tagfor.md)
67
-
68
-
69
- </td><td>
70
-
71
- **_(BETA)_** Determines what HTML tag name to use for the dependency.
72
-
73
-
74
- </td></tr>
75
- <tr><td>
76
-
77
- [whenElse(binding, trueTemplateOrTemplateBinding, falseTemplateOrTemplateBinding)](./web-core.whenelse.md)
78
-
79
-
80
- </td><td>
81
-
82
- Directive that allows supplying an "else" template to the traditional [https://www.fast.design/docs/api/fast-element.when/\#when-function](https://www.fast.design/docs/api/fast-element.when/#when-function) directive
83
-
84
-
85
- </td></tr>
86
- </tbody></table>
87
-
88
- ## Variables
89
-
90
- <table><thead><tr><th>
91
-
92
- Variable
93
-
94
-
95
- </th><th>
96
-
97
- Description
98
-
99
-
100
- </th></tr></thead>
101
- <tbody><tr><td>
102
-
103
- [defaultEventMap](./web-core.defaulteventmap.md)
104
-
105
-
106
- </td><td>
107
-
108
- A map that associates specific HTML element tags with their corresponding default event names.
109
-
110
-
111
- </td></tr>
112
- </tbody></table>
113
-
114
- ## Type Aliases
115
-
116
- <table><thead><tr><th>
117
-
118
- Type Alias
119
-
120
-
121
- </th><th>
122
-
123
- Description
124
-
125
-
126
- </th></tr></thead>
127
- <tbody><tr><td>
128
-
129
- [ConversionType](./web-core.conversiontype.md)
130
-
131
-
132
- </td><td>
133
-
134
- Represents the possible types of value conversion for data synchronization.
135
-
136
-
137
- </td></tr>
138
- <tr><td>
139
-
140
- [DefineFunction](./web-core.definefunction.md)
141
-
142
-
143
- </td><td>
144
-
145
- **_(BETA)_**
146
-
147
-
148
- </td></tr>
149
- <tr><td>
150
-
151
- [DefinitionOverrider](./web-core.definitionoverrider.md)
152
-
153
-
154
- </td><td>
155
-
156
- **_(BETA)_**
157
-
158
-
159
- </td></tr>
160
- <tr><td>
161
-
162
- [EventName](./web-core.eventname.md)
163
-
164
-
165
- </td><td>
166
-
167
- Represents the possible event names for data synchronization.
168
-
169
-
170
- </td></tr>
171
- <tr><td>
172
-
173
- [TemplateElementDependency](./web-core.templateelementdependency.md)
174
-
175
-
176
- </td><td>
177
-
178
- **_(BETA)_** Used to designate a template's dependency on another custom element.
179
-
180
-
181
- </td></tr>
182
- <tr><td>
183
-
184
- [TemplateElements](./web-core.templateelements.md)
185
-
186
-
187
- </td><td>
188
-
189
- **_(BETA)_** Used to help map components / elements for tagFor usage
190
-
191
-
192
- </td></tr>
193
- </tbody></table>
194
-