@optionfactory/fml 9.0.0-rc12 → 9.0.0-rc13
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/fml.css +3 -3
- package/dist/fml.css.map +1 -1
- package/dist/fml.iife.js +31 -6
- 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/ful.css +3 -3
- package/dist/ful.css.map +1 -1
- package/dist/ful.iife.js +31 -6
- 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 +31 -6
- package/dist/ful.mjs.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
package/dist/fml.iife.js
CHANGED
|
@@ -8531,7 +8531,18 @@ var fml = (function (exports) {
|
|
|
8531
8531
|
if (invoke) {
|
|
8532
8532
|
//popovertarget needs a target that can be named
|
|
8533
8533
|
popover.id = popover.id || uid;
|
|
8534
|
-
invoker.
|
|
8534
|
+
if (invoker.localName === 'button' || invoker.localName === 'input') {
|
|
8535
|
+
invoker.setAttribute('popovertarget', popover.id);
|
|
8536
|
+
} else {
|
|
8537
|
+
invoker.addEventListener('click', () => popover.togglePopover());
|
|
8538
|
+
invoker.addEventListener('keydown', (/** @type any */ evt) => {
|
|
8539
|
+
if (evt.key !== 'Enter' && evt.key !== ' ') {
|
|
8540
|
+
return;
|
|
8541
|
+
}
|
|
8542
|
+
evt.preventDefault();
|
|
8543
|
+
popover.togglePopover();
|
|
8544
|
+
});
|
|
8545
|
+
}
|
|
8535
8546
|
}
|
|
8536
8547
|
const anchor = `--${uid}`;
|
|
8537
8548
|
invoker.style.anchorName = anchor;
|
|
@@ -9143,7 +9154,7 @@ var fml = (function (exports) {
|
|
|
9143
9154
|
//the select's: a tooltip marker slotted into `info`, a button a page
|
|
9144
9155
|
//put in an affix. Without this, reading the note beside a select
|
|
9145
9156
|
//also stole the focus and dropped the dropdown over the note
|
|
9146
|
-
const elsewhere = e.target.closest('button, a[href], input, select, textarea');
|
|
9157
|
+
const elsewhere = e.target.closest('button, [role="button"], a[href], input, select, textarea');
|
|
9147
9158
|
if (elsewhere && elsewhere !== this.#input) {
|
|
9148
9159
|
return;
|
|
9149
9160
|
}
|
|
@@ -11074,7 +11085,6 @@ var fml = (function (exports) {
|
|
|
11074
11085
|
*/
|
|
11075
11086
|
class InFilter extends Select {
|
|
11076
11087
|
static attributes = ['operator'];
|
|
11077
|
-
/** the selection as the array the wire takes, whether one key was chosen or many */
|
|
11078
11088
|
#keys() {
|
|
11079
11089
|
const chosen = super.value;
|
|
11080
11090
|
if (this.multiple) {
|
|
@@ -11095,8 +11105,6 @@ var fml = (function (exports) {
|
|
|
11095
11105
|
set value(v) {
|
|
11096
11106
|
const operator = this.declared('operator');
|
|
11097
11107
|
let keys = v === null || v === undefined ? [] : Array.isArray(v) ? v : [v];
|
|
11098
|
-
//what the getter answers has to be assignable back, and it carries the
|
|
11099
|
-
//operator in front of the keys
|
|
11100
11108
|
if (operator && keys[0] === operator) {
|
|
11101
11109
|
keys = keys.slice(1);
|
|
11102
11110
|
}
|
|
@@ -11243,7 +11251,7 @@ var fml = (function (exports) {
|
|
|
11243
11251
|
icon: 'info-circle-fill',
|
|
11244
11252
|
};
|
|
11245
11253
|
static template = `
|
|
11246
|
-
<
|
|
11254
|
+
<span role="button" tabindex="0" class="ful-tip" data-ref="trigger" data-tpl-aria-label="#l10n:t('info.tooltip')"><ful-icon data-tpl-name="icon ?? config.icon" aria-hidden="true"></ful-icon></span>
|
|
11247
11255
|
<ful-note popover data-ref="content">{{{{ slots.default }}}}</ful-note>
|
|
11248
11256
|
`;
|
|
11249
11257
|
render({ slots }) {
|
|
@@ -11352,10 +11360,18 @@ var fml = (function (exports) {
|
|
|
11352
11360
|
this.dispatchEvent(new CustomEvent('close', { detail: outcome }));
|
|
11353
11361
|
this.#settle(outcome);
|
|
11354
11362
|
});
|
|
11363
|
+
let pressedOutside = false;
|
|
11364
|
+
this.#dialog.addEventListener('mousedown', (/** @type any */ e) => {
|
|
11365
|
+
pressedOutside = e.target === this.#dialog;
|
|
11366
|
+
});
|
|
11355
11367
|
this.#dialog.addEventListener('click', (/** @type any */ e) => {
|
|
11356
11368
|
const result = e.target.closest('button[data-result]')?.dataset.result;
|
|
11357
11369
|
if (result !== undefined) {
|
|
11358
11370
|
this.#dialog.close(result);
|
|
11371
|
+
return;
|
|
11372
|
+
}
|
|
11373
|
+
if (!requiresAnswer && pressedOutside && e.target === this.#dialog) {
|
|
11374
|
+
this.#dialog.close('');
|
|
11359
11375
|
}
|
|
11360
11376
|
});
|
|
11361
11377
|
//dismissal, not an answer: the waiters are settled with a dismissal, as
|
|
@@ -11557,6 +11573,15 @@ var fml = (function (exports) {
|
|
|
11557
11573
|
this.#dialog.setAttribute('placement', placement);
|
|
11558
11574
|
}
|
|
11559
11575
|
fragment.querySelector('[data-ref=close]').addEventListener('click', () => this.close());
|
|
11576
|
+
let pressedOutside = false;
|
|
11577
|
+
this.#dialog.addEventListener('mousedown', (e) => {
|
|
11578
|
+
pressedOutside = e.target === this.#dialog;
|
|
11579
|
+
});
|
|
11580
|
+
this.#dialog.addEventListener('click', (e) => {
|
|
11581
|
+
if (pressedOutside && e.target === this.#dialog) {
|
|
11582
|
+
this.close();
|
|
11583
|
+
}
|
|
11584
|
+
});
|
|
11560
11585
|
this.#dialog.addEventListener('close', () => {
|
|
11561
11586
|
this.dispatchEvent(
|
|
11562
11587
|
new CustomEvent('close', { detail: this.#answer ?? { dismissed: true, response: null } }),
|