@golemui/gui-shared 0.13.2 → 0.13.3
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 +10 -0
- package/index.js +210 -195
- package/index.umd.cjs +1 -1
- package/internals.js +2 -2
- package/internals.umd.cjs +1 -1
- package/lib/dx/__tests__/helpers.d.ts +0 -2
- package/lib/dx/core/dx.domain.d.ts +0 -1
- package/lib/dx/core/eventWiring.service.d.ts +1 -2
- package/lib/dx/dx.service.d.ts +2 -6
- package/package.json +3 -3
- package/{resolveFormInput-CmPoe8iw.js → resolveFormInput-B3y_InQZ.js} +489 -528
- package/resolveFormInput-CyAWrNF6.cjs +1 -0
- package/resolveFormInput-C0LCXSox.cjs +0 -1
package/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./resolveFormInput-C0LCXSox.cjs");require("@golemui/core");require("@golemui/gui-validators");function f(i,t,e){if(typeof t=="function"){const u=t;return{items:[{key:i,def:o=>({type:"text",...u(o)})}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"text",...t};return{items:[{key:i,def:n}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}function T(i,t,e){if(typeof t=="function"){const u=t;return{items:[{key:i,def:o=>({type:"number",...u(o)})}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"number",...t};return{items:[{key:i,def:n}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}function I(i,t,e){if(typeof t=="function"){const u=t;return{items:[{key:i,def:o=>({type:"boolean",...u(o)})}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"boolean",...t};return{items:[{key:i,def:n}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}function U(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"SELECT",items:[{key:i,def:y=>({type:"select",...r(y)})}],tags:e??[]}}const n={type:"select",...t};return{type:"ITEMS",itemType:"SELECT",items:[{key:i,def:n}],tags:e??[]}}function B(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:i,def:y=>({type:"dropdown",...r(y)})}],tags:e??[]}}const n={type:"dropdown",...t};return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:i,def:n}],tags:e??[]}}function D(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:i,def:y=>({type:"radiogroup",...r(y)})}],tags:e??[]}}const n={type:"radiogroup",...t};return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:i,def:n}],tags:e??[]}}function S(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:i,def:y=>({type:"checkbox",...r(y)})}],tags:e??[]}}const n={type:"checkbox",...t};return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:i,def:n}],tags:e??[]}}function h(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:i,def:y=>({type:"textarea",...r(y)})}],tags:e??[]}}const n={type:"textarea",...t};return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:i,def:n}],tags:e??[]}}function E(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"PASSWORD",items:[{key:i,def:y=>({type:"password",...r(y)})}],tags:e??[]}}const n={type:"password",...t};return{type:"ITEMS",itemType:"PASSWORD",items:[{key:i,def:n}],tags:e??[]}}function A(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CURRENCY",items:[{key:i,def:y=>({type:"currency",...r(y)})}],tags:e??[]}}const n={type:"currency",...t};return{type:"ITEMS",itemType:"CURRENCY",items:[{key:i,def:n}],tags:e??[]}}function k(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:i,def:y=>({type:"markdown",...r(y)})}],tags:e??[]}}const n={type:"markdown",...t};return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:i,def:n}],tags:e??[]}}function R(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"LIST",items:[{key:i,def:y=>({type:"list",...r(y)})}],tags:e??[]}}const n={type:"list",...t};return{type:"ITEMS",itemType:"LIST",items:[{key:i,def:n}],tags:e??[]}}function M(i,t,e){if(typeof t=="function"){const u=t;return{items:[o=>({type:"calendar",path:i,...u(o)})],type:"ITEMS",itemType:"CALENDAR",tags:e??[]}}return{items:[{type:"calendar",path:i,...t}],type:"ITEMS",itemType:"CALENDAR",tags:e??[]}}function P(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:i,def:y=>({type:"dateInput",...r(y)})}],tags:e??[]}}const n={type:"dateInput",...t};return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:i,def:n}],tags:e??[]}}function w(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:i,def:y=>({type:"datePicker",...r(y)})}],tags:e??[]}}const n={type:"datePicker",...t};return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:i,def:n}],tags:e??[]}}function C(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:i,def:y=>({type:"rangeCalendar",...r(y)})}],tags:e??[]}}const n={type:"rangeCalendar",...t};return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:i,def:n}],tags:e??[]}}function x(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:i,def:y=>({type:"rangeDateInput",...r(y)})}],tags:e??[]}}const n={type:"rangeDateInput",...t};return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:i,def:n}],tags:e??[]}}function L(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:i,def:y=>({type:"rangeDatePicker",...r(y)})}],tags:e??[]}}const n={type:"rangeDatePicker",...t};return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:i,def:n}],tags:e??[]}}function b(i,t,e,n){if(typeof e=="function"){const o=e;return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:l=>({customType:i,...o(l)})}],tags:n??[]}}const u={customType:i,...e};return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:u}],tags:n??[]}}function N(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[a=>({customType:i,...r(a)})],tags:e??[]}}return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[{customType:i,...t}],tags:e??[]}}function G(i,t){return{type:"ITEMS",itemType:"ALERTS",items:[i],tags:t??[]}}function F(i,t,e){if(typeof t=="function"){const a=t;return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[l=>({customType:i,...a(l)})],tags:e??[]}}const{uid:n,...u}=t??{};return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[{customType:i,...n!=null?{uid:n}:{},props:Object.keys(u).length>0?u:void 0}],tags:e??[]}}const d=(i,t,e)=>({type:"ITEMS",itemType:s.GuiItemTypes.LAYOUTS,items:[{def:{widgetName:"flex",...t??{}},children:i}],tags:e??[]}),v=(i,t,e)=>d(i,{direction:"row",...t??{}},e),Y=(i,t,e)=>d(i,{direction:"column",...t??{}},e),g=(i,t,e)=>({type:"ITEMS",itemType:s.GuiItemTypes.LAYOUTS,items:[{def:{widgetName:"grid",direction:"row",autoFit:!0,...t??{}},children:i}],tags:e??[]}),$=(i,t,e)=>g(i,{direction:"row",...t??{}},e),W=(i,t,e)=>g(i,{direction:"column",...t??{}},e);function m(i){return i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function j(i,t,e){const n=i.map(o=>({label:o.label,uid:o.uid??m(o.label)})),u=i.map(o=>({type:"ITEMS",itemType:s.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 _(i){return i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function z(i,t,e){const n=i.map(o=>({label:o.label,uid:o.uid??_(o.label)})),u=i.map(o=>({type:"ITEMS",itemType:s.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(i,t,e,n){if(typeof e=="function"){const o=e;return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:l=>({customType:i,...o(l)}),children:t}],tags:n??[]}}return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:{customType:i,...e},children:t}],tags:n??[]}}function K(i,t,e){const{template:n,...u}=t;return{type:"ITEMS",itemType:"REPEATER",items:[{key:i,def:u,children:n}],tags:e??[]}}const V=i=>s._gslInputs(i,t=>t.type==="text"),X=i=>s._gslInputs(i,t=>t.type==="number"),q=i=>s._gslInputs(i,t=>t.type==="boolean");class c{constructor(t){this.conditions=t}static root(){return new c([])}tag(t){return new c([...this.conditions,{kind:"tagsAnd",tags:[t]}])}state(t){return new c([...this.conditions,{kind:"state",name:t}])}tagsAnd(t){return new c([...this.conditions,{kind:"tagsAnd",tags:t}])}tagsOr(t){return new c([...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(s._gslInputs(t))}inputByUid(t,e){return this.apply(s._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(s._gslSelects(t))}selectByUid(t,e){return this.apply(s._gslSelectByUid(t,e))}dropdowns(t){return this.apply(s._gslDropdowns(t))}dropdownByUid(t,e){return this.apply(s._gslDropdownByUid(t,e))}radiogroups(t){return this.apply(s._gslRadiogroups(t))}radiogroupByUid(t,e){return this.apply(s._gslRadiogroupByUid(t,e))}checkboxes(t){return this.apply(s._gslCheckboxes(t))}checkboxByUid(t,e){return this.apply(s._gslCheckboxByUid(t,e))}textareas(t){return this.apply(s._gslTextareas(t))}textareaByUid(t,e){return this.apply(s._gslTextareaByUid(t,e))}passwords(t){return this.apply(s._gslPasswords(t))}passwordByUid(t,e){return this.apply(s._gslPasswordByUid(t,e))}currencies(t){return this.apply(s._gslCurrencies(t))}currencyByUid(t,e){return this.apply(s._gslCurrencyByUid(t,e))}markdowns(t){return this.apply(s._gslMarkdowns(t))}markdownByUid(t,e){return this.apply(s._gslMarkdownByUid(t,e))}lists(t){return this.apply(s._gslLists(t))}listByUid(t,e){return this.apply(s._gslListByUid(t,e))}calendars(t){return this.apply(s._gslCalendars(t))}calendarByUid(t,e){return this.apply(s._gslCalendarByUid(t,e))}dateInputs(t){return this.apply(s._gslDateInputs(t))}dateInputByUid(t,e){return this.apply(s._gslDateInputByUid(t,e))}datePickers(t){return this.apply(s._gslDatePickers(t))}datePickerByUid(t,e){return this.apply(s._gslDatePickerByUid(t,e))}rangeCalendars(t){return this.apply(s._gslRangeCalendars(t))}rangeCalendarByUid(t,e){return this.apply(s._gslRangeCalendarByUid(t,e))}rangeDateInputs(t){return this.apply(s._gslRangeDateInputs(t))}rangeDateInputByUid(t,e){return this.apply(s._gslRangeDateInputByUid(t,e))}rangeDatePickers(t){return this.apply(s._gslRangeDatePickers(t))}rangeDatePickerByUid(t,e){return this.apply(s._gslRangeDatePickerByUid(t,e))}repeaters(t){return this.apply(s._gslRepeaters(t))}repeaterByUid(t,e){return this.apply(s._gslRepeaterByUid(t,e))}actions(t){return this.apply(s._gslActions(t))}actionByUid(t,e){return this.apply(s._gslActionByUid(t,e))}layouts(t){return this.apply(s._gslLayouts(t))}layoutByUid(t,e){return this.apply(s._gslLayoutByUid(t,e))}displays(t){return this.apply(s._gslDisplays(t))}displayByUid(t,e){return this.apply(s._gslDisplayByUid(t,e))}alerts(t){return this.apply(s._gslAlerts(t))}alertByUid(t,e){return this.apply(s._gslAlertByUid(t,e))}tabs(t){return this.apply(s._gslTabs(t))}tabsByUid(t,e){return this.apply(s._gslTabsByUid(t,e))}accordions(t){return this.apply(s._gslAccordions(t))}accordionByUid(t,e){return this.apply(s._gslAccordionByUid(t,e))}customInputs(t){return this.apply(s._gslCustomInputs(t))}customInputByUid(t,e){return this.apply(s._gslCustomInputByUid(t,e))}customActions(t){return this.apply(s._gslCustomActions(t))}customActionByUid(t,e){return this.apply(s._gslCustomActionByUid(t,e))}customDisplays(t){return this.apply(s._gslCustomDisplays(t))}customDisplayByUid(t,e){return this.apply(s._gslCustomDisplayByUid(t,e))}customLayouts(t){return this.apply(s._gslCustomLayouts(t))}customLayoutByUid(t,e){return this.apply(s._gslCustomLayoutByUid(t,e))}}const Q={inputs:{textInput:f,numberInput:T,booleanInput:I,select:U,dropdown:B,radiogroup:D,checkbox:S,textarea:h,password:E,currency:A,markdown:k,list:R,calendar:M,dateInput:P,datePicker:w,rangeCalendar:C,rangeDateInput:x,rangeDatePicker:L,repeater:K,custom:b},actions:{button:s._guiButton,submitButton:s._guiSubmitButton,custom:N},displays:{display:s._guiDisplay,alert:G,custom:F},layouts:{flex:d,horizontalFlex:v,verticalFlex:Y,grid:g,horizontalGrid:$,verticalGrid:W,tabs:j,accordion:z,custom:H},selectors:c.root()};function Z(i,...t){return t.map(e=>({...e,targetState:i}))}function J(i,...t){return{kind:"aggregated",matcher:e=>e.tags?.includes(i)??!1,children:t}}class O{create(t){return{states:t.states,form:{uid:"gui-root-uid",type:"flex",kind:"layout",children:t.form}}}}function tt(){return new O}const et=i=>i!==null&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"label")&&Object.prototype.hasOwnProperty.call(i,"value");function st(i){return typeof i=="object"&&i!==null&&"$ref"in i&&typeof i.$ref=="string"&&Object.keys(i).length===1}async function it(i,t){const e=new URL(i,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(i,t){if(st(i))return it(i.$ref,t);const e=i;if(Array.isArray(e.children)){const n=await Promise.all(e.children.map(u=>p(u,t)));return{...e,children:n}}return i}async function nt(i,t){const e=await Promise.all(i.form.map(n=>p(n,t)));return{...i,form:e}}exports._gslAccordionByUid=s._gslAccordionByUid;exports._gslAccordions=s._gslAccordions;exports._gslActionByUid=s._gslActionByUid;exports._gslActions=s._gslActions;exports._gslAlertByUid=s._gslAlertByUid;exports._gslAlerts=s._gslAlerts;exports._gslCalendarByUid=s._gslCalendarByUid;exports._gslCalendars=s._gslCalendars;exports._gslCheckboxByUid=s._gslCheckboxByUid;exports._gslCheckboxes=s._gslCheckboxes;exports._gslCurrencies=s._gslCurrencies;exports._gslCurrencyByUid=s._gslCurrencyByUid;exports._gslCustomActionByUid=s._gslCustomActionByUid;exports._gslCustomActions=s._gslCustomActions;exports._gslCustomDisplayByUid=s._gslCustomDisplayByUid;exports._gslCustomDisplays=s._gslCustomDisplays;exports._gslCustomInputByUid=s._gslCustomInputByUid;exports._gslCustomInputs=s._gslCustomInputs;exports._gslCustomLayoutByUid=s._gslCustomLayoutByUid;exports._gslCustomLayouts=s._gslCustomLayouts;exports._gslDateInputByUid=s._gslDateInputByUid;exports._gslDateInputs=s._gslDateInputs;exports._gslDatePickerByUid=s._gslDatePickerByUid;exports._gslDatePickers=s._gslDatePickers;exports._gslDisplayByUid=s._gslDisplayByUid;exports._gslDisplays=s._gslDisplays;exports._gslDropdownByUid=s._gslDropdownByUid;exports._gslDropdowns=s._gslDropdowns;exports._gslInputByUid=s._gslInputByUid;exports._gslInputs=s._gslInputs;exports._gslLayoutByUid=s._gslLayoutByUid;exports._gslLayouts=s._gslLayouts;exports._gslListByUid=s._gslListByUid;exports._gslLists=s._gslLists;exports._gslMarkdownByUid=s._gslMarkdownByUid;exports._gslMarkdowns=s._gslMarkdowns;exports._gslPasswordByUid=s._gslPasswordByUid;exports._gslPasswords=s._gslPasswords;exports._gslRadiogroupByUid=s._gslRadiogroupByUid;exports._gslRadiogroups=s._gslRadiogroups;exports._gslRangeCalendarByUid=s._gslRangeCalendarByUid;exports._gslRangeCalendars=s._gslRangeCalendars;exports._gslRangeDateInputByUid=s._gslRangeDateInputByUid;exports._gslRangeDateInputs=s._gslRangeDateInputs;exports._gslRangeDatePickerByUid=s._gslRangeDatePickerByUid;exports._gslRangeDatePickers=s._gslRangeDatePickers;exports._gslRepeaterByUid=s._gslRepeaterByUid;exports._gslRepeaters=s._gslRepeaters;exports._gslSelectByUid=s._gslSelectByUid;exports._gslSelects=s._gslSelects;exports._gslTabs=s._gslTabs;exports._gslTabsByUid=s._gslTabsByUid;exports._gslTextareaByUid=s._gslTextareaByUid;exports._gslTextareas=s._gslTextareas;exports._guiButton=s._guiButton;exports._guiDisplay=s._guiDisplay;exports._guiSubmitButton=s._guiSubmitButton;exports.createGslSelector=s.createGslSelector;exports.defineShortcutType=s.defineShortcutType;exports.extractWidgetProps=s.extractWidgetProps;exports.formDefs=s.formDefs;exports.isDxDefinitions=s.isDxDefinitions;exports.processAutoLabel=s.processAutoLabel;exports.processAutoPlaceholder=s.processAutoPlaceholder;exports.resolveFormInput=s.resolveFormInput;exports._gslBooleanInputs=q;exports._gslNumberInputs=X;exports._gslStates=Z;exports._gslTag=J;exports._gslTextInputs=V;exports._guiAccordion=z;exports._guiAlert=G;exports._guiBooleanInput=I;exports._guiCalendar=M;exports._guiCheckbox=S;exports._guiCurrency=A;exports._guiCustomAction=N;exports._guiCustomDisplay=F;exports._guiCustomInput=b;exports._guiCustomLayout=H;exports._guiDateInput=P;exports._guiDatePicker=w;exports._guiDropdown=B;exports._guiFlex=d;exports._guiGrid=g;exports._guiHorizontalFlex=v;exports._guiHorizontalGrid=$;exports._guiList=R;exports._guiMarkdown=k;exports._guiNumberInput=T;exports._guiPassword=E;exports._guiRadiogroup=D;exports._guiRangeCalendar=C;exports._guiRangeDateInput=x;exports._guiRangeDatePicker=L;exports._guiRepeater=K;exports._guiSelect=U;exports._guiTabs=j;exports._guiTextInput=f;exports._guiTextarea=h;exports._guiVerticalFlex=Y;exports._guiVerticalGrid=W;exports.golemForm=tt;exports.gui=Q;exports.isOption=et;exports.resolveChunkRefs=nt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./resolveFormInput-CyAWrNF6.cjs");require("@golemui/core");require("@golemui/gui-validators");function T(i,t,e){if(typeof t=="function"){const u=t;return{items:[{key:i,def:o=>({type:"text",...u(o)})}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"text",...t};return{items:[{key:i,def:n}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}function I(i,t,e){if(typeof t=="function"){const u=t;return{items:[{key:i,def:o=>({type:"number",...u(o)})}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"number",...t};return{items:[{key:i,def:n}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}function U(i,t,e){if(typeof t=="function"){const u=t;return{items:[{key:i,def:o=>({type:"boolean",...u(o)})}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}const n={type:"boolean",...t};return{items:[{key:i,def:n}],type:"ITEMS",itemType:s.GuiItemTypes.INPUTS,tags:e??[]}}function B(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"SELECT",items:[{key:i,def:y=>({type:"select",...r(y)})}],tags:e??[]}}const n={type:"select",...t};return{type:"ITEMS",itemType:"SELECT",items:[{key:i,def:n}],tags:e??[]}}function S(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:i,def:y=>({type:"dropdown",...r(y)})}],tags:e??[]}}const n={type:"dropdown",...t};return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:i,def:n}],tags:e??[]}}function D(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:i,def:y=>({type:"radiogroup",...r(y)})}],tags:e??[]}}const n={type:"radiogroup",...t};return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:i,def:n}],tags:e??[]}}function h(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:i,def:y=>({type:"checkbox",...r(y)})}],tags:e??[]}}const n={type:"checkbox",...t};return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:i,def:n}],tags:e??[]}}function E(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:i,def:y=>({type:"textarea",...r(y)})}],tags:e??[]}}const n={type:"textarea",...t};return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:i,def:n}],tags:e??[]}}function A(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"PASSWORD",items:[{key:i,def:y=>({type:"password",...r(y)})}],tags:e??[]}}const n={type:"password",...t};return{type:"ITEMS",itemType:"PASSWORD",items:[{key:i,def:n}],tags:e??[]}}function k(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CURRENCY",items:[{key:i,def:y=>({type:"currency",...r(y)})}],tags:e??[]}}const n={type:"currency",...t};return{type:"ITEMS",itemType:"CURRENCY",items:[{key:i,def:n}],tags:e??[]}}function R(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:i,def:y=>({type:"markdown",...r(y)})}],tags:e??[]}}const n={type:"markdown",...t};return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:i,def:n}],tags:e??[]}}function M(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"LIST",items:[{key:i,def:y=>({type:"list",...r(y)})}],tags:e??[]}}const n={type:"list",...t};return{type:"ITEMS",itemType:"LIST",items:[{key:i,def:n}],tags:e??[]}}function P(i,t,e){if(typeof t=="function"){const u=t;return{items:[o=>({type:"calendar",path:i,...u(o)})],type:"ITEMS",itemType:"CALENDAR",tags:e??[]}}return{items:[{type:"calendar",path:i,...t}],type:"ITEMS",itemType:"CALENDAR",tags:e??[]}}function C(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:i,def:y=>({type:"dateInput",...r(y)})}],tags:e??[]}}const n={type:"dateInput",...t};return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:i,def:n}],tags:e??[]}}function w(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:i,def:y=>({type:"datePicker",...r(y)})}],tags:e??[]}}const n={type:"datePicker",...t};return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:i,def:n}],tags:e??[]}}function x(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:i,def:y=>({type:"rangeCalendar",...r(y)})}],tags:e??[]}}const n={type:"rangeCalendar",...t};return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:i,def:n}],tags:e??[]}}function b(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:i,def:y=>({type:"rangeDateInput",...r(y)})}],tags:e??[]}}const n={type:"rangeDateInput",...t};return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:i,def:n}],tags:e??[]}}function L(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:i,def:y=>({type:"rangeDatePicker",...r(y)})}],tags:e??[]}}const n={type:"rangeDatePicker",...t};return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:i,def:n}],tags:e??[]}}function N(i,t,e,n){if(typeof e=="function"){const o=e;return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:l=>({customType:i,...o(l)})}],tags:n??[]}}const u={customType:i,...e};return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:u}],tags:n??[]}}function p(i,t){return{items:[i],type:"ITEMS",itemType:s.GuiItemTypes.ACTIONS,tags:t??[]}}const G=i=>{const t={uid:"#submit",label:"Submit"},e=i!=null?s.objectUtils.deepMerge(t,i):t;return p(e)};function F(i,t,e){if(typeof t=="function"){const r=t;return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[a=>({customType:i,...r(a)})],tags:e??[]}}return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[{customType:i,...t}],tags:e??[]}}function v(i,t){return{type:"ITEMS",itemType:"ALERTS",items:[i],tags:t??[]}}function Y(i,t,e){if(typeof t=="function"){const a=t;return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[l=>({customType:i,...a(l)})],tags:e??[]}}const{uid:n,...u}=t??{};return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[{customType:i,...n!=null?{uid:n}:{},props:Object.keys(u).length>0?u:void 0}],tags:e??[]}}const d=(i,t,e)=>({type:"ITEMS",itemType:s.GuiItemTypes.LAYOUTS,items:[{def:{widgetName:"flex",...t??{}},children:i}],tags:e??[]}),$=(i,t,e)=>d(i,{direction:"row",...t??{}},e),j=(i,t,e)=>d(i,{direction:"column",...t??{}},e),g=(i,t,e)=>({type:"ITEMS",itemType:s.GuiItemTypes.LAYOUTS,items:[{def:{widgetName:"grid",direction:"row",autoFit:!0,...t??{}},children:i}],tags:e??[]}),W=(i,t,e)=>g(i,{direction:"row",...t??{}},e),z=(i,t,e)=>g(i,{direction:"column",...t??{}},e);function _(i){return i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function H(i,t,e){const n=i.map(o=>({label:o.label,uid:o.uid??_(o.label)})),u=i.map(o=>({type:"ITEMS",itemType:s.GuiItemTypes.LAYOUTS,items:[{def:{uid:o.uid??_(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 f(i){return i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function K(i,t,e){const n=i.map(o=>({label:o.label,uid:o.uid??f(o.label)})),u=i.map(o=>({type:"ITEMS",itemType:s.GuiItemTypes.LAYOUTS,items:[{def:{uid:o.uid??f(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 V(i,t,e,n){if(typeof e=="function"){const o=e;return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:l=>({customType:i,...o(l)}),children:t}],tags:n??[]}}return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:{customType:i,...e},children:t}],tags:n??[]}}function X(i,t,e){const{template:n,...u}=t;return{type:"ITEMS",itemType:"REPEATER",items:[{key:i,def:u,children:n}],tags:e??[]}}const q=i=>s._gslInputs(i,t=>t.type==="text"),O=i=>s._gslInputs(i,t=>t.type==="number"),Q=i=>s._gslInputs(i,t=>t.type==="boolean");class c{constructor(t){this.conditions=t}static root(){return new c([])}tag(t){return new c([...this.conditions,{kind:"tagsAnd",tags:[t]}])}state(t){return new c([...this.conditions,{kind:"state",name:t}])}tagsAnd(t){return new c([...this.conditions,{kind:"tagsAnd",tags:t}])}tagsOr(t){return new c([...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(s._gslInputs(t))}inputByUid(t,e){return this.apply(s._gslInputByUid(t,e))}textInputs(t){return this.apply(q(t))}numberInputs(t){return this.apply(O(t))}booleanInputs(t){return this.apply(Q(t))}selects(t){return this.apply(s._gslSelects(t))}selectByUid(t,e){return this.apply(s._gslSelectByUid(t,e))}dropdowns(t){return this.apply(s._gslDropdowns(t))}dropdownByUid(t,e){return this.apply(s._gslDropdownByUid(t,e))}radiogroups(t){return this.apply(s._gslRadiogroups(t))}radiogroupByUid(t,e){return this.apply(s._gslRadiogroupByUid(t,e))}checkboxes(t){return this.apply(s._gslCheckboxes(t))}checkboxByUid(t,e){return this.apply(s._gslCheckboxByUid(t,e))}textareas(t){return this.apply(s._gslTextareas(t))}textareaByUid(t,e){return this.apply(s._gslTextareaByUid(t,e))}passwords(t){return this.apply(s._gslPasswords(t))}passwordByUid(t,e){return this.apply(s._gslPasswordByUid(t,e))}currencies(t){return this.apply(s._gslCurrencies(t))}currencyByUid(t,e){return this.apply(s._gslCurrencyByUid(t,e))}markdowns(t){return this.apply(s._gslMarkdowns(t))}markdownByUid(t,e){return this.apply(s._gslMarkdownByUid(t,e))}lists(t){return this.apply(s._gslLists(t))}listByUid(t,e){return this.apply(s._gslListByUid(t,e))}calendars(t){return this.apply(s._gslCalendars(t))}calendarByUid(t,e){return this.apply(s._gslCalendarByUid(t,e))}dateInputs(t){return this.apply(s._gslDateInputs(t))}dateInputByUid(t,e){return this.apply(s._gslDateInputByUid(t,e))}datePickers(t){return this.apply(s._gslDatePickers(t))}datePickerByUid(t,e){return this.apply(s._gslDatePickerByUid(t,e))}rangeCalendars(t){return this.apply(s._gslRangeCalendars(t))}rangeCalendarByUid(t,e){return this.apply(s._gslRangeCalendarByUid(t,e))}rangeDateInputs(t){return this.apply(s._gslRangeDateInputs(t))}rangeDateInputByUid(t,e){return this.apply(s._gslRangeDateInputByUid(t,e))}rangeDatePickers(t){return this.apply(s._gslRangeDatePickers(t))}rangeDatePickerByUid(t,e){return this.apply(s._gslRangeDatePickerByUid(t,e))}repeaters(t){return this.apply(s._gslRepeaters(t))}repeaterByUid(t,e){return this.apply(s._gslRepeaterByUid(t,e))}actions(t){return this.apply(s._gslActions(t))}actionByUid(t,e){return this.apply(s._gslActionByUid(t,e))}layouts(t){return this.apply(s._gslLayouts(t))}layoutByUid(t,e){return this.apply(s._gslLayoutByUid(t,e))}displays(t){return this.apply(s._gslDisplays(t))}displayByUid(t,e){return this.apply(s._gslDisplayByUid(t,e))}alerts(t){return this.apply(s._gslAlerts(t))}alertByUid(t,e){return this.apply(s._gslAlertByUid(t,e))}tabs(t){return this.apply(s._gslTabs(t))}tabsByUid(t,e){return this.apply(s._gslTabsByUid(t,e))}accordions(t){return this.apply(s._gslAccordions(t))}accordionByUid(t,e){return this.apply(s._gslAccordionByUid(t,e))}customInputs(t){return this.apply(s._gslCustomInputs(t))}customInputByUid(t,e){return this.apply(s._gslCustomInputByUid(t,e))}customActions(t){return this.apply(s._gslCustomActions(t))}customActionByUid(t,e){return this.apply(s._gslCustomActionByUid(t,e))}customDisplays(t){return this.apply(s._gslCustomDisplays(t))}customDisplayByUid(t,e){return this.apply(s._gslCustomDisplayByUid(t,e))}customLayouts(t){return this.apply(s._gslCustomLayouts(t))}customLayoutByUid(t,e){return this.apply(s._gslCustomLayoutByUid(t,e))}}const Z={inputs:{textInput:T,numberInput:I,booleanInput:U,select:B,dropdown:S,radiogroup:D,checkbox:h,textarea:E,password:A,currency:k,markdown:R,list:M,calendar:P,dateInput:C,datePicker:w,rangeCalendar:x,rangeDateInput:b,rangeDatePicker:L,repeater:X,custom:N},actions:{button:p,submitButton:G,custom:F},displays:{display:s._guiDisplay,alert:v,custom:Y},layouts:{flex:d,horizontalFlex:$,verticalFlex:j,grid:g,horizontalGrid:W,verticalGrid:z,tabs:H,accordion:K,custom:V},selectors:c.root()};function J(i,...t){return t.map(e=>({...e,targetState:i}))}function tt(i,...t){return{kind:"aggregated",matcher:e=>e.tags?.includes(i)??!1,children:t}}class et{create(t){return{states:t.states,form:{uid:"gui-root-uid",type:"flex",kind:"layout",children:t.form}}}}function st(){return new et}const it=i=>i!==null&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"label")&&Object.prototype.hasOwnProperty.call(i,"value");function nt(i){return typeof i=="object"&&i!==null&&"$ref"in i&&typeof i.$ref=="string"&&Object.keys(i).length===1}async function ot(i,t){const e=new URL(i,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 m(r,e)}async function m(i,t){if(nt(i))return ot(i.$ref,t);const e=i;if(Array.isArray(e.children)){const n=await Promise.all(e.children.map(u=>m(u,t)));return{...e,children:n}}return i}async function rt(i,t){const e=await Promise.all(i.form.map(n=>m(n,t)));return{...i,form:e}}exports._gslAccordionByUid=s._gslAccordionByUid;exports._gslAccordions=s._gslAccordions;exports._gslActionByUid=s._gslActionByUid;exports._gslActions=s._gslActions;exports._gslAlertByUid=s._gslAlertByUid;exports._gslAlerts=s._gslAlerts;exports._gslCalendarByUid=s._gslCalendarByUid;exports._gslCalendars=s._gslCalendars;exports._gslCheckboxByUid=s._gslCheckboxByUid;exports._gslCheckboxes=s._gslCheckboxes;exports._gslCurrencies=s._gslCurrencies;exports._gslCurrencyByUid=s._gslCurrencyByUid;exports._gslCustomActionByUid=s._gslCustomActionByUid;exports._gslCustomActions=s._gslCustomActions;exports._gslCustomDisplayByUid=s._gslCustomDisplayByUid;exports._gslCustomDisplays=s._gslCustomDisplays;exports._gslCustomInputByUid=s._gslCustomInputByUid;exports._gslCustomInputs=s._gslCustomInputs;exports._gslCustomLayoutByUid=s._gslCustomLayoutByUid;exports._gslCustomLayouts=s._gslCustomLayouts;exports._gslDateInputByUid=s._gslDateInputByUid;exports._gslDateInputs=s._gslDateInputs;exports._gslDatePickerByUid=s._gslDatePickerByUid;exports._gslDatePickers=s._gslDatePickers;exports._gslDisplayByUid=s._gslDisplayByUid;exports._gslDisplays=s._gslDisplays;exports._gslDropdownByUid=s._gslDropdownByUid;exports._gslDropdowns=s._gslDropdowns;exports._gslInputByUid=s._gslInputByUid;exports._gslInputs=s._gslInputs;exports._gslLayoutByUid=s._gslLayoutByUid;exports._gslLayouts=s._gslLayouts;exports._gslListByUid=s._gslListByUid;exports._gslLists=s._gslLists;exports._gslMarkdownByUid=s._gslMarkdownByUid;exports._gslMarkdowns=s._gslMarkdowns;exports._gslPasswordByUid=s._gslPasswordByUid;exports._gslPasswords=s._gslPasswords;exports._gslRadiogroupByUid=s._gslRadiogroupByUid;exports._gslRadiogroups=s._gslRadiogroups;exports._gslRangeCalendarByUid=s._gslRangeCalendarByUid;exports._gslRangeCalendars=s._gslRangeCalendars;exports._gslRangeDateInputByUid=s._gslRangeDateInputByUid;exports._gslRangeDateInputs=s._gslRangeDateInputs;exports._gslRangeDatePickerByUid=s._gslRangeDatePickerByUid;exports._gslRangeDatePickers=s._gslRangeDatePickers;exports._gslRepeaterByUid=s._gslRepeaterByUid;exports._gslRepeaters=s._gslRepeaters;exports._gslSelectByUid=s._gslSelectByUid;exports._gslSelects=s._gslSelects;exports._gslTabs=s._gslTabs;exports._gslTabsByUid=s._gslTabsByUid;exports._gslTextareaByUid=s._gslTextareaByUid;exports._gslTextareas=s._gslTextareas;exports._guiDisplay=s._guiDisplay;exports.createGslSelector=s.createGslSelector;exports.defineShortcutType=s.defineShortcutType;exports.extractWidgetProps=s.extractWidgetProps;exports.formDefs=s.formDefs;exports.isDxDefinitions=s.isDxDefinitions;exports.processAutoLabel=s.processAutoLabel;exports.processAutoPlaceholder=s.processAutoPlaceholder;exports.resolveFormInput=s.resolveFormInput;exports._gslBooleanInputs=Q;exports._gslNumberInputs=O;exports._gslStates=J;exports._gslTag=tt;exports._gslTextInputs=q;exports._guiAccordion=K;exports._guiAlert=v;exports._guiBooleanInput=U;exports._guiButton=p;exports._guiCalendar=P;exports._guiCheckbox=h;exports._guiCurrency=k;exports._guiCustomAction=F;exports._guiCustomDisplay=Y;exports._guiCustomInput=N;exports._guiCustomLayout=V;exports._guiDateInput=C;exports._guiDatePicker=w;exports._guiDropdown=S;exports._guiFlex=d;exports._guiGrid=g;exports._guiHorizontalFlex=$;exports._guiHorizontalGrid=W;exports._guiList=M;exports._guiMarkdown=R;exports._guiNumberInput=I;exports._guiPassword=A;exports._guiRadiogroup=D;exports._guiRangeCalendar=x;exports._guiRangeDateInput=b;exports._guiRangeDatePicker=L;exports._guiRepeater=X;exports._guiSelect=B;exports._guiSubmitButton=G;exports._guiTabs=H;exports._guiTextInput=T;exports._guiTextarea=E;exports._guiVerticalFlex=j;exports._guiVerticalGrid=z;exports.golemForm=st;exports.gui=Z;exports.isOption=it;exports.resolveChunkRefs=rt;
|
package/internals.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aa as f } from "./resolveFormInput-B3y_InQZ.js";
|
|
2
2
|
function o(e, n) {
|
|
3
3
|
if (e != null && typeof e == "object" && "__rid" in e)
|
|
4
4
|
return e.__rid;
|
|
@@ -11,5 +11,5 @@ function o(e, n) {
|
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
13
|
o as getItemKey,
|
|
14
|
-
|
|
14
|
+
f as resolveFormInput
|
|
15
15
|
};
|
package/internals.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./resolveFormInput-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./resolveFormInput-CyAWrNF6.cjs");function n(e,t){if(e!=null&&typeof e=="object"&&"__rid"in e)return e.__rid;const r=t();return Object.defineProperty(e,"__rid",{value:r,enumerable:!1,configurable:!1}),r}exports.resolveFormInput=o.resolveFormInput;exports.getItemKey=n;
|
|
@@ -5,8 +5,6 @@ import { FormConfig, GslSelectorsInput } from '../core/dx.domain';
|
|
|
5
5
|
* Process a form definition through the full DX pipeline.
|
|
6
6
|
*
|
|
7
7
|
* Returns the root layout widget with its children.
|
|
8
|
-
* Strips the auto-injected submit button for cleaner assertions
|
|
9
|
-
* (it's always the last child if present).
|
|
10
8
|
*
|
|
11
9
|
* IMPORTANT: Asserts that the root widget IS a layout with uid '#root'
|
|
12
10
|
* before unwrapping. This makes the helper a canary for auto-stack
|
|
@@ -33,7 +33,6 @@ export interface GslLeafSelector {
|
|
|
33
33
|
}
|
|
34
34
|
export interface FormConfig {
|
|
35
35
|
suppressAutomaticStack?: boolean;
|
|
36
|
-
suppressAutomaticSubmit?: boolean;
|
|
37
36
|
onSubmit?: (data: any) => void;
|
|
38
37
|
dependencies?: Dependencies;
|
|
39
38
|
widgetLoaders?: Record<string, () => Promise<unknown>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormEvent } from '@golemui/core';
|
|
2
|
-
import { FormConfig, MergeResult
|
|
2
|
+
import { FormConfig, MergeResult } from './dx.domain';
|
|
3
3
|
import { EventIdGenerator } from './itemTypeRegistry';
|
|
4
4
|
export type EventRegistry = Map<string, (event: FormEvent) => void>;
|
|
5
5
|
/**
|
|
@@ -13,7 +13,6 @@ export type EventRegistry = Map<string, (event: FormEvent) => void>;
|
|
|
13
13
|
*/
|
|
14
14
|
export declare class EventWiringService {
|
|
15
15
|
extractOnClickFromMergeResult(mergeResult: MergeResult, eventRegistry: EventRegistry, formConfig: FormConfig, eventIdGenerator: EventIdGenerator): MergeResult;
|
|
16
|
-
countSubmitButtons(defs: ValidGuiShortcut[]): number;
|
|
17
16
|
private wireOnClick;
|
|
18
17
|
wireInputLayoutEvents(mergeResult: MergeResult, eventRegistry: EventRegistry, eventIdGenerator: EventIdGenerator): MergeResult;
|
|
19
18
|
private wireEventProperties;
|
package/lib/dx/dx.service.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { UiState } from '@golemui/core';
|
|
|
2
2
|
import { DxDefinitions, DxResult } from './formDef.domain';
|
|
3
3
|
import { DxFormConfig, GslSelectorsInput } from './core/dx.domain';
|
|
4
4
|
import { SelectorNormalizer } from './core/selectorNormalizer.service';
|
|
5
|
-
import { EventWiringService } from './core/eventWiring.service';
|
|
6
5
|
import { ItemWalker } from './core/itemWalker.service';
|
|
7
6
|
/**
|
|
8
7
|
* Transforms a developer-friendly form definition into a fully-fledged form definition
|
|
@@ -12,9 +11,8 @@ import { ItemWalker } from './core/itemWalker.service';
|
|
|
12
11
|
*/
|
|
13
12
|
export declare class DxService {
|
|
14
13
|
private readonly selectorNormalizer;
|
|
15
|
-
private readonly eventWiring;
|
|
16
14
|
private readonly walker;
|
|
17
|
-
constructor(selectorNormalizer: SelectorNormalizer,
|
|
15
|
+
constructor(selectorNormalizer: SelectorNormalizer, walker: ItemWalker);
|
|
18
16
|
processDxFacade<STATE_KEYS extends UiState = never, FORM_DATA extends Record<string, any> = any>(dxDefinitionsRaw: DxDefinitions, gslSelectorsInput?: GslSelectorsInput, formConfigInput?: DxFormConfig<STATE_KEYS>): DxResult<STATE_KEYS, FORM_DATA>;
|
|
19
17
|
/**
|
|
20
18
|
* Normalizes raw form definitions and applies form-level defaults.
|
|
@@ -23,9 +21,7 @@ export declare class DxService {
|
|
|
23
21
|
* 1. Normalize definitions — ensure a flat array; convert bare functions to display widgets.
|
|
24
22
|
* 2. Normalize selectors — convert mixed leaf/aggregated selectors into a uniform
|
|
25
23
|
* aggregated shape, and extract form-level config (see {@link FormConfig}).
|
|
26
|
-
* 3. Auto-
|
|
27
|
-
* Throws if more than one submit button is found.
|
|
28
|
-
* 4. Auto-stack — unless suppressed, wrap all definitions in a synthetic root
|
|
24
|
+
* 3. Auto-stack — unless suppressed, wrap all definitions in a synthetic root
|
|
29
25
|
* flex column layout so the form renders as a single vertical container.
|
|
30
26
|
*/
|
|
31
27
|
private prepareForm;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemui/gui-shared",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.umd.cjs",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"*.md"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@golemui/core": "0.13.
|
|
34
|
-
"@golemui/gui-validators": "0.13.
|
|
33
|
+
"@golemui/core": "0.13.3",
|
|
34
|
+
"@golemui/gui-validators": "0.13.3"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|