@microsoft/fast-html 1.0.0-alpha.21 → 1.0.0-alpha.23
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/dist/dts/components/schema.d.ts +12 -2
- package/dist/dts/components/template.d.ts +0 -1
- package/dist/dts/components/utilities.d.ts +11 -1
- package/dist/esm/components/schema.js +55 -20
- package/dist/esm/components/schema.spec.js +272 -44
- package/dist/esm/components/template.js +5 -6
- package/dist/esm/components/utilities.js +132 -11
- package/dist/esm/components/utilities.spec.js +29 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/fast-html.d.ts +17 -2
- package/dist/fast-html.untrimmed.d.ts +17 -2
- package/package.json +1 -1
package/dist/fast-html.d.ts
CHANGED
|
@@ -15,6 +15,13 @@ declare interface CachedPathCommon {
|
|
|
15
15
|
path: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
declare type CachedPathMap = Map<string, Map<string, JSONSchema>>;
|
|
19
|
+
|
|
20
|
+
declare interface ChildrenMap {
|
|
21
|
+
customElementName: string;
|
|
22
|
+
attributeName: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
18
25
|
declare interface DefaultCachedPath extends CachedPathCommon {
|
|
19
26
|
type: DefaultCachedPathType;
|
|
20
27
|
}
|
|
@@ -49,6 +56,7 @@ declare interface JSONSchemaCommon {
|
|
|
49
56
|
type?: string;
|
|
50
57
|
properties?: any;
|
|
51
58
|
items?: any;
|
|
59
|
+
anyOf?: Array<any>;
|
|
52
60
|
}
|
|
53
61
|
|
|
54
62
|
declare interface JSONSchemaDefinition extends JSONSchemaCommon {
|
|
@@ -87,6 +95,7 @@ declare type ObserverMapOption = "all";
|
|
|
87
95
|
declare interface RegisterPathConfig {
|
|
88
96
|
rootPropertyName: string;
|
|
89
97
|
pathConfig: CachedPath;
|
|
98
|
+
childrenMap: ChildrenMap | null;
|
|
90
99
|
}
|
|
91
100
|
|
|
92
101
|
/**
|
|
@@ -116,7 +125,7 @@ declare class Schema {
|
|
|
116
125
|
/**
|
|
117
126
|
* A JSON schema describing each root schema
|
|
118
127
|
*/
|
|
119
|
-
|
|
128
|
+
static jsonSchemaMap: CachedPathMap;
|
|
120
129
|
constructor(name: string);
|
|
121
130
|
/**
|
|
122
131
|
* Add a path to a schema
|
|
@@ -146,6 +155,13 @@ declare class Schema {
|
|
|
146
155
|
* @returns A string to use as a $ref
|
|
147
156
|
*/
|
|
148
157
|
private getDefsPath;
|
|
158
|
+
/**
|
|
159
|
+
* Get the schema $id
|
|
160
|
+
* @param customElementName - The custom element name
|
|
161
|
+
* @param propertyName - The property name
|
|
162
|
+
* @returns The ID that can be used in the JSON schema as $id
|
|
163
|
+
*/
|
|
164
|
+
private getSchemaId;
|
|
149
165
|
/**
|
|
150
166
|
* Add a new JSON schema to the JSON schema map
|
|
151
167
|
* @param propertyName The name of the property to assign this JSON schema to
|
|
@@ -203,7 +219,6 @@ export declare class TemplateElement extends FASTElement {
|
|
|
203
219
|
* A dictionary of custom element options
|
|
204
220
|
*/
|
|
205
221
|
static elementOptions: ElementOptionsDictionary;
|
|
206
|
-
private partials;
|
|
207
222
|
/**
|
|
208
223
|
* ObserverMap instance for caching binding paths
|
|
209
224
|
*/
|
|
@@ -15,6 +15,13 @@ declare interface CachedPathCommon {
|
|
|
15
15
|
path: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
declare type CachedPathMap = Map<string, Map<string, JSONSchema>>;
|
|
19
|
+
|
|
20
|
+
declare interface ChildrenMap {
|
|
21
|
+
customElementName: string;
|
|
22
|
+
attributeName: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
18
25
|
declare interface DefaultCachedPath extends CachedPathCommon {
|
|
19
26
|
type: DefaultCachedPathType;
|
|
20
27
|
}
|
|
@@ -49,6 +56,7 @@ declare interface JSONSchemaCommon {
|
|
|
49
56
|
type?: string;
|
|
50
57
|
properties?: any;
|
|
51
58
|
items?: any;
|
|
59
|
+
anyOf?: Array<any>;
|
|
52
60
|
}
|
|
53
61
|
|
|
54
62
|
declare interface JSONSchemaDefinition extends JSONSchemaCommon {
|
|
@@ -87,6 +95,7 @@ declare type ObserverMapOption = "all";
|
|
|
87
95
|
declare interface RegisterPathConfig {
|
|
88
96
|
rootPropertyName: string;
|
|
89
97
|
pathConfig: CachedPath;
|
|
98
|
+
childrenMap: ChildrenMap | null;
|
|
90
99
|
}
|
|
91
100
|
|
|
92
101
|
/**
|
|
@@ -116,7 +125,7 @@ declare class Schema {
|
|
|
116
125
|
/**
|
|
117
126
|
* A JSON schema describing each root schema
|
|
118
127
|
*/
|
|
119
|
-
|
|
128
|
+
static jsonSchemaMap: CachedPathMap;
|
|
120
129
|
constructor(name: string);
|
|
121
130
|
/**
|
|
122
131
|
* Add a path to a schema
|
|
@@ -146,6 +155,13 @@ declare class Schema {
|
|
|
146
155
|
* @returns A string to use as a $ref
|
|
147
156
|
*/
|
|
148
157
|
private getDefsPath;
|
|
158
|
+
/**
|
|
159
|
+
* Get the schema $id
|
|
160
|
+
* @param customElementName - The custom element name
|
|
161
|
+
* @param propertyName - The property name
|
|
162
|
+
* @returns The ID that can be used in the JSON schema as $id
|
|
163
|
+
*/
|
|
164
|
+
private getSchemaId;
|
|
149
165
|
/**
|
|
150
166
|
* Add a new JSON schema to the JSON schema map
|
|
151
167
|
* @param propertyName The name of the property to assign this JSON schema to
|
|
@@ -203,7 +219,6 @@ export declare class TemplateElement extends FASTElement {
|
|
|
203
219
|
* A dictionary of custom element options
|
|
204
220
|
*/
|
|
205
221
|
static elementOptions: ElementOptionsDictionary;
|
|
206
|
-
private partials;
|
|
207
222
|
/**
|
|
208
223
|
* ObserverMap instance for caching binding paths
|
|
209
224
|
*/
|