@golemui/gui-shared 0.13.0 → 0.13.1

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,13 @@
1
+ ## 0.13.0 (2026-05-18)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **core,gui-shared:** introduce /internals subpath ([#90](https://github.com/golemui/golemui/pull/90))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - mudscientist
10
+
1
11
  ## 0.12.2 (2026-05-16)
2
12
 
3
13
  ### 🩹 Fixes
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { G as c, _ as p, a as I, b as _, c as E, d as h, e as S, f as U, h as k, i as A, j as M, k as B, l as D, m as P, n as w, o as R, p as x, q as N, s as b, t as L, u as C, v as G, w as W, x as F, y as Y, z as $, A as K, B as j, C as z, D as H, E as X, F as v, H as V, I as q, J as Q, K as Z, L as J, M as O, N as tt, O as et, P as st, Q as nt, R as it, S as rt, T as ot, U as at, V as ut, W as ct, X as yt, Y as dt, Z as pt, $ as mt, a0 as lt, a1 as ft, a2 as gt, a3 as Tt, a4 as It, a5 as _t } from "./repeater-Cy3ziFdR.js";
2
- import { aa as _e, a8 as Ee, a9 as he, a6 as Se, g as Ue, a7 as ke, ab as Ae, ac as Me, r as Be } from "./repeater-Cy3ziFdR.js";
1
+ import { G as c, _ as p, a as I, b as _, c as E, d as h, e as S, f as U, h as k, i as A, j as M, k as B, l as D, m as P, n as w, o as R, p as x, q as N, s as b, t as L, u as C, v as G, w as W, x as F, y as Y, z as $, A as K, B as j, C as z, D as H, E as X, F as v, H as V, I as q, J as Q, K as Z, L as J, M as O, N as tt, O as et, P as st, Q as nt, R as it, S as rt, T as ot, U as at, V as ut, W as ct, X as yt, Y as dt, Z as pt, $ as mt, a0 as lt, a1 as ft, a2 as gt, a3 as Tt, a4 as It, a5 as _t } from "./repeater-Bq3AKxF4.js";
2
+ import { aa as _e, a8 as Ee, a9 as he, a6 as Se, g as Ue, a7 as ke, ab as Ae, ac as Me, r as Be } from "./repeater-Bq3AKxF4.js";
3
3
  import "@golemui/core";
4
4
  import "@golemui/gui-validators";
5
5
  function Et(s, t, e) {
package/index.umd.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./repeater-DD8jJ4pS.cjs");require("@golemui/core");require("@golemui/gui-validators");function f(s,t,e){if(typeof t=="function"){const u=t;return{items:[{key:s,def:o=>({type:"text",...u(o)})}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"text",...t};return{items:[{key:s,def:n}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}function T(s,t,e){if(typeof t=="function"){const u=t;return{items:[{key:s,def:o=>({type:"number",...u(o)})}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"number",...t};return{items:[{key:s,def:n}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}function I(s,t,e){if(typeof t=="function"){const u=t;return{items:[{key:s,def:o=>({type:"boolean",...u(o)})}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"boolean",...t};return{items:[{key:s,def:n}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}function U(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"SELECT",items:[{key:s,def:y=>({type:"select",...r(y)})}],tags:e??[]}}const n={type:"select",...t};return{type:"ITEMS",itemType:"SELECT",items:[{key:s,def:n}],tags:e??[]}}function B(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:s,def:y=>({type:"dropdown",...r(y)})}],tags:e??[]}}const n={type:"dropdown",...t};return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:s,def:n}],tags:e??[]}}function k(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:s,def:y=>({type:"radiogroup",...r(y)})}],tags:e??[]}}const n={type:"radiogroup",...t};return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:s,def:n}],tags:e??[]}}function D(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:s,def:y=>({type:"checkbox",...r(y)})}],tags:e??[]}}const n={type:"checkbox",...t};return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:s,def:n}],tags:e??[]}}function S(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:s,def:y=>({type:"textarea",...r(y)})}],tags:e??[]}}const n={type:"textarea",...t};return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:s,def:n}],tags:e??[]}}function h(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"PASSWORD",items:[{key:s,def:y=>({type:"password",...r(y)})}],tags:e??[]}}const n={type:"password",...t};return{type:"ITEMS",itemType:"PASSWORD",items:[{key:s,def:n}],tags:e??[]}}function E(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CURRENCY",items:[{key:s,def:y=>({type:"currency",...r(y)})}],tags:e??[]}}const n={type:"currency",...t};return{type:"ITEMS",itemType:"CURRENCY",items:[{key:s,def:n}],tags:e??[]}}function A(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:s,def:y=>({type:"markdown",...r(y)})}],tags:e??[]}}const n={type:"markdown",...t};return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:s,def:n}],tags:e??[]}}function R(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"LIST",items:[{key:s,def:y=>({type:"list",...r(y)})}],tags:e??[]}}const n={type:"list",...t};return{type:"ITEMS",itemType:"LIST",items:[{key:s,def:n}],tags:e??[]}}function M(s,t,e){if(typeof t=="function"){const u=t;return{items:[o=>({type:"calendar",path:s,...u(o)})],type:"ITEMS",itemType:"CALENDAR",tags:e??[]}}return{items:[{type:"calendar",path:s,...t}],type:"ITEMS",itemType:"CALENDAR",tags:e??[]}}function P(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:s,def:y=>({type:"dateInput",...r(y)})}],tags:e??[]}}const n={type:"dateInput",...t};return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:s,def:n}],tags:e??[]}}function w(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:s,def:y=>({type:"datePicker",...r(y)})}],tags:e??[]}}const n={type:"datePicker",...t};return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:s,def:n}],tags:e??[]}}function x(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:s,def:y=>({type:"rangeCalendar",...r(y)})}],tags:e??[]}}const n={type:"rangeCalendar",...t};return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:s,def:n}],tags:e??[]}}function C(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:s,def:y=>({type:"rangeDateInput",...r(y)})}],tags:e??[]}}const n={type:"rangeDateInput",...t};return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:s,def:n}],tags:e??[]}}function b(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:s,def:y=>({type:"rangeDatePicker",...r(y)})}],tags:e??[]}}const n={type:"rangeDatePicker",...t};return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:s,def:n}],tags:e??[]}}function L(s,t,e,n){if(typeof e=="function"){const o=e;return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:c=>({customType:s,...o(c)})}],tags:n??[]}}const u={customType:s,...e};return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:u}],tags:n??[]}}function N(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[a=>({customType:s,...r(a)})],tags:e??[]}}return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[{customType:s,...t}],tags:e??[]}}function G(s,t){return{type:"ITEMS",itemType:"ALERTS",items:[s],tags:t??[]}}function W(s,t,e){if(typeof t=="function"){const a=t;return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[c=>({customType:s,...a(c)})],tags:e??[]}}const{uid:n,...u}=t??{};return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[{customType:s,...n!=null?{uid:n}:{},props:Object.keys(u).length>0?u:void 0}],tags:e??[]}}const l=(s,t,e)=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{widgetName:"flex",...t??{}},children:s}],tags:e??[]}),F=(s,t,e)=>l(s,{direction:"row",...t??{}},e),K=(s,t,e)=>l(s,{direction:"column",...t??{}},e),g=(s,t,e)=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{widgetName:"grid",direction:"row",autoFit:!0,...t??{}},children:s}],tags:e??[]}),Y=(s,t,e)=>g(s,{direction:"row",...t??{}},e),$=(s,t,e)=>g(s,{direction:"column",...t??{}},e);function m(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function j(s,t,e){const n=s.map(o=>({label:o.label,uid:o.uid??m(o.label)})),u=s.map(o=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{uid:o.uid??m(o.label),direction:"column",widgetName:"flex"},children:o.children}],tags:[]}));return{type:"ITEMS",itemType:"TABS",items:[{def:{tabs:n,...t},children:u}],tags:e??[]}}function _(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function z(s,t,e){const n=s.map(o=>({label:o.label,uid:o.uid??_(o.label)})),u=s.map(o=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{uid:o.uid??_(o.label),direction:"column",widgetName:"flex"},children:o.children}],tags:[]}));return{type:"ITEMS",itemType:"ACCORDION",items:[{def:{sections:n,...t},children:u}],tags:e??[]}}function H(s,t,e,n){if(typeof e=="function"){const o=e;return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:c=>({customType:s,...o(c)}),children:t}],tags:n??[]}}return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:{customType:s,...e},children:t}],tags:n??[]}}function v(s,t,e){const{template:n,...u}=t;return{type:"ITEMS",itemType:"REPEATER",items:[{key:s,def:u,children:n}],tags:e??[]}}const V=s=>i._gslInputs(s,t=>t.type==="text"),X=s=>i._gslInputs(s,t=>t.type==="number"),q=s=>i._gslInputs(s,t=>t.type==="boolean");class d{constructor(t){this.conditions=t}static root(){return new d([])}tag(t){return new d([...this.conditions,{kind:"tagsAnd",tags:[t]}])}state(t){return new d([...this.conditions,{kind:"state",name:t}])}tagsAnd(t){return new d([...this.conditions,{kind:"tagsAnd",tags:t}])}tagsOr(t){return new d([...this.conditions,{kind:"tagsOr",tags:t}])}apply(t){if(this.conditions.length===0)return t;const e=this.conditions.find(r=>r.kind==="state"),n=this.conditions.filter(r=>r.kind!=="state"),u=t.matcher;return{...t,matcher:r=>{if(!u(r))return!1;for(const o of n){const a=r.tags??[];if(o.kind==="tagsAnd"){for(const y of o.tags)if(!a.includes(y))return!1}else{if(o.tags.length===0)continue;if(!o.tags.some(y=>a.includes(y)))return!1}}return!0},...e?{targetState:e.name}:{}}}inputs(t){return this.apply(i._gslInputs(t))}inputByUid(t,e){return this.apply(i._gslInputByUid(t,e))}textInputs(t){return this.apply(V(t))}numberInputs(t){return this.apply(X(t))}booleanInputs(t){return this.apply(q(t))}selects(t){return this.apply(i._gslSelects(t))}selectByUid(t,e){return this.apply(i._gslSelectByUid(t,e))}dropdowns(t){return this.apply(i._gslDropdowns(t))}dropdownByUid(t,e){return this.apply(i._gslDropdownByUid(t,e))}radiogroups(t){return this.apply(i._gslRadiogroups(t))}radiogroupByUid(t,e){return this.apply(i._gslRadiogroupByUid(t,e))}checkboxes(t){return this.apply(i._gslCheckboxes(t))}checkboxByUid(t,e){return this.apply(i._gslCheckboxByUid(t,e))}textareas(t){return this.apply(i._gslTextareas(t))}textareaByUid(t,e){return this.apply(i._gslTextareaByUid(t,e))}passwords(t){return this.apply(i._gslPasswords(t))}passwordByUid(t,e){return this.apply(i._gslPasswordByUid(t,e))}currencies(t){return this.apply(i._gslCurrencies(t))}currencyByUid(t,e){return this.apply(i._gslCurrencyByUid(t,e))}markdowns(t){return this.apply(i._gslMarkdowns(t))}markdownByUid(t,e){return this.apply(i._gslMarkdownByUid(t,e))}lists(t){return this.apply(i._gslLists(t))}listByUid(t,e){return this.apply(i._gslListByUid(t,e))}calendars(t){return this.apply(i._gslCalendars(t))}calendarByUid(t,e){return this.apply(i._gslCalendarByUid(t,e))}dateInputs(t){return this.apply(i._gslDateInputs(t))}dateInputByUid(t,e){return this.apply(i._gslDateInputByUid(t,e))}datePickers(t){return this.apply(i._gslDatePickers(t))}datePickerByUid(t,e){return this.apply(i._gslDatePickerByUid(t,e))}rangeCalendars(t){return this.apply(i._gslRangeCalendars(t))}rangeCalendarByUid(t,e){return this.apply(i._gslRangeCalendarByUid(t,e))}rangeDateInputs(t){return this.apply(i._gslRangeDateInputs(t))}rangeDateInputByUid(t,e){return this.apply(i._gslRangeDateInputByUid(t,e))}rangeDatePickers(t){return this.apply(i._gslRangeDatePickers(t))}rangeDatePickerByUid(t,e){return this.apply(i._gslRangeDatePickerByUid(t,e))}repeaters(t){return this.apply(i._gslRepeaters(t))}repeaterByUid(t,e){return this.apply(i._gslRepeaterByUid(t,e))}actions(t){return this.apply(i._gslActions(t))}actionByUid(t,e){return this.apply(i._gslActionByUid(t,e))}layouts(t){return this.apply(i._gslLayouts(t))}layoutByUid(t,e){return this.apply(i._gslLayoutByUid(t,e))}displays(t){return this.apply(i._gslDisplays(t))}displayByUid(t,e){return this.apply(i._gslDisplayByUid(t,e))}alerts(t){return this.apply(i._gslAlerts(t))}alertByUid(t,e){return this.apply(i._gslAlertByUid(t,e))}tabs(t){return this.apply(i._gslTabs(t))}tabsByUid(t,e){return this.apply(i._gslTabsByUid(t,e))}accordions(t){return this.apply(i._gslAccordions(t))}accordionByUid(t,e){return this.apply(i._gslAccordionByUid(t,e))}customInputs(t){return this.apply(i._gslCustomInputs(t))}customInputByUid(t,e){return this.apply(i._gslCustomInputByUid(t,e))}customActions(t){return this.apply(i._gslCustomActions(t))}customActionByUid(t,e){return this.apply(i._gslCustomActionByUid(t,e))}customDisplays(t){return this.apply(i._gslCustomDisplays(t))}customDisplayByUid(t,e){return this.apply(i._gslCustomDisplayByUid(t,e))}customLayouts(t){return this.apply(i._gslCustomLayouts(t))}customLayoutByUid(t,e){return this.apply(i._gslCustomLayoutByUid(t,e))}}const tt={inputs:{textInput:f,numberInput:T,booleanInput:I,select:U,dropdown:B,radiogroup:k,checkbox:D,textarea:S,password:h,currency:E,markdown:A,list:R,calendar:M,dateInput:P,datePicker:w,rangeCalendar:x,rangeDateInput:C,rangeDatePicker:b,repeater:v,custom:L},actions:{button:i._guiButton,submitButton:i._guiSubmitButton,custom:N},displays:{display:i._guiDisplay,alert:G,custom:W},layouts:{flex:l,horizontalFlex:F,verticalFlex:K,grid:g,horizontalGrid:Y,verticalGrid:$,tabs:j,accordion:z,custom:H},selectors:d.root()};function et(s,...t){return t.map(e=>({...e,targetState:s}))}function st(s,...t){return{kind:"aggregated",matcher:e=>e.tags?.includes(s)??!1,children:t}}class it{create(t){return{states:t.states,form:{uid:"gui-root-uid",type:"flex",kind:"layout",children:t.form}}}}function nt(){return new it}const ot=s=>s!==null&&typeof s=="object"&&Object.prototype.hasOwnProperty.call(s,"label")&&Object.prototype.hasOwnProperty.call(s,"value");function rt(s){return typeof s=="object"&&s!==null&&"$ref"in s&&typeof s.$ref=="string"&&Object.keys(s).length===1}async function ut(s,t){const e=new URL(s,t).href,n=await fetch(e);if(!n.ok)throw new Error(`Failed to load form chunk ${e}: ${n.status}`);const{$schema:u,...r}=await n.json();return p(r,e)}async function p(s,t){if(rt(s))return ut(s.$ref,t);const e=s;if(Array.isArray(e.children)){const n=await Promise.all(e.children.map(u=>p(u,t)));return{...e,children:n}}return s}async function yt(s,t){const e=await Promise.all(s.form.map(n=>p(n,t)));return{...s,form:e}}const at={textinput:({config:s,props:t,validator:e})=>({uid:"",kind:"input",type:"textinput",...t&&{props:t},...e&&{validator:e},...s}),password:({config:s,props:t,validator:e})=>({uid:"",kind:"input",type:"password",...t&&{props:t},...e&&{validator:e},...s}),numberinput:({config:s,props:t,validator:e})=>({uid:"",kind:"input",type:"numberinput",...t&&{props:t},...e&&{validator:e},...s}),checkbox:({config:s,props:t,validator:e})=>({uid:"",kind:"input",type:"checkbox",...t&&{props:t},...e&&{validator:e},...s}),select:({config:s,props:t,validator:e})=>({uid:"",kind:"input",type:"select",...t&&{props:t},...e&&{validator:e},...s}),flex:(s,t)=>({uid:"",kind:"layout",type:"flex",...t&&{props:t},...s}),grid:(s,t)=>({uid:"",kind:"layout",type:"grid",...t&&{props:t},...s}),tabs:(s,t)=>({uid:"",kind:"layout",type:"tabs",...t&&{props:t},...s}),alert:(s,t)=>({uid:"",kind:"display",type:"alert",...t&&{props:t},...s}),markdownText:(s,t)=>({uid:"",kind:"display",type:"markdownText",...t&&{props:t},...s})},Q=["calendar","checkbox","currency","dateInput","datePicker","dropdown","list","markdown","number","password","radiogroup","rangeCalendar","rangeDateInput","rangeDatePicker","repeater","select","textarea","textinput","toggle"],Z=["accordion","flex","grid","tabs"],J=["alert","markdownText","renderer"],O=["button"],dt=[...Q,...Z,...J,...O];exports._gslAccordionByUid=i._gslAccordionByUid;exports._gslAccordions=i._gslAccordions;exports._gslActionByUid=i._gslActionByUid;exports._gslActions=i._gslActions;exports._gslAlertByUid=i._gslAlertByUid;exports._gslAlerts=i._gslAlerts;exports._gslCalendarByUid=i._gslCalendarByUid;exports._gslCalendars=i._gslCalendars;exports._gslCheckboxByUid=i._gslCheckboxByUid;exports._gslCheckboxes=i._gslCheckboxes;exports._gslCurrencies=i._gslCurrencies;exports._gslCurrencyByUid=i._gslCurrencyByUid;exports._gslCustomActionByUid=i._gslCustomActionByUid;exports._gslCustomActions=i._gslCustomActions;exports._gslCustomDisplayByUid=i._gslCustomDisplayByUid;exports._gslCustomDisplays=i._gslCustomDisplays;exports._gslCustomInputByUid=i._gslCustomInputByUid;exports._gslCustomInputs=i._gslCustomInputs;exports._gslCustomLayoutByUid=i._gslCustomLayoutByUid;exports._gslCustomLayouts=i._gslCustomLayouts;exports._gslDateInputByUid=i._gslDateInputByUid;exports._gslDateInputs=i._gslDateInputs;exports._gslDatePickerByUid=i._gslDatePickerByUid;exports._gslDatePickers=i._gslDatePickers;exports._gslDisplayByUid=i._gslDisplayByUid;exports._gslDisplays=i._gslDisplays;exports._gslDropdownByUid=i._gslDropdownByUid;exports._gslDropdowns=i._gslDropdowns;exports._gslInputByUid=i._gslInputByUid;exports._gslInputs=i._gslInputs;exports._gslLayoutByUid=i._gslLayoutByUid;exports._gslLayouts=i._gslLayouts;exports._gslListByUid=i._gslListByUid;exports._gslLists=i._gslLists;exports._gslMarkdownByUid=i._gslMarkdownByUid;exports._gslMarkdowns=i._gslMarkdowns;exports._gslPasswordByUid=i._gslPasswordByUid;exports._gslPasswords=i._gslPasswords;exports._gslRadiogroupByUid=i._gslRadiogroupByUid;exports._gslRadiogroups=i._gslRadiogroups;exports._gslRangeCalendarByUid=i._gslRangeCalendarByUid;exports._gslRangeCalendars=i._gslRangeCalendars;exports._gslRangeDateInputByUid=i._gslRangeDateInputByUid;exports._gslRangeDateInputs=i._gslRangeDateInputs;exports._gslRangeDatePickerByUid=i._gslRangeDatePickerByUid;exports._gslRangeDatePickers=i._gslRangeDatePickers;exports._gslRepeaterByUid=i._gslRepeaterByUid;exports._gslRepeaters=i._gslRepeaters;exports._gslSelectByUid=i._gslSelectByUid;exports._gslSelects=i._gslSelects;exports._gslTabs=i._gslTabs;exports._gslTabsByUid=i._gslTabsByUid;exports._gslTextareaByUid=i._gslTextareaByUid;exports._gslTextareas=i._gslTextareas;exports._guiButton=i._guiButton;exports._guiDisplay=i._guiDisplay;exports._guiSubmitButton=i._guiSubmitButton;exports.createGslSelector=i.createGslSelector;exports.defineShortcutType=i.defineShortcutType;exports.extractWidgetProps=i.extractWidgetProps;exports.formDefs=i.formDefs;exports.getItemKey=i.getItemKey;exports.isDxDefinitions=i.isDxDefinitions;exports.processAutoLabel=i.processAutoLabel;exports.processAutoPlaceholder=i.processAutoPlaceholder;exports.resolveFormInput=i.resolveFormInput;exports.GolemWidgets=at;exports._gslBooleanInputs=q;exports._gslNumberInputs=X;exports._gslStates=et;exports._gslTag=st;exports._gslTextInputs=V;exports._guiAccordion=z;exports._guiAlert=G;exports._guiBooleanInput=I;exports._guiCalendar=M;exports._guiCheckbox=D;exports._guiCurrency=E;exports._guiCustomAction=N;exports._guiCustomDisplay=W;exports._guiCustomInput=L;exports._guiCustomLayout=H;exports._guiDateInput=P;exports._guiDatePicker=w;exports._guiDropdown=B;exports._guiFlex=l;exports._guiGrid=g;exports._guiHorizontalFlex=F;exports._guiHorizontalGrid=Y;exports._guiList=R;exports._guiMarkdown=A;exports._guiNumberInput=T;exports._guiPassword=h;exports._guiRadiogroup=k;exports._guiRangeCalendar=x;exports._guiRangeDateInput=C;exports._guiRangeDatePicker=b;exports._guiRepeater=v;exports._guiSelect=U;exports._guiTabs=j;exports._guiTextInput=f;exports._guiTextarea=S;exports._guiVerticalFlex=K;exports._guiVerticalGrid=$;exports.actionWidgets=O;exports.displayWidgets=J;exports.golemForm=nt;exports.golemWidgets=dt;exports.gui=tt;exports.inputWidgets=Q;exports.isOption=ot;exports.layoutWidgets=Z;exports.resolveChunkRefs=yt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./repeater-Ds_WHdl5.cjs");require("@golemui/core");require("@golemui/gui-validators");function f(s,t,e){if(typeof t=="function"){const u=t;return{items:[{key:s,def:o=>({type:"text",...u(o)})}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"text",...t};return{items:[{key:s,def:n}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}function T(s,t,e){if(typeof t=="function"){const u=t;return{items:[{key:s,def:o=>({type:"number",...u(o)})}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"number",...t};return{items:[{key:s,def:n}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}function I(s,t,e){if(typeof t=="function"){const u=t;return{items:[{key:s,def:o=>({type:"boolean",...u(o)})}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"boolean",...t};return{items:[{key:s,def:n}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:e??[]}}function U(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"SELECT",items:[{key:s,def:y=>({type:"select",...r(y)})}],tags:e??[]}}const n={type:"select",...t};return{type:"ITEMS",itemType:"SELECT",items:[{key:s,def:n}],tags:e??[]}}function B(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:s,def:y=>({type:"dropdown",...r(y)})}],tags:e??[]}}const n={type:"dropdown",...t};return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:s,def:n}],tags:e??[]}}function k(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:s,def:y=>({type:"radiogroup",...r(y)})}],tags:e??[]}}const n={type:"radiogroup",...t};return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:s,def:n}],tags:e??[]}}function D(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:s,def:y=>({type:"checkbox",...r(y)})}],tags:e??[]}}const n={type:"checkbox",...t};return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:s,def:n}],tags:e??[]}}function S(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:s,def:y=>({type:"textarea",...r(y)})}],tags:e??[]}}const n={type:"textarea",...t};return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:s,def:n}],tags:e??[]}}function h(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"PASSWORD",items:[{key:s,def:y=>({type:"password",...r(y)})}],tags:e??[]}}const n={type:"password",...t};return{type:"ITEMS",itemType:"PASSWORD",items:[{key:s,def:n}],tags:e??[]}}function E(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CURRENCY",items:[{key:s,def:y=>({type:"currency",...r(y)})}],tags:e??[]}}const n={type:"currency",...t};return{type:"ITEMS",itemType:"CURRENCY",items:[{key:s,def:n}],tags:e??[]}}function A(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:s,def:y=>({type:"markdown",...r(y)})}],tags:e??[]}}const n={type:"markdown",...t};return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:s,def:n}],tags:e??[]}}function R(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"LIST",items:[{key:s,def:y=>({type:"list",...r(y)})}],tags:e??[]}}const n={type:"list",...t};return{type:"ITEMS",itemType:"LIST",items:[{key:s,def:n}],tags:e??[]}}function M(s,t,e){if(typeof t=="function"){const u=t;return{items:[o=>({type:"calendar",path:s,...u(o)})],type:"ITEMS",itemType:"CALENDAR",tags:e??[]}}return{items:[{type:"calendar",path:s,...t}],type:"ITEMS",itemType:"CALENDAR",tags:e??[]}}function P(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:s,def:y=>({type:"dateInput",...r(y)})}],tags:e??[]}}const n={type:"dateInput",...t};return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:s,def:n}],tags:e??[]}}function w(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:s,def:y=>({type:"datePicker",...r(y)})}],tags:e??[]}}const n={type:"datePicker",...t};return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:s,def:n}],tags:e??[]}}function x(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:s,def:y=>({type:"rangeCalendar",...r(y)})}],tags:e??[]}}const n={type:"rangeCalendar",...t};return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:s,def:n}],tags:e??[]}}function C(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:s,def:y=>({type:"rangeDateInput",...r(y)})}],tags:e??[]}}const n={type:"rangeDateInput",...t};return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:s,def:n}],tags:e??[]}}function b(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:s,def:y=>({type:"rangeDatePicker",...r(y)})}],tags:e??[]}}const n={type:"rangeDatePicker",...t};return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:s,def:n}],tags:e??[]}}function L(s,t,e,n){if(typeof e=="function"){const o=e;return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:c=>({customType:s,...o(c)})}],tags:n??[]}}const u={customType:s,...e};return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:u}],tags:n??[]}}function N(s,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[a=>({customType:s,...r(a)})],tags:e??[]}}return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[{customType:s,...t}],tags:e??[]}}function G(s,t){return{type:"ITEMS",itemType:"ALERTS",items:[s],tags:t??[]}}function W(s,t,e){if(typeof t=="function"){const a=t;return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[c=>({customType:s,...a(c)})],tags:e??[]}}const{uid:n,...u}=t??{};return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[{customType:s,...n!=null?{uid:n}:{},props:Object.keys(u).length>0?u:void 0}],tags:e??[]}}const l=(s,t,e)=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{widgetName:"flex",...t??{}},children:s}],tags:e??[]}),F=(s,t,e)=>l(s,{direction:"row",...t??{}},e),K=(s,t,e)=>l(s,{direction:"column",...t??{}},e),g=(s,t,e)=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{widgetName:"grid",direction:"row",autoFit:!0,...t??{}},children:s}],tags:e??[]}),Y=(s,t,e)=>g(s,{direction:"row",...t??{}},e),$=(s,t,e)=>g(s,{direction:"column",...t??{}},e);function m(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function j(s,t,e){const n=s.map(o=>({label:o.label,uid:o.uid??m(o.label)})),u=s.map(o=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{uid:o.uid??m(o.label),direction:"column",widgetName:"flex"},children:o.children}],tags:[]}));return{type:"ITEMS",itemType:"TABS",items:[{def:{tabs:n,...t},children:u}],tags:e??[]}}function _(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function z(s,t,e){const n=s.map(o=>({label:o.label,uid:o.uid??_(o.label)})),u=s.map(o=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{uid:o.uid??_(o.label),direction:"column",widgetName:"flex"},children:o.children}],tags:[]}));return{type:"ITEMS",itemType:"ACCORDION",items:[{def:{sections:n,...t},children:u}],tags:e??[]}}function H(s,t,e,n){if(typeof e=="function"){const o=e;return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:c=>({customType:s,...o(c)}),children:t}],tags:n??[]}}return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:{customType:s,...e},children:t}],tags:n??[]}}function v(s,t,e){const{template:n,...u}=t;return{type:"ITEMS",itemType:"REPEATER",items:[{key:s,def:u,children:n}],tags:e??[]}}const V=s=>i._gslInputs(s,t=>t.type==="text"),X=s=>i._gslInputs(s,t=>t.type==="number"),q=s=>i._gslInputs(s,t=>t.type==="boolean");class d{constructor(t){this.conditions=t}static root(){return new d([])}tag(t){return new d([...this.conditions,{kind:"tagsAnd",tags:[t]}])}state(t){return new d([...this.conditions,{kind:"state",name:t}])}tagsAnd(t){return new d([...this.conditions,{kind:"tagsAnd",tags:t}])}tagsOr(t){return new d([...this.conditions,{kind:"tagsOr",tags:t}])}apply(t){if(this.conditions.length===0)return t;const e=this.conditions.find(r=>r.kind==="state"),n=this.conditions.filter(r=>r.kind!=="state"),u=t.matcher;return{...t,matcher:r=>{if(!u(r))return!1;for(const o of n){const a=r.tags??[];if(o.kind==="tagsAnd"){for(const y of o.tags)if(!a.includes(y))return!1}else{if(o.tags.length===0)continue;if(!o.tags.some(y=>a.includes(y)))return!1}}return!0},...e?{targetState:e.name}:{}}}inputs(t){return this.apply(i._gslInputs(t))}inputByUid(t,e){return this.apply(i._gslInputByUid(t,e))}textInputs(t){return this.apply(V(t))}numberInputs(t){return this.apply(X(t))}booleanInputs(t){return this.apply(q(t))}selects(t){return this.apply(i._gslSelects(t))}selectByUid(t,e){return this.apply(i._gslSelectByUid(t,e))}dropdowns(t){return this.apply(i._gslDropdowns(t))}dropdownByUid(t,e){return this.apply(i._gslDropdownByUid(t,e))}radiogroups(t){return this.apply(i._gslRadiogroups(t))}radiogroupByUid(t,e){return this.apply(i._gslRadiogroupByUid(t,e))}checkboxes(t){return this.apply(i._gslCheckboxes(t))}checkboxByUid(t,e){return this.apply(i._gslCheckboxByUid(t,e))}textareas(t){return this.apply(i._gslTextareas(t))}textareaByUid(t,e){return this.apply(i._gslTextareaByUid(t,e))}passwords(t){return this.apply(i._gslPasswords(t))}passwordByUid(t,e){return this.apply(i._gslPasswordByUid(t,e))}currencies(t){return this.apply(i._gslCurrencies(t))}currencyByUid(t,e){return this.apply(i._gslCurrencyByUid(t,e))}markdowns(t){return this.apply(i._gslMarkdowns(t))}markdownByUid(t,e){return this.apply(i._gslMarkdownByUid(t,e))}lists(t){return this.apply(i._gslLists(t))}listByUid(t,e){return this.apply(i._gslListByUid(t,e))}calendars(t){return this.apply(i._gslCalendars(t))}calendarByUid(t,e){return this.apply(i._gslCalendarByUid(t,e))}dateInputs(t){return this.apply(i._gslDateInputs(t))}dateInputByUid(t,e){return this.apply(i._gslDateInputByUid(t,e))}datePickers(t){return this.apply(i._gslDatePickers(t))}datePickerByUid(t,e){return this.apply(i._gslDatePickerByUid(t,e))}rangeCalendars(t){return this.apply(i._gslRangeCalendars(t))}rangeCalendarByUid(t,e){return this.apply(i._gslRangeCalendarByUid(t,e))}rangeDateInputs(t){return this.apply(i._gslRangeDateInputs(t))}rangeDateInputByUid(t,e){return this.apply(i._gslRangeDateInputByUid(t,e))}rangeDatePickers(t){return this.apply(i._gslRangeDatePickers(t))}rangeDatePickerByUid(t,e){return this.apply(i._gslRangeDatePickerByUid(t,e))}repeaters(t){return this.apply(i._gslRepeaters(t))}repeaterByUid(t,e){return this.apply(i._gslRepeaterByUid(t,e))}actions(t){return this.apply(i._gslActions(t))}actionByUid(t,e){return this.apply(i._gslActionByUid(t,e))}layouts(t){return this.apply(i._gslLayouts(t))}layoutByUid(t,e){return this.apply(i._gslLayoutByUid(t,e))}displays(t){return this.apply(i._gslDisplays(t))}displayByUid(t,e){return this.apply(i._gslDisplayByUid(t,e))}alerts(t){return this.apply(i._gslAlerts(t))}alertByUid(t,e){return this.apply(i._gslAlertByUid(t,e))}tabs(t){return this.apply(i._gslTabs(t))}tabsByUid(t,e){return this.apply(i._gslTabsByUid(t,e))}accordions(t){return this.apply(i._gslAccordions(t))}accordionByUid(t,e){return this.apply(i._gslAccordionByUid(t,e))}customInputs(t){return this.apply(i._gslCustomInputs(t))}customInputByUid(t,e){return this.apply(i._gslCustomInputByUid(t,e))}customActions(t){return this.apply(i._gslCustomActions(t))}customActionByUid(t,e){return this.apply(i._gslCustomActionByUid(t,e))}customDisplays(t){return this.apply(i._gslCustomDisplays(t))}customDisplayByUid(t,e){return this.apply(i._gslCustomDisplayByUid(t,e))}customLayouts(t){return this.apply(i._gslCustomLayouts(t))}customLayoutByUid(t,e){return this.apply(i._gslCustomLayoutByUid(t,e))}}const tt={inputs:{textInput:f,numberInput:T,booleanInput:I,select:U,dropdown:B,radiogroup:k,checkbox:D,textarea:S,password:h,currency:E,markdown:A,list:R,calendar:M,dateInput:P,datePicker:w,rangeCalendar:x,rangeDateInput:C,rangeDatePicker:b,repeater:v,custom:L},actions:{button:i._guiButton,submitButton:i._guiSubmitButton,custom:N},displays:{display:i._guiDisplay,alert:G,custom:W},layouts:{flex:l,horizontalFlex:F,verticalFlex:K,grid:g,horizontalGrid:Y,verticalGrid:$,tabs:j,accordion:z,custom:H},selectors:d.root()};function et(s,...t){return t.map(e=>({...e,targetState:s}))}function st(s,...t){return{kind:"aggregated",matcher:e=>e.tags?.includes(s)??!1,children:t}}class it{create(t){return{states:t.states,form:{uid:"gui-root-uid",type:"flex",kind:"layout",children:t.form}}}}function nt(){return new it}const ot=s=>s!==null&&typeof s=="object"&&Object.prototype.hasOwnProperty.call(s,"label")&&Object.prototype.hasOwnProperty.call(s,"value");function rt(s){return typeof s=="object"&&s!==null&&"$ref"in s&&typeof s.$ref=="string"&&Object.keys(s).length===1}async function ut(s,t){const e=new URL(s,t).href,n=await fetch(e);if(!n.ok)throw new Error(`Failed to load form chunk ${e}: ${n.status}`);const{$schema:u,...r}=await n.json();return p(r,e)}async function p(s,t){if(rt(s))return ut(s.$ref,t);const e=s;if(Array.isArray(e.children)){const n=await Promise.all(e.children.map(u=>p(u,t)));return{...e,children:n}}return s}async function yt(s,t){const e=await Promise.all(s.form.map(n=>p(n,t)));return{...s,form:e}}const at={textinput:({config:s,props:t,validator:e})=>({uid:"",kind:"input",type:"textinput",...t&&{props:t},...e&&{validator:e},...s}),password:({config:s,props:t,validator:e})=>({uid:"",kind:"input",type:"password",...t&&{props:t},...e&&{validator:e},...s}),numberinput:({config:s,props:t,validator:e})=>({uid:"",kind:"input",type:"numberinput",...t&&{props:t},...e&&{validator:e},...s}),checkbox:({config:s,props:t,validator:e})=>({uid:"",kind:"input",type:"checkbox",...t&&{props:t},...e&&{validator:e},...s}),select:({config:s,props:t,validator:e})=>({uid:"",kind:"input",type:"select",...t&&{props:t},...e&&{validator:e},...s}),flex:(s,t)=>({uid:"",kind:"layout",type:"flex",...t&&{props:t},...s}),grid:(s,t)=>({uid:"",kind:"layout",type:"grid",...t&&{props:t},...s}),tabs:(s,t)=>({uid:"",kind:"layout",type:"tabs",...t&&{props:t},...s}),alert:(s,t)=>({uid:"",kind:"display",type:"alert",...t&&{props:t},...s}),markdownText:(s,t)=>({uid:"",kind:"display",type:"markdownText",...t&&{props:t},...s})},Q=["calendar","checkbox","currency","dateInput","datePicker","dropdown","list","markdown","number","password","radiogroup","rangeCalendar","rangeDateInput","rangeDatePicker","repeater","select","textarea","textinput","toggle"],Z=["accordion","flex","grid","tabs"],J=["alert","markdownText","renderer"],O=["button"],dt=[...Q,...Z,...J,...O];exports._gslAccordionByUid=i._gslAccordionByUid;exports._gslAccordions=i._gslAccordions;exports._gslActionByUid=i._gslActionByUid;exports._gslActions=i._gslActions;exports._gslAlertByUid=i._gslAlertByUid;exports._gslAlerts=i._gslAlerts;exports._gslCalendarByUid=i._gslCalendarByUid;exports._gslCalendars=i._gslCalendars;exports._gslCheckboxByUid=i._gslCheckboxByUid;exports._gslCheckboxes=i._gslCheckboxes;exports._gslCurrencies=i._gslCurrencies;exports._gslCurrencyByUid=i._gslCurrencyByUid;exports._gslCustomActionByUid=i._gslCustomActionByUid;exports._gslCustomActions=i._gslCustomActions;exports._gslCustomDisplayByUid=i._gslCustomDisplayByUid;exports._gslCustomDisplays=i._gslCustomDisplays;exports._gslCustomInputByUid=i._gslCustomInputByUid;exports._gslCustomInputs=i._gslCustomInputs;exports._gslCustomLayoutByUid=i._gslCustomLayoutByUid;exports._gslCustomLayouts=i._gslCustomLayouts;exports._gslDateInputByUid=i._gslDateInputByUid;exports._gslDateInputs=i._gslDateInputs;exports._gslDatePickerByUid=i._gslDatePickerByUid;exports._gslDatePickers=i._gslDatePickers;exports._gslDisplayByUid=i._gslDisplayByUid;exports._gslDisplays=i._gslDisplays;exports._gslDropdownByUid=i._gslDropdownByUid;exports._gslDropdowns=i._gslDropdowns;exports._gslInputByUid=i._gslInputByUid;exports._gslInputs=i._gslInputs;exports._gslLayoutByUid=i._gslLayoutByUid;exports._gslLayouts=i._gslLayouts;exports._gslListByUid=i._gslListByUid;exports._gslLists=i._gslLists;exports._gslMarkdownByUid=i._gslMarkdownByUid;exports._gslMarkdowns=i._gslMarkdowns;exports._gslPasswordByUid=i._gslPasswordByUid;exports._gslPasswords=i._gslPasswords;exports._gslRadiogroupByUid=i._gslRadiogroupByUid;exports._gslRadiogroups=i._gslRadiogroups;exports._gslRangeCalendarByUid=i._gslRangeCalendarByUid;exports._gslRangeCalendars=i._gslRangeCalendars;exports._gslRangeDateInputByUid=i._gslRangeDateInputByUid;exports._gslRangeDateInputs=i._gslRangeDateInputs;exports._gslRangeDatePickerByUid=i._gslRangeDatePickerByUid;exports._gslRangeDatePickers=i._gslRangeDatePickers;exports._gslRepeaterByUid=i._gslRepeaterByUid;exports._gslRepeaters=i._gslRepeaters;exports._gslSelectByUid=i._gslSelectByUid;exports._gslSelects=i._gslSelects;exports._gslTabs=i._gslTabs;exports._gslTabsByUid=i._gslTabsByUid;exports._gslTextareaByUid=i._gslTextareaByUid;exports._gslTextareas=i._gslTextareas;exports._guiButton=i._guiButton;exports._guiDisplay=i._guiDisplay;exports._guiSubmitButton=i._guiSubmitButton;exports.createGslSelector=i.createGslSelector;exports.defineShortcutType=i.defineShortcutType;exports.extractWidgetProps=i.extractWidgetProps;exports.formDefs=i.formDefs;exports.getItemKey=i.getItemKey;exports.isDxDefinitions=i.isDxDefinitions;exports.processAutoLabel=i.processAutoLabel;exports.processAutoPlaceholder=i.processAutoPlaceholder;exports.resolveFormInput=i.resolveFormInput;exports.GolemWidgets=at;exports._gslBooleanInputs=q;exports._gslNumberInputs=X;exports._gslStates=et;exports._gslTag=st;exports._gslTextInputs=V;exports._guiAccordion=z;exports._guiAlert=G;exports._guiBooleanInput=I;exports._guiCalendar=M;exports._guiCheckbox=D;exports._guiCurrency=E;exports._guiCustomAction=N;exports._guiCustomDisplay=W;exports._guiCustomInput=L;exports._guiCustomLayout=H;exports._guiDateInput=P;exports._guiDatePicker=w;exports._guiDropdown=B;exports._guiFlex=l;exports._guiGrid=g;exports._guiHorizontalFlex=F;exports._guiHorizontalGrid=Y;exports._guiList=R;exports._guiMarkdown=A;exports._guiNumberInput=T;exports._guiPassword=h;exports._guiRadiogroup=k;exports._guiRangeCalendar=x;exports._guiRangeDateInput=C;exports._guiRangeDatePicker=b;exports._guiRepeater=v;exports._guiSelect=U;exports._guiTabs=j;exports._guiTextInput=f;exports._guiTextarea=S;exports._guiVerticalFlex=K;exports._guiVerticalGrid=$;exports.actionWidgets=O;exports.displayWidgets=J;exports.golemForm=nt;exports.golemWidgets=dt;exports.gui=tt;exports.inputWidgets=Q;exports.isOption=ot;exports.layoutWidgets=Z;exports.resolveChunkRefs=yt;
package/internals.js CHANGED
@@ -1,4 +1,4 @@
1
- import { g as o, r as t } from "./repeater-Cy3ziFdR.js";
1
+ import { g as o, r as t } from "./repeater-Bq3AKxF4.js";
2
2
  export {
3
3
  o as getItemKey,
4
4
  t as resolveFormInput
package/internals.umd.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./repeater-DD8jJ4pS.cjs");exports.getItemKey=e.getItemKey;exports.resolveFormInput=e.resolveFormInput;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./repeater-Ds_WHdl5.cjs");exports.getItemKey=e.getItemKey;exports.resolveFormInput=e.resolveFormInput;
@@ -1,5 +1,18 @@
1
- import { Validator } from '@golemui/gui-validators';
1
+ import { CustomValidator, Validator } from '@golemui/gui-validators';
2
2
  type ValidatorFn = (api: any) => Partial<Validator>;
3
+ /**
4
+ * Validator shape accepted by a DX widget whose value type is fixed (e.g.
5
+ * a `textInput`'s value is always a string). The user may either:
6
+ * - omit the `type` discriminator and write only the rules for that fixed
7
+ * kind (`{ minLength: 5 }`), which `buildTypedValidator` will tag with the
8
+ * correct `type` at form-def construction time, or
9
+ * - opt out and supply a fully-typed `CustomValidator`
10
+ * (`{ type: 'custom', <validatorName>: <config> }`), which the engine
11
+ * resolves against `customValidators` at validation time.
12
+ *
13
+ * The two branches are discriminated by the presence of `type: 'custom'`.
14
+ */
15
+ export type DxValidator<T extends Validator> = Omit<T, 'type'> | CustomValidator;
3
16
  /**
4
17
  * Build a fixed-type validator from a user-supplied partial validator and a
5
18
  * known JSON-schema type. The DX layer uses this for widgets whose value
package/lib/dx/index.d.ts CHANGED
@@ -60,6 +60,7 @@ export { _gslStates } from './shortcuts/scopes/gslStates.impl';
60
60
  export { _gslTag } from './shortcuts/scopes/gslTag.impl';
61
61
  export type { DxFormConfig, FormConfig, GslSelectorsInput } from './core/dx.domain';
62
62
  export type { DxRuntimeParams } from './core/dxUtilityTypes';
63
+ export type { DxValidator } from './core/dxValidatorHelper';
63
64
  export { formDefs } from './dx.service';
64
65
  export type { DxDefinitionItem, DxDefinitions, DxDisplayRenderFn, DxResult, FormEvents, } from './formDef.domain';
65
66
  export { isDxDefinitions, resolveFormInput } from './resolveFormInput';
@@ -2,9 +2,10 @@ import { StringValidator } from '@golemui/gui-validators';
2
2
  import { CalendarProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase, DxInternalFields } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface CalendarDecorator extends DxInputBase, DxCommonFields, Partial<CalendarProps> {
6
7
  type: 'calendar';
7
- validator?: Omit<StringValidator, 'type'>;
8
+ validator?: DxValidator<StringValidator>;
8
9
  }
9
10
  /**
10
11
  * Full decorator type including pipeline-internal fields.
@@ -2,9 +2,10 @@ import { BooleanValidator } from '@golemui/gui-validators';
2
2
  import { CheckboxProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface CheckboxDecorator extends DxInputBase, DxCommonFields, Partial<CheckboxProps> {
6
7
  type: 'checkbox';
7
- validator?: Omit<BooleanValidator, 'type'>;
8
+ validator?: DxValidator<BooleanValidator>;
8
9
  }
9
10
  export interface GslCheckboxConfig extends GslConfigBase<CheckboxDecorator> {
10
11
  suppressAutomaticLabels?: boolean;
@@ -2,9 +2,10 @@ import { NumberValidator } from '@golemui/gui-validators';
2
2
  import { CurrencyProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface CurrencyDecorator extends DxInputBase, DxCommonFields, Partial<CurrencyProps> {
6
7
  type: 'currency';
7
- validator?: Omit<NumberValidator, 'type'>;
8
+ validator?: DxValidator<NumberValidator>;
8
9
  }
9
10
  export interface GslCurrencyConfig extends GslConfigBase<CurrencyDecorator> {
10
11
  suppressAutomaticLabels?: boolean;
@@ -2,9 +2,10 @@ import { StringValidator } from '@golemui/gui-validators';
2
2
  import { DateinputProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface DateInputDecorator extends DxInputBase, DxCommonFields, Partial<DateinputProps> {
6
7
  type: 'dateInput';
7
- validator?: Omit<StringValidator, 'type'>;
8
+ validator?: DxValidator<StringValidator>;
8
9
  }
9
10
  export interface GslDateInputConfig extends GslConfigBase<DateInputDecorator> {
10
11
  suppressAutomaticLabels?: boolean;
@@ -2,9 +2,10 @@ import { StringValidator } from '@golemui/gui-validators';
2
2
  import { DatePickerProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface DatePickerDecorator extends DxInputBase, DxCommonFields, Partial<DatePickerProps> {
6
7
  type: 'datePicker';
7
- validator?: Omit<StringValidator, 'type'>;
8
+ validator?: DxValidator<StringValidator>;
8
9
  }
9
10
  export interface GslDatePickerConfig extends GslConfigBase<DatePickerDecorator> {
10
11
  suppressAutomaticLabels?: boolean;
@@ -2,6 +2,7 @@ import { NumberValidator, StringValidator, BooleanValidator } from '@golemui/gui
2
2
  import { NumberinputProps, TextinputProps, ToggleProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase, DxInternalFields } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, DxRuntimeParams, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  /**
6
7
  * @deprecated Kept for backward compatibility in pipeline internals.
7
8
  * New code should use the individual subtypes directly.
@@ -10,19 +11,19 @@ export interface DataInputDecorator extends DxInputBase, DxCommonFields {
10
11
  type: 'text' | 'number' | 'boolean';
11
12
  placeholder?: string;
12
13
  }
13
- export type NumberDataInputValidator = Omit<NumberValidator, 'type'>;
14
+ export type NumberDataInputValidator = DxValidator<NumberValidator>;
14
15
  export interface NumberDataInputDecorator extends DxInputBase, DxCommonFields, Partial<NumberinputProps> {
15
16
  type: 'number';
16
17
  validator?: NumberDataInputValidator;
17
18
  }
18
- export type TextDataInputValidator = Omit<StringValidator, 'type'>;
19
+ export type TextDataInputValidator = DxValidator<StringValidator>;
19
20
  export interface TextDataInputDecorator extends DxInputBase, DxCommonFields, Partial<TextinputProps> {
20
21
  type: 'text';
21
22
  validator?: TextDataInputValidator;
22
23
  }
23
24
  export interface BooleanDataInputDecorator extends DxInputBase, DxCommonFields, Partial<ToggleProps> {
24
25
  type: 'boolean';
25
- validator?: Omit<BooleanValidator, 'type'>;
26
+ validator?: DxValidator<BooleanValidator>;
26
27
  }
27
28
  export type InputDecorator = TextDataInputDecorator | NumberDataInputDecorator | BooleanDataInputDecorator;
28
29
  /**
@@ -2,9 +2,10 @@ import { StringValidator } from '@golemui/gui-validators';
2
2
  import { MarkdownProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface MarkdownDecorator extends DxInputBase, DxCommonFields, Partial<MarkdownProps> {
6
7
  type: 'markdown';
7
- validator?: Omit<StringValidator, 'type'>;
8
+ validator?: DxValidator<StringValidator>;
8
9
  }
9
10
  export interface GslMarkdownConfig extends GslConfigBase<MarkdownDecorator> {
10
11
  suppressAutomaticLabels?: boolean;
@@ -2,9 +2,10 @@ import { StringValidator } from '@golemui/gui-validators';
2
2
  import { PasswordProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface PasswordDecorator extends DxInputBase, DxCommonFields, Partial<PasswordProps> {
6
7
  type: 'password';
7
- validator?: Omit<StringValidator, 'type'>;
8
+ validator?: DxValidator<StringValidator>;
8
9
  }
9
10
  export interface GslPasswordConfig extends GslConfigBase<PasswordDecorator> {
10
11
  suppressAutomaticLabels?: boolean;
@@ -2,9 +2,10 @@ import { ArrayValidator } from '@golemui/gui-validators';
2
2
  import { RangeCalendarProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface RangeCalendarDecorator extends DxInputBase, DxCommonFields, Partial<RangeCalendarProps> {
6
7
  type: 'rangeCalendar';
7
- validator?: Omit<ArrayValidator, 'type'>;
8
+ validator?: DxValidator<ArrayValidator>;
8
9
  }
9
10
  export interface GslRangeCalendarConfig extends GslConfigBase<RangeCalendarDecorator> {
10
11
  suppressAutomaticLabels?: boolean;
@@ -2,9 +2,10 @@ import { ArrayValidator } from '@golemui/gui-validators';
2
2
  import { RangeDateInputProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface RangeDateInputDecorator extends DxInputBase, DxCommonFields, Partial<RangeDateInputProps> {
6
7
  type: 'rangeDateInput';
7
- validator?: Omit<ArrayValidator, 'type'>;
8
+ validator?: DxValidator<ArrayValidator>;
8
9
  }
9
10
  export interface GslRangeDateInputConfig extends GslConfigBase<RangeDateInputDecorator> {
10
11
  suppressAutomaticLabels?: boolean;
@@ -2,9 +2,10 @@ import { ArrayValidator } from '@golemui/gui-validators';
2
2
  import { RangeDatePickerProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface RangeDatePickerDecorator extends DxInputBase, DxCommonFields, Partial<RangeDatePickerProps> {
6
7
  type: 'rangeDatePicker';
7
- validator?: Omit<ArrayValidator, 'type'>;
8
+ validator?: DxValidator<ArrayValidator>;
8
9
  }
9
10
  export interface GslRangeDatePickerConfig extends GslConfigBase<RangeDatePickerDecorator> {
10
11
  suppressAutomaticLabels?: boolean;
@@ -2,6 +2,7 @@ import { ArrayValidator } from '@golemui/gui-validators';
2
2
  import { DxCommonFields } from '../../core/dxBase.types';
3
3
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
4
4
  import { ValidGuiShortcut } from '../../core/dx.domain';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface RepeaterDecorator extends DxCommonFields {
6
7
  label?: string;
7
8
  addLabel?: string;
@@ -10,7 +11,7 @@ export interface RepeaterDecorator extends DxCommonFields {
10
11
  title?: string;
11
12
  addButtonIcon?: string;
12
13
  removeButtonIcon?: string;
13
- validator?: Omit<ArrayValidator, 'type'>;
14
+ validator?: DxValidator<ArrayValidator>;
14
15
  }
15
16
  export type GslRepeaterConfig = GslConfigBase<RepeaterDecorator>;
16
17
  export type RepeaterEntry = {
@@ -2,9 +2,10 @@ import { StringValidator } from '@golemui/gui-validators';
2
2
  import { TextareaProps } from '../../../widget.props';
3
3
  import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
4
  import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ import { DxValidator } from '../../core/dxValidatorHelper';
5
6
  export interface TextareaDecorator extends DxInputBase, DxCommonFields, Partial<TextareaProps> {
6
7
  type: 'textarea';
7
- validator?: Omit<StringValidator, 'type'>;
8
+ validator?: DxValidator<StringValidator>;
8
9
  }
9
10
  export interface GslTextareaConfig extends GslConfigBase<TextareaDecorator> {
10
11
  suppressAutomaticLabels?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemui/gui-shared",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "type": "module",
5
5
  "main": "./index.umd.cjs",
6
6
  "module": "./index.js",
@@ -28,8 +28,8 @@
28
28
  "*.md"
29
29
  ],
30
30
  "dependencies": {
31
- "@golemui/core": "0.13.0",
32
- "@golemui/gui-validators": "0.13.0"
31
+ "@golemui/core": "0.13.1",
32
+ "@golemui/gui-validators": "0.13.1"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",