bank20baht-ui 0.0.8 → 0.0.9
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.
|
@@ -36,6 +36,12 @@ export declare class BahtWorkflow extends BahtElement {
|
|
|
36
36
|
private fieldStatesFor;
|
|
37
37
|
private get formEl();
|
|
38
38
|
getData(): NestedData;
|
|
39
|
+
/**
|
|
40
|
+
* Host/store write into one form's data — same path a user edit takes
|
|
41
|
+
* (rules reevaluate, `baht-data-change` fires) but WITHOUT the step reset
|
|
42
|
+
* that re-feeding the `value` prop causes.
|
|
43
|
+
*/
|
|
44
|
+
setValue(formName: string, patch: Record<string, unknown>): void;
|
|
39
45
|
next(): void;
|
|
40
46
|
/** Advance past the current form: submit+complete on the last one, else step forward. */
|
|
41
47
|
private advance;
|
|
@@ -528,6 +528,30 @@
|
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
},
|
|
531
|
+
{
|
|
532
|
+
"kind": "method",
|
|
533
|
+
"name": "setValue",
|
|
534
|
+
"return": {
|
|
535
|
+
"type": {
|
|
536
|
+
"text": "void"
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"parameters": [
|
|
540
|
+
{
|
|
541
|
+
"name": "formName",
|
|
542
|
+
"type": {
|
|
543
|
+
"text": "string"
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "patch",
|
|
548
|
+
"type": {
|
|
549
|
+
"text": "Record<string, unknown>"
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
"description": "Host/store write into one form's data — same path a user edit takes\n(rules reevaluate, `baht-data-change` fires) but WITHOUT the step reset\nthat re-feeding the `value` prop causes."
|
|
554
|
+
},
|
|
531
555
|
{
|
|
532
556
|
"kind": "method",
|
|
533
557
|
"name": "next",
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defaultValue as ht, t as v, resolveViewFields as Bt, validateField as Ht, evaluate as Jt } from "./engine.js";
|
|
2
|
-
import { approvalFields as
|
|
2
|
+
import { approvalFields as Fs, evalCondition as qs, evalValueExpr as Ls, readRef as Rs, setLocale as Ms } from "./engine.js";
|
|
3
3
|
import { B as u, a as ut, b as P, r as Y } from "./chunks/baht-toast-1frNyH2A.js";
|
|
4
|
-
import { c as Ts, d as Us, e as
|
|
4
|
+
import { c as Ts, d as Us, e as Vs, i as Ks } from "./chunks/baht-toast-1frNyH2A.js";
|
|
5
5
|
import { nothing as h, html as n, svg as Wt } from "lit";
|
|
6
6
|
import { property as l, customElement as p, query as bt, state as y } from "lit/decorators.js";
|
|
7
7
|
import { ifDefined as _ } from "lit/directives/if-defined.js";
|
|
@@ -423,7 +423,7 @@ var he = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, H = (t, e,
|
|
|
423
423
|
(o = t[i]) && (s = (a ? o(e, r, s) : o(s)) || s);
|
|
424
424
|
return a && s && he(e, r, s), s;
|
|
425
425
|
};
|
|
426
|
-
let
|
|
426
|
+
let F = class extends u {
|
|
427
427
|
constructor() {
|
|
428
428
|
super(...arguments), this.value = 0, this.max = 5, this.readonly = !1, this.label = "Rating", this.hover = 0;
|
|
429
429
|
}
|
|
@@ -478,22 +478,22 @@ let q = class extends u {
|
|
|
478
478
|
};
|
|
479
479
|
H([
|
|
480
480
|
l({ type: Number })
|
|
481
|
-
],
|
|
481
|
+
], F.prototype, "value", 2);
|
|
482
482
|
H([
|
|
483
483
|
l({ type: Number })
|
|
484
|
-
],
|
|
484
|
+
], F.prototype, "max", 2);
|
|
485
485
|
H([
|
|
486
486
|
l({ type: Boolean })
|
|
487
|
-
],
|
|
487
|
+
], F.prototype, "readonly", 2);
|
|
488
488
|
H([
|
|
489
489
|
l()
|
|
490
|
-
],
|
|
490
|
+
], F.prototype, "label", 2);
|
|
491
491
|
H([
|
|
492
492
|
y()
|
|
493
|
-
],
|
|
494
|
-
|
|
493
|
+
], F.prototype, "hover", 2);
|
|
494
|
+
F = H([
|
|
495
495
|
p("baht-rating")
|
|
496
|
-
],
|
|
496
|
+
], F);
|
|
497
497
|
var de = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, N = (t, e, r, a) => {
|
|
498
498
|
for (var s = a > 1 ? void 0 : a ? ce(e, r) : e, i = t.length - 1, o; i >= 0; i--)
|
|
499
499
|
(o = t[i]) && (s = (a ? o(e, r, s) : o(s)) || s);
|
|
@@ -562,7 +562,7 @@ var ue = Object.defineProperty, be = Object.getOwnPropertyDescriptor, J = (t, e,
|
|
|
562
562
|
(o = t[i]) && (s = (a ? o(e, r, s) : o(s)) || s);
|
|
563
563
|
return a && s && ue(e, r, s), s;
|
|
564
564
|
};
|
|
565
|
-
let
|
|
565
|
+
let q = class extends u {
|
|
566
566
|
constructor() {
|
|
567
567
|
super(...arguments), this.length = 6, this.value = "", this.disabled = !1, this.mode = "numeric", this.label = "One-time code";
|
|
568
568
|
}
|
|
@@ -630,22 +630,22 @@ let F = class extends u {
|
|
|
630
630
|
};
|
|
631
631
|
J([
|
|
632
632
|
l({ type: Number })
|
|
633
|
-
],
|
|
633
|
+
], q.prototype, "length", 2);
|
|
634
634
|
J([
|
|
635
635
|
l()
|
|
636
|
-
],
|
|
636
|
+
], q.prototype, "value", 2);
|
|
637
637
|
J([
|
|
638
638
|
l({ type: Boolean })
|
|
639
|
-
],
|
|
639
|
+
], q.prototype, "disabled", 2);
|
|
640
640
|
J([
|
|
641
641
|
l()
|
|
642
|
-
],
|
|
642
|
+
], q.prototype, "mode", 2);
|
|
643
643
|
J([
|
|
644
644
|
l()
|
|
645
|
-
],
|
|
646
|
-
|
|
645
|
+
], q.prototype, "label", 2);
|
|
646
|
+
q = J([
|
|
647
647
|
p("baht-otp")
|
|
648
|
-
],
|
|
648
|
+
], q);
|
|
649
649
|
var ve = Object.defineProperty, me = Object.getOwnPropertyDescriptor, W = (t, e, r, a) => {
|
|
650
650
|
for (var s = a > 1 ? void 0 : a ? me(e, r) : e, i = t.length - 1, o; i >= 0; i--)
|
|
651
651
|
(o = t[i]) && (s = (a ? o(e, r, s) : o(s)) || s);
|
|
@@ -946,7 +946,7 @@ var Ee = Object.defineProperty, Ie = Object.getOwnPropertyDescriptor, lt = (t, e
|
|
|
946
946
|
(o = t[i]) && (s = (a ? o(e, r, s) : o(s)) || s);
|
|
947
947
|
return a && s && Ee(e, r, s), s;
|
|
948
948
|
};
|
|
949
|
-
let
|
|
949
|
+
let V = class extends u {
|
|
950
950
|
constructor() {
|
|
951
951
|
super(...arguments), this.href = "", this.label = "", this.external = !1, this.externalHint = "opens in new tab";
|
|
952
952
|
}
|
|
@@ -961,19 +961,19 @@ let K = class extends u {
|
|
|
961
961
|
};
|
|
962
962
|
lt([
|
|
963
963
|
l()
|
|
964
|
-
],
|
|
964
|
+
], V.prototype, "href", 2);
|
|
965
965
|
lt([
|
|
966
966
|
l()
|
|
967
|
-
],
|
|
967
|
+
], V.prototype, "label", 2);
|
|
968
968
|
lt([
|
|
969
969
|
l({ type: Boolean })
|
|
970
|
-
],
|
|
970
|
+
], V.prototype, "external", 2);
|
|
971
971
|
lt([
|
|
972
972
|
l({ attribute: "external-hint" })
|
|
973
|
-
],
|
|
974
|
-
|
|
973
|
+
], V.prototype, "externalHint", 2);
|
|
974
|
+
V = lt([
|
|
975
975
|
p("baht-link")
|
|
976
|
-
],
|
|
976
|
+
], V);
|
|
977
977
|
var Ne = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, kt = (t, e, r, a) => {
|
|
978
978
|
for (var s = a > 1 ? void 0 : a ? Se(e, r) : e, i = t.length - 1, o; i >= 0; i--)
|
|
979
979
|
(o = t[i]) && (s = (a ? o(e, r, s) : o(s)) || s);
|
|
@@ -1013,8 +1013,8 @@ kt([
|
|
|
1013
1013
|
ct = kt([
|
|
1014
1014
|
p("baht-breadcrumbs")
|
|
1015
1015
|
], ct);
|
|
1016
|
-
var
|
|
1017
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
1016
|
+
var Fe = Object.getOwnPropertyDescriptor, qe = (t, e, r, a) => {
|
|
1017
|
+
for (var s = a > 1 ? void 0 : a ? Fe(e, r) : e, i = t.length - 1, o; i >= 0; i--)
|
|
1018
1018
|
(o = t[i]) && (s = o(s) || s);
|
|
1019
1019
|
return s;
|
|
1020
1020
|
};
|
|
@@ -1037,7 +1037,7 @@ let jt = class extends P {
|
|
|
1037
1037
|
/>`;
|
|
1038
1038
|
}
|
|
1039
1039
|
};
|
|
1040
|
-
jt =
|
|
1040
|
+
jt = qe([
|
|
1041
1041
|
p("baht-input")
|
|
1042
1042
|
], jt);
|
|
1043
1043
|
var Le = Object.getOwnPropertyDescriptor, Re = (t, e, r, a) => {
|
|
@@ -1129,8 +1129,8 @@ let Nt = class extends P {
|
|
|
1129
1129
|
Nt = Ue([
|
|
1130
1130
|
p("baht-select")
|
|
1131
1131
|
], Nt);
|
|
1132
|
-
var
|
|
1133
|
-
for (var s = a > 1 ? void 0 : a ?
|
|
1132
|
+
var Ve = Object.getOwnPropertyDescriptor, Ke = (t, e, r, a) => {
|
|
1133
|
+
for (var s = a > 1 ? void 0 : a ? Ve(e, r) : e, i = t.length - 1, o; i >= 0; i--)
|
|
1134
1134
|
(o = t[i]) && (s = o(s) || s);
|
|
1135
1135
|
return s;
|
|
1136
1136
|
};
|
|
@@ -1164,7 +1164,7 @@ let St = class extends P {
|
|
|
1164
1164
|
</div>`;
|
|
1165
1165
|
}
|
|
1166
1166
|
};
|
|
1167
|
-
St =
|
|
1167
|
+
St = Ke([
|
|
1168
1168
|
p("baht-multiselect")
|
|
1169
1169
|
], St);
|
|
1170
1170
|
var ze = Object.getOwnPropertyDescriptor, He = (t, e, r, a) => {
|
|
@@ -1172,7 +1172,7 @@ var ze = Object.getOwnPropertyDescriptor, He = (t, e, r, a) => {
|
|
|
1172
1172
|
(o = t[i]) && (s = o(s) || s);
|
|
1173
1173
|
return s;
|
|
1174
1174
|
};
|
|
1175
|
-
let
|
|
1175
|
+
let Ft = class extends P {
|
|
1176
1176
|
/** Label sits beside the box, so suppress the block label. */
|
|
1177
1177
|
renderLabel() {
|
|
1178
1178
|
return h;
|
|
@@ -1195,15 +1195,15 @@ let qt = class extends P {
|
|
|
1195
1195
|
</label>`;
|
|
1196
1196
|
}
|
|
1197
1197
|
};
|
|
1198
|
-
|
|
1198
|
+
Ft = He([
|
|
1199
1199
|
p("baht-checkbox")
|
|
1200
|
-
],
|
|
1200
|
+
], Ft);
|
|
1201
1201
|
var Je = Object.getOwnPropertyDescriptor, We = (t, e, r, a) => {
|
|
1202
1202
|
for (var s = a > 1 ? void 0 : a ? Je(e, r) : e, i = t.length - 1, o; i >= 0; i--)
|
|
1203
1203
|
(o = t[i]) && (s = o(s) || s);
|
|
1204
1204
|
return s;
|
|
1205
1205
|
};
|
|
1206
|
-
let
|
|
1206
|
+
let qt = class extends P {
|
|
1207
1207
|
renderControl() {
|
|
1208
1208
|
return n`<div
|
|
1209
1209
|
class="baht-control baht-control--radio"
|
|
@@ -1229,9 +1229,9 @@ let Ft = class extends P {
|
|
|
1229
1229
|
</div>`;
|
|
1230
1230
|
}
|
|
1231
1231
|
};
|
|
1232
|
-
|
|
1232
|
+
qt = We([
|
|
1233
1233
|
p("baht-radio")
|
|
1234
|
-
],
|
|
1234
|
+
], qt);
|
|
1235
1235
|
var Ge = Object.getOwnPropertyDescriptor, Ye = (t, e, r, a) => {
|
|
1236
1236
|
for (var s = a > 1 ? void 0 : a ? Ge(e, r) : e, i = t.length - 1, o; i >= 0; i--)
|
|
1237
1237
|
(o = t[i]) && (s = o(s) || s);
|
|
@@ -1515,7 +1515,7 @@ var cs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, nt = (t, e
|
|
|
1515
1515
|
(o = t[i]) && (s = (a ? o(e, r, s) : o(s)) || s);
|
|
1516
1516
|
return a && s && cs(e, r, s), s;
|
|
1517
1517
|
};
|
|
1518
|
-
let
|
|
1518
|
+
let K = class extends u {
|
|
1519
1519
|
constructor() {
|
|
1520
1520
|
super(...arguments), this.icon = "⚠️", this.heading = "Something went wrong", this.message = "", this.retryLabel = "";
|
|
1521
1521
|
}
|
|
@@ -1533,19 +1533,19 @@ let V = class extends u {
|
|
|
1533
1533
|
};
|
|
1534
1534
|
nt([
|
|
1535
1535
|
l()
|
|
1536
|
-
],
|
|
1536
|
+
], K.prototype, "icon", 2);
|
|
1537
1537
|
nt([
|
|
1538
1538
|
l()
|
|
1539
|
-
],
|
|
1539
|
+
], K.prototype, "heading", 2);
|
|
1540
1540
|
nt([
|
|
1541
1541
|
l()
|
|
1542
|
-
],
|
|
1542
|
+
], K.prototype, "message", 2);
|
|
1543
1543
|
nt([
|
|
1544
1544
|
l({ attribute: "retry-label" })
|
|
1545
|
-
],
|
|
1546
|
-
|
|
1545
|
+
], K.prototype, "retryLabel", 2);
|
|
1546
|
+
K = nt([
|
|
1547
1547
|
p("baht-error-state")
|
|
1548
|
-
],
|
|
1548
|
+
], K);
|
|
1549
1549
|
var bs = Object.defineProperty, vs = Object.getOwnPropertyDescriptor, M = (t, e, r, a) => {
|
|
1550
1550
|
for (var s = a > 1 ? void 0 : a ? vs(e, r) : e, i = t.length - 1, o; i >= 0; i--)
|
|
1551
1551
|
(o = t[i]) && (s = (a ? o(e, r, s) : o(s)) || s);
|
|
@@ -1827,7 +1827,7 @@ m([
|
|
|
1827
1827
|
b = m([
|
|
1828
1828
|
p("baht-reference-picker")
|
|
1829
1829
|
], b);
|
|
1830
|
-
const
|
|
1830
|
+
const Vt = {
|
|
1831
1831
|
text: "baht-input",
|
|
1832
1832
|
email: "baht-input",
|
|
1833
1833
|
textarea: "baht-textarea",
|
|
@@ -1842,7 +1842,7 @@ const Kt = {
|
|
|
1842
1842
|
label: "baht-text",
|
|
1843
1843
|
repeater: "baht-repeater"
|
|
1844
1844
|
};
|
|
1845
|
-
var $s = Object.defineProperty, gs = Object.getOwnPropertyDescriptor,
|
|
1845
|
+
var $s = Object.defineProperty, gs = Object.getOwnPropertyDescriptor, Kt = (t, e, r, a) => {
|
|
1846
1846
|
for (var s = a > 1 ? void 0 : a ? gs(e, r) : e, i = t.length - 1, o; i >= 0; i--)
|
|
1847
1847
|
(o = t[i]) && (s = (a ? o(e, r, s) : o(s)) || s);
|
|
1848
1848
|
return a && s && $s(e, r, s), s;
|
|
@@ -1885,7 +1885,7 @@ let Pt = class extends P {
|
|
|
1885
1885
|
return ((a = this.rowErrors.find((s) => s.key === r)) == null ? void 0 : a.message) ?? null;
|
|
1886
1886
|
}
|
|
1887
1887
|
renderSub(t, e, r) {
|
|
1888
|
-
const a =
|
|
1888
|
+
const a = Vt[r.type];
|
|
1889
1889
|
if (!a) return h;
|
|
1890
1890
|
const s = `${e}:${r.key}`;
|
|
1891
1891
|
let i = this.controls.get(s);
|
|
@@ -1932,10 +1932,10 @@ let Pt = class extends P {
|
|
|
1932
1932
|
</div>`;
|
|
1933
1933
|
}
|
|
1934
1934
|
};
|
|
1935
|
-
|
|
1935
|
+
Kt([
|
|
1936
1936
|
l({ attribute: !1 })
|
|
1937
1937
|
], Pt.prototype, "rowErrors", 2);
|
|
1938
|
-
Pt =
|
|
1938
|
+
Pt = Kt([
|
|
1939
1939
|
p("baht-repeater")
|
|
1940
1940
|
], Pt);
|
|
1941
1941
|
var _s = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, B = (t, e, r, a) => {
|
|
@@ -2060,7 +2060,7 @@ let D = class extends u {
|
|
|
2060
2060
|
}
|
|
2061
2061
|
renderField(t) {
|
|
2062
2062
|
var o;
|
|
2063
|
-
const e =
|
|
2063
|
+
const e = Vt[t.type];
|
|
2064
2064
|
if (!e)
|
|
2065
2065
|
return console.warn(`[bahtui] unknown field type "${t.type}" — skipped`), h;
|
|
2066
2066
|
const r = this.stateFor(t), a = Os[t.width ?? "full"] ?? "baht-field--w-full", s = ((o = this.errors.find((d) => d.key === t.key)) == null ? void 0 : o.message) ?? null;
|
|
@@ -2160,6 +2160,15 @@ let w = class extends u {
|
|
|
2160
2160
|
var t;
|
|
2161
2161
|
return ((t = this.derived) == null ? void 0 : t.data) ?? this.data;
|
|
2162
2162
|
}
|
|
2163
|
+
/**
|
|
2164
|
+
* Host/store write into one form's data — same path a user edit takes
|
|
2165
|
+
* (rules reevaluate, `baht-data-change` fires) but WITHOUT the step reset
|
|
2166
|
+
* that re-feeding the `value` prop causes.
|
|
2167
|
+
*/
|
|
2168
|
+
setValue(t, e) {
|
|
2169
|
+
var r;
|
|
2170
|
+
this.data = { ...this.data, [t]: { ...this.data[t], ...e } }, this.reevaluate(), this.current && !this.visibleForms.some((a) => a.formName === this.current) && (this.current = ((r = this.visibleForms[0]) == null ? void 0 : r.formName) ?? null), this.emit("baht-data-change", { data: this.getData() });
|
|
2171
|
+
}
|
|
2163
2172
|
next() {
|
|
2164
2173
|
const t = this.currentForm;
|
|
2165
2174
|
if (!t) return;
|
|
@@ -2391,13 +2400,13 @@ export {
|
|
|
2391
2400
|
ct as BahtBreadcrumbs,
|
|
2392
2401
|
Ts as BahtButton,
|
|
2393
2402
|
U as BahtCard,
|
|
2394
|
-
|
|
2403
|
+
Ft as BahtCheckbox,
|
|
2395
2404
|
pt as BahtCode,
|
|
2396
2405
|
Rt as BahtDatepicker,
|
|
2397
2406
|
k as BahtDonutChart,
|
|
2398
2407
|
u as BahtElement,
|
|
2399
2408
|
st as BahtEmptyState,
|
|
2400
|
-
|
|
2409
|
+
K as BahtErrorState,
|
|
2401
2410
|
P as BahtFieldBase,
|
|
2402
2411
|
Z as BahtFieldset,
|
|
2403
2412
|
Mt as BahtFile,
|
|
@@ -2405,17 +2414,17 @@ export {
|
|
|
2405
2414
|
D as BahtForm,
|
|
2406
2415
|
jt as BahtInput,
|
|
2407
2416
|
E as BahtKeyvalueEditor,
|
|
2408
|
-
|
|
2417
|
+
V as BahtLink,
|
|
2409
2418
|
C as BahtList,
|
|
2410
2419
|
Us as BahtModal,
|
|
2411
2420
|
St as BahtMultiselect,
|
|
2412
2421
|
It as BahtNumber,
|
|
2413
|
-
|
|
2422
|
+
q as BahtOtp,
|
|
2414
2423
|
A as BahtPagination,
|
|
2415
2424
|
T as BahtProgress,
|
|
2416
|
-
|
|
2425
|
+
qt as BahtRadio,
|
|
2417
2426
|
O as BahtRange,
|
|
2418
|
-
|
|
2427
|
+
F as BahtRating,
|
|
2419
2428
|
b as BahtReferencePicker,
|
|
2420
2429
|
Pt as BahtRepeater,
|
|
2421
2430
|
Nt as BahtSelect,
|
|
@@ -2426,19 +2435,19 @@ export {
|
|
|
2426
2435
|
Ot as BahtText,
|
|
2427
2436
|
Et as BahtTextarea,
|
|
2428
2437
|
xt as BahtTimeline,
|
|
2429
|
-
|
|
2438
|
+
Vs as BahtToast,
|
|
2430
2439
|
Lt as BahtToggle,
|
|
2431
2440
|
j as BahtTooltip,
|
|
2432
2441
|
w as BahtWorkflow,
|
|
2433
|
-
|
|
2442
|
+
Vt as TAG_FOR_TYPE,
|
|
2434
2443
|
ut as adoptLightChildren,
|
|
2435
|
-
|
|
2444
|
+
Fs as approvalFields,
|
|
2436
2445
|
Ut as chartColor,
|
|
2437
2446
|
ht as defaultValue,
|
|
2438
|
-
|
|
2447
|
+
qs as evalCondition,
|
|
2439
2448
|
Ls as evalValueExpr,
|
|
2440
2449
|
Jt as evaluate,
|
|
2441
|
-
|
|
2450
|
+
Ks as isIconName,
|
|
2442
2451
|
Rs as readRef,
|
|
2443
2452
|
Y as renderIcon,
|
|
2444
2453
|
Bt as resolveViewFields,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "baht-workflow",
|
|
19
|
-
"description": "<baht-workflow> — the optional brain (spec 03). Wraps the current form in an\ninternal <baht-form>, evaluates rules on every change, walks the visible forms\nin linear `order`, and owns the single Next/Submit button.\nForms with kind 'approval' render a decision step instead (spec 03 §4):\na summary of earlier answers plus Approve/Reject (+ optional comment); the\ndecision lands in data as `<formName>.decision` so rules can branch on it.\nThe runtime navigates; the host acts (on baht-next / baht-submit / baht-approve /\nbaht-reject / baht-complete).\n---\n\n\n### **Events:**\n - **type**\n\n### **Methods:**\n - **approve(): _void_** - Approve the current approval step (same as pressing its Approve button).\n- **reject(): _void_** - Reject the current approval step (same as pressing its Reject button).",
|
|
19
|
+
"description": "<baht-workflow> — the optional brain (spec 03). Wraps the current form in an\ninternal <baht-form>, evaluates rules on every change, walks the visible forms\nin linear `order`, and owns the single Next/Submit button.\nForms with kind 'approval' render a decision step instead (spec 03 §4):\na summary of earlier answers plus Approve/Reject (+ optional comment); the\ndecision lands in data as `<formName>.decision` so rules can branch on it.\nThe runtime navigates; the host acts (on baht-next / baht-submit / baht-approve /\nbaht-reject / baht-complete).\n---\n\n\n### **Events:**\n - **type**\n\n### **Methods:**\n - **setValue(formName: _string_, patch: _Record<string, unknown>_): _void_** - Host/store write into one form's data — same path a user edit takes\n(rules reevaluate, `baht-data-change` fires) but WITHOUT the step reset\nthat re-feeding the `value` prop causes.\n- **approve(): _void_** - Approve the current approval step (same as pressing its Approve button).\n- **reject(): _void_** - Reject the current approval step (same as pressing its Reject button).",
|
|
20
20
|
"attributes": [
|
|
21
21
|
{ "name": "validate-gate", "values": [] },
|
|
22
22
|
{
|
package/dist/web-types.json
CHANGED
|
@@ -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.0.
|
|
4
|
+
"version": "0.0.9",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"name": "baht-workflow",
|
|
49
|
-
"description": "<baht-workflow> — the optional brain (spec 03). Wraps the current form in an\ninternal <baht-form>, evaluates rules on every change, walks the visible forms\nin linear `order`, and owns the single Next/Submit button.\nForms with kind 'approval' render a decision step instead (spec 03 §4):\na summary of earlier answers plus Approve/Reject (+ optional comment); the\ndecision lands in data as `<formName>.decision` so rules can branch on it.\nThe runtime navigates; the host acts (on baht-next / baht-submit / baht-approve /\nbaht-reject / baht-complete).\n---\n\n\n### **Events:**\n - **type**\n\n### **Methods:**\n - **approve(): _void_** - Approve the current approval step (same as pressing its Approve button).\n- **reject(): _void_** - Reject the current approval step (same as pressing its Reject button).",
|
|
49
|
+
"description": "<baht-workflow> — the optional brain (spec 03). Wraps the current form in an\ninternal <baht-form>, evaluates rules on every change, walks the visible forms\nin linear `order`, and owns the single Next/Submit button.\nForms with kind 'approval' render a decision step instead (spec 03 §4):\na summary of earlier answers plus Approve/Reject (+ optional comment); the\ndecision lands in data as `<formName>.decision` so rules can branch on it.\nThe runtime navigates; the host acts (on baht-next / baht-submit / baht-approve /\nbaht-reject / baht-complete).\n---\n\n\n### **Events:**\n - **type**\n\n### **Methods:**\n - **setValue(formName: _string_, patch: _Record<string, unknown>_): _void_** - Host/store write into one form's data — same path a user edit takes\n(rules reevaluate, `baht-data-change` fires) but WITHOUT the step reset\nthat re-feeding the `value` prop causes.\n- **approve(): _void_** - Approve the current approval step (same as pressing its Approve button).\n- **reject(): _void_** - Reject the current approval step (same as pressing its Reject button).",
|
|
50
50
|
"doc-url": "",
|
|
51
51
|
"attributes": [
|
|
52
52
|
{
|