bank20baht-ui 0.5.5 → 0.5.6

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.
@@ -2,7 +2,7 @@ import { nothing as h, html as l, svg as R } from "lit";
2
2
  import { property as n, customElement as f, state as v, query as Bt } from "lit/decorators.js";
3
3
  import { B as y, b as ce, h as j, a as X } from "./base-D1pT3J5T.js";
4
4
  import { t as u } from "./i18n-CWv5lrun.js";
5
- import { k as Re, j as ae, u as ye, n as qt, o as ws, x as xs, p as _s, d as ie, a as ps, s as ze, v as Ve, l as ge, t as we, c as ks, M as Ke, e as Os, h as Ps, q as Cs } from "./display-Cm3Pmp9U.js";
5
+ import { k as Re, j as ae, u as ye, n as qt, x as ws, o as xs, p as _s, d as ie, a as ps, s as ze, v as Ve, l as ge, t as we, c as ks, M as Ke, e as Os, h as Ps, q as Cs } from "./display-Cm3Pmp9U.js";
6
6
  import { repeat as Fe } from "lit/directives/repeat.js";
7
7
  import { html as se, unsafeStatic as ds } from "lit/static-html.js";
8
8
  import { r as T, e as Ds, i as us, d as pe, c as bs } from "./baht-toast-8qUXxEvh.js";
@@ -2041,10 +2041,13 @@ let Qe = class extends X {
2041
2041
  const e = this.lastEmitted ?? this.datesOf(this.value);
2042
2042
  this.sameInstants(t, e) || (this.lastEmitted = [...t], this.emitInput(this.toValue(t)));
2043
2043
  }
2044
- /** Host value (any mode) -> the Date list flatpickr works with. */
2044
+ /** Host value (any mode) -> the Date list flatpickr works with. A bare
2045
+ * day is accepted even with `enable_time` on (defaults to midnight) -
2046
+ * a host may not always have a time to feed back (an edited record that
2047
+ * predates this field, for one). */
2045
2048
  datesOf(t) {
2046
- const e = this.field.enable_time ? ws : qt;
2047
- return xs(t).map(e).filter((s) => s !== null);
2049
+ const e = (s) => (this.field.enable_time ? xs(s) : null) ?? qt(s);
2050
+ return ws(t).map(e).filter((s) => s !== null);
2048
2051
  }
2049
2052
  /** flatpickr's selection -> the value shape of the field's mode. */
2050
2053
  toValue(t) {
@@ -47,7 +47,10 @@ export declare class BahtDatepicker extends BahtFieldBase {
47
47
  private todayAllowed;
48
48
  private pickToday;
49
49
  private emitIfChanged;
50
- /** Host value (any mode) -> the Date list flatpickr works with. */
50
+ /** Host value (any mode) -> the Date list flatpickr works with. A bare
51
+ * day is accepted even with `enable_time` on (defaults to midnight) -
52
+ * a host may not always have a time to feed back (an edited record that
53
+ * predates this field, for one). */
51
54
  private datesOf;
52
55
  /** flatpickr's selection -> the value shape of the field's mode. */
53
56
  private toValue;
@@ -5412,7 +5412,7 @@
5412
5412
  }
5413
5413
  }
5414
5414
  ],
5415
- "description": "Host value (any mode) -> the Date list flatpickr works with."
5415
+ "description": "Host value (any mode) -> the Date list flatpickr works with. A bare\nday is accepted even with `enable_time` on (defaults to midnight) -\na host may not always have a time to feed back (an edited record that\npredates this field, for one)."
5416
5416
  },
5417
5417
  {
5418
5418
  "kind": "method",
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { M as s, a as e, b as r, c as h, d as B, e as o, f as l, g as i, h as n,
2
2
  import { g as F, s as I, a as v, t as R } from "./chunks/i18n-CWv5lrun.js";
3
3
  import { LEGACY_KEY_MAP as P, normalizeLegacySchema as A } from "./engine.js";
4
4
  import { B as M, a as _, b as w, i as V, c as N, r as H, d as O } from "./chunks/baht-toast-8qUXxEvh.js";
5
- import { B as q, a as G, b as K, c as j, d as z, e as U, f as W, g as X, h as J, i as Q, j as Z, k as $, l as aa, m as ta, n as sa, o as ea, p as ra, q as ha, r as Ba, s as oa, t as la, u as ia, v as na, w as pa, x as da, y as ca, z as ma, A as Sa, C as ua, D as Ca, E as Ta, F as fa, G as ga, H as xa, I as ba, J as ka, K as Da, L as Ea, M as Fa, N as Ia, O as va, P as Ra, Q as ya, R as Pa, S as Aa, T as La, U as Ma, V as _a, W as wa, X as Va, Y as Na, Z as Ha, _ as Oa, $ as Ya, a0 as qa, a1 as Ga, a2 as Ka, a3 as ja, a4 as za, a5 as Ua } from "./chunks/baht-workflow-C27godQM.js";
5
+ import { B as q, a as G, b as K, c as j, d as z, e as U, f as W, g as X, h as J, i as Q, j as Z, k as $, l as aa, m as ta, n as sa, o as ea, p as ra, q as ha, r as Ba, s as oa, t as la, u as ia, v as na, w as pa, x as da, y as ca, z as ma, A as Sa, C as ua, D as Ca, E as Ta, F as fa, G as ga, H as xa, I as ba, J as ka, K as Da, L as Ea, M as Fa, N as Ia, O as va, P as Ra, Q as ya, R as Pa, S as Aa, T as La, U as Ma, V as _a, W as wa, X as Va, Y as Na, Z as Ha, _ as Oa, $ as Ya, a0 as qa, a1 as Ga, a2 as Ka, a3 as ja, a4 as za, a5 as Ua } from "./chunks/baht-workflow-Jo9JmAdE.js";
6
6
  import { B as Xa, a as Ja, S as Qa, b as Za, h as $a, c as at } from "./chunks/base-D1pT3J5T.js";
7
7
  export {
8
8
  q as BahtAccordion,
package/dist/ssr.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { render as d } from "@lit-labs/ssr";
2
2
  import { collectResult as u } from "@lit-labs/ssr/lib/render-result.js";
3
3
  import "./chunks/baht-toast-8qUXxEvh.js";
4
- import "./chunks/baht-workflow-C27godQM.js";
4
+ import "./chunks/baht-workflow-Jo9JmAdE.js";
5
5
  import "./chunks/base-D1pT3J5T.js";
6
6
  const c = /<template shadowroot="(?:open|closed)" shadowrootmode="(?:open|closed)"[^>]*>|<template\b[^>]*>|<\/template>/g, x = (e) => e.startsWith("baht-");
7
7
  function f(e, i = x) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "bank20baht-ui",
4
- "version": "0.5.5",
4
+ "version": "0.5.6",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bank20baht-ui",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "type": "module",
5
5
  "description": "JSON-driven form + workflow engine. Send JSON in, get an interactive form out.",
6
6
  "license": "MIT",