@optionfactory/fml 9.0.0-rc27 → 9.0.0-rc29
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/client-errors.iife.js +21 -16
- package/dist/client-errors.iife.js.map +1 -1
- package/dist/client-errors.iife.min.js +1 -1
- package/dist/client-errors.iife.min.js.map +1 -1
- package/dist/custom-elements.json +16 -16
- package/dist/fml.css +13 -13
- package/dist/fml.css.map +1 -1
- package/dist/fml.iife.js +871 -883
- package/dist/fml.iife.js.map +1 -1
- package/dist/fml.iife.min.js +1 -1
- package/dist/fml.iife.min.js.map +1 -1
- package/dist/ftl.d.mts +3 -3
- package/dist/ftl.iife.js +275 -679
- package/dist/ftl.iife.js.map +1 -1
- package/dist/ftl.iife.min.js +1 -1
- package/dist/ftl.iife.min.js.map +1 -1
- package/dist/ftl.min.mjs +1 -1
- package/dist/ftl.min.mjs.map +1 -1
- package/dist/ftl.mjs +275 -679
- package/dist/ftl.mjs.map +1 -1
- package/dist/ful.css +13 -13
- package/dist/ful.css.map +1 -1
- package/dist/ful.d.mts +195 -71
- package/dist/ful.iife.js +564 -189
- package/dist/ful.iife.js.map +1 -1
- package/dist/ful.iife.min.js +1 -1
- package/dist/ful.iife.min.js.map +1 -1
- package/dist/ful.min.mjs +1 -1
- package/dist/ful.min.mjs.map +1 -1
- package/dist/ful.mjs +564 -189
- package/dist/ful.mjs.map +1 -1
- package/dist/httpc.d.mts +9 -7
- package/dist/httpc.iife.js +32 -15
- package/dist/httpc.iife.js.map +1 -1
- package/dist/httpc.iife.min.js +1 -1
- package/dist/httpc.iife.min.js.map +1 -1
- package/dist/httpc.min.mjs +1 -1
- package/dist/httpc.min.mjs.map +1 -1
- package/dist/httpc.mjs +32 -15
- package/dist/httpc.mjs.map +1 -1
- package/dist/vscode.html-custom-data.json +13 -13
- package/dist/web-types.json +17 -17
- package/package.json +2 -2
package/dist/httpc.mjs
CHANGED
|
@@ -152,12 +152,20 @@ class Hex {
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
|
-
* @param {Iterable<number
|
|
155
|
+
* @param {Iterable<number>|ArrayBuffer|ArrayBufferView} bytes octets, or
|
|
156
|
+
* a buffer or view read as its bytes
|
|
156
157
|
* @param {boolean} [upper] uppercase digits instead of lowercase
|
|
157
158
|
* @returns {string} two digits per byte
|
|
158
159
|
*/
|
|
159
160
|
static encode(bytes, upper) {
|
|
160
|
-
|
|
161
|
+
let octets = /** @type {Iterable<number>} */ (bytes);
|
|
162
|
+
if (bytes instanceof ArrayBuffer) {
|
|
163
|
+
octets = new Uint8Array(bytes);
|
|
164
|
+
}
|
|
165
|
+
if (ArrayBuffer.isView(bytes)) {
|
|
166
|
+
octets = new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
167
|
+
}
|
|
168
|
+
return Array.from(octets)
|
|
161
169
|
.map((b) => b.toString(16))
|
|
162
170
|
.map((b) => (upper ? b.toUpperCase() : b))
|
|
163
171
|
.map((o) => o.padStart(2, '0'))
|
|
@@ -260,11 +268,12 @@ class HttpClientError extends Failure {
|
|
|
260
268
|
/**
|
|
261
269
|
* The failure an error response stands for, keeping its status. An
|
|
262
270
|
* `application/failures+json` body is the problems list; an
|
|
263
|
-
* `application/problem+json` body contributes its `problems
|
|
264
|
-
* GENERIC_PROBLEM made of its title and detail
|
|
265
|
-
* GENERIC_PROBLEM carrying the body text. A
|
|
266
|
-
*
|
|
267
|
-
*
|
|
271
|
+
* `application/problem+json` body contributes its non-empty `problems`
|
|
272
|
+
* array, or one GENERIC_PROBLEM made of whichever of its title and detail
|
|
273
|
+
* it has. Any other body is one GENERIC_PROBLEM carrying the body text. A
|
|
274
|
+
* json body that does not decode, or decodes to the wrong shape or to an
|
|
275
|
+
* empty failures array, and a body that cannot be read at all, each
|
|
276
|
+
* become one GENERIC_PROBLEM saying so.
|
|
268
277
|
* @param {Response} response consumed
|
|
269
278
|
* @returns {Promise<HttpClientError>}
|
|
270
279
|
*/
|
|
@@ -276,7 +285,10 @@ class HttpClientError extends Failure {
|
|
|
276
285
|
return HttpClientError.#undecodable(response);
|
|
277
286
|
}
|
|
278
287
|
if (!Array.isArray(data)) {
|
|
279
|
-
return HttpClientError.#undecodable(response, 'as a failures array');
|
|
288
|
+
return HttpClientError.#undecodable(response, 'does not decode as a failures array');
|
|
289
|
+
}
|
|
290
|
+
if (data.length === 0) {
|
|
291
|
+
return HttpClientError.#undecodable(response, 'carries no failures');
|
|
280
292
|
}
|
|
281
293
|
const message = `${response.status} ${response.statusText}: ${data.length} failures`;
|
|
282
294
|
return new HttpClientError(message, response.status, data);
|
|
@@ -287,13 +299,18 @@ class HttpClientError extends Failure {
|
|
|
287
299
|
return HttpClientError.#undecodable(response);
|
|
288
300
|
}
|
|
289
301
|
if (typeof data !== 'object' || data === null || Array.isArray(data)) {
|
|
290
|
-
return HttpClientError.#undecodable(response, 'as a problem object');
|
|
302
|
+
return HttpClientError.#undecodable(response, 'does not decode as a problem object');
|
|
291
303
|
}
|
|
292
|
-
const
|
|
304
|
+
const text = [data.title, data.detail].filter((part) => part !== undefined && part !== null).join(' ');
|
|
305
|
+
const message = text
|
|
306
|
+
? `${response.status} ${response.statusText}: ${text}`
|
|
307
|
+
: `${response.status} ${response.statusText}`;
|
|
293
308
|
return new HttpClientError(
|
|
294
309
|
message,
|
|
295
310
|
response.status,
|
|
296
|
-
data.problems
|
|
311
|
+
Array.isArray(data.problems) && data.problems.length > 0
|
|
312
|
+
? data.problems
|
|
313
|
+
: [HttpClientError.problem('GENERIC_PROBLEM', message)],
|
|
297
314
|
);
|
|
298
315
|
}
|
|
299
316
|
default: {
|
|
@@ -304,11 +321,11 @@ class HttpClientError extends Failure {
|
|
|
304
321
|
static #unreadable = Symbol('unreadable body');
|
|
305
322
|
/**
|
|
306
323
|
* @param {Response} response
|
|
307
|
-
* @param {string} [
|
|
324
|
+
* @param {string} [flaw] what is wrong with the body
|
|
308
325
|
*/
|
|
309
|
-
static #undecodable(response,
|
|
326
|
+
static #undecodable(response, flaw = 'does not decode as json') {
|
|
310
327
|
const mediaType = MediaType.parse(response.headers.get('Content-Type')).normalized;
|
|
311
|
-
const message = `${response.status} ${response.statusText}: the ${mediaType} body
|
|
328
|
+
const message = `${response.status} ${response.statusText}: the ${mediaType} body ${flaw}`;
|
|
312
329
|
return new HttpClientError(message, response.status, [HttpClientError.problem('GENERIC_PROBLEM', message)]);
|
|
313
330
|
}
|
|
314
331
|
static async #generic(response) {
|
|
@@ -405,7 +422,7 @@ class HttpClientBuilder {
|
|
|
405
422
|
}
|
|
406
423
|
/** @returns {HttpClient} a client running the interceptors added so far */
|
|
407
424
|
build() {
|
|
408
|
-
return new HttpClient(this.#interceptors);
|
|
425
|
+
return new HttpClient([...this.#interceptors]);
|
|
409
426
|
}
|
|
410
427
|
}
|
|
411
428
|
|
package/dist/httpc.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpc.mjs","sources":["../src/httpc/failure.mjs","../src/httpc/encodings.mjs","../src/httpc/http-client.mjs"],"sourcesContent":["/**\n * One problem of a failure: its `type` (a code such as `FIELD_ERROR` or\n * `GENERIC_PROBLEM`), the `context` naming the field it belongs to or null, the\n * human `reason`, and optional `details`.\n * @typedef {{ type: string; context: string?; reason: string; details: any?; }} Problem\n */\n/**\n * An error carrying a list of problems rather than one message. A problem's\n * `context` names the field it belongs to, which is what lets a form show each\n * one beside its own input instead of in a banner.\n */\nclass Failure extends Error {\n /**\n * @param {string} message\n * @param {Problem[]} problems\n * @param {*} [cause]\n */\n constructor(message, problems, cause) {\n super(message, { cause });\n this.name = 'Failure';\n this.problems = problems;\n }\n /**\n * Returns a copy whose problems' contexts have the prefix removed, so a\n * caller can rethrow namespaced problems as its own.\n * @param {string} prefix\n * @returns {Failure}\n */\n dropping(prefix) {\n return new Failure(this.message, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n /**\n * Copies of the problems, each context losing the prefix where it starts with it.\n * @param {Problem[]} problems\n * @param {string} prefix\n * @returns {Problem[]}\n */\n static dropProblemsContext(problems, prefix) {\n return problems.map(({ type, context, reason, details }) => {\n const nctx = context?.startsWith(prefix) ? context.substring(prefix.length) : context;\n return { type, context: nctx, reason, details };\n });\n }\n}\n\nexport { Failure };\n","/**\n * Base64 encoding and decoding over ArrayBuffers, in the STANDARD and URL_SAFE\n * alphabets. The encoder never emits padding; the decoder accepts both padded\n * and unpadded input, and rejects anything it cannot decode faithfully instead\n * of corrupting silently.\n */\nclass Base64 {\n /** The RFC 4648 alphabet, with `+` and `/`. */\n static STANDARD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n /** The RFC 4648 url and filename safe alphabet, with `-` and `_`. */\n static URL_SAFE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';\n /**\n * @param {ArrayBuffer} arrayBuffer\n * @param {string} [dialect] one of Base64.STANDARD or Base64.URL_SAFE, URL_SAFE by default\n * @returns {string} the unpadded encoding\n */\n static encode(arrayBuffer, dialect) {\n const d = dialect || Base64.URL_SAFE;\n const len = arrayBuffer.byteLength;\n const view = new Uint8Array(arrayBuffer);\n let res = '';\n for (let i = 0; i < len; i += 3) {\n const v1 = d[view[i] >> 2];\n const v2 = d[((view[i] & 3) << 4) | (view[i + 1] >> 4)];\n const v3 = d[((view[i + 1] & 15) << 2) | (view[i + 2] >> 6)];\n const v4 = d[view[i + 2] & 63];\n res += v1 + v2 + v3 + v4;\n }\n if (len % 3 === 2) {\n res = res.substring(0, res.length - 1);\n } else if (len % 3 === 1) {\n res = res.substring(0, res.length - 2);\n }\n return res;\n }\n /**\n * @param {string} str padded or unpadded\n * @param {string} [dialect] one of Base64.STANDARD or Base64.URL_SAFE, URL_SAFE by default\n * @returns {ArrayBuffer}\n * @throws on padding anywhere but the tail or longer than two, on an\n * impossible length, and on a character outside the dialect\n */\n static decode(str, dialect) {\n const d = dialect || Base64.URL_SAFE;\n let end = str.length;\n while (end > 0 && str.charAt(end - 1) === '=') {\n --end;\n }\n const unpadded = str.substring(0, end);\n if (str.length - end > 2 || unpadded.includes('=') || (unpadded.length === 0 && str.length > 0)) {\n throw new Error('invalid padding');\n }\n if (unpadded.length % 4 === 1) {\n throw new Error('invalid length');\n }\n for (const c of unpadded) {\n if (d.indexOf(c) === -1) {\n throw new Error(`invalid character '${c}'`);\n }\n }\n const nbytes = Math.floor(unpadded.length * 0.75);\n const view = new Uint8Array(nbytes);\n\n let vi = 0;\n let si = 0;\n while (vi < nbytes) {\n const v1 = d.indexOf(unpadded.charAt(si++));\n const v2 = d.indexOf(unpadded.charAt(si++));\n const v3 = d.indexOf(unpadded.charAt(si++));\n const v4 = d.indexOf(unpadded.charAt(si++));\n view[vi++] = (v1 << 2) | (v2 >> 4);\n if (vi === nbytes) {\n break;\n }\n view[vi++] = ((v2 & 15) << 4) | (v3 >> 2);\n if (vi === nbytes) {\n break;\n }\n view[vi++] = ((v3 & 3) << 6) | v4;\n }\n\n return view.buffer;\n }\n}\n\n/**\n * Hex encoding and decoding over byte sequences, lowercase by default.\n */\nclass Hex {\n /**\n * @param {string} hex either case\n * @returns {Uint8Array}\n * @throws on an odd length or a character that is not a hex digit\n */\n static decode(hex) {\n if (hex.length % 2 !== 0) {\n throw new Error('invalid length');\n }\n if (!/^[0-9a-fA-F]*$/.test(hex)) {\n throw new Error('invalid character');\n }\n const lenInBytes = hex.length / 2;\n return new Uint8Array(lenInBytes).map((e, i) => {\n const offset = i * 2;\n const octet = hex.substring(offset, offset + 2);\n return parseInt(octet, 16);\n });\n }\n /**\n * @param {Iterable<number>} bytes\n * @param {boolean} [upper] uppercase digits instead of lowercase\n * @returns {string} two digits per byte\n */\n static encode(bytes, upper) {\n return Array.from(bytes)\n .map((b) => b.toString(16))\n .map((b) => (upper ? b.toUpperCase() : b))\n .map((o) => o.padStart(2, '0'))\n .join('');\n }\n}\n\nexport { Base64, Hex };\n","import { Failure } from './failure.mjs';\n\n/** A parsed `Content-Type`: the type and subtype without the parameters, so a comparison is not defeated by a charset. */\nclass MediaType {\n #type;\n #subtype;\n constructor(type, subtype) {\n this.#type = type;\n this.#subtype = subtype;\n }\n /** @returns {string} `type/subtype`, lowercase */\n get normalized() {\n return `${this.#type}/${this.#subtype}`;\n }\n /** @returns {string} */\n get type() {\n return this.#type;\n }\n /** @returns {string} */\n get subtype() {\n return this.#subtype;\n }\n /**\n * Parses a Content-Type header value into its type/subtype pair, dropping any parameter.\n * @param {string|null|undefined} v\n * @returns {MediaType} `unknown/unknown` for a missing or malformed value\n */\n static parse(v) {\n if (!v) {\n return new MediaType('unknown', 'unknown');\n }\n const [prefix, _] = v.split(';');\n const [ptype, psubtype] = prefix.trim().toLowerCase().split('/');\n if (!ptype || !psubtype) {\n return new MediaType('unknown', 'unknown');\n }\n return new MediaType(ptype, psubtype);\n }\n}\n\n/**\n * @typedef {Int8Array| Uint8Array| Uint8ClampedArray| Int16Array| Uint16Array| Int32Array| Uint32Array| Float32Array| Float64Array| BigInt64Array| BigUint64Array} TypedArray\n */\n/**\n * @typedef {object} HttpInterceptor\n * @property {(url: URL, init: RequestInit|undefined, chain: HttpInterceptorChain) => Promise<Response>} intercept\n */\n\n/**\n * A Failure from an http exchange, carrying the status that was served. Status\n * 0 means no response was served at all: the transport failed, or a body the\n * server did send could not be read.\n */\nclass HttpClientError extends Failure {\n /**\n * @param {string} message\n * @param {number} status\n * @param {{ type: string; context: string?; reason: string; details: any?; }[]} problems\n * @param {Error|undefined} [cause]\n */\n constructor(message, status, problems, cause) {\n super(message, problems, cause);\n this.name = 'HttpClientError';\n this.status = status;\n }\n /**\n * Returns a copy whose problems' contexts have the prefix removed, keeping\n * this error's status.\n * @param {string} prefix\n * @returns {HttpClientError}\n */\n dropping(prefix) {\n return new HttpClientError(this.message, this.status, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n /**\n * A problem with no context and no details.\n * @param {string} type\n * @param {string} reason\n * @returns {{ type: string; context: null; reason: string; details: null; }}\n */\n static problem(type, reason) {\n return { type, context: null, reason, details: null };\n }\n /**\n * A failure with status 0 and one problem of the given type, whose reason is\n * the cause's message.\n * @param {string} type\n * @param {any} cause\n * @returns {HttpClientError}\n */\n static of(type, cause) {\n const reason = String(cause?.message ?? cause ?? 'unknown failure');\n return new HttpClientError(reason, 0, [HttpClientError.problem(type, reason)], cause);\n }\n /**\n * The failure an error response stands for, keeping its status. An\n * `application/failures+json` body is the problems list; an\n * `application/problem+json` body contributes its `problems`, or one\n * GENERIC_PROBLEM made of its title and detail. Any other body is one\n * GENERIC_PROBLEM carrying the body text. A json body that does not decode,\n * or decodes to the wrong shape, and a body that cannot be read at all,\n * each become one GENERIC_PROBLEM saying so.\n * @param {Response} response consumed\n * @returns {Promise<HttpClientError>}\n */\n static async fromResponse(response) {\n switch (MediaType.parse(response.headers.get('Content-Type')).normalized) {\n case 'application/failures+json': {\n const data = await response.json().catch(() => HttpClientError.#unreadable);\n if (data === HttpClientError.#unreadable) {\n return HttpClientError.#undecodable(response);\n }\n if (!Array.isArray(data)) {\n return HttpClientError.#undecodable(response, 'as a failures array');\n }\n const message = `${response.status} ${response.statusText}: ${data.length} failures`;\n return new HttpClientError(message, response.status, data);\n }\n case 'application/problem+json': {\n const data = await response.json().catch(() => HttpClientError.#unreadable);\n if (data === HttpClientError.#unreadable) {\n return HttpClientError.#undecodable(response);\n }\n if (typeof data !== 'object' || data === null || Array.isArray(data)) {\n return HttpClientError.#undecodable(response, 'as a problem object');\n }\n const message = `${response.status} ${response.statusText}: ${data.title} ${data.detail}`;\n return new HttpClientError(\n message,\n response.status,\n data.problems || [HttpClientError.problem('GENERIC_PROBLEM', message)],\n );\n }\n default: {\n return HttpClientError.#generic(response);\n }\n }\n }\n static #unreadable = Symbol('unreadable body');\n /**\n * @param {Response} response\n * @param {string} [as] what the body does not decode as\n */\n static #undecodable(response, as = 'as json') {\n const mediaType = MediaType.parse(response.headers.get('Content-Type')).normalized;\n const message = `${response.status} ${response.statusText}: the ${mediaType} body does not decode ${as}`;\n return new HttpClientError(message, response.status, [HttpClientError.problem('GENERIC_PROBLEM', message)]);\n }\n static async #generic(response) {\n const text = await response.text().catch(() => null);\n const message =\n text === null\n ? `${response.status} ${response.statusText}: the body could not be read`\n : `${response.status} ${response.statusText}: ${text}`;\n return new HttpClientError(message, response.status, [HttpClientError.problem('GENERIC_PROBLEM', message)]);\n }\n}\n\nconst metaContent = (name) =>\n globalThis.document?.querySelector(`meta[name=\"${name}\"]`)?.getAttribute('content') ?? undefined;\n\n/**\n * Sends the csrf header named by the page's `_csrf_header` meta, with the token\n * from `_csrf`. Both are read per request, so metas replaced after the client\n * was built are honoured, and the header is sent to the page's own origin only.\n * @implements {HttpInterceptor}\n */\nclass CsrfTokenInterceptor {\n async intercept(url, request, chain) {\n if (url.origin !== (globalThis.window?.location?.origin ?? url.origin)) {\n return await chain.proceed(url, request);\n }\n const csrfHeader = metaContent('_csrf_header');\n const csrfToken = metaContent('_csrf');\n if (csrfHeader && csrfToken) {\n request.headers.set(csrfHeader, csrfToken);\n }\n return await chain.proceed(url, request);\n }\n}\n/**\n * Navigates to a login url when a response comes back 401. The promise it\n * returns never settles, so callers keep waiting while the page unloads\n * instead of showing a failure; where the navigation is blocked, as by a\n * beforeunload prompt, they stay pending until the page leaves.\n * @implements {HttpInterceptor}\n */\nclass RedirectOnUnauthorizedInterceptor {\n #redirectUri;\n /**\n * @param {string} redirectUri\n */\n constructor(redirectUri) {\n this.#redirectUri = redirectUri;\n }\n async intercept(url, request, chain) {\n const response = await chain.proceed(url, request);\n if (response.status === 401) {\n window.location.href = this.#redirectUri;\n return new Promise(() => {});\n }\n return response;\n }\n}\n\n/** Collects the interceptors an HttpClient will run, in the order they are added. */\nclass HttpClientBuilder {\n /**\n * @type {HttpInterceptor[]}\n */\n #interceptors;\n constructor() {\n this.#interceptors = [];\n }\n /**\n * Adds the CsrfTokenInterceptor.\n * @returns {HttpClientBuilder} this builder\n */\n withCsrfToken() {\n this.#interceptors.push(new CsrfTokenInterceptor());\n return this;\n }\n /**\n * Adds the RedirectOnUnauthorizedInterceptor.\n * @param {string} redirectUri where a 401 navigates to\n * @returns {HttpClientBuilder} this builder\n */\n withRedirectOnUnauthorized(redirectUri) {\n this.#interceptors.push(new RedirectOnUnauthorizedInterceptor(redirectUri));\n return this;\n }\n /**\n * Adds interceptors, run in the order given after the ones added before.\n * @param {...HttpInterceptor} interceptors\n * @returns {HttpClientBuilder} this builder\n */\n withInterceptors(...interceptors) {\n this.#interceptors.push(...interceptors);\n return this;\n }\n /** @returns {HttpClient} a client running the interceptors added so far */\n build() {\n return new HttpClient(this.#interceptors);\n }\n}\n\n/**\n * The last interceptor in every chain, performing the request with fetch. A\n * fetch rejection becomes an HttpClientError with a CONNECTION_PROBLEM.\n * @implements {HttpInterceptor}\n */\nclass HttpCall {\n async intercept(url, request, chain) {\n try {\n return await fetch(url, request);\n } catch (ex) {\n throw HttpClientError.of('CONNECTION_PROBLEM', ex);\n }\n }\n}\n\n/** One request's position in the interceptor list: `proceed` runs the next interceptor, the last of which performs the request. */\nclass HttpInterceptorChain {\n #interceptors;\n #current;\n /**\n * @param {HttpInterceptor[]} interceptors\n * @param {number} current the index of the interceptor `proceed` runs\n */\n constructor(interceptors, current) {\n this.#interceptors = interceptors;\n this.#current = current;\n }\n /**\n * Runs the next interceptor.\n * @param {URL} url\n * @param {RequestInit} request\n * @returns {Promise<Response>}\n */\n async proceed(url, request) {\n const interceptor = this.#interceptors[this.#current];\n return await interceptor.intercept(\n url,\n request,\n new HttpInterceptorChain(this.#interceptors, this.#current + 1),\n );\n }\n}\n\n/**\n * Performs http requests through a fixed list of interceptors. The verbs\n * return a request builder; `exchange` is the lower-level entry that returns\n * the Response itself without treating an error status as a failure.\n */\nclass HttpClient {\n #interceptors;\n /**\n * Creates a builder for an HttpClient.\n * @returns {HttpClientBuilder} the client builder\n */\n static builder() {\n return new HttpClientBuilder();\n }\n /**\n * Creates an HttpClient.\n * @param {HttpInterceptor[]|undefined} interceptors - a list of interceptors to be registered for every request performed by the created client.\n */\n constructor(interceptors) {\n this.#interceptors = interceptors || [];\n }\n /**\n * Performs an HTTP exchange through the client's interceptors, then the\n * given ones.\n * @param {string} uri the request url, relative to the page's\n * @param {RequestInit|undefined} options fetch options\n * @param {HttpInterceptor[]|undefined} interceptors run for this exchange only\n * @returns {Promise<Response>} the response, whatever its status; rejecting\n * with an HttpClientError CONNECTION_PROBLEM when the transport fails, or\n * with what an interceptor throws\n */\n async exchange(uri, options, interceptors) {\n const is = [...this.#interceptors, ...(interceptors || []), new HttpCall()];\n const chain = new HttpInterceptorChain(is, 0);\n const url = new URL(new Request(uri).url);\n const request = { ...options, headers: new Headers(options?.headers) };\n return await chain.proceed(url, request);\n }\n /**\n * Starts a request with any method.\n * @param {string} method\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n request(method, uri) {\n return HttpRequestBuilder.create(this, method, uri);\n }\n /**\n * Starts a GET request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n get(uri) {\n return HttpRequestBuilder.create(this, 'GET', uri);\n }\n /**\n * Starts a HEAD request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n head(uri) {\n return HttpRequestBuilder.create(this, 'HEAD', uri);\n }\n /**\n * Starts a POST request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n post(uri) {\n return HttpRequestBuilder.create(this, 'POST', uri);\n }\n /**\n * Starts a PUT request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n put(uri) {\n return HttpRequestBuilder.create(this, 'PUT', uri);\n }\n /**\n * Starts a PATCH request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n patch(uri) {\n return HttpRequestBuilder.create(this, 'PATCH', uri);\n }\n /**\n * Starts a DELETE request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n delete(uri) {\n return HttpRequestBuilder.create(this, 'DELETE', uri);\n }\n}\n\n/**\n * Reads the response body as the given type, wrapping a failed read as an UNMARSHALING_PROBLEM.\n * @param {Response} response\n * @param {'text'|'json'|'blob'|'arrayBuffer'} type\n * @returns {Promise<any>}\n */\nconst unmarshal = async (response, type) => {\n try {\n return await response[type]();\n } catch (ex) {\n throw HttpClientError.of('UNMARSHALING_PROBLEM', ex);\n }\n};\n\n/**\n * The entries of a headers or params initializer with nullish values kept as they are.\n * @param {any} source\n * @returns {Iterable<[string, any]>}\n */\nconst rawEntries = (source) => {\n if (source == null) {\n return [];\n }\n if (typeof source === 'string') {\n return new URLSearchParams(source);\n }\n if (typeof source[Symbol.iterator] === 'function') {\n return source;\n }\n return Object.entries(source);\n};\n\n/**\n * One request under construction: method, url, parameters, headers and body,\n * with a `fetch*` method per body type. Every configuration method returns the\n * builder, and a `fetch*` rejects with an HttpClientError for any status\n * outside 200-299.\n */\nclass HttpRequestBuilder {\n #client;\n #method;\n #uri;\n #params;\n #headers;\n #body;\n #options;\n #interceptors;\n #fragment;\n /**\n * A builder for the url: its query becomes the initial params, split at the\n * first `?`, and its fragment, from the first `#`, is kept for the final url.\n * @param {HttpClient} client\n * @param {string} method\n * @param {string} uri\n * @returns {HttpRequestBuilder}\n */\n static create(client, method, uri) {\n const hashIndex = uri.indexOf('#');\n const fragment = hashIndex === -1 ? '' : uri.slice(hashIndex);\n const withoutFragment = hashIndex === -1 ? uri : uri.slice(0, hashIndex);\n const queryIndex = withoutFragment.indexOf('?');\n return new HttpRequestBuilder(\n client,\n method,\n queryIndex === -1 ? withoutFragment : withoutFragment.slice(0, queryIndex),\n new URLSearchParams(queryIndex === -1 ? '' : withoutFragment.slice(queryIndex + 1)),\n new Headers(),\n undefined,\n {},\n [],\n fragment,\n );\n }\n /**\n * @param {HttpClient} client\n * @param {string} method\n * @param {string} uri the url without query and fragment\n * @param {URLSearchParams} params\n * @param {Headers} headers\n * @param {any} body\n * @param {Omit<RequestInit,\"headers\"|\"method\"|\"body\">} options\n * @param {HttpInterceptor[]} interceptors\n * @param {string} [fragment]\n */\n constructor(client, method, uri, params, headers, body, options, interceptors, fragment = '') {\n this.#client = client;\n this.#method = method;\n this.#uri = uri;\n this.#params = params;\n this.#body = body;\n this.#headers = headers;\n this.#options = options;\n this.#interceptors = interceptors;\n this.#fragment = fragment;\n }\n /**\n * Sets each header, replacing a header of the same name; a null or undefined value removes it.\n * @param {HeadersInit|Record<string,string|null|undefined>} hs\n * @returns {HttpRequestBuilder} this builder\n */\n headers(hs) {\n for (const [k, v] of rawEntries(hs)) {\n this.header(k, v);\n }\n return this;\n }\n /**\n * Sets a header, replacing one of the same name; a null or undefined value removes it.\n * @param {string} k\n * @param {string|null|undefined} v\n * @returns {HttpRequestBuilder} this builder\n */\n header(k, v) {\n if (v == null) {\n this.#headers.delete(k);\n } else {\n this.#headers.set(k, v);\n }\n return this;\n }\n /**\n * Sets each query parameter in place, replacing a parameter of the same name; a null or undefined value removes it.\n * @param {URLSearchParams|Record<string,string|null|undefined>|string[][]|string} ps\n * @returns {HttpRequestBuilder} this builder\n */\n params(ps) {\n for (const [k, v] of rawEntries(ps)) {\n if (v == null) {\n this.#params.delete(k);\n } else {\n this.#params.set(k, v);\n }\n }\n return this;\n }\n /**\n * Sets a query parameter to the values given, as repeated entries moved to the end of the query; nullish values are skipped, and none left removes the parameter.\n * @param {string} k\n * @param {...string} vs\n * @returns {HttpRequestBuilder} this builder\n */\n param(k, ...vs) {\n this.#params.delete(k);\n for (const v of vs.filter((v) => v != null)) {\n this.#params.append(k, v);\n }\n return this;\n }\n /**\n * Sets the request body.\n * `Content-Type: multipart/form-data` header is automatically added by fetch when data is a FormData instance if not explicitly set.\n * `Content-Type: application/x-www-form-urlencoded` header is automatically added by fetch when data is an URLSearchParams instance if not explicitly set.\n * `Content-Type: text/plain` header is automatically added by fetch when data is a string instance if not explicitly set.\n * @param {string|ArrayBuffer|Blob|DataView|File|FormData|TypedArray|URLSearchParams|ReadableStream} data\n * @returns {HttpRequestBuilder} this builder\n */\n body(data) {\n this.#body = data;\n return this;\n }\n /**\n * Sets the request body that will be serialized as json. Calling this method adds the `Content-Type application/json` header for the request.\n * @param {any} body - the body to be serialized as json\n * @returns {HttpRequestBuilder} this builder\n */\n json(body) {\n if (body === undefined) {\n return this;\n }\n const serialized = JSON.stringify(body);\n this.#headers.set('Content-Type', 'application/json');\n this.#body = serialized;\n return this;\n }\n /**\n * Sets the request body as a FormData configured using the callback.\n * `Content-Type: multipart/form-data` header is automatically added by fetch if not explicitly set.\n * @param {(c: HttpMultipartRequestCustomizer) => void} callback\n * @returns {HttpRequestBuilder} this builder\n */\n multipart(callback) {\n const formData = new FormData();\n const builder = new HttpMultipartRequestCustomizer(formData);\n callback(builder);\n this.#body = formData;\n return this;\n }\n /**\n * Merges fetch options into the request's.\n * @param {Omit<RequestInit,\"headers\"|\"method\"|\"body\">} kvs\n * @returns {HttpRequestBuilder} this builder\n */\n options(kvs) {\n for (const [k, v] of Object.entries(kvs)) {\n this.#options[k] = v;\n }\n return this;\n }\n /**\n * Sets a fetch option for the request.\n * @param {keyof Omit<RequestInit,\"headers\"|\"method\"|\"body\">} k\n * @param {*} v\n * @returns {HttpRequestBuilder} this builder\n */\n option(k, v) {\n this.#options[k] = v;\n return this;\n }\n /**\n * Adds interceptors run for this request only, after the client's.\n * @param {HttpInterceptor[]} is\n * @returns {HttpRequestBuilder} this builder\n */\n interceptors(is) {\n for (const i of is) {\n this.#interceptors.push(i);\n }\n return this;\n }\n /**\n * Adds one interceptor run for this request only, after the client's.\n * @param {HttpInterceptor} i\n * @returns {HttpRequestBuilder} this builder\n */\n interceptor(i) {\n this.#interceptors.push(i);\n return this;\n }\n /**\n * Sends the request and answers the Response, whatever its status.\n * @returns {Promise<Response>} rejecting as `HttpClient.exchange` does\n */\n async exchange() {\n const query = this.#params.size ? `?${this.#params}` : '';\n const opts = {\n ...this.#options,\n headers: this.#headers,\n method: this.#method,\n body: this.#body,\n };\n return await this.#client.exchange(`${this.#uri}${query}${this.#fragment}`, opts, this.#interceptors);\n }\n /**\n * Sends the request and answers the Response when its status is 200-299.\n * Always rejects with an HttpClientError: `HttpClientError.fromResponse`\n * for an error status, CONNECTION_PROBLEM for a transport failure, and\n * UNEXPECTED_PROBLEM, carrying the error as its cause, for anything an\n * interceptor throws that is not already a Failure.\n * @returns {Promise<Response>}\n */\n async fetch() {\n try {\n const response = await this.exchange();\n if (!response.ok) {\n throw await HttpClientError.fromResponse(response);\n }\n return response;\n } catch (ex) {\n if (ex instanceof Failure) {\n throw ex;\n }\n throw HttpClientError.of('UNEXPECTED_PROBLEM', ex);\n }\n }\n /**\n * `fetch()`, then the body as text; a body that cannot be read rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<string>}\n */\n async fetchText() {\n const response = await this.fetch();\n return await unmarshal(response, 'text');\n }\n /**\n * `fetch()`, then the body parsed as json. A 204 yields null without reading\n * the body; any other body that does not parse rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<any>}\n */\n async fetchJson() {\n const response = await this.fetch();\n if (response.status === 204) {\n return null;\n }\n return await unmarshal(response, 'json');\n }\n /**\n * `fetch()`, then the body as a Blob; a body that cannot be read rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<Blob>}\n */\n async fetchBlob() {\n const response = await this.fetch();\n return await unmarshal(response, 'blob');\n }\n /**\n * `fetch()`, then the body as an ArrayBuffer; a body that cannot be read rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<ArrayBuffer>}\n */\n async fetchArrayBuffer() {\n const response = await this.fetch();\n return await unmarshal(response, 'arrayBuffer');\n }\n}\n\n/** Builds a multipart body: text fields, json parts, and single or repeated blobs. */\nclass HttpMultipartRequestCustomizer {\n #formData;\n /** @param {FormData} formData the body being built */\n constructor(formData) {\n this.#formData = formData;\n }\n /**\n * Appends a value to the FormData.\n * @param {string} name\n * @param {*} value\n * @returns {HttpMultipartRequestCustomizer} this builder\n */\n field(name, value) {\n this.#formData.append(name, value);\n return this;\n }\n /**\n * Appends a Blob to the FormData. Without a filename a File keeps its own\n * and any other Blob is named \"blob\".\n * @param {string} name\n * @param {Blob} value\n * @param {string} [filename]\n * @returns {HttpMultipartRequestCustomizer} this builder\n */\n blob(name, value, filename) {\n this.#formData.append(name, value, filename);\n return this;\n }\n /**\n * Appends each Blob under the same name, a File keeping its own filename and\n * any other Blob named \"blob\".\n * @param {string} name\n * @param {Blob[]} values\n * @returns {HttpMultipartRequestCustomizer} this builder\n */\n blobs(name, values) {\n for (const v of values) {\n this.#formData.append(name, v);\n }\n return this;\n }\n /**\n * Appends the value serialized as an `application/json` blob.\n * @param {string} name\n * @param {any} value\n * @param {string} [filename]\n * @returns {HttpMultipartRequestCustomizer} this builder\n */\n json(name, value, filename) {\n const blob = new Blob([JSON.stringify(value)], { type: 'application/json' });\n this.#formData.append(name, blob, filename);\n return this;\n }\n}\n\nexport {\n MediaType,\n HttpClient,\n HttpClientBuilder,\n HttpClientError,\n HttpInterceptorChain,\n HttpRequestBuilder,\n HttpMultipartRequestCustomizer,\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,OAAO,SAAS,KAAK,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE;AAC1C,QAAQ,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC;AACjC,QAAQ,IAAI,CAAC,IAAI,GAAG,SAAS;AAC7B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ;AAChC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,QAAQ,CAAC,MAAM,EAAE;AACrB,QAAQ,OAAO,IAAI,OAA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QAAQ,CAAC;AACnD,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;;"}
|
|
1
|
+
{"version":3,"file":"httpc.mjs","sources":["../src/httpc/failure.mjs","../src/httpc/encodings.mjs","../src/httpc/http-client.mjs"],"sourcesContent":["/**\n * One problem of a failure: its `type` (a code such as `FIELD_ERROR` or\n * `GENERIC_PROBLEM`), the `context` naming the field it belongs to or null, the\n * human `reason`, and optional `details`.\n * @typedef {{ type: string; context: string?; reason: string; details: any?; }} Problem\n */\n/**\n * An error carrying a list of problems rather than one message. A problem's\n * `context` names the field it belongs to, which is what lets a form show each\n * one beside its own input instead of in a banner.\n */\nclass Failure extends Error {\n /**\n * @param {string} message\n * @param {Problem[]} problems\n * @param {*} [cause]\n */\n constructor(message, problems, cause) {\n super(message, { cause });\n this.name = 'Failure';\n this.problems = problems;\n }\n /**\n * Returns a copy whose problems' contexts have the prefix removed, so a\n * caller can rethrow namespaced problems as its own.\n * @param {string} prefix\n * @returns {Failure}\n */\n dropping(prefix) {\n return new Failure(this.message, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n /**\n * Copies of the problems, each context losing the prefix where it starts with it.\n * @param {Problem[]} problems\n * @param {string} prefix\n * @returns {Problem[]}\n */\n static dropProblemsContext(problems, prefix) {\n return problems.map(({ type, context, reason, details }) => {\n const nctx = context?.startsWith(prefix) ? context.substring(prefix.length) : context;\n return { type, context: nctx, reason, details };\n });\n }\n}\n\nexport { Failure };\n","/**\n * Base64 encoding and decoding over ArrayBuffers, in the STANDARD and URL_SAFE\n * alphabets. The encoder never emits padding; the decoder accepts both padded\n * and unpadded input, and rejects anything it cannot decode faithfully instead\n * of corrupting silently.\n */\nclass Base64 {\n /** The RFC 4648 alphabet, with `+` and `/`. */\n static STANDARD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n /** The RFC 4648 url and filename safe alphabet, with `-` and `_`. */\n static URL_SAFE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';\n /**\n * @param {ArrayBuffer} arrayBuffer\n * @param {string} [dialect] one of Base64.STANDARD or Base64.URL_SAFE, URL_SAFE by default\n * @returns {string} the unpadded encoding\n */\n static encode(arrayBuffer, dialect) {\n const d = dialect || Base64.URL_SAFE;\n const len = arrayBuffer.byteLength;\n const view = new Uint8Array(arrayBuffer);\n let res = '';\n for (let i = 0; i < len; i += 3) {\n const v1 = d[view[i] >> 2];\n const v2 = d[((view[i] & 3) << 4) | (view[i + 1] >> 4)];\n const v3 = d[((view[i + 1] & 15) << 2) | (view[i + 2] >> 6)];\n const v4 = d[view[i + 2] & 63];\n res += v1 + v2 + v3 + v4;\n }\n if (len % 3 === 2) {\n res = res.substring(0, res.length - 1);\n } else if (len % 3 === 1) {\n res = res.substring(0, res.length - 2);\n }\n return res;\n }\n /**\n * @param {string} str padded or unpadded\n * @param {string} [dialect] one of Base64.STANDARD or Base64.URL_SAFE, URL_SAFE by default\n * @returns {ArrayBuffer}\n * @throws on padding anywhere but the tail or longer than two, on an\n * impossible length, and on a character outside the dialect\n */\n static decode(str, dialect) {\n const d = dialect || Base64.URL_SAFE;\n let end = str.length;\n while (end > 0 && str.charAt(end - 1) === '=') {\n --end;\n }\n const unpadded = str.substring(0, end);\n if (str.length - end > 2 || unpadded.includes('=') || (unpadded.length === 0 && str.length > 0)) {\n throw new Error('invalid padding');\n }\n if (unpadded.length % 4 === 1) {\n throw new Error('invalid length');\n }\n for (const c of unpadded) {\n if (d.indexOf(c) === -1) {\n throw new Error(`invalid character '${c}'`);\n }\n }\n const nbytes = Math.floor(unpadded.length * 0.75);\n const view = new Uint8Array(nbytes);\n\n let vi = 0;\n let si = 0;\n while (vi < nbytes) {\n const v1 = d.indexOf(unpadded.charAt(si++));\n const v2 = d.indexOf(unpadded.charAt(si++));\n const v3 = d.indexOf(unpadded.charAt(si++));\n const v4 = d.indexOf(unpadded.charAt(si++));\n view[vi++] = (v1 << 2) | (v2 >> 4);\n if (vi === nbytes) {\n break;\n }\n view[vi++] = ((v2 & 15) << 4) | (v3 >> 2);\n if (vi === nbytes) {\n break;\n }\n view[vi++] = ((v3 & 3) << 6) | v4;\n }\n\n return view.buffer;\n }\n}\n\n/**\n * Hex encoding and decoding over byte sequences, lowercase by default.\n */\nclass Hex {\n /**\n * @param {string} hex either case\n * @returns {Uint8Array}\n * @throws on an odd length or a character that is not a hex digit\n */\n static decode(hex) {\n if (hex.length % 2 !== 0) {\n throw new Error('invalid length');\n }\n if (!/^[0-9a-fA-F]*$/.test(hex)) {\n throw new Error('invalid character');\n }\n const lenInBytes = hex.length / 2;\n return new Uint8Array(lenInBytes).map((e, i) => {\n const offset = i * 2;\n const octet = hex.substring(offset, offset + 2);\n return parseInt(octet, 16);\n });\n }\n /**\n * @param {Iterable<number>|ArrayBuffer|ArrayBufferView} bytes octets, or\n * a buffer or view read as its bytes\n * @param {boolean} [upper] uppercase digits instead of lowercase\n * @returns {string} two digits per byte\n */\n static encode(bytes, upper) {\n let octets = /** @type {Iterable<number>} */ (bytes);\n if (bytes instanceof ArrayBuffer) {\n octets = new Uint8Array(bytes);\n }\n if (ArrayBuffer.isView(bytes)) {\n octets = new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n }\n return Array.from(octets)\n .map((b) => b.toString(16))\n .map((b) => (upper ? b.toUpperCase() : b))\n .map((o) => o.padStart(2, '0'))\n .join('');\n }\n}\n\nexport { Base64, Hex };\n","import { Failure } from './failure.mjs';\n\n/** A parsed `Content-Type`: the type and subtype without the parameters, so a comparison is not defeated by a charset. */\nclass MediaType {\n #type;\n #subtype;\n constructor(type, subtype) {\n this.#type = type;\n this.#subtype = subtype;\n }\n /** @returns {string} `type/subtype`, lowercase */\n get normalized() {\n return `${this.#type}/${this.#subtype}`;\n }\n /** @returns {string} */\n get type() {\n return this.#type;\n }\n /** @returns {string} */\n get subtype() {\n return this.#subtype;\n }\n /**\n * Parses a Content-Type header value into its type/subtype pair, dropping any parameter.\n * @param {string|null|undefined} v\n * @returns {MediaType} `unknown/unknown` for a missing or malformed value\n */\n static parse(v) {\n if (!v) {\n return new MediaType('unknown', 'unknown');\n }\n const [prefix, _] = v.split(';');\n const [ptype, psubtype] = prefix.trim().toLowerCase().split('/');\n if (!ptype || !psubtype) {\n return new MediaType('unknown', 'unknown');\n }\n return new MediaType(ptype, psubtype);\n }\n}\n\n/**\n * @typedef {Int8Array| Uint8Array| Uint8ClampedArray| Int16Array| Uint16Array| Int32Array| Uint32Array| Float32Array| Float64Array| BigInt64Array| BigUint64Array} TypedArray\n */\n/**\n * @typedef {object} HttpInterceptor\n * @property {(url: URL, init: RequestInit|undefined, chain: HttpInterceptorChain) => Promise<Response>} intercept\n */\n\n/**\n * A Failure from an http exchange, carrying the status that was served. Status\n * 0 means no response was served at all: the transport failed, or a body the\n * server did send could not be read.\n */\nclass HttpClientError extends Failure {\n /**\n * @param {string} message\n * @param {number} status\n * @param {{ type: string; context: string?; reason: string; details: any?; }[]} problems\n * @param {Error|undefined} [cause]\n */\n constructor(message, status, problems, cause) {\n super(message, problems, cause);\n this.name = 'HttpClientError';\n this.status = status;\n }\n /**\n * Returns a copy whose problems' contexts have the prefix removed, keeping\n * this error's status.\n * @param {string} prefix\n * @returns {HttpClientError}\n */\n dropping(prefix) {\n return new HttpClientError(this.message, this.status, Failure.dropProblemsContext(this.problems, prefix), this);\n }\n /**\n * A problem with no context and no details.\n * @param {string} type\n * @param {string} reason\n * @returns {{ type: string; context: null; reason: string; details: null; }}\n */\n static problem(type, reason) {\n return { type, context: null, reason, details: null };\n }\n /**\n * A failure with status 0 and one problem of the given type, whose reason is\n * the cause's message.\n * @param {string} type\n * @param {any} cause\n * @returns {HttpClientError}\n */\n static of(type, cause) {\n const reason = String(cause?.message ?? cause ?? 'unknown failure');\n return new HttpClientError(reason, 0, [HttpClientError.problem(type, reason)], cause);\n }\n /**\n * The failure an error response stands for, keeping its status. An\n * `application/failures+json` body is the problems list; an\n * `application/problem+json` body contributes its non-empty `problems`\n * array, or one GENERIC_PROBLEM made of whichever of its title and detail\n * it has. Any other body is one GENERIC_PROBLEM carrying the body text. A\n * json body that does not decode, or decodes to the wrong shape or to an\n * empty failures array, and a body that cannot be read at all, each\n * become one GENERIC_PROBLEM saying so.\n * @param {Response} response consumed\n * @returns {Promise<HttpClientError>}\n */\n static async fromResponse(response) {\n switch (MediaType.parse(response.headers.get('Content-Type')).normalized) {\n case 'application/failures+json': {\n const data = await response.json().catch(() => HttpClientError.#unreadable);\n if (data === HttpClientError.#unreadable) {\n return HttpClientError.#undecodable(response);\n }\n if (!Array.isArray(data)) {\n return HttpClientError.#undecodable(response, 'does not decode as a failures array');\n }\n if (data.length === 0) {\n return HttpClientError.#undecodable(response, 'carries no failures');\n }\n const message = `${response.status} ${response.statusText}: ${data.length} failures`;\n return new HttpClientError(message, response.status, data);\n }\n case 'application/problem+json': {\n const data = await response.json().catch(() => HttpClientError.#unreadable);\n if (data === HttpClientError.#unreadable) {\n return HttpClientError.#undecodable(response);\n }\n if (typeof data !== 'object' || data === null || Array.isArray(data)) {\n return HttpClientError.#undecodable(response, 'does not decode as a problem object');\n }\n const text = [data.title, data.detail].filter((part) => part !== undefined && part !== null).join(' ');\n const message = text\n ? `${response.status} ${response.statusText}: ${text}`\n : `${response.status} ${response.statusText}`;\n return new HttpClientError(\n message,\n response.status,\n Array.isArray(data.problems) && data.problems.length > 0\n ? data.problems\n : [HttpClientError.problem('GENERIC_PROBLEM', message)],\n );\n }\n default: {\n return HttpClientError.#generic(response);\n }\n }\n }\n static #unreadable = Symbol('unreadable body');\n /**\n * @param {Response} response\n * @param {string} [flaw] what is wrong with the body\n */\n static #undecodable(response, flaw = 'does not decode as json') {\n const mediaType = MediaType.parse(response.headers.get('Content-Type')).normalized;\n const message = `${response.status} ${response.statusText}: the ${mediaType} body ${flaw}`;\n return new HttpClientError(message, response.status, [HttpClientError.problem('GENERIC_PROBLEM', message)]);\n }\n static async #generic(response) {\n const text = await response.text().catch(() => null);\n const message =\n text === null\n ? `${response.status} ${response.statusText}: the body could not be read`\n : `${response.status} ${response.statusText}: ${text}`;\n return new HttpClientError(message, response.status, [HttpClientError.problem('GENERIC_PROBLEM', message)]);\n }\n}\n\nconst metaContent = (name) =>\n globalThis.document?.querySelector(`meta[name=\"${name}\"]`)?.getAttribute('content') ?? undefined;\n\n/**\n * Sends the csrf header named by the page's `_csrf_header` meta, with the token\n * from `_csrf`. Both are read per request, so metas replaced after the client\n * was built are honoured, and the header is sent to the page's own origin only.\n * @implements {HttpInterceptor}\n */\nclass CsrfTokenInterceptor {\n async intercept(url, request, chain) {\n if (url.origin !== (globalThis.window?.location?.origin ?? url.origin)) {\n return await chain.proceed(url, request);\n }\n const csrfHeader = metaContent('_csrf_header');\n const csrfToken = metaContent('_csrf');\n if (csrfHeader && csrfToken) {\n request.headers.set(csrfHeader, csrfToken);\n }\n return await chain.proceed(url, request);\n }\n}\n/**\n * Navigates to a login url when a response comes back 401. The promise it\n * returns never settles, so callers keep waiting while the page unloads\n * instead of showing a failure; where the navigation is blocked, as by a\n * beforeunload prompt, they stay pending until the page leaves.\n * @implements {HttpInterceptor}\n */\nclass RedirectOnUnauthorizedInterceptor {\n #redirectUri;\n /**\n * @param {string} redirectUri\n */\n constructor(redirectUri) {\n this.#redirectUri = redirectUri;\n }\n async intercept(url, request, chain) {\n const response = await chain.proceed(url, request);\n if (response.status === 401) {\n window.location.href = this.#redirectUri;\n return new Promise(() => {});\n }\n return response;\n }\n}\n\n/** Collects the interceptors an HttpClient will run, in the order they are added. */\nclass HttpClientBuilder {\n /**\n * @type {HttpInterceptor[]}\n */\n #interceptors;\n constructor() {\n this.#interceptors = [];\n }\n /**\n * Adds the CsrfTokenInterceptor.\n * @returns {HttpClientBuilder} this builder\n */\n withCsrfToken() {\n this.#interceptors.push(new CsrfTokenInterceptor());\n return this;\n }\n /**\n * Adds the RedirectOnUnauthorizedInterceptor.\n * @param {string} redirectUri where a 401 navigates to\n * @returns {HttpClientBuilder} this builder\n */\n withRedirectOnUnauthorized(redirectUri) {\n this.#interceptors.push(new RedirectOnUnauthorizedInterceptor(redirectUri));\n return this;\n }\n /**\n * Adds interceptors, run in the order given after the ones added before.\n * @param {...HttpInterceptor} interceptors\n * @returns {HttpClientBuilder} this builder\n */\n withInterceptors(...interceptors) {\n this.#interceptors.push(...interceptors);\n return this;\n }\n /** @returns {HttpClient} a client running the interceptors added so far */\n build() {\n return new HttpClient([...this.#interceptors]);\n }\n}\n\n/**\n * The last interceptor in every chain, performing the request with fetch. A\n * fetch rejection becomes an HttpClientError with a CONNECTION_PROBLEM.\n * @implements {HttpInterceptor}\n */\nclass HttpCall {\n async intercept(url, request, chain) {\n try {\n return await fetch(url, request);\n } catch (ex) {\n throw HttpClientError.of('CONNECTION_PROBLEM', ex);\n }\n }\n}\n\n/** One request's position in the interceptor list: `proceed` runs the next interceptor, the last of which performs the request. */\nclass HttpInterceptorChain {\n #interceptors;\n #current;\n /**\n * @param {HttpInterceptor[]} interceptors\n * @param {number} current the index of the interceptor `proceed` runs\n */\n constructor(interceptors, current) {\n this.#interceptors = interceptors;\n this.#current = current;\n }\n /**\n * Runs the next interceptor.\n * @param {URL} url\n * @param {RequestInit} request\n * @returns {Promise<Response>}\n */\n async proceed(url, request) {\n const interceptor = this.#interceptors[this.#current];\n return await interceptor.intercept(\n url,\n request,\n new HttpInterceptorChain(this.#interceptors, this.#current + 1),\n );\n }\n}\n\n/**\n * Performs http requests through a fixed list of interceptors. The verbs\n * return a request builder; `exchange` is the lower-level entry that returns\n * the Response itself without treating an error status as a failure.\n */\nclass HttpClient {\n #interceptors;\n /**\n * Creates a builder for an HttpClient.\n * @returns {HttpClientBuilder} the client builder\n */\n static builder() {\n return new HttpClientBuilder();\n }\n /**\n * Creates an HttpClient.\n * @param {HttpInterceptor[]|undefined} interceptors - a list of interceptors to be registered for every request performed by the created client.\n */\n constructor(interceptors) {\n this.#interceptors = interceptors || [];\n }\n /**\n * Performs an HTTP exchange through the client's interceptors, then the\n * given ones.\n * @param {string} uri the request url, relative to the page's\n * @param {RequestInit|undefined} options fetch options\n * @param {HttpInterceptor[]|undefined} interceptors run for this exchange only\n * @returns {Promise<Response>} the response, whatever its status; rejecting\n * with an HttpClientError CONNECTION_PROBLEM when the transport fails, or\n * with what an interceptor throws\n */\n async exchange(uri, options, interceptors) {\n const is = [...this.#interceptors, ...(interceptors || []), new HttpCall()];\n const chain = new HttpInterceptorChain(is, 0);\n const url = new URL(new Request(uri).url);\n const request = { ...options, headers: new Headers(options?.headers) };\n return await chain.proceed(url, request);\n }\n /**\n * Starts a request with any method.\n * @param {string} method\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n request(method, uri) {\n return HttpRequestBuilder.create(this, method, uri);\n }\n /**\n * Starts a GET request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n get(uri) {\n return HttpRequestBuilder.create(this, 'GET', uri);\n }\n /**\n * Starts a HEAD request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n head(uri) {\n return HttpRequestBuilder.create(this, 'HEAD', uri);\n }\n /**\n * Starts a POST request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n post(uri) {\n return HttpRequestBuilder.create(this, 'POST', uri);\n }\n /**\n * Starts a PUT request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n put(uri) {\n return HttpRequestBuilder.create(this, 'PUT', uri);\n }\n /**\n * Starts a PATCH request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n patch(uri) {\n return HttpRequestBuilder.create(this, 'PATCH', uri);\n }\n /**\n * Starts a DELETE request.\n * @param {string} uri the request url, relative to the page's; a query and a fragment in it are kept\n * @returns {HttpRequestBuilder}\n */\n delete(uri) {\n return HttpRequestBuilder.create(this, 'DELETE', uri);\n }\n}\n\n/**\n * Reads the response body as the given type, wrapping a failed read as an UNMARSHALING_PROBLEM.\n * @param {Response} response\n * @param {'text'|'json'|'blob'|'arrayBuffer'} type\n * @returns {Promise<any>}\n */\nconst unmarshal = async (response, type) => {\n try {\n return await response[type]();\n } catch (ex) {\n throw HttpClientError.of('UNMARSHALING_PROBLEM', ex);\n }\n};\n\n/**\n * The entries of a headers or params initializer with nullish values kept as they are.\n * @param {any} source\n * @returns {Iterable<[string, any]>}\n */\nconst rawEntries = (source) => {\n if (source == null) {\n return [];\n }\n if (typeof source === 'string') {\n return new URLSearchParams(source);\n }\n if (typeof source[Symbol.iterator] === 'function') {\n return source;\n }\n return Object.entries(source);\n};\n\n/**\n * One request under construction: method, url, parameters, headers and body,\n * with a `fetch*` method per body type. Every configuration method returns the\n * builder, and a `fetch*` rejects with an HttpClientError for any status\n * outside 200-299.\n */\nclass HttpRequestBuilder {\n #client;\n #method;\n #uri;\n #params;\n #headers;\n #body;\n #options;\n #interceptors;\n #fragment;\n /**\n * A builder for the url: its query becomes the initial params, split at the\n * first `?`, and its fragment, from the first `#`, is kept for the final url.\n * @param {HttpClient} client\n * @param {string} method\n * @param {string} uri\n * @returns {HttpRequestBuilder}\n */\n static create(client, method, uri) {\n const hashIndex = uri.indexOf('#');\n const fragment = hashIndex === -1 ? '' : uri.slice(hashIndex);\n const withoutFragment = hashIndex === -1 ? uri : uri.slice(0, hashIndex);\n const queryIndex = withoutFragment.indexOf('?');\n return new HttpRequestBuilder(\n client,\n method,\n queryIndex === -1 ? withoutFragment : withoutFragment.slice(0, queryIndex),\n new URLSearchParams(queryIndex === -1 ? '' : withoutFragment.slice(queryIndex + 1)),\n new Headers(),\n undefined,\n {},\n [],\n fragment,\n );\n }\n /**\n * @param {HttpClient} client\n * @param {string} method\n * @param {string} uri the url without query and fragment\n * @param {URLSearchParams} params\n * @param {Headers} headers\n * @param {any} body\n * @param {Omit<RequestInit,\"headers\"|\"method\"|\"body\">} options\n * @param {HttpInterceptor[]} interceptors\n * @param {string} [fragment]\n */\n constructor(client, method, uri, params, headers, body, options, interceptors, fragment = '') {\n this.#client = client;\n this.#method = method;\n this.#uri = uri;\n this.#params = params;\n this.#body = body;\n this.#headers = headers;\n this.#options = options;\n this.#interceptors = interceptors;\n this.#fragment = fragment;\n }\n /**\n * Sets each header, replacing a header of the same name; a null or undefined value removes it.\n * @param {HeadersInit|Record<string,string|null|undefined>} hs\n * @returns {HttpRequestBuilder} this builder\n */\n headers(hs) {\n for (const [k, v] of rawEntries(hs)) {\n this.header(k, v);\n }\n return this;\n }\n /**\n * Sets a header, replacing one of the same name; a null or undefined value removes it.\n * @param {string} k\n * @param {string|null|undefined} v\n * @returns {HttpRequestBuilder} this builder\n */\n header(k, v) {\n if (v == null) {\n this.#headers.delete(k);\n } else {\n this.#headers.set(k, v);\n }\n return this;\n }\n /**\n * Sets each query parameter in place, replacing a parameter of the same name; a null or undefined value removes it.\n * @param {URLSearchParams|Record<string,string|null|undefined>|string[][]|string} ps\n * @returns {HttpRequestBuilder} this builder\n */\n params(ps) {\n for (const [k, v] of rawEntries(ps)) {\n if (v == null) {\n this.#params.delete(k);\n } else {\n this.#params.set(k, v);\n }\n }\n return this;\n }\n /**\n * Sets a query parameter to the values given, as repeated entries moved to the end of the query; nullish values are skipped, and none left removes the parameter.\n * @param {string} k\n * @param {...string} vs\n * @returns {HttpRequestBuilder} this builder\n */\n param(k, ...vs) {\n this.#params.delete(k);\n for (const v of vs.filter((v) => v != null)) {\n this.#params.append(k, v);\n }\n return this;\n }\n /**\n * Sets the request body.\n * `Content-Type: multipart/form-data` header is automatically added by fetch when data is a FormData instance if not explicitly set.\n * `Content-Type: application/x-www-form-urlencoded` header is automatically added by fetch when data is an URLSearchParams instance if not explicitly set.\n * `Content-Type: text/plain` header is automatically added by fetch when data is a string instance if not explicitly set.\n * @param {string|ArrayBuffer|Blob|DataView|File|FormData|TypedArray|URLSearchParams|ReadableStream} data\n * @returns {HttpRequestBuilder} this builder\n */\n body(data) {\n this.#body = data;\n return this;\n }\n /**\n * Sets the request body that will be serialized as json. Calling this method adds the `Content-Type application/json` header for the request.\n * @param {any} body - the body to be serialized as json\n * @returns {HttpRequestBuilder} this builder\n */\n json(body) {\n if (body === undefined) {\n return this;\n }\n const serialized = JSON.stringify(body);\n this.#headers.set('Content-Type', 'application/json');\n this.#body = serialized;\n return this;\n }\n /**\n * Sets the request body as a FormData configured using the callback.\n * `Content-Type: multipart/form-data` header is automatically added by fetch if not explicitly set.\n * @param {(c: HttpMultipartRequestCustomizer) => void} callback\n * @returns {HttpRequestBuilder} this builder\n */\n multipart(callback) {\n const formData = new FormData();\n const builder = new HttpMultipartRequestCustomizer(formData);\n callback(builder);\n this.#body = formData;\n return this;\n }\n /**\n * Merges fetch options into the request's.\n * @param {Omit<RequestInit,\"headers\"|\"method\"|\"body\">} kvs\n * @returns {HttpRequestBuilder} this builder\n */\n options(kvs) {\n for (const [k, v] of Object.entries(kvs)) {\n this.#options[k] = v;\n }\n return this;\n }\n /**\n * Sets a fetch option for the request.\n * @param {keyof Omit<RequestInit,\"headers\"|\"method\"|\"body\">} k\n * @param {*} v\n * @returns {HttpRequestBuilder} this builder\n */\n option(k, v) {\n this.#options[k] = v;\n return this;\n }\n /**\n * Adds interceptors run for this request only, after the client's.\n * @param {HttpInterceptor[]} is\n * @returns {HttpRequestBuilder} this builder\n */\n interceptors(is) {\n for (const i of is) {\n this.#interceptors.push(i);\n }\n return this;\n }\n /**\n * Adds one interceptor run for this request only, after the client's.\n * @param {HttpInterceptor} i\n * @returns {HttpRequestBuilder} this builder\n */\n interceptor(i) {\n this.#interceptors.push(i);\n return this;\n }\n /**\n * Sends the request and answers the Response, whatever its status.\n * @returns {Promise<Response>} rejecting as `HttpClient.exchange` does\n */\n async exchange() {\n const query = this.#params.size ? `?${this.#params}` : '';\n const opts = {\n ...this.#options,\n headers: this.#headers,\n method: this.#method,\n body: this.#body,\n };\n return await this.#client.exchange(`${this.#uri}${query}${this.#fragment}`, opts, this.#interceptors);\n }\n /**\n * Sends the request and answers the Response when its status is 200-299.\n * Always rejects with an HttpClientError: `HttpClientError.fromResponse`\n * for an error status, CONNECTION_PROBLEM for a transport failure, and\n * UNEXPECTED_PROBLEM, carrying the error as its cause, for anything an\n * interceptor throws that is not already a Failure.\n * @returns {Promise<Response>}\n */\n async fetch() {\n try {\n const response = await this.exchange();\n if (!response.ok) {\n throw await HttpClientError.fromResponse(response);\n }\n return response;\n } catch (ex) {\n if (ex instanceof Failure) {\n throw ex;\n }\n throw HttpClientError.of('UNEXPECTED_PROBLEM', ex);\n }\n }\n /**\n * `fetch()`, then the body as text; a body that cannot be read rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<string>}\n */\n async fetchText() {\n const response = await this.fetch();\n return await unmarshal(response, 'text');\n }\n /**\n * `fetch()`, then the body parsed as json. A 204 yields null without reading\n * the body; any other body that does not parse rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<any>}\n */\n async fetchJson() {\n const response = await this.fetch();\n if (response.status === 204) {\n return null;\n }\n return await unmarshal(response, 'json');\n }\n /**\n * `fetch()`, then the body as a Blob; a body that cannot be read rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<Blob>}\n */\n async fetchBlob() {\n const response = await this.fetch();\n return await unmarshal(response, 'blob');\n }\n /**\n * `fetch()`, then the body as an ArrayBuffer; a body that cannot be read rejects with UNMARSHALING_PROBLEM.\n * @returns {Promise<ArrayBuffer>}\n */\n async fetchArrayBuffer() {\n const response = await this.fetch();\n return await unmarshal(response, 'arrayBuffer');\n }\n}\n\n/** Builds a multipart body: text fields, json parts, and single or repeated blobs. */\nclass HttpMultipartRequestCustomizer {\n #formData;\n /** @param {FormData} formData the body being built */\n constructor(formData) {\n this.#formData = formData;\n }\n /**\n * Appends a value to the FormData.\n * @param {string} name\n * @param {*} value\n * @returns {HttpMultipartRequestCustomizer} this builder\n */\n field(name, value) {\n this.#formData.append(name, value);\n return this;\n }\n /**\n * Appends a Blob to the FormData. Without a filename a File keeps its own\n * and any other Blob is named \"blob\".\n * @param {string} name\n * @param {Blob} value\n * @param {string} [filename]\n * @returns {HttpMultipartRequestCustomizer} this builder\n */\n blob(name, value, filename) {\n this.#formData.append(name, value, filename);\n return this;\n }\n /**\n * Appends each Blob under the same name, a File keeping its own filename and\n * any other Blob named \"blob\".\n * @param {string} name\n * @param {Blob[]} values\n * @returns {HttpMultipartRequestCustomizer} this builder\n */\n blobs(name, values) {\n for (const v of values) {\n this.#formData.append(name, v);\n }\n return this;\n }\n /**\n * Appends the value serialized as an `application/json` blob.\n * @param {string} name\n * @param {any} value\n * @param {string} [filename]\n * @returns {HttpMultipartRequestCustomizer} this builder\n */\n json(name, value, filename) {\n const blob = new Blob([JSON.stringify(value)], { type: 'application/json' });\n this.#formData.append(name, blob, filename);\n return this;\n }\n}\n\nexport {\n MediaType,\n HttpClient,\n HttpClientBuilder,\n HttpClientError,\n HttpInterceptorChain,\n HttpRequestBuilder,\n HttpMultipartRequestCustomizer,\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,OAAO,SAAS,KAAK,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE;AAC1C,QAAQ,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC;AACjC,QAAQ,IAAI,CAAC,IAAI,GAAG,SAAS;AAC7B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ;AAChC,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,QAAQ,CAAC,MAAM,EAAE;AACrB,QAAQ,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC;AAClG,IA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A;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;AAChC,QAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC;AACpD,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE;AACxB,QAAQ,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE;AAChC,YAAY,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC1C,QAAQ;AACR,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;AAChC,QAAQ,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;AACpF,QAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC;AACnD,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ;;"}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"name": "ful-drawer",
|
|
46
|
-
"description": "A side panel drawer on the native dialog platform: a header with its title (the header attribute, or update()'s own) and close button, and a body that
|
|
46
|
+
"description": "A side panel drawer on the native dialog platform: a header with its title (the header attribute, or update()'s own) and close button, and a body that shows the slotted content or, under update(header, callback), opens in a loading state and then shows either the content the callback delivered or the error a rejecting callback carries. placement picks the side, end by default, start its mirror. open()/ask() answer with how the drawer ended, as a ful-dialog's do, an ask() on a drawer update() opened waiting for that opening's ending; dismiss(reason) dismisses it as the close button would, refusable and guarded alike, answering whether it closed. Any element carrying dialog-target set to its id opens it too.",
|
|
47
47
|
"attributes": [
|
|
48
48
|
{
|
|
49
49
|
"name": "header",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
"name": "keep",
|
|
202
|
-
"description": "A regular expression naming the
|
|
202
|
+
"description": "A regular expression naming what survives: on every input event the whole value is filtered to its matches, concatenated, so keep=\"[0-9]\" is digits only. It matches rather than negating, so it takes a pattern and not only a character class, and the pattern must match each partial value typed on the way to a complete one. (string)"
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
"name": "reject",
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
},
|
|
258
258
|
{
|
|
259
259
|
"name": "keep",
|
|
260
|
-
"description": "A regular expression naming the
|
|
260
|
+
"description": "A regular expression naming what survives: on every input event the whole value is filtered to its matches, concatenated, so keep=\"[0-9]\" is digits only. It matches rather than negating, so it takes a pattern and not only a character class, and the pattern must match each partial value typed on the way to a complete one. (string)"
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
263
|
"name": "reject",
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
},
|
|
372
372
|
{
|
|
373
373
|
"name": "keep",
|
|
374
|
-
"description": "A regular expression naming the
|
|
374
|
+
"description": "A regular expression naming what survives: on every input event the whole value is filtered to its matches, concatenated, so keep=\"[0-9]\" is digits only. It matches rather than negating, so it takes a pattern and not only a character class, and the pattern must match each partial value typed on the way to a complete one. (string)"
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
"name": "reject",
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
},
|
|
442
442
|
{
|
|
443
443
|
"name": "keep",
|
|
444
|
-
"description": "A regular expression naming the
|
|
444
|
+
"description": "A regular expression naming what survives: on every input event the whole value is filtered to its matches, concatenated, so keep=\"[0-9]\" is digits only. It matches rather than negating, so it takes a pattern and not only a character class, and the pattern must match each partial value typed on the way to a complete one. (string)"
|
|
445
445
|
},
|
|
446
446
|
{
|
|
447
447
|
"name": "reject",
|
|
@@ -511,7 +511,7 @@
|
|
|
511
511
|
},
|
|
512
512
|
{
|
|
513
513
|
"name": "keep",
|
|
514
|
-
"description": "A regular expression naming the
|
|
514
|
+
"description": "A regular expression naming what survives: on every input event the whole value is filtered to its matches, concatenated, so keep=\"[0-9]\" is digits only. It matches rather than negating, so it takes a pattern and not only a character class, and the pattern must match each partial value typed on the way to a complete one. (string)"
|
|
515
515
|
},
|
|
516
516
|
{
|
|
517
517
|
"name": "reject",
|
|
@@ -607,7 +607,7 @@
|
|
|
607
607
|
},
|
|
608
608
|
{
|
|
609
609
|
"name": "autoload",
|
|
610
|
-
"description": "Loads the first page while upgrading, instead of waiting for a reload(). The load is not awaited, so a slow or failing loader cannot hold up the page. (boolean)"
|
|
610
|
+
"description": "Loads the first page while upgrading, instead of waiting for a reload(). With a filters slot the load goes through the filter form's submit, so its submit listeners shape it as they shape the later loads. The load is not awaited, so a slow or failing loader cannot hold up the page. (boolean)"
|
|
611
611
|
},
|
|
612
612
|
{
|
|
613
613
|
"name": "page-size",
|
|
@@ -669,7 +669,7 @@
|
|
|
669
669
|
},
|
|
670
670
|
{
|
|
671
671
|
"name": "keep",
|
|
672
|
-
"description": "A regular expression naming the
|
|
672
|
+
"description": "A regular expression naming what survives: on every input event the whole value is filtered to its matches, concatenated, so keep=\"[0-9]\" is digits only. It matches rather than negating, so it takes a pattern and not only a character class, and the pattern must match each partial value typed on the way to a complete one. (string)"
|
|
673
673
|
},
|
|
674
674
|
{
|
|
675
675
|
"name": "reject",
|
|
@@ -735,7 +735,7 @@
|
|
|
735
735
|
},
|
|
736
736
|
{
|
|
737
737
|
"name": "keep",
|
|
738
|
-
"description": "A regular expression naming the
|
|
738
|
+
"description": "A regular expression naming what survives: on every input event the whole value is filtered to its matches, concatenated, so keep=\"[0-9]\" is digits only. It matches rather than negating, so it takes a pattern and not only a character class, and the pattern must match each partial value typed on the way to a complete one. (string)"
|
|
739
739
|
},
|
|
740
740
|
{
|
|
741
741
|
"name": "reject",
|
|
@@ -801,7 +801,7 @@
|
|
|
801
801
|
},
|
|
802
802
|
{
|
|
803
803
|
"name": "keep",
|
|
804
|
-
"description": "A regular expression naming the
|
|
804
|
+
"description": "A regular expression naming what survives: on every input event the whole value is filtered to its matches, concatenated, so keep=\"[0-9]\" is digits only. It matches rather than negating, so it takes a pattern and not only a character class, and the pattern must match each partial value typed on the way to a complete one. (string)"
|
|
805
805
|
},
|
|
806
806
|
{
|
|
807
807
|
"name": "reject",
|
|
@@ -893,7 +893,7 @@
|
|
|
893
893
|
},
|
|
894
894
|
{
|
|
895
895
|
"name": "keep",
|
|
896
|
-
"description": "A regular expression naming the
|
|
896
|
+
"description": "A regular expression naming what survives: on every input event the whole value is filtered to its matches, concatenated, so keep=\"[0-9]\" is digits only. It matches rather than negating, so it takes a pattern and not only a character class, and the pattern must match each partial value typed on the way to a complete one. (string)"
|
|
897
897
|
},
|
|
898
898
|
{
|
|
899
899
|
"name": "reject",
|
|
@@ -1027,7 +1027,7 @@
|
|
|
1027
1027
|
},
|
|
1028
1028
|
{
|
|
1029
1029
|
"name": "item-list",
|
|
1030
|
-
"description": "Shows the selection as a ful-item-list under the control
|
|
1030
|
+
"description": "Shows the selection as a ful-item-list under the control. For a multiple select the list replaces the ful-badge chips, which it hides; a single select keeps its label in the field as well. (boolean)"
|
|
1031
1031
|
},
|
|
1032
1032
|
{
|
|
1033
1033
|
"name": "src",
|
|
@@ -1109,7 +1109,7 @@
|
|
|
1109
1109
|
},
|
|
1110
1110
|
{
|
|
1111
1111
|
"name": "item-list",
|
|
1112
|
-
"description": "Shows the selection as a ful-item-list under the control
|
|
1112
|
+
"description": "Shows the selection as a ful-item-list under the control. For a multiple select the list replaces the ful-badge chips, which it hides; a single select keeps its label in the field as well. (boolean)"
|
|
1113
1113
|
},
|
|
1114
1114
|
{
|
|
1115
1115
|
"name": "src",
|