@optionfactory/fml 9.0.0-rc13 → 9.0.0-rc15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client-errors.iife.js +6 -11
- 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 +71 -10
- package/dist/fml.css +6 -5
- package/dist/fml.css.map +1 -1
- package/dist/fml.iife.js +658 -117
- 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.iife.js +2 -2
- 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 +2 -2
- package/dist/ftl.mjs.map +1 -1
- package/dist/ful.css +6 -5
- package/dist/ful.css.map +1 -1
- package/dist/ful.d.mts +110 -8
- package/dist/ful.iife.js +655 -115
- 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 +655 -116
- package/dist/ful.mjs.map +1 -1
- package/dist/vscode.html-custom-data.json +37 -7
- package/dist/web-types.json +67 -11
- package/package.json +1 -1
package/dist/ful.d.mts
CHANGED
|
@@ -303,6 +303,8 @@ declare class Field extends ParsedElement {
|
|
|
303
303
|
* @param {string} [context] the path below this field's name, '' when exact
|
|
304
304
|
*/
|
|
305
305
|
setCustomValidity(error?: string, context?: string): void;
|
|
306
|
+
/** The form the platform associated the field with, null outside one: a native control's own `form`. */
|
|
307
|
+
get form(): HTMLFormElement | null;
|
|
306
308
|
/** Submits the associated form through its first submitter, as Enter on a native control would. */
|
|
307
309
|
_requestSubmit(): void;
|
|
308
310
|
/**
|
|
@@ -632,8 +634,10 @@ declare class Anchors {
|
|
|
632
634
|
* the popover, giving toggle and light dismiss with no script of your own
|
|
633
635
|
* @param {boolean} [options.expanded] keeps the invoker's `aria-expanded` in
|
|
634
636
|
* step with the popover
|
|
635
|
-
* @param {boolean} [options.stretch] widens the popover to
|
|
636
|
-
* is what a combobox
|
|
637
|
+
* @param {boolean} [options.stretch] widens the popover to at least its
|
|
638
|
+
* invoker's width, capped by its own `max-width`, which is what a combobox
|
|
639
|
+
* dropdown wants; it flips above the invoker where the viewport leaves no
|
|
640
|
+
* room below
|
|
637
641
|
* @param {boolean} [options.handPlace] places here on every platform rather
|
|
638
642
|
* than only as a fallback, which a popover asks for when it needs to know
|
|
639
643
|
* where its invoker ended up: the tooltip's note points a callout at it, and
|
|
@@ -648,6 +652,36 @@ declare class Anchors {
|
|
|
648
652
|
stretch?: boolean;
|
|
649
653
|
handPlace?: boolean;
|
|
650
654
|
}): void;
|
|
655
|
+
/**
|
|
656
|
+
* Shows and places a popover beside an anchor, once: the popover shared by
|
|
657
|
+
* many invokers, each open handing over its own anchor, and an anchor that
|
|
658
|
+
* is a rectangle rather than an element, one read out of an iframe being
|
|
659
|
+
* the case a paired invoker could not cover. No pairing, no reflow
|
|
660
|
+
* following, no close wiring: closing is the caller's, or the platform's
|
|
661
|
+
* for a light-dismissing popover.
|
|
662
|
+
*
|
|
663
|
+
* The placement is the menus' own geometry, below the anchor and
|
|
664
|
+
* start-aligned, clamped into the viewport; `flip` moves it above the
|
|
665
|
+
* anchor where the viewport leaves no room below, as the css
|
|
666
|
+
* `position-try-fallbacks` the paired popovers declare. A popover not
|
|
667
|
+
* already open is shown and placed before the call returns, so the first
|
|
668
|
+
* position anybody sees is the right one and the caller can move the focus
|
|
669
|
+
* into it on the next line.
|
|
670
|
+
*
|
|
671
|
+
* @param {HTMLElement} popover the `[popover]` element to show, or an
|
|
672
|
+
* already-shown element to place
|
|
673
|
+
* @param {Element|DOMRect} anchor the element, or the rectangle, to place
|
|
674
|
+
* beside
|
|
675
|
+
* @param {object} [options]
|
|
676
|
+
* @param {boolean} [options.flip] place above the anchor where no room is
|
|
677
|
+
* left below
|
|
678
|
+
* @param {number} [options.gap] the distance from the anchor, in pixels
|
|
679
|
+
* @returns {HTMLElement} the popover
|
|
680
|
+
*/
|
|
681
|
+
static show(popover: HTMLElement, anchor: Element | DOMRect, { flip, gap }?: {
|
|
682
|
+
flip?: boolean;
|
|
683
|
+
gap?: number;
|
|
684
|
+
}): HTMLElement;
|
|
651
685
|
}
|
|
652
686
|
/**
|
|
653
687
|
* Fetches a select's whole vocabulary from a url and serves every later read
|
|
@@ -765,6 +799,7 @@ declare class Select extends Field {
|
|
|
765
799
|
#private;
|
|
766
800
|
static attributes: string[];
|
|
767
801
|
static observed: string[];
|
|
802
|
+
unmarshal(attr: any, str: any): any;
|
|
768
803
|
static slots: boolean;
|
|
769
804
|
static template: string;
|
|
770
805
|
static templates: {
|
|
@@ -969,7 +1004,9 @@ export type FilterCriterion = {
|
|
|
969
1004
|
* the data-jpa compare annotations.
|
|
970
1005
|
*/
|
|
971
1006
|
declare class CompareFilter extends Input {
|
|
1007
|
+
#private;
|
|
972
1008
|
static observed: string[];
|
|
1009
|
+
static attributes: string[];
|
|
973
1010
|
static OPERATORS: string[];
|
|
974
1011
|
static DEFAULT_OPERATOR: string;
|
|
975
1012
|
static template: string;
|
|
@@ -1030,7 +1067,9 @@ declare class NumberFilter extends CompareFilter {
|
|
|
1030
1067
|
}
|
|
1031
1068
|
/** The compare filter over text, carrying a case sensitivity beside the operator. */
|
|
1032
1069
|
declare class TextFilter extends CompareFilter {
|
|
1070
|
+
#private;
|
|
1033
1071
|
static observed: string[];
|
|
1072
|
+
static attributes: string[];
|
|
1034
1073
|
static template: string;
|
|
1035
1074
|
_defaultOperator(): string;
|
|
1036
1075
|
_vocabulary(): string[];
|
|
@@ -1078,6 +1117,7 @@ declare class BooleanFilter extends Field {
|
|
|
1078
1117
|
_vocabulary(): string[];
|
|
1079
1118
|
get value(): any[] | null;
|
|
1080
1119
|
set value(v: any[] | null);
|
|
1120
|
+
formResetCallback(): void;
|
|
1081
1121
|
/** @returns {FilterCriterion|null} */
|
|
1082
1122
|
get criterion(): FilterCriterion | null;
|
|
1083
1123
|
get disabled(): boolean;
|
|
@@ -1181,6 +1221,43 @@ declare class Dialog extends ParsedElement {
|
|
|
1181
1221
|
*/
|
|
1182
1222
|
refresh(): Promise<any[] | undefined>;
|
|
1183
1223
|
close(result: any): void;
|
|
1224
|
+
/**
|
|
1225
|
+
* Asks a question in a dialog of the page's own, resolving with its outcome
|
|
1226
|
+
* and removing the element afterwards: the element stays the author's when
|
|
1227
|
+
* the question lives in the page, while a question asked from a button had
|
|
1228
|
+
* to build, render, show, answer and clean up by hand.
|
|
1229
|
+
*
|
|
1230
|
+
* The body is text or a node: a string is never read as markup, an
|
|
1231
|
+
* `innerHTML` sink being a thing the library does not carry. Each button is
|
|
1232
|
+
* a `[result, label, className?]` tuple rendered as its answer, or a node
|
|
1233
|
+
* the caller has built itself, which is how a button carries anything a
|
|
1234
|
+
* tuple cannot say and how a footer gets a spacer.
|
|
1235
|
+
* @param {string} header
|
|
1236
|
+
* @param {string|Node} body
|
|
1237
|
+
* @param {([string, string, string?]|Node)[]} [buttons]
|
|
1238
|
+
* @param {{ className?: string }} [options] `className` dresses the dialog,
|
|
1239
|
+
* the way a declared `ful-dialog` is given one to size it
|
|
1240
|
+
* @returns {Promise<DialogOutcome>}
|
|
1241
|
+
*/
|
|
1242
|
+
static ask(header: string, body: string | Node, buttons?: ([string, string, string?] | Node)[], { className }?: {
|
|
1243
|
+
className?: string;
|
|
1244
|
+
}): Promise<DialogOutcome>;
|
|
1245
|
+
/**
|
|
1246
|
+
* Asks a yes/no question, resolving with the confirm button's answer:
|
|
1247
|
+
* the cancel button, the close button and Escape all answer false, a
|
|
1248
|
+
* dismissal being the negative.
|
|
1249
|
+
* @param {string} header
|
|
1250
|
+
* @param {string|Node} body
|
|
1251
|
+
* @param {{ confirm?: string, cancel?: string }} [labels] overriding the localized defaults
|
|
1252
|
+
* @param {{ className?: string }} [options] as `ask` takes them
|
|
1253
|
+
* @returns {Promise<boolean>}
|
|
1254
|
+
*/
|
|
1255
|
+
static confirm(header: string, body: string | Node, labels?: {
|
|
1256
|
+
confirm?: string;
|
|
1257
|
+
cancel?: string;
|
|
1258
|
+
}, options?: {
|
|
1259
|
+
className?: string;
|
|
1260
|
+
}): Promise<boolean>;
|
|
1184
1261
|
}
|
|
1185
1262
|
/**
|
|
1186
1263
|
* A side panel drawer on the native dialog platform, update() owning its
|
|
@@ -1199,15 +1276,15 @@ declare class Drawer extends ParsedElement {
|
|
|
1199
1276
|
render({ slots }: {
|
|
1200
1277
|
slots: any;
|
|
1201
1278
|
}): void;
|
|
1202
|
-
get
|
|
1203
|
-
set
|
|
1279
|
+
get header(): any;
|
|
1280
|
+
set header(v: any);
|
|
1204
1281
|
/**
|
|
1205
|
-
* Opens the drawer under the given
|
|
1282
|
+
* Opens the drawer under the given header and waits for the callback: a
|
|
1206
1283
|
* resolved value paints the content section (which is returned), a
|
|
1207
1284
|
* rejection paints the problems and travels to the caller, and an update
|
|
1208
1285
|
* superseded by a newer one paints nothing.
|
|
1209
1286
|
*/
|
|
1210
|
-
update(
|
|
1287
|
+
update(header: any, cb: any): Promise<any>;
|
|
1211
1288
|
/**
|
|
1212
1289
|
* Re-fires section:requested on the content, open or closed: the explicit
|
|
1213
1290
|
* request for a body that wants refreshing. A failed refresh paints its
|
|
@@ -1217,6 +1294,26 @@ declare class Drawer extends ParsedElement {
|
|
|
1217
1294
|
open(): void;
|
|
1218
1295
|
close(): void;
|
|
1219
1296
|
}
|
|
1297
|
+
/**
|
|
1298
|
+
* A menu of commands on the native popover platform: the invoker named by
|
|
1299
|
+
* `for` toggles it and light dismiss and Escape come from the browser, while
|
|
1300
|
+
* the element adds the menu semantics and the keyboard protocol.
|
|
1301
|
+
*
|
|
1302
|
+
* The items are the buttons and links written inside it, kept as they are and
|
|
1303
|
+
* given their menu role and their place in the roving focus. Activation is the
|
|
1304
|
+
* item's own click, which the element only follows by closing.
|
|
1305
|
+
*/
|
|
1306
|
+
declare class Menu extends ParsedElement {
|
|
1307
|
+
#private;
|
|
1308
|
+
static attributes: string[];
|
|
1309
|
+
render(): void;
|
|
1310
|
+
/**
|
|
1311
|
+
* The commands, in the order the arrows walk them: the menu's own buttons
|
|
1312
|
+
* and links, minus the disabled and hidden ones, which keep their role and
|
|
1313
|
+
* leave the walk.
|
|
1314
|
+
*/
|
|
1315
|
+
get items(): HTMLElement[];
|
|
1316
|
+
}
|
|
1220
1317
|
/** A transient feedback region: each show() stacks a toast that retires on its own timer. */
|
|
1221
1318
|
declare class Toasts extends ParsedElement {
|
|
1222
1319
|
#private;
|
|
@@ -1228,8 +1325,13 @@ declare class Toasts extends ParsedElement {
|
|
|
1228
1325
|
* Appends a toast carrying the message (a Failure shows its problems'
|
|
1229
1326
|
* reasons, one per line), severity picking the theme and the announcement,
|
|
1230
1327
|
* the toast retiring through its own timer or its dismiss button.
|
|
1328
|
+
*
|
|
1329
|
+
* The timer holds while the toast is hovered or holds the focus, so an
|
|
1330
|
+
* actionable toast waits for its reader: `action` is `{ label, onClick }`,
|
|
1331
|
+
* a button beside the message whose click answers and retires. The same
|
|
1332
|
+
* options travel in the `show-toast` event's detail.
|
|
1231
1333
|
* @param {any} message
|
|
1232
|
-
* @param {any} [options] severity and
|
|
1334
|
+
* @param {any} [options] severity, timeout and action
|
|
1233
1335
|
* @returns {HTMLElement}
|
|
1234
1336
|
*/
|
|
1235
1337
|
show(message: any, options?: any): HTMLElement;
|
|
@@ -1340,6 +1442,6 @@ declare class Plugin {
|
|
|
1340
1442
|
});
|
|
1341
1443
|
configure(registry: any): void;
|
|
1342
1444
|
}
|
|
1343
|
-
export { Accordion, Anchors, AsyncEvents, Bindings, BooleanFilter, Checkbox, Claims, CompareFilter, Dialog, Drawer, Dropdown, Field, Form, FormLoader, InFilter, Input, InputFile, InputInstant, InputLocalDate, InputLocalTime, Instant, InstantFilter, LocalDate, LocalDateFilter, LocalStorage, NumberFilter, Pagination, Plugin, RadioGroup, Select, SelectLoader, SessionStorage, SortButton, Table, TableLoader, TableSchemaParser, Tabs, TextFilter, Timing, Toasts, Tooltip, VersionedLocalStorage, VersionedSessionStorage, Wizard, describable };
|
|
1445
|
+
export { Accordion, Anchors, AsyncEvents, Bindings, BooleanFilter, Checkbox, Claims, CompareFilter, Dialog, Drawer, Dropdown, Field, Form, FormLoader, InFilter, Input, InputFile, InputInstant, InputLocalDate, InputLocalTime, Instant, InstantFilter, LocalDate, LocalDateFilter, LocalStorage, Menu, NumberFilter, Pagination, Plugin, RadioGroup, Select, SelectLoader, SessionStorage, SortButton, Table, TableLoader, TableSchemaParser, Tabs, TextFilter, Timing, Toasts, Tooltip, VersionedLocalStorage, VersionedSessionStorage, Wizard, describable };
|
|
1344
1446
|
|
|
1345
1447
|
export as namespace ful;
|