@emeraldemperaur/vector-sigma 1.4.25 → 1.4.27
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/README.md +1 -1
- package/lib/index.cjs +142 -7
- package/lib/index.esm.js +142 -8
- package/lib/types/index.d.ts +1 -0
- package/lib/types/teletraan1.d.ts +1 -1
- package/lib/types/utils/architect.d.ts +20 -0
- package/lib/types/utils/vinci.d.ts +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ const App = () => {
|
|
|
96
96
|
|
|
97
97
|
<li><strong>🧩Exported UI Components</strong></br>
|
|
98
98
|
<p align="justify">Explicitly exported reusable form UI components with material, outline and neumorphic design variants from package entry point <code>src/index.ts</code> to enable developer-friendly use as lightweight component library.</p>
|
|
99
|
-
<p><em>Container, Row, Column, Theme, Accordion, AccordionItem, Codex, CodexItem, CodexControls, AvatarInput, ButtonInput, CheckboxGroupInput, ConditionalTrigger, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File, FileMultiple, FlagIcon, Icon, Image, Input, PasswordInput, PhoneInput, CreditCardInput, CurrencyInput, StockInput, RadioGroupInput, OptionSelect, MultipleSelect, RangeSlider, SliderInput, Toggle, SectionTitle</em></p>
|
|
99
|
+
<p><em>Container, Row, Column, Theme, Accordion, AccordionItem, Codex, CodexItem, CodexControls, AvatarInput, ButtonInput, CheckboxGroupInput, ConditionalTrigger, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File, FileMultiple, FlagIcon, Icon, Image, Input, PasswordInput, PhoneInput, CreditCardInput, CurrencyInput, StockInput, RadioGroupInput, OptionSelect, MultipleSelect, RangeSlider, SliderInput, Toggle, SectionTitle, Teletraan-1 (Render Matrix)</em></p>
|
|
100
100
|
|
|
101
101
|
```javascript
|
|
102
102
|
import { Container, Column, Row, CheckboxGroup, Dropdown, File, RangeSlider }
|
package/lib/index.cjs
CHANGED
|
@@ -12741,6 +12741,15 @@ const formatBytes = (bytes, decimals = 2) => {
|
|
|
12741
12741
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
12742
12742
|
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
|
12743
12743
|
};
|
|
12744
|
+
const InputOptionsPlaceholder = {
|
|
12745
|
+
optionid: crypto.randomUUID(),
|
|
12746
|
+
text: "",
|
|
12747
|
+
optionvalue: "",
|
|
12748
|
+
tag: "",
|
|
12749
|
+
score: 0,
|
|
12750
|
+
note: "",
|
|
12751
|
+
optionurl: ""
|
|
12752
|
+
};
|
|
12744
12753
|
|
|
12745
12754
|
const ButtonInput = (_a) => {
|
|
12746
12755
|
var { inputtype = 'button-outline', type = 'button', alias, readOnly, style, width, children, newRow, isHinted, hintText, hintUrl } = _a, props = __rest$1(_a, ["inputtype", "type", "alias", "readOnly", "style", "width", "children", "newRow", "isHinted", "hintText", "hintUrl"]);
|
|
@@ -48509,13 +48518,29 @@ const SectionTitle = ({ title, width = 12, newRow = true, size = "5", subsize =
|
|
|
48509
48518
|
} })))));
|
|
48510
48519
|
};
|
|
48511
48520
|
|
|
48512
|
-
const
|
|
48513
|
-
|
|
48514
|
-
|
|
48515
|
-
|
|
48516
|
-
|
|
48517
|
-
|
|
48518
|
-
|
|
48521
|
+
const avatarInputType = ["avatar", "avatarinput", "avatar-input", "input-avatar", "inputavatar"];
|
|
48522
|
+
const buttonInputType = ["button", "buttoninput", "button-input", "input-button", "inputbutton"];
|
|
48523
|
+
const checkboxInputType = ["checkbox", "checkboxes", "checkboxinput", "chechbox-input", "input-checkbox", "inputcheckbox"];
|
|
48524
|
+
const datePickerInputType = ["datepicker", "datepickerinput", "datepicker-input", "input-datepicker", "inputdatepicker"];
|
|
48525
|
+
const dateRangePickerInputType = ["daterangepicker", "daterangepickerinput", "daterangepicker-input", "input-daterangepicker", "inputdaterangepicker"];
|
|
48526
|
+
const dateTimePickerInputType = ["datetimepicker", "datetimepickerinput", "datetimepicker-input", "input-datetimepicker", "inputdatetimepicker"];
|
|
48527
|
+
const dropdownInputType = ["dropdown", "dropdowninput", "dropdown-input", "input-dropdown", "inputdropdown"];
|
|
48528
|
+
const fileInputType = ["file", "fileinput", "file-input", "input-file", "inputfile"];
|
|
48529
|
+
const fileMultipleInputType = ["filemultiple", "filemultipleinput", "filemultiple-input", "input-filemultiple", "inputfilemultiple"];
|
|
48530
|
+
const imageOutputType = ["image", "imageoutput", "image-output", "output-image", "outputimage"];
|
|
48531
|
+
const textInputType = ["text", "textinput", "text-input", "input-text", "inputtext"];
|
|
48532
|
+
const passwordInputType = ["password", "passwordinput", "password-input", "input-password", "inputpassword"];
|
|
48533
|
+
const phoneInputType = ["phone", "phoneinput", "phone-input", "input-phone", "inputphone"];
|
|
48534
|
+
const creditCardInputType = ["creditcard", "creditcardinput", "creditcard-input", "input-creditcard", "inputcreditcard"];
|
|
48535
|
+
const currencyInputType = ["currency", "currencyinput", "currency-input", "input-currency", "inputcurrency"];
|
|
48536
|
+
const stockInputType = ["stock", "stockinput", "stock-input", "input-stock", "inputstock"];
|
|
48537
|
+
const radioInputType = ["radio", "radioinput", "radio-input", "input-radio", "inputradio"];
|
|
48538
|
+
const selectInputType = ["select", "selectinput", "select-input", "input-select", "inputselect"];
|
|
48539
|
+
const selectMultipleInputType = ["selectmultiple", "selectmultipleinput", "selectmultiple-input", "input-selectmultiple", "inputselectmultiple"];
|
|
48540
|
+
const sliderInputType = ["slider", "sliderinput", "slider-input", "input-slider", "inputslider"];
|
|
48541
|
+
const rangeSliderInputType = ["range", "rangeslider", "rangeinput", "rangesliderinput", "rangeslider-input", "range-input", "input-rangeslider", "inputrangeslider"];
|
|
48542
|
+
const toggleInputType = ["toggle", "switch", "toggleinput", "toggle-input", "input-toggle", "inputtoggle"];
|
|
48543
|
+
const conditionalInputType = ["conditional", "conditionaltoggle", "conditionalcheckbox", "conditionalselect", "conditional-toggle", "conditional-select", "conditional-checkbox"];
|
|
48519
48544
|
|
|
48520
48545
|
const Row = ({ children, className, gap = "4" }) => {
|
|
48521
48546
|
return (React.createElement(o$6, { columns: "12", gap: gap, width: "auto", className: className }, children));
|
|
@@ -48848,6 +48873,109 @@ const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLab
|
|
|
48848
48873
|
finishLabel)))));
|
|
48849
48874
|
};
|
|
48850
48875
|
|
|
48876
|
+
const teletraan1 = (xFormModel, readOnlyMode, displayMode, brandColor = "#000000") => {
|
|
48877
|
+
JSON.stringify(xFormModel, null, 2);
|
|
48878
|
+
const inputAlphaTrion = (inputAlias, inputType, inputWidth, inputLabel, inputMinValue, inputMaxValue, defaultValue, inputOptions, stepValue, inputHeight, toggledInput, newRow, inputPlaceholder, readOnly, isHinted, hintText, hintUrl, errorText, inputUID) => {
|
|
48879
|
+
if (inputWidth == null || inputWidth > 12)
|
|
48880
|
+
inputWidth = 4;
|
|
48881
|
+
if (inputHeight == null)
|
|
48882
|
+
inputHeight = 4;
|
|
48883
|
+
if (inputUID == null)
|
|
48884
|
+
inputUID = crypto.randomUUID();
|
|
48885
|
+
if (readOnlyMode)
|
|
48886
|
+
readOnly = true;
|
|
48887
|
+
switch (true) {
|
|
48888
|
+
case avatarInputType.includes(inputType.toLocaleLowerCase()):
|
|
48889
|
+
return React.createElement(AvatarInput, { alias: inputAlias, width: inputWidth, inputLabel: inputLabel, key: inputUID, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, errorText: errorText });
|
|
48890
|
+
case buttonInputType.includes(inputType.toLocaleLowerCase()):
|
|
48891
|
+
return React.createElement(ButtonInput, { alias: inputAlias, width: inputWidth, readOnly: readOnly, newRow: newRow, children: React.createElement(React.Fragment, null, defaultValue), key: inputUID });
|
|
48892
|
+
case checkboxInputType.includes(inputType.toLocaleLowerCase()):
|
|
48893
|
+
return React.createElement(CheckboxGroupInput, { alias: inputAlias, width: inputWidth, inputLabel: inputLabel, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48894
|
+
case conditionalInputType.includes(inputType.toLocaleLowerCase()):
|
|
48895
|
+
return React.createElement(ConditionalTrigger, { alias: inputAlias, width: inputWidth, inputLabel: inputLabel, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, triggerValue: defaultValue, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText, children: toggledInput });
|
|
48896
|
+
case datePickerInputType.includes(inputType.toLocaleLowerCase()):
|
|
48897
|
+
return React.createElement(DatePicker, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48898
|
+
case dateRangePickerInputType.includes(inputType.toLocaleLowerCase()):
|
|
48899
|
+
return React.createElement(DateRangePicker, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48900
|
+
case dateTimePickerInputType.includes(inputType.toLocaleLowerCase()):
|
|
48901
|
+
return React.createElement(DateRangePicker, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48902
|
+
case dropdownInputType.includes(inputType.toLocaleLowerCase()):
|
|
48903
|
+
return React.createElement(Dropdown, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48904
|
+
case fileInputType.includes(inputType.toLocaleLowerCase()):
|
|
48905
|
+
return React.createElement(File$1, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText, preview: true });
|
|
48906
|
+
case fileMultipleInputType.includes(inputType.toLocaleLowerCase()):
|
|
48907
|
+
return React.createElement(FileMultiple, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText, preview: true });
|
|
48908
|
+
case imageOutputType.includes(inputType.toLocaleLowerCase()):
|
|
48909
|
+
return React.createElement(ImageOutput, { id: inputAlias, src: defaultValue, alt: inputPlaceholder, width: inputWidth, height: inputHeight });
|
|
48910
|
+
case textInputType.includes(inputType.toLocaleLowerCase()):
|
|
48911
|
+
return React.createElement(Input$2, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48912
|
+
case passwordInputType.includes(inputType.toLocaleLowerCase()):
|
|
48913
|
+
return React.createElement(PasswordInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48914
|
+
case phoneInputType.includes(inputType.toLocaleLowerCase()):
|
|
48915
|
+
return React.createElement(PhoneInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48916
|
+
case creditCardInputType.includes(inputType.toLocaleLowerCase()):
|
|
48917
|
+
return React.createElement(CreditCardInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48918
|
+
case currencyInputType.includes(inputType.toLocaleLowerCase()):
|
|
48919
|
+
return React.createElement(CurrencyInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48920
|
+
case stockInputType.includes(inputType.toLocaleLowerCase()):
|
|
48921
|
+
return React.createElement(StockInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, defaultvalue: defaultValue, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48922
|
+
case radioInputType.includes(inputType.toLocaleLowerCase()):
|
|
48923
|
+
return React.createElement(RadioGroupInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48924
|
+
case selectInputType.includes(inputType.toLocaleLowerCase()):
|
|
48925
|
+
return React.createElement(OptionSelect, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48926
|
+
case selectMultipleInputType.includes(inputType.toLocaleLowerCase()):
|
|
48927
|
+
return React.createElement(MultipleSelect, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48928
|
+
case sliderInputType.includes(inputType.toLocaleLowerCase()):
|
|
48929
|
+
return React.createElement(SliderInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, stepvalue: Number(stepValue), minvalue: Number(inputMinValue), maxvalue: Number(inputMaxValue), newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48930
|
+
case rangeSliderInputType.includes(inputType.toLocaleLowerCase()):
|
|
48931
|
+
return React.createElement(RangeSlider, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, stepvalue: Number(stepValue), minvalue: Number(inputMinValue), maxvalue: Number(inputMaxValue), newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48932
|
+
case toggleInputType.includes(inputType.toLocaleLowerCase()):
|
|
48933
|
+
return React.createElement(Toggle, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText, icon: defaultValue });
|
|
48934
|
+
default:
|
|
48935
|
+
return React.createElement(Input$2, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48936
|
+
}
|
|
48937
|
+
};
|
|
48938
|
+
return (React.createElement(React.Fragment, null,
|
|
48939
|
+
React.createElement(Row, null, displayMode === "dual" ?
|
|
48940
|
+
React.createElement(React.Fragment, null, "Dual Display")
|
|
48941
|
+
: displayMode === "accordion" ?
|
|
48942
|
+
React.createElement(React.Fragment, null,
|
|
48943
|
+
"Accordion Display",
|
|
48944
|
+
React.createElement(Accordion, { allowMultiple: true, brandcolor: brandColor, titleColor: '#ffffff' }, xFormModel.model.map((formsection) => (React.createElement(React.Fragment, { key: formsection.sectionId },
|
|
48945
|
+
React.createElement(AccordionItem, { key: formsection.sectionId, sectionId: String(formsection.sectionId), title: formsection.title },
|
|
48946
|
+
React.createElement(Row, { key: formsection.sectionId }, formsection.queries ?
|
|
48947
|
+
formsection.queries.map((xFormelement) => (React.createElement(React.Fragment, { key: xFormelement.queryId }, inputAlphaTrion(xFormelement.inputAlias, xFormelement.inputType, xFormelement.inputWidth, xFormelement.inputLabel, Number(xFormelement.minValue), Number(xFormelement.maxValue), xFormelement.defaultValue, [InputOptionsPlaceholder], xFormelement.stepValue, xFormelement.inputHeight, xFormelement.toggledInput ? inputAlphaTrion(xFormelement.toggledInput.inputAlias, xFormelement.toggledInput.inputType, xFormelement.toggledInput.inputWidth, xFormelement.toggledInput.inputLabel, Number(xFormelement.toggledInput.minValue), Number(xFormelement.toggledInput.maxValue), xFormelement.toggledInput.defaultValue, [InputOptionsPlaceholder], xFormelement.toggledInput.stepValue, xFormelement.toggledInput.inputHeight, null, xFormelement.toggledInput.newRow, xFormelement.toggledInput.inputPlaceholder, readOnlyMode, xFormelement.toggledInput.isHinted, xFormelement.toggledInput.hintText || "", xFormelement.toggledInput.hintUrl || "", xFormelement.toggledInput.errorText, String(xFormelement.toggledInput.queryId) || crypto.randomUUID()) : null, xFormelement.newRow, xFormelement.inputPlaceholder, readOnlyMode, xFormelement.isHinted, xFormelement.hintText || "", xFormelement.hintUrl || "", xFormelement.errorText, String(xFormelement.queryId) || crypto.randomUUID()))))
|
|
48948
|
+
: null)))))))
|
|
48949
|
+
: displayMode === "codex" ?
|
|
48950
|
+
React.createElement(React.Fragment, null,
|
|
48951
|
+
"Codex Display",
|
|
48952
|
+
React.createElement(Codex, { brandColor: brandColor }, xFormModel.model.map((formsection, index, array) => {
|
|
48953
|
+
const prevStepId = index > 0 ? String(array[index - 1].sectionId) : undefined;
|
|
48954
|
+
const nextStepId = index < array.length - 1 ? String(array[index + 1].sectionId) : undefined;
|
|
48955
|
+
return (React.createElement(CodexItem, { key: formsection.sectionId, stepId: String(formsection.sectionId), title: formsection.title },
|
|
48956
|
+
React.createElement(Row, { key: formsection.sectionId }, formsection.queries ?
|
|
48957
|
+
formsection.queries.map((xFormelement) => (React.createElement(React.Fragment, { key: xFormelement.queryId }, inputAlphaTrion(xFormelement.inputAlias, xFormelement.inputType, xFormelement.inputWidth, xFormelement.inputLabel, Number(xFormelement.minValue), Number(xFormelement.maxValue), xFormelement.defaultValue, [InputOptionsPlaceholder], xFormelement.stepValue, xFormelement.inputHeight, xFormelement.toggledInput ? inputAlphaTrion(xFormelement.toggledInput.inputAlias, xFormelement.toggledInput.inputType, xFormelement.toggledInput.inputWidth, xFormelement.toggledInput.inputLabel, Number(xFormelement.toggledInput.minValue), Number(xFormelement.toggledInput.maxValue), xFormelement.toggledInput.defaultValue, [InputOptionsPlaceholder], xFormelement.toggledInput.stepValue, xFormelement.toggledInput.inputHeight, null, xFormelement.toggledInput.newRow, xFormelement.toggledInput.inputPlaceholder, readOnlyMode, xFormelement.toggledInput.isHinted, xFormelement.toggledInput.hintText || "", xFormelement.toggledInput.hintUrl || "", xFormelement.toggledInput.errorText, String(xFormelement.toggledInput.queryId) || crypto.randomUUID()) : null, xFormelement.newRow, xFormelement.inputPlaceholder, readOnlyMode, xFormelement.isHinted, xFormelement.hintText || "", xFormelement.hintUrl || "", xFormelement.errorText, String(xFormelement.queryId) || crypto.randomUUID()))))
|
|
48958
|
+
: null),
|
|
48959
|
+
React.createElement(CodexControls, { prevStepId: prevStepId, nextStepId: nextStepId, onPrev: () => console.log(`Teletraan-1 Codex :: ${formsection.title} :: onPrev()`), onNext: () => console.log(`Teletraan-1 Codex :: ${formsection.title} :: onNext()`), onFinish: () => console.log(`Teletraan-1 Codex :: ${formsection.title} :: onFinish()`) })));
|
|
48960
|
+
})))
|
|
48961
|
+
:
|
|
48962
|
+
React.createElement(React.Fragment, null,
|
|
48963
|
+
"Codice/Script Display",
|
|
48964
|
+
React.createElement(React.Fragment, { key: xFormModel.uuid }, xFormModel.model.map((formsection) => (React.createElement(React.Fragment, { key: formsection.sectionId || crypto.randomUUID() },
|
|
48965
|
+
React.createElement(SectionTitle, { key: formsection.sectionId, title: formsection.title, icon: React.createElement(Icon, { name: String(formsection.icon) }) }),
|
|
48966
|
+
React.createElement(Row, { key: formsection.sectionId }, formsection.queries ?
|
|
48967
|
+
formsection.queries.map((xFormelement) => (React.createElement(React.Fragment, { key: xFormelement.queryId }, inputAlphaTrion(xFormelement.inputAlias, xFormelement.inputType, xFormelement.inputWidth, xFormelement.inputLabel, Number(xFormelement.minValue), Number(xFormelement.maxValue), xFormelement.defaultValue, [InputOptionsPlaceholder], xFormelement.stepValue, xFormelement.inputHeight, xFormelement.toggledInput ? inputAlphaTrion(xFormelement.toggledInput.inputAlias, xFormelement.toggledInput.inputType, xFormelement.toggledInput.inputWidth, xFormelement.toggledInput.inputLabel, Number(xFormelement.toggledInput.minValue), Number(xFormelement.toggledInput.maxValue), xFormelement.toggledInput.defaultValue, [InputOptionsPlaceholder], xFormelement.toggledInput.stepValue, xFormelement.toggledInput.inputHeight, null, xFormelement.toggledInput.newRow, xFormelement.toggledInput.inputPlaceholder, readOnlyMode, xFormelement.toggledInput.isHinted, xFormelement.toggledInput.hintText || "", xFormelement.toggledInput.hintUrl || "", xFormelement.toggledInput.errorText, String(xFormelement.toggledInput.queryId) || crypto.randomUUID()) : null, xFormelement.newRow, xFormelement.inputPlaceholder, readOnlyMode, xFormelement.isHinted, xFormelement.hintText || "", xFormelement.hintUrl || "", xFormelement.errorText, String(xFormelement.queryId) || crypto.randomUUID()))))
|
|
48968
|
+
: null)))))))));
|
|
48969
|
+
};
|
|
48970
|
+
|
|
48971
|
+
const Container = (_a) => {
|
|
48972
|
+
var { fluid, children } = _a, props = __rest$1(_a, ["fluid", "children"]);
|
|
48973
|
+
if (fluid) {
|
|
48974
|
+
return (React.createElement(p$8, { width: "100%", px: "3", className: props.className }, children));
|
|
48975
|
+
}
|
|
48976
|
+
return (React.createElement(p$2, Object.assign({ size: "3", px: "3" }, props), children));
|
|
48977
|
+
};
|
|
48978
|
+
|
|
48851
48979
|
/** A special constant with type `never` */
|
|
48852
48980
|
function $constructor(name, initializer, params) {
|
|
48853
48981
|
function init(inst, def) {
|
|
@@ -53303,8 +53431,12 @@ const NestedQuerySchema = object({
|
|
|
53303
53431
|
inputLabel: string(),
|
|
53304
53432
|
inputPlaceholder: string(),
|
|
53305
53433
|
defaultValue: any().optional(),
|
|
53434
|
+
minValue: number().optional(),
|
|
53435
|
+
maxValue: number().optional(),
|
|
53436
|
+
stepValue: number().or(float64()).optional(),
|
|
53306
53437
|
newRow: boolean(),
|
|
53307
53438
|
inputWidth: number(),
|
|
53439
|
+
inputHeight: number().optional(),
|
|
53308
53440
|
isRequired: boolean(),
|
|
53309
53441
|
isHinted: boolean(),
|
|
53310
53442
|
hintText: string().nullish(),
|
|
@@ -53327,6 +53459,7 @@ const QuerySchema = object({
|
|
|
53327
53459
|
stepValue: number().or(float64()).optional(),
|
|
53328
53460
|
newRow: boolean(),
|
|
53329
53461
|
inputWidth: number(),
|
|
53462
|
+
inputHeight: number().optional(),
|
|
53330
53463
|
isRequired: boolean(),
|
|
53331
53464
|
isHinted: boolean(),
|
|
53332
53465
|
hintText: string().nullable(),
|
|
@@ -53347,6 +53480,7 @@ const xFormSchema = object({
|
|
|
53347
53480
|
uuid: uuid(),
|
|
53348
53481
|
name: string(),
|
|
53349
53482
|
logo: string().nullable(),
|
|
53483
|
+
brandcolor: string().nullable(),
|
|
53350
53484
|
logoPosition: string().nullable(),
|
|
53351
53485
|
model: array(SectionSchema),
|
|
53352
53486
|
});
|
|
@@ -53403,6 +53537,7 @@ exports.Toggle = Toggle;
|
|
|
53403
53537
|
exports.UUIDInput = UUIDInput;
|
|
53404
53538
|
exports.parseUuidFormat = parseUuidFormat;
|
|
53405
53539
|
exports.primeMatrix = primeMatrix;
|
|
53540
|
+
exports.teletraan1 = teletraan1;
|
|
53406
53541
|
exports.useStepper = useStepper;
|
|
53407
53542
|
exports.vectorSigma = vectorSigma;
|
|
53408
53543
|
exports.xFormSchema = xFormSchema;
|
package/lib/index.esm.js
CHANGED
|
@@ -12721,6 +12721,15 @@ const formatBytes = (bytes, decimals = 2) => {
|
|
|
12721
12721
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
12722
12722
|
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
|
12723
12723
|
};
|
|
12724
|
+
const InputOptionsPlaceholder = {
|
|
12725
|
+
optionid: crypto.randomUUID(),
|
|
12726
|
+
text: "",
|
|
12727
|
+
optionvalue: "",
|
|
12728
|
+
tag: "",
|
|
12729
|
+
score: 0,
|
|
12730
|
+
note: "",
|
|
12731
|
+
optionurl: ""
|
|
12732
|
+
};
|
|
12724
12733
|
|
|
12725
12734
|
const ButtonInput = (_a) => {
|
|
12726
12735
|
var { inputtype = 'button-outline', type = 'button', alias, readOnly, style, width, children, newRow, isHinted, hintText, hintUrl } = _a, props = __rest$1(_a, ["inputtype", "type", "alias", "readOnly", "style", "width", "children", "newRow", "isHinted", "hintText", "hintUrl"]);
|
|
@@ -48489,13 +48498,29 @@ const SectionTitle = ({ title, width = 12, newRow = true, size = "5", subsize =
|
|
|
48489
48498
|
} })))));
|
|
48490
48499
|
};
|
|
48491
48500
|
|
|
48492
|
-
const
|
|
48493
|
-
|
|
48494
|
-
|
|
48495
|
-
|
|
48496
|
-
|
|
48497
|
-
|
|
48498
|
-
|
|
48501
|
+
const avatarInputType = ["avatar", "avatarinput", "avatar-input", "input-avatar", "inputavatar"];
|
|
48502
|
+
const buttonInputType = ["button", "buttoninput", "button-input", "input-button", "inputbutton"];
|
|
48503
|
+
const checkboxInputType = ["checkbox", "checkboxes", "checkboxinput", "chechbox-input", "input-checkbox", "inputcheckbox"];
|
|
48504
|
+
const datePickerInputType = ["datepicker", "datepickerinput", "datepicker-input", "input-datepicker", "inputdatepicker"];
|
|
48505
|
+
const dateRangePickerInputType = ["daterangepicker", "daterangepickerinput", "daterangepicker-input", "input-daterangepicker", "inputdaterangepicker"];
|
|
48506
|
+
const dateTimePickerInputType = ["datetimepicker", "datetimepickerinput", "datetimepicker-input", "input-datetimepicker", "inputdatetimepicker"];
|
|
48507
|
+
const dropdownInputType = ["dropdown", "dropdowninput", "dropdown-input", "input-dropdown", "inputdropdown"];
|
|
48508
|
+
const fileInputType = ["file", "fileinput", "file-input", "input-file", "inputfile"];
|
|
48509
|
+
const fileMultipleInputType = ["filemultiple", "filemultipleinput", "filemultiple-input", "input-filemultiple", "inputfilemultiple"];
|
|
48510
|
+
const imageOutputType = ["image", "imageoutput", "image-output", "output-image", "outputimage"];
|
|
48511
|
+
const textInputType = ["text", "textinput", "text-input", "input-text", "inputtext"];
|
|
48512
|
+
const passwordInputType = ["password", "passwordinput", "password-input", "input-password", "inputpassword"];
|
|
48513
|
+
const phoneInputType = ["phone", "phoneinput", "phone-input", "input-phone", "inputphone"];
|
|
48514
|
+
const creditCardInputType = ["creditcard", "creditcardinput", "creditcard-input", "input-creditcard", "inputcreditcard"];
|
|
48515
|
+
const currencyInputType = ["currency", "currencyinput", "currency-input", "input-currency", "inputcurrency"];
|
|
48516
|
+
const stockInputType = ["stock", "stockinput", "stock-input", "input-stock", "inputstock"];
|
|
48517
|
+
const radioInputType = ["radio", "radioinput", "radio-input", "input-radio", "inputradio"];
|
|
48518
|
+
const selectInputType = ["select", "selectinput", "select-input", "input-select", "inputselect"];
|
|
48519
|
+
const selectMultipleInputType = ["selectmultiple", "selectmultipleinput", "selectmultiple-input", "input-selectmultiple", "inputselectmultiple"];
|
|
48520
|
+
const sliderInputType = ["slider", "sliderinput", "slider-input", "input-slider", "inputslider"];
|
|
48521
|
+
const rangeSliderInputType = ["range", "rangeslider", "rangeinput", "rangesliderinput", "rangeslider-input", "range-input", "input-rangeslider", "inputrangeslider"];
|
|
48522
|
+
const toggleInputType = ["toggle", "switch", "toggleinput", "toggle-input", "input-toggle", "inputtoggle"];
|
|
48523
|
+
const conditionalInputType = ["conditional", "conditionaltoggle", "conditionalcheckbox", "conditionalselect", "conditional-toggle", "conditional-select", "conditional-checkbox"];
|
|
48499
48524
|
|
|
48500
48525
|
const Row = ({ children, className, gap = "4" }) => {
|
|
48501
48526
|
return (React__default.createElement(o$6, { columns: "12", gap: gap, width: "auto", className: className }, children));
|
|
@@ -48828,6 +48853,109 @@ const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLab
|
|
|
48828
48853
|
finishLabel)))));
|
|
48829
48854
|
};
|
|
48830
48855
|
|
|
48856
|
+
const teletraan1 = (xFormModel, readOnlyMode, displayMode, brandColor = "#000000") => {
|
|
48857
|
+
JSON.stringify(xFormModel, null, 2);
|
|
48858
|
+
const inputAlphaTrion = (inputAlias, inputType, inputWidth, inputLabel, inputMinValue, inputMaxValue, defaultValue, inputOptions, stepValue, inputHeight, toggledInput, newRow, inputPlaceholder, readOnly, isHinted, hintText, hintUrl, errorText, inputUID) => {
|
|
48859
|
+
if (inputWidth == null || inputWidth > 12)
|
|
48860
|
+
inputWidth = 4;
|
|
48861
|
+
if (inputHeight == null)
|
|
48862
|
+
inputHeight = 4;
|
|
48863
|
+
if (inputUID == null)
|
|
48864
|
+
inputUID = crypto.randomUUID();
|
|
48865
|
+
if (readOnlyMode)
|
|
48866
|
+
readOnly = true;
|
|
48867
|
+
switch (true) {
|
|
48868
|
+
case avatarInputType.includes(inputType.toLocaleLowerCase()):
|
|
48869
|
+
return React__default.createElement(AvatarInput, { alias: inputAlias, width: inputWidth, inputLabel: inputLabel, key: inputUID, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, errorText: errorText });
|
|
48870
|
+
case buttonInputType.includes(inputType.toLocaleLowerCase()):
|
|
48871
|
+
return React__default.createElement(ButtonInput, { alias: inputAlias, width: inputWidth, readOnly: readOnly, newRow: newRow, children: React__default.createElement(React__default.Fragment, null, defaultValue), key: inputUID });
|
|
48872
|
+
case checkboxInputType.includes(inputType.toLocaleLowerCase()):
|
|
48873
|
+
return React__default.createElement(CheckboxGroupInput, { alias: inputAlias, width: inputWidth, inputLabel: inputLabel, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48874
|
+
case conditionalInputType.includes(inputType.toLocaleLowerCase()):
|
|
48875
|
+
return React__default.createElement(ConditionalTrigger, { alias: inputAlias, width: inputWidth, inputLabel: inputLabel, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, triggerValue: defaultValue, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText, children: toggledInput });
|
|
48876
|
+
case datePickerInputType.includes(inputType.toLocaleLowerCase()):
|
|
48877
|
+
return React__default.createElement(DatePicker, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48878
|
+
case dateRangePickerInputType.includes(inputType.toLocaleLowerCase()):
|
|
48879
|
+
return React__default.createElement(DateRangePicker, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48880
|
+
case dateTimePickerInputType.includes(inputType.toLocaleLowerCase()):
|
|
48881
|
+
return React__default.createElement(DateRangePicker, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48882
|
+
case dropdownInputType.includes(inputType.toLocaleLowerCase()):
|
|
48883
|
+
return React__default.createElement(Dropdown, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48884
|
+
case fileInputType.includes(inputType.toLocaleLowerCase()):
|
|
48885
|
+
return React__default.createElement(File$1, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText, preview: true });
|
|
48886
|
+
case fileMultipleInputType.includes(inputType.toLocaleLowerCase()):
|
|
48887
|
+
return React__default.createElement(FileMultiple, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText, preview: true });
|
|
48888
|
+
case imageOutputType.includes(inputType.toLocaleLowerCase()):
|
|
48889
|
+
return React__default.createElement(ImageOutput, { id: inputAlias, src: defaultValue, alt: inputPlaceholder, width: inputWidth, height: inputHeight });
|
|
48890
|
+
case textInputType.includes(inputType.toLocaleLowerCase()):
|
|
48891
|
+
return React__default.createElement(Input$2, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48892
|
+
case passwordInputType.includes(inputType.toLocaleLowerCase()):
|
|
48893
|
+
return React__default.createElement(PasswordInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48894
|
+
case phoneInputType.includes(inputType.toLocaleLowerCase()):
|
|
48895
|
+
return React__default.createElement(PhoneInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48896
|
+
case creditCardInputType.includes(inputType.toLocaleLowerCase()):
|
|
48897
|
+
return React__default.createElement(CreditCardInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48898
|
+
case currencyInputType.includes(inputType.toLocaleLowerCase()):
|
|
48899
|
+
return React__default.createElement(CurrencyInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48900
|
+
case stockInputType.includes(inputType.toLocaleLowerCase()):
|
|
48901
|
+
return React__default.createElement(StockInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, defaultvalue: defaultValue, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48902
|
+
case radioInputType.includes(inputType.toLocaleLowerCase()):
|
|
48903
|
+
return React__default.createElement(RadioGroupInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48904
|
+
case selectInputType.includes(inputType.toLocaleLowerCase()):
|
|
48905
|
+
return React__default.createElement(OptionSelect, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48906
|
+
case selectMultipleInputType.includes(inputType.toLocaleLowerCase()):
|
|
48907
|
+
return React__default.createElement(MultipleSelect, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48908
|
+
case sliderInputType.includes(inputType.toLocaleLowerCase()):
|
|
48909
|
+
return React__default.createElement(SliderInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, stepvalue: Number(stepValue), minvalue: Number(inputMinValue), maxvalue: Number(inputMaxValue), newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48910
|
+
case rangeSliderInputType.includes(inputType.toLocaleLowerCase()):
|
|
48911
|
+
return React__default.createElement(RangeSlider, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, stepvalue: Number(stepValue), minvalue: Number(inputMinValue), maxvalue: Number(inputMaxValue), newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48912
|
+
case toggleInputType.includes(inputType.toLocaleLowerCase()):
|
|
48913
|
+
return React__default.createElement(Toggle, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText, icon: defaultValue });
|
|
48914
|
+
default:
|
|
48915
|
+
return React__default.createElement(Input$2, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, placeholder: inputPlaceholder, newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48916
|
+
}
|
|
48917
|
+
};
|
|
48918
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
48919
|
+
React__default.createElement(Row, null, displayMode === "dual" ?
|
|
48920
|
+
React__default.createElement(React__default.Fragment, null, "Dual Display")
|
|
48921
|
+
: displayMode === "accordion" ?
|
|
48922
|
+
React__default.createElement(React__default.Fragment, null,
|
|
48923
|
+
"Accordion Display",
|
|
48924
|
+
React__default.createElement(Accordion, { allowMultiple: true, brandcolor: brandColor, titleColor: '#ffffff' }, xFormModel.model.map((formsection) => (React__default.createElement(React__default.Fragment, { key: formsection.sectionId },
|
|
48925
|
+
React__default.createElement(AccordionItem, { key: formsection.sectionId, sectionId: String(formsection.sectionId), title: formsection.title },
|
|
48926
|
+
React__default.createElement(Row, { key: formsection.sectionId }, formsection.queries ?
|
|
48927
|
+
formsection.queries.map((xFormelement) => (React__default.createElement(React__default.Fragment, { key: xFormelement.queryId }, inputAlphaTrion(xFormelement.inputAlias, xFormelement.inputType, xFormelement.inputWidth, xFormelement.inputLabel, Number(xFormelement.minValue), Number(xFormelement.maxValue), xFormelement.defaultValue, [InputOptionsPlaceholder], xFormelement.stepValue, xFormelement.inputHeight, xFormelement.toggledInput ? inputAlphaTrion(xFormelement.toggledInput.inputAlias, xFormelement.toggledInput.inputType, xFormelement.toggledInput.inputWidth, xFormelement.toggledInput.inputLabel, Number(xFormelement.toggledInput.minValue), Number(xFormelement.toggledInput.maxValue), xFormelement.toggledInput.defaultValue, [InputOptionsPlaceholder], xFormelement.toggledInput.stepValue, xFormelement.toggledInput.inputHeight, null, xFormelement.toggledInput.newRow, xFormelement.toggledInput.inputPlaceholder, readOnlyMode, xFormelement.toggledInput.isHinted, xFormelement.toggledInput.hintText || "", xFormelement.toggledInput.hintUrl || "", xFormelement.toggledInput.errorText, String(xFormelement.toggledInput.queryId) || crypto.randomUUID()) : null, xFormelement.newRow, xFormelement.inputPlaceholder, readOnlyMode, xFormelement.isHinted, xFormelement.hintText || "", xFormelement.hintUrl || "", xFormelement.errorText, String(xFormelement.queryId) || crypto.randomUUID()))))
|
|
48928
|
+
: null)))))))
|
|
48929
|
+
: displayMode === "codex" ?
|
|
48930
|
+
React__default.createElement(React__default.Fragment, null,
|
|
48931
|
+
"Codex Display",
|
|
48932
|
+
React__default.createElement(Codex, { brandColor: brandColor }, xFormModel.model.map((formsection, index, array) => {
|
|
48933
|
+
const prevStepId = index > 0 ? String(array[index - 1].sectionId) : undefined;
|
|
48934
|
+
const nextStepId = index < array.length - 1 ? String(array[index + 1].sectionId) : undefined;
|
|
48935
|
+
return (React__default.createElement(CodexItem, { key: formsection.sectionId, stepId: String(formsection.sectionId), title: formsection.title },
|
|
48936
|
+
React__default.createElement(Row, { key: formsection.sectionId }, formsection.queries ?
|
|
48937
|
+
formsection.queries.map((xFormelement) => (React__default.createElement(React__default.Fragment, { key: xFormelement.queryId }, inputAlphaTrion(xFormelement.inputAlias, xFormelement.inputType, xFormelement.inputWidth, xFormelement.inputLabel, Number(xFormelement.minValue), Number(xFormelement.maxValue), xFormelement.defaultValue, [InputOptionsPlaceholder], xFormelement.stepValue, xFormelement.inputHeight, xFormelement.toggledInput ? inputAlphaTrion(xFormelement.toggledInput.inputAlias, xFormelement.toggledInput.inputType, xFormelement.toggledInput.inputWidth, xFormelement.toggledInput.inputLabel, Number(xFormelement.toggledInput.minValue), Number(xFormelement.toggledInput.maxValue), xFormelement.toggledInput.defaultValue, [InputOptionsPlaceholder], xFormelement.toggledInput.stepValue, xFormelement.toggledInput.inputHeight, null, xFormelement.toggledInput.newRow, xFormelement.toggledInput.inputPlaceholder, readOnlyMode, xFormelement.toggledInput.isHinted, xFormelement.toggledInput.hintText || "", xFormelement.toggledInput.hintUrl || "", xFormelement.toggledInput.errorText, String(xFormelement.toggledInput.queryId) || crypto.randomUUID()) : null, xFormelement.newRow, xFormelement.inputPlaceholder, readOnlyMode, xFormelement.isHinted, xFormelement.hintText || "", xFormelement.hintUrl || "", xFormelement.errorText, String(xFormelement.queryId) || crypto.randomUUID()))))
|
|
48938
|
+
: null),
|
|
48939
|
+
React__default.createElement(CodexControls, { prevStepId: prevStepId, nextStepId: nextStepId, onPrev: () => console.log(`Teletraan-1 Codex :: ${formsection.title} :: onPrev()`), onNext: () => console.log(`Teletraan-1 Codex :: ${formsection.title} :: onNext()`), onFinish: () => console.log(`Teletraan-1 Codex :: ${formsection.title} :: onFinish()`) })));
|
|
48940
|
+
})))
|
|
48941
|
+
:
|
|
48942
|
+
React__default.createElement(React__default.Fragment, null,
|
|
48943
|
+
"Codice/Script Display",
|
|
48944
|
+
React__default.createElement(React__default.Fragment, { key: xFormModel.uuid }, xFormModel.model.map((formsection) => (React__default.createElement(React__default.Fragment, { key: formsection.sectionId || crypto.randomUUID() },
|
|
48945
|
+
React__default.createElement(SectionTitle, { key: formsection.sectionId, title: formsection.title, icon: React__default.createElement(Icon, { name: String(formsection.icon) }) }),
|
|
48946
|
+
React__default.createElement(Row, { key: formsection.sectionId }, formsection.queries ?
|
|
48947
|
+
formsection.queries.map((xFormelement) => (React__default.createElement(React__default.Fragment, { key: xFormelement.queryId }, inputAlphaTrion(xFormelement.inputAlias, xFormelement.inputType, xFormelement.inputWidth, xFormelement.inputLabel, Number(xFormelement.minValue), Number(xFormelement.maxValue), xFormelement.defaultValue, [InputOptionsPlaceholder], xFormelement.stepValue, xFormelement.inputHeight, xFormelement.toggledInput ? inputAlphaTrion(xFormelement.toggledInput.inputAlias, xFormelement.toggledInput.inputType, xFormelement.toggledInput.inputWidth, xFormelement.toggledInput.inputLabel, Number(xFormelement.toggledInput.minValue), Number(xFormelement.toggledInput.maxValue), xFormelement.toggledInput.defaultValue, [InputOptionsPlaceholder], xFormelement.toggledInput.stepValue, xFormelement.toggledInput.inputHeight, null, xFormelement.toggledInput.newRow, xFormelement.toggledInput.inputPlaceholder, readOnlyMode, xFormelement.toggledInput.isHinted, xFormelement.toggledInput.hintText || "", xFormelement.toggledInput.hintUrl || "", xFormelement.toggledInput.errorText, String(xFormelement.toggledInput.queryId) || crypto.randomUUID()) : null, xFormelement.newRow, xFormelement.inputPlaceholder, readOnlyMode, xFormelement.isHinted, xFormelement.hintText || "", xFormelement.hintUrl || "", xFormelement.errorText, String(xFormelement.queryId) || crypto.randomUUID()))))
|
|
48948
|
+
: null)))))))));
|
|
48949
|
+
};
|
|
48950
|
+
|
|
48951
|
+
const Container = (_a) => {
|
|
48952
|
+
var { fluid, children } = _a, props = __rest$1(_a, ["fluid", "children"]);
|
|
48953
|
+
if (fluid) {
|
|
48954
|
+
return (React__default.createElement(p$8, { width: "100%", px: "3", className: props.className }, children));
|
|
48955
|
+
}
|
|
48956
|
+
return (React__default.createElement(p$2, Object.assign({ size: "3", px: "3" }, props), children));
|
|
48957
|
+
};
|
|
48958
|
+
|
|
48831
48959
|
/** A special constant with type `never` */
|
|
48832
48960
|
function $constructor(name, initializer, params) {
|
|
48833
48961
|
function init(inst, def) {
|
|
@@ -53283,8 +53411,12 @@ const NestedQuerySchema = object({
|
|
|
53283
53411
|
inputLabel: string(),
|
|
53284
53412
|
inputPlaceholder: string(),
|
|
53285
53413
|
defaultValue: any().optional(),
|
|
53414
|
+
minValue: number().optional(),
|
|
53415
|
+
maxValue: number().optional(),
|
|
53416
|
+
stepValue: number().or(float64()).optional(),
|
|
53286
53417
|
newRow: boolean(),
|
|
53287
53418
|
inputWidth: number(),
|
|
53419
|
+
inputHeight: number().optional(),
|
|
53288
53420
|
isRequired: boolean(),
|
|
53289
53421
|
isHinted: boolean(),
|
|
53290
53422
|
hintText: string().nullish(),
|
|
@@ -53307,6 +53439,7 @@ const QuerySchema = object({
|
|
|
53307
53439
|
stepValue: number().or(float64()).optional(),
|
|
53308
53440
|
newRow: boolean(),
|
|
53309
53441
|
inputWidth: number(),
|
|
53442
|
+
inputHeight: number().optional(),
|
|
53310
53443
|
isRequired: boolean(),
|
|
53311
53444
|
isHinted: boolean(),
|
|
53312
53445
|
hintText: string().nullable(),
|
|
@@ -53327,6 +53460,7 @@ const xFormSchema = object({
|
|
|
53327
53460
|
uuid: uuid(),
|
|
53328
53461
|
name: string(),
|
|
53329
53462
|
logo: string().nullable(),
|
|
53463
|
+
brandcolor: string().nullable(),
|
|
53330
53464
|
logoPosition: string().nullable(),
|
|
53331
53465
|
model: array(SectionSchema),
|
|
53332
53466
|
});
|
|
@@ -53343,4 +53477,4 @@ const parseUuidFormat = (input) => {
|
|
|
53343
53477
|
return numbers;
|
|
53344
53478
|
};
|
|
53345
53479
|
|
|
53346
|
-
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$2 as Input, MultipleSelect, OptionSelect, PasswordInput, PhoneInput, RadioGroupInput, RangeSlider, Row, SectionTitle, SliderInput, StockInput, R as Theme, N as ThemePanel, Toggle, UUIDInput, parseUuidFormat, primeMatrix, useStepper, vectorSigma, xFormSchema };
|
|
53480
|
+
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$2 as Input, MultipleSelect, OptionSelect, PasswordInput, PhoneInput, RadioGroupInput, RangeSlider, Row, SectionTitle, SliderInput, StockInput, R as Theme, N as ThemePanel, Toggle, UUIDInput, parseUuidFormat, primeMatrix, teletraan1, useStepper, vectorSigma, xFormSchema };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from './components/slider/slider';
|
|
|
28
28
|
export * from './components/slider/range';
|
|
29
29
|
export * from './components/toggle/toggle';
|
|
30
30
|
export * from './components/xtitle/xtitle';
|
|
31
|
+
export * from './teletraan1';
|
|
31
32
|
export * from './layouts/container/container';
|
|
32
33
|
export * from './layouts/column/column';
|
|
33
34
|
export * from './layouts/row/row';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { xForm } from 'utils/architect';
|
|
3
3
|
export type teletraan1Display = 'accordion' | 'codice' | 'codex' | 'dual';
|
|
4
|
-
export declare const teletraan1: (xFormModel: xForm, readOnlyMode: boolean, displayMode: teletraan1Display) => React.JSX.Element;
|
|
4
|
+
export declare const teletraan1: (xFormModel: xForm, readOnlyMode: boolean, displayMode: teletraan1Display, brandColor?: string) => React.JSX.Element;
|
|
@@ -14,8 +14,12 @@ declare const NestedQuerySchema: z.ZodObject<{
|
|
|
14
14
|
inputLabel: z.ZodString;
|
|
15
15
|
inputPlaceholder: z.ZodString;
|
|
16
16
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
17
|
+
minValue: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
maxValue: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
stepValue: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodFloat64]>>;
|
|
17
20
|
newRow: z.ZodBoolean;
|
|
18
21
|
inputWidth: z.ZodNumber;
|
|
22
|
+
inputHeight: z.ZodOptional<z.ZodNumber>;
|
|
19
23
|
isRequired: z.ZodBoolean;
|
|
20
24
|
isHinted: z.ZodBoolean;
|
|
21
25
|
hintText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -45,6 +49,7 @@ declare const QuerySchema: z.ZodObject<{
|
|
|
45
49
|
stepValue: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodFloat64]>>;
|
|
46
50
|
newRow: z.ZodBoolean;
|
|
47
51
|
inputWidth: z.ZodNumber;
|
|
52
|
+
inputHeight: z.ZodOptional<z.ZodNumber>;
|
|
48
53
|
isRequired: z.ZodBoolean;
|
|
49
54
|
isHinted: z.ZodBoolean;
|
|
50
55
|
hintText: z.ZodNullable<z.ZodString>;
|
|
@@ -65,8 +70,12 @@ declare const QuerySchema: z.ZodObject<{
|
|
|
65
70
|
inputLabel: z.ZodString;
|
|
66
71
|
inputPlaceholder: z.ZodString;
|
|
67
72
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
73
|
+
minValue: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
maxValue: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
stepValue: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodFloat64]>>;
|
|
68
76
|
newRow: z.ZodBoolean;
|
|
69
77
|
inputWidth: z.ZodNumber;
|
|
78
|
+
inputHeight: z.ZodOptional<z.ZodNumber>;
|
|
70
79
|
isRequired: z.ZodBoolean;
|
|
71
80
|
isHinted: z.ZodBoolean;
|
|
72
81
|
hintText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -103,6 +112,7 @@ declare const SectionSchema: z.ZodObject<{
|
|
|
103
112
|
stepValue: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodFloat64]>>;
|
|
104
113
|
newRow: z.ZodBoolean;
|
|
105
114
|
inputWidth: z.ZodNumber;
|
|
115
|
+
inputHeight: z.ZodOptional<z.ZodNumber>;
|
|
106
116
|
isRequired: z.ZodBoolean;
|
|
107
117
|
isHinted: z.ZodBoolean;
|
|
108
118
|
hintText: z.ZodNullable<z.ZodString>;
|
|
@@ -123,8 +133,12 @@ declare const SectionSchema: z.ZodObject<{
|
|
|
123
133
|
inputLabel: z.ZodString;
|
|
124
134
|
inputPlaceholder: z.ZodString;
|
|
125
135
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
136
|
+
minValue: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
maxValue: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
stepValue: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodFloat64]>>;
|
|
126
139
|
newRow: z.ZodBoolean;
|
|
127
140
|
inputWidth: z.ZodNumber;
|
|
141
|
+
inputHeight: z.ZodOptional<z.ZodNumber>;
|
|
128
142
|
isRequired: z.ZodBoolean;
|
|
129
143
|
isHinted: z.ZodBoolean;
|
|
130
144
|
hintText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -150,6 +164,7 @@ export declare const xFormSchema: z.ZodObject<{
|
|
|
150
164
|
uuid: z.ZodUUID;
|
|
151
165
|
name: z.ZodString;
|
|
152
166
|
logo: z.ZodNullable<z.ZodString>;
|
|
167
|
+
brandcolor: z.ZodNullable<z.ZodString>;
|
|
153
168
|
logoPosition: z.ZodNullable<z.ZodString>;
|
|
154
169
|
model: z.ZodArray<z.ZodObject<{
|
|
155
170
|
sectionId: z.ZodNumber;
|
|
@@ -167,6 +182,7 @@ export declare const xFormSchema: z.ZodObject<{
|
|
|
167
182
|
stepValue: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodFloat64]>>;
|
|
168
183
|
newRow: z.ZodBoolean;
|
|
169
184
|
inputWidth: z.ZodNumber;
|
|
185
|
+
inputHeight: z.ZodOptional<z.ZodNumber>;
|
|
170
186
|
isRequired: z.ZodBoolean;
|
|
171
187
|
isHinted: z.ZodBoolean;
|
|
172
188
|
hintText: z.ZodNullable<z.ZodString>;
|
|
@@ -187,8 +203,12 @@ export declare const xFormSchema: z.ZodObject<{
|
|
|
187
203
|
inputLabel: z.ZodString;
|
|
188
204
|
inputPlaceholder: z.ZodString;
|
|
189
205
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
206
|
+
minValue: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
maxValue: z.ZodOptional<z.ZodNumber>;
|
|
208
|
+
stepValue: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodFloat64]>>;
|
|
190
209
|
newRow: z.ZodBoolean;
|
|
191
210
|
inputWidth: z.ZodNumber;
|
|
211
|
+
inputHeight: z.ZodOptional<z.ZodNumber>;
|
|
192
212
|
isRequired: z.ZodBoolean;
|
|
193
213
|
isHinted: z.ZodBoolean;
|
|
194
214
|
hintText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -53,3 +53,12 @@ export interface InputOption {
|
|
|
53
53
|
*/
|
|
54
54
|
optionurl?: string;
|
|
55
55
|
}
|
|
56
|
+
export declare const InputOptionsPlaceholder: {
|
|
57
|
+
optionid: `${string}-${string}-${string}-${string}-${string}`;
|
|
58
|
+
text: string;
|
|
59
|
+
optionvalue: string;
|
|
60
|
+
tag: string;
|
|
61
|
+
score: number;
|
|
62
|
+
note: string;
|
|
63
|
+
optionurl: string;
|
|
64
|
+
};
|