@golemui/gui-shared 1.1.0 → 1.1.1-rc.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/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## 1.1.0 (2026-07-21)
2
+
3
+ ### 🚀 Features
4
+
5
+ - `$fn` host functions for reactive expressions ([#227](https://github.com/golemui/golemui/pull/227))
6
+ - range time and range date time inputs ([#225](https://github.com/golemui/golemui/pull/225))
7
+ - add time and date-time inputs and input error localizable messages ([#220](https://github.com/golemui/golemui/pull/220))
8
+ - add date time input ([#218](https://github.com/golemui/golemui/pull/218))
9
+ - add time input ([#217](https://github.com/golemui/golemui/pull/217))
10
+
11
+ ### ❤️ Thank You
12
+
13
+ - Mud Scientist @mudscientist
14
+ - Raúl Jiménez @Elecash
15
+
1
16
  ## 1.0.3 (2026-07-02)
2
17
 
3
18
  ### 🩹 Fixes
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as d, a as y, b as o, c, d as _, e as h, f as m, g as B, h as U, i as T, j as k, k as D, l as I, m as P, n as C, o as f, p as R, q as w, r as x, s as b, t as A, u as L, v as M, w as $, x as F, y as G, z as v, A as z, B as j, C as O, D as H, E as N, F as V, G as E, H as W, I as q, J as K, K as Q, L as S, M as X, N as Y, O as Z, P as J, Q as aa, R as sa, S as ta, T as ea, U as ia, V as ra, W as na, X as ua, Y as la, Z as pa, $ as ga, a0 as da, a1 as ya, a2 as oa, a3 as ca, a4 as _a, a5 as ha, a6 as ma, a7 as Ba, a8 as Ua, a9 as Ta, aa as ka, ab as Da, ac as Ia, ad as Pa, ae as Ca, af as fa, ag as Ra, ah as wa, ai as xa, aj as ba, ak as Aa, al as La, am as Ma, an as $a, ao as Fa, ap as Ga, aq as va, ar as za, as as ja, at as Oa, au as Ha, av as Na, aw as Va, ax as Ea, ay as Wa, az as qa, aA as Ka, aB as Qa, aC as Sa, aD as Xa, aE as Ya, aF as Za, aG as Ja, aH as as, aI as ss, aJ as ts, aK as es, aL as is, aM as rs, aN as ns, aO as us, aP as ls, aQ as ps, aR as gs, aS as ds, aT as ys, aU as os, aV as cs, aW as _s, aX as hs, aY as ms, aZ as Bs, a_ as Us, a$ as Ts, b0 as ks, b1 as Ds, b2 as Is, b3 as Ps, b4 as Cs, b5 as fs, b6 as Rs } from "./register-C4dCzlrS.js";
1
+ import { _ as d, a as y, b as o, c, d as _, e as h, f as m, g as B, h as U, i as T, j as k, k as D, l as I, m as P, n as C, o as f, p as R, q as w, r as x, s as b, t as A, u as L, v as M, w as $, x as F, y as G, z as v, A as z, B as j, C as O, D as H, E as N, F as V, G as E, H as W, I as q, J as K, K as Q, L as S, M as X, N as Y, O as Z, P as J, Q as aa, R as sa, S as ta, T as ea, U as ia, V as ra, W as na, X as ua, Y as la, Z as pa, $ as ga, a0 as da, a1 as ya, a2 as oa, a3 as ca, a4 as _a, a5 as ha, a6 as ma, a7 as Ba, a8 as Ua, a9 as Ta, aa as ka, ab as Da, ac as Ia, ad as Pa, ae as Ca, af as fa, ag as Ra, ah as wa, ai as xa, aj as ba, ak as Aa, al as La, am as Ma, an as $a, ao as Fa, ap as Ga, aq as va, ar as za, as as ja, at as Oa, au as Ha, av as Na, aw as Va, ax as Ea, ay as Wa, az as qa, aA as Ka, aB as Qa, aC as Sa, aD as Xa, aE as Ya, aF as Za, aG as Ja, aH as as, aI as ss, aJ as ts, aK as es, aL as is, aM as rs, aN as ns, aO as us, aP as ls, aQ as ps, aR as gs, aS as ds, aT as ys, aU as os, aV as cs, aW as _s, aX as hs, aY as ms, aZ as Bs, a_ as Us, a$ as Ts, b0 as ks, b1 as Ds, b2 as Is, b3 as Ps, b4 as Cs, b5 as fs, b6 as Rs } from "./register-De8Y1vW5.js";
2
2
  import "@golemui/core";
3
3
  class r {
4
4
  constructor(a) {
package/index.umd.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./register-KU4CGoTQ.cjs");require("@golemui/core");class n{constructor(t){this.conditions=t}static root(){return new n([])}tag(t){return new n([...this.conditions,{kind:"tagsAnd",tags:[t]}])}state(t){return new n([...this.conditions,{kind:"state",name:t}])}tagsAnd(t){return new n([...this.conditions,{kind:"tagsAnd",tags:t}])}tagsOr(t){return new n([...this.conditions,{kind:"tagsOr",tags:t}])}apply(t){if(this.conditions.length===0)return t;const i=this.conditions.find(a=>a.kind==="state"),s=this.conditions.filter(a=>a.kind!=="state"),u=t.matcher;return{...t,matcher:a=>{if(!u(a))return!1;for(const l of s){const d=a.tags??[];if(l.kind==="tagsAnd"){for(const p of l.tags)if(!d.includes(p))return!1}else{if(l.tags.length===0)continue;if(!l.tags.some(p=>d.includes(p)))return!1}}return!0},...i?{targetState:i.name}:{}}}inputs(t){return this.apply(e._gslInputs(t))}inputByUid(t,i){return this.apply(e._gslInputByUid(t,i))}textInputs(t){return this.apply(e._gslTextInputs(t))}numberInputs(t){return this.apply(e._gslNumberInputs(t))}booleanInputs(t){return this.apply(e._gslBooleanInputs(t))}selects(t){return this.apply(e._gslSelects(t))}selectByUid(t,i){return this.apply(e._gslSelectByUid(t,i))}dropdowns(t){return this.apply(e._gslDropdowns(t))}dropdownByUid(t,i){return this.apply(e._gslDropdownByUid(t,i))}radiogroups(t){return this.apply(e._gslRadiogroups(t))}radiogroupByUid(t,i){return this.apply(e._gslRadiogroupByUid(t,i))}checkboxes(t){return this.apply(e._gslCheckboxes(t))}checkboxByUid(t,i){return this.apply(e._gslCheckboxByUid(t,i))}textareas(t){return this.apply(e._gslTextareas(t))}textareaByUid(t,i){return this.apply(e._gslTextareaByUid(t,i))}passwords(t){return this.apply(e._gslPasswords(t))}passwordByUid(t,i){return this.apply(e._gslPasswordByUid(t,i))}currencies(t){return this.apply(e._gslCurrencies(t))}currencyByUid(t,i){return this.apply(e._gslCurrencyByUid(t,i))}markdowns(t){return this.apply(e._gslMarkdowns(t))}markdownByUid(t,i){return this.apply(e._gslMarkdownByUid(t,i))}lists(t){return this.apply(e._gslLists(t))}listByUid(t,i){return this.apply(e._gslListByUid(t,i))}calendars(t){return this.apply(e._gslCalendars(t))}calendarByUid(t,i){return this.apply(e._gslCalendarByUid(t,i))}dateTimeCalendars(t){return this.apply(e._gslDateTimeCalendars(t))}dateTimeCalendarByUid(t,i){return this.apply(e._gslDateTimeCalendarByUid(t,i))}dateInputs(t){return this.apply(e._gslDateInputs(t))}dateInputByUid(t,i){return this.apply(e._gslDateInputByUid(t,i))}timeInputs(t){return this.apply(e._gslTimeInputs(t))}timeInputByUid(t,i){return this.apply(e._gslTimeInputByUid(t,i))}timePickers(t){return this.apply(e._gslTimePickers(t))}timePickerByUid(t,i){return this.apply(e._gslTimePickerByUid(t,i))}dateTimeInputs(t){return this.apply(e._gslDateTimeInputs(t))}dateTimeInputByUid(t,i){return this.apply(e._gslDateTimeInputByUid(t,i))}datePickers(t){return this.apply(e._gslDatePickers(t))}datePickerByUid(t,i){return this.apply(e._gslDatePickerByUid(t,i))}dateTimePickers(t){return this.apply(e._gslDateTimePickers(t))}dateTimePickerByUid(t,i){return this.apply(e._gslDateTimePickerByUid(t,i))}rangeCalendars(t){return this.apply(e._gslRangeCalendars(t))}rangeCalendarByUid(t,i){return this.apply(e._gslRangeCalendarByUid(t,i))}rangeDateInputs(t){return this.apply(e._gslRangeDateInputs(t))}rangeDateInputByUid(t,i){return this.apply(e._gslRangeDateInputByUid(t,i))}rangeTimeInputs(t){return this.apply(e._gslRangeTimeInputs(t))}rangeTimeInputByUid(t,i){return this.apply(e._gslRangeTimeInputByUid(t,i))}rangeDateTimeInputs(t){return this.apply(e._gslRangeDateTimeInputs(t))}rangeDateTimeInputByUid(t,i){return this.apply(e._gslRangeDateTimeInputByUid(t,i))}rangeDateTimeCalendars(t){return this.apply(e._gslRangeDateTimeCalendars(t))}rangeDateTimeCalendarByUid(t,i){return this.apply(e._gslRangeDateTimeCalendarByUid(t,i))}rangeDateTimePickers(t){return this.apply(e._gslRangeDateTimePickers(t))}rangeDateTimePickerByUid(t,i){return this.apply(e._gslRangeDateTimePickerByUid(t,i))}rangeDatePickers(t){return this.apply(e._gslRangeDatePickers(t))}rangeDatePickerByUid(t,i){return this.apply(e._gslRangeDatePickerByUid(t,i))}rangeTimePickers(t){return this.apply(e._gslRangeTimePickers(t))}rangeTimePickerByUid(t,i){return this.apply(e._gslRangeTimePickerByUid(t,i))}repeaters(t){return this.apply(e._gslRepeaters(t))}repeaterByUid(t,i){return this.apply(e._gslRepeaterByUid(t,i))}actions(t){return this.apply(e._gslActions(t))}actionByUid(t,i){return this.apply(e._gslActionByUid(t,i))}layouts(t){return this.apply(e._gslLayouts(t))}layoutByUid(t,i){return this.apply(e._gslLayoutByUid(t,i))}displays(t){return this.apply(e._gslDisplays(t))}displayByUid(t,i){return this.apply(e._gslDisplayByUid(t,i))}alerts(t){return this.apply(e._gslAlerts(t))}alertByUid(t,i){return this.apply(e._gslAlertByUid(t,i))}markdownTexts(t){return this.apply(e._gslMarkdownTexts(t))}markdownTextByUid(t,i){return this.apply(e._gslMarkdownTextByUid(t,i))}tabs(t){return this.apply(e._gslTabs(t))}tabsByUid(t,i){return this.apply(e._gslTabsByUid(t,i))}accordions(t){return this.apply(e._gslAccordions(t))}accordionByUid(t,i){return this.apply(e._gslAccordionByUid(t,i))}customInputs(t){return this.apply(e._gslCustomInputs(t))}customInputByUid(t,i){return this.apply(e._gslCustomInputByUid(t,i))}customActions(t){return this.apply(e._gslCustomActions(t))}customActionByUid(t,i){return this.apply(e._gslCustomActionByUid(t,i))}customDisplays(t){return this.apply(e._gslCustomDisplays(t))}customDisplayByUid(t,i){return this.apply(e._gslCustomDisplayByUid(t,i))}customLayouts(t){return this.apply(e._gslCustomLayouts(t))}customLayoutByUid(t,i){return this.apply(e._gslCustomLayoutByUid(t,i))}}const y={inputs:{textInput:e._guiTextInput,numberInput:e._guiNumberInput,booleanInput:e._guiBooleanInput,select:e._guiSelect,dropdown:e._guiDropdown,radiogroup:e._guiRadiogroup,checkbox:e._guiCheckbox,textarea:e._guiTextarea,password:e._guiPassword,currency:e._guiCurrency,markdown:e._guiMarkdown,list:e._guiList,calendar:e._guiCalendar,dateTimeCalendar:e._guiDateTimeCalendar,dateInput:e._guiDateInput,datePicker:e._guiDatePicker,dateTimePicker:e._guiDateTimePicker,timeInput:e._guiTimeInput,timePicker:e._guiTimePicker,dateTimeInput:e._guiDateTimeInput,rangeCalendar:e._guiRangeCalendar,rangeDateInput:e._guiRangeDateInput,rangeDateTimeInput:e._guiRangeDateTimeInput,rangeDateTimeCalendar:e._guiRangeDateTimeCalendar,rangeDateTimePicker:e._guiRangeDateTimePicker,rangeTimeInput:e._guiRangeTimeInput,rangeDatePicker:e._guiRangeDatePicker,rangeTimePicker:e._guiRangeTimePicker,repeater:e._guiRepeater,tags:e._guiTags,custom:e._guiCustomInput},actions:{button:e._guiButton,custom:e._guiCustomAction},displays:{display:e._guiDisplay,alert:e._guiAlert,markdownText:e._guiMarkdownText,custom:e._guiCustomDisplay},layouts:{flex:e._guiFlex,horizontalFlex:e._guiHorizontalFlex,verticalFlex:e._guiVerticalFlex,grid:e._guiGrid,horizontalGrid:e._guiHorizontalGrid,verticalGrid:e._guiVerticalGrid,tabs:e._guiTabs,accordion:e._guiAccordion,custom:e._guiCustomLayout},selectors:n.root()};function o(r){return typeof r=="object"&&r!==null&&"$ref"in r&&typeof r.$ref=="string"&&Object.keys(r).length===1}async function c(r,t){const i=new URL(r,t).href,s=await fetch(i);if(!s.ok)throw new Error(`Failed to load form chunk ${i}: ${s.status}`);const{$schema:u,...a}=await s.json();return g(a,i)}async function g(r,t){if(o(r))return c(r.$ref,t);const i=r;if(Array.isArray(i.children)){const s=await Promise.all(i.children.map(u=>g(u,t)));return{...i,children:s}}return r}async function _(r,t){const i=await Promise.all(r.form.map(s=>g(s,t)));return{...r,form:i}}exports.gui=y;exports.resolveChunkRefs=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./register-B3CJMfX9.cjs");require("@golemui/core");class n{constructor(t){this.conditions=t}static root(){return new n([])}tag(t){return new n([...this.conditions,{kind:"tagsAnd",tags:[t]}])}state(t){return new n([...this.conditions,{kind:"state",name:t}])}tagsAnd(t){return new n([...this.conditions,{kind:"tagsAnd",tags:t}])}tagsOr(t){return new n([...this.conditions,{kind:"tagsOr",tags:t}])}apply(t){if(this.conditions.length===0)return t;const i=this.conditions.find(a=>a.kind==="state"),s=this.conditions.filter(a=>a.kind!=="state"),u=t.matcher;return{...t,matcher:a=>{if(!u(a))return!1;for(const l of s){const d=a.tags??[];if(l.kind==="tagsAnd"){for(const p of l.tags)if(!d.includes(p))return!1}else{if(l.tags.length===0)continue;if(!l.tags.some(p=>d.includes(p)))return!1}}return!0},...i?{targetState:i.name}:{}}}inputs(t){return this.apply(e._gslInputs(t))}inputByUid(t,i){return this.apply(e._gslInputByUid(t,i))}textInputs(t){return this.apply(e._gslTextInputs(t))}numberInputs(t){return this.apply(e._gslNumberInputs(t))}booleanInputs(t){return this.apply(e._gslBooleanInputs(t))}selects(t){return this.apply(e._gslSelects(t))}selectByUid(t,i){return this.apply(e._gslSelectByUid(t,i))}dropdowns(t){return this.apply(e._gslDropdowns(t))}dropdownByUid(t,i){return this.apply(e._gslDropdownByUid(t,i))}radiogroups(t){return this.apply(e._gslRadiogroups(t))}radiogroupByUid(t,i){return this.apply(e._gslRadiogroupByUid(t,i))}checkboxes(t){return this.apply(e._gslCheckboxes(t))}checkboxByUid(t,i){return this.apply(e._gslCheckboxByUid(t,i))}textareas(t){return this.apply(e._gslTextareas(t))}textareaByUid(t,i){return this.apply(e._gslTextareaByUid(t,i))}passwords(t){return this.apply(e._gslPasswords(t))}passwordByUid(t,i){return this.apply(e._gslPasswordByUid(t,i))}currencies(t){return this.apply(e._gslCurrencies(t))}currencyByUid(t,i){return this.apply(e._gslCurrencyByUid(t,i))}markdowns(t){return this.apply(e._gslMarkdowns(t))}markdownByUid(t,i){return this.apply(e._gslMarkdownByUid(t,i))}lists(t){return this.apply(e._gslLists(t))}listByUid(t,i){return this.apply(e._gslListByUid(t,i))}calendars(t){return this.apply(e._gslCalendars(t))}calendarByUid(t,i){return this.apply(e._gslCalendarByUid(t,i))}dateTimeCalendars(t){return this.apply(e._gslDateTimeCalendars(t))}dateTimeCalendarByUid(t,i){return this.apply(e._gslDateTimeCalendarByUid(t,i))}dateInputs(t){return this.apply(e._gslDateInputs(t))}dateInputByUid(t,i){return this.apply(e._gslDateInputByUid(t,i))}timeInputs(t){return this.apply(e._gslTimeInputs(t))}timeInputByUid(t,i){return this.apply(e._gslTimeInputByUid(t,i))}timePickers(t){return this.apply(e._gslTimePickers(t))}timePickerByUid(t,i){return this.apply(e._gslTimePickerByUid(t,i))}dateTimeInputs(t){return this.apply(e._gslDateTimeInputs(t))}dateTimeInputByUid(t,i){return this.apply(e._gslDateTimeInputByUid(t,i))}datePickers(t){return this.apply(e._gslDatePickers(t))}datePickerByUid(t,i){return this.apply(e._gslDatePickerByUid(t,i))}dateTimePickers(t){return this.apply(e._gslDateTimePickers(t))}dateTimePickerByUid(t,i){return this.apply(e._gslDateTimePickerByUid(t,i))}rangeCalendars(t){return this.apply(e._gslRangeCalendars(t))}rangeCalendarByUid(t,i){return this.apply(e._gslRangeCalendarByUid(t,i))}rangeDateInputs(t){return this.apply(e._gslRangeDateInputs(t))}rangeDateInputByUid(t,i){return this.apply(e._gslRangeDateInputByUid(t,i))}rangeTimeInputs(t){return this.apply(e._gslRangeTimeInputs(t))}rangeTimeInputByUid(t,i){return this.apply(e._gslRangeTimeInputByUid(t,i))}rangeDateTimeInputs(t){return this.apply(e._gslRangeDateTimeInputs(t))}rangeDateTimeInputByUid(t,i){return this.apply(e._gslRangeDateTimeInputByUid(t,i))}rangeDateTimeCalendars(t){return this.apply(e._gslRangeDateTimeCalendars(t))}rangeDateTimeCalendarByUid(t,i){return this.apply(e._gslRangeDateTimeCalendarByUid(t,i))}rangeDateTimePickers(t){return this.apply(e._gslRangeDateTimePickers(t))}rangeDateTimePickerByUid(t,i){return this.apply(e._gslRangeDateTimePickerByUid(t,i))}rangeDatePickers(t){return this.apply(e._gslRangeDatePickers(t))}rangeDatePickerByUid(t,i){return this.apply(e._gslRangeDatePickerByUid(t,i))}rangeTimePickers(t){return this.apply(e._gslRangeTimePickers(t))}rangeTimePickerByUid(t,i){return this.apply(e._gslRangeTimePickerByUid(t,i))}repeaters(t){return this.apply(e._gslRepeaters(t))}repeaterByUid(t,i){return this.apply(e._gslRepeaterByUid(t,i))}actions(t){return this.apply(e._gslActions(t))}actionByUid(t,i){return this.apply(e._gslActionByUid(t,i))}layouts(t){return this.apply(e._gslLayouts(t))}layoutByUid(t,i){return this.apply(e._gslLayoutByUid(t,i))}displays(t){return this.apply(e._gslDisplays(t))}displayByUid(t,i){return this.apply(e._gslDisplayByUid(t,i))}alerts(t){return this.apply(e._gslAlerts(t))}alertByUid(t,i){return this.apply(e._gslAlertByUid(t,i))}markdownTexts(t){return this.apply(e._gslMarkdownTexts(t))}markdownTextByUid(t,i){return this.apply(e._gslMarkdownTextByUid(t,i))}tabs(t){return this.apply(e._gslTabs(t))}tabsByUid(t,i){return this.apply(e._gslTabsByUid(t,i))}accordions(t){return this.apply(e._gslAccordions(t))}accordionByUid(t,i){return this.apply(e._gslAccordionByUid(t,i))}customInputs(t){return this.apply(e._gslCustomInputs(t))}customInputByUid(t,i){return this.apply(e._gslCustomInputByUid(t,i))}customActions(t){return this.apply(e._gslCustomActions(t))}customActionByUid(t,i){return this.apply(e._gslCustomActionByUid(t,i))}customDisplays(t){return this.apply(e._gslCustomDisplays(t))}customDisplayByUid(t,i){return this.apply(e._gslCustomDisplayByUid(t,i))}customLayouts(t){return this.apply(e._gslCustomLayouts(t))}customLayoutByUid(t,i){return this.apply(e._gslCustomLayoutByUid(t,i))}}const y={inputs:{textInput:e._guiTextInput,numberInput:e._guiNumberInput,booleanInput:e._guiBooleanInput,select:e._guiSelect,dropdown:e._guiDropdown,radiogroup:e._guiRadiogroup,checkbox:e._guiCheckbox,textarea:e._guiTextarea,password:e._guiPassword,currency:e._guiCurrency,markdown:e._guiMarkdown,list:e._guiList,calendar:e._guiCalendar,dateTimeCalendar:e._guiDateTimeCalendar,dateInput:e._guiDateInput,datePicker:e._guiDatePicker,dateTimePicker:e._guiDateTimePicker,timeInput:e._guiTimeInput,timePicker:e._guiTimePicker,dateTimeInput:e._guiDateTimeInput,rangeCalendar:e._guiRangeCalendar,rangeDateInput:e._guiRangeDateInput,rangeDateTimeInput:e._guiRangeDateTimeInput,rangeDateTimeCalendar:e._guiRangeDateTimeCalendar,rangeDateTimePicker:e._guiRangeDateTimePicker,rangeTimeInput:e._guiRangeTimeInput,rangeDatePicker:e._guiRangeDatePicker,rangeTimePicker:e._guiRangeTimePicker,repeater:e._guiRepeater,tags:e._guiTags,custom:e._guiCustomInput},actions:{button:e._guiButton,custom:e._guiCustomAction},displays:{display:e._guiDisplay,alert:e._guiAlert,markdownText:e._guiMarkdownText,custom:e._guiCustomDisplay},layouts:{flex:e._guiFlex,horizontalFlex:e._guiHorizontalFlex,verticalFlex:e._guiVerticalFlex,grid:e._guiGrid,horizontalGrid:e._guiHorizontalGrid,verticalGrid:e._guiVerticalGrid,tabs:e._guiTabs,accordion:e._guiAccordion,custom:e._guiCustomLayout},selectors:n.root()};function o(r){return typeof r=="object"&&r!==null&&"$ref"in r&&typeof r.$ref=="string"&&Object.keys(r).length===1}async function c(r,t){const i=new URL(r,t).href,s=await fetch(i);if(!s.ok)throw new Error(`Failed to load form chunk ${i}: ${s.status}`);const{$schema:u,...a}=await s.json();return g(a,i)}async function g(r,t){if(o(r))return c(r.$ref,t);const i=r;if(Array.isArray(i.children)){const s=await Promise.all(i.children.map(u=>g(u,t)));return{...i,children:s}}return r}async function _(r,t){const i=await Promise.all(r.form.map(s=>g(s,t)));return{...r,form:i}}exports.gui=y;exports.resolveChunkRefs=_;
package/internals.js CHANGED
@@ -1,5 +1,5 @@
1
- import { b7 as A, b8 as m, b9 as v, ba as x, aB as B, bb as N, bc as j } from "./register-C4dCzlrS.js";
2
- import { ag as Te, af as he, a4 as be, a3 as De, aa as Se, a9 as Ie, d as Ee, x as Re, w as Ae, l as Ue, k as ke, q as Ce, r as Oe, ak as Me, aj as Pe, am as we, al as ve, ai as xe, ah as Be, ao as Ne, an as je, B as Le, A as Fe, J as We, I as ze, z as Ge, y as Ke, H as $e, G as Ye, L as Ve, K as He, a8 as Xe, a7 as qe, h as Je, g as Qe, a as Ze, _ as et, a6 as tt, a5 as st, v as at, u as nt, t as it, ac as rt, ab as ot, s as lt, c as ct, p as ut, o as pt, j as dt, i as gt, N as ft, M as _t, P as yt, O as mt, Z as Tt, Y as ht, V as bt, U as Dt, T as St, S as It, X as Et, W as Rt, R as At, Q as Ut, a0 as kt, $ as Ct, a2 as Ot, a1 as Mt, f as Pt, e as wt, ad as vt, ae as xt, bd as Bt, be as Nt, b as jt, n as Lt, m as Ft, D as Wt, C as zt, F as Gt, E as Kt, aq as $t, aA as Yt, b4 as Vt, aD as Ht, aW as Xt, b0 as qt, aZ as Jt, aC as Qt, ay as Zt, aE as es, ap as ts, aU as ss, aT as as, aV as ns, aP as is, aS as rs, b2 as os, ax as ls, au as cs, aw as us, at as ps, aX as ds, aY as gs, az as fs, b5 as _s, a_ as ys, b1 as ms, aO as Ts, aN as hs, aI as bs, aL as Ds, aM as Ss, aK as Is, aJ as Es, aH as Rs, aG as As, b3 as Us, ar as ks, aF as Cs, b6 as Os, a$ as Ms, aR as Ps, aQ as ws, av as vs, as as xs, bf as Bs, bg as Ns, bh as js, bi as Ls, bj as Fs } from "./register-C4dCzlrS.js";
1
+ import { b7 as A, b8 as m, b9 as v, ba as x, aB as B, bb as N, bc as j } from "./register-De8Y1vW5.js";
2
+ import { ag as Te, af as he, a4 as be, a3 as De, aa as Se, a9 as Ie, d as Ee, x as Re, w as Ae, l as Ue, k as ke, q as Ce, r as Oe, ak as Me, aj as Pe, am as we, al as ve, ai as xe, ah as Be, ao as Ne, an as je, B as Le, A as Fe, J as We, I as ze, z as Ge, y as Ke, H as $e, G as Ye, L as Ve, K as He, a8 as Xe, a7 as qe, h as Je, g as Qe, a as Ze, _ as et, a6 as tt, a5 as st, v as at, u as nt, t as it, ac as rt, ab as ot, s as lt, c as ct, p as ut, o as pt, j as dt, i as gt, N as ft, M as _t, P as yt, O as mt, Z as Tt, Y as ht, V as bt, U as Dt, T as St, S as It, X as Et, W as Rt, R as At, Q as Ut, a0 as kt, $ as Ct, a2 as Ot, a1 as Mt, f as Pt, e as wt, ad as vt, ae as xt, bd as Bt, be as Nt, b as jt, n as Lt, m as Ft, D as Wt, C as zt, F as Gt, E as Kt, aq as $t, aA as Yt, b4 as Vt, aD as Ht, aW as Xt, b0 as qt, aZ as Jt, aC as Qt, ay as Zt, aE as es, ap as ts, aU as ss, aT as as, aV as ns, aP as is, aS as rs, b2 as os, ax as ls, au as cs, aw as us, at as ps, aX as ds, aY as gs, az as fs, b5 as _s, a_ as ys, b1 as ms, aO as Ts, aN as hs, aI as bs, aL as Ds, aM as Ss, aK as Is, aJ as Es, aH as Rs, aG as As, b3 as Us, ar as ks, aF as Cs, b6 as Os, a$ as Ms, aR as Ps, aQ as ws, av as vs, as as xs, bf as Bs, bg as Ns, bh as js, bi as Ls, bj as Fs } from "./register-De8Y1vW5.js";
3
3
  import "@golemui/core";
4
4
  import "@golemui/gui-validators";
5
5
  function ue(r, ...e) {
package/internals.umd.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./register-KU4CGoTQ.cjs");require("@golemui/core");require("@golemui/gui-validators");function M(o,...e){return e.map(s=>({...s,targetState:o}))}function O(o,...e){return{kind:"aggregated",matcher:s=>s.tags?.includes(o)??!1,children:e}}const A={INPUTS:new Set(["INPUTS","TEXTAREA","PASSWORD","SELECT","DROPDOWN","RADIOGROUP","CHECKBOX","CALENDAR","DATE_TIME_CALENDAR","DATE_TIME_PICKER","DATE_INPUT","DATE_PICKER","RANGE_CALENDAR","RANGE_DATE_INPUT","RANGE_DATE_TIME_INPUT","RANGE_DATE_TIME_CALENDAR","RANGE_DATE_TIME_PICKER","RANGE_TIME_INPUT","RANGE_DATE_PICKER","RANGE_TIME_PICKER","TIME_INPUT","TIME_PICKER","DATE_TIME_INPUT","CURRENCY","MARKDOWN","LIST","CUSTOM_INPUT","REPEATER","TAGS"]),ACTIONS:new Set(["ACTIONS","CUSTOM_ACTION"]),DISPLAYS:new Set(["DISPLAYS","ALERTS","MARKDOWN_TEXTS","CUSTOM_DISPLAY"]),LAYOUTS:new Set(["LAYOUTS","TABS","ACCORDION","CUSTOM_LAYOUT"])};function v(o,e){const s=A[o];return s?s.has(e):o===e}class N{resolve(e,s){const n=[];for(const r of s)r.kind==="aggregated"?this.collectFromAggregated(r,e,n):this.collectFromLeaf(r,e,n);const i=this.rollUpSensibleDefaults(n);return{leafSelectors:n,sensibleDefaults:i}}collectFromAggregated(e,s,n){if(e.matcher(s))for(const i of e.children)this.collectFromLeaf(i,s,n)}collectFromLeaf(e,s,n){v(e.selectorType,s.itemType??"")&&e.matcher(s)&&n.push(e)}rollUpSensibleDefaults(e){const s=new Map,n=(r,a)=>{const l=s.get(r)??[];l.push(a),s.set(r,l)};for(const r of e){const a=A[r.selectorType];if(a)for(const l of a)n(l,r);else n(r.selectorType,r)}const i={};for(const[r,a]of s)t.hasItemTypeHandler(r)&&(i[r]=t.getItemTypeHandler(r).rollUpSensibleDefaults(a));return i}}const L=new N;class F{deepMerge(e,s){if(s==null)return e;if(e==null||typeof e!="object"||typeof s!="object"||Array.isArray(e)||Array.isArray(s))return s;const n={...e};for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&(typeof s[i]=="object"&&!Array.isArray(s[i])&&s[i]!==null&&typeof e[i]=="object"&&!Array.isArray(e[i])&&e[i]!==null?n[i]=this.deepMerge(e[i],s[i]):n[i]=s[i]);return n}}const j=new F;class W{constructor(e){this.objectUtils=e}merge(e,s,n){let i={},r=null;typeof e=="function"&&(r=e);const a=this.collectDecorators(n);for(const u of a){if(r!=null){r=this.composeRuntimeFunctions(r,u);continue}if(typeof u=="function"){const g=u({...i,...typeof e=="function"?{}:e});if(typeof g=="function"){r=this.createPromotedFunction(i,e,g,s,n);continue}i=this.objectUtils.deepMerge(i,g)}else i=this.objectUtils.deepMerge(i,u)}if(r!=null)return{kind:"dynamic",fn:this.wrapWithSensibleDefaults(r,i,s,n)};const l=this.objectUtils.deepMerge(e,i);return{kind:"static",def:this.applySensibleDefaults({...l},s,n)}}collectDecorators(e){const s=[];for(const n of e.leafSelectors){const i=n.config;i.override!=null&&s.push(i.override)}return s}applySensibleDefaults(e,s,n){if(!t.hasItemTypeHandler(s))return e;const i=n.sensibleDefaults[s]??{};return t.getItemTypeHandler(s).applySensibleDefaults(e,i)}createPromotedFunction(e,s,n,i,r){return a=>{const l=n(a);let c=this.objectUtils.deepMerge(e,l);return c=this.objectUtils.deepMerge(c,s),this.applySensibleDefaults(c,i,r)}}wrapWithSensibleDefaults(e,s,n,i){return r=>{let a=e(r);return Object.keys(s).length>0&&(a=this.objectUtils.deepMerge(s,a)),this.applySensibleDefaults(a,n,i)}}composeRuntimeFunctions(e,s){return typeof s=="function"?n=>{const i=e(n),r=s(i);return typeof r=="function"?r(n):this.objectUtils.deepMerge(r,i)}:n=>{const i=e(n);return this.objectUtils.deepMerge(i,s)}}}const G=new W(j);class z{mapToWidget(e,s){if(e.kind==="dynamic"){const n=e.fn;return(i=>{const r=n(i);return this.mapStaticDef(r,s)})}return this.mapStaticDef(e.def,s)}mapStaticDef(e,s){const n=t.getItemTypeHandler(s).mapToWidget(e);return this.applyBaseWidgetFields(n,e)}applyBaseWidgetFields(e,s){return s.size!=null&&(e.size=s.size),s.defaultValue!=null&&e.kind==="input"&&(e.defaultValue=s.defaultValue),s.on!=null&&(e.on=s.on),s.include!=null&&(e.include=s.include),s.exclude!=null&&(e.exclude=s.exclude),e}}const K=new z;class ${normalizeSelectors(e){const s=Array.isArray(e)?e:[e],n=[],i=[];for(const r of s)r.kind==="leaf"?i.push(r):n.push(r);return i.length>0&&n.unshift({kind:"aggregated",matcher:()=>!0,children:i}),n}extractFormConfig(){return{suppressAutomaticStack:!1}}}const H=new $,V={input:new Set(["disabled","readonly","label","validator","size"]),action:new Set(["disabled","label","size"]),layout:new Set(["size"]),display:new Set([])},R={onChange:"change",onLoad:"load",onFilter:"filter",onClick:"click"};class Y{extractFromMergeResult(e,s){const n={};for(const l of s){const c=l.targetState,u=l.config,g=u.override&&typeof u.override!="function"?u.override:u;n[c]={...n[c]||{},...g}}if(e.kind==="dynamic"){const l=e.fn;return{cleanedResult:{kind:"dynamic",fn:u=>{const g=l(u),{states:d,...p}=g;return p}},stateData:{stateOverrides:n}}}const{states:i,...r}=e.def,a={};for(const[l,c]of Object.entries(n))a[l]={...c};if(i)for(const[l,c]of Object.entries(i))a[l]={...a[l]||{},...c};return{cleanedResult:{kind:"static",def:r},stateData:{stateOverrides:a}}}applyToWidget(e,s,n,i){const{stateOverrides:r}=s;if(Object.keys(r).length===0)return e;const a={...e},l=e.kind,c=V[l]||new Set;e.props&&(a.props={...e.props}),e.on&&(a.on={...e.on});for(const[u,g]of Object.entries(r))for(const[d,p]of Object.entries(g))d==="visible"?this.applyVisibility(a,u,p):R[d]?this.applyStateEvent(a,u,d,p,n,i):c.has(d)?a[`${d}.${u}`]=p:(a.props||(a.props={}),a.props[`${d}.${u}`]=p);return a}hasStateData(e){return Object.keys(e.stateOverrides).length>0}applyVisibility(e,s,n){if(n){const i=e.include?.in||[];e.include={...e.include||{},in:[...i,s]}}else{const i=e.exclude?.from||[];e.exclude={...e.exclude||{},from:[...i,s]}}}applyStateEvent(e,s,n,i,r,a){const l=R[n];if(e.on||(e.on={}),typeof i=="function"){const c=t.probeForHostEventName(i);if(c!=null)e.on[`${l}.${s}`]=c;else{const u=a.next();r.set(u,i),e.on[`${l}.${s}`]=u}}else typeof i=="string"&&(e.on[`${l}.${s}`]=i)}}const X=new Y;function q(){let o=0;return{next:()=>`event_${o++}`}}class J{constructor(e,s,n,i,r){this.resolver=e,this.merger=s,this.mapper=n,this.eventWiring=i,this.stateExpansion=r}walkAndMap(e,s,n){const i=new Map,r=q(),a={value:0},l=new Set;return{widgets:this.walkItems(e,s,i,n,r,a,l),eventRegistry:i}}walkItems(e,s,n,i,r,a,l){return e.flatMap(c=>{if(c.type!=="ITEMS")throw new Error("Unexpected gui shortcut type");return c.items.map(u=>this.processItem(u,c.itemType,c.tags,s,n,i,r,a,l))})}processItem(e,s,n,i,r,a,l,c,u){const g=s,d=t.getItemTypeHandler(s),p=d.parseEntry(e),m=this.buildBaseDef(p),k=this.buildDecoratorForMatching(m,g,n),T=this.resolver.resolve(k,i),E=T.leafSelectors.filter(_=>_.targetState!=null),P={leafSelectors:T.leafSelectors.filter(_=>_.targetState==null),sensibleDefaults:T.sensibleDefaults};let f=this.merger.merge(m,g,P);d.afterMerge&&(f=d.afterMerge(f,{eventRegistry:r,formConfig:a,eventIdGenerator:l})),f=this.eventWiring.wireInputLayoutEvents(f,r,l);const{cleanedResult:U,stateData:D}=this.stateExpansion.extractFromMergeResult(f,E);let y;if(d.buildCustomWidget){const _=this.buildCustomWidgetContext(p.children,i,r,a,l,c,u);y=this.buildCustomWidget(d,U,_)}else y=this.mapper.mapToWidget(U,g);if(typeof y!="function"){const _=y;_.uid||(_.path&&!u.has(_.path)?(_.uid=_.path,u.add(_.path)):_.uid=`dx_${c.value++}`)}if(this.stateExpansion.hasStateData(D))if(typeof y=="function"){const _=y;y=(w=>{const x=_(w);return this.stateExpansion.applyToWidget(x,D,r,l)})}else y=this.stateExpansion.applyToWidget(y,D,r,l);return y}buildCustomWidgetContext(e,s,n,i,r,a,l){return{children:e,mapStaticDef:(c,u)=>this.mapper.mapStaticDef(c,u),walkChildren:c=>this.walkItems(c,s,n,i,r,a,l)}}buildCustomWidget(e,s,n){return e.buildCustomWidget(s,n)}buildBaseDef(e){const s=e.baseDef;return typeof s=="function"?n=>{const i=t.withForm(n),r=s(i);return e.path!=null?{...r,path:e.path}:r}:e.path!=null?{...s,path:e.path}:s}buildDecoratorForMatching(e,s,n){if(typeof e=="function")return{itemType:s,tags:[...n]};const i=[...n,..."tags"in e&&e.tags?e.tags:[]],r="uid"in e?e.uid:void 0,a="type"in e?e.type:void 0;return{itemType:s,tags:i,uid:r,type:a}}}class Q{constructor(e,s){this.selectorNormalizer=e,this.walker=s}processDxFacade(e,s=[],n){const{defs:i,gslSelectors:r,formConfig:a}=this.prepareForm(e,s,n),{widgets:l,eventRegistry:c}=this.walker.walkAndMap(i,r,a),u=l[0];return this.buildResult({form:u},c,a)}prepareForm(e,s,n){const r=(Array.isArray(e)?[...e]:[e]).map(c=>typeof c=="function"?t._guiDisplay(c):c),a=this.selectorNormalizer.normalizeSelectors(s),l={...this.selectorNormalizer.extractFormConfig(),...n};if(!l.suppressAutomaticStack){const c={def:{uid:"#root",direction:"column",widgetName:"flex"},children:r};return{defs:[{type:"ITEMS",itemType:t.GuiItemTypes.LAYOUTS,items:[c],tags:[]}],gslSelectors:a,formConfig:l}}return{defs:r,gslSelectors:a,formConfig:l}}convertStateNames(e){const s={};for(const[n,i]of Object.entries(e))s[n.replace(/\$/g,":")]=i;return s}buildResult(e,s,n){n.states&&Object.keys(n.states).length>0&&(e={...e,states:this.convertStateNames(n.states)});const i={form:e};return s.size>0&&(i.events=r=>{const a=s.get(r.name);if(a){const l=u=>{if(u&&typeof u=="object"&&"path"in u&&!("type"in u)){const{path:g,...d}=u;for(const[p,m]of Object.entries(d))r.callback({type:"OVERRIDE_WIDGET_PROP",payload:{path:g,prop:p,value:m}})}else r.callback(u)},c={...r,callback:l,update:l};a(c)}}),n.dependencies&&(i.dependencies=n.dependencies),n.functions&&(i.functions=n.functions),n.widgetLoaders&&(i.widgetLoaders=n.widgetLoaders),n.validateOn&&(i.validateOn=n.validateOn),n.itemRenderers&&(i.itemRenderers=n.itemRenderers),i}}const Z=new J(L,G,K,t.eventWiringService,X),C=new Q(H,Z);function h(o){return typeof o=="function"?!0:Array.isArray(o)?o.length===0||o.every(S):S(o)}function S(o){if(typeof o=="function")return!0;if(o===null||typeof o!="object")return!1;const e=o;return e.type==="ITEMS"&&typeof e.itemType=="string"}function ee(o){if(!o||typeof o!="object"||Array.isArray(o))return;const e=o.form;if(h(e))throw new Error("[GolemUI] The gui.* form definition was wrapped in an extra `{ form: ... }` object, so its fields were never resolved. Pass the gui.* array DIRECTLY as formDef (`config={{ formDef: form }}`) and put any named `states` in `formConfig`: `config={{ formDef: form, formConfig: { states } }}`. Do NOT wrap them as a `{ form: [...] }` object.")}const b=Object.freeze({}),te=Object.freeze({}),B=new WeakMap;function I(o,e){return o==null?e:typeof o=="object"?o:{}}function se(o,e,s){if(!h(o))return ee(o),{formDef:o};const n=I(o,b),i=I(e,b),r=I(s,te);let a=B.get(n);a||(a=new WeakMap,B.set(n,a));let l=a.get(i);l||(l=new WeakMap,a.set(i,l));const c=l.get(r);if(c)return c;const u=C.processDxFacade(o,e,s),g={formDef:u.form,formEvent:u.events,dependencies:u.dependencies,functions:u.functions,widgetLoaders:u.widgetLoaders,validateOn:u.validateOn,itemRenderers:u.itemRenderers};return l.set(r,g),g}class ie{create(e){return{states:e.states,form:{uid:"gui-root-uid",type:"flex",kind:"layout",children:e.form}}}}function ne(){return new ie}const re=o=>o!==null&&typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"label")&&Object.prototype.hasOwnProperty.call(o,"value");function ae(o,e){if(o!=null&&typeof o=="object"&&"__rid"in o)return o.__rid;const s=e();return Object.defineProperty(o,"__rid",{value:s,enumerable:!1,configurable:!1}),s}exports._gslAccordionByUid=t._gslAccordionByUid;exports._gslAccordions=t._gslAccordions;exports._gslActionByUid=t._gslActionByUid;exports._gslActions=t._gslActions;exports._gslAlertByUid=t._gslAlertByUid;exports._gslAlerts=t._gslAlerts;exports._gslBooleanInputs=t._gslBooleanInputs;exports._gslCalendarByUid=t._gslCalendarByUid;exports._gslCalendars=t._gslCalendars;exports._gslCheckboxByUid=t._gslCheckboxByUid;exports._gslCheckboxes=t._gslCheckboxes;exports._gslCurrencies=t._gslCurrencies;exports._gslCurrencyByUid=t._gslCurrencyByUid;exports._gslCustomActionByUid=t._gslCustomActionByUid;exports._gslCustomActions=t._gslCustomActions;exports._gslCustomDisplayByUid=t._gslCustomDisplayByUid;exports._gslCustomDisplays=t._gslCustomDisplays;exports._gslCustomInputByUid=t._gslCustomInputByUid;exports._gslCustomInputs=t._gslCustomInputs;exports._gslCustomLayoutByUid=t._gslCustomLayoutByUid;exports._gslCustomLayouts=t._gslCustomLayouts;exports._gslDateInputByUid=t._gslDateInputByUid;exports._gslDateInputs=t._gslDateInputs;exports._gslDatePickerByUid=t._gslDatePickerByUid;exports._gslDatePickers=t._gslDatePickers;exports._gslDateTimeCalendarByUid=t._gslDateTimeCalendarByUid;exports._gslDateTimeCalendars=t._gslDateTimeCalendars;exports._gslDateTimeInputByUid=t._gslDateTimeInputByUid;exports._gslDateTimeInputs=t._gslDateTimeInputs;exports._gslDateTimePickerByUid=t._gslDateTimePickerByUid;exports._gslDateTimePickers=t._gslDateTimePickers;exports._gslDisplayByUid=t._gslDisplayByUid;exports._gslDisplays=t._gslDisplays;exports._gslDropdownByUid=t._gslDropdownByUid;exports._gslDropdowns=t._gslDropdowns;exports._gslInputByUid=t._gslInputByUid;exports._gslInputs=t._gslInputs;exports._gslLayoutByUid=t._gslLayoutByUid;exports._gslLayouts=t._gslLayouts;exports._gslListByUid=t._gslListByUid;exports._gslLists=t._gslLists;exports._gslMarkdownByUid=t._gslMarkdownByUid;exports._gslMarkdownTextByUid=t._gslMarkdownTextByUid;exports._gslMarkdownTexts=t._gslMarkdownTexts;exports._gslMarkdowns=t._gslMarkdowns;exports._gslNumberInputs=t._gslNumberInputs;exports._gslPasswordByUid=t._gslPasswordByUid;exports._gslPasswords=t._gslPasswords;exports._gslRadiogroupByUid=t._gslRadiogroupByUid;exports._gslRadiogroups=t._gslRadiogroups;exports._gslRangeCalendarByUid=t._gslRangeCalendarByUid;exports._gslRangeCalendars=t._gslRangeCalendars;exports._gslRangeDateInputByUid=t._gslRangeDateInputByUid;exports._gslRangeDateInputs=t._gslRangeDateInputs;exports._gslRangeDatePickerByUid=t._gslRangeDatePickerByUid;exports._gslRangeDatePickers=t._gslRangeDatePickers;exports._gslRangeDateTimeCalendarByUid=t._gslRangeDateTimeCalendarByUid;exports._gslRangeDateTimeCalendars=t._gslRangeDateTimeCalendars;exports._gslRangeDateTimeInputByUid=t._gslRangeDateTimeInputByUid;exports._gslRangeDateTimeInputs=t._gslRangeDateTimeInputs;exports._gslRangeDateTimePickerByUid=t._gslRangeDateTimePickerByUid;exports._gslRangeDateTimePickers=t._gslRangeDateTimePickers;exports._gslRangeTimeInputByUid=t._gslRangeTimeInputByUid;exports._gslRangeTimeInputs=t._gslRangeTimeInputs;exports._gslRangeTimePickerByUid=t._gslRangeTimePickerByUid;exports._gslRangeTimePickers=t._gslRangeTimePickers;exports._gslRepeaterByUid=t._gslRepeaterByUid;exports._gslRepeaters=t._gslRepeaters;exports._gslSelectByUid=t._gslSelectByUid;exports._gslSelects=t._gslSelects;exports._gslTabs=t._gslTabs;exports._gslTabsByUid=t._gslTabsByUid;exports._gslTags=t._gslTags;exports._gslTagsByUid=t._gslTagsByUid;exports._gslTextInputs=t._gslTextInputs;exports._gslTextareaByUid=t._gslTextareaByUid;exports._gslTextareas=t._gslTextareas;exports._gslTimeInputByUid=t._gslTimeInputByUid;exports._gslTimeInputs=t._gslTimeInputs;exports._gslTimePickerByUid=t._gslTimePickerByUid;exports._gslTimePickers=t._gslTimePickers;exports._guiAccordion=t._guiAccordion;exports._guiAlert=t._guiAlert;exports._guiBooleanInput=t._guiBooleanInput;exports._guiButton=t._guiButton;exports._guiCalendar=t._guiCalendar;exports._guiCheckbox=t._guiCheckbox;exports._guiCurrency=t._guiCurrency;exports._guiCustomAction=t._guiCustomAction;exports._guiCustomDisplay=t._guiCustomDisplay;exports._guiCustomInput=t._guiCustomInput;exports._guiCustomLayout=t._guiCustomLayout;exports._guiDateInput=t._guiDateInput;exports._guiDatePicker=t._guiDatePicker;exports._guiDateTimeCalendar=t._guiDateTimeCalendar;exports._guiDateTimeInput=t._guiDateTimeInput;exports._guiDateTimePicker=t._guiDateTimePicker;exports._guiDisplay=t._guiDisplay;exports._guiDropdown=t._guiDropdown;exports._guiFlex=t._guiFlex;exports._guiGrid=t._guiGrid;exports._guiHorizontalFlex=t._guiHorizontalFlex;exports._guiHorizontalGrid=t._guiHorizontalGrid;exports._guiList=t._guiList;exports._guiMarkdown=t._guiMarkdown;exports._guiMarkdownText=t._guiMarkdownText;exports._guiNumberInput=t._guiNumberInput;exports._guiPassword=t._guiPassword;exports._guiRadiogroup=t._guiRadiogroup;exports._guiRangeCalendar=t._guiRangeCalendar;exports._guiRangeDateInput=t._guiRangeDateInput;exports._guiRangeDatePicker=t._guiRangeDatePicker;exports._guiRangeDateTimeCalendar=t._guiRangeDateTimeCalendar;exports._guiRangeDateTimeInput=t._guiRangeDateTimeInput;exports._guiRangeDateTimePicker=t._guiRangeDateTimePicker;exports._guiRangeTimeInput=t._guiRangeTimeInput;exports._guiRangeTimePicker=t._guiRangeTimePicker;exports._guiRepeater=t._guiRepeater;exports._guiSelect=t._guiSelect;exports._guiTabs=t._guiTabs;exports._guiTags=t._guiTags;exports._guiTextInput=t._guiTextInput;exports._guiTextarea=t._guiTextarea;exports._guiTimeInput=t._guiTimeInput;exports._guiTimePicker=t._guiTimePicker;exports._guiVerticalFlex=t._guiVerticalFlex;exports._guiVerticalGrid=t._guiVerticalGrid;exports.createGslSelector=t.createGslSelector;exports.defineShortcutType=t.defineShortcutType;exports.extractWidgetProps=t.extractWidgetProps;exports.processAutoLabel=t.processAutoLabel;exports.processAutoPlaceholder=t.processAutoPlaceholder;exports._gslStates=M;exports._gslTag=O;exports.formDefs=C;exports.getItemKey=ae;exports.golemForm=ne;exports.isDxDefinitions=h;exports.isOption=re;exports.resolveFormInput=se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./register-B3CJMfX9.cjs");require("@golemui/core");require("@golemui/gui-validators");function M(o,...e){return e.map(s=>({...s,targetState:o}))}function O(o,...e){return{kind:"aggregated",matcher:s=>s.tags?.includes(o)??!1,children:e}}const A={INPUTS:new Set(["INPUTS","TEXTAREA","PASSWORD","SELECT","DROPDOWN","RADIOGROUP","CHECKBOX","CALENDAR","DATE_TIME_CALENDAR","DATE_TIME_PICKER","DATE_INPUT","DATE_PICKER","RANGE_CALENDAR","RANGE_DATE_INPUT","RANGE_DATE_TIME_INPUT","RANGE_DATE_TIME_CALENDAR","RANGE_DATE_TIME_PICKER","RANGE_TIME_INPUT","RANGE_DATE_PICKER","RANGE_TIME_PICKER","TIME_INPUT","TIME_PICKER","DATE_TIME_INPUT","CURRENCY","MARKDOWN","LIST","CUSTOM_INPUT","REPEATER","TAGS"]),ACTIONS:new Set(["ACTIONS","CUSTOM_ACTION"]),DISPLAYS:new Set(["DISPLAYS","ALERTS","MARKDOWN_TEXTS","CUSTOM_DISPLAY"]),LAYOUTS:new Set(["LAYOUTS","TABS","ACCORDION","CUSTOM_LAYOUT"])};function v(o,e){const s=A[o];return s?s.has(e):o===e}class N{resolve(e,s){const n=[];for(const r of s)r.kind==="aggregated"?this.collectFromAggregated(r,e,n):this.collectFromLeaf(r,e,n);const i=this.rollUpSensibleDefaults(n);return{leafSelectors:n,sensibleDefaults:i}}collectFromAggregated(e,s,n){if(e.matcher(s))for(const i of e.children)this.collectFromLeaf(i,s,n)}collectFromLeaf(e,s,n){v(e.selectorType,s.itemType??"")&&e.matcher(s)&&n.push(e)}rollUpSensibleDefaults(e){const s=new Map,n=(r,a)=>{const l=s.get(r)??[];l.push(a),s.set(r,l)};for(const r of e){const a=A[r.selectorType];if(a)for(const l of a)n(l,r);else n(r.selectorType,r)}const i={};for(const[r,a]of s)t.hasItemTypeHandler(r)&&(i[r]=t.getItemTypeHandler(r).rollUpSensibleDefaults(a));return i}}const L=new N;class F{deepMerge(e,s){if(s==null)return e;if(e==null||typeof e!="object"||typeof s!="object"||Array.isArray(e)||Array.isArray(s))return s;const n={...e};for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&(typeof s[i]=="object"&&!Array.isArray(s[i])&&s[i]!==null&&typeof e[i]=="object"&&!Array.isArray(e[i])&&e[i]!==null?n[i]=this.deepMerge(e[i],s[i]):n[i]=s[i]);return n}}const j=new F;class W{constructor(e){this.objectUtils=e}merge(e,s,n){let i={},r=null;typeof e=="function"&&(r=e);const a=this.collectDecorators(n);for(const u of a){if(r!=null){r=this.composeRuntimeFunctions(r,u);continue}if(typeof u=="function"){const g=u({...i,...typeof e=="function"?{}:e});if(typeof g=="function"){r=this.createPromotedFunction(i,e,g,s,n);continue}i=this.objectUtils.deepMerge(i,g)}else i=this.objectUtils.deepMerge(i,u)}if(r!=null)return{kind:"dynamic",fn:this.wrapWithSensibleDefaults(r,i,s,n)};const l=this.objectUtils.deepMerge(e,i);return{kind:"static",def:this.applySensibleDefaults({...l},s,n)}}collectDecorators(e){const s=[];for(const n of e.leafSelectors){const i=n.config;i.override!=null&&s.push(i.override)}return s}applySensibleDefaults(e,s,n){if(!t.hasItemTypeHandler(s))return e;const i=n.sensibleDefaults[s]??{};return t.getItemTypeHandler(s).applySensibleDefaults(e,i)}createPromotedFunction(e,s,n,i,r){return a=>{const l=n(a);let c=this.objectUtils.deepMerge(e,l);return c=this.objectUtils.deepMerge(c,s),this.applySensibleDefaults(c,i,r)}}wrapWithSensibleDefaults(e,s,n,i){return r=>{let a=e(r);return Object.keys(s).length>0&&(a=this.objectUtils.deepMerge(s,a)),this.applySensibleDefaults(a,n,i)}}composeRuntimeFunctions(e,s){return typeof s=="function"?n=>{const i=e(n),r=s(i);return typeof r=="function"?r(n):this.objectUtils.deepMerge(r,i)}:n=>{const i=e(n);return this.objectUtils.deepMerge(i,s)}}}const G=new W(j);class z{mapToWidget(e,s){if(e.kind==="dynamic"){const n=e.fn;return(i=>{const r=n(i);return this.mapStaticDef(r,s)})}return this.mapStaticDef(e.def,s)}mapStaticDef(e,s){const n=t.getItemTypeHandler(s).mapToWidget(e);return this.applyBaseWidgetFields(n,e)}applyBaseWidgetFields(e,s){return s.size!=null&&(e.size=s.size),s.defaultValue!=null&&e.kind==="input"&&(e.defaultValue=s.defaultValue),s.on!=null&&(e.on=s.on),s.include!=null&&(e.include=s.include),s.exclude!=null&&(e.exclude=s.exclude),e}}const K=new z;class ${normalizeSelectors(e){const s=Array.isArray(e)?e:[e],n=[],i=[];for(const r of s)r.kind==="leaf"?i.push(r):n.push(r);return i.length>0&&n.unshift({kind:"aggregated",matcher:()=>!0,children:i}),n}extractFormConfig(){return{suppressAutomaticStack:!1}}}const H=new $,V={input:new Set(["disabled","readonly","label","validator","size"]),action:new Set(["disabled","label","size"]),layout:new Set(["size"]),display:new Set([])},R={onChange:"change",onLoad:"load",onFilter:"filter",onClick:"click"};class Y{extractFromMergeResult(e,s){const n={};for(const l of s){const c=l.targetState,u=l.config,g=u.override&&typeof u.override!="function"?u.override:u;n[c]={...n[c]||{},...g}}if(e.kind==="dynamic"){const l=e.fn;return{cleanedResult:{kind:"dynamic",fn:u=>{const g=l(u),{states:d,...p}=g;return p}},stateData:{stateOverrides:n}}}const{states:i,...r}=e.def,a={};for(const[l,c]of Object.entries(n))a[l]={...c};if(i)for(const[l,c]of Object.entries(i))a[l]={...a[l]||{},...c};return{cleanedResult:{kind:"static",def:r},stateData:{stateOverrides:a}}}applyToWidget(e,s,n,i){const{stateOverrides:r}=s;if(Object.keys(r).length===0)return e;const a={...e},l=e.kind,c=V[l]||new Set;e.props&&(a.props={...e.props}),e.on&&(a.on={...e.on});for(const[u,g]of Object.entries(r))for(const[d,p]of Object.entries(g))d==="visible"?this.applyVisibility(a,u,p):R[d]?this.applyStateEvent(a,u,d,p,n,i):c.has(d)?a[`${d}.${u}`]=p:(a.props||(a.props={}),a.props[`${d}.${u}`]=p);return a}hasStateData(e){return Object.keys(e.stateOverrides).length>0}applyVisibility(e,s,n){if(n){const i=e.include?.in||[];e.include={...e.include||{},in:[...i,s]}}else{const i=e.exclude?.from||[];e.exclude={...e.exclude||{},from:[...i,s]}}}applyStateEvent(e,s,n,i,r,a){const l=R[n];if(e.on||(e.on={}),typeof i=="function"){const c=t.probeForHostEventName(i);if(c!=null)e.on[`${l}.${s}`]=c;else{const u=a.next();r.set(u,i),e.on[`${l}.${s}`]=u}}else typeof i=="string"&&(e.on[`${l}.${s}`]=i)}}const X=new Y;function q(){let o=0;return{next:()=>`event_${o++}`}}class J{constructor(e,s,n,i,r){this.resolver=e,this.merger=s,this.mapper=n,this.eventWiring=i,this.stateExpansion=r}walkAndMap(e,s,n){const i=new Map,r=q(),a={value:0},l=new Set;return{widgets:this.walkItems(e,s,i,n,r,a,l),eventRegistry:i}}walkItems(e,s,n,i,r,a,l){return e.flatMap(c=>{if(c.type!=="ITEMS")throw new Error("Unexpected gui shortcut type");return c.items.map(u=>this.processItem(u,c.itemType,c.tags,s,n,i,r,a,l))})}processItem(e,s,n,i,r,a,l,c,u){const g=s,d=t.getItemTypeHandler(s),p=d.parseEntry(e),m=this.buildBaseDef(p),k=this.buildDecoratorForMatching(m,g,n),T=this.resolver.resolve(k,i),E=T.leafSelectors.filter(_=>_.targetState!=null),P={leafSelectors:T.leafSelectors.filter(_=>_.targetState==null),sensibleDefaults:T.sensibleDefaults};let f=this.merger.merge(m,g,P);d.afterMerge&&(f=d.afterMerge(f,{eventRegistry:r,formConfig:a,eventIdGenerator:l})),f=this.eventWiring.wireInputLayoutEvents(f,r,l);const{cleanedResult:U,stateData:D}=this.stateExpansion.extractFromMergeResult(f,E);let y;if(d.buildCustomWidget){const _=this.buildCustomWidgetContext(p.children,i,r,a,l,c,u);y=this.buildCustomWidget(d,U,_)}else y=this.mapper.mapToWidget(U,g);if(typeof y!="function"){const _=y;_.uid||(_.path&&!u.has(_.path)?(_.uid=_.path,u.add(_.path)):_.uid=`dx_${c.value++}`)}if(this.stateExpansion.hasStateData(D))if(typeof y=="function"){const _=y;y=(w=>{const x=_(w);return this.stateExpansion.applyToWidget(x,D,r,l)})}else y=this.stateExpansion.applyToWidget(y,D,r,l);return y}buildCustomWidgetContext(e,s,n,i,r,a,l){return{children:e,mapStaticDef:(c,u)=>this.mapper.mapStaticDef(c,u),walkChildren:c=>this.walkItems(c,s,n,i,r,a,l)}}buildCustomWidget(e,s,n){return e.buildCustomWidget(s,n)}buildBaseDef(e){const s=e.baseDef;return typeof s=="function"?n=>{const i=t.withForm(n),r=s(i);return e.path!=null?{...r,path:e.path}:r}:e.path!=null?{...s,path:e.path}:s}buildDecoratorForMatching(e,s,n){if(typeof e=="function")return{itemType:s,tags:[...n]};const i=[...n,..."tags"in e&&e.tags?e.tags:[]],r="uid"in e?e.uid:void 0,a="type"in e?e.type:void 0;return{itemType:s,tags:i,uid:r,type:a}}}class Q{constructor(e,s){this.selectorNormalizer=e,this.walker=s}processDxFacade(e,s=[],n){const{defs:i,gslSelectors:r,formConfig:a}=this.prepareForm(e,s,n),{widgets:l,eventRegistry:c}=this.walker.walkAndMap(i,r,a),u=l[0];return this.buildResult({form:u},c,a)}prepareForm(e,s,n){const r=(Array.isArray(e)?[...e]:[e]).map(c=>typeof c=="function"?t._guiDisplay(c):c),a=this.selectorNormalizer.normalizeSelectors(s),l={...this.selectorNormalizer.extractFormConfig(),...n};if(!l.suppressAutomaticStack){const c={def:{uid:"#root",direction:"column",widgetName:"flex"},children:r};return{defs:[{type:"ITEMS",itemType:t.GuiItemTypes.LAYOUTS,items:[c],tags:[]}],gslSelectors:a,formConfig:l}}return{defs:r,gslSelectors:a,formConfig:l}}convertStateNames(e){const s={};for(const[n,i]of Object.entries(e))s[n.replace(/\$/g,":")]=i;return s}buildResult(e,s,n){n.states&&Object.keys(n.states).length>0&&(e={...e,states:this.convertStateNames(n.states)});const i={form:e};return s.size>0&&(i.events=r=>{const a=s.get(r.name);if(a){const l=u=>{if(u&&typeof u=="object"&&"path"in u&&!("type"in u)){const{path:g,...d}=u;for(const[p,m]of Object.entries(d))r.callback({type:"OVERRIDE_WIDGET_PROP",payload:{path:g,prop:p,value:m}})}else r.callback(u)},c={...r,callback:l,update:l};a(c)}}),n.dependencies&&(i.dependencies=n.dependencies),n.functions&&(i.functions=n.functions),n.widgetLoaders&&(i.widgetLoaders=n.widgetLoaders),n.validateOn&&(i.validateOn=n.validateOn),n.itemRenderers&&(i.itemRenderers=n.itemRenderers),i}}const Z=new J(L,G,K,t.eventWiringService,X),C=new Q(H,Z);function h(o){return typeof o=="function"?!0:Array.isArray(o)?o.length===0||o.every(S):S(o)}function S(o){if(typeof o=="function")return!0;if(o===null||typeof o!="object")return!1;const e=o;return e.type==="ITEMS"&&typeof e.itemType=="string"}function ee(o){if(!o||typeof o!="object"||Array.isArray(o))return;const e=o.form;if(h(e))throw new Error("[GolemUI] The gui.* form definition was wrapped in an extra `{ form: ... }` object, so its fields were never resolved. Pass the gui.* array DIRECTLY as formDef (`config={{ formDef: form }}`) and put any named `states` in `formConfig`: `config={{ formDef: form, formConfig: { states } }}`. Do NOT wrap them as a `{ form: [...] }` object.")}const b=Object.freeze({}),te=Object.freeze({}),B=new WeakMap;function I(o,e){return o==null?e:typeof o=="object"?o:{}}function se(o,e,s){if(!h(o))return ee(o),{formDef:o};const n=I(o,b),i=I(e,b),r=I(s,te);let a=B.get(n);a||(a=new WeakMap,B.set(n,a));let l=a.get(i);l||(l=new WeakMap,a.set(i,l));const c=l.get(r);if(c)return c;const u=C.processDxFacade(o,e,s),g={formDef:u.form,formEvent:u.events,dependencies:u.dependencies,functions:u.functions,widgetLoaders:u.widgetLoaders,validateOn:u.validateOn,itemRenderers:u.itemRenderers};return l.set(r,g),g}class ie{create(e){return{states:e.states,form:{uid:"gui-root-uid",type:"flex",kind:"layout",children:e.form}}}}function ne(){return new ie}const re=o=>o!==null&&typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"label")&&Object.prototype.hasOwnProperty.call(o,"value");function ae(o,e){if(o!=null&&typeof o=="object"&&"__rid"in o)return o.__rid;const s=e();return Object.defineProperty(o,"__rid",{value:s,enumerable:!1,configurable:!1}),s}exports._gslAccordionByUid=t._gslAccordionByUid;exports._gslAccordions=t._gslAccordions;exports._gslActionByUid=t._gslActionByUid;exports._gslActions=t._gslActions;exports._gslAlertByUid=t._gslAlertByUid;exports._gslAlerts=t._gslAlerts;exports._gslBooleanInputs=t._gslBooleanInputs;exports._gslCalendarByUid=t._gslCalendarByUid;exports._gslCalendars=t._gslCalendars;exports._gslCheckboxByUid=t._gslCheckboxByUid;exports._gslCheckboxes=t._gslCheckboxes;exports._gslCurrencies=t._gslCurrencies;exports._gslCurrencyByUid=t._gslCurrencyByUid;exports._gslCustomActionByUid=t._gslCustomActionByUid;exports._gslCustomActions=t._gslCustomActions;exports._gslCustomDisplayByUid=t._gslCustomDisplayByUid;exports._gslCustomDisplays=t._gslCustomDisplays;exports._gslCustomInputByUid=t._gslCustomInputByUid;exports._gslCustomInputs=t._gslCustomInputs;exports._gslCustomLayoutByUid=t._gslCustomLayoutByUid;exports._gslCustomLayouts=t._gslCustomLayouts;exports._gslDateInputByUid=t._gslDateInputByUid;exports._gslDateInputs=t._gslDateInputs;exports._gslDatePickerByUid=t._gslDatePickerByUid;exports._gslDatePickers=t._gslDatePickers;exports._gslDateTimeCalendarByUid=t._gslDateTimeCalendarByUid;exports._gslDateTimeCalendars=t._gslDateTimeCalendars;exports._gslDateTimeInputByUid=t._gslDateTimeInputByUid;exports._gslDateTimeInputs=t._gslDateTimeInputs;exports._gslDateTimePickerByUid=t._gslDateTimePickerByUid;exports._gslDateTimePickers=t._gslDateTimePickers;exports._gslDisplayByUid=t._gslDisplayByUid;exports._gslDisplays=t._gslDisplays;exports._gslDropdownByUid=t._gslDropdownByUid;exports._gslDropdowns=t._gslDropdowns;exports._gslInputByUid=t._gslInputByUid;exports._gslInputs=t._gslInputs;exports._gslLayoutByUid=t._gslLayoutByUid;exports._gslLayouts=t._gslLayouts;exports._gslListByUid=t._gslListByUid;exports._gslLists=t._gslLists;exports._gslMarkdownByUid=t._gslMarkdownByUid;exports._gslMarkdownTextByUid=t._gslMarkdownTextByUid;exports._gslMarkdownTexts=t._gslMarkdownTexts;exports._gslMarkdowns=t._gslMarkdowns;exports._gslNumberInputs=t._gslNumberInputs;exports._gslPasswordByUid=t._gslPasswordByUid;exports._gslPasswords=t._gslPasswords;exports._gslRadiogroupByUid=t._gslRadiogroupByUid;exports._gslRadiogroups=t._gslRadiogroups;exports._gslRangeCalendarByUid=t._gslRangeCalendarByUid;exports._gslRangeCalendars=t._gslRangeCalendars;exports._gslRangeDateInputByUid=t._gslRangeDateInputByUid;exports._gslRangeDateInputs=t._gslRangeDateInputs;exports._gslRangeDatePickerByUid=t._gslRangeDatePickerByUid;exports._gslRangeDatePickers=t._gslRangeDatePickers;exports._gslRangeDateTimeCalendarByUid=t._gslRangeDateTimeCalendarByUid;exports._gslRangeDateTimeCalendars=t._gslRangeDateTimeCalendars;exports._gslRangeDateTimeInputByUid=t._gslRangeDateTimeInputByUid;exports._gslRangeDateTimeInputs=t._gslRangeDateTimeInputs;exports._gslRangeDateTimePickerByUid=t._gslRangeDateTimePickerByUid;exports._gslRangeDateTimePickers=t._gslRangeDateTimePickers;exports._gslRangeTimeInputByUid=t._gslRangeTimeInputByUid;exports._gslRangeTimeInputs=t._gslRangeTimeInputs;exports._gslRangeTimePickerByUid=t._gslRangeTimePickerByUid;exports._gslRangeTimePickers=t._gslRangeTimePickers;exports._gslRepeaterByUid=t._gslRepeaterByUid;exports._gslRepeaters=t._gslRepeaters;exports._gslSelectByUid=t._gslSelectByUid;exports._gslSelects=t._gslSelects;exports._gslTabs=t._gslTabs;exports._gslTabsByUid=t._gslTabsByUid;exports._gslTags=t._gslTags;exports._gslTagsByUid=t._gslTagsByUid;exports._gslTextInputs=t._gslTextInputs;exports._gslTextareaByUid=t._gslTextareaByUid;exports._gslTextareas=t._gslTextareas;exports._gslTimeInputByUid=t._gslTimeInputByUid;exports._gslTimeInputs=t._gslTimeInputs;exports._gslTimePickerByUid=t._gslTimePickerByUid;exports._gslTimePickers=t._gslTimePickers;exports._guiAccordion=t._guiAccordion;exports._guiAlert=t._guiAlert;exports._guiBooleanInput=t._guiBooleanInput;exports._guiButton=t._guiButton;exports._guiCalendar=t._guiCalendar;exports._guiCheckbox=t._guiCheckbox;exports._guiCurrency=t._guiCurrency;exports._guiCustomAction=t._guiCustomAction;exports._guiCustomDisplay=t._guiCustomDisplay;exports._guiCustomInput=t._guiCustomInput;exports._guiCustomLayout=t._guiCustomLayout;exports._guiDateInput=t._guiDateInput;exports._guiDatePicker=t._guiDatePicker;exports._guiDateTimeCalendar=t._guiDateTimeCalendar;exports._guiDateTimeInput=t._guiDateTimeInput;exports._guiDateTimePicker=t._guiDateTimePicker;exports._guiDisplay=t._guiDisplay;exports._guiDropdown=t._guiDropdown;exports._guiFlex=t._guiFlex;exports._guiGrid=t._guiGrid;exports._guiHorizontalFlex=t._guiHorizontalFlex;exports._guiHorizontalGrid=t._guiHorizontalGrid;exports._guiList=t._guiList;exports._guiMarkdown=t._guiMarkdown;exports._guiMarkdownText=t._guiMarkdownText;exports._guiNumberInput=t._guiNumberInput;exports._guiPassword=t._guiPassword;exports._guiRadiogroup=t._guiRadiogroup;exports._guiRangeCalendar=t._guiRangeCalendar;exports._guiRangeDateInput=t._guiRangeDateInput;exports._guiRangeDatePicker=t._guiRangeDatePicker;exports._guiRangeDateTimeCalendar=t._guiRangeDateTimeCalendar;exports._guiRangeDateTimeInput=t._guiRangeDateTimeInput;exports._guiRangeDateTimePicker=t._guiRangeDateTimePicker;exports._guiRangeTimeInput=t._guiRangeTimeInput;exports._guiRangeTimePicker=t._guiRangeTimePicker;exports._guiRepeater=t._guiRepeater;exports._guiSelect=t._guiSelect;exports._guiTabs=t._guiTabs;exports._guiTags=t._guiTags;exports._guiTextInput=t._guiTextInput;exports._guiTextarea=t._guiTextarea;exports._guiTimeInput=t._guiTimeInput;exports._guiTimePicker=t._guiTimePicker;exports._guiVerticalFlex=t._guiVerticalFlex;exports._guiVerticalGrid=t._guiVerticalGrid;exports.createGslSelector=t.createGslSelector;exports.defineShortcutType=t.defineShortcutType;exports.extractWidgetProps=t.extractWidgetProps;exports.processAutoLabel=t.processAutoLabel;exports.processAutoPlaceholder=t.processAutoPlaceholder;exports._gslStates=M;exports._gslTag=O;exports.formDefs=C;exports.getItemKey=ae;exports.golemForm=ne;exports.isDxDefinitions=h;exports.isOption=re;exports.resolveFormInput=se;
@@ -1,7 +1,7 @@
1
1
  import { NonFunctionWidget, FormWidget } from '@golemui/core';
2
2
  import { GslLeafSelector, MergeResult } from './dx.domain';
3
3
  import { GslConfigBase } from './dxUtilityTypes';
4
- import { AfterMergeContext, BuildWidgetContext } from './itemTypeRegistry';
4
+ import { AfterMergeContext, BuildWidgetContext, ShortcutItemKind } from './itemTypeRegistry';
5
5
  import { DxCommonFields } from './dxBase.types';
6
6
  type EntryShape = 'bare' | 'keyed' | 'compound';
7
7
  interface SensibleDefaultsSpec<TDecorator, TConfig> {
@@ -11,6 +11,7 @@ interface SensibleDefaultsSpec<TDecorator, TConfig> {
11
11
  }
12
12
  interface ShortcutTypeConfig<TEntry, TDecorator, TConfig> {
13
13
  itemType: string;
14
+ kind?: ShortcutItemKind;
14
15
  entryShape: EntryShape;
15
16
  mapToWidget: (def: TDecorator) => NonFunctionWidget;
16
17
  sensibleDefaults?: SensibleDefaultsSpec<TDecorator, TConfig>;
@@ -77,6 +77,18 @@ export interface ItemTypeHandler<TEntry = any, TDecorator extends DxCommonFields
77
77
  buildCustomWidget?(mergeResult: MergeResult, context: BuildWidgetContext): FormWidget;
78
78
  getChildren?(entry: TEntry): ValidGuiShortcut[] | undefined;
79
79
  }
80
- export declare function registerItemType(itemType: string, handler: ItemTypeHandler<any, any, any>): void;
80
+ /**
81
+ * The widget kind an item type belongs to. Matches the `kind` discriminator of core widgets
82
+ */
83
+ export type ShortcutItemKind = NonFunctionWidget['kind'];
84
+ export declare function registerItemType(itemType: string, handler: ItemTypeHandler<any, any, any>, kind?: ShortcutItemKind): void;
85
+ /**
86
+ * Returns the widget kind declared when the item type was registered, or undefined when it was registered without one
87
+ */
88
+ export declare function getItemTypeKind(itemType: string): ShortcutItemKind | undefined;
89
+ /**
90
+ * Returns the names of every registered item type
91
+ */
92
+ export declare function getRegisteredItemTypes(): string[];
81
93
  export declare function getItemTypeHandler(itemType: string): ItemTypeHandler<any, any, any>;
82
94
  export declare function hasItemTypeHandler(itemType: string): boolean;
@@ -105,6 +105,7 @@ export type MarkdownProps = {
105
105
  orderedListTitle?: string;
106
106
  unorderedListTitle?: string;
107
107
  splitViewTitle?: string;
108
+ toolbarAriaLabel?: string;
108
109
  defaultOpenPreview?: boolean;
109
110
  } & TextareaProps;
110
111
  export type CalendarProps = {
@@ -134,6 +135,16 @@ export type CalendarProps = {
134
135
  * This label is used to improve accessibility by providing screen readers with descriptive text.
135
136
  */
136
137
  nextMonthAriaLabel?: string;
138
+ /**
139
+ * An optional string that represents the ARIA label for the year-selector toggle button in the
140
+ * calendar header. The current year is appended to it. Defaults to 'Select year'.
141
+ */
142
+ selectYearAriaLabel?: string;
143
+ /**
144
+ * An optional string that represents the ARIA label for the year-selector grid.
145
+ * Defaults to 'Year selection'.
146
+ */
147
+ yearGridAriaLabel?: string;
137
148
  /**
138
149
  * Specifies the formatting style for displaying the day portion of a date.
139
150
  *
@@ -241,6 +252,16 @@ export type RangeCalendarProps = {
241
252
  * This label is used to improve accessibility by providing screen readers with descriptive text.
242
253
  */
243
254
  nextMonthAriaLabel?: string;
255
+ /**
256
+ * An optional string that represents the ARIA label for the year-selector toggle button in the
257
+ * calendar header. The current year is appended to it. Defaults to 'Select year'.
258
+ */
259
+ selectYearAriaLabel?: string;
260
+ /**
261
+ * An optional string that represents the ARIA label for the year-selector grid.
262
+ * Defaults to 'Year selection'.
263
+ */
264
+ yearGridAriaLabel?: string;
244
265
  /**
245
266
  * Specifies the formatting style for displaying the day portion of a date.
246
267
  *
@@ -310,6 +331,9 @@ export type RangeCalendarProps = {
310
331
  export type DateinputProps = {
311
332
  hint?: string;
312
333
  icon?: string;
334
+ dayAriaLabel?: string;
335
+ monthAriaLabel?: string;
336
+ yearAriaLabel?: string;
313
337
  invalidDateMessage?: Localizable;
314
338
  /** Earliest allowed date (ISO date, inclusive). */
315
339
  minDate?: string;
@@ -321,6 +345,12 @@ export type DateinputProps = {
321
345
  export type DateTimeInputProps = {
322
346
  hint?: string;
323
347
  icon?: string;
348
+ dayAriaLabel?: string;
349
+ monthAriaLabel?: string;
350
+ yearAriaLabel?: string;
351
+ hourAriaLabel?: string;
352
+ minuteAriaLabel?: string;
353
+ dayPeriodAriaLabel?: string;
324
354
  hourFormat?: '12' | '24';
325
355
  minuteStep?: number;
326
356
  invalidDateMessage?: Localizable;
@@ -340,6 +370,9 @@ export type DateTimeInputProps = {
340
370
  export type TimeInputProps = {
341
371
  hint?: string;
342
372
  icon?: string;
373
+ hourAriaLabel?: string;
374
+ minuteAriaLabel?: string;
375
+ dayPeriodAriaLabel?: string;
343
376
  hourFormat?: '12' | '24';
344
377
  minuteStep?: number;
345
378
  /** First allowed time (ISO time, inclusive). */
@@ -362,7 +395,7 @@ export type DisabledTimeRange = TimeRange & {
362
395
  /** Weekday numbers as returned by Date.prototype.getDay(): 0=Sunday … 6=Saturday. */
363
396
  weekdays?: number[];
364
397
  };
365
- export type TimePickerProps = TimeInputProps & {
398
+ export type TimePickerProps = TimeInputProps & PickerToggleProps & {
366
399
  /** Times inside these ranges (both ends inclusive) render disabled. */
367
400
  disabledRanges?: TimeRange[];
368
401
  /** Allows typing a time in the input; when false (default) values come only from the list. */
@@ -379,6 +412,9 @@ export type RangeDateInputProps = {
379
412
  removePillAriaLabel?: string;
380
413
  startDateAriaLabel?: string;
381
414
  endDateAriaLabel?: string;
415
+ dayAriaLabel?: string;
416
+ monthAriaLabel?: string;
417
+ yearAriaLabel?: string;
382
418
  invalidDateMessage?: Localizable;
383
419
  };
384
420
  export type DateBoundsMessageProps = {
@@ -386,9 +422,13 @@ export type DateBoundsMessageProps = {
386
422
  maxDateMessage?: Localizable;
387
423
  disabledDateRangeMessage?: Localizable;
388
424
  };
389
- export type DatePickerProps = CalendarProps & DateinputProps & DateBoundsMessageProps;
390
- export type DateTimePickerProps = DateTimeCalendarProps & DateTimeInputProps & DateBoundsMessageProps;
391
- export type RangeDatePickerProps = RangeCalendarProps & RangeDateInputProps & DateBoundsMessageProps;
425
+ /** The popup toggle button shared by the six pickers. */
426
+ export type PickerToggleProps = {
427
+ toggleAriaLabel?: string;
428
+ };
429
+ export type DatePickerProps = CalendarProps & DateinputProps & DateBoundsMessageProps & PickerToggleProps;
430
+ export type DateTimePickerProps = DateTimeCalendarProps & DateTimeInputProps & DateBoundsMessageProps & PickerToggleProps;
431
+ export type RangeDatePickerProps = RangeCalendarProps & RangeDateInputProps & DateBoundsMessageProps & PickerToggleProps;
392
432
  export type RangeDateTimeCalendarProps = Omit<RangeCalendarProps, 'minDate' | 'maxDate' | 'disabledRanges' | 'disabledDateRangeMessage'> & {
393
433
  hourFormat?: '12' | '24';
394
434
  minuteStep?: number;
@@ -429,6 +469,9 @@ export type RangeTimeInputProps = {
429
469
  removePillAriaLabel?: string;
430
470
  startTimeAriaLabel?: string;
431
471
  endTimeAriaLabel?: string;
472
+ hourAriaLabel?: string;
473
+ minuteAriaLabel?: string;
474
+ dayPeriodAriaLabel?: string;
432
475
  hourFormat?: '12' | '24';
433
476
  minuteStep?: number;
434
477
  /** First allowed time (ISO time, inclusive). */
@@ -447,6 +490,12 @@ export type RangeDateTimeInputProps = {
447
490
  removePillAriaLabel?: string;
448
491
  startDateTimeAriaLabel?: string;
449
492
  endDateTimeAriaLabel?: string;
493
+ dayAriaLabel?: string;
494
+ monthAriaLabel?: string;
495
+ yearAriaLabel?: string;
496
+ hourAriaLabel?: string;
497
+ minuteAriaLabel?: string;
498
+ dayPeriodAriaLabel?: string;
450
499
  hourFormat?: '12' | '24';
451
500
  minuteStep?: number;
452
501
  invalidDateMessage?: Localizable;
@@ -466,8 +515,8 @@ export type RangeDateTimeInputProps = {
466
515
  * spans, two time pickers, per-day count badge) with the typed range input as
467
516
  * its trigger.
468
517
  */
469
- export type RangeDateTimePickerProps = RangeDateTimeCalendarProps & RangeDateTimeInputProps;
470
- export type RangeTimePickerProps = RangeTimeInputProps & {
518
+ export type RangeDateTimePickerProps = RangeDateTimeCalendarProps & RangeDateTimeInputProps & PickerToggleProps;
519
+ export type RangeTimePickerProps = RangeTimeInputProps & PickerToggleProps & {
471
520
  /** Times inside these ranges (both ends inclusive) render disabled. */
472
521
  disabledRanges?: TimeRange[];
473
522
  /** Allows typing a time in the input; when false (default) values come only from the lists. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemui/gui-shared",
3
- "version": "1.1.0",
3
+ "version": "1.1.1-rc.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./index.umd.cjs",
@@ -31,8 +31,8 @@
31
31
  "*.md"
32
32
  ],
33
33
  "dependencies": {
34
- "@golemui/core": "1.1.0",
35
- "@golemui/gui-validators": "1.1.0"
34
+ "@golemui/core": "1.1.1-rc.0",
35
+ "@golemui/gui-validators": "1.1.1-rc.0"
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",
@@ -0,0 +1 @@
1
+ "use strict";require("@golemui/core");const m={INPUTS:"INPUTS",ACTIONS:"ACTIONS",LAYOUTS:"LAYOUTS",DISPLAYS:"DISPLAYS"};function D(e){return function(t,i=()=>!0){return{kind:"leaf",selectorType:e,matcher:i,config:t}}}function y(e,t){return typeof e=="function"?e:{type:t,...e??{}}}function w(e,t,i){if(typeof t=="function"){const n=t;return{items:[{key:e,def:u=>({type:"text",...n(u)})}],type:"ITEMS",itemType:m.INPUTS,tags:i??[]}}const s={type:"text",...t};return{items:[{key:e,def:s}],type:"ITEMS",itemType:m.INPUTS,tags:i??[]}}function W(e,t,i){if(typeof t=="function"){const n=t;return{items:[{key:e,def:u=>({type:"number",...n(u)})}],type:"ITEMS",itemType:m.INPUTS,tags:i??[]}}const s={type:"number",...t};return{items:[{key:e,def:s}],type:"ITEMS",itemType:m.INPUTS,tags:i??[]}}function x(e,t,i){if(typeof t=="function"){const n=t;return{items:[{key:e,def:u=>({type:"boolean",...n(u)})}],type:"ITEMS",itemType:m.INPUTS,tags:i??[]}}const s={type:"boolean",...t};return{items:[{key:e,def:s}],type:"ITEMS",itemType:m.INPUTS,tags:i??[]}}function G(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"SELECT",items:[{key:e,def:a=>({type:"select",...l(a)})}],tags:i??[]}}const s={type:"select",...t};return{type:"ITEMS",itemType:"SELECT",items:[{key:e,def:s}],tags:i??[]}}function K(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:e,def:a=>({type:"dropdown",...l(a)})}],tags:i??[]}}const s={type:"dropdown",...t};return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:e,def:s}],tags:i??[]}}function Y(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:e,def:a=>({type:"radiogroup",...l(a)})}],tags:i??[]}}const s={type:"radiogroup",...t};return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:e,def:s}],tags:i??[]}}function $(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:e,def:a=>({type:"checkbox",...l(a)})}],tags:i??[]}}const s={type:"checkbox",...t};return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:e,def:s}],tags:i??[]}}function F(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:e,def:a=>({type:"textarea",...l(a)})}],tags:i??[]}}const s={type:"textarea",...t};return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:e,def:s}],tags:i??[]}}function O(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"PASSWORD",items:[{key:e,def:a=>({type:"password",...l(a)})}],tags:i??[]}}const s={type:"password",...t};return{type:"ITEMS",itemType:"PASSWORD",items:[{key:e,def:s}],tags:i??[]}}function z(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"CURRENCY",items:[{key:e,def:a=>({type:"currency",...l(a)})}],tags:i??[]}}const s={type:"currency",...t};return{type:"ITEMS",itemType:"CURRENCY",items:[{key:e,def:s}],tags:i??[]}}function H(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:e,def:a=>({type:"markdown",...l(a)})}],tags:i??[]}}const s={type:"markdown",...t};return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:e,def:s}],tags:i??[]}}function V(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"LIST",items:[{key:e,def:a=>({type:"list",...l(a)})}],tags:i??[]}}const s={type:"list",...t};return{type:"ITEMS",itemType:"LIST",items:[{key:e,def:s}],tags:i??[]}}function X(e,t,i){if(typeof t=="function"){const n=t;return{items:[u=>({type:"calendar",path:e,...n(u)})],type:"ITEMS",itemType:"CALENDAR",tags:i??[]}}return{items:[{type:"calendar",path:e,...t}],type:"ITEMS",itemType:"CALENDAR",tags:i??[]}}function j(e,t,i){if(typeof t=="function"){const n=t;return{items:[u=>({type:"dateTimeCalendar",path:e,...n(u)})],type:"ITEMS",itemType:"DATE_TIME_CALENDAR",tags:i??[]}}return{items:[{type:"dateTimeCalendar",path:e,...t}],type:"ITEMS",itemType:"DATE_TIME_CALENDAR",tags:i??[]}}function q(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:e,def:a=>({type:"dateInput",...l(a)})}],tags:i??[]}}const s={type:"dateInput",...t};return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:e,def:s}],tags:i??[]}}function Z(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:e,def:a=>({type:"datePicker",...l(a)})}],tags:i??[]}}const s={type:"datePicker",...t};return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:e,def:s}],tags:i??[]}}function J(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"DATE_TIME_PICKER",items:[{key:e,def:a=>({type:"dateTimePicker",...l(a)})}],tags:i??[]}}const s={type:"dateTimePicker",...t};return{type:"ITEMS",itemType:"DATE_TIME_PICKER",items:[{key:e,def:s}],tags:i??[]}}function Q(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:e,def:a=>({type:"rangeCalendar",...l(a)})}],tags:i??[]}}const s={type:"rangeCalendar",...t};return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:e,def:s}],tags:i??[]}}function ee(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:e,def:a=>({type:"rangeDateInput",...l(a)})}],tags:i??[]}}const s={type:"rangeDateInput",...t};return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:e,def:s}],tags:i??[]}}function te(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_DATE_TIME_INPUT",items:[{key:e,def:a=>({type:"rangeDateTimeInput",...l(a)})}],tags:i??[]}}const s={type:"rangeDateTimeInput",...t};return{type:"ITEMS",itemType:"RANGE_DATE_TIME_INPUT",items:[{key:e,def:s}],tags:i??[]}}function ie(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_DATE_TIME_CALENDAR",items:[{key:e,def:a=>({type:"rangeDateTimeCalendar",...l(a)})}],tags:i??[]}}const s={type:"rangeDateTimeCalendar",...t};return{type:"ITEMS",itemType:"RANGE_DATE_TIME_CALENDAR",items:[{key:e,def:s}],tags:i??[]}}function se(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_DATE_TIME_PICKER",items:[{key:e,def:a=>({type:"rangeDateTimePicker",...l(a)})}],tags:i??[]}}const s={type:"rangeDateTimePicker",...t};return{type:"ITEMS",itemType:"RANGE_DATE_TIME_PICKER",items:[{key:e,def:s}],tags:i??[]}}function ne(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_TIME_INPUT",items:[{key:e,def:a=>({type:"rangeTimeInput",...l(a)})}],tags:i??[]}}const s={type:"rangeTimeInput",...t};return{type:"ITEMS",itemType:"RANGE_TIME_INPUT",items:[{key:e,def:s}],tags:i??[]}}function le(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:e,def:a=>({type:"rangeDatePicker",...l(a)})}],tags:i??[]}}const s={type:"rangeDatePicker",...t};return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:e,def:s}],tags:i??[]}}function ae(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_TIME_PICKER",items:[{key:e,def:a=>({type:"rangeTimePicker",...l(a)})}],tags:i??[]}}const s={type:"rangeTimePicker",...t};return{type:"ITEMS",itemType:"RANGE_TIME_PICKER",items:[{key:e,def:s}],tags:i??[]}}function ue(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"TIME_INPUT",items:[{key:e,def:a=>({type:"timeInput",...l(a)})}],tags:i??[]}}const s={type:"timeInput",...t};return{type:"ITEMS",itemType:"TIME_INPUT",items:[{key:e,def:s}],tags:i??[]}}function oe(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"TIME_PICKER",items:[{key:e,def:a=>({type:"timePicker",...l(a)})}],tags:i??[]}}const s={type:"timePicker",...t};return{type:"ITEMS",itemType:"TIME_PICKER",items:[{key:e,def:s}],tags:i??[]}}function re(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"DATE_TIME_INPUT",items:[{key:e,def:a=>({type:"dateTimeInput",...l(a)})}],tags:i??[]}}const s={type:"dateTimeInput",...t};return{type:"ITEMS",itemType:"DATE_TIME_INPUT",items:[{key:e,def:s}],tags:i??[]}}function pe(e,t,i,s){if(typeof i=="function"){const u=i;return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:c=>({customType:e,...u(c)})}],tags:s??[]}}const n={customType:e,...i};return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:n}],tags:s??[]}}function de(e,t){return{items:[e],type:"ITEMS",itemType:m.ACTIONS,tags:t??[]}}function ye(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[o=>({customType:e,...l(o)})],tags:i??[]}}return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[{customType:e,...t}],tags:i??[]}}const ce=(e,t)=>({type:"ITEMS",itemType:m.DISPLAYS,items:[{render:e}],tags:t??[]});function me(e,t){return{type:"ITEMS",itemType:"ALERTS",items:[e],tags:t??[]}}function ge(e,t){return{type:"ITEMS",itemType:"MARKDOWN_TEXTS",items:[e],tags:t??[]}}function Te(e,t,i){if(typeof t=="function"){const o=t;return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[c=>({customType:e,...o(c)})],tags:i??[]}}const{uid:s,...n}=t??{};return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[{customType:e,...s!=null?{uid:s}:{},props:Object.keys(n).length>0?n:void 0}],tags:i??[]}}const U=(e,t,i)=>({type:"ITEMS",itemType:m.LAYOUTS,items:[{def:{widgetName:"flex",...t??{}},children:e}],tags:i??[]}),_e=(e,t,i)=>U(e,{direction:"row",...t??{}},i),be=(e,t,i)=>U(e,{direction:"column",...t??{}},i),P=(e,t,i)=>({type:"ITEMS",itemType:m.LAYOUTS,items:[{def:{widgetName:"grid",direction:"row",autoFit:!0,...t??{}},children:e}],tags:i??[]}),Ie=(e,t,i)=>P(e,{direction:"row",...t??{}},i),Ae=(e,t,i)=>P(e,{direction:"column",...t??{}},i);function M(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function ke(e,t,i){const s=e.map(u=>({label:u.label,uid:u.uid??M(u.label)})),n=e.map(u=>({type:"ITEMS",itemType:m.LAYOUTS,items:[{def:{uid:u.uid??M(u.label),direction:"column",widgetName:"flex"},children:u.children}],tags:[]}));return{type:"ITEMS",itemType:"TABS",items:[{def:{tabs:s,...t},children:n}],tags:i??[]}}function R(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function Ee(e,t,i){const s=e.map(u=>({label:u.label,uid:u.uid??R(u.label)})),n=e.map(u=>({type:"ITEMS",itemType:m.LAYOUTS,items:[{def:{uid:u.uid??R(u.label),direction:"column",widgetName:"flex"},children:u.children}],tags:[]}));return{type:"ITEMS",itemType:"ACCORDION",items:[{def:{sections:s,...t},children:n}],tags:i??[]}}function he(e,t,i,s){if(typeof i=="function"){const u=i;return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:c=>({customType:e,...u(c)}),children:t}],tags:s??[]}}return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:{customType:e,...i},children:t}],tags:s??[]}}function Se(e,t,i){const{template:s,...n}=t;return{type:"ITEMS",itemType:"REPEATER",items:[{key:e,def:n,children:s}],tags:i??[]}}function De(e,t,i){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"TAGS",items:[{key:e,def:a=>({type:"tags",...l(a)})}],tags:i??[]}}const s={type:"tags",...t};return{type:"ITEMS",itemType:"TAGS",items:[{key:e,def:s}],tags:i??[]}}const A=new Map,Ue=new Map;function B(e,t,i){if(A.has(e))throw new Error(`Item type "${e}" is already registered.`);A.set(e,t),i&&Ue.set(e,i)}function Pe(e){const t=A.get(e);if(!t)throw new Error(`No handler registered for item type "${e}". Did you forget to import the registration module?`);return t}function fe(e){return A.has(e)}function r(e){const t=o=>{if(!e.sensibleDefaults)return{};let a={...e.sensibleDefaults.base};for(const c of o){const T=c.config;for(const _ of e.sensibleDefaults.fields){const b=_;T[b]!=null&&(a={...a,[b]:T[b]})}}return a},i=(o,a)=>e.sensibleDefaults?e.sensibleDefaults.apply(o,a):o,s=o=>{switch(e.entryShape){case"bare":return{baseDef:o};case"keyed":{const a=o;return{baseDef:a.def,path:a.key}}case"compound":{const a=o;return{baseDef:a.def,children:a.children}}}},n={rollUpSensibleDefaults:t,applySensibleDefaults:i,mapToWidget:e.mapToWidget,parseEntry:s,...e.afterMerge?{afterMerge:e.afterMerge}:{},...e.buildCustomWidget?{buildCustomWidget:e.buildCustomWidget}:{},...e.getChildren?{getChildren:e.getChildren}:{}};B(e.itemType,n,e.kind);const l=D(e.itemType);return{gsl:l,gslByUid:(o,a)=>l(a,(c=>c.uid===o))}}function p(e){const{uid:t,path:i,label:s,disabled:n,readonly:l,defaultValue:u,tags:o,type:a,size:c,onLoad:T,onChange:_,onFilter:b,on:E,states:I,include:fi,exclude:Mi,validator:Ri,...N}=e;return N}function Me(e){return e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()):""}function d(e,t){return e.label!=null||t.suppressAutomaticLabels||!e.path?e:{...e,label:Me(e.path)}}function g(e,t){return e.placeholder!=null||t.suppressAutomaticPlaceholders||!e.path?e:{...e,placeholder:e.path}}function Re(e){switch(e.type){case"text":return Le(e);case"number":return Ce(e);case"boolean":return Be(e);default:throw new Error(`Unsupported field type "${e.type}"`)}}function Be(e){const t=p(e);return{uid:e.uid??"",kind:"input",type:"toggle",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"boolean")}:{},props:t}}function Le(e){const t=p(e);return{uid:e.uid??"",kind:"input",type:"textinput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:y(e.validator,"string")}}function Ce(e){const t=p(e);return{uid:e.uid??"",kind:"input",type:"number",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:y(e.validator,"number")}}const{gsl:k,gslByUid:ve}=r({itemType:"INPUTS",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>{let i=d(e,t);return i=g(i,t),i}},mapToWidget:Re}),Ne=e=>k(e,t=>t.type==="text"),we=e=>k(e,t=>t.type==="number"),We=e=>k(e,t=>t.type==="boolean"),{gsl:xe,gslByUid:Ge}=r({itemType:"SELECT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"select",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:p(e)})}),{gsl:Ke,gslByUid:Ye}=r({itemType:"DROPDOWN",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dropdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:p(e)})}),{gsl:$e,gslByUid:Fe}=r({itemType:"RADIOGROUP",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"radiogroup",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:p(e)})}),{gsl:Oe,gslByUid:ze}=r({itemType:"CHECKBOX",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"checkbox",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"boolean")}:{},props:p(e)})}),{gsl:He,gslByUid:Ve}=r({itemType:"TEXTAREA",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"textarea",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:Xe,gslByUid:je}=r({itemType:"PASSWORD",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"password",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:qe,gslByUid:Ze}=r({itemType:"CURRENCY",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"currency",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"number")}:{},props:p(e)})}),{gsl:Je,gslByUid:Qe}=r({itemType:"MARKDOWN",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"markdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:et,gslByUid:tt}=r({itemType:"LIST",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"list",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:p(e)})}),{gsl:it,gslByUid:st}=r({itemType:"CALENDAR",kind:"input",entryShape:"bare",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"calendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:nt,gslByUid:lt}=r({itemType:"DATE_TIME_CALENDAR",kind:"input",entryShape:"bare",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:at,gslByUid:ut}=r({itemType:"DATE_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:ot,gslByUid:rt}=r({itemType:"DATE_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"datePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:pt,gslByUid:dt}=r({itemType:"DATE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:yt,gslByUid:ct}=r({itemType:"RANGE_CALENDAR",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"array")}:{},props:p(e)})}),{gsl:mt,gslByUid:gt}=r({itemType:"RANGE_DATE_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"array")}:{},props:p(e)})}),{gsl:Tt,gslByUid:_t}=r({itemType:"RANGE_DATE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"array")}:{},props:p(e)})}),{gsl:bt,gslByUid:It}=r({itemType:"RANGE_DATE_TIME_CALENDAR",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"array")}:{},props:p(e)})}),{gsl:At,gslByUid:kt}=r({itemType:"RANGE_DATE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"array")}:{},props:p(e)})}),{gsl:Et,gslByUid:ht}=r({itemType:"RANGE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"array")}:{},props:p(e)})}),{gsl:St,gslByUid:Dt}=r({itemType:"TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"timeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:Ut,gslByUid:Pt}=r({itemType:"TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"timePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:ft,gslByUid:Mt}=r({itemType:"DATE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"string")}:{},props:p(e)})}),{gsl:Rt,gslByUid:Bt}=r({itemType:"RANGE_DATE_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDatePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"array")}:{},props:p(e)})}),{gsl:Lt,gslByUid:Ct}=r({itemType:"RANGE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"array")}:{},props:p(e)})});function vt(e){const t={};return e.addLabel!=null&&(t.addLabel=e.addLabel),e.removeLabel!=null&&(t.removeLabel=e.removeLabel),e.limit!=null&&(t.limit=e.limit),e.title!=null&&(t.title=e.title),e.addButtonIcon!=null&&(t.addButtonIcon=e.addButtonIcon),e.removeButtonIcon!=null&&(t.removeButtonIcon=e.removeButtonIcon),t}function Nt(e){return{uid:e.uid??"",kind:"input",type:"repeater",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"array")}:{},props:{...vt(e),template:{kind:"layout",type:"flex",children:[],props:{direction:"column"}}}}}function h(e,t){for(const i of e){if(typeof i=="function")continue;const s=i;typeof s.path=="string"&&s.path&&!s.path.startsWith(t)&&(s.path=t+s.path),"children"in s&&Array.isArray(s.children)&&h(s.children,t);const n=s.props;n?.template?.children&&Array.isArray(n.template.children)&&h(n.template.children,t)}}function wt(e,t){const i=t.walkChildren(t.children??[]),s=e.kind==="static"?e.def.path??"":e.fn({})?.path??"";s&&h(i,s+".items.");const n={kind:"layout",type:"flex",uid:"",children:i,props:{direction:"column"}};if(e.kind==="static"){const u=t.mapStaticDef(e.def,"REPEATER");return{...u,props:{...u.props,template:n}}}const l=e.fn;return(u=>{const o=l(u),a=t.mapStaticDef(o,"REPEATER");return{...a,props:{...a.props,template:n}}})}function Wt(e){return{baseDef:e.def,path:e.key,children:e.children}}function xt(e){return e.children}const Gt={parseEntry:Wt,rollUpSensibleDefaults:()=>({}),applySensibleDefaults:e=>e,mapToWidget:Nt,buildCustomWidget:wt,getChildren:xt};B("REPEATER",Gt,"input");const L=D("REPEATER"),Kt=(e,t)=>L(t,(i=>i.uid===e)),C={onLoad:"load",onChange:"change",onFilter:"filter",onBlur:"blur"},Yt=Object.keys(C);function v(e){if(e.length>0)return null;try{const t=e();return typeof t=="string"?t:null}catch{return null}}class $t{extractOnClickFromMergeResult(t,i,s){if(t.kind==="dynamic"){const u=t.fn;return{kind:"dynamic",fn:a=>{const c=u(a);return this.wireOnClick(c,i,s)}}}const n=t.def;return{kind:"static",def:this.wireOnClick(n,i,s)}}wireOnClick(t,i,s){const n=s.next(),l=t.onClick;if(typeof l=="function"){const{onClick:u,...o}=t,a=l(void 0);return typeof a=="string"?{...o,uid:n,on:{click:a}}:(i.set(n,c=>l(c.data)),{...o,uid:n,on:{click:n}})}return{...t,uid:n}}wireInputLayoutEvents(t,i,s){if(t.kind==="dynamic"){const l=t.fn;return{kind:"dynamic",fn:o=>{const a=l(o);return this.wireEventProperties(a,i,s)}}}return{kind:"static",def:this.wireEventProperties(t.def,i,s)}}wireEventProperties(t,i,s){const n={...t.on||{}};let l=!1;const u={...t};for(const o of Yt){const a=t[o];if(a==null)continue;const c=C[o];if(typeof a=="function"){const T=v(a);if(T!=null)n[c]=T;else{const _=s.next();i.set(_,a),n[c]=_}l=!0}else typeof a=="string"&&(n[c]=a,l=!0);delete u[o]}return l&&(u.on=n),u}}const f=new $t;function Ft(e){const{uid:t,label:i,actionType:s,disabled:n,on:l,onClick:u,data:o,type:a,tags:c,size:T,include:_,exclude:b,states:E,...I}=e;return{uid:t??"",kind:"action",type:"button",disabled:n,actionType:s,label:i,...l!=null?{on:l}:{},props:I}}const{gsl:Ot,gslByUid:zt}=r({itemType:"ACTIONS",kind:"action",entryShape:"bare",mapToWidget:Ft,afterMerge:(e,t)=>f.extractOnClickFromMergeResult(e,t.eventRegistry,t.eventIdGenerator)});function Ht(e){const{uid:t,widgetName:i,tags:s,size:n,onChange:l,include:u,exclude:o,...a}=e,{on:c,...T}=a;return{uid:t??"",kind:"layout",type:i??"flex",props:{direction:T.direction??"column",...T},children:[]}}function Vt(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"LAYOUTS"),children:i};const s=e.fn;return(n=>{const l=s(n);return{...t.mapStaticDef(l,"LAYOUTS"),children:i}})}function Xt(e){return e.children}const{gsl:jt,gslByUid:qt}=r({itemType:"LAYOUTS",kind:"layout",entryShape:"compound",mapToWidget:Ht,buildCustomWidget:Vt,getChildren:Xt});function S(e){return{errors:void 0,touched:void 0,translate:void 0,...e??{},$form:e?.$form??{}}}function Zt(e){return{uid:"",kind:"display",type:"renderer",props:{render:e.render}}}function Jt(e,t){if(e.kind==="static"){const s=e.def;return(n=>({uid:"",kind:"display",type:"renderer",...s.include!=null?{include:s.include}:{},...s.exclude!=null?{exclude:s.exclude}:{},props:{render:s.render(S(n))}}))}const i=e.fn;return(s=>{const n=i(s);return{uid:"",kind:"display",type:"renderer",...n.include!=null?{include:n.include}:{},...n.exclude!=null?{exclude:n.exclude}:{},props:{render:n.render(S(s))}}})}const{gsl:Qt,gslByUid:ei}=r({itemType:"DISPLAYS",kind:"display",entryShape:"bare",mapToWidget:Zt,buildCustomWidget:Jt}),{gsl:ti,gslByUid:ii}=r({itemType:"ALERTS",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:"alert",props:{text:e.text,...e.level!=null?{level:e.level}:{}}})}),{gsl:si,gslByUid:ni}=r({itemType:"MARKDOWN_TEXTS",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:"markdownText",props:{md:e.md}})});function li(e){return{uid:e.uid??"",kind:"layout",type:"tabs",props:{tabs:e.tabs,renderMode:e.renderMode??"all",...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function ai(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"TABS"),children:i};const s=e.fn;return(n=>{const l=s(n);return{...t.mapStaticDef(l,"TABS"),children:i}})}function ui(e){return e.children}const{gsl:oi,gslByUid:ri}=r({itemType:"TABS",kind:"layout",entryShape:"compound",mapToWidget:li,buildCustomWidget:ai,getChildren:ui});function pi(e){return{uid:e.uid??"",kind:"layout",type:"accordion",props:{sections:e.sections,renderMode:e.renderMode??"all",...e.singleOpen!=null?{singleOpen:e.singleOpen}:{},...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function di(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"ACCORDION"),children:i};const s=e.fn;return(n=>{const l=s(n);return{...t.mapStaticDef(l,"ACCORDION"),children:i}})}function yi(e){return e.children}const{gsl:ci,gslByUid:mi}=r({itemType:"ACCORDION",kind:"layout",entryShape:"compound",mapToWidget:pi,buildCustomWidget:di,getChildren:yi}),{gsl:gi,gslByUid:Ti}=r({itemType:"CUSTOM_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>d(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:e.customType,path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.defaultValue!=null?{defaultValue:e.defaultValue}:{},...e.validator!=null?{validator:e.validator}:{},props:e.props??{}})}),{gsl:_i,gslByUid:bi}=r({itemType:"CUSTOM_ACTION",kind:"action",entryShape:"bare",mapToWidget:e=>{const{uid:t,label:i,disabled:s,on:n,onClick:l,data:u,customType:o,tags:a,size:c,include:T,exclude:_,states:b,props:E,...I}=e;return{uid:t??"",kind:"action",type:e.customType,label:i,disabled:s,...n!=null?{on:n}:{},props:{...E,...I}}},afterMerge:(e,t)=>f.extractOnClickFromMergeResult(e,t.eventRegistry,t.eventIdGenerator)}),{gsl:Ii,gslByUid:Ai}=r({itemType:"CUSTOM_DISPLAY",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:e.customType,props:e.props??{}})});function ki(e){return{uid:e.uid??"",kind:"layout",type:e.customType,props:e.props??{},children:[]}}function Ei(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"CUSTOM_LAYOUT"),children:i};const s=e.fn;return(n=>{const l=s(n);return{...t.mapStaticDef(l,"CUSTOM_LAYOUT"),children:i}})}function hi(e){return e.children}const{gsl:Si,gslByUid:Di}=r({itemType:"CUSTOM_LAYOUT",kind:"layout",entryShape:"compound",mapToWidget:ki,buildCustomWidget:Ei,getChildren:hi}),{gsl:Ui,gslByUid:Pi}=r({itemType:"TAGS",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>g(d(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"tags",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:y(e.validator,"array")}:{},props:p(e)})});exports.GuiItemTypes=m;exports._gslAccordionByUid=mi;exports._gslAccordions=ci;exports._gslActionByUid=zt;exports._gslActions=Ot;exports._gslAlertByUid=ii;exports._gslAlerts=ti;exports._gslBooleanInputs=We;exports._gslCalendarByUid=st;exports._gslCalendars=it;exports._gslCheckboxByUid=ze;exports._gslCheckboxes=Oe;exports._gslCurrencies=qe;exports._gslCurrencyByUid=Ze;exports._gslCustomActionByUid=bi;exports._gslCustomActions=_i;exports._gslCustomDisplayByUid=Ai;exports._gslCustomDisplays=Ii;exports._gslCustomInputByUid=Ti;exports._gslCustomInputs=gi;exports._gslCustomLayoutByUid=Di;exports._gslCustomLayouts=Si;exports._gslDateInputByUid=ut;exports._gslDateInputs=at;exports._gslDatePickerByUid=rt;exports._gslDatePickers=ot;exports._gslDateTimeCalendarByUid=lt;exports._gslDateTimeCalendars=nt;exports._gslDateTimeInputByUid=Mt;exports._gslDateTimeInputs=ft;exports._gslDateTimePickerByUid=dt;exports._gslDateTimePickers=pt;exports._gslDisplayByUid=ei;exports._gslDisplays=Qt;exports._gslDropdownByUid=Ye;exports._gslDropdowns=Ke;exports._gslInputByUid=ve;exports._gslInputs=k;exports._gslLayoutByUid=qt;exports._gslLayouts=jt;exports._gslListByUid=tt;exports._gslLists=et;exports._gslMarkdownByUid=Qe;exports._gslMarkdownTextByUid=ni;exports._gslMarkdownTexts=si;exports._gslMarkdowns=Je;exports._gslNumberInputs=we;exports._gslPasswordByUid=je;exports._gslPasswords=Xe;exports._gslRadiogroupByUid=Fe;exports._gslRadiogroups=$e;exports._gslRangeCalendarByUid=ct;exports._gslRangeCalendars=yt;exports._gslRangeDateInputByUid=gt;exports._gslRangeDateInputs=mt;exports._gslRangeDatePickerByUid=Bt;exports._gslRangeDatePickers=Rt;exports._gslRangeDateTimeCalendarByUid=It;exports._gslRangeDateTimeCalendars=bt;exports._gslRangeDateTimeInputByUid=_t;exports._gslRangeDateTimeInputs=Tt;exports._gslRangeDateTimePickerByUid=kt;exports._gslRangeDateTimePickers=At;exports._gslRangeTimeInputByUid=ht;exports._gslRangeTimeInputs=Et;exports._gslRangeTimePickerByUid=Ct;exports._gslRangeTimePickers=Lt;exports._gslRepeaterByUid=Kt;exports._gslRepeaters=L;exports._gslSelectByUid=Ge;exports._gslSelects=xe;exports._gslTabs=oi;exports._gslTabsByUid=ri;exports._gslTags=Ui;exports._gslTagsByUid=Pi;exports._gslTextInputs=Ne;exports._gslTextareaByUid=Ve;exports._gslTextareas=He;exports._gslTimeInputByUid=Dt;exports._gslTimeInputs=St;exports._gslTimePickerByUid=Pt;exports._gslTimePickers=Ut;exports._guiAccordion=Ee;exports._guiAlert=me;exports._guiBooleanInput=x;exports._guiButton=de;exports._guiCalendar=X;exports._guiCheckbox=$;exports._guiCurrency=z;exports._guiCustomAction=ye;exports._guiCustomDisplay=Te;exports._guiCustomInput=pe;exports._guiCustomLayout=he;exports._guiDateInput=q;exports._guiDatePicker=Z;exports._guiDateTimeCalendar=j;exports._guiDateTimeInput=re;exports._guiDateTimePicker=J;exports._guiDisplay=ce;exports._guiDropdown=K;exports._guiFlex=U;exports._guiGrid=P;exports._guiHorizontalFlex=_e;exports._guiHorizontalGrid=Ie;exports._guiList=V;exports._guiMarkdown=H;exports._guiMarkdownText=ge;exports._guiNumberInput=W;exports._guiPassword=O;exports._guiRadiogroup=Y;exports._guiRangeCalendar=Q;exports._guiRangeDateInput=ee;exports._guiRangeDatePicker=le;exports._guiRangeDateTimeCalendar=ie;exports._guiRangeDateTimeInput=te;exports._guiRangeDateTimePicker=se;exports._guiRangeTimeInput=ne;exports._guiRangeTimePicker=ae;exports._guiRepeater=Se;exports._guiSelect=G;exports._guiTabs=ke;exports._guiTags=De;exports._guiTextInput=w;exports._guiTextarea=F;exports._guiTimeInput=ue;exports._guiTimePicker=oe;exports._guiVerticalFlex=be;exports._guiVerticalGrid=Ae;exports.createGslSelector=D;exports.defineShortcutType=r;exports.eventWiringService=f;exports.extractWidgetProps=p;exports.getItemTypeHandler=Pe;exports.hasItemTypeHandler=fe;exports.probeForHostEventName=v;exports.processAutoLabel=d;exports.processAutoPlaceholder=g;exports.withForm=S;