@hybridcore/ui 1.6.22 → 1.6.24

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/main.d.ts CHANGED
@@ -787,21 +787,31 @@ export declare interface ForecastConeChartProps {
787
787
  * Omit for the single-cone behaviour (cone extracted from `data`).
788
788
  */
789
789
  forecasts?: ForecastSnapshot[];
790
+ /**
791
+ * Multi-cone mode only. When `true` (default) each forecast origin gets a
792
+ * bullet on the history line: hovering one previews that run's cone, clicking
793
+ * it selects the run. When `false` the origins are marked with faint dashed
794
+ * ticks instead and only the pager switches cones.
795
+ */
796
+ showOriginMarkers?: boolean;
790
797
  /** Vertical "now" marker; defaults to the last history timestamp. */
791
798
  nowValue?: number | string;
792
799
  /** Band/centre hue (theme token or CSS color). Defaults to a theme token. */
793
800
  color?: string;
794
801
  /**
795
- * History line behaviour across missing dates. `true` (default) bridges gaps
796
- * (and connects the history end to the cone apex); `false` breaks the line
797
- * wherever a history point is missing and drops the bridge to the forecast.
798
- * Affects the history series only the bands/centre are contiguous.
802
+ * Line behaviour across missing dates. `true` (default) bridges gaps (and, in
803
+ * single-cone mode, connects the history end to the cone apex); `false` breaks
804
+ * the line wherever a point is missing and drops the bridge to the forecast.
805
+ * Applies to the history line and to the cone (bands + centre) alike, so a
806
+ * horizon row missing its bounds splits the cone instead of bridging it.
799
807
  */
800
808
  connectMissingData?: boolean;
801
809
  /**
802
- * When `true`, the date axis drops intervals with no data (`GaplessDateAxis`),
803
- * so only dates with values are shown. Default `false` keeps the continuous
804
- * timeline.
810
+ * When `true` (default), the date axis drops intervals with no data
811
+ * (`GaplessDateAxis`), so only dates with values are shown closed hours and
812
+ * weekends collapse instead of rendering as flat gaps. `false` keeps the
813
+ * continuous timeline. In multi-cone mode the axis is fed the union of every
814
+ * snapshot's dates, so the frame stays fixed while scrubbing.
805
815
  */
806
816
  skipEmptyDates?: boolean;
807
817
  baseInterval?: BaseInterval;
@@ -1068,6 +1078,13 @@ K extends
1068
1078
  variant?: InstanceFormVariant;
1069
1079
  inputVariant?: InstanceFormInputVariant;
1070
1080
  labelPosition?: InstanceFormLabelPosition;
1081
+ /**
1082
+ * Whether the form creates a new instance or edits an existing one. A
1083
+ * property with `editable: false` accepts a value on create and is locked
1084
+ * on edit — so edit forms must set this explicitly.
1085
+ * @default "create"
1086
+ */
1087
+ mode?: "create" | "edit";
1071
1088
  templates: Map<string | number, T>;
1072
1089
  values?: DefaultValues<
1073
1090
  INSTANCE.CreateObjectDTO &
@@ -4269,9 +4286,9 @@ declare namespace FV {
4269
4286
 
4270
4287
  interface TemplateFilter {
4271
4288
  templateKey: string;
4272
- filterOperator: string;
4273
- filters: PropertyFilter[];
4274
- exclusionTemplateKeys: string[];
4289
+ filterOperator?: string;
4290
+ filters?: PropertyFilter[];
4291
+ exclusionTemplateKeys?: string[];
4275
4292
  }
4276
4293
 
4277
4294
  interface HierarchyTemplateFilter {
@@ -4757,6 +4774,10 @@ declare namespace ONTOLOGY {
4757
4774
  enumValues?: string[];
4758
4775
  };
4759
4776
  enumValues?: string[];
4777
+ /** `decimal` only — total significant digits. */
4778
+ precision?: number;
4779
+ /** `decimal` only — fraction digits. */
4780
+ scale?: number;
4760
4781
  }
4761
4782
 
4762
4783
  interface RecognitionProperty {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.6.22",
4
+ "version": "1.6.24",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",
@@ -1,171 +0,0 @@
1
- import { R as b } from "./RoundedRectangle-BKLX1LKM.js";
2
- import { C as w, G as v } from "./Tooltip-vyZRZWih.js";
3
- import { B as x } from "./Button-BLY4PVJC.js";
4
- import { m as f, q as D, f as g } from "./Entity-BJCuhdq_.js";
5
- class _ extends w {
6
- constructor() {
7
- super(...arguments), Object.defineProperty(this, "thumb", {
8
- enumerable: !0,
9
- configurable: !0,
10
- writable: !0,
11
- value: this._makeThumb()
12
- }), Object.defineProperty(this, "startGrip", {
13
- enumerable: !0,
14
- configurable: !0,
15
- writable: !0,
16
- value: this._makeButton()
17
- }), Object.defineProperty(this, "endGrip", {
18
- enumerable: !0,
19
- configurable: !0,
20
- writable: !0,
21
- value: this._makeButton()
22
- }), Object.defineProperty(this, "_thumbBusy", {
23
- enumerable: !0,
24
- configurable: !0,
25
- writable: !0,
26
- value: !1
27
- }), Object.defineProperty(this, "_startDown", {
28
- enumerable: !0,
29
- configurable: !0,
30
- writable: !0,
31
- value: !1
32
- }), Object.defineProperty(this, "_endDown", {
33
- enumerable: !0,
34
- configurable: !0,
35
- writable: !0,
36
- value: !1
37
- }), Object.defineProperty(this, "_thumbDown", {
38
- enumerable: !0,
39
- configurable: !0,
40
- writable: !0,
41
- value: !1
42
- }), Object.defineProperty(this, "_gripDown", {
43
- enumerable: !0,
44
- configurable: !0,
45
- writable: !0,
46
- value: void 0
47
- });
48
- }
49
- _addOrientationClass() {
50
- this._settings.themeTags = f(this._settings.themeTags, ["scrollbar", this._settings.orientation]), this._settings.background || (this._settings.background = b.new(this._root, {
51
- themeTags: f(this._settings.themeTags, ["main", "background"])
52
- }));
53
- }
54
- _makeButton() {
55
- return this.children.push(x.new(this._root, {
56
- themeTags: ["resize", "button", this.get("orientation")],
57
- icon: v.new(this._root, {
58
- themeTags: ["icon"]
59
- })
60
- }));
61
- }
62
- _makeThumb() {
63
- return this.children.push(b.new(this._root, {
64
- themeTags: ["thumb", this.get("orientation")]
65
- }));
66
- }
67
- _handleAnimation(t) {
68
- t && this._disposers.push(t.events.on("stopped", () => {
69
- this.setPrivateRaw("isBusy", !1), this._thumbBusy = !1;
70
- }));
71
- }
72
- _afterNew() {
73
- this._addOrientationClass(), super._afterNew();
74
- const t = this.startGrip, s = this.endGrip, i = this.thumb, n = this.get("background");
75
- n && this._disposers.push(n.events.on("click", (e) => {
76
- this.setPrivateRaw("isBusy", !0);
77
- const a = this._display.toLocal(e.point), r = this.width(), o = this.height(), u = this.get("orientation");
78
- let h;
79
- u == "vertical" ? h = (a.y - i.height() / 2) / o : h = (a.x - i.width() / 2) / r;
80
- let d, l;
81
- u == "vertical" ? (d = h * o, l = "y") : (d = h * r, l = "x");
82
- const p = this.get("animationDuration", 0);
83
- p > 0 ? (this._thumbBusy = !0, this._handleAnimation(this.thumb.animate({ key: l, to: d, duration: p, easing: this.get("animationEasing") }))) : (this.thumb.set(l, d), this._root.events.once("frameended", () => {
84
- this.setPrivateRaw("isBusy", !1);
85
- }));
86
- })), this._disposers.push(i.events.on("dblclick", (e) => {
87
- if (!D(e.originalEvent, this))
88
- return;
89
- const a = this.get("animationDuration", 0), r = this.get("animationEasing");
90
- this.animate({ key: "start", to: 0, duration: a, easing: r }), this.animate({ key: "end", to: 1, duration: a, easing: r });
91
- })), this._disposers.push(t.events.on("pointerdown", () => {
92
- this.setPrivateRaw("isBusy", !0), this._startDown = !0, this._gripDown = "start";
93
- })), this._disposers.push(s.events.on("pointerdown", () => {
94
- this.setPrivateRaw("isBusy", !0), this._endDown = !0, this._gripDown = "end";
95
- })), this._disposers.push(i.events.on("pointerdown", () => {
96
- this.setPrivateRaw("isBusy", !0), this._thumbDown = !0, this._gripDown = void 0;
97
- })), this._disposers.push(t.events.on("globalpointerup", () => {
98
- this._startDown && (this.setPrivateRaw("isBusy", !1), this._released()), this._startDown = !1;
99
- })), this._disposers.push(s.events.on("globalpointerup", () => {
100
- this._endDown && (this.setPrivateRaw("isBusy", !1), this._released()), this._endDown = !1;
101
- })), this._disposers.push(i.events.on("globalpointerup", () => {
102
- this._thumbDown && (this.setPrivateRaw("isBusy", !1), this._released()), this._thumbDown = !1;
103
- })), this._disposers.push(t.on("x", () => {
104
- this._updateThumb();
105
- })), this._disposers.push(s.on("x", () => {
106
- this._updateThumb();
107
- })), this._disposers.push(t.on("y", () => {
108
- this._updateThumb();
109
- })), this._disposers.push(s.on("y", () => {
110
- this._updateThumb();
111
- })), this._disposers.push(i.events.on("positionchanged", () => {
112
- this._updateGripsByThumb();
113
- })), this.get("orientation") == "vertical" ? (t.set("x", 0), s.set("x", 0), this._disposers.push(i.adapters.add("y", (e) => Math.max(Math.min(Number(e), this.height() - i.height()), 0))), this._disposers.push(i.adapters.add("x", (e) => this.width() / 2)), this._disposers.push(t.adapters.add("x", (e) => this.width() / 2)), this._disposers.push(s.adapters.add("x", (e) => this.width() / 2)), this._disposers.push(t.adapters.add("y", (e) => Math.max(Math.min(Number(e), this.height()), 0))), this._disposers.push(s.adapters.add("y", (e) => Math.max(Math.min(Number(e), this.height()), 0)))) : (t.set("y", 0), s.set("y", 0), this._disposers.push(i.adapters.add("x", (e) => Math.max(Math.min(Number(e), this.width() - i.width()), 0))), this._disposers.push(i.adapters.add("y", (e) => this.height() / 2)), this._disposers.push(t.adapters.add("y", (e) => this.height() / 2)), this._disposers.push(s.adapters.add("y", (e) => this.height() / 2)), this._disposers.push(t.adapters.add("x", (e) => Math.max(Math.min(Number(e), this.width()), 0))), this._disposers.push(s.adapters.add("x", (e) => Math.max(Math.min(Number(e), this.width()), 0))));
114
- }
115
- _updateChildren() {
116
- super._updateChildren(), (this.isDirty("end") || this.isDirty("start") || this._sizeDirty) && this.updateGrips();
117
- }
118
- _changed() {
119
- if (super._changed(), this.isDirty("start") || this.isDirty("end")) {
120
- const t = "rangechanged";
121
- this.events.isEnabled(t) && this.events.dispatch(t, { type: t, target: this, start: this.get("start", 0), end: this.get("end", 1), grip: this._gripDown });
122
- }
123
- }
124
- _released() {
125
- const t = "released";
126
- this.events.isEnabled(t) && this.events.dispatch(t, { type: t, target: this });
127
- }
128
- /**
129
- * @ignore
130
- */
131
- updateGrips() {
132
- const t = this.startGrip, s = this.endGrip, i = this.get("orientation"), n = this.height(), e = this.width();
133
- i == "vertical" ? (t.set("y", n * this.get("start", 0)), s.set("y", n * this.get("end", 1))) : (t.set("x", e * this.get("start", 0)), s.set("x", e * this.get("end", 1)));
134
- const a = this.getPrivate("positionTextFunction"), r = Math.round(this.get("start", 0) * 100), o = Math.round(this.get("end", 0) * 100);
135
- let u, h;
136
- a ? (u = a.call(this, this.get("start", 0)), h = a.call(this, this.get("end", 0))) : (u = r + "%", h = o + "%"), t.set("ariaLabel", this._t("From %1", void 0, u)), t.set("ariaValueNow", "" + r), t.set("ariaValueText", r + "%"), t.set("ariaValueMin", "0"), t.set("ariaValueMax", "100"), s.set("ariaLabel", this._t("To %1", void 0, h)), s.set("ariaValueNow", "" + o), s.set("ariaValueText", o + "%"), s.set("ariaValueMin", "0"), s.set("ariaValueMax", "100");
137
- }
138
- _updateThumb() {
139
- const t = this.thumb, s = this.startGrip, i = this.endGrip, n = this.height(), e = this.width();
140
- let a = s.x(), r = i.x(), o = s.y(), u = i.y(), h = 0, d = 1;
141
- this.get("orientation") == "vertical" ? g(o) && g(u) && (!this._thumbBusy && !t.isDragging() && (t.set("height", u - o), t.set("y", o)), h = o / n, d = u / n) : g(a) && g(r) && (!this._thumbBusy && !t.isDragging() && (t.set("width", r - a), t.set("x", a)), h = a / e, d = r / e), this.getPrivate("isBusy") && (this.get("start") != h || this.get("end") != d) && (this.set("start", h), this.set("end", d));
142
- const l = this.getPrivate("positionTextFunction"), p = Math.round(this.get("start", 0) * 100), y = Math.round(this.get("end", 0) * 100);
143
- let c, m;
144
- l ? (c = l.call(this, this.get("start", 0)), m = l.call(this, this.get("end", 0))) : (c = p + "%", m = y + "%"), t.set("ariaLabel", this._t("From %1 to %2", void 0, c, m)), t.set("ariaValueNow", "" + p), t.set("ariaValueText", p + "%");
145
- }
146
- _updateGripsByThumb() {
147
- const t = this.thumb, s = this.startGrip, i = this.endGrip;
148
- if (this.get("orientation") == "vertical") {
149
- const n = t.height();
150
- s.set("y", t.y()), i.set("y", t.y() + n);
151
- } else {
152
- const n = t.width();
153
- s.set("x", t.x()), i.set("x", t.x() + n);
154
- }
155
- }
156
- }
157
- Object.defineProperty(_, "className", {
158
- enumerable: !0,
159
- configurable: !0,
160
- writable: !0,
161
- value: "Scrollbar"
162
- });
163
- Object.defineProperty(_, "classNames", {
164
- enumerable: !0,
165
- configurable: !0,
166
- writable: !0,
167
- value: w.classNames.concat([_.className])
168
- });
169
- export {
170
- _ as S
171
- };