@emeraldemperaur/vector-sigma 1.4.42 → 1.4.43
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/lib/index.cjs +161 -231
- package/lib/index.esm.js +158 -231
- package/lib/types/index.d.ts +1 -1
- package/lib/types/layouts/accordion/accordion.d.ts +7 -1
- package/lib/types/utils/voltron.d.ts +2 -0
- package/lib/types/vectorSigma.d.ts +3 -2
- package/package.json +1 -1
- package/lib/types/utils/architect.d.ts +0 -247
- package/lib/types/utils/argonaut.d.ts +0 -12
- package/lib/types/xForm.d.ts +0 -19
package/lib/index.esm.js
CHANGED
|
@@ -733,7 +733,7 @@ const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9
|
|
|
733
733
|
/** Returns a regex for validating an RFC 9562/4122 UUID.
|
|
734
734
|
*
|
|
735
735
|
* @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
|
|
736
|
-
const uuid
|
|
736
|
+
const uuid = (version) => {
|
|
737
737
|
if (!version)
|
|
738
738
|
return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
|
|
739
739
|
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
|
|
@@ -1416,10 +1416,10 @@ const $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
|
|
|
1416
1416
|
const v = versionMap[def.version];
|
|
1417
1417
|
if (v === undefined)
|
|
1418
1418
|
throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
1419
|
-
def.pattern ?? (def.pattern = uuid
|
|
1419
|
+
def.pattern ?? (def.pattern = uuid(v));
|
|
1420
1420
|
}
|
|
1421
1421
|
else
|
|
1422
|
-
def.pattern ?? (def.pattern = uuid
|
|
1422
|
+
def.pattern ?? (def.pattern = uuid());
|
|
1423
1423
|
$ZodStringFormat.init(inst, def);
|
|
1424
1424
|
});
|
|
1425
1425
|
const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
|
|
@@ -4085,17 +4085,11 @@ const ZodUUID = /*@__PURE__*/ $constructor("ZodUUID", (inst, def) => {
|
|
|
4085
4085
|
$ZodUUID.init(inst, def);
|
|
4086
4086
|
ZodStringFormat.init(inst, def);
|
|
4087
4087
|
});
|
|
4088
|
-
function uuid(params) {
|
|
4089
|
-
return _uuid(ZodUUID, params);
|
|
4090
|
-
}
|
|
4091
4088
|
const ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
|
|
4092
4089
|
// ZodStringFormat.init(inst, def);
|
|
4093
4090
|
$ZodURL.init(inst, def);
|
|
4094
4091
|
ZodStringFormat.init(inst, def);
|
|
4095
4092
|
});
|
|
4096
|
-
function url(params) {
|
|
4097
|
-
return _url(ZodURL, params);
|
|
4098
|
-
}
|
|
4099
4093
|
const ZodEmoji = /*@__PURE__*/ $constructor("ZodEmoji", (inst, def) => {
|
|
4100
4094
|
// ZodStringFormat.init(inst, def);
|
|
4101
4095
|
$ZodEmoji.init(inst, def);
|
|
@@ -4550,7 +4544,7 @@ function superRefine(fn) {
|
|
|
4550
4544
|
return _superRefine(fn);
|
|
4551
4545
|
}
|
|
4552
4546
|
|
|
4553
|
-
const InputOptionSchema
|
|
4547
|
+
const InputOptionSchema = object({
|
|
4554
4548
|
optionid: number(),
|
|
4555
4549
|
optionvalue: union([string(), number(), boolean()]),
|
|
4556
4550
|
optionurl: string().optional(),
|
|
@@ -4559,7 +4553,7 @@ const InputOptionSchema$1 = object({
|
|
|
4559
4553
|
score: number().or(float64()).optional(),
|
|
4560
4554
|
note: string().optional(),
|
|
4561
4555
|
});
|
|
4562
|
-
const QuerySchema
|
|
4556
|
+
const QuerySchema = lazy(() => object({
|
|
4563
4557
|
queryId: number(),
|
|
4564
4558
|
inputType: string(),
|
|
4565
4559
|
inputAlias: string(),
|
|
@@ -4575,18 +4569,19 @@ const QuerySchema$1 = lazy(() => object({
|
|
|
4575
4569
|
errorText: string().optional(),
|
|
4576
4570
|
defaultValue: any().optional(),
|
|
4577
4571
|
queryResponse: any().nullable().optional(),
|
|
4578
|
-
inputOptions: array(InputOptionSchema
|
|
4572
|
+
inputOptions: array(InputOptionSchema).optional(),
|
|
4579
4573
|
triggerValue: any().optional(),
|
|
4580
|
-
toggledInput: QuerySchema
|
|
4574
|
+
toggledInput: QuerySchema.nullable().optional(),
|
|
4581
4575
|
minValue: number().optional(),
|
|
4582
4576
|
maxValue: number().optional(),
|
|
4583
4577
|
stepValue: number().optional(),
|
|
4584
4578
|
}));
|
|
4585
|
-
const SectionSchema
|
|
4579
|
+
const SectionSchema = object({
|
|
4586
4580
|
sectionId: string(),
|
|
4587
4581
|
title: string(),
|
|
4582
|
+
subtitle: string().optional(),
|
|
4588
4583
|
icon: string().optional(),
|
|
4589
|
-
queries: array(QuerySchema
|
|
4584
|
+
queries: array(QuerySchema),
|
|
4590
4585
|
});
|
|
4591
4586
|
const XFormSchema = object({
|
|
4592
4587
|
uuid: string(),
|
|
@@ -4594,7 +4589,7 @@ const XFormSchema = object({
|
|
|
4594
4589
|
logo: string().optional(),
|
|
4595
4590
|
brandColor: string().optional(),
|
|
4596
4591
|
logoPosition: string().optional(),
|
|
4597
|
-
model: array(SectionSchema
|
|
4592
|
+
model: array(SectionSchema),
|
|
4598
4593
|
});
|
|
4599
4594
|
|
|
4600
4595
|
/**
|
|
@@ -56587,14 +56582,15 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
|
|
|
56587
56582
|
` } }),
|
|
56588
56583
|
accordionRoot))));
|
|
56589
56584
|
};
|
|
56590
|
-
const AccordionItem = ({ sectionId, title, children, disabled = false, icon }) => {
|
|
56585
|
+
const AccordionItem = ({ sectionId, title, subtitle, children, disabled = false, icon }) => {
|
|
56591
56586
|
const { design } = useContext(AccordionContext);
|
|
56592
56587
|
return (React__default.createElement(Item$2, { value: sectionId, disabled: disabled, className: `v-accordion-item-${design}` },
|
|
56593
56588
|
React__default.createElement(Header, { style: { margin: 0 } },
|
|
56594
56589
|
React__default.createElement(Trigger2, { className: "v-accordion-trigger" },
|
|
56595
56590
|
React__default.createElement(p$5, { align: "center", gap: "3" },
|
|
56596
56591
|
icon && (React__default.createElement("div", { style: { display: 'flex', alignItems: 'center', color: 'var(--accordion-title-color, var(--accent-9))' } }, icon)),
|
|
56597
|
-
React__default.createElement(p$d, { size: "3", weight: "bold", style: { color: 'var(--accordion-title-color, var(--gray-12))' } }, title)
|
|
56592
|
+
React__default.createElement(p$d, { size: "3", weight: "bold", style: { color: 'var(--accordion-title-color, var(--gray-12))' } }, title),
|
|
56593
|
+
React__default.createElement(p$d, { size: "2", weight: "light", style: { color: 'var(--accordion-title-color, var(--gray-12))' } }, subtitle)),
|
|
56598
56594
|
React__default.createElement(Icon, { name: "chevrondown", height: "20", width: "20", className: "v-accordion-chevron" }))),
|
|
56599
56595
|
React__default.createElement(Content2$3, { className: "v-accordion-content", style: { overflow: 'hidden' } },
|
|
56600
56596
|
React__default.createElement("div", { style: { padding: '24px 16px 24px 16px' } },
|
|
@@ -56863,6 +56859,138 @@ const rangeSliderInputType = ["range", "rangeslider", "rangeinput", "rangeslider
|
|
|
56863
56859
|
const toggleInputType = ["toggle", "switch", "toggleinput", "toggle-input", "input-toggle", "inputtoggle"];
|
|
56864
56860
|
const conditionalInputType = ["conditional", "conditionaltoggle", "conditionalcheckbox", "conditionalselect", "conditional-toggle", "conditional-select", "conditional-checkbox"];
|
|
56865
56861
|
|
|
56862
|
+
const DateTimePicker = ({ alias, inputLabel, inputtype = 'datetimepicker-outline', width = 12, newRow, placeholder = "Select date & time", isHinted, hintText, hintUrl, errorText, readOnly, className, formikContext }) => {
|
|
56863
|
+
const defaultFormikContext = useFormikContext();
|
|
56864
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
56865
|
+
if (!activeContext) {
|
|
56866
|
+
console.error(`DateTimePicker '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
56867
|
+
return null;
|
|
56868
|
+
}
|
|
56869
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
56870
|
+
const fieldValue = getIn(values, alias);
|
|
56871
|
+
const fieldTouched = getIn(touched, alias);
|
|
56872
|
+
const fieldError = getIn(errors, alias);
|
|
56873
|
+
const inputId = `${alias}FormInput`;
|
|
56874
|
+
const labelId = `${alias}InputLabel`;
|
|
56875
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
56876
|
+
const containerRef = useRef(null);
|
|
56877
|
+
const [neuVars, setNeuVars] = useState({});
|
|
56878
|
+
useEffect(() => {
|
|
56879
|
+
if (inputtype === 'datetimepicker-neumorphic' && containerRef.current) {
|
|
56880
|
+
const parentBg = getNearestParentBackground(containerRef.current.parentElement);
|
|
56881
|
+
setNeuVars({
|
|
56882
|
+
'--neu-bg': parentBg,
|
|
56883
|
+
'--neu-shadow-dark': adjustColor(parentBg, -20),
|
|
56884
|
+
'--neu-shadow-light': adjustColor(parentBg, 20),
|
|
56885
|
+
'--neu-text': 'var(--gray-12)',
|
|
56886
|
+
'--accent': 'var(--accent-9)',
|
|
56887
|
+
});
|
|
56888
|
+
}
|
|
56889
|
+
}, [inputtype]);
|
|
56890
|
+
// --- STYLES ---
|
|
56891
|
+
const getInputStyles = () => {
|
|
56892
|
+
const base = { cursor: 'pointer', transition: 'all 0.2s' };
|
|
56893
|
+
if (inputtype === 'datetimepicker-neumorphic')
|
|
56894
|
+
return Object.assign(Object.assign(Object.assign({}, base), { backgroundColor: 'var(--neu-bg)', border: 'none', boxShadow: hasError ? 'inset 2px 2px 5px var(--red-9), inset -2px -2px 5px var(--neu-shadow-light)'
|
|
56895
|
+
: 'inset 3px 3px 6px var(--neu-shadow-dark), inset -3px -3px 6px var(--neu-shadow-light)', borderRadius: '12px', height: '40px' }), neuVars);
|
|
56896
|
+
if (inputtype === 'datetimepicker-material')
|
|
56897
|
+
return Object.assign(Object.assign({}, base), { backgroundColor: 'var(--gray-2)', border: 'none', borderBottom: hasError ? '2px solid var(--red-9)' : '2px solid var(--gray-8)', borderRadius: '4px 4px 0 0' });
|
|
56898
|
+
return Object.assign(Object.assign({}, base), { backgroundColor: 'transparent', boxShadow: hasError ? '0 0 0 1px var(--red-9)' : '0 0 0 1px var(--gray-7)', borderRadius: '6px' });
|
|
56899
|
+
};
|
|
56900
|
+
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
56901
|
+
React__default.createElement(p$5, { direction: "column", gap: "2", ref: containerRef, className: className, style: { width: '100%' } },
|
|
56902
|
+
React__default.createElement("style", null, `
|
|
56903
|
+
.react-datepicker-popper { z-index: 9999 !important; }
|
|
56904
|
+
.react-datepicker {
|
|
56905
|
+
font-family: var(--default-font-family, sans-serif);
|
|
56906
|
+
border: none !important;
|
|
56907
|
+
border-radius: 12px !important;
|
|
56908
|
+
box-shadow: 0 10px 40px -10px rgba(0,0,0,0.2);
|
|
56909
|
+
background-color: var(--color-panel-solid) !important;
|
|
56910
|
+
padding: 12px;
|
|
56911
|
+
display: flex !important; /* Needed for Time column layout */
|
|
56912
|
+
}
|
|
56913
|
+
.react-datepicker__header {
|
|
56914
|
+
background-color: transparent !important;
|
|
56915
|
+
border-bottom: none !important;
|
|
56916
|
+
}
|
|
56917
|
+
.react-datepicker__day-name { color: var(--gray-9); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; }
|
|
56918
|
+
.react-datepicker__day {
|
|
56919
|
+
width: 32px; height: 32px; line-height: 32px;
|
|
56920
|
+
border-radius: 50% !important;
|
|
56921
|
+
margin: 2px !important;
|
|
56922
|
+
color: var(--gray-12);
|
|
56923
|
+
}
|
|
56924
|
+
.react-datepicker__day:hover { background-color: var(--gray-4) !important; }
|
|
56925
|
+
.react-datepicker__day--selected {
|
|
56926
|
+
background-color: var(--accent-9) !important;
|
|
56927
|
+
color: white !important;
|
|
56928
|
+
font-weight: bold;
|
|
56929
|
+
}
|
|
56930
|
+
.react-datepicker__day--keyboard-selected { background-color: var(--accent-3) !important; color: var(--accent-11) !important; }
|
|
56931
|
+
.react-datepicker__day--today { color: var(--accent-11); font-weight: 900; }
|
|
56932
|
+
|
|
56933
|
+
/* --- TIME PICKER SPECIFIC STYLES --- */
|
|
56934
|
+
.react-datepicker__time-container {
|
|
56935
|
+
border-left: 1px solid var(--gray-5) !important;
|
|
56936
|
+
width: 110px !important;
|
|
56937
|
+
background: transparent !important;
|
|
56938
|
+
}
|
|
56939
|
+
.react-datepicker__header--time {
|
|
56940
|
+
background: transparent !important;
|
|
56941
|
+
padding-top: 10px;
|
|
56942
|
+
padding-bottom: 10px;
|
|
56943
|
+
}
|
|
56944
|
+
.react-datepicker-time__header {
|
|
56945
|
+
color: var(--gray-11) !important;
|
|
56946
|
+
font-size: 0.75rem !important;
|
|
56947
|
+
text-transform: uppercase;
|
|
56948
|
+
}
|
|
56949
|
+
.react-datepicker__time-list-item {
|
|
56950
|
+
height: 32px !important;
|
|
56951
|
+
display: flex !important;
|
|
56952
|
+
align-items: center !important;
|
|
56953
|
+
justify-content: center !important;
|
|
56954
|
+
font-size: 0.9rem !important;
|
|
56955
|
+
color: var(--gray-12);
|
|
56956
|
+
}
|
|
56957
|
+
.react-datepicker__time-list-item:hover {
|
|
56958
|
+
background-color: var(--gray-4) !important;
|
|
56959
|
+
}
|
|
56960
|
+
.react-datepicker__time-list-item--selected {
|
|
56961
|
+
background-color: var(--accent-9) !important;
|
|
56962
|
+
color: white !important;
|
|
56963
|
+
font-weight: bold;
|
|
56964
|
+
}
|
|
56965
|
+
|
|
56966
|
+
/* Custom Scrollbar for Time List */
|
|
56967
|
+
.react-datepicker__time-list::-webkit-scrollbar { width: 4px; }
|
|
56968
|
+
.react-datepicker__time-list::-webkit-scrollbar-thumb { background: var(--gray-6); border-radius: 4px; }
|
|
56969
|
+
|
|
56970
|
+
/* Neumorphic Popup Overrides */
|
|
56971
|
+
${inputtype === 'datetimepicker-neumorphic' ? `
|
|
56972
|
+
.react-datepicker {
|
|
56973
|
+
background-color: var(--neu-bg) !important;
|
|
56974
|
+
box-shadow: 6px 6px 12px var(--neu-shadow-dark), -6px -6px 12px var(--neu-shadow-light);
|
|
56975
|
+
}
|
|
56976
|
+
.react-datepicker__day:hover, .react-datepicker__time-list-item:hover { box-shadow: 3px 3px 6px var(--neu-shadow-dark), -3px -3px 6px var(--neu-shadow-light); background: transparent !important; }
|
|
56977
|
+
.react-datepicker__day--selected, .react-datepicker__time-list-item--selected { box-shadow: inset 2px 2px 5px var(--neu-shadow-dark), inset -2px -2px 5px var(--neu-shadow-light); color: var(--accent) !important; background: var(--neu-bg) !important; }
|
|
56978
|
+
` : ''}
|
|
56979
|
+
`),
|
|
56980
|
+
React__default.createElement(DatePicker$1, { id: `${alias}DatePicker`, selected: (fieldValue && new Date(fieldValue)) || null, onChange: (val) => {
|
|
56981
|
+
setFieldValue(alias, val);
|
|
56982
|
+
setFieldTouched(alias, true, false);
|
|
56983
|
+
}, showTimeSelect: true, timeFormat: "HH:mm", timeIntervals: 15, dateFormat: "MMM d, yyyy h:mm aa", disabled: readOnly, placeholderText: placeholder, "aria-labelledby": labelId, customInput: React__default.createElement(u, { id: inputId, variant: "surface", style: getInputStyles() },
|
|
56984
|
+
React__default.createElement(c, null,
|
|
56985
|
+
React__default.createElement(Icon, { name: "clock", height: "16", width: "16", style: { color: 'var(--gray-10)' } }))) }),
|
|
56986
|
+
React__default.createElement("div", null,
|
|
56987
|
+
inputLabel && React__default.createElement(p$d, { id: labelId, size: "2", weight: "bold", as: "div", style: { display: 'inline' } }, inputLabel),
|
|
56988
|
+
isHinted && (React__default.createElement(e, { content: hintText || "No hint", align: "start" },
|
|
56989
|
+
React__default.createElement("a", { href: hintUrl || "#", target: "_blank", rel: "noopener noreferrer", style: { marginLeft: 6 } },
|
|
56990
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
56991
|
+
hasError && (React__default.createElement(p$d, { size: "1", color: "red", style: { display: 'block' } }, errorText || (typeof fieldError === 'string' ? fieldError : "Required field")))))));
|
|
56992
|
+
};
|
|
56993
|
+
|
|
56866
56994
|
const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice', brandColor = "#000000", onPrev, onNext, onFinish }) => {
|
|
56867
56995
|
const [dualToggled, setDualToggled] = useState(false);
|
|
56868
56996
|
const [neuVars] = useState({
|
|
@@ -56904,8 +57032,9 @@ const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice',
|
|
|
56904
57032
|
case datePickerInputType.includes(normalizedType):
|
|
56905
57033
|
return React__default.createElement(DatePicker, Object.assign({}, layoutProps, { placeholder: inputPlaceholder }));
|
|
56906
57034
|
case dateRangePickerInputType.includes(normalizedType):
|
|
57035
|
+
return React__default.createElement(DateRangePicker, Object.assign({}, layoutProps, { placeholder: inputPlaceholder }));
|
|
56907
57036
|
case dateTimePickerInputType.includes(normalizedType):
|
|
56908
|
-
return React__default.createElement(
|
|
57037
|
+
return React__default.createElement(DateTimePicker, Object.assign({}, layoutProps, { placeholder: inputPlaceholder }));
|
|
56909
57038
|
case dropdownInputType.includes(normalizedType):
|
|
56910
57039
|
return React__default.createElement(Dropdown, Object.assign({}, layoutProps, { placeholder: inputPlaceholder, inputOptions: inputOptions || [InputOptionsPlaceholder] }));
|
|
56911
57040
|
case fileInputType.includes(normalizedType):
|
|
@@ -56967,23 +57096,23 @@ const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice',
|
|
|
56967
57096
|
React__default.createElement("div", { className: "neu-indicator" })),
|
|
56968
57097
|
React__default.createElement(Icon, { name: "layers", height: "20", width: "20", color: brandColor, style: { opacity: readOnlyMode ? 0.5 : 1, cursor: 'pointer' }, onClick: () => setDualToggled(!dualToggled) })),
|
|
56969
57098
|
dualToggled ?
|
|
56970
|
-
React__default.createElement(Accordion, { defaultOpenId: ((_b = (_a = xFormModel.model) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.sectionId) ? String(xFormModel.model[0].sectionId) : '', allowMultiple: true, brandcolor: brandColor, titleColor: '#ffffff' }, xFormModel.model.map((formsection) => (React__default.createElement(AccordionItem, { key: formsection.sectionId, sectionId: String(formsection.sectionId), title: formsection.title, icon: React__default.createElement(Icon, { name: formsection.icon || "fontfamily" }) },
|
|
57099
|
+
React__default.createElement(Accordion, { defaultOpenId: ((_b = (_a = xFormModel.model) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.sectionId) ? String(xFormModel.model[0].sectionId) : '', allowMultiple: true, brandcolor: brandColor, titleColor: '#ffffff' }, xFormModel.model.map((formsection) => (React__default.createElement(AccordionItem, { key: formsection.sectionId, sectionId: String(formsection.sectionId), title: formsection.title, subtitle: formsection.subtitle ? formsection.subtitle : undefined, icon: React__default.createElement(Icon, { name: formsection.icon || "fontfamily" }) },
|
|
56971
57100
|
React__default.createElement(Row, { key: formsection.sectionId }, renderQueries(formsection.queries))))))
|
|
56972
57101
|
:
|
|
56973
57102
|
xFormModel.model.map((formsection) => (React__default.createElement(React__default.Fragment, { key: formsection.sectionId || crypto.randomUUID() },
|
|
56974
|
-
React__default.createElement(SectionTitle, { withSeparator: false, backgroundColor: brandColor, titleColor: '#FFFFFF', title: formsection.title, icon: React__default.createElement(Icon, { name: formsection.icon || "fontfamily" }) }),
|
|
57103
|
+
React__default.createElement(SectionTitle, { withSeparator: false, backgroundColor: brandColor, titleColor: '#FFFFFF', title: formsection.title, subTitle: formsection.subtitle ? formsection.subtitle : undefined, icon: React__default.createElement(Icon, { name: formsection.icon || "fontfamily" }) }),
|
|
56975
57104
|
React__default.createElement(Row, null, renderQueries(formsection.queries)))))));
|
|
56976
57105
|
case 'accordion':
|
|
56977
|
-
return (React__default.createElement(Accordion, { defaultOpenId: ((_d = (_c = xFormModel.model) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.sectionId) ? String(xFormModel.model[0].sectionId) : '', allowMultiple: true, brandcolor: brandColor, titleColor: '#ffffff' }, xFormModel.model.map((formsection) => (React__default.createElement(AccordionItem, { key: formsection.sectionId, sectionId: String(formsection.sectionId), title: formsection.title, icon: React__default.createElement(Icon, { name: formsection.icon || "fontfamily" }) },
|
|
57106
|
+
return (React__default.createElement(Accordion, { defaultOpenId: ((_d = (_c = xFormModel.model) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.sectionId) ? String(xFormModel.model[0].sectionId) : '', allowMultiple: true, brandcolor: brandColor, titleColor: '#ffffff' }, xFormModel.model.map((formsection) => (React__default.createElement(AccordionItem, { key: formsection.sectionId, sectionId: String(formsection.sectionId), title: formsection.title, subtitle: formsection.subtitle ? formsection.subtitle : undefined, icon: React__default.createElement(Icon, { name: formsection.icon || "fontfamily" }) },
|
|
56978
57107
|
React__default.createElement(Row, { key: formsection.sectionId }, renderQueries(formsection.queries)))))));
|
|
56979
57108
|
case 'codex':
|
|
56980
|
-
return (React__default.createElement(Codex, { brandColor: brandColor }, xFormModel.model.map((formsection, index, array) => (React__default.createElement(CodexItem, { key: formsection.sectionId, stepId: String(formsection.sectionId), title: formsection.title, icon: React__default.createElement(Icon, { name: formsection.icon || "fontfamily" }) },
|
|
57109
|
+
return (React__default.createElement(Codex, { brandColor: brandColor }, xFormModel.model.map((formsection, index, array) => (React__default.createElement(CodexItem, { key: formsection.sectionId, stepId: String(formsection.sectionId), title: formsection.title, subtitleDescription: formsection.subtitle ? formsection.subtitle : undefined, icon: React__default.createElement(Icon, { name: formsection.icon || "fontfamily" }) },
|
|
56981
57110
|
React__default.createElement(Row, { key: formsection.sectionId }, renderQueries(formsection.queries)),
|
|
56982
57111
|
React__default.createElement(CodexControls, { prevStepId: index > 0 ? String(array[index - 1].sectionId) : undefined, nextStepId: index < array.length - 1 ? String(array[index + 1].sectionId) : undefined, onPrev: onPrev, onNext: onNext, onFinish: onFinish }))))));
|
|
56983
57112
|
case 'codice':
|
|
56984
57113
|
default:
|
|
56985
57114
|
return (React__default.createElement(React__default.Fragment, { key: xFormModel.uuid }, xFormModel.model.map((formsection) => (React__default.createElement(React__default.Fragment, { key: formsection.sectionId || crypto.randomUUID() },
|
|
56986
|
-
React__default.createElement(SectionTitle, { withSeparator: false, backgroundColor: brandColor, titleColor: '#FFFFFF', title: formsection.title, icon: React__default.createElement(Icon, { name: String(formsection.icon) }) }),
|
|
57115
|
+
React__default.createElement(SectionTitle, { withSeparator: false, backgroundColor: brandColor, titleColor: '#FFFFFF', title: formsection.title, subTitle: formsection.subtitle ? formsection.subtitle : undefined, icon: React__default.createElement(Icon, { name: String(formsection.icon) }) }),
|
|
56987
57116
|
React__default.createElement(Row, null, renderQueries(formsection.queries)))))));
|
|
56988
57117
|
}
|
|
56989
57118
|
};
|
|
@@ -57227,14 +57356,15 @@ class VectorSigma {
|
|
|
57227
57356
|
* VΣ builder method to create a Section object in the xForm model.
|
|
57228
57357
|
* @param sectionId sectionId string for the xForm model section.
|
|
57229
57358
|
* @param title title string for the xForm model section.
|
|
57359
|
+
* @param subtitle optional subtitle string for the xForm model section.
|
|
57230
57360
|
* @param icon xForm icon name for the xForm model section.
|
|
57231
57361
|
* @example
|
|
57232
57362
|
* const xForm97 = new VectorSigma()
|
|
57233
57363
|
* .setBrand("#000000", brandLogoUrlRef, 'right')
|
|
57234
|
-
* .createSection('bio-data', 'Personal Information', 'user')
|
|
57364
|
+
* .createSection('bio-data', 'Personal Information', 'Help us learn more to deliver a bespoke experience', 'user')
|
|
57235
57365
|
*/
|
|
57236
|
-
createSection(sectionId, title, icon) {
|
|
57237
|
-
this.formObject.model.push({ sectionId, title, icon, queries: [] });
|
|
57366
|
+
createSection(sectionId, title, subtitle, icon) {
|
|
57367
|
+
this.formObject.model.push({ sectionId, title, subtitle, icon, queries: [] });
|
|
57238
57368
|
return this;
|
|
57239
57369
|
}
|
|
57240
57370
|
/**
|
|
@@ -57368,138 +57498,6 @@ class VectorSigma {
|
|
|
57368
57498
|
}
|
|
57369
57499
|
}
|
|
57370
57500
|
|
|
57371
|
-
const DateTimePicker = ({ alias, inputLabel, inputtype = 'datetimepicker-outline', width = 12, newRow, placeholder = "Select date & time", isHinted, hintText, hintUrl, errorText, readOnly, className, formikContext }) => {
|
|
57372
|
-
const defaultFormikContext = useFormikContext();
|
|
57373
|
-
const activeContext = formikContext || defaultFormikContext;
|
|
57374
|
-
if (!activeContext) {
|
|
57375
|
-
console.error(`DateTimePicker '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
57376
|
-
return null;
|
|
57377
|
-
}
|
|
57378
|
-
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
57379
|
-
const fieldValue = getIn(values, alias);
|
|
57380
|
-
const fieldTouched = getIn(touched, alias);
|
|
57381
|
-
const fieldError = getIn(errors, alias);
|
|
57382
|
-
const inputId = `${alias}FormInput`;
|
|
57383
|
-
const labelId = `${alias}InputLabel`;
|
|
57384
|
-
const hasError = Boolean(fieldTouched && fieldError);
|
|
57385
|
-
const containerRef = useRef(null);
|
|
57386
|
-
const [neuVars, setNeuVars] = useState({});
|
|
57387
|
-
useEffect(() => {
|
|
57388
|
-
if (inputtype === 'datetimepicker-neumorphic' && containerRef.current) {
|
|
57389
|
-
const parentBg = getNearestParentBackground(containerRef.current.parentElement);
|
|
57390
|
-
setNeuVars({
|
|
57391
|
-
'--neu-bg': parentBg,
|
|
57392
|
-
'--neu-shadow-dark': adjustColor(parentBg, -20),
|
|
57393
|
-
'--neu-shadow-light': adjustColor(parentBg, 20),
|
|
57394
|
-
'--neu-text': 'var(--gray-12)',
|
|
57395
|
-
'--accent': 'var(--accent-9)',
|
|
57396
|
-
});
|
|
57397
|
-
}
|
|
57398
|
-
}, [inputtype]);
|
|
57399
|
-
// --- STYLES ---
|
|
57400
|
-
const getInputStyles = () => {
|
|
57401
|
-
const base = { cursor: 'pointer', transition: 'all 0.2s' };
|
|
57402
|
-
if (inputtype === 'datetimepicker-neumorphic')
|
|
57403
|
-
return Object.assign(Object.assign(Object.assign({}, base), { backgroundColor: 'var(--neu-bg)', border: 'none', boxShadow: hasError ? 'inset 2px 2px 5px var(--red-9), inset -2px -2px 5px var(--neu-shadow-light)'
|
|
57404
|
-
: 'inset 3px 3px 6px var(--neu-shadow-dark), inset -3px -3px 6px var(--neu-shadow-light)', borderRadius: '12px', height: '40px' }), neuVars);
|
|
57405
|
-
if (inputtype === 'datetimepicker-material')
|
|
57406
|
-
return Object.assign(Object.assign({}, base), { backgroundColor: 'var(--gray-2)', border: 'none', borderBottom: hasError ? '2px solid var(--red-9)' : '2px solid var(--gray-8)', borderRadius: '4px 4px 0 0' });
|
|
57407
|
-
return Object.assign(Object.assign({}, base), { backgroundColor: 'transparent', boxShadow: hasError ? '0 0 0 1px var(--red-9)' : '0 0 0 1px var(--gray-7)', borderRadius: '6px' });
|
|
57408
|
-
};
|
|
57409
|
-
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
57410
|
-
React__default.createElement(p$5, { direction: "column", gap: "2", ref: containerRef, className: className, style: { width: '100%' } },
|
|
57411
|
-
React__default.createElement("style", null, `
|
|
57412
|
-
.react-datepicker-popper { z-index: 9999 !important; }
|
|
57413
|
-
.react-datepicker {
|
|
57414
|
-
font-family: var(--default-font-family, sans-serif);
|
|
57415
|
-
border: none !important;
|
|
57416
|
-
border-radius: 12px !important;
|
|
57417
|
-
box-shadow: 0 10px 40px -10px rgba(0,0,0,0.2);
|
|
57418
|
-
background-color: var(--color-panel-solid) !important;
|
|
57419
|
-
padding: 12px;
|
|
57420
|
-
display: flex !important; /* Needed for Time column layout */
|
|
57421
|
-
}
|
|
57422
|
-
.react-datepicker__header {
|
|
57423
|
-
background-color: transparent !important;
|
|
57424
|
-
border-bottom: none !important;
|
|
57425
|
-
}
|
|
57426
|
-
.react-datepicker__day-name { color: var(--gray-9); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; }
|
|
57427
|
-
.react-datepicker__day {
|
|
57428
|
-
width: 32px; height: 32px; line-height: 32px;
|
|
57429
|
-
border-radius: 50% !important;
|
|
57430
|
-
margin: 2px !important;
|
|
57431
|
-
color: var(--gray-12);
|
|
57432
|
-
}
|
|
57433
|
-
.react-datepicker__day:hover { background-color: var(--gray-4) !important; }
|
|
57434
|
-
.react-datepicker__day--selected {
|
|
57435
|
-
background-color: var(--accent-9) !important;
|
|
57436
|
-
color: white !important;
|
|
57437
|
-
font-weight: bold;
|
|
57438
|
-
}
|
|
57439
|
-
.react-datepicker__day--keyboard-selected { background-color: var(--accent-3) !important; color: var(--accent-11) !important; }
|
|
57440
|
-
.react-datepicker__day--today { color: var(--accent-11); font-weight: 900; }
|
|
57441
|
-
|
|
57442
|
-
/* --- TIME PICKER SPECIFIC STYLES --- */
|
|
57443
|
-
.react-datepicker__time-container {
|
|
57444
|
-
border-left: 1px solid var(--gray-5) !important;
|
|
57445
|
-
width: 110px !important;
|
|
57446
|
-
background: transparent !important;
|
|
57447
|
-
}
|
|
57448
|
-
.react-datepicker__header--time {
|
|
57449
|
-
background: transparent !important;
|
|
57450
|
-
padding-top: 10px;
|
|
57451
|
-
padding-bottom: 10px;
|
|
57452
|
-
}
|
|
57453
|
-
.react-datepicker-time__header {
|
|
57454
|
-
color: var(--gray-11) !important;
|
|
57455
|
-
font-size: 0.75rem !important;
|
|
57456
|
-
text-transform: uppercase;
|
|
57457
|
-
}
|
|
57458
|
-
.react-datepicker__time-list-item {
|
|
57459
|
-
height: 32px !important;
|
|
57460
|
-
display: flex !important;
|
|
57461
|
-
align-items: center !important;
|
|
57462
|
-
justify-content: center !important;
|
|
57463
|
-
font-size: 0.9rem !important;
|
|
57464
|
-
color: var(--gray-12);
|
|
57465
|
-
}
|
|
57466
|
-
.react-datepicker__time-list-item:hover {
|
|
57467
|
-
background-color: var(--gray-4) !important;
|
|
57468
|
-
}
|
|
57469
|
-
.react-datepicker__time-list-item--selected {
|
|
57470
|
-
background-color: var(--accent-9) !important;
|
|
57471
|
-
color: white !important;
|
|
57472
|
-
font-weight: bold;
|
|
57473
|
-
}
|
|
57474
|
-
|
|
57475
|
-
/* Custom Scrollbar for Time List */
|
|
57476
|
-
.react-datepicker__time-list::-webkit-scrollbar { width: 4px; }
|
|
57477
|
-
.react-datepicker__time-list::-webkit-scrollbar-thumb { background: var(--gray-6); border-radius: 4px; }
|
|
57478
|
-
|
|
57479
|
-
/* Neumorphic Popup Overrides */
|
|
57480
|
-
${inputtype === 'datetimepicker-neumorphic' ? `
|
|
57481
|
-
.react-datepicker {
|
|
57482
|
-
background-color: var(--neu-bg) !important;
|
|
57483
|
-
box-shadow: 6px 6px 12px var(--neu-shadow-dark), -6px -6px 12px var(--neu-shadow-light);
|
|
57484
|
-
}
|
|
57485
|
-
.react-datepicker__day:hover, .react-datepicker__time-list-item:hover { box-shadow: 3px 3px 6px var(--neu-shadow-dark), -3px -3px 6px var(--neu-shadow-light); background: transparent !important; }
|
|
57486
|
-
.react-datepicker__day--selected, .react-datepicker__time-list-item--selected { box-shadow: inset 2px 2px 5px var(--neu-shadow-dark), inset -2px -2px 5px var(--neu-shadow-light); color: var(--accent) !important; background: var(--neu-bg) !important; }
|
|
57487
|
-
` : ''}
|
|
57488
|
-
`),
|
|
57489
|
-
React__default.createElement(DatePicker$1, { id: `${alias}DatePicker`, selected: (fieldValue && new Date(fieldValue)) || null, onChange: (val) => {
|
|
57490
|
-
setFieldValue(alias, val);
|
|
57491
|
-
setFieldTouched(alias, true, false);
|
|
57492
|
-
}, showTimeSelect: true, timeFormat: "HH:mm", timeIntervals: 15, dateFormat: "MMM d, yyyy h:mm aa", disabled: readOnly, placeholderText: placeholder, "aria-labelledby": labelId, customInput: React__default.createElement(u, { id: inputId, variant: "surface", style: getInputStyles() },
|
|
57493
|
-
React__default.createElement(c, null,
|
|
57494
|
-
React__default.createElement(Icon, { name: "clock", height: "16", width: "16", style: { color: 'var(--gray-10)' } }))) }),
|
|
57495
|
-
React__default.createElement("div", null,
|
|
57496
|
-
inputLabel && React__default.createElement(p$d, { id: labelId, size: "2", weight: "bold", as: "div", style: { display: 'inline' } }, inputLabel),
|
|
57497
|
-
isHinted && (React__default.createElement(e, { content: hintText || "No hint", align: "start" },
|
|
57498
|
-
React__default.createElement("a", { href: hintUrl || "#", target: "_blank", rel: "noopener noreferrer", style: { marginLeft: 6 } },
|
|
57499
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
57500
|
-
hasError && (React__default.createElement(p$d, { size: "1", color: "red", style: { display: 'block' } }, errorText || (typeof fieldError === 'string' ? fieldError : "Required field")))))));
|
|
57501
|
-
};
|
|
57502
|
-
|
|
57503
57501
|
const safeParseUuidFormat = (typeString) => {
|
|
57504
57502
|
try {
|
|
57505
57503
|
if (!(typeString === null || typeString === void 0 ? void 0 : typeString.startsWith('uuid')))
|
|
@@ -57597,77 +57595,6 @@ const Container = (_a) => {
|
|
|
57597
57595
|
return (React__default.createElement(p$2, Object.assign({ size: "3", px: "3" }, props), children));
|
|
57598
57596
|
};
|
|
57599
57597
|
|
|
57600
|
-
// JSON defintion (schema) for xForm object
|
|
57601
|
-
const InputOptionSchema = object({
|
|
57602
|
-
optionid: number().or(uuid()),
|
|
57603
|
-
text: string(),
|
|
57604
|
-
optionvalue: string(),
|
|
57605
|
-
tag: string().optional(),
|
|
57606
|
-
score: number().or(float64()).optional(),
|
|
57607
|
-
note: string().optional(),
|
|
57608
|
-
optionurl: url().optional(),
|
|
57609
|
-
});
|
|
57610
|
-
const NestedQuerySchema = object({
|
|
57611
|
-
queryId: number().or(uuid()),
|
|
57612
|
-
inputType: string(),
|
|
57613
|
-
inputAlias: string(),
|
|
57614
|
-
inputLabel: string(),
|
|
57615
|
-
inputPlaceholder: string(),
|
|
57616
|
-
defaultValue: any().optional(),
|
|
57617
|
-
minValue: number().optional(),
|
|
57618
|
-
maxValue: number().optional(),
|
|
57619
|
-
stepValue: number().or(float64()).optional(),
|
|
57620
|
-
newRow: boolean(),
|
|
57621
|
-
inputWidth: number(),
|
|
57622
|
-
inputHeight: number().optional(),
|
|
57623
|
-
isRequired: boolean(),
|
|
57624
|
-
isHinted: boolean(),
|
|
57625
|
-
hintText: string().nullish(),
|
|
57626
|
-
hintUrl: url().nullish(),
|
|
57627
|
-
queryResponse: any().nullable(),
|
|
57628
|
-
inputOptions: array(InputOptionSchema).optional(),
|
|
57629
|
-
toggledInput: any().nullable().optional(),
|
|
57630
|
-
triggerValue: any().nullable().optional(),
|
|
57631
|
-
errorText: string().optional()
|
|
57632
|
-
});
|
|
57633
|
-
const QuerySchema = object({
|
|
57634
|
-
queryId: number().or(uuid()),
|
|
57635
|
-
inputType: string(),
|
|
57636
|
-
inputAlias: string(),
|
|
57637
|
-
inputLabel: string(),
|
|
57638
|
-
inputPlaceholder: string(),
|
|
57639
|
-
defaultValue: any().optional(),
|
|
57640
|
-
minValue: number().optional(),
|
|
57641
|
-
maxValue: number().optional(),
|
|
57642
|
-
stepValue: number().or(float64()).optional(),
|
|
57643
|
-
newRow: boolean(),
|
|
57644
|
-
inputWidth: number(),
|
|
57645
|
-
inputHeight: number().optional(),
|
|
57646
|
-
isRequired: boolean(),
|
|
57647
|
-
isHinted: boolean(),
|
|
57648
|
-
hintText: string().nullable(),
|
|
57649
|
-
hintUrl: url().nullable(),
|
|
57650
|
-
queryResponse: any().nullable(),
|
|
57651
|
-
inputOptions: array(InputOptionSchema).optional(),
|
|
57652
|
-
toggledInput: NestedQuerySchema.nullable().optional(),
|
|
57653
|
-
triggerValue: any().nullable().optional(),
|
|
57654
|
-
errorText: string().optional()
|
|
57655
|
-
});
|
|
57656
|
-
const SectionSchema = object({
|
|
57657
|
-
sectionId: number().or(string()),
|
|
57658
|
-
title: string(),
|
|
57659
|
-
icon: string().nullable(),
|
|
57660
|
-
queries: array(QuerySchema)
|
|
57661
|
-
});
|
|
57662
|
-
const xFormSchema = object({
|
|
57663
|
-
uuid: uuid(),
|
|
57664
|
-
name: string(),
|
|
57665
|
-
logo: url().nullable(),
|
|
57666
|
-
brandcolor: string().nullable(),
|
|
57667
|
-
logoPosition: string().nullable(),
|
|
57668
|
-
model: array(SectionSchema),
|
|
57669
|
-
});
|
|
57670
|
-
|
|
57671
57598
|
const parseUuidFormat = (input) => {
|
|
57672
57599
|
if (!input.toLowerCase().startsWith('uuid')) {
|
|
57673
57600
|
return [4, 4, 4, 4];
|
|
@@ -57680,4 +57607,4 @@ const parseUuidFormat = (input) => {
|
|
|
57680
57607
|
return numbers;
|
|
57681
57608
|
};
|
|
57682
57609
|
|
|
57683
|
-
export { Accordion, AccordionItem, AvatarInput, ButtonInput, CURRENCIES, CheckboxGroupInput, Codex, CodexControls, CodexItem, Column, ConditionalTrigger, Container, CreditCardInput, CurrencyInput, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File$1 as File, FileMultiple, FlagIcon, Icon, ImageOutput, Input$1 as Input, MultipleSelect, OptionSelect, PasswordInput, PhoneInput, RadioGroupInput, RangeSlider, Row, SectionTitle, SliderInput, StockInput, Teletraan1, R as Theme, N as ThemePanel, Toggle, UUIDInput, VectorSigma, normalizeXForm, parseUuidFormat, primeMatrix, useStepper
|
|
57610
|
+
export { Accordion, AccordionItem, AvatarInput, ButtonInput, CURRENCIES, CheckboxGroupInput, Codex, CodexControls, CodexItem, Column, ConditionalTrigger, Container, CreditCardInput, CurrencyInput, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File$1 as File, FileMultiple, FlagIcon, Icon, ImageOutput, Input$1 as Input, InputOptionSchema, MultipleSelect, OptionSelect, PasswordInput, PhoneInput, QuerySchema, RadioGroupInput, RangeSlider, Row, SectionSchema, SectionTitle, SliderInput, StockInput, Teletraan1, R as Theme, N as ThemePanel, Toggle, UUIDInput, VectorSigma, XFormSchema, normalizeXForm, parseUuidFormat, primeMatrix, useStepper };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export * from './layouts/row/row';
|
|
|
35
35
|
export * from './layouts/accordion/accordion';
|
|
36
36
|
export * from './layouts/codex/codex';
|
|
37
37
|
export * from './layouts/codex/codexcontrols';
|
|
38
|
-
export * from './utils/
|
|
38
|
+
export * from './utils/voltron';
|
|
39
39
|
export * from './utils/uuidparser';
|
|
40
40
|
export * from './utils/currencyconfig';
|
|
41
41
|
export * from './utils/minerva';
|
|
@@ -81,6 +81,12 @@ export interface AccordionItemProps {
|
|
|
81
81
|
* title="What is the VΣ Protocol?"
|
|
82
82
|
*/
|
|
83
83
|
title: ReactNode | string;
|
|
84
|
+
/**
|
|
85
|
+
* * The subheader or trigger text for this accordion section.
|
|
86
|
+
* * @example
|
|
87
|
+
* subtitle="Get in touch to learn more"
|
|
88
|
+
*/
|
|
89
|
+
subtitle?: ReactNode | string;
|
|
84
90
|
/**
|
|
85
91
|
* * The content revealed when the section is opened.
|
|
86
92
|
*/
|
|
@@ -99,4 +105,4 @@ export interface AccordionItemProps {
|
|
|
99
105
|
icon?: ReactNode;
|
|
100
106
|
}
|
|
101
107
|
export declare const Accordion: ({ design, defaultOpenId, allowMultiple, brandcolor, titleColor, width, newRow, className, style, children }: AccordionProps) => React.JSX.Element;
|
|
102
|
-
export declare const AccordionItem: ({ sectionId, title, children, disabled, icon }: AccordionItemProps) => React.JSX.Element;
|
|
108
|
+
export declare const AccordionItem: ({ sectionId, title, subtitle, children, disabled, icon }: AccordionItemProps) => React.JSX.Element;
|
|
@@ -35,6 +35,7 @@ export declare const QuerySchema: z.ZodType<XFormQuery>;
|
|
|
35
35
|
export declare const SectionSchema: z.ZodObject<{
|
|
36
36
|
sectionId: z.ZodString;
|
|
37
37
|
title: z.ZodString;
|
|
38
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
38
39
|
icon: z.ZodOptional<z.ZodString>;
|
|
39
40
|
queries: z.ZodArray<z.ZodType<XFormQuery, unknown, z.core.$ZodTypeInternals<XFormQuery, unknown>>>;
|
|
40
41
|
}, z.core.$strip>;
|
|
@@ -47,6 +48,7 @@ export declare const XFormSchema: z.ZodObject<{
|
|
|
47
48
|
model: z.ZodArray<z.ZodObject<{
|
|
48
49
|
sectionId: z.ZodString;
|
|
49
50
|
title: z.ZodString;
|
|
51
|
+
subtitle: z.ZodOptional<z.ZodString>;
|
|
50
52
|
icon: z.ZodOptional<z.ZodString>;
|
|
51
53
|
queries: z.ZodArray<z.ZodType<XFormQuery, unknown, z.core.$ZodTypeInternals<XFormQuery, unknown>>>;
|
|
52
54
|
}, z.core.$strip>>;
|
|
@@ -105,13 +105,14 @@ export declare class VectorSigma<T extends Record<string, any> = Record<string,
|
|
|
105
105
|
* VΣ builder method to create a Section object in the xForm model.
|
|
106
106
|
* @param sectionId sectionId string for the xForm model section.
|
|
107
107
|
* @param title title string for the xForm model section.
|
|
108
|
+
* @param subtitle optional subtitle string for the xForm model section.
|
|
108
109
|
* @param icon xForm icon name for the xForm model section.
|
|
109
110
|
* @example
|
|
110
111
|
* const xForm97 = new VectorSigma()
|
|
111
112
|
* .setBrand("#000000", brandLogoUrlRef, 'right')
|
|
112
|
-
* .createSection('bio-data', 'Personal Information', 'user')
|
|
113
|
+
* .createSection('bio-data', 'Personal Information', 'Help us learn more to deliver a bespoke experience', 'user')
|
|
113
114
|
*/
|
|
114
|
-
createSection(sectionId: string, title: string, icon?: string): this;
|
|
115
|
+
createSection(sectionId: string, title: string, subtitle?: string, icon?: string): this;
|
|
115
116
|
/**
|
|
116
117
|
* VΣ builder method to add a Query object to the xForm model section by sectionId.
|
|
117
118
|
* @param sectionId sectionId string for the target xForm model section.
|