@dolusoft/query-table 3.15.0 → 3.17.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.
@@ -1512,7 +1512,8 @@ var filter_cell_default = /* @__PURE__ */ defineComponent({
1512
1512
  "number",
1513
1513
  "integer",
1514
1514
  "date",
1515
- "datetime"
1515
+ "datetime",
1516
+ "ip"
1516
1517
  ];
1517
1518
  const isDated = () => props.type === "date" || props.type === "datetime";
1518
1519
  const hidesInput = () => {
@@ -1567,7 +1568,7 @@ var filter_cell_default = /* @__PURE__ */ defineComponent({
1567
1568
  isRange() ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList(bounds, (bound) => {
1568
1569
  return openBlock(), createElementBlock(Fragment, { key: bound }, [isDated() && _ctx.$slots["filter-datetime"] ? renderSlot(_ctx.$slots, "filter-datetime", mergeProps({ ref_for: true }, datetimeProps(bound)), void 0, void 0, 0) : (openBlock(), createElementBlock("input", {
1569
1570
  key: 1,
1570
- type: isDated() ? "date" : "number",
1571
+ type: isDated() ? "date" : __props.type === "ip" ? "text" : "number",
1571
1572
  class: "qt-filter-input",
1572
1573
  "aria-label": boundName(bound),
1573
1574
  value: boundText(bound),
@@ -1584,7 +1585,7 @@ var filter_cell_default = /* @__PURE__ */ defineComponent({
1584
1585
  "aria-invalid": isInvalid() || void 0,
1585
1586
  onInput: _cache[1] || (_cache[1] = ($event) => unref(filters).setInput(__props.column.field, inputValue($event))),
1586
1587
  onKeydown: _cache[2] || (_cache[2] = withKeys(($event) => unref(filters).apply(__props.column.field), ["enter"]))
1587
- }, null, 40, _hoisted_3$3)) : __props.type === "number" || __props.type === "integer" ? (openBlock(), createElementBlock("input", {
1588
+ }, null, 40, _hoisted_3$3)) : __props.type === "number" || __props.type === "integer" || __props.type === "ip" ? (openBlock(), createElementBlock("input", {
1588
1589
  key: 3,
1589
1590
  type: "text",
1590
1591
  class: "qt-filter-input",
@@ -2885,7 +2886,8 @@ function useQueryTable(options) {
2885
2886
  id: column.field,
2886
2887
  accessorFn: (row) => valueAt(row, column.field),
2887
2888
  enableSorting: column.sortable !== false,
2888
- filterType: columnTypeOf(column)
2889
+ filterType: columnTypeOf(column),
2890
+ filterDefaultCondition: column.filterDefaultCondition
2889
2891
  })));
2890
2892
  const columnVisibility = computed(() => Object.fromEntries(columns().map((column) => [column.field, !column.hide])));
2891
2893
  const columnOrder = computed(() => columns().map((column) => column.field));
@@ -4762,8 +4764,9 @@ var query_table_default = /* @__PURE__ */ defineComponent({
4762
4764
  * - `date` and `datetime`: one rule with the trimmed text as its value; the
4763
4765
  * text is not validated, as the input already gives an ISO date.
4764
4766
  *
4765
- * `condition` is the one picked in the filter menu; without it the column
4766
- * type's default applies (`Contains` for text, `Equal` otherwise). Empty or
4767
+ * `condition` is the one picked in the filter menu; without it the column's
4768
+ * `filterDefaultCondition` applies (C-117), else the type's default
4769
+ * (`Contains` for text, `Equal` otherwise). Empty or
4767
4770
  * blank text, and text that is only operators (`*`, `!`, `!*`), gives `[]`.
4768
4771
  * Invalid input never throws. Pure: no Vue, no DOM; the column is not written.
4769
4772
  * The grammar is the protocol's (`@dolusoft/query-protocol`).