@dolusoft/query-table 3.13.0 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/query-table.js
CHANGED
|
@@ -1449,13 +1449,14 @@ var _hoisted_2$3 = [
|
|
|
1449
1449
|
var _hoisted_3$3 = [
|
|
1450
1450
|
"aria-label",
|
|
1451
1451
|
"value",
|
|
1452
|
-
"readonly"
|
|
1452
|
+
"readonly",
|
|
1453
|
+
"aria-invalid"
|
|
1453
1454
|
];
|
|
1454
1455
|
var _hoisted_4$3 = [
|
|
1455
|
-
"type",
|
|
1456
1456
|
"aria-label",
|
|
1457
1457
|
"value",
|
|
1458
|
-
"readonly"
|
|
1458
|
+
"readonly",
|
|
1459
|
+
"aria-invalid"
|
|
1459
1460
|
];
|
|
1460
1461
|
var _hoisted_5$1 = [
|
|
1461
1462
|
"aria-label",
|
|
@@ -1506,6 +1507,7 @@ var filter_cell_default = /* @__PURE__ */ defineComponent({
|
|
|
1506
1507
|
};
|
|
1507
1508
|
const draft = () => filters.draftOf(props.column.field);
|
|
1508
1509
|
const isMulti = () => filters.multiOf(props.column.field) > 0;
|
|
1510
|
+
const isInvalid = () => !isFiltered() && !isMulti() && draft().text.trim() !== "" && filters.labelOf(props.column.field)?.count === 0;
|
|
1509
1511
|
const ordered = [
|
|
1510
1512
|
"number",
|
|
1511
1513
|
"integer",
|
|
@@ -1579,15 +1581,17 @@ var filter_cell_default = /* @__PURE__ */ defineComponent({
|
|
|
1579
1581
|
"aria-label": inputName(),
|
|
1580
1582
|
value: inputText(),
|
|
1581
1583
|
readonly: isMulti(),
|
|
1584
|
+
"aria-invalid": isInvalid() || void 0,
|
|
1582
1585
|
onInput: _cache[1] || (_cache[1] = ($event) => unref(filters).setInput(__props.column.field, inputValue($event))),
|
|
1583
1586
|
onKeydown: _cache[2] || (_cache[2] = withKeys(($event) => unref(filters).apply(__props.column.field), ["enter"]))
|
|
1584
1587
|
}, null, 40, _hoisted_3$3)) : __props.type === "number" || __props.type === "integer" ? (openBlock(), createElementBlock("input", {
|
|
1585
1588
|
key: 3,
|
|
1586
|
-
type:
|
|
1589
|
+
type: "text",
|
|
1587
1590
|
class: "qt-filter-input",
|
|
1588
1591
|
"aria-label": inputName(),
|
|
1589
1592
|
value: inputText(),
|
|
1590
|
-
readonly:
|
|
1593
|
+
readonly: isMulti(),
|
|
1594
|
+
"aria-invalid": isInvalid() || void 0,
|
|
1591
1595
|
onInput: _cache[3] || (_cache[3] = ($event) => unref(filters).setInput(__props.column.field, inputValue($event))),
|
|
1592
1596
|
onKeydown: _cache[4] || (_cache[4] = withKeys(($event) => unref(filters).apply(__props.column.field), ["enter"]))
|
|
1593
1597
|
}, null, 40, _hoisted_4$3)) : __props.type === "bool" ? (openBlock(), createElementBlock("select", {
|
|
@@ -4746,9 +4750,12 @@ var query_table_default = /* @__PURE__ */ defineComponent({
|
|
|
4746
4750
|
*
|
|
4747
4751
|
* - `string`: operator shortcuts (`*a*`, `a*`, `*a`, `!a`, `!*a*`, `a,b`);
|
|
4748
4752
|
* a segment without an operator uses `condition`.
|
|
4749
|
-
* - `number`: one rule
|
|
4750
|
-
*
|
|
4751
|
-
*
|
|
4753
|
+
* - `number`: one rule per comma-separated number value; a value after `!`
|
|
4754
|
+
* is `NotEqual` (`80,443`, `!80,!443`). A value that is not a finite
|
|
4755
|
+
* number, a list that mixes `!` and plain values, or a list without `!`
|
|
4756
|
+
* whose `condition` is a comparison (`0,5` with `GreaterThan`), gives
|
|
4757
|
+
* `[]`. The comma always separates; a decimal is written with a dot.
|
|
4758
|
+
* - `integer`: the same, but only whole numbers in the safe range; `2.5`
|
|
4752
4759
|
* and `9007199254740993` give `[]`.
|
|
4753
4760
|
* - `bool`: `'true'` or `'false'` gives one rule with a boolean value;
|
|
4754
4761
|
* anything else gives `[]`.
|