@emeraldemperaur/vector-sigma 1.4.26 → 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/lib/index.cjs CHANGED
@@ -12741,8 +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
- ({
12745
- optionid: crypto.randomUUID()});
12744
+ const InputOptionsPlaceholder = {
12745
+ optionid: crypto.randomUUID(),
12746
+ text: "",
12747
+ optionvalue: "",
12748
+ tag: "",
12749
+ score: 0,
12750
+ note: "",
12751
+ optionurl: ""
12752
+ };
12746
12753
 
12747
12754
  const ButtonInput = (_a) => {
12748
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"]);
@@ -48511,13 +48518,29 @@ const SectionTitle = ({ title, width = 12, newRow = true, size = "5", subsize =
48511
48518
  } })))));
48512
48519
  };
48513
48520
 
48514
- const Container = (_a) => {
48515
- var { fluid, children } = _a, props = __rest$1(_a, ["fluid", "children"]);
48516
- if (fluid) {
48517
- return (React.createElement(p$8, { width: "100%", px: "3", className: props.className }, children));
48518
- }
48519
- return (React.createElement(p$2, Object.assign({ size: "3", px: "3" }, props), children));
48520
- };
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"];
48521
48544
 
48522
48545
  const Row = ({ children, className, gap = "4" }) => {
48523
48546
  return (React.createElement(o$6, { columns: "12", gap: gap, width: "auto", className: className }, children));
@@ -48850,6 +48873,109 @@ const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLab
48850
48873
  finishLabel)))));
48851
48874
  };
48852
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
+
48853
48979
  /** A special constant with type `never` */
48854
48980
  function $constructor(name, initializer, params) {
48855
48981
  function init(inst, def) {
@@ -53411,6 +53537,7 @@ exports.Toggle = Toggle;
53411
53537
  exports.UUIDInput = UUIDInput;
53412
53538
  exports.parseUuidFormat = parseUuidFormat;
53413
53539
  exports.primeMatrix = primeMatrix;
53540
+ exports.teletraan1 = teletraan1;
53414
53541
  exports.useStepper = useStepper;
53415
53542
  exports.vectorSigma = vectorSigma;
53416
53543
  exports.xFormSchema = xFormSchema;
package/lib/index.esm.js CHANGED
@@ -12721,8 +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
- ({
12725
- optionid: crypto.randomUUID()});
12724
+ const InputOptionsPlaceholder = {
12725
+ optionid: crypto.randomUUID(),
12726
+ text: "",
12727
+ optionvalue: "",
12728
+ tag: "",
12729
+ score: 0,
12730
+ note: "",
12731
+ optionurl: ""
12732
+ };
12726
12733
 
12727
12734
  const ButtonInput = (_a) => {
12728
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"]);
@@ -48491,13 +48498,29 @@ const SectionTitle = ({ title, width = 12, newRow = true, size = "5", subsize =
48491
48498
  } })))));
48492
48499
  };
48493
48500
 
48494
- const Container = (_a) => {
48495
- var { fluid, children } = _a, props = __rest$1(_a, ["fluid", "children"]);
48496
- if (fluid) {
48497
- return (React__default.createElement(p$8, { width: "100%", px: "3", className: props.className }, children));
48498
- }
48499
- return (React__default.createElement(p$2, Object.assign({ size: "3", px: "3" }, props), children));
48500
- };
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"];
48501
48524
 
48502
48525
  const Row = ({ children, className, gap = "4" }) => {
48503
48526
  return (React__default.createElement(o$6, { columns: "12", gap: gap, width: "auto", className: className }, children));
@@ -48830,6 +48853,109 @@ const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLab
48830
48853
  finishLabel)))));
48831
48854
  };
48832
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
+
48833
48959
  /** A special constant with type `never` */
48834
48960
  function $constructor(name, initializer, params) {
48835
48961
  function init(inst, def) {
@@ -53351,4 +53477,4 @@ const parseUuidFormat = (input) => {
53351
53477
  return numbers;
53352
53478
  };
53353
53479
 
53354
- 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 };
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emeraldemperaur/vector-sigma",
3
- "version": "1.4.26",
3
+ "version": "1.4.27",
4
4
  "description": "Dynamic Form Orchestrator: NPM Package",
5
5
  "repository": {
6
6
  "type": "git",