@genesislcap/web-core 14.157.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 +67 -0
- package/dist/cjs/FAST/fast-colors.js +7 -0
- package/dist/cjs/FAST/fast-components.js +4 -0
- package/dist/cjs/FAST/fast-element.js +30 -0
- package/dist/cjs/FAST/fast-foundation.js +64 -0
- package/dist/cjs/FAST/fast-router.js +11 -0
- package/dist/cjs/FAST/fast-web-utilities.js +11 -0
- package/dist/cjs/FAST/index.js +9 -0
- package/dist/cjs/directives/index.js +5 -0
- package/dist/cjs/directives/sync.js +101 -0
- package/dist/cjs/directives/when-else.js +18 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/patterns/define.js +41 -0
- package/dist/cjs/patterns/index.js +5 -0
- package/dist/cjs/patterns/tag-for.js +24 -0
- package/dist/dts/FAST/fast-colors.d.ts +2 -0
- package/dist/dts/FAST/fast-colors.d.ts.map +1 -0
- package/dist/dts/FAST/fast-components.d.ts +2 -0
- package/dist/dts/FAST/fast-components.d.ts.map +1 -0
- package/dist/dts/FAST/fast-element.d.ts +2 -0
- package/dist/dts/FAST/fast-element.d.ts.map +1 -0
- package/dist/dts/FAST/fast-foundation.d.ts +2 -0
- package/dist/dts/FAST/fast-foundation.d.ts.map +1 -0
- package/dist/dts/FAST/fast-router.d.ts +2 -0
- package/dist/dts/FAST/fast-router.d.ts.map +1 -0
- package/dist/dts/FAST/fast-web-utilities.d.ts +2 -0
- package/dist/dts/FAST/fast-web-utilities.d.ts.map +1 -0
- package/dist/dts/FAST/index.d.ts +7 -0
- package/dist/dts/FAST/index.d.ts.map +1 -0
- package/dist/dts/directives/index.d.ts +3 -0
- package/dist/dts/directives/index.d.ts.map +1 -0
- package/dist/dts/directives/sync.d.ts +22 -0
- package/dist/dts/directives/sync.d.ts.map +1 -0
- package/dist/dts/directives/when-else.d.ts +13 -0
- package/dist/dts/directives/when-else.d.ts.map +1 -0
- package/dist/dts/index.d.ts +4 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/dts/patterns/define.d.ts +39 -0
- package/dist/dts/patterns/define.d.ts.map +1 -0
- package/dist/dts/patterns/index.d.ts +3 -0
- package/dist/dts/patterns/index.d.ts.map +1 -0
- package/dist/dts/patterns/tag-for.d.ts +21 -0
- package/dist/dts/patterns/tag-for.d.ts.map +1 -0
- package/dist/dts/tsdoc-metadata.json +11 -0
- package/dist/esm/FAST/fast-colors.js +1 -0
- package/dist/esm/FAST/fast-components.js +1 -0
- package/dist/esm/FAST/fast-element.js +1 -0
- package/dist/esm/FAST/fast-foundation.js +1 -0
- package/dist/esm/FAST/fast-router.js +1 -0
- package/dist/esm/FAST/fast-web-utilities.js +1 -0
- package/dist/esm/FAST/index.js +6 -0
- package/dist/esm/directives/index.js +2 -0
- package/dist/esm/directives/sync.js +97 -0
- package/dist/esm/directives/when-else.js +14 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/patterns/define.js +37 -0
- package/dist/esm/patterns/index.js +2 -0
- package/dist/esm/patterns/tag-for.js +20 -0
- package/dist/web-core.api.json +863 -0
- package/dist/web-core.d.ts +526 -0
- package/docs/.gitattributes +2 -0
- package/docs/api/index.md +12 -0
- package/docs/api/web-core.conversiontype.md +13 -0
- package/docs/api/web-core.defaulteventmap.md +13 -0
- package/docs/api/web-core.definefactory.md +41 -0
- package/docs/api/web-core.definefunction.md +15 -0
- package/docs/api/web-core.definitionoverrider.md +15 -0
- package/docs/api/web-core.eventname.md +13 -0
- package/docs/api/web-core.md +32 -0
- package/docs/api/web-core.sync.md +27 -0
- package/docs/api/web-core.tagfor.md +29 -0
- package/docs/api/web-core.templateelementdependency.md +16 -0
- package/docs/api/web-core.templateelements.md +20 -0
- package/docs/api/web-core.whenelse.md +26 -0
- package/docs/api-report.md +473 -0
- package/license.txt +46 -0
- package/package.json +39 -0
- package/tsconfig.cjs.json +10 -0
- package/tsdoc.json +20 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Genesis Foundation Web Core
|
|
2
|
+
|
|
3
|
+
[](https://lerna.js.org/)
|
|
4
|
+
[](https://www.typescriptlang.org/)
|
|
5
|
+
|
|
6
|
+
`foundation-web-core` re-exports FAST classes.
|
|
7
|
+
|
|
8
|
+
## [API Docs](./docs/api/index.md)
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
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';
|
|
42
|
+
|
|
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
|
+
...
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
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.
|
|
64
|
+
|
|
65
|
+
### Licensed components
|
|
66
|
+
|
|
67
|
+
Genesis low-code platform
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseColorHexRGB = exports.ComponentStateColorPalette = exports.ColorRGBA64 = void 0;
|
|
4
|
+
var fast_colors_1 = require("@microsoft/fast-colors");
|
|
5
|
+
Object.defineProperty(exports, "ColorRGBA64", { enumerable: true, get: function () { return fast_colors_1.ColorRGBA64; } });
|
|
6
|
+
Object.defineProperty(exports, "ComponentStateColorPalette", { enumerable: true, get: function () { return fast_colors_1.ComponentStateColorPalette; } });
|
|
7
|
+
Object.defineProperty(exports, "parseColorHexRGB", { enumerable: true, get: function () { return fast_colors_1.parseColorHexRGB; } });
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.when = exports.volatile = exports.ViewTemplate = exports.slotted = exports.repeat = exports.ref = exports.observable = exports.Observable = exports.nullableNumberConverter = exports.HTMLView = exports.HTMLBindingDirective = exports.html = exports.FASTElementDefinition = exports.FASTElement = exports.ExecutionContext = exports.ElementStyles = exports.elements = exports.DOM = exports.defaultExecutionContext = exports.customElement = exports.cssPartial = exports.CSSDirective = exports.css = exports.children = exports.BindingBehavior = exports.attr = void 0;
|
|
4
|
+
var fast_element_1 = require("@microsoft/fast-element");
|
|
5
|
+
Object.defineProperty(exports, "attr", { enumerable: true, get: function () { return fast_element_1.attr; } });
|
|
6
|
+
Object.defineProperty(exports, "BindingBehavior", { enumerable: true, get: function () { return fast_element_1.BindingBehavior; } });
|
|
7
|
+
Object.defineProperty(exports, "children", { enumerable: true, get: function () { return fast_element_1.children; } });
|
|
8
|
+
Object.defineProperty(exports, "css", { enumerable: true, get: function () { return fast_element_1.css; } });
|
|
9
|
+
Object.defineProperty(exports, "CSSDirective", { enumerable: true, get: function () { return fast_element_1.CSSDirective; } });
|
|
10
|
+
Object.defineProperty(exports, "cssPartial", { enumerable: true, get: function () { return fast_element_1.cssPartial; } });
|
|
11
|
+
Object.defineProperty(exports, "customElement", { enumerable: true, get: function () { return fast_element_1.customElement; } });
|
|
12
|
+
Object.defineProperty(exports, "defaultExecutionContext", { enumerable: true, get: function () { return fast_element_1.defaultExecutionContext; } });
|
|
13
|
+
Object.defineProperty(exports, "DOM", { enumerable: true, get: function () { return fast_element_1.DOM; } });
|
|
14
|
+
Object.defineProperty(exports, "elements", { enumerable: true, get: function () { return fast_element_1.elements; } });
|
|
15
|
+
Object.defineProperty(exports, "ElementStyles", { enumerable: true, get: function () { return fast_element_1.ElementStyles; } });
|
|
16
|
+
Object.defineProperty(exports, "ExecutionContext", { enumerable: true, get: function () { return fast_element_1.ExecutionContext; } });
|
|
17
|
+
Object.defineProperty(exports, "FASTElement", { enumerable: true, get: function () { return fast_element_1.FASTElement; } });
|
|
18
|
+
Object.defineProperty(exports, "FASTElementDefinition", { enumerable: true, get: function () { return fast_element_1.FASTElementDefinition; } });
|
|
19
|
+
Object.defineProperty(exports, "html", { enumerable: true, get: function () { return fast_element_1.html; } });
|
|
20
|
+
Object.defineProperty(exports, "HTMLBindingDirective", { enumerable: true, get: function () { return fast_element_1.HTMLBindingDirective; } });
|
|
21
|
+
Object.defineProperty(exports, "HTMLView", { enumerable: true, get: function () { return fast_element_1.HTMLView; } });
|
|
22
|
+
Object.defineProperty(exports, "nullableNumberConverter", { enumerable: true, get: function () { return fast_element_1.nullableNumberConverter; } });
|
|
23
|
+
Object.defineProperty(exports, "Observable", { enumerable: true, get: function () { return fast_element_1.Observable; } });
|
|
24
|
+
Object.defineProperty(exports, "observable", { enumerable: true, get: function () { return fast_element_1.observable; } });
|
|
25
|
+
Object.defineProperty(exports, "ref", { enumerable: true, get: function () { return fast_element_1.ref; } });
|
|
26
|
+
Object.defineProperty(exports, "repeat", { enumerable: true, get: function () { return fast_element_1.repeat; } });
|
|
27
|
+
Object.defineProperty(exports, "slotted", { enumerable: true, get: function () { return fast_element_1.slotted; } });
|
|
28
|
+
Object.defineProperty(exports, "ViewTemplate", { enumerable: true, get: function () { return fast_element_1.ViewTemplate; } });
|
|
29
|
+
Object.defineProperty(exports, "volatile", { enumerable: true, get: function () { return fast_element_1.volatile; } });
|
|
30
|
+
Object.defineProperty(exports, "when", { enumerable: true, get: function () { return fast_element_1.when; } });
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tabPanelTemplate = exports.tabTemplate = exports.switchTemplate = exports.startSlotTemplate = exports.sliderLabelTemplate = exports.skeletonTemplate = exports.selectTemplate = exports.radioGroupTemplate = exports.radioTemplate = exports.Registration = exports.PropertyStyleSheetBehavior = exports.progressRingTemplate = exports.progressTemplate = exports.optional = exports.menuItemTemplate = exports.menuTemplate = exports.listboxOptionTemplate = exports.listboxTemplate = exports.inject = exports.horizontalScrollTemplate = exports.FormAssociated = exports.forcedColorsStylesheetBehavior = exports.FoundationElementRegistry = exports.FoundationElement = exports.flipperTemplate = exports.endSlotTemplate = exports.dividerTemplate = exports.display = exports.disclosureTemplate = exports.DI = exports.DesignToken = exports.DesignSystem = exports.dataGridRowTemplate = exports.dataGridCellTemplate = exports.dataGridTemplate = exports.Container = exports.ComboboxAutocomplete = exports.composedParent = exports.checkboxTemplate = exports.cardTemplate = exports.calendarTemplate = exports.buttonTemplate = exports.breadcrumbTemplate = exports.breadcrumbItemTemplate = exports.badgeTemplate = exports.avatarTemplate = exports.anchoredRegionTemplate = exports.anchorTemplate = exports.accordionTemplate = exports.accordionItemTemplate = void 0;
|
|
4
|
+
exports.whitespaceFilter = exports.treeViewTemplate = exports.treeItemTemplate = exports.tooltipTemplate = exports.TooltipPosition = exports.toolbarTemplate = exports.textAreaTemplate = exports.TabsOrientation = exports.tabsTemplate = void 0;
|
|
5
|
+
var fast_foundation_1 = require("@microsoft/fast-foundation");
|
|
6
|
+
Object.defineProperty(exports, "accordionItemTemplate", { enumerable: true, get: function () { return fast_foundation_1.accordionItemTemplate; } });
|
|
7
|
+
Object.defineProperty(exports, "accordionTemplate", { enumerable: true, get: function () { return fast_foundation_1.accordionTemplate; } });
|
|
8
|
+
Object.defineProperty(exports, "anchorTemplate", { enumerable: true, get: function () { return fast_foundation_1.anchorTemplate; } });
|
|
9
|
+
Object.defineProperty(exports, "anchoredRegionTemplate", { enumerable: true, get: function () { return fast_foundation_1.anchoredRegionTemplate; } });
|
|
10
|
+
Object.defineProperty(exports, "avatarTemplate", { enumerable: true, get: function () { return fast_foundation_1.avatarTemplate; } });
|
|
11
|
+
Object.defineProperty(exports, "badgeTemplate", { enumerable: true, get: function () { return fast_foundation_1.badgeTemplate; } });
|
|
12
|
+
Object.defineProperty(exports, "breadcrumbItemTemplate", { enumerable: true, get: function () { return fast_foundation_1.breadcrumbItemTemplate; } });
|
|
13
|
+
Object.defineProperty(exports, "breadcrumbTemplate", { enumerable: true, get: function () { return fast_foundation_1.breadcrumbTemplate; } });
|
|
14
|
+
Object.defineProperty(exports, "buttonTemplate", { enumerable: true, get: function () { return fast_foundation_1.buttonTemplate; } });
|
|
15
|
+
Object.defineProperty(exports, "calendarTemplate", { enumerable: true, get: function () { return fast_foundation_1.calendarTemplate; } });
|
|
16
|
+
Object.defineProperty(exports, "cardTemplate", { enumerable: true, get: function () { return fast_foundation_1.cardTemplate; } });
|
|
17
|
+
Object.defineProperty(exports, "checkboxTemplate", { enumerable: true, get: function () { return fast_foundation_1.checkboxTemplate; } });
|
|
18
|
+
Object.defineProperty(exports, "composedParent", { enumerable: true, get: function () { return fast_foundation_1.composedParent; } });
|
|
19
|
+
Object.defineProperty(exports, "ComboboxAutocomplete", { enumerable: true, get: function () { return fast_foundation_1.ComboboxAutocomplete; } });
|
|
20
|
+
Object.defineProperty(exports, "Container", { enumerable: true, get: function () { return fast_foundation_1.Container; } });
|
|
21
|
+
Object.defineProperty(exports, "dataGridTemplate", { enumerable: true, get: function () { return fast_foundation_1.dataGridTemplate; } });
|
|
22
|
+
Object.defineProperty(exports, "dataGridCellTemplate", { enumerable: true, get: function () { return fast_foundation_1.dataGridCellTemplate; } });
|
|
23
|
+
Object.defineProperty(exports, "dataGridRowTemplate", { enumerable: true, get: function () { return fast_foundation_1.dataGridRowTemplate; } });
|
|
24
|
+
Object.defineProperty(exports, "DesignSystem", { enumerable: true, get: function () { return fast_foundation_1.DesignSystem; } });
|
|
25
|
+
Object.defineProperty(exports, "DesignToken", { enumerable: true, get: function () { return fast_foundation_1.DesignToken; } });
|
|
26
|
+
Object.defineProperty(exports, "DI", { enumerable: true, get: function () { return fast_foundation_1.DI; } });
|
|
27
|
+
Object.defineProperty(exports, "disclosureTemplate", { enumerable: true, get: function () { return fast_foundation_1.disclosureTemplate; } });
|
|
28
|
+
Object.defineProperty(exports, "display", { enumerable: true, get: function () { return fast_foundation_1.display; } });
|
|
29
|
+
Object.defineProperty(exports, "dividerTemplate", { enumerable: true, get: function () { return fast_foundation_1.dividerTemplate; } });
|
|
30
|
+
Object.defineProperty(exports, "endSlotTemplate", { enumerable: true, get: function () { return fast_foundation_1.endSlotTemplate; } });
|
|
31
|
+
Object.defineProperty(exports, "flipperTemplate", { enumerable: true, get: function () { return fast_foundation_1.flipperTemplate; } });
|
|
32
|
+
Object.defineProperty(exports, "FoundationElement", { enumerable: true, get: function () { return fast_foundation_1.FoundationElement; } });
|
|
33
|
+
Object.defineProperty(exports, "FoundationElementRegistry", { enumerable: true, get: function () { return fast_foundation_1.FoundationElementRegistry; } });
|
|
34
|
+
Object.defineProperty(exports, "forcedColorsStylesheetBehavior", { enumerable: true, get: function () { return fast_foundation_1.forcedColorsStylesheetBehavior; } });
|
|
35
|
+
Object.defineProperty(exports, "FormAssociated", { enumerable: true, get: function () { return fast_foundation_1.FormAssociated; } });
|
|
36
|
+
Object.defineProperty(exports, "horizontalScrollTemplate", { enumerable: true, get: function () { return fast_foundation_1.horizontalScrollTemplate; } });
|
|
37
|
+
Object.defineProperty(exports, "inject", { enumerable: true, get: function () { return fast_foundation_1.inject; } });
|
|
38
|
+
Object.defineProperty(exports, "listboxTemplate", { enumerable: true, get: function () { return fast_foundation_1.listboxTemplate; } });
|
|
39
|
+
Object.defineProperty(exports, "listboxOptionTemplate", { enumerable: true, get: function () { return fast_foundation_1.listboxOptionTemplate; } });
|
|
40
|
+
Object.defineProperty(exports, "menuTemplate", { enumerable: true, get: function () { return fast_foundation_1.menuTemplate; } });
|
|
41
|
+
Object.defineProperty(exports, "menuItemTemplate", { enumerable: true, get: function () { return fast_foundation_1.menuItemTemplate; } });
|
|
42
|
+
Object.defineProperty(exports, "optional", { enumerable: true, get: function () { return fast_foundation_1.optional; } });
|
|
43
|
+
Object.defineProperty(exports, "progressTemplate", { enumerable: true, get: function () { return fast_foundation_1.progressTemplate; } });
|
|
44
|
+
Object.defineProperty(exports, "progressRingTemplate", { enumerable: true, get: function () { return fast_foundation_1.progressRingTemplate; } });
|
|
45
|
+
Object.defineProperty(exports, "PropertyStyleSheetBehavior", { enumerable: true, get: function () { return fast_foundation_1.PropertyStyleSheetBehavior; } });
|
|
46
|
+
Object.defineProperty(exports, "Registration", { enumerable: true, get: function () { return fast_foundation_1.Registration; } });
|
|
47
|
+
Object.defineProperty(exports, "radioTemplate", { enumerable: true, get: function () { return fast_foundation_1.radioTemplate; } });
|
|
48
|
+
Object.defineProperty(exports, "radioGroupTemplate", { enumerable: true, get: function () { return fast_foundation_1.radioGroupTemplate; } });
|
|
49
|
+
Object.defineProperty(exports, "selectTemplate", { enumerable: true, get: function () { return fast_foundation_1.selectTemplate; } });
|
|
50
|
+
Object.defineProperty(exports, "skeletonTemplate", { enumerable: true, get: function () { return fast_foundation_1.skeletonTemplate; } });
|
|
51
|
+
Object.defineProperty(exports, "sliderLabelTemplate", { enumerable: true, get: function () { return fast_foundation_1.sliderLabelTemplate; } });
|
|
52
|
+
Object.defineProperty(exports, "startSlotTemplate", { enumerable: true, get: function () { return fast_foundation_1.startSlotTemplate; } });
|
|
53
|
+
Object.defineProperty(exports, "switchTemplate", { enumerable: true, get: function () { return fast_foundation_1.switchTemplate; } });
|
|
54
|
+
Object.defineProperty(exports, "tabTemplate", { enumerable: true, get: function () { return fast_foundation_1.tabTemplate; } });
|
|
55
|
+
Object.defineProperty(exports, "tabPanelTemplate", { enumerable: true, get: function () { return fast_foundation_1.tabPanelTemplate; } });
|
|
56
|
+
Object.defineProperty(exports, "tabsTemplate", { enumerable: true, get: function () { return fast_foundation_1.tabsTemplate; } });
|
|
57
|
+
Object.defineProperty(exports, "TabsOrientation", { enumerable: true, get: function () { return fast_foundation_1.TabsOrientation; } });
|
|
58
|
+
Object.defineProperty(exports, "textAreaTemplate", { enumerable: true, get: function () { return fast_foundation_1.textAreaTemplate; } });
|
|
59
|
+
Object.defineProperty(exports, "toolbarTemplate", { enumerable: true, get: function () { return fast_foundation_1.toolbarTemplate; } });
|
|
60
|
+
Object.defineProperty(exports, "TooltipPosition", { enumerable: true, get: function () { return fast_foundation_1.TooltipPosition; } });
|
|
61
|
+
Object.defineProperty(exports, "tooltipTemplate", { enumerable: true, get: function () { return fast_foundation_1.tooltipTemplate; } });
|
|
62
|
+
Object.defineProperty(exports, "treeItemTemplate", { enumerable: true, get: function () { return fast_foundation_1.treeItemTemplate; } });
|
|
63
|
+
Object.defineProperty(exports, "treeViewTemplate", { enumerable: true, get: function () { return fast_foundation_1.treeViewTemplate; } });
|
|
64
|
+
Object.defineProperty(exports, "whitespaceFilter", { enumerable: true, get: function () { return fast_foundation_1.whitespaceFilter; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RouterConfiguration = exports.Router = exports.RouteCollection = exports.Route = exports.FASTRouter = exports.FASTElementLayout = exports.DefaultRouteRecognizer = void 0;
|
|
4
|
+
var fast_router_1 = require("@microsoft/fast-router");
|
|
5
|
+
Object.defineProperty(exports, "DefaultRouteRecognizer", { enumerable: true, get: function () { return fast_router_1.DefaultRouteRecognizer; } });
|
|
6
|
+
Object.defineProperty(exports, "FASTElementLayout", { enumerable: true, get: function () { return fast_router_1.FASTElementLayout; } });
|
|
7
|
+
Object.defineProperty(exports, "FASTRouter", { enumerable: true, get: function () { return fast_router_1.FASTRouter; } });
|
|
8
|
+
Object.defineProperty(exports, "Route", { enumerable: true, get: function () { return fast_router_1.Route; } });
|
|
9
|
+
Object.defineProperty(exports, "RouteCollection", { enumerable: true, get: function () { return fast_router_1.RouteCollection; } });
|
|
10
|
+
Object.defineProperty(exports, "Router", { enumerable: true, get: function () { return fast_router_1.Router; } });
|
|
11
|
+
Object.defineProperty(exports, "RouterConfiguration", { enumerable: true, get: function () { return fast_router_1.RouterConfiguration; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uniqueId = exports.SystemColors = exports.pascalCase = exports.Orientation = exports.limit = exports.Direction = exports.classNames = void 0;
|
|
4
|
+
var fast_web_utilities_1 = require("@microsoft/fast-web-utilities");
|
|
5
|
+
Object.defineProperty(exports, "classNames", { enumerable: true, get: function () { return fast_web_utilities_1.classNames; } });
|
|
6
|
+
Object.defineProperty(exports, "Direction", { enumerable: true, get: function () { return fast_web_utilities_1.Direction; } });
|
|
7
|
+
Object.defineProperty(exports, "limit", { enumerable: true, get: function () { return fast_web_utilities_1.limit; } });
|
|
8
|
+
Object.defineProperty(exports, "Orientation", { enumerable: true, get: function () { return fast_web_utilities_1.Orientation; } });
|
|
9
|
+
Object.defineProperty(exports, "pascalCase", { enumerable: true, get: function () { return fast_web_utilities_1.pascalCase; } });
|
|
10
|
+
Object.defineProperty(exports, "SystemColors", { enumerable: true, get: function () { return fast_web_utilities_1.SystemColors; } });
|
|
11
|
+
Object.defineProperty(exports, "uniqueId", { enumerable: true, get: function () { return fast_web_utilities_1.uniqueId; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./fast-colors"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./fast-components"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./fast-element"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./fast-foundation"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./fast-router"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./fast-web-utilities"), exports);
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sync = exports.defaultEventMap = void 0;
|
|
4
|
+
const fast_element_1 = require("@microsoft/fast-element");
|
|
5
|
+
/**
|
|
6
|
+
* A map that associates specific HTML element tags with their corresponding default event names.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
exports.defaultEventMap = new Map([
|
|
10
|
+
['FAST-TEXT-AREA', 'input'],
|
|
11
|
+
['FAST-TEXT-FIELD', 'input'],
|
|
12
|
+
['FOUNDATION-TEXT-AREA', 'input'],
|
|
13
|
+
['FOUNDATION-TEXT-FIELD', 'input'],
|
|
14
|
+
['INPUT', 'input'],
|
|
15
|
+
['ZERO-TEXT-FIELD', 'input'],
|
|
16
|
+
]);
|
|
17
|
+
function customUpdateTarget(value) {
|
|
18
|
+
if (this['keyAttr']) {
|
|
19
|
+
// FUI-389: set initial state based on keyAttr
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
this.target[this.targetName] = value;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function bind(source, context) {
|
|
26
|
+
if (this['keyAttr']) {
|
|
27
|
+
// overwrite internal update method called by originalBind
|
|
28
|
+
this.updateTarget = customUpdateTarget;
|
|
29
|
+
}
|
|
30
|
+
this.originalBind.call(this, source, context);
|
|
31
|
+
this.target.addEventListener(this.changeEvent, this.changeHandler);
|
|
32
|
+
}
|
|
33
|
+
function unbind() {
|
|
34
|
+
this.originalUnbind.call(this);
|
|
35
|
+
this.target.removeEventListener(this.changeEvent, this.changeHandler);
|
|
36
|
+
}
|
|
37
|
+
function determineChangeEvent(target, eventName) {
|
|
38
|
+
var _a;
|
|
39
|
+
const tag = target.tagName;
|
|
40
|
+
if (eventName === 'default') {
|
|
41
|
+
return (_a = exports.defaultEventMap.get(tag)) !== null && _a !== void 0 ? _a : 'change';
|
|
42
|
+
}
|
|
43
|
+
return eventName;
|
|
44
|
+
}
|
|
45
|
+
class SyncDirective extends fast_element_1.HTMLBindingDirective {
|
|
46
|
+
constructor(binding, convert, eventName, keyAttr) {
|
|
47
|
+
super(binding);
|
|
48
|
+
this.keyAttr = keyAttr;
|
|
49
|
+
this.conversionType = convert;
|
|
50
|
+
this.eventName = eventName;
|
|
51
|
+
}
|
|
52
|
+
createBehavior(target) {
|
|
53
|
+
const behavior = super.createBehavior(target);
|
|
54
|
+
behavior.originalBind = behavior.bind;
|
|
55
|
+
behavior.originalUnbind = behavior.unbind;
|
|
56
|
+
behavior.keyAttr = this.keyAttr;
|
|
57
|
+
behavior.bind = bind;
|
|
58
|
+
behavior.unbind = unbind;
|
|
59
|
+
behavior.changeEvent = determineChangeEvent(target, this.eventName);
|
|
60
|
+
behavior.changeHandler = () => {
|
|
61
|
+
// for checkbox, which is currently the only component converting to boolean, will have to change if boolean conversion is used anywhere else
|
|
62
|
+
const value = this.conversionType === 'boolean' ? behavior.target.checked : behavior.target.value;
|
|
63
|
+
if (this.keyAttr) {
|
|
64
|
+
const last = behavior.bindingObserver.last;
|
|
65
|
+
const key = behavior.target[this.keyAttr];
|
|
66
|
+
last.propertySource[last.propertyName][key] = this.convert(value);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
// Wait for an official setValue API
|
|
70
|
+
const last = behavior.bindingObserver.last;
|
|
71
|
+
last.propertySource[last.propertyName] = this.convert(value);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return behavior;
|
|
75
|
+
}
|
|
76
|
+
convert(value) {
|
|
77
|
+
if (value === undefined || value === null)
|
|
78
|
+
return value;
|
|
79
|
+
switch (this.conversionType) {
|
|
80
|
+
case 'time':
|
|
81
|
+
const msSinceEpoch = new Date(value).getTime();
|
|
82
|
+
return isNaN(msSinceEpoch) ? undefined : msSinceEpoch;
|
|
83
|
+
case 'number':
|
|
84
|
+
return value.length ? Number(value) : undefined; // Number('') returns 0
|
|
85
|
+
case 'string':
|
|
86
|
+
return String(value);
|
|
87
|
+
case 'boolean':
|
|
88
|
+
return Boolean(value);
|
|
89
|
+
default:
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Creates a synchronization directive that binds a data source to an HTML element,
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
function sync(binding, conversionType = 'string', eventName = 'default', keyAttr) {
|
|
99
|
+
return new SyncDirective(binding, conversionType, eventName, keyAttr);
|
|
100
|
+
}
|
|
101
|
+
exports.sync = sync;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.whenElse = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Directive that allows supplying an "else" template to the traditional {@link https://www.fast.design/docs/api/fast-element.when/#when-function} directive
|
|
6
|
+
*
|
|
7
|
+
* @param binding - The condition to test for rendering.
|
|
8
|
+
* @param trueTemplateOrTemplateBinding - The template or a binding that gets the template to render when the condition is true.
|
|
9
|
+
* @param falseTemplateOrTemplateBinding - The template or a binding that gets the template to render when the condition is false.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
function whenElse(binding, trueTemplateOrTemplateBinding, falseTemplateOrTemplateBinding) {
|
|
13
|
+
const getTemplate = (template) => typeof template === 'function' ? template : () => template;
|
|
14
|
+
const trueTemplate = getTemplate(trueTemplateOrTemplateBinding);
|
|
15
|
+
const falseTemplate = getTemplate(falseTemplateOrTemplateBinding);
|
|
16
|
+
return (source, context) => binding(source, context) ? trueTemplate(source, context) : falseTemplate(source, context);
|
|
17
|
+
}
|
|
18
|
+
exports.whenElse = whenElse;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./directives"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./FAST"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./patterns"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineFactory = void 0;
|
|
4
|
+
const fast_element_1 = require("@microsoft/fast-element");
|
|
5
|
+
const defaultDefinitionOverrider = (base) => (override) => (Object.assign(Object.assign({}, base), override));
|
|
6
|
+
/**
|
|
7
|
+
* Defines a platform custom element based on the provided type and definition.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* An example using custom definition merge logic, useful if you need to impose hard restrictions.
|
|
11
|
+
* ```ts
|
|
12
|
+
* const definitionOverrider = (definition) => ({
|
|
13
|
+
* ...baseDefinition,
|
|
14
|
+
* ...definition,
|
|
15
|
+
* styles: baseDefinition.styles,
|
|
16
|
+
* shadowOptions: {
|
|
17
|
+
* mode: 'closed,
|
|
18
|
+
* },
|
|
19
|
+
* });
|
|
20
|
+
* export const define = defineFactory(LoginForm, definitionOverrider);
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* You can provide the base definition if you're happy with the default spread operator merge logic.
|
|
25
|
+
* ```ts
|
|
26
|
+
* export const define = defineFactory(LoginForm, baseDefinition);
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @param Type - The custom element Type / Class to define.
|
|
30
|
+
* @param overriderOrBase - A function that merges definitions, or the base definition if custom merging is not needed.
|
|
31
|
+
* @returns The type class.
|
|
32
|
+
* @beta
|
|
33
|
+
*/
|
|
34
|
+
const defineFactory = (Type, overriderOrBase) => (definition) => {
|
|
35
|
+
const overrider = typeof overriderOrBase === 'function'
|
|
36
|
+
? overriderOrBase
|
|
37
|
+
: defaultDefinitionOverrider(overriderOrBase);
|
|
38
|
+
return fast_element_1.FASTElement.define(class extends Type {
|
|
39
|
+
}, overrider(definition));
|
|
40
|
+
};
|
|
41
|
+
exports.defineFactory = defineFactory;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tagFor = void 0;
|
|
4
|
+
const fast_element_1 = require("@microsoft/fast-element");
|
|
5
|
+
/**
|
|
6
|
+
* Determines what HTML tag name to use for the dependency.
|
|
7
|
+
* @param dependency - The dependency the template is dependent on.
|
|
8
|
+
* @returns The tag name to use in markup.
|
|
9
|
+
* @beta
|
|
10
|
+
*/
|
|
11
|
+
function tagFor(dependency) {
|
|
12
|
+
if (typeof dependency === 'string') {
|
|
13
|
+
return dependency;
|
|
14
|
+
}
|
|
15
|
+
if (typeof dependency === 'function') {
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
17
|
+
dependency = fast_element_1.FASTElementDefinition.forType(dependency); // < using forType instead of getByType for now...
|
|
18
|
+
if (!dependency) {
|
|
19
|
+
throw new Error('Missing FASTElement definition.');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return dependency.name;
|
|
23
|
+
}
|
|
24
|
+
exports.tagFor = tagFor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fast-colors.d.ts","sourceRoot":"","sources":["../../../src/FAST/fast-colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fast-components.d.ts","sourceRoot":"","sources":["../../../src/FAST/fast-components.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { attr, Behavior, Binding, BindingBehavior, BindingObserver, CaptureType, children, ComposableStyles, Constructable, css, CSSDirective, cssPartial, customElement, defaultExecutionContext, DOM, elements, ElementStyles, ExecutionContext, FASTElement, FASTElementDefinition, html, HTMLBindingDirective, HTMLView, nullableNumberConverter, Observable, observable, PartialFASTElementDefinition, ref, repeat, RepeatOptions, slotted, SyntheticViewTemplate, ValueConverter, ViewTemplate, volatile, when, } from '@microsoft/fast-element';
|
|
2
|
+
//# sourceMappingURL=fast-element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fast-element.d.ts","sourceRoot":"","sources":["../../../src/FAST/fast-element.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,eAAe,EACf,eAAe,EACf,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,GAAG,EACH,YAAY,EACZ,UAAU,EACV,aAAa,EACb,uBAAuB,EACvB,GAAG,EACH,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,qBAAqB,EACrB,IAAI,EACJ,oBAAoB,EACpB,QAAQ,EACR,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,4BAA4B,EAC5B,GAAG,EACH,MAAM,EACN,aAAa,EACb,OAAO,EACP,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,IAAI,GACL,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { AccordionItemOptions, accordionItemTemplate, accordionTemplate, anchorTemplate, anchoredRegionTemplate, avatarTemplate, badgeTemplate, breadcrumbItemTemplate, BreadcrumbItemOptions, breadcrumbTemplate, buttonTemplate, CalendarOptions, calendarTemplate, cardTemplate, CheckboxOptions, checkboxTemplate, ColumnDefinition, ComboboxOptions, composedParent, ComboboxAutocomplete, Container, CSSDesignToken, dataGridTemplate, dataGridCellTemplate, dataGridRowTemplate, DesignSystem, DesignSystemRegistrationContext, DesignToken, DesignTokenValue, DI, disclosureTemplate, display, dividerTemplate, ElementDefinitionContext, endSlotTemplate, FlipperOptions, flipperTemplate, FoundationElement, FoundationElementDefinition, FoundationElementTemplate, FoundationElementRegistry, forcedColorsStylesheetBehavior, FormAssociated, HorizontalScrollOptions, horizontalScrollTemplate, inject, Key, listboxTemplate, listboxOptionTemplate, menuTemplate, MenuItemOptions, menuItemTemplate, NumberFieldOptions, optional, ProgressOptions, progressTemplate, ProgressRingOptions, progressRingTemplate, PropertyStyleSheetBehavior, Registration, RadioOptions, radioTemplate, radioGroupTemplate, SelectOptions, selectTemplate, skeletonTemplate, sliderLabelTemplate, SliderOptions, startSlotTemplate, SwitchOptions, switchTemplate, tabTemplate, tabPanelTemplate, tabsTemplate, TabsOrientation, textAreaTemplate, TextFieldOptions, toolbarTemplate, TooltipPosition, tooltipTemplate, TreeItemOptions, treeItemTemplate, treeViewTemplate, whitespaceFilter, } from '@microsoft/fast-foundation';
|
|
2
|
+
//# sourceMappingURL=fast-foundation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fast-foundation.d.ts","sourceRoot":"","sources":["../../../src/FAST/fast-foundation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,+BAA+B,EAC/B,WAAW,EACX,gBAAgB,EAChB,EAAE,EACF,kBAAkB,EAClB,OAAO,EACP,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,8BAA8B,EAC9B,cAAc,EACd,uBAAuB,EACvB,wBAAwB,EACxB,MAAM,EACN,GAAG,EACH,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fast-router.d.ts","sourceRoot":"","sources":["../../../src/FAST/fast-router.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,uBAAuB,EACvB,eAAe,EACf,KAAK,EACL,eAAe,EACf,MAAM,EACN,mBAAmB,EACnB,aAAa,GACd,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fast-web-utilities.d.ts","sourceRoot":"","sources":["../../../src/FAST/fast-web-utilities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,QAAQ,GACT,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FAST/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/directives/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Binding, CaptureType } from '@microsoft/fast-element';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the possible types of value conversion for data synchronization.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type ConversionType = 'string' | 'number' | 'time' | 'boolean';
|
|
7
|
+
/**
|
|
8
|
+
* Represents the possible event names for data synchronization.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export type EventName = 'input' | 'change' | 'default';
|
|
12
|
+
/**
|
|
13
|
+
* A map that associates specific HTML element tags with their corresponding default event names.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare const defaultEventMap: Map<string, EventName>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a synchronization directive that binds a data source to an HTML element,
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare function sync<TSource = any, TReturn = any>(binding: Binding<TSource, TReturn>, conversionType?: ConversionType, eventName?: EventName, keyAttr?: string): CaptureType<TSource>;
|
|
22
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/directives/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAEtE;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAOjD,CAAC;AAiGH;;;GAGG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,EAC/C,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,EAClC,cAAc,GAAE,cAAyB,EACzC,SAAS,GAAE,SAAqB,EAChC,OAAO,CAAC,EAAE,MAAM,GACf,WAAW,CAAC,OAAO,CAAC,CAEtB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Binding, CaptureType, SyntheticViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
type WhenTemplate<TSource> = SyntheticViewTemplate | Binding<TSource, SyntheticViewTemplate>;
|
|
3
|
+
/**
|
|
4
|
+
* Directive that allows supplying an "else" template to the traditional {@link https://www.fast.design/docs/api/fast-element.when/#when-function} directive
|
|
5
|
+
*
|
|
6
|
+
* @param binding - The condition to test for rendering.
|
|
7
|
+
* @param trueTemplateOrTemplateBinding - The template or a binding that gets the template to render when the condition is true.
|
|
8
|
+
* @param falseTemplateOrTemplateBinding - The template or a binding that gets the template to render when the condition is false.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare function whenElse<TSource = any, TReturn = any>(binding: Binding<TSource, TReturn>, trueTemplateOrTemplateBinding: WhenTemplate<TSource>, falseTemplateOrTemplateBinding: WhenTemplate<TSource>): CaptureType<TSource>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=when-else.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"when-else.d.ts","sourceRoot":"","sources":["../../../src/directives/when-else.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,WAAW,EAEX,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,KAAK,YAAY,CAAC,OAAO,IAAI,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;AAE7F;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,OAAO,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,EACnD,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,EAClC,6BAA6B,EAAE,YAAY,CAAC,OAAO,CAAC,EACpD,8BAA8B,EAAE,YAAY,CAAC,OAAO,CAAC,GACpD,WAAW,CAAC,OAAO,CAAC,CAStB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Constructable, FASTElement, PartialFASTElementDefinition } from '@microsoft/fast-element';
|
|
2
|
+
/**
|
|
3
|
+
* @beta
|
|
4
|
+
*/
|
|
5
|
+
export type DefineFunction<TType> = (definition: PartialFASTElementDefinition) => TType;
|
|
6
|
+
/**
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export type DefinitionOverrider = (override: PartialFASTElementDefinition) => PartialFASTElementDefinition;
|
|
10
|
+
/**
|
|
11
|
+
* Defines a platform custom element based on the provided type and definition.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* An example using custom definition merge logic, useful if you need to impose hard restrictions.
|
|
15
|
+
* ```ts
|
|
16
|
+
* const definitionOverrider = (definition) => ({
|
|
17
|
+
* ...baseDefinition,
|
|
18
|
+
* ...definition,
|
|
19
|
+
* styles: baseDefinition.styles,
|
|
20
|
+
* shadowOptions: {
|
|
21
|
+
* mode: 'closed,
|
|
22
|
+
* },
|
|
23
|
+
* });
|
|
24
|
+
* export const define = defineFactory(LoginForm, definitionOverrider);
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* You can provide the base definition if you're happy with the default spread operator merge logic.
|
|
29
|
+
* ```ts
|
|
30
|
+
* export const define = defineFactory(LoginForm, baseDefinition);
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @param Type - The custom element Type / Class to define.
|
|
34
|
+
* @param overriderOrBase - A function that merges definitions, or the base definition if custom merging is not needed.
|
|
35
|
+
* @returns The type class.
|
|
36
|
+
* @beta
|
|
37
|
+
*/
|
|
38
|
+
export declare const defineFactory: <TType extends Constructable<FASTElement>>(Type: TType, overriderOrBase: DefinitionOverrider | PartialFASTElementDefinition) => DefineFunction<TType>;
|
|
39
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../../../src/patterns/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEnG;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,KAAK,IAAI,CAAC,UAAU,EAAE,4BAA4B,KAAK,KAAK,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,QAAQ,EAAE,4BAA4B,KACnC,4BAA4B,CAAC;AASlC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,aAAa,2EAGL,mBAAmB,GAAG,4BAA4B,0BAQpE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|