@es-joy/jsoe 0.31.0 → 0.32.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/CHANGES.md +4 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/search/fundamentalTypes/arraySearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/bigintSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/blobSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/booleanSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/catchSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/dateSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/domexceptionSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/enumSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/fileSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/filelistSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/functionSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/mapSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/numberSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/objectSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/promiseSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/regexpSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/setSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/stringSearchType.d.ts.map +1 -1
- package/dist/search/fundamentalTypes/symbolSearchType.d.ts.map +1 -1
- package/dist/search/index.d.ts +2 -0
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/searchDispatch.d.ts +11 -3
- package/dist/search/searchDispatch.d.ts.map +1 -1
- package/dist/search/searchElementUtils.d.ts +31 -1
- package/dist/search/searchElementUtils.d.ts.map +1 -1
- package/dist/search/searchUtils.d.ts +180 -0
- package/dist/search/searchUtils.d.ts.map +1 -1
- package/dist/search/subTypes/blobHTMLSearchType.d.ts.map +1 -1
- package/dist/search/subTypes/recordSearchType.d.ts.map +1 -1
- package/dist/search/subTypes/tupleSearchType.d.ts.map +1 -1
- package/dist/search/superTypes/SpecialRealNumberSearchType.d.ts.map +1 -1
- package/dist/search/superTypes/buffersourceSearchType.d.ts.map +1 -1
- package/dist/search/unions/unionFamilySearchType.d.ts.map +1 -1
- package/dist/utils/json6Stringify.d.ts +2 -0
- package/dist/utils/json6Stringify.d.ts.map +1 -0
- package/dist/utils/rawTypesonEditor.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/search/fundamentalTypes/arraySearchType.js +28 -5
- package/src/search/fundamentalTypes/bigintSearchType.js +14 -3
- package/src/search/fundamentalTypes/blobSearchType.js +21 -3
- package/src/search/fundamentalTypes/booleanSearchType.js +15 -3
- package/src/search/fundamentalTypes/catchSearchType.js +20 -3
- package/src/search/fundamentalTypes/dateSearchType.js +42 -3
- package/src/search/fundamentalTypes/domexceptionSearchType.js +18 -4
- package/src/search/fundamentalTypes/enumSearchType.js +15 -3
- package/src/search/fundamentalTypes/fileSearchType.js +15 -3
- package/src/search/fundamentalTypes/filelistSearchType.js +25 -5
- package/src/search/fundamentalTypes/functionSearchType.js +31 -4
- package/src/search/fundamentalTypes/mapSearchType.js +33 -5
- package/src/search/fundamentalTypes/numberSearchType.js +15 -3
- package/src/search/fundamentalTypes/objectSearchType.js +94 -5
- package/src/search/fundamentalTypes/promiseSearchType.js +20 -3
- package/src/search/fundamentalTypes/regexpSearchType.js +24 -4
- package/src/search/fundamentalTypes/setSearchType.js +25 -5
- package/src/search/fundamentalTypes/stringSearchType.js +25 -3
- package/src/search/fundamentalTypes/symbolSearchType.js +21 -3
- package/src/search/index.js +22 -0
- package/src/search/searchDispatch.js +14 -5
- package/src/search/searchElementUtils.js +98 -10
- package/src/search/searchUtils.js +368 -0
- package/src/search/subTypes/blobHTMLSearchType.js +43 -3
- package/src/search/subTypes/recordSearchType.js +30 -4
- package/src/search/subTypes/tupleSearchType.js +43 -5
- package/src/search/superTypes/SpecialRealNumberSearchType.js +15 -3
- package/src/search/superTypes/buffersourceSearchType.js +14 -3
- package/src/search/unions/unionFamilySearchType.js +45 -3
- package/src/utils/json6Stringify.js +50 -0
- package/src/utils/rawTypesonEditor.js +1 -51
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arraySearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/arraySearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"arraySearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/arraySearchType.js"],"names":[],"mappings":";+BAaa,OAAO,sBAAsB,EAAE,gBAAgB;AAa5D;;;;;;;;;;;;;;;;;GAiBG;AACH,+BAFU,gBAAgB,CA+ExB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigintSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/bigintSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"bigintSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/bigintSearchType.js"],"names":[],"mappings":";+BAQa,OAAO,sBAAsB,EAAE,gBAAgB;AAoB5D;;;;;GAKG;AACH,gCAFU,gBAAgB,CA4CxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blobSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/blobSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"blobSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/blobSearchType.js"],"names":[],"mappings":";+BAOa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;;;;;;;;;GAWG;AACH,8BAFU,gBAAgB,CAqCxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booleanSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/booleanSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"booleanSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/booleanSearchType.js"],"names":[],"mappings":";+BAOa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;GAGG;AACH,iCAFU,gBAAgB,CAqCxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catchSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/catchSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"catchSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/catchSearchType.js"],"names":[],"mappings":";+BASa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,+BAFU,gBAAgB,CAoDxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/dateSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"dateSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/dateSearchType.js"],"names":[],"mappings":";+BASa,OAAO,sBAAsB,EAAE,gBAAgB;AA6F5D;;;;;;;;;;GAUG;AACH,8BAFU,gBAAgB,CA2FxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domexceptionSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/domexceptionSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"domexceptionSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/domexceptionSearchType.js"],"names":[],"mappings":";+BAYa,OAAO,sBAAsB,EAAE,gBAAgB;AAa5D;;;;;;;;;;;GAWG;AACH,sCAFU,gBAAgB,CA4DxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/enumSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"enumSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/enumSearchType.js"],"names":[],"mappings":";+BAOa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAFU,gBAAgB,CA4CxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/fileSearchType.js"],"names":[],"mappings":";+BAUa,OAAO,sBAAsB,EAAE,gBAAgB;AAa5D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,8BAFU,gBAAgB,
|
|
1
|
+
{"version":3,"file":"fileSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/fileSearchType.js"],"names":[],"mappings":";+BAUa,OAAO,sBAAsB,EAAE,gBAAgB;AAa5D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,8BAFU,gBAAgB,CA0DxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filelistSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/filelistSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"filelistSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/filelistSearchType.js"],"names":[],"mappings":";+BAaa,OAAO,sBAAsB,EAAE,gBAAgB;mCAI/C;IACR,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,yBAAyB,EAAE,WAAW,CAAC;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAaJ;;;;;;;;;;;;;GAaG;AACH,kCAFU,gBAAgB,CAyExB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functionSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/functionSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"functionSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/functionSearchType.js"],"names":[],"mappings":";+BAYa,OAAO,sBAAsB,EAAE,gBAAgB;AAa5D;;;;;;;;;;;;;GAaG;AACH,kCAFU,gBAAgB,CAyFxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/mapSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"mapSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/mapSearchType.js"],"names":[],"mappings":";+BAca,OAAO,sBAAsB,EAAE,gBAAgB;AAc5D;;;;;;;;;;;;;;;;;GAiBG;AACH,6BAFU,gBAAgB,CAkGxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/numberSearchType.js"],"names":[],"mappings":";+BAQa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;GAGG;AACH,gCAFU,gBAAgB,
|
|
1
|
+
{"version":3,"file":"numberSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/numberSearchType.js"],"names":[],"mappings":";+BAQa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;GAGG;AACH,gCAFU,gBAAgB,CAuDxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/objectSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"objectSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/objectSearchType.js"],"names":[],"mappings":";+BAgBa,OAAO,sBAAsB,EAAE,gBAAgB;AA8O5D;;;;;;;;;;;;;;;;GAgBG;AACH,gCAFU,gBAAgB,CAwLxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promiseSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/promiseSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"promiseSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/promiseSearchType.js"],"names":[],"mappings":";+BASa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;;;;;;;;;;GAYG;AACH,iCAFU,gBAAgB,CAoDxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regexpSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/regexpSearchType.js"],"names":[],"mappings":";+BASa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;;;;;;;;;;GAYG;AACH,gCAFU,gBAAgB,
|
|
1
|
+
{"version":3,"file":"regexpSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/regexpSearchType.js"],"names":[],"mappings":";+BASa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;;;;;;;;;;GAYG;AACH,gCAFU,gBAAgB,CAkExB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/setSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"setSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/setSearchType.js"],"names":[],"mappings":";+BAaa,OAAO,sBAAsB,EAAE,gBAAgB;AAa5D;;;;;;;;;;GAUG;AACH,6BAFU,gBAAgB,CAyExB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/stringSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"stringSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/stringSearchType.js"],"names":[],"mappings":";+BAOa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;;;;;;;;;;;GAaG;AACH,gCAFU,gBAAgB,CAyCxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbolSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/symbolSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"symbolSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/fundamentalTypes/symbolSearchType.js"],"names":[],"mappings":";+BAOa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;;;;;;GAQG;AACH,gCAFU,gBAAgB,CAqCxB"}
|
package/dist/search/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @typedef {{
|
|
3
3
|
* container: HTMLFormElement,
|
|
4
4
|
* $getQuery: () => import('./queryTree.js').QueryAnd,
|
|
5
|
+
* $applyQuery: (queryDoc: import('./queryTree.js').QueryAnd) => void,
|
|
5
6
|
* whenReady: Promise<void>
|
|
6
7
|
* }} SearchChoicesControl
|
|
7
8
|
*/
|
|
@@ -65,6 +66,7 @@ export function buildSearchChoices({ schemaContent, typeNamespace, topRoot, type
|
|
|
65
66
|
export type SearchChoicesControl = {
|
|
66
67
|
container: HTMLFormElement;
|
|
67
68
|
$getQuery: () => import("./queryTree.js").QueryAnd;
|
|
69
|
+
$applyQuery: (queryDoc: import("./queryTree.js").QueryAnd) => void;
|
|
68
70
|
whenReady: Promise<void>;
|
|
69
71
|
};
|
|
70
72
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/search/index.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/search/index.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,qFARW;IACN,aAAa,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAC;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,aAAa,EAAE,WAAW,CAAC;IAC5C,KAAK,CAAC,EAAE,OAAO,aAAa,EAAE,OAAO,CAAA;CACtC,GACS,oBAAoB,CAwDhC;mCAjHY;IACR,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,EAAE,MAAM,OAAO,gBAAgB,EAAE,QAAQ,CAAC;IACnD,WAAW,EAAE,CAAC,QAAQ,EAAE,OAAO,gBAAgB,EAAE,QAAQ,KAAK,IAAI,CAAC;IACnE,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB"}
|
|
@@ -59,9 +59,12 @@ export function buildSearchWidget({ schemaObject, path, typeNamespace, topRoot,
|
|
|
59
59
|
}): import("../types.js").JamilihArray;
|
|
60
60
|
export type QueryNode = import("./queryTree.js").QueryNode;
|
|
61
61
|
/**
|
|
62
|
-
* The search-side analogue of `TypeObject` (`src/types.js:308-408`):
|
|
63
|
-
* methods, `buildUI` (a `jml` array)
|
|
64
|
-
*
|
|
62
|
+
* The search-side analogue of `TypeObject` (`src/types.js:308-408`): three
|
|
63
|
+
* methods, `buildUI` (a `jml` array), `getQuery` (reads the built DOM back
|
|
64
|
+
* into a `QueryNode`, or `undefined` when no constraint was entered), and
|
|
65
|
+
* `applyQuery` (the inverse - drives the built DOM back into the state a
|
|
66
|
+
* previously-read, or hand-edited, `QueryNode` describes, for the "Edit raw"
|
|
67
|
+
* round-trip, `SearchChoicesControl.$applyQuery`, `src/search/index.js`).
|
|
65
68
|
*/
|
|
66
69
|
export type SearchTypeObject = {
|
|
67
70
|
buildUI: (cfg: {
|
|
@@ -76,6 +79,11 @@ export type SearchTypeObject = {
|
|
|
76
79
|
root: HTMLElement;
|
|
77
80
|
path: string;
|
|
78
81
|
}) => QueryNode | undefined;
|
|
82
|
+
applyQuery: (cfg: {
|
|
83
|
+
root: HTMLElement;
|
|
84
|
+
path: string;
|
|
85
|
+
queryNode: QueryNode | undefined;
|
|
86
|
+
}) => void;
|
|
79
87
|
};
|
|
80
88
|
/**
|
|
81
89
|
* `Record<string, SearchTypeObject>` registry, analogous to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchDispatch.d.ts","sourceRoot":"","sources":["../../src/search/searchDispatch.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"searchDispatch.d.ts","sourceRoot":"","sources":["../../src/search/searchDispatch.js"],"names":[],"mappings":"AA8KA;;;;;;;;;;;;;;;;;GAiBG;AACH,kDAHW,OAAO,sBAAsB,EAAE,WAAW,GACxC,MAAM,CA+BlB;AAED;;;;;;;;;GASG;AACH,kDAHW,OAAO,sBAAsB,EAAE,WAAW,GACxC,gBAAgB,CAK5B;AA2BD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,uGAVW;IACN,YAAY,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAC;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,aAAa,EAAE,WAAW,CAAC;IAC5C,KAAK,CAAC,EAAE,OAAO,aAAa,EAAE,OAAO,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAA;CAC1D,GACS,OAAO,aAAa,EAAE,YAAY,CAe9C;wBAlQY,OAAO,gBAAgB,EAAE,SAAS;;;;;;;;;+BAUlC;IACR,OAAO,EAAE,CAAC,GAAG,EAAE;QACb,YAAY,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAC;QACzD,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,OAAO,CAAC,EAAE,OAAO,aAAa,EAAE,WAAW,CAAC;QAC5C,KAAK,CAAC,EAAE,OAAO,aAAa,EAAE,OAAO,CAAC;QACtC,YAAY,CAAC,EAAE,OAAO,sBAAsB,EAAE,WAAW,CAAA;KAC1D,KAAK,OAAO,aAAa,EAAE,YAAY,CAAC;IACzC,QAAQ,EAAE,CAAC,GAAG,EAAE;QACd,IAAI,EAAE,WAAW,CAAC;QAClB,IAAI,EAAE,MAAM,CAAA;KACb,KAAK,SAAS,GAAC,SAAS,CAAC;IAC1B,UAAU,EAAE,CAAC,GAAG,EAAE;QAChB,IAAI,EAAE,WAAW,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,SAAS,GAAC,SAAS,CAAA;KAC/B,KAAK,IAAI,CAAA;CACX;AA0BJ;;;;;;;;;;;;;;;;;GAiBG;AACH,mCAFU;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAAC,CA+DzC;AAtFF;;;;GAIG;AACH,oCAFU,gBAAgB,CAEkC;AAmJ5D;;;;;;;;;;;;GAYG;AACH,kDAJW,OAAO,sBAAsB,EAAE,WAAW,gBAC1C,OAAO,sBAAsB,EAAE,WAAW,GACxC,OAAO,sBAAsB,EAAE,WAAW,CAYtD"}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
export function findSearchElement(root: ParentNode, path: string): HTMLElement | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {HTMLElement & {
|
|
14
|
-
* getQuery: () => import('./queryTree.js').QueryNode|undefined
|
|
14
|
+
* getQuery: () => import('./queryTree.js').QueryNode|undefined,
|
|
15
|
+
* applyQuery?: (queryNode: import('./queryTree.js').QueryNode|undefined) => void
|
|
15
16
|
* }} SearchElement
|
|
16
17
|
*/
|
|
17
18
|
/**
|
|
@@ -25,6 +26,22 @@ export function getQueryViaElement({ root, path }: {
|
|
|
25
26
|
root: HTMLElement;
|
|
26
27
|
path: string;
|
|
27
28
|
}): import("./queryTree.js").QueryNode | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The `SearchTypeObject.applyQuery` every module implements identically -
|
|
31
|
+
* the "Edit raw" round-trip's counterpart to `getQueryViaElement`: locate
|
|
32
|
+
* the element built under `root` and delegate to its own `applyQuery(...)`
|
|
33
|
+
* method.
|
|
34
|
+
* @param {{
|
|
35
|
+
* root: HTMLElement, path: string,
|
|
36
|
+
* queryNode: import('./queryTree.js').QueryNode|undefined
|
|
37
|
+
* }} cfg
|
|
38
|
+
* @returns {void}
|
|
39
|
+
*/
|
|
40
|
+
export function applyQueryViaElement({ root, path, queryNode }: {
|
|
41
|
+
root: HTMLElement;
|
|
42
|
+
path: string;
|
|
43
|
+
queryNode: import("./queryTree.js").QueryNode | undefined;
|
|
44
|
+
}): void;
|
|
28
45
|
/**
|
|
29
46
|
* Type-predicate guard distinguishing a built search element (leaf or
|
|
30
47
|
* container, either answers to `.getQuery()`) from a plain DOM node - used
|
|
@@ -36,6 +53,18 @@ export function getQueryViaElement({ root, path }: {
|
|
|
36
53
|
* @returns {el is SearchElement}
|
|
37
54
|
*/
|
|
38
55
|
export function hasGetQuery(el: Element): el is SearchElement;
|
|
56
|
+
/**
|
|
57
|
+
* Same as `hasGetQuery`, for `applyQuery` - a container walking its own
|
|
58
|
+
* children to recurse an "Edit raw" apply into each needs to know which
|
|
59
|
+
* ones answer to it, same reasoning as `hasGetQuery`'s own doc.
|
|
60
|
+
* @param {Element} el
|
|
61
|
+
* @returns {el is SearchElement & {applyQuery: (
|
|
62
|
+
* queryNode: import('./queryTree.js').QueryNode|undefined
|
|
63
|
+
* ) => void}}
|
|
64
|
+
*/
|
|
65
|
+
export function hasApplyQuery(el: Element): el is SearchElement & {
|
|
66
|
+
applyQuery: (queryNode: import("./queryTree.js").QueryNode | undefined) => void;
|
|
67
|
+
};
|
|
39
68
|
/**
|
|
40
69
|
* Factory for the README's "no variants to allow for distinct search"
|
|
41
70
|
* leaves (`undefined`/`void`, `null`, `NaN`): the only meaningful question
|
|
@@ -102,5 +131,6 @@ export function makeDomShapeSearchType({ tagName, dimensionKeys, includeReadonly
|
|
|
102
131
|
}): import("./searchDispatch.js").SearchTypeObject;
|
|
103
132
|
export type SearchElement = HTMLElement & {
|
|
104
133
|
getQuery: () => import("./queryTree.js").QueryNode | undefined;
|
|
134
|
+
applyQuery?: (queryNode: import("./queryTree.js").QueryNode | undefined) => void;
|
|
105
135
|
};
|
|
106
136
|
//# sourceMappingURL=searchElementUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchElementUtils.d.ts","sourceRoot":"","sources":["../../src/search/searchElementUtils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"searchElementUtils.d.ts","sourceRoot":"","sources":["../../src/search/searchElementUtils.js"],"names":[],"mappings":"AAaA;;;;;;;;;GASG;AACH,wCAJW,UAAU,QACV,MAAM,GACJ,WAAW,GAAC,SAAS,CAMjC;AAED;;;;;GAKG;AAEH;;;;;;GAMG;AACH,mDAHW;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAC/B,OAAO,gBAAgB,EAAE,SAAS,GAAC,SAAS,CAOxD;AAED;;;;;;;;;;GAUG;AACH,gEANW;IACN,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,OAAO,gBAAgB,EAAE,SAAS,GAAC,SAAS,CAAA;CACxD,GACS,IAAI,CAOhB;AAED;;;;;;;;;GASG;AACH,gCAHW,OAAO,GACL,EAAE,IAAI,aAAa,CAK/B;AAED;;;;;;;;GAQG;AACH,kCALW,OAAO,GACL,EAAE,IAAI,aAAa,GAAG;IAAC,UAAU,EAAE,CAC3C,SAAS,EAAE,OAAO,gBAAgB,EAAE,SAAS,GAAC,SAAS,KACpD,IAAI,CAAA;CAAC,CAKZ;AAED;;;;;;;;;;;;;GAaG;AACH,wDAHW;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GACf,OAAO,qBAAqB,EAAE,gBAAgB,CAgC1D;AAsDD;;;;;;;;;;;;;;;;;GAiBG;AACH,uDAHW;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GACf,OAAO,qBAAqB,EAAE,gBAAgB,CA+D1D;AAyDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2GARW;IACN,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,GACS,OAAO,qBAAqB,EAAE,gBAAgB,CA+G1D;4BA9aY,WAAW,GAAG;IACtB,QAAQ,EAAE,MAAM,OAAO,gBAAgB,EAAE,SAAS,GAAC,SAAS,CAAC;IAC7D,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,gBAAgB,EAAE,SAAS,GAAC,SAAS,KAAK,IAAI,CAAA;CAC/E"}
|
|
@@ -553,5 +553,185 @@ export function resyncAtLeastOne(root: Element): void;
|
|
|
553
553
|
* @returns {void}
|
|
554
554
|
*/
|
|
555
555
|
export function setDescendantsRequired(root: Element, required: boolean): void;
|
|
556
|
+
/**
|
|
557
|
+
* @typedef {import('./queryTree.js').QueryNode} QueryNode
|
|
558
|
+
*/
|
|
559
|
+
/**
|
|
560
|
+
* The "Edit raw" round-trip (`SearchChoicesControl.$applyQuery`,
|
|
561
|
+
* `src/search/index.js`) needs the inverse of every `getQuery`: given a
|
|
562
|
+
* previously-serialized (or hand-edited) `QueryNode`, drive the same DOM
|
|
563
|
+
* controls `getQuery` reads back into that state, so the two stay in sync.
|
|
564
|
+
* `unwrapAndClauses`/`nodeTouchesPath`/`extractLeafOfKind`/
|
|
565
|
+
* `extractClauseForPath` below are the shared groundwork every
|
|
566
|
+
* `applyQuery` implementation builds on to undo `combineAnd`'s own
|
|
567
|
+
* flattening; the `apply*` functions below those are the direct inverse of
|
|
568
|
+
* one `build*`/`read*` pair each.
|
|
569
|
+
*
|
|
570
|
+
* A plain leaf becomes a one-element array; `undefined` (no constraint)
|
|
571
|
+
* becomes `[]`; an `$and` node's own `.$and` array is returned as-is (not
|
|
572
|
+
* further flattened - a nested `$and` stays a single clause, so
|
|
573
|
+
* `nodeTouchesPath` below is what actually looks inside one).
|
|
574
|
+
* @param {QueryNode|undefined} queryNode
|
|
575
|
+
* @returns {QueryNode[]}
|
|
576
|
+
*/
|
|
577
|
+
export function unwrapAndClauses(queryNode: QueryNode | undefined): QueryNode[];
|
|
578
|
+
/**
|
|
579
|
+
* Whether any leaf reachable from `node` (recursing through `$and`/`$or`
|
|
580
|
+
* combinators and a `not`/`passThrough` leaf's own wrapped `query`) targets
|
|
581
|
+
* `path` itself or somewhere nested under it - used to decide which of a
|
|
582
|
+
* container widget's several recursed children (`tupleSearchType.js`'s
|
|
583
|
+
* positions/rest, `functionSearchType.js`'s args/output,
|
|
584
|
+
* `objectSearchType.js`'s properties, `unionFamilySearchType.js`'s chosen
|
|
585
|
+
* branch) a given top-level clause belongs to, since a recursed child's own
|
|
586
|
+
* `getQuery()` result is threaded through untouched (whatever shape it is)
|
|
587
|
+
* rather than re-wrapped with the parent's path.
|
|
588
|
+
* @param {QueryNode|undefined} node
|
|
589
|
+
* @param {string} path
|
|
590
|
+
* @returns {boolean}
|
|
591
|
+
*/
|
|
592
|
+
export function nodeTouchesPath(node: QueryNode | undefined, path: string): boolean;
|
|
593
|
+
/**
|
|
594
|
+
* Pulls the (at most one) top-level clause of `queryNode` whose own `kind`
|
|
595
|
+
* matches out of the `$and` it's combined into, leaving the rest re-combined
|
|
596
|
+
* - the inverse half of `combineAnd([ownLeaf, ...])`. Safe to use for any
|
|
597
|
+
* facet whose own leaf kind is unique within its widget (every `kind` this
|
|
598
|
+
* module's callers pass is exactly that: `lengthSize`, `hasProperty`,
|
|
599
|
+
* `mapRecordJoint`, `typeOf`), since a recursed child's own (arbitrarily
|
|
600
|
+
* nested) contribution never surfaces as a *bare* top-level leaf sharing the
|
|
601
|
+
* parent's own facet kind.
|
|
602
|
+
* `kind`'s own type parameter narrows `matched`'s type to exactly the leaf
|
|
603
|
+
* shape that `kind` names (`Extract<QueryLeaf, {kind: K}>`), so a call like
|
|
604
|
+
* `extractLeafOfKind(queryNode, 'range')` gives back a properly-typed
|
|
605
|
+
* `QueryRangeLeaf|undefined` with no cast needed at the call site.
|
|
606
|
+
* @template {import('./queryTree.js').QueryLeaf['kind']} K
|
|
607
|
+
* @param {QueryNode|undefined} queryNode
|
|
608
|
+
* @param {K} kind
|
|
609
|
+
* @returns {{
|
|
610
|
+
* matched: Extract<import('./queryTree.js').QueryLeaf, {kind: K}>|undefined,
|
|
611
|
+
* rest: QueryNode|undefined
|
|
612
|
+
* }}
|
|
613
|
+
*/
|
|
614
|
+
export function extractLeafOfKind<K extends import("./queryTree.js").QueryLeaf["kind"]>(queryNode: QueryNode | undefined, kind: K): {
|
|
615
|
+
matched: Extract<import("./queryTree.js").QueryLeaf, {
|
|
616
|
+
kind: K;
|
|
617
|
+
}> | undefined;
|
|
618
|
+
rest: QueryNode | undefined;
|
|
619
|
+
};
|
|
620
|
+
/**
|
|
621
|
+
* Pulls the (at most one) top-level clause of `queryNode` that
|
|
622
|
+
* `nodeTouchesPath` says belongs to `path` out of the `$and` it's combined
|
|
623
|
+
* into, leaving the rest re-combined - the path-based counterpart of
|
|
624
|
+
* `extractLeafOfKind`, for a recursed child's own contribution (whose shape
|
|
625
|
+
* isn't a single known leaf `kind`, unlike a container's own facets).
|
|
626
|
+
* @param {QueryNode|undefined} queryNode
|
|
627
|
+
* @param {string} path
|
|
628
|
+
* @returns {{matched: QueryNode|undefined, rest: QueryNode|undefined}}
|
|
629
|
+
*/
|
|
630
|
+
export function extractClauseForPath(queryNode: QueryNode | undefined, path: string): {
|
|
631
|
+
matched: QueryNode | undefined;
|
|
632
|
+
rest: QueryNode | undefined;
|
|
633
|
+
};
|
|
634
|
+
/**
|
|
635
|
+
* The inverse of `readLiteralRegexQuery` - sets `buildLiteralRegexControls`'s
|
|
636
|
+
* Mode/Value/Flags back from a previously-read leaf (or resets to defaults
|
|
637
|
+
* for `undefined`, meaning the facet no longer has a constraint at all).
|
|
638
|
+
* Dispatches `change` on the Mode select (so its own `handleModeChange`
|
|
639
|
+
* shows/hides the Flags control and re-validates) and `input` on the Value
|
|
640
|
+
* input (so `syncLiteralRegexValidity` re-runs), the same events a real user
|
|
641
|
+
* interacting with these controls would fire.
|
|
642
|
+
* @param {Element} el
|
|
643
|
+
* @param {import('./queryTree.js').QueryLiteralSetLeaf|
|
|
644
|
+
* import('./queryTree.js').QueryRegexLeaf|
|
|
645
|
+
* import('./queryTree.js').QueryNotContainsLeaf|undefined} leaf
|
|
646
|
+
* @param {string} [key]
|
|
647
|
+
* @returns {void}
|
|
648
|
+
*/
|
|
649
|
+
export function applyLiteralRegexQuery(el: Element, leaf: import("./queryTree.js").QueryLiteralSetLeaf | import("./queryTree.js").QueryRegexLeaf | import("./queryTree.js").QueryNotContainsLeaf | undefined, key?: string): void;
|
|
650
|
+
/**
|
|
651
|
+
* The inverse of `readRangeInputsPair` - sets the From/To inputs back from a
|
|
652
|
+
* previously-read `range` leaf (or clears both for `undefined`). An
|
|
653
|
+
* exclusive `$gt`/`$lt` bound (never produced by any `getQuery` in this
|
|
654
|
+
* codebase, but tolerated on a hand-edited raw query) is treated the same as
|
|
655
|
+
* its inclusive `$gte`/`$lte` counterpart, since the UI has only one plain
|
|
656
|
+
* bound per side, not a separate inclusive/exclusive toggle.
|
|
657
|
+
* @param {Element} el
|
|
658
|
+
* @param {import('./queryTree.js').QueryRangeLeaf|undefined} leaf
|
|
659
|
+
* @param {string} [key]
|
|
660
|
+
* @returns {void}
|
|
661
|
+
*/
|
|
662
|
+
export function applyRangeQuery(el: Element, leaf: import("./queryTree.js").QueryRangeLeaf | undefined, key?: string): void;
|
|
663
|
+
/**
|
|
664
|
+
* The inverse of `readTriStateSelect`/`buildHasPropertyToggle` - `undefined`
|
|
665
|
+
* maps back to "(any)".
|
|
666
|
+
* @param {Element} el
|
|
667
|
+
* @param {boolean|undefined} value
|
|
668
|
+
* @param {string} [key]
|
|
669
|
+
* @returns {void}
|
|
670
|
+
*/
|
|
671
|
+
export function applyTriState(el: Element, value: boolean | undefined, key?: string): void;
|
|
672
|
+
/**
|
|
673
|
+
* The inverse of `readCheckbox`.
|
|
674
|
+
* @param {Element} el
|
|
675
|
+
* @param {boolean} checked
|
|
676
|
+
* @returns {void}
|
|
677
|
+
*/
|
|
678
|
+
export function applyCheckbox(el: Element, checked: boolean): void;
|
|
679
|
+
/**
|
|
680
|
+
* The inverse of `readMultiSelect` - `values` is compared against each
|
|
681
|
+
* `<option>`'s own `value` as a string (`String(item)`), matching how
|
|
682
|
+
* `enumSearchType.js`/`SpecialRealNumberSearchType.js` build their own
|
|
683
|
+
* options from stringified values.
|
|
684
|
+
* @param {Element} el
|
|
685
|
+
* @param {unknown[]} values
|
|
686
|
+
* @returns {void}
|
|
687
|
+
*/
|
|
688
|
+
export function applyMultiSelect(el: Element, values: unknown[]): void;
|
|
689
|
+
/**
|
|
690
|
+
* The inverse of `readLengthSizeQuery` - clears both the size input and the
|
|
691
|
+
* sparse tri-state for `undefined`.
|
|
692
|
+
* @param {Element} el
|
|
693
|
+
* @param {import('./queryTree.js').QueryLengthSizeLeaf|undefined} leaf
|
|
694
|
+
* @returns {void}
|
|
695
|
+
*/
|
|
696
|
+
export function applyLengthSizeQuery(el: Element, leaf: import("./queryTree.js").QueryLengthSizeLeaf | undefined): void;
|
|
697
|
+
/**
|
|
698
|
+
* The inverse of `readOptInChecked` - also dispatches `change` so
|
|
699
|
+
* `wireOptInFieldset`'s own listener toggles the paired fieldset's
|
|
700
|
+
* `disabled` state and runs whatever `onToggle` it was wired with (e.g. a
|
|
701
|
+
* widget's own `syncAtLeastOneCheck` re-run).
|
|
702
|
+
* @param {Element} el
|
|
703
|
+
* @param {boolean} checked
|
|
704
|
+
* @param {string} [key]
|
|
705
|
+
* @returns {void}
|
|
706
|
+
*/
|
|
707
|
+
export function applyOptIn(el: Element, checked: boolean, key?: string): void;
|
|
708
|
+
/**
|
|
709
|
+
* A `buildOptInFieldset`-wrapped `buildLiteralRegexControls` facet
|
|
710
|
+
* (`fileSearchType.js`'s name/content-type, `domexceptionSearchType.js`'s
|
|
711
|
+
* message, `makeErrorFamilySearchType`'s string properties): opts the facet
|
|
712
|
+
* in exactly when `queryNode` has a clause touching `path`, and applies that
|
|
713
|
+
* clause (a bare literal/regex/does-not-contain leaf, since none of these
|
|
714
|
+
* facets recurse any deeper) to its Mode/Value/Flags controls.
|
|
715
|
+
* @param {Element} root
|
|
716
|
+
* @param {QueryNode|undefined} queryNode
|
|
717
|
+
* @param {string} path
|
|
718
|
+
* @param {string} [key]
|
|
719
|
+
* @returns {void}
|
|
720
|
+
*/
|
|
721
|
+
export function applyOptInLiteralRegexFacet(root: Element, queryNode: QueryNode | undefined, path: string, key?: string): void;
|
|
722
|
+
/**
|
|
723
|
+
* A `buildOptInFieldset`-wrapped `buildRangeInputsPair` facet
|
|
724
|
+
* (`makeErrorFamilySearchType`'s number properties,
|
|
725
|
+
* `makeDomShapeSearchType`'s dimensions): opts the facet in exactly when
|
|
726
|
+
* `queryNode` has a clause touching `path`, and applies that clause (a bare
|
|
727
|
+
* `range` leaf) to its From/To controls.
|
|
728
|
+
* @param {Element} root
|
|
729
|
+
* @param {QueryNode|undefined} queryNode
|
|
730
|
+
* @param {string} path
|
|
731
|
+
* @param {string} [key]
|
|
732
|
+
* @returns {void}
|
|
733
|
+
*/
|
|
734
|
+
export function applyOptInRangeFacet(root: Element, queryNode: QueryNode | undefined, path: string, key?: string): void;
|
|
556
735
|
export type JamilihArray = import("../types.js").JamilihArray;
|
|
736
|
+
export type QueryNode = import("./queryTree.js").QueryNode;
|
|
557
737
|
//# sourceMappingURL=searchUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchUtils.d.ts","sourceRoot":"","sources":["../../src/search/searchUtils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"searchUtils.d.ts","sourceRoot":"","sources":["../../src/search/searchUtils.js"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;;;;;GASG;AACH,6CAJW,OAAO,sBAAsB,EAAE,WAAW,GAAC,SAAS,QACpD,MAAM,GACJ,MAAM,CASlB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qCAJW,OAAO,YACP,MAAM,GACJ,WAAW,GAAC,SAAS,CAMjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,oDAHW,OAAO,GACL,OAAO,CAcnB;AAED;;;;;;;;;;;GAWG;AACH,4CAHW,OAAO,GACL,IAAI,CAOhB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wCAJW,OAAO,QACP,MAAM,GACJ,IAAI,CAyBhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,0EAVW;IACN,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,GAAC,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,GAAC,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,GAAC,MAAM,CAAA;CACrB,GACS,YAAY,EAAE,CAmC1B;AAED;;;;;;GAMG;AACH,wCAJW,WAAW,QACX,MAAM,GACJ;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,CAUtC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,8DAPW;IACN,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,C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G;AACH,yCAJW,OAAO,QACP,OAAO,gBAAgB,EAAE,mBAAmB,GAAC,SAAS,GACpD,IAAI,CAWhB;AAED;;;;;;;;;GASG;AACH,+BALW,OAAO,WACP,OAAO,QACP,MAAM,GACJ,IAAI,CAWhB;AAED;;;;;;;;;;;;GAYG;AACH,kDANW,OAAO,aACP,SAAS,GAAC,SAAS,QACnB,MAAM,QACN,MAAM,GACJ,IAAI,CAahB;AAED;;;;;;;;;;;GAWG;AACH,2CANW,OAAO,aACP,SAAS,GAAC,SAAS,QACnB,MAAM,QACN,MAAM,GACJ,IAAI,CAQhB;2BArvCY,OAAO,aAAa,EAAE,YAAY;wBAy4BlC,OAAO,gBAAgB,EAAE,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blobHTMLSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/subTypes/blobHTMLSearchType.js"],"names":[],"mappings":";+BAQa,OAAO,sBAAsB,EAAE,gBAAgB;AA8F5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,kCAFU,gBAAgB,
|
|
1
|
+
{"version":3,"file":"blobHTMLSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/subTypes/blobHTMLSearchType.js"],"names":[],"mappings":";+BAQa,OAAO,sBAAsB,EAAE,gBAAgB;AA8F5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,kCAFU,gBAAgB,CA4JxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recordSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/subTypes/recordSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"recordSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/subTypes/recordSearchType.js"],"names":[],"mappings":";+BAaa,OAAO,sBAAsB,EAAE,gBAAgB;AAa5D;;;;;;;;;;;;;GAaG;AACH,gCAFU,gBAAgB,CA0FxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tupleSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/subTypes/tupleSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"tupleSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/subTypes/tupleSearchType.js"],"names":[],"mappings":";+BAaa,OAAO,sBAAsB,EAAE,gBAAgB;AAkB5D;;;;;;;;;;;;;;;;GAgBG;AACH,+BAFU,gBAAgB,CA6IxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpecialRealNumberSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/superTypes/SpecialRealNumberSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"SpecialRealNumberSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/superTypes/SpecialRealNumberSearchType.js"],"names":[],"mappings":";+BAOa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;;;;GAMG;AACH,2CAFU,gBAAgB,CAoCxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffersourceSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/superTypes/buffersourceSearchType.js"],"names":[],"mappings":";+
|
|
1
|
+
{"version":3,"file":"buffersourceSearchType.d.ts","sourceRoot":"","sources":["../../../src/search/superTypes/buffersourceSearchType.js"],"names":[],"mappings":";+BAQa,OAAO,sBAAsB,EAAE,gBAAgB;AAD5D;;GAEG;AAEH;;;;;;;;;GASG;AACH,sCAFU,gBAAgB,CA0CxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unionFamilySearchType.d.ts","sourceRoot":"","sources":["../../../src/search/unions/unionFamilySearchType.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unionFamilySearchType.d.ts","sourceRoot":"","sources":["../../../src/search/unions/unionFamilySearchType.js"],"names":[],"mappings":"AAqBA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,sEAHW;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAC,GACvC,gBAAgB,CAmK5B;+BAvMY,OAAO,sBAAsB,EAAE,gBAAgB;oCAY/C;IACR,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,yBAAyB,EAAE,WAAW,EAAE,CAAA;CACzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json6Stringify.d.ts","sourceRoot":"","sources":["../../src/utils/json6Stringify.js"],"names":[],"mappings":"AAmBO,sCALI,OAAO,UACP,MAAM,aACN,MAAM,GACJ,MAAM,CAgClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rawTypesonEditor.d.ts","sourceRoot":"","sources":["../../src/utils/rawTypesonEditor.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rawTypesonEditor.d.ts","sourceRoot":"","sources":["../../src/utils/rawTypesonEditor.js"],"names":[],"mappings":"AA8CA;;;;;GAKG;AACH,8CAHW,OAAO,GACL,OAAO,CAAC,MAAM,CAAC,CAY3B;AAED;;;;;GAKG;AACH,6CAHW,MAAM,GACJ,OAAO,CAMnB;AAED;;;;;;;GAOG;AACH,0CAHW,MAAM,GACJ,OAAO,CAQnB;AAaD;;;;;;;;;;;;;;;;GAgBG;AACH,+CALW,OAAO,SACP,GAAG,CAAC,OAAO,CAAC,GAEV,OAAO,CAAC,MAAM,CAAC,CA8Q3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,2HAVG;IAAgE,KAAK,EAA7D,YAAY,CAAC,cAAc,aAAa,EAAE,OAAO,CAAC;IACL,MAAM,EAAnD,OAAO,eAAe,EAAE,eAAe;IACW,IAAI,EAAtD,OAAO,aAAa,EAAE,sBAAsB;IACxB,IAAI,EAAxB,cAAc;IACM,OAAO,EAA3B,cAAc;IACD,aAAa;IACI,oBAAoB;IACrC,KAAK,EAAlB,OAAO;CACf,GAAU,OAAO,CAAC,IAAI,CAAC,CAiCzB;AAED;;;;;;;;;;;;;;GAcG;AACH,2HAVG;IAAgE,KAAK,EAA7D,YAAY,CAAC,cAAc,aAAa,EAAE,OAAO,CAAC;IACL,MAAM,EAAnD,OAAO,eAAe,EAAE,eAAe;IACW,IAAI,EAAtD,OAAO,aAAa,EAAE,sBAAsB;IACxB,IAAI,EAAxB,cAAc;IACM,OAAO,EAA3B,cAAc;IACD,aAAa;IACI,oBAAoB;IACrC,QAAQ,EAArB,OAAO;CACf,GAAU,OAAO,CAAC,IAAI,CAAC,CA+JzB"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
buildPathLabel, buildLengthSizeControls, readLengthSizeQuery,
|
|
3
|
-
buildOptInFieldset, readOptInChecked, wireOptInFieldset,
|
|
4
|
-
buildAtLeastOneSentinel, syncAtLeastOneCheck
|
|
2
|
+
buildPathLabel, buildLengthSizeControls, readLengthSizeQuery, applyLengthSizeQuery,
|
|
3
|
+
buildOptInFieldset, readOptInChecked, wireOptInFieldset, applyOptIn,
|
|
4
|
+
buildAtLeastOneSentinel, syncAtLeastOneCheck, extractLeafOfKind
|
|
5
5
|
} from '../searchUtils.js';
|
|
6
6
|
import {combineAnd} from '../queryTreeBuilders.js';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
findSearchElement, getQueryViaElement, hasGetQuery,
|
|
9
|
+
applyQueryViaElement, hasApplyQuery
|
|
10
|
+
} from '../searchElementUtils.js';
|
|
8
11
|
import {buildSearchWidget} from '../searchDispatch.js';
|
|
9
12
|
|
|
10
13
|
/**
|
|
@@ -79,6 +82,25 @@ const arraySearchType = {
|
|
|
79
82
|
? elementEl.getQuery()
|
|
80
83
|
: undefined;
|
|
81
84
|
return combineAnd([lengthLeaf, elementLeaf]);
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* @this {HTMLElement}
|
|
88
|
+
* @param {import('../queryTree.js').QueryNode|undefined} queryNode
|
|
89
|
+
* @returns {void}
|
|
90
|
+
*/
|
|
91
|
+
applyQuery (queryNode) {
|
|
92
|
+
const searchPath = this.dataset.searchPath ?? '';
|
|
93
|
+
const {matched: lengthLeaf, rest} = extractLeafOfKind(queryNode, 'lengthSize');
|
|
94
|
+
applyLengthSizeQuery(this, lengthLeaf);
|
|
95
|
+
// Whatever's left (0 or 1 clauses, `combineAnd` only ever having
|
|
96
|
+
// combined the length/size leaf with the recursed element's own
|
|
97
|
+
// subtree) belongs to the element widget.
|
|
98
|
+
applyOptIn(this, rest !== undefined, '');
|
|
99
|
+
const elementEl = findSearchElement(this, `${searchPath}/*`);
|
|
100
|
+
if (elementEl && hasApplyQuery(elementEl)) {
|
|
101
|
+
elementEl.applyQuery(rest);
|
|
102
|
+
}
|
|
103
|
+
syncArrayValidity(this);
|
|
82
104
|
}
|
|
83
105
|
}
|
|
84
106
|
}, [
|
|
@@ -95,7 +117,8 @@ const arraySearchType = {
|
|
|
95
117
|
buildAtLeastOneSentinel()
|
|
96
118
|
]];
|
|
97
119
|
},
|
|
98
|
-
getQuery: getQueryViaElement
|
|
120
|
+
getQuery: getQueryViaElement,
|
|
121
|
+
applyQuery: applyQueryViaElement
|
|
99
122
|
};
|
|
100
123
|
|
|
101
124
|
export default arraySearchType;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
buildPathLabel, buildRangeInputsPair, readRangeInputsPair, syncRangeValidity
|
|
2
|
+
buildPathLabel, buildRangeInputsPair, readRangeInputsPair, syncRangeValidity,
|
|
3
|
+
applyRangeQuery, extractLeafOfKind
|
|
3
4
|
} from '../searchUtils.js';
|
|
4
5
|
import {makeRangeLeaf} from '../queryTreeBuilders.js';
|
|
5
|
-
import {getQueryViaElement} from '../searchElementUtils.js';
|
|
6
|
+
import {getQueryViaElement, applyQueryViaElement} from '../searchElementUtils.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @typedef {import('../searchDispatch.js').SearchTypeObject} SearchTypeObject
|
|
@@ -55,6 +56,15 @@ const bigintSearchType = {
|
|
|
55
56
|
...($gte === undefined ? {} : {$gte}),
|
|
56
57
|
...($lte === undefined ? {} : {$lte})
|
|
57
58
|
});
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* @this {HTMLElement}
|
|
62
|
+
* @param {import('../queryTree.js').QueryNode|undefined} queryNode
|
|
63
|
+
* @returns {void}
|
|
64
|
+
*/
|
|
65
|
+
applyQuery (queryNode) {
|
|
66
|
+
const {matched} = extractLeafOfKind(queryNode, 'range');
|
|
67
|
+
applyRangeQuery(this, matched);
|
|
58
68
|
}
|
|
59
69
|
}
|
|
60
70
|
}, [
|
|
@@ -62,7 +72,8 @@ const bigintSearchType = {
|
|
|
62
72
|
...buildRangeInputsPair({name, type: 'text'})
|
|
63
73
|
]];
|
|
64
74
|
},
|
|
65
|
-
getQuery: getQueryViaElement
|
|
75
|
+
getQuery: getQueryViaElement,
|
|
76
|
+
applyQuery: applyQueryViaElement
|
|
66
77
|
};
|
|
67
78
|
|
|
68
79
|
export default bigintSearchType;
|