@emeraldemperaur/vector-sigma 1.4.28 → 1.4.30
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 +569 -227
- package/lib/index.esm.js +570 -228
- package/lib/types/components/avatar/avatar.d.ts +7 -1
- package/lib/types/components/checkbox/checkbox.d.ts +7 -1
- package/lib/types/components/conditional/conditional.d.ts +7 -1
- package/lib/types/components/datepicker/datepicker.d.ts +7 -1
- package/lib/types/components/daterangepicker/daterangepicker.d.ts +7 -1
- package/lib/types/components/datetimepicker/datetimepicker.d.ts +7 -1
- package/lib/types/components/dropdown/dropdown.d.ts +7 -1
- package/lib/types/components/file/file.d.ts +7 -1
- package/lib/types/components/file/filemultiple.d.ts +7 -1
- package/lib/types/components/input/input.d.ts +11 -5
- package/lib/types/components/input/passwordInput.d.ts +1 -1
- package/lib/types/components/input/phoneInput.d.ts +1 -1
- package/lib/types/components/input/uuidInput.d.ts +69 -1
- package/lib/types/components/input/xCreditCardInput.d.ts +1 -1
- package/lib/types/components/inputcurrency/inputcurrency.d.ts +7 -1
- package/lib/types/components/inputcurrency/stockInput.d.ts +7 -1
- package/lib/types/components/radio/radio.d.ts +7 -1
- package/lib/types/components/select/select.d.ts +7 -1
- package/lib/types/components/selectmultiple/selectmultiple.d.ts +7 -1
- package/lib/types/components/slider/range.d.ts +7 -1
- package/lib/types/components/slider/slider.d.ts +7 -1
- package/lib/types/components/toggle/toggle.d.ts +57 -51
- package/lib/types/layouts/codex/codexcontrols.d.ts +6 -1
- package/lib/types/teletraan1.d.ts +47 -3
- package/lib/types/utils/architect.d.ts +66 -58
- package/lib/types/utils/artificer.d.ts +2 -0
- package/lib/types/utils/vinci.d.ts +2 -2
- package/lib/types/utils/voltron.d.ts +54 -0
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import React__default, { useState, useLayoutEffect, forwardRef, createElement, useRef, useEffect, cloneElement, createRef, Component, useCallback, useMemo, createContext, useContext } from 'react';
|
|
3
3
|
import * as ReactDOM from 'react-dom';
|
|
4
4
|
import ReactDOM__default from 'react-dom';
|
|
5
|
-
import {
|
|
5
|
+
import { useFormikContext, getIn } from 'formik';
|
|
6
6
|
|
|
7
7
|
const primeMatrix = (name) => {
|
|
8
8
|
return `Test ${name}`;
|
|
@@ -11089,6 +11089,28 @@ var EyeOpenIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
11089
11089
|
}));
|
|
11090
11090
|
});
|
|
11091
11091
|
|
|
11092
|
+
var _excluded$27 = ["color"];
|
|
11093
|
+
var FaceIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11094
|
+
var _ref$color = _ref.color,
|
|
11095
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
11096
|
+
props = _objectWithoutPropertiesLoose$7(_ref, _excluded$27);
|
|
11097
|
+
|
|
11098
|
+
return createElement("svg", Object.assign({
|
|
11099
|
+
width: "15",
|
|
11100
|
+
height: "15",
|
|
11101
|
+
viewBox: "0 0 15 15",
|
|
11102
|
+
fill: "none",
|
|
11103
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11104
|
+
}, props, {
|
|
11105
|
+
ref: forwardedRef
|
|
11106
|
+
}), createElement("path", {
|
|
11107
|
+
d: "M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82708 7.49972C1.82708 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82708 10.6327 1.82708 7.49972ZM5.03747 9.21395C4.87949 8.98746 4.56782 8.93193 4.34133 9.08991C4.11484 9.24789 4.05931 9.55956 4.21729 9.78605C4.93926 10.8211 6.14033 11.5 7.50004 11.5C8.85974 11.5 10.0608 10.8211 10.7828 9.78605C10.9408 9.55956 10.8852 9.24789 10.6587 9.08991C10.4323 8.93193 10.1206 8.98746 9.9626 9.21395C9.41963 9.99238 8.51907 10.5 7.50004 10.5C6.481 10.5 5.58044 9.99238 5.03747 9.21395ZM5.37503 6.84998C5.85828 6.84998 6.25003 6.45815 6.25003 5.97498C6.25003 5.4918 5.85828 5.09998 5.37503 5.09998C4.89179 5.09998 4.50003 5.4918 4.50003 5.97498C4.50003 6.45815 4.89179 6.84998 5.37503 6.84998ZM10.5 5.97498C10.5 6.45815 10.1083 6.84998 9.62503 6.84998C9.14179 6.84998 8.75003 6.45815 8.75003 5.97498C8.75003 5.4918 9.14179 5.09998 9.62503 5.09998C10.1083 5.09998 10.5 5.4918 10.5 5.97498Z",
|
|
11108
|
+
fill: color,
|
|
11109
|
+
fillRule: "evenodd",
|
|
11110
|
+
clipRule: "evenodd"
|
|
11111
|
+
}));
|
|
11112
|
+
});
|
|
11113
|
+
|
|
11092
11114
|
var _excluded$29 = ["color"];
|
|
11093
11115
|
var FileIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11094
11116
|
var _ref$color = _ref.color,
|
|
@@ -11133,6 +11155,26 @@ var FileTextIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
11133
11155
|
}));
|
|
11134
11156
|
});
|
|
11135
11157
|
|
|
11158
|
+
var _excluded$2e = ["color"];
|
|
11159
|
+
var FontFamilyIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11160
|
+
var _ref$color = _ref.color,
|
|
11161
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
11162
|
+
props = _objectWithoutPropertiesLoose$7(_ref, _excluded$2e);
|
|
11163
|
+
|
|
11164
|
+
return createElement("svg", Object.assign({
|
|
11165
|
+
width: "15",
|
|
11166
|
+
height: "15",
|
|
11167
|
+
viewBox: "0 0 15 15",
|
|
11168
|
+
fill: "none",
|
|
11169
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11170
|
+
}, props, {
|
|
11171
|
+
ref: forwardedRef
|
|
11172
|
+
}), createElement("path", {
|
|
11173
|
+
d: "M2.5 4.5C2.5 3.09886 3.59886 2 5 2H12.499C12.7752 2 13 2.22386 13 2.5C13 2.77614 12.7761 3 12.5 3H8.69244L8.40509 3.85458C8.18869 4.49752 7.89401 5.37197 7.58091 6.29794C7.50259 6.52956 7.42308 6.76453 7.34332 7H8.5C8.77614 7 9 7.22386 9 7.5C9 7.77614 8.77614 8 8.5 8H7.00407C6.56724 9.28543 6.16435 10.4613 5.95799 11.0386C5.63627 11.9386 5.20712 12.4857 4.66741 12.7778C4.16335 13.0507 3.64154 13.0503 3.28378 13.05L3.25 13.05C2.94624 13.05 2.7 12.8037 2.7 12.5C2.7 12.1962 2.94624 11.95 3.25 11.95C3.64182 11.95 3.9035 11.9405 4.14374 11.8105C4.36443 11.691 4.65532 11.4148 4.92217 10.6683C5.10695 10.1514 5.45375 9.14134 5.8422 8H4.5C4.22386 8 4 7.77614 4 7.5C4 7.22386 4.22386 7 4.5 7H6.18187C6.30127 6.64785 6.42132 6.29323 6.53887 5.94559C6.85175 5.02025 7.14627 4.14631 7.36256 3.50368L7.53192 3H5C4.15114 3 3.5 3.65114 3.5 4.5C3.5 4.77614 3.27614 5 3 5C2.72386 5 2.5 4.77614 2.5 4.5Z",
|
|
11174
|
+
fill: color
|
|
11175
|
+
}));
|
|
11176
|
+
});
|
|
11177
|
+
|
|
11136
11178
|
var _excluded$2h = ["color"];
|
|
11137
11179
|
var FontSizeIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11138
11180
|
var _ref$color = _ref.color,
|
|
@@ -11610,6 +11652,28 @@ var LockOpen2Icon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
11610
11652
|
}));
|
|
11611
11653
|
});
|
|
11612
11654
|
|
|
11655
|
+
var _excluded$31 = ["color"];
|
|
11656
|
+
var LoopIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11657
|
+
var _ref$color = _ref.color,
|
|
11658
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
11659
|
+
props = _objectWithoutPropertiesLoose$7(_ref, _excluded$31);
|
|
11660
|
+
|
|
11661
|
+
return createElement("svg", Object.assign({
|
|
11662
|
+
width: "15",
|
|
11663
|
+
height: "15",
|
|
11664
|
+
viewBox: "0 0 15 15",
|
|
11665
|
+
fill: "none",
|
|
11666
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11667
|
+
}, props, {
|
|
11668
|
+
ref: forwardedRef
|
|
11669
|
+
}), createElement("path", {
|
|
11670
|
+
d: "M3.35355 1.85355C3.54882 1.65829 3.54882 1.34171 3.35355 1.14645C3.15829 0.951184 2.84171 0.951184 2.64645 1.14645L0.646447 3.14645C0.451184 3.34171 0.451184 3.65829 0.646447 3.85355L2.64645 5.85355C2.84171 6.04882 3.15829 6.04882 3.35355 5.85355C3.54882 5.65829 3.54882 5.34171 3.35355 5.14645L2.20711 4H9.5C11.433 4 13 5.567 13 7.5C13 7.77614 13.2239 8 13.5 8C13.7761 8 14 7.77614 14 7.5C14 5.01472 11.9853 3 9.5 3H2.20711L3.35355 1.85355ZM2 7.5C2 7.22386 1.77614 7 1.5 7C1.22386 7 1 7.22386 1 7.5C1 9.98528 3.01472 12 5.5 12H12.7929L11.6464 13.1464C11.4512 13.3417 11.4512 13.6583 11.6464 13.8536C11.8417 14.0488 12.1583 14.0488 12.3536 13.8536L14.3536 11.8536C14.5488 11.6583 14.5488 11.3417 14.3536 11.1464L12.3536 9.14645C12.1583 8.95118 11.8417 8.95118 11.6464 9.14645C11.4512 9.34171 11.4512 9.65829 11.6464 9.85355L12.7929 11H5.5C3.567 11 2 9.433 2 7.5Z",
|
|
11671
|
+
fill: color,
|
|
11672
|
+
fillRule: "evenodd",
|
|
11673
|
+
clipRule: "evenodd"
|
|
11674
|
+
}));
|
|
11675
|
+
});
|
|
11676
|
+
|
|
11613
11677
|
var _excluded$33 = ["color"];
|
|
11614
11678
|
var MagnifyingGlassIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11615
11679
|
var _ref$color = _ref.color,
|
|
@@ -11676,6 +11740,28 @@ var MinusCircledIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
11676
11740
|
}));
|
|
11677
11741
|
});
|
|
11678
11742
|
|
|
11743
|
+
var _excluded$39 = ["color"];
|
|
11744
|
+
var MixIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11745
|
+
var _ref$color = _ref.color,
|
|
11746
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
11747
|
+
props = _objectWithoutPropertiesLoose$7(_ref, _excluded$39);
|
|
11748
|
+
|
|
11749
|
+
return createElement("svg", Object.assign({
|
|
11750
|
+
width: "15",
|
|
11751
|
+
height: "15",
|
|
11752
|
+
viewBox: "0 0 15 15",
|
|
11753
|
+
fill: "none",
|
|
11754
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11755
|
+
}, props, {
|
|
11756
|
+
ref: forwardedRef
|
|
11757
|
+
}), createElement("path", {
|
|
11758
|
+
d: "M2.14921 3.99996C2.14921 2.97778 2.97784 2.14915 4.00002 2.14915C5.02219 2.14915 5.85083 2.97778 5.85083 3.99996C5.85083 5.02213 5.02219 5.85077 4.00002 5.85077C2.97784 5.85077 2.14921 5.02213 2.14921 3.99996ZM4.00002 1.24915C2.48079 1.24915 1.24921 2.48073 1.24921 3.99996C1.24921 5.51919 2.48079 6.75077 4.00002 6.75077C5.51925 6.75077 6.75083 5.51919 6.75083 3.99996C6.75083 2.48073 5.51925 1.24915 4.00002 1.24915ZM5.82034 11.0001L2.49998 12.8369V9.16331L5.82034 11.0001ZM2.63883 8.21159C2.17228 7.9535 1.59998 8.29093 1.59998 8.82411V13.1761C1.59998 13.7093 2.17228 14.0467 2.63883 13.7886L6.57235 11.6126C7.05389 11.3462 7.05389 10.654 6.57235 10.3876L2.63883 8.21159ZM8.30001 9.00003C8.30001 8.61343 8.61341 8.30003 9.00001 8.30003H13C13.3866 8.30003 13.7 8.61343 13.7 9.00003V13C13.7 13.3866 13.3866 13.7 13 13.7H9.00001C8.61341 13.7 8.30001 13.3866 8.30001 13V9.00003ZM9.20001 9.20003V12.8H12.8V9.20003H9.20001ZM13.4432 2.19311C13.6189 2.01737 13.6189 1.73245 13.4432 1.55671C13.2675 1.38098 12.9826 1.38098 12.8068 1.55671L11 3.36353L9.19321 1.55674C9.01748 1.381 8.73255 1.381 8.55682 1.55674C8.38108 1.73247 8.38108 2.0174 8.55682 2.19313L10.3636 3.99992L8.55682 5.80671C8.38108 5.98245 8.38108 6.26737 8.55682 6.44311C8.73255 6.61885 9.01748 6.61885 9.19321 6.44311L11 4.63632L12.8068 6.44314C12.9826 6.61887 13.2675 6.61887 13.4432 6.44314C13.6189 6.2674 13.6189 5.98247 13.4432 5.80674L11.6364 3.99992L13.4432 2.19311Z",
|
|
11759
|
+
fill: color,
|
|
11760
|
+
fillRule: "evenodd",
|
|
11761
|
+
clipRule: "evenodd"
|
|
11762
|
+
}));
|
|
11763
|
+
});
|
|
11764
|
+
|
|
11679
11765
|
var _excluded$3a = ["color"];
|
|
11680
11766
|
var MixerHorizontalIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11681
11767
|
var _ref$color = _ref.color,
|
|
@@ -12050,6 +12136,28 @@ var Share1Icon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
12050
12136
|
}));
|
|
12051
12137
|
});
|
|
12052
12138
|
|
|
12139
|
+
var _excluded$3X = ["color"];
|
|
12140
|
+
var ShuffleIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
12141
|
+
var _ref$color = _ref.color,
|
|
12142
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
12143
|
+
props = _objectWithoutPropertiesLoose$7(_ref, _excluded$3X);
|
|
12144
|
+
|
|
12145
|
+
return createElement("svg", Object.assign({
|
|
12146
|
+
width: "15",
|
|
12147
|
+
height: "15",
|
|
12148
|
+
viewBox: "0 0 15 15",
|
|
12149
|
+
fill: "none",
|
|
12150
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12151
|
+
}, props, {
|
|
12152
|
+
ref: forwardedRef
|
|
12153
|
+
}), createElement("path", {
|
|
12154
|
+
d: "M12.3536 1.14645C12.1583 0.951184 11.8417 0.951184 11.6464 1.14645C11.4512 1.34171 11.4512 1.65829 11.6464 1.85355L12.7929 3H12C10.7037 3 9.71111 3.58423 8.87248 4.38931C8.20065 5.03427 7.59349 5.85684 6.99461 6.6682C6.86287 6.84668 6.73154 7.02462 6.6 7.2C5.10874 9.18835 3.49037 11 0.5 11C0.223858 11 0 11.2239 0 11.5C0 11.7761 0.223858 12 0.5 12C4.00963 12 5.89126 9.81165 7.4 7.8C7.54367 7.60845 7.6832 7.41962 7.81996 7.23454L7.82005 7.23443L7.82006 7.23441C8.41674 6.42695 8.96069 5.69085 9.56502 5.11069C10.2889 4.41577 11.0463 4 12 4H12.7929L11.6464 5.14645C11.4512 5.34171 11.4512 5.65829 11.6464 5.85355C11.8417 6.04882 12.1583 6.04882 12.3536 5.85355L14.3536 3.85355C14.5488 3.65829 14.5488 3.34171 14.3536 3.14645L12.3536 1.14645ZM0.5 3C3.35278 3 5.12992 4.44588 6.50548 6.06746L6.3762 6.24266C6.2483 6.4161 6.12293 6.58609 6 6.75C5.96397 6.79804 5.92798 6.84581 5.892 6.89331C4.57348 5.29306 3.02637 4 0.5 4C0.223858 4 0 3.77614 0 3.5C0 3.22386 0.223858 3 0.5 3ZM8.87248 10.6107C8.37284 10.131 7.90897 9.55314 7.45767 8.95468C7.64688 8.71693 7.82704 8.48061 8 8.25L8.08987 8.12987C8.58412 8.79402 9.05288 9.39766 9.56502 9.88931C10.2889 10.5842 11.0463 11 12 11H12.7929L11.6464 9.85355C11.4512 9.65829 11.4512 9.34171 11.6464 9.14645C11.8417 8.95118 12.1583 8.95118 12.3536 9.14645L14.3536 11.1464C14.5488 11.3417 14.5488 11.6583 14.3536 11.8536L12.3536 13.8536C12.1583 14.0488 11.8417 14.0488 11.6464 13.8536C11.4512 13.6583 11.4512 13.3417 11.6464 13.1464L12.7929 12H12C10.7037 12 9.71111 11.4158 8.87248 10.6107Z",
|
|
12155
|
+
fill: color,
|
|
12156
|
+
fillRule: "evenodd",
|
|
12157
|
+
clipRule: "evenodd"
|
|
12158
|
+
}));
|
|
12159
|
+
});
|
|
12160
|
+
|
|
12053
12161
|
var _excluded$3$ = ["color"];
|
|
12054
12162
|
var SliderIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
12055
12163
|
var _ref$color = _ref.color,
|
|
@@ -12334,6 +12442,28 @@ var UploadIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
12334
12442
|
}));
|
|
12335
12443
|
});
|
|
12336
12444
|
|
|
12445
|
+
var _excluded$4S = ["color"];
|
|
12446
|
+
var VideoIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
12447
|
+
var _ref$color = _ref.color,
|
|
12448
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
12449
|
+
props = _objectWithoutPropertiesLoose$7(_ref, _excluded$4S);
|
|
12450
|
+
|
|
12451
|
+
return createElement("svg", Object.assign({
|
|
12452
|
+
width: "15",
|
|
12453
|
+
height: "15",
|
|
12454
|
+
viewBox: "0 0 15 15",
|
|
12455
|
+
fill: "none",
|
|
12456
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12457
|
+
}, props, {
|
|
12458
|
+
ref: forwardedRef
|
|
12459
|
+
}), createElement("path", {
|
|
12460
|
+
d: "M4.76447 3.12199C5.63151 3.04859 6.56082 3 7.5 3C8.43918 3 9.36849 3.04859 10.2355 3.12199C11.2796 3.21037 11.9553 3.27008 12.472 3.39203C12.9425 3.50304 13.2048 3.64976 13.4306 3.88086C13.4553 3.90618 13.4902 3.94414 13.5133 3.97092C13.7126 4.20149 13.8435 4.4887 13.918 5.03283C13.9978 5.6156 14 6.37644 14 7.52493C14 8.66026 13.9978 9.41019 13.9181 9.98538C13.8439 10.5206 13.7137 10.8061 13.5125 11.0387C13.4896 11.0651 13.4541 11.1038 13.4296 11.1287C13.2009 11.3625 12.9406 11.5076 12.4818 11.6164C11.9752 11.7365 11.3143 11.7942 10.2878 11.8797C9.41948 11.9521 8.47566 12 7.5 12C6.52434 12 5.58052 11.9521 4.7122 11.8797C3.68572 11.7942 3.02477 11.7365 2.51816 11.6164C2.05936 11.5076 1.7991 11.3625 1.57037 11.1287C1.54593 11.1038 1.51035 11.0651 1.48748 11.0387C1.28628 10.8061 1.15612 10.5206 1.08193 9.98538C1.00221 9.41019 1 8.66026 1 7.52493C1 6.37644 1.00216 5.6156 1.082 5.03283C1.15654 4.4887 1.28744 4.20149 1.48666 3.97092C1.5098 3.94414 1.54468 3.90618 1.56942 3.88086C1.7952 3.64976 2.05752 3.50304 2.52796 3.39203C3.04473 3.27008 3.7204 3.21037 4.76447 3.12199ZM0 7.52493C0 5.28296 0 4.16198 0.729985 3.31713C0.766457 3.27491 0.815139 3.22194 0.854123 3.18204C1.63439 2.38339 2.64963 2.29744 4.68012 2.12555C5.56923 2.05028 6.52724 2 7.5 2C8.47276 2 9.43077 2.05028 10.3199 2.12555C12.3504 2.29744 13.3656 2.38339 14.1459 3.18204C14.1849 3.22194 14.2335 3.27491 14.27 3.31713C15 4.16198 15 5.28296 15 7.52493C15 9.74012 15 10.8477 14.2688 11.6929C14.2326 11.7348 14.1832 11.7885 14.1444 11.8281C13.3629 12.6269 12.3655 12.71 10.3709 12.8763C9.47971 12.9505 8.50782 13 7.5 13C6.49218 13 5.52028 12.9505 4.62915 12.8763C2.63446 12.71 1.63712 12.6269 0.855558 11.8281C0.816844 11.7885 0.767442 11.7348 0.731221 11.6929C0 10.8477 0 9.74012 0 7.52493ZM5.25 5.38264C5.25 5.20225 5.43522 5.08124 5.60041 5.15369L10.428 7.27105C10.6274 7.35853 10.6274 7.64147 10.428 7.72895L5.60041 9.84631C5.43522 9.91876 5.25 9.79775 5.25 9.61736V5.38264Z",
|
|
12461
|
+
fill: color,
|
|
12462
|
+
fillRule: "evenodd",
|
|
12463
|
+
clipRule: "evenodd"
|
|
12464
|
+
}));
|
|
12465
|
+
});
|
|
12466
|
+
|
|
12337
12467
|
var _excluded$4Y = ["color"];
|
|
12338
12468
|
var ZoomInIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
12339
12469
|
var _ref$color = _ref.color,
|
|
@@ -12487,6 +12617,7 @@ const iconMap = {
|
|
|
12487
12617
|
zoomout: ZoomOutIcon,
|
|
12488
12618
|
mixerhorizontal: MixerHorizontalIcon,
|
|
12489
12619
|
mixervertical: MixerVerticalIcon,
|
|
12620
|
+
mix: MixIcon,
|
|
12490
12621
|
archive: ArchiveIcon,
|
|
12491
12622
|
crumpledpaper: CrumpledPaperIcon,
|
|
12492
12623
|
stopwatch: StopwatchIcon,
|
|
@@ -12498,7 +12629,12 @@ const iconMap = {
|
|
|
12498
12629
|
mobile: MobileIcon,
|
|
12499
12630
|
enterfullscreen: EnterFullScreenIcon,
|
|
12500
12631
|
exitfullscreen: ExitFullScreenIcon,
|
|
12501
|
-
copy: CopyIcon
|
|
12632
|
+
copy: CopyIcon,
|
|
12633
|
+
face: FaceIcon,
|
|
12634
|
+
fontfamily: FontFamilyIcon,
|
|
12635
|
+
video: VideoIcon,
|
|
12636
|
+
shuffle: ShuffleIcon,
|
|
12637
|
+
loop: LoopIcon
|
|
12502
12638
|
};
|
|
12503
12639
|
const Icon = (_a) => {
|
|
12504
12640
|
var { name } = _a, props = __rest$1(_a, ["name"]);
|
|
@@ -12576,22 +12712,30 @@ const getStyles$1 = (inputtype, shape, hasError) => {
|
|
|
12576
12712
|
return Object.assign(Object.assign(Object.assign({}, base), { borderRadius }), designStyles);
|
|
12577
12713
|
};
|
|
12578
12714
|
const AvatarInput = (_a) => {
|
|
12579
|
-
var { inputtype = 'avatar-outline', alias, readOnly, width, inputLabel, shape = 'circle', size = 120, newRow, isHinted, hintText, hintUrl, errorText, style, className, accept = 'image/*' } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "shape", "size", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "style", "className", "accept"]);
|
|
12580
|
-
const
|
|
12581
|
-
const
|
|
12715
|
+
var { inputtype = 'avatar-outline', alias, readOnly, width, inputLabel, shape = 'circle', size = 120, newRow, isHinted, hintText, hintUrl, errorText, style, className, accept = 'image/*', formikContext } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "shape", "size", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "style", "className", "accept", "formikContext"]);
|
|
12716
|
+
const defaultFormikContext = useFormikContext();
|
|
12717
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
12718
|
+
if (!activeContext) {
|
|
12719
|
+
console.error(`AvatarInput '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
12720
|
+
return null;
|
|
12721
|
+
}
|
|
12722
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
12723
|
+
const fieldValue = getIn(values, alias);
|
|
12724
|
+
const fieldTouched = getIn(touched, alias);
|
|
12725
|
+
const fieldError = getIn(errors, alias);
|
|
12582
12726
|
const inputRef = useRef(null);
|
|
12583
12727
|
const [previewUrl, setPreviewUrl] = useState(null);
|
|
12584
12728
|
const inputId = `${alias}FormInput` || crypto.randomUUID();
|
|
12585
12729
|
const errorId = `${alias}-error`;
|
|
12586
|
-
const hasError =
|
|
12730
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
12587
12731
|
useEffect(() => {
|
|
12588
12732
|
let objectUrl = null;
|
|
12589
|
-
if (
|
|
12590
|
-
objectUrl = URL.createObjectURL(
|
|
12733
|
+
if (fieldValue instanceof File) {
|
|
12734
|
+
objectUrl = URL.createObjectURL(fieldValue);
|
|
12591
12735
|
setPreviewUrl(objectUrl);
|
|
12592
12736
|
}
|
|
12593
|
-
else if (typeof
|
|
12594
|
-
setPreviewUrl(
|
|
12737
|
+
else if (typeof fieldValue === 'string' && fieldValue) {
|
|
12738
|
+
setPreviewUrl(fieldValue);
|
|
12595
12739
|
}
|
|
12596
12740
|
else {
|
|
12597
12741
|
setPreviewUrl(null);
|
|
@@ -12601,20 +12745,20 @@ const AvatarInput = (_a) => {
|
|
|
12601
12745
|
URL.revokeObjectURL(objectUrl);
|
|
12602
12746
|
}
|
|
12603
12747
|
};
|
|
12604
|
-
}, [
|
|
12748
|
+
}, [fieldValue]);
|
|
12605
12749
|
const handleFileChange = (e) => {
|
|
12606
12750
|
var _a;
|
|
12607
12751
|
const file = (_a = e.currentTarget.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
12608
12752
|
if (file) {
|
|
12609
|
-
|
|
12753
|
+
setFieldValue(alias, file);
|
|
12610
12754
|
}
|
|
12611
|
-
|
|
12755
|
+
setFieldTouched(alias, true, false);
|
|
12612
12756
|
if (inputRef.current)
|
|
12613
12757
|
inputRef.current.value = '';
|
|
12614
12758
|
};
|
|
12615
12759
|
const handleRemove = (e) => {
|
|
12616
12760
|
e.stopPropagation();
|
|
12617
|
-
|
|
12761
|
+
setFieldValue(alias, null);
|
|
12618
12762
|
};
|
|
12619
12763
|
const containerStyles = getStyles$1(inputtype, shape, !!hasError);
|
|
12620
12764
|
const iconColor = inputtype === 'avatar-neumorphic' ? '#555' : 'var(--gray-10)';
|
|
@@ -12728,7 +12872,7 @@ const InputOptionsPlaceholder = {
|
|
|
12728
12872
|
tag: "",
|
|
12729
12873
|
score: 0,
|
|
12730
12874
|
note: "",
|
|
12731
|
-
|
|
12875
|
+
optionUrl: ""
|
|
12732
12876
|
};
|
|
12733
12877
|
|
|
12734
12878
|
const ButtonInput = (_a) => {
|
|
@@ -12826,11 +12970,19 @@ const ButtonInput = (_a) => {
|
|
|
12826
12970
|
};
|
|
12827
12971
|
|
|
12828
12972
|
const CheckboxGroupInput = (_a) => {
|
|
12829
|
-
var { inputtype = 'checkbox-outline', alias, readOnly, width, inputLabel, style, inputOptions, newRow, isHinted, hintText, hintUrl, errorText, direction = 'row', columns, className } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "style", "inputOptions", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "direction", "columns", "className"]);
|
|
12830
|
-
const
|
|
12831
|
-
const
|
|
12832
|
-
|
|
12833
|
-
|
|
12973
|
+
var { inputtype = 'checkbox-outline', alias, readOnly, width, inputLabel, style, inputOptions, newRow, isHinted, hintText, hintUrl, errorText, direction = 'row', columns, className, formikContext } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "style", "inputOptions", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "direction", "columns", "className", "formikContext"]);
|
|
12974
|
+
const defaultFormikContext = useFormikContext();
|
|
12975
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
12976
|
+
if (!activeContext) {
|
|
12977
|
+
console.error(`CheckboxGroupInput '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
12978
|
+
return null;
|
|
12979
|
+
}
|
|
12980
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
12981
|
+
const fieldValue = getIn(values, alias);
|
|
12982
|
+
const fieldTouched = getIn(touched, alias);
|
|
12983
|
+
const fieldError = getIn(errors, alias);
|
|
12984
|
+
const currentValues = (Array.isArray(fieldValue) ? fieldValue : []);
|
|
12985
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
12834
12986
|
const containerRef = useRef(null);
|
|
12835
12987
|
const [neuVars, setNeuVars] = useState({});
|
|
12836
12988
|
const inputId = `${alias}FormInput` || crypto.randomUUID();
|
|
@@ -12880,13 +13032,13 @@ const CheckboxGroupInput = (_a) => {
|
|
|
12880
13032
|
` } })),
|
|
12881
13033
|
React__default.createElement(o$6, { columns: columns || (direction === 'row' ? 'repeat(auto-fit, minmax(100px, 1fr))' : '1'), gap: "3", style: neuVars }, inputOptions.map((inputoption) => {
|
|
12882
13034
|
const isChecked = currentValues.some(val => String(val) === String(inputoption.optionvalue));
|
|
12883
|
-
return (React__default.createElement(p$d, { as: "label", key: inputoption.optionvalue || crypto.randomUUID(), size: "2", style: {
|
|
13035
|
+
return (React__default.createElement(p$d, { as: "label", key: String(inputoption.optionvalue) || crypto.randomUUID(), size: "2", style: {
|
|
12884
13036
|
display: 'flex',
|
|
12885
13037
|
alignItems: 'center',
|
|
12886
13038
|
gap: '8px',
|
|
12887
13039
|
cursor: 'pointer'
|
|
12888
13040
|
} },
|
|
12889
|
-
React__default.createElement(c$2, { name: alias, id: `${alias}FormInput${inputoption.optionid}`, "aria-describedby": `${alias}InputLabel${inputoption.optionid}`, disabled: readOnly, value: inputoption.optionvalue, checked: isChecked, onCheckedChange: (checked) => handleCheckedChange(checked, inputoption.optionvalue), variant: inputtype === 'checkbox-outline' ? 'soft' : 'surface', className: inputtype === 'checkbox-neumorphic' ? 'neu-checkbox' : '', style: Object.assign({}, (inputtype === 'checkbox-outline' ? {
|
|
13041
|
+
React__default.createElement(c$2, { name: alias, id: `${alias}FormInput${inputoption.optionid}`, "aria-describedby": `${alias}InputLabel${inputoption.optionid}`, disabled: readOnly, value: String(inputoption.optionvalue), checked: isChecked, onCheckedChange: (checked) => handleCheckedChange(checked, String(inputoption.optionvalue)), variant: inputtype === 'checkbox-outline' ? 'soft' : 'surface', className: inputtype === 'checkbox-neumorphic' ? 'neu-checkbox' : '', style: Object.assign({}, (inputtype === 'checkbox-outline' ? {
|
|
12890
13042
|
border: isChecked ? '2px solid var(--accent-9)' : '2px solid var(--gray-8)',
|
|
12891
13043
|
backgroundColor: 'transparent'
|
|
12892
13044
|
} : {})) }),
|
|
@@ -12933,33 +13085,41 @@ const getDesignStyles = (inputtype, isOpen) => {
|
|
|
12933
13085
|
return Object.assign(Object.assign({}, base), { backgroundColor: 'transparent', border: '1px solid var(--gray-6)', borderLeft: isOpen ? '4px solid var(--accent-9)' : '1px solid var(--gray-6)' });
|
|
12934
13086
|
};
|
|
12935
13087
|
const ConditionalTrigger = (_a) => {
|
|
12936
|
-
var { alias, readOnly, width, placeholder = '', inputLabel, inputtype = 'conditionaltoggle-outline', triggerValue = true, inputOptions = [], children, newRow, isHinted, hintText, hintUrl, errorText, style, className } = _a; __rest$1(_a, ["alias", "readOnly", "width", "placeholder", "inputLabel", "inputtype", "triggerValue", "inputOptions", "children", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "style", "className"]);
|
|
12937
|
-
const
|
|
12938
|
-
const
|
|
13088
|
+
var { alias, readOnly, width, placeholder = '', inputLabel, inputtype = 'conditionaltoggle-outline', triggerValue = true, inputOptions = [], children, newRow, isHinted, hintText, hintUrl, errorText, style, className, formikContext } = _a; __rest$1(_a, ["alias", "readOnly", "width", "placeholder", "inputLabel", "inputtype", "triggerValue", "inputOptions", "children", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "style", "className", "formikContext"]);
|
|
13089
|
+
const defaultFormikContext = useFormikContext();
|
|
13090
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
13091
|
+
if (!activeContext) {
|
|
13092
|
+
console.error(`ConditionalTrigger '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
13093
|
+
return null;
|
|
13094
|
+
}
|
|
13095
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
13096
|
+
const fieldValue = getIn(values, alias);
|
|
13097
|
+
const fieldTouched = getIn(touched, alias);
|
|
13098
|
+
const fieldError = getIn(errors, alias);
|
|
12939
13099
|
const inputId = `${alias}FormInput` || crypto.randomUUID();
|
|
12940
13100
|
const errorId = `${alias}-error`;
|
|
12941
13101
|
// Trigger (Equality) Logic :: If current Field value === trigger value
|
|
12942
|
-
const isOpen =
|
|
13102
|
+
const isOpen = fieldValue === triggerValue;
|
|
12943
13103
|
const handleChange = (val) => {
|
|
12944
|
-
|
|
12945
|
-
|
|
13104
|
+
setFieldValue(alias, val);
|
|
13105
|
+
setFieldTouched(alias, true, false);
|
|
12946
13106
|
};
|
|
12947
13107
|
const isNeumorphic = inputtype.includes('neumorphic');
|
|
12948
|
-
const hasError =
|
|
13108
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
12949
13109
|
const renderTrigger = () => {
|
|
12950
13110
|
switch (true) {
|
|
12951
13111
|
case inputtype.includes('conditionalcheckbox'):
|
|
12952
13112
|
return (React__default.createElement(p$5, { align: "center", gap: "2", style: { cursor: 'pointer' } },
|
|
12953
|
-
React__default.createElement(c$2, { name: alias, disabled: readOnly, checked:
|
|
13113
|
+
React__default.createElement(c$2, { name: alias, disabled: readOnly, checked: fieldValue === true, onCheckedChange: (checked) => handleChange(!!checked), id: inputId })));
|
|
12954
13114
|
case inputtype.includes('conditionalselect'):
|
|
12955
13115
|
return (React__default.createElement(p$5, { direction: "column", gap: "1", style: { width: '100%' } },
|
|
12956
|
-
React__default.createElement(C$1, { name: alias, disabled: readOnly, value:
|
|
13116
|
+
React__default.createElement(C$1, { name: alias, disabled: readOnly, value: fieldValue, defaultValue: placeholder || "", onValueChange: handleChange },
|
|
12957
13117
|
React__default.createElement(u$1, { id: inputId, variant: isNeumorphic ? 'soft' : 'surface', style: { width: '100%' } }),
|
|
12958
|
-
React__default.createElement(g, null, inputOptions.map((inputoption) => (React__default.createElement(v, { key: inputoption.optionvalue || crypto.randomUUID(), value: inputoption.optionvalue }, inputoption.text)))))));
|
|
13118
|
+
React__default.createElement(g, null, inputOptions.map((inputoption) => (React__default.createElement(v, { key: String(inputoption.optionvalue) || crypto.randomUUID(), value: String(inputoption.optionvalue) }, inputoption.text)))))));
|
|
12959
13119
|
case inputtype.includes('conditionaltoggle'):
|
|
12960
13120
|
default:
|
|
12961
13121
|
return (React__default.createElement(p$5, { justify: "between", align: "center", style: { width: '100%' } },
|
|
12962
|
-
React__default.createElement(i$1, { id: inputId, name: alias, disabled: readOnly, checked:
|
|
13122
|
+
React__default.createElement(i$1, { id: inputId, name: alias, disabled: readOnly, checked: fieldValue === true, onCheckedChange: (checked) => handleChange(!!checked), variant: isNeumorphic ? 'soft' : 'surface' })));
|
|
12963
13123
|
}
|
|
12964
13124
|
};
|
|
12965
13125
|
const containerStyle = getDesignStyles(inputtype, isOpen);
|
|
@@ -12982,7 +13142,7 @@ const ConditionalTrigger = (_a) => {
|
|
|
12982
13142
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
12983
13143
|
hasError ?
|
|
12984
13144
|
React__default.createElement(React__default.Fragment, null,
|
|
12985
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, typeof
|
|
13145
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, typeof fieldError === 'string' ? React__default.createElement(React__default.Fragment, null, errorText || "Required field")
|
|
12986
13146
|
: 'Invalid file selection')) : null))));
|
|
12987
13147
|
};
|
|
12988
13148
|
|
|
@@ -26617,11 +26777,19 @@ var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
|
|
|
26617
26777
|
var css_248z = "@charset \"UTF-8\";.react-datepicker__month-read-view--down-arrow,.react-datepicker__month-year-read-view--down-arrow,.react-datepicker__navigation-icon:before,.react-datepicker__year-read-view--down-arrow{border-color:#ccc;border-style:solid;border-width:3px 3px 0 0;content:\"\";display:block;height:9px;position:absolute;top:6px;width:9px}.react-datepicker__sr-only{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.react-datepicker-wrapper{border:0;display:inline-block;padding:0}.react-datepicker{background-color:#fff;border:1px solid #aeaeae;border-radius:.3rem;color:#000;display:inline-block;font-family:Helvetica Neue,helvetica,arial,sans-serif;font-size:.8rem;line-height:normal;position:relative}.react-datepicker--time-only .react-datepicker__time-container{border-left:0}.react-datepicker--time-only .react-datepicker__time,.react-datepicker--time-only .react-datepicker__time-box{border-bottom-left-radius:.375em;border-bottom-right-radius:.375em}.react-datepicker-popper{line-height:0;z-index:1}.react-datepicker-popper .react-datepicker__triangle{stroke:#aeaeae}.react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle{fill:#f0f0f0;color:#f0f0f0}.react-datepicker-popper--header-bottom[data-placement^=bottom] .react-datepicker__triangle,.react-datepicker-popper--header-middle[data-placement^=bottom] .react-datepicker__triangle,.react-datepicker-popper[data-placement^=top] .react-datepicker__triangle{fill:#fff;color:#fff}.react-datepicker-popper--header-bottom[data-placement^=top] .react-datepicker__triangle{fill:#f0f0f0;color:#f0f0f0}.react-datepicker__header{background-color:#f0f0f0;border-bottom:1px solid #aeaeae;border-top-left-radius:.3rem;padding:8px 0;position:relative;text-align:center}.react-datepicker__header--time{padding-bottom:8px;padding-left:5px;padding-right:5px}.react-datepicker__header--time:not(.react-datepicker__header--time--only){border-top-left-radius:0}.react-datepicker__header:not(.react-datepicker__header--has-time-select,.react-datepicker__header--middle,.react-datepicker__header--bottom){border-top-right-radius:.3rem}.react-datepicker__header--middle{border-radius:0;border-top:1px solid #aeaeae;margin-top:4px}.react-datepicker__header--bottom{border-bottom:none;border-radius:0 0 .3rem .3rem;border-top:1px solid #aeaeae}.react-datepicker__header-wrapper{position:relative}.react-datepicker__header-wrapper .react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button){right:2px}.react-datepicker__month-dropdown-container--scroll,.react-datepicker__month-dropdown-container--select,.react-datepicker__month-year-dropdown-container--scroll,.react-datepicker__month-year-dropdown-container--select,.react-datepicker__year-dropdown-container--scroll,.react-datepicker__year-dropdown-container--select{display:inline-block;margin:0 15px}.react-datepicker__month-select,.react-datepicker__month-year-select,.react-datepicker__year-select{background-color:transparent;border:1px solid #aeaeae;border-radius:.3rem;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;margin-top:5px;padding:2px 5px}.react-datepicker__month-select:focus-visible,.react-datepicker__month-year-select:focus-visible,.react-datepicker__year-select:focus-visible{outline:1px auto}.react-datepicker-time__header,.react-datepicker-year-header,.react-datepicker__current-month{color:#000;font-size:.944rem;font-weight:700;margin-top:0}h2.react-datepicker__current-month{margin:0;padding:0}.react-datepicker-time__header{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.react-datepicker__navigation{align-items:center;background:none;border:none;cursor:pointer;display:flex;height:32px;justify-content:center;overflow:hidden;padding:0;position:absolute;text-align:center;text-indent:-999em;top:2px;width:32px;z-index:1}.react-datepicker__navigation--previous{left:2px}.react-datepicker__navigation--next{right:2px}.react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button){right:85px}.react-datepicker__navigation--years{display:block;margin-left:auto;margin-right:auto;position:relative;top:0}.react-datepicker__navigation--years-previous{top:4px}.react-datepicker__navigation--years-upcoming{top:-4px}.react-datepicker__navigation:hover :before{border-color:#a6a6a6}.react-datepicker__navigation-icon{font-size:20px;position:relative;top:-1px;width:0}.react-datepicker__navigation-icon--next{left:-2px}.react-datepicker__navigation-icon--next:before{left:-7px;transform:rotate(45deg)}.react-datepicker__navigation-icon--previous{right:-2px}.react-datepicker__navigation-icon--previous:before{right:-7px;transform:rotate(225deg)}.react-datepicker__month-container{float:left}.react-datepicker__year{margin:.5em;text-align:center}.react-datepicker__year-wrapper{display:flex;flex-wrap:wrap;max-width:180px}.react-datepicker__year .react-datepicker__year-text{display:inline-block;margin:2px;width:5em}.react-datepicker__month{margin:.5em;text-align:center}.react-datepicker__month .react-datepicker__month-text,.react-datepicker__month .react-datepicker__quarter-text{display:inline-block;margin:2px;width:5em}.react-datepicker__input-time-container{clear:both;float:left;margin:5px 0 10px 15px;text-align:left;width:100%}.react-datepicker__input-time-container .react-datepicker-time__caption,.react-datepicker__input-time-container .react-datepicker-time__input-container{display:inline-block}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input{display:inline-block;margin-left:10px}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input{width:auto}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]{-moz-appearance:textfield}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__delimiter{display:inline-block;margin-left:5px}.react-datepicker__time-container{border-left:1px solid #aeaeae;float:right;width:85px}.react-datepicker__time-container--with-today-button{border:1px solid #aeaeae;border-radius:.375em;display:inline;position:absolute;right:-87px;top:0}.react-datepicker__time-container .react-datepicker__time{background:#fff;border-bottom-right-radius:.375em;position:relative}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box{border-bottom-right-radius:.375em;margin:0 auto;overflow-x:hidden;text-align:center;width:85px}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list{box-sizing:content-box;height:calc(195px + 1.0625em);list-style:none;margin:0;overflow-y:scroll;padding-left:0;padding-right:0;width:100%}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item{height:30px;padding:5px 10px;white-space:nowrap}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover{background-color:#f0f0f0;cursor:pointer}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected{background-color:#216ba5;color:#fff;font-weight:700}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover{background-color:#216ba5}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled{color:#ccc}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled:hover{background-color:transparent;cursor:default}.react-datepicker__week-number{color:#ccc;display:inline-block;line-height:2.125em;margin:.208em;text-align:center;width:2.125em}.react-datepicker__week-number.react-datepicker__week-number--clickable{cursor:pointer}.react-datepicker__week-number.react-datepicker__week-number--clickable:not(.react-datepicker__week-number--selected):hover{background-color:#f0f0f0;border-radius:.3rem}.react-datepicker__week-number--selected{background-color:#216ba5;border-radius:.3rem;color:#fff}.react-datepicker__week-number--selected:hover{background-color:#1d5d90}.react-datepicker__day-names{margin-bottom:-8px;text-align:center;white-space:nowrap}.react-datepicker__week{white-space:nowrap}.react-datepicker__day,.react-datepicker__day-name,.react-datepicker__time-name{color:#000;display:inline-block;line-height:2.125em;margin:.208em;text-align:center;width:2.125em}.react-datepicker__day--disabled,.react-datepicker__day-name--disabled,.react-datepicker__time-name--disabled{color:#ccc;cursor:default}.react-datepicker__day,.react-datepicker__month-text,.react-datepicker__quarter-text,.react-datepicker__year-text{cursor:pointer}.react-datepicker__day:not([aria-disabled=true]):hover,.react-datepicker__month-text:not([aria-disabled=true]):hover,.react-datepicker__quarter-text:not([aria-disabled=true]):hover,.react-datepicker__year-text:not([aria-disabled=true]):hover{background-color:#f0f0f0;border-radius:.3rem}.react-datepicker__day--today,.react-datepicker__month-text--today,.react-datepicker__quarter-text--today,.react-datepicker__year-text--today{font-weight:700}.react-datepicker__day--highlighted,.react-datepicker__month-text--highlighted,.react-datepicker__quarter-text--highlighted,.react-datepicker__year-text--highlighted{background-color:#3dcc4a;border-radius:.3rem;color:#fff}.react-datepicker__day--highlighted:not([aria-disabled=true]):hover,.react-datepicker__month-text--highlighted:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--highlighted:not([aria-disabled=true]):hover,.react-datepicker__year-text--highlighted:not([aria-disabled=true]):hover{background-color:#32be3f}.react-datepicker__day--highlighted-custom-1,.react-datepicker__month-text--highlighted-custom-1,.react-datepicker__quarter-text--highlighted-custom-1,.react-datepicker__year-text--highlighted-custom-1{color:#f0f}.react-datepicker__day--highlighted-custom-2,.react-datepicker__month-text--highlighted-custom-2,.react-datepicker__quarter-text--highlighted-custom-2,.react-datepicker__year-text--highlighted-custom-2{color:green}.react-datepicker__day--holidays,.react-datepicker__month-text--holidays,.react-datepicker__quarter-text--holidays,.react-datepicker__year-text--holidays{background-color:#ff6803;border-radius:.3rem;color:#fff;position:relative}.react-datepicker__day--holidays .overlay,.react-datepicker__month-text--holidays .overlay,.react-datepicker__quarter-text--holidays .overlay,.react-datepicker__year-text--holidays .overlay{background-color:#333;border-radius:4px;bottom:100%;color:#fff;left:50%;opacity:0;padding:4px;position:absolute;transform:translateX(-50%);transition:visibility 0s,opacity .3s ease-in-out;visibility:hidden;white-space:nowrap}.react-datepicker__day--holidays:not([aria-disabled=true]):hover,.react-datepicker__month-text--holidays:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--holidays:not([aria-disabled=true]):hover,.react-datepicker__year-text--holidays:not([aria-disabled=true]):hover{background-color:#cf5300}.react-datepicker__day--holidays:hover .overlay,.react-datepicker__month-text--holidays:hover .overlay,.react-datepicker__quarter-text--holidays:hover .overlay,.react-datepicker__year-text--holidays:hover .overlay{opacity:1;visibility:visible}.react-datepicker__day--in-range,.react-datepicker__day--in-selecting-range,.react-datepicker__day--selected,.react-datepicker__month-text--in-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__month-text--selected,.react-datepicker__quarter-text--in-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__quarter-text--selected,.react-datepicker__year-text--in-range,.react-datepicker__year-text--in-selecting-range,.react-datepicker__year-text--selected{background-color:#216ba5;border-radius:.3rem;color:#fff}.react-datepicker__day--in-range:not([aria-disabled=true]):hover,.react-datepicker__day--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__day--selected:not([aria-disabled=true]):hover,.react-datepicker__month-text--in-range:not([aria-disabled=true]):hover,.react-datepicker__month-text--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__month-text--selected:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--in-range:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--selected:not([aria-disabled=true]):hover,.react-datepicker__year-text--in-range:not([aria-disabled=true]):hover,.react-datepicker__year-text--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__year-text--selected:not([aria-disabled=true]):hover{background-color:#1d5d90}.react-datepicker__day--keyboard-selected,.react-datepicker__month-text--keyboard-selected,.react-datepicker__quarter-text--keyboard-selected,.react-datepicker__year-text--keyboard-selected{background-color:#bad9f1;border-radius:.3rem;color:#000}.react-datepicker__day--keyboard-selected:not([aria-disabled=true]):hover,.react-datepicker__month-text--keyboard-selected:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--keyboard-selected:not([aria-disabled=true]):hover,.react-datepicker__year-text--keyboard-selected:not([aria-disabled=true]):hover{background-color:#1d5d90;color:#fff}.react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range),.react-datepicker__month-text--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range),.react-datepicker__quarter-text--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range),.react-datepicker__year-text--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range){background-color:rgba(33,107,165,.5)}.react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__month--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__month--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__month--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range){background-color:#f0f0f0;color:#000}.react-datepicker__day--disabled,.react-datepicker__month-text--disabled,.react-datepicker__quarter-text--disabled,.react-datepicker__year-text--disabled{color:#ccc;cursor:default}.react-datepicker__day--disabled .overlay,.react-datepicker__month-text--disabled .overlay,.react-datepicker__quarter-text--disabled .overlay,.react-datepicker__year-text--disabled .overlay{background-color:#333;border-radius:4px;bottom:70%;color:#fff;left:50%;opacity:0;padding:4px;position:absolute;transform:translateX(-50%);transition:visibility 0s,opacity .3s ease-in-out;visibility:hidden;white-space:nowrap}.react-datepicker__input-container{display:inline-block;position:relative;width:100%}.react-datepicker__input-container .react-datepicker__calendar-icon{box-sizing:content-box;padding:.625em;position:absolute}.react-datepicker__view-calendar-icon input{padding:6px 10px 5px 25px}.react-datepicker__month-read-view,.react-datepicker__month-year-read-view,.react-datepicker__year-read-view{border:1px solid transparent;border-radius:.3rem;position:relative}.react-datepicker__month-read-view:hover,.react-datepicker__month-year-read-view:hover,.react-datepicker__year-read-view:hover{cursor:pointer}.react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,.react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,.react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow,.react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,.react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,.react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow{border-top-color:#b3b3b3}.react-datepicker__month-read-view--down-arrow,.react-datepicker__month-year-read-view--down-arrow,.react-datepicker__year-read-view--down-arrow{right:-16px;top:0;transform:rotate(135deg)}.react-datepicker__month-dropdown,.react-datepicker__month-year-dropdown,.react-datepicker__year-dropdown{background-color:#f0f0f0;border:1px solid #aeaeae;border-radius:.3rem;left:25%;position:absolute;text-align:center;top:30px;width:50%;z-index:1}.react-datepicker__month-dropdown:hover,.react-datepicker__month-year-dropdown:hover,.react-datepicker__year-dropdown:hover{cursor:pointer}.react-datepicker__month-dropdown--scrollable,.react-datepicker__month-year-dropdown--scrollable,.react-datepicker__year-dropdown--scrollable{height:150px;overflow-y:scroll}.react-datepicker__month-option,.react-datepicker__month-year-option,.react-datepicker__year-option{display:block;line-height:20px;margin-left:auto;margin-right:auto;width:100%}.react-datepicker__month-option:first-of-type,.react-datepicker__month-year-option:first-of-type,.react-datepicker__year-option:first-of-type{border-top-left-radius:.3rem;border-top-right-radius:.3rem}.react-datepicker__month-option:last-of-type,.react-datepicker__month-year-option:last-of-type,.react-datepicker__year-option:last-of-type{border-bottom-left-radius:.3rem;border-bottom-right-radius:.3rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-datepicker__month-option:hover,.react-datepicker__month-year-option:hover,.react-datepicker__year-option:hover{background-color:#ccc}.react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming,.react-datepicker__month-year-option:hover .react-datepicker__navigation--years-upcoming,.react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming{border-bottom-color:#b3b3b3}.react-datepicker__month-option:hover .react-datepicker__navigation--years-previous,.react-datepicker__month-year-option:hover .react-datepicker__navigation--years-previous,.react-datepicker__year-option:hover .react-datepicker__navigation--years-previous{border-top-color:#b3b3b3}.react-datepicker__month-option--selected,.react-datepicker__month-year-option--selected,.react-datepicker__year-option--selected{left:15px;position:absolute}.react-datepicker__close-icon{background-color:transparent;border:0;cursor:pointer;display:table-cell;height:100%;outline:0;padding:0 6px 0 0;position:absolute;right:0;top:0;vertical-align:middle}.react-datepicker__close-icon:after{background-color:#216ba5;border-radius:50%;color:#fff;content:\"×\";cursor:pointer;display:table-cell;font-size:12px;height:16px;line-height:1;padding:2px;text-align:center;vertical-align:middle;width:16px}.react-datepicker__close-icon--disabled{cursor:default}.react-datepicker__close-icon--disabled:after{background-color:#ccc;cursor:default}.react-datepicker__today-button{background:#f0f0f0;border-top:1px solid #aeaeae;clear:left;cursor:pointer;font-weight:700;padding:5px 0;text-align:center}.react-datepicker__portal{align-items:center;background-color:rgba(0,0,0,.8);display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:2147483647}.react-datepicker__children-container{height:auto;margin:.5em;padding-left:.25em;padding-right:.25em;width:17.25em}.react-datepicker__aria-live{border:0;clip-path:circle(0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.react-datepicker__calendar-icon{height:1em;vertical-align:-.125em;width:1em}.react-datepicker-popper-offset{margin-top:-.7em}";
|
|
26618
26778
|
styleInject(css_248z);
|
|
26619
26779
|
|
|
26620
|
-
const DatePicker = ({ alias, inputLabel, inputtype = 'datepicker-outline', width = 12, newRow, placeholder = "Select date", isHinted, hintText, hintUrl, errorText, readOnly, className }) => {
|
|
26621
|
-
const
|
|
26622
|
-
const
|
|
26780
|
+
const DatePicker = ({ alias, inputLabel, inputtype = 'datepicker-outline', width = 12, newRow, placeholder = "Select date", isHinted, hintText, hintUrl, errorText, readOnly, className, formikContext }) => {
|
|
26781
|
+
const defaultFormikContext = useFormikContext();
|
|
26782
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
26783
|
+
if (!activeContext) {
|
|
26784
|
+
console.error(`DatePicker '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
26785
|
+
return null;
|
|
26786
|
+
}
|
|
26787
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
26788
|
+
const fieldValue = getIn(values, alias);
|
|
26789
|
+
const fieldTouched = getIn(touched, alias);
|
|
26790
|
+
const fieldError = getIn(errors, alias);
|
|
26623
26791
|
const inputId = `${alias}FormInput` || crypto.randomUUID();
|
|
26624
|
-
const hasError = Boolean(
|
|
26792
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
26625
26793
|
const containerRef = useRef(null);
|
|
26626
26794
|
const [neuVars, setNeuVars] = useState({});
|
|
26627
26795
|
useEffect(() => {
|
|
@@ -26687,9 +26855,9 @@ const DatePicker = ({ alias, inputLabel, inputtype = 'datepicker-outline', width
|
|
|
26687
26855
|
.react-datepicker__day--selected { box-shadow: inset 2px 2px 5px var(--neu-shadow-dark), inset -2px -2px 5px var(--neu-shadow-light); color: var(--accent) !important; background: var(--neu-bg) !important; }
|
|
26688
26856
|
` : ''}
|
|
26689
26857
|
`),
|
|
26690
|
-
React__default.createElement(DatePicker$1, { id: `${alias}DatePicker`, selected: (
|
|
26858
|
+
React__default.createElement(DatePicker$1, { id: `${alias}DatePicker`, selected: (fieldValue && new Date(fieldValue)) || null, onChange: (val) => {
|
|
26691
26859
|
setFieldValue(alias, val);
|
|
26692
|
-
setFieldTouched(alias, true);
|
|
26860
|
+
setFieldTouched(alias, true, false);
|
|
26693
26861
|
}, disabled: readOnly, placeholderText: placeholder, dateFormat: "MMM d, yyyy", customInput: React__default.createElement(u, { id: inputId, variant: "surface", style: getInputStyles() },
|
|
26694
26862
|
React__default.createElement(c, null,
|
|
26695
26863
|
React__default.createElement(Icon, { name: "calendar", height: "16", width: "16", style: { color: 'var(--gray-10)' } }))) }),
|
|
@@ -26698,16 +26866,24 @@ const DatePicker = ({ alias, inputLabel, inputtype = 'datepicker-outline', width
|
|
|
26698
26866
|
isHinted && (React__default.createElement(e, { content: hintText || "No hint", align: "start" },
|
|
26699
26867
|
React__default.createElement("a", { href: hintUrl || "#", target: "_blank", rel: "noopener noreferrer", style: { marginLeft: 6 } },
|
|
26700
26868
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
26701
|
-
hasError && React__default.createElement(p$d, { size: "1", color: "red", style: { display: 'block' } }, errorText ||
|
|
26869
|
+
hasError && React__default.createElement(p$d, { size: "1", color: "red", style: { display: 'block' } }, errorText || fieldError)))));
|
|
26702
26870
|
};
|
|
26703
26871
|
|
|
26704
|
-
const DateRangePicker = ({ alias, inputLabel, inputtype = 'daterangepicker-outline', width = 12, newRow, placeholder = "Select date range", isHinted, hintText, hintUrl, errorText, readOnly, className }) => {
|
|
26705
|
-
const
|
|
26706
|
-
const
|
|
26707
|
-
|
|
26872
|
+
const DateRangePicker = ({ alias, inputLabel, inputtype = 'daterangepicker-outline', width = 12, newRow, placeholder = "Select date range", isHinted, hintText, hintUrl, errorText, readOnly, className, formikContext }) => {
|
|
26873
|
+
const defaultFormikContext = useFormikContext();
|
|
26874
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
26875
|
+
if (!activeContext) {
|
|
26876
|
+
console.error(`DateRangePicker '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
26877
|
+
return null;
|
|
26878
|
+
}
|
|
26879
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
26880
|
+
const fieldValue = getIn(values, alias);
|
|
26881
|
+
const fieldTouched = getIn(touched, alias);
|
|
26882
|
+
const fieldError = getIn(errors, alias);
|
|
26883
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
26708
26884
|
const inputId = `${alias}FormInput` || crypto.randomUUID();
|
|
26709
26885
|
const getDates = () => {
|
|
26710
|
-
const val =
|
|
26886
|
+
const val = fieldValue;
|
|
26711
26887
|
if (!val)
|
|
26712
26888
|
return [null, null];
|
|
26713
26889
|
if (typeof val === 'object' && 'from' in val) {
|
|
@@ -26815,7 +26991,7 @@ const DateRangePicker = ({ alias, inputLabel, inputtype = 'daterangepicker-outli
|
|
|
26815
26991
|
const [start, end] = dates;
|
|
26816
26992
|
setFieldValue(alias, { from: start, to: end });
|
|
26817
26993
|
if (start && end) {
|
|
26818
|
-
setFieldTouched(alias, true);
|
|
26994
|
+
setFieldTouched(alias, true, false);
|
|
26819
26995
|
}
|
|
26820
26996
|
}, disabled: readOnly, placeholderText: placeholder, dateFormat: "MMM d, yyyy", customInput: React__default.createElement(u, { id: inputId, variant: "surface", style: getInputStyles() },
|
|
26821
26997
|
React__default.createElement(c, null,
|
|
@@ -26825,14 +27001,22 @@ const DateRangePicker = ({ alias, inputLabel, inputtype = 'daterangepicker-outli
|
|
|
26825
27001
|
isHinted && (React__default.createElement(e, { content: hintText || "No hint", align: "start" },
|
|
26826
27002
|
React__default.createElement("a", { href: hintUrl || "#", target: "_blank", rel: "noopener noreferrer", style: { marginLeft: 6 } },
|
|
26827
27003
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
26828
|
-
hasError && (React__default.createElement(p$d, { size: "1", color: "red", style: { display: 'block' } }, errorText || (typeof
|
|
27004
|
+
hasError && (React__default.createElement(p$d, { size: "1", color: "red", style: { display: 'block' } }, errorText || (typeof fieldError === 'string' ? fieldError : "Required field")))))));
|
|
26829
27005
|
};
|
|
26830
27006
|
|
|
26831
|
-
const DateTimePicker = ({ alias, inputLabel, inputtype = 'datetimepicker-outline', width = 12, newRow, placeholder = "Select date & time", isHinted, hintText, hintUrl, errorText, readOnly, className }) => {
|
|
26832
|
-
const
|
|
26833
|
-
const
|
|
27007
|
+
const DateTimePicker = ({ alias, inputLabel, inputtype = 'datetimepicker-outline', width = 12, newRow, placeholder = "Select date & time", isHinted, hintText, hintUrl, errorText, readOnly, className, formikContext }) => {
|
|
27008
|
+
const defaultFormikContext = useFormikContext();
|
|
27009
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
27010
|
+
if (!activeContext) {
|
|
27011
|
+
console.error(`DateTimePicker '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
27012
|
+
return null;
|
|
27013
|
+
}
|
|
27014
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
27015
|
+
const fieldValue = getIn(values, alias);
|
|
27016
|
+
const fieldTouched = getIn(touched, alias);
|
|
27017
|
+
const fieldError = getIn(errors, alias);
|
|
26834
27018
|
const inputId = `${alias}FormInput` || crypto.randomUUID();
|
|
26835
|
-
const hasError = Boolean(
|
|
27019
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
26836
27020
|
const containerRef = useRef(null);
|
|
26837
27021
|
const [neuVars, setNeuVars] = useState({});
|
|
26838
27022
|
useEffect(() => {
|
|
@@ -26937,9 +27121,9 @@ const DateTimePicker = ({ alias, inputLabel, inputtype = 'datetimepicker-outline
|
|
|
26937
27121
|
.react-datepicker__day--selected, .react-datepicker__time-list-item--selected { box-shadow: inset 2px 2px 5px var(--neu-shadow-dark), inset -2px -2px 5px var(--neu-shadow-light); color: var(--accent) !important; background: var(--neu-bg) !important; }
|
|
26938
27122
|
` : ''}
|
|
26939
27123
|
`),
|
|
26940
|
-
React__default.createElement(DatePicker$1, { id: `${alias}DatePicker`, selected: (
|
|
27124
|
+
React__default.createElement(DatePicker$1, { id: `${alias}DatePicker`, selected: (fieldValue && new Date(fieldValue)) || null, onChange: (val) => {
|
|
26941
27125
|
setFieldValue(alias, val);
|
|
26942
|
-
setFieldTouched(alias, true);
|
|
27126
|
+
setFieldTouched(alias, true, false);
|
|
26943
27127
|
}, showTimeSelect: true, timeFormat: "HH:mm", timeIntervals: 15, dateFormat: "MMM d, yyyy h:mm aa", disabled: readOnly, placeholderText: placeholder, customInput: React__default.createElement(u, { id: inputId, variant: "surface", style: getInputStyles() },
|
|
26944
27128
|
React__default.createElement(c, null,
|
|
26945
27129
|
React__default.createElement(Icon, { name: "clock", height: "16", width: "16", style: { color: 'var(--gray-10)' } }))) }),
|
|
@@ -26948,16 +27132,24 @@ const DateTimePicker = ({ alias, inputLabel, inputtype = 'datetimepicker-outline
|
|
|
26948
27132
|
isHinted && (React__default.createElement(e, { content: hintText || "No hint", align: "start" },
|
|
26949
27133
|
React__default.createElement("a", { href: hintUrl || "#", target: "_blank", rel: "noopener noreferrer", style: { marginLeft: 6 } },
|
|
26950
27134
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
26951
|
-
hasError && (React__default.createElement(p$d, { size: "1", color: "red", style: { display: 'block' } }, errorText ||
|
|
27135
|
+
hasError && (React__default.createElement(p$d, { size: "1", color: "red", style: { display: 'block' } }, errorText || (typeof fieldError === 'string' ? fieldError : "Required field")))))));
|
|
26952
27136
|
};
|
|
26953
27137
|
|
|
26954
27138
|
const Dropdown = (_a) => {
|
|
26955
|
-
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder, inputOptions, style, newRow, isHinted, hintText, hintUrl, errorText, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "inputOptions", "style", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "className"]);
|
|
27139
|
+
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder, inputOptions, style, newRow, isHinted, hintText, hintUrl, errorText, className, formikContext } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "inputOptions", "style", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "className", "formikContext"]);
|
|
27140
|
+
const defaultFormikContext = useFormikContext();
|
|
27141
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
27142
|
+
if (!activeContext) {
|
|
27143
|
+
console.error(`Dropdown '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
27144
|
+
return null;
|
|
27145
|
+
}
|
|
27146
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
27147
|
+
const fieldValue = getIn(values, alias);
|
|
27148
|
+
const fieldTouched = getIn(touched, alias);
|
|
27149
|
+
const fieldError = getIn(errors, alias);
|
|
27150
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
26956
27151
|
const triggerRef = useRef(null);
|
|
26957
27152
|
const [neuVars, setNeuVars] = useState({});
|
|
26958
|
-
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
26959
|
-
const [field, meta] = useField(alias);
|
|
26960
|
-
const hasError = Boolean(meta.touched && meta.error);
|
|
26961
27153
|
const inputId = `${alias}FormInput` || crypto.randomUUID();
|
|
26962
27154
|
const errorId = `${alias}-error`;
|
|
26963
27155
|
useEffect(() => {
|
|
@@ -27039,15 +27231,15 @@ const Dropdown = (_a) => {
|
|
|
27039
27231
|
cursor: pointer;
|
|
27040
27232
|
}
|
|
27041
27233
|
` } })),
|
|
27042
|
-
React__default.createElement(C$1, { name: alias, disabled: readOnly, value:
|
|
27234
|
+
React__default.createElement(C$1, { name: alias, disabled: readOnly, value: fieldValue || "", onValueChange: (val) => {
|
|
27043
27235
|
const finalVal = val === "__RESET__" ? "" : val;
|
|
27044
27236
|
setFieldValue(alias, finalVal);
|
|
27045
|
-
setTimeout(() => setFieldTouched(alias, true), 0);
|
|
27237
|
+
setTimeout(() => setFieldTouched(alias, true, false), 0);
|
|
27046
27238
|
if (props.onValueChange)
|
|
27047
27239
|
props.onValueChange(finalVal);
|
|
27048
27240
|
}, onOpenChange: (isOpen) => {
|
|
27049
27241
|
if (!isOpen) {
|
|
27050
|
-
setFieldTouched(alias, true);
|
|
27242
|
+
setFieldTouched(alias, true, false);
|
|
27051
27243
|
}
|
|
27052
27244
|
} },
|
|
27053
27245
|
React__default.createElement(u$1, Object.assign({ id: `${alias}FormInput`, ref: triggerRef, variant: "ghost", placeholder: placeholder || "Select an option", className: `${inputtype === 'dropdown-neumorphic' ? 'neu-select-trigger' : ''} ${className || ''}`, style: Object.assign(Object.assign({}, activeTriggerStyle), style) }, props)),
|
|
@@ -27055,10 +27247,10 @@ const Dropdown = (_a) => {
|
|
|
27055
27247
|
React__default.createElement(v, { value: "__RESET__", className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '', style: { color: 'var(--gray-10)', fontStyle: 'italic' } }, placeholder || "Select an option"),
|
|
27056
27248
|
React__default.createElement(o$2, { size: "4", style: { margin: '4px 0', opacity: 0.5 } }),
|
|
27057
27249
|
inputOptions.map((inputoption) => (React__default.createElement(React__default.Fragment, { key: inputoption.optionid || crypto.randomUUID() }, inputoption.optionurl ?
|
|
27058
|
-
React__default.createElement(v, { id: String(inputoption.optionid) || '', value: inputoption.optionvalue, className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' },
|
|
27250
|
+
React__default.createElement(v, { id: String(inputoption.optionid) || '', value: String(inputoption.optionvalue), className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' },
|
|
27059
27251
|
React__default.createElement("a", { onClick: (e) => { e.stopPropagation(); openLink(inputoption.optionurl || "#"); }, style: { textDecoration: 'none', color: 'inherit' } }, inputoption.text))
|
|
27060
27252
|
:
|
|
27061
|
-
React__default.createElement(v, { id: String(inputoption.optionid) || '', value: inputoption.optionvalue, className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' }, inputoption.text)))))),
|
|
27253
|
+
React__default.createElement(v, { id: String(inputoption.optionid) || '', value: String(inputoption.optionvalue), className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' }, inputoption.text)))))),
|
|
27062
27254
|
React__default.createElement("div", null,
|
|
27063
27255
|
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: inputId }, inputLabel),
|
|
27064
27256
|
"\u00A0",
|
|
@@ -27069,7 +27261,7 @@ const Dropdown = (_a) => {
|
|
|
27069
27261
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
27070
27262
|
hasError ?
|
|
27071
27263
|
React__default.createElement(React__default.Fragment, null,
|
|
27072
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText ||
|
|
27264
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || (typeof fieldError === 'string' ? fieldError : "Required field"))) : null)))));
|
|
27073
27265
|
};
|
|
27074
27266
|
|
|
27075
27267
|
const getFileIcon$1 = (type, name) => {
|
|
@@ -27087,11 +27279,19 @@ const getFileIcon$1 = (type, name) => {
|
|
|
27087
27279
|
};
|
|
27088
27280
|
const File$1 = (_a) => {
|
|
27089
27281
|
var _b;
|
|
27090
|
-
var { inputtype = 'fileinput-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, preview = false, className, style } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "preview", "className", "style"]);
|
|
27091
|
-
const
|
|
27092
|
-
const
|
|
27093
|
-
|
|
27094
|
-
|
|
27282
|
+
var { inputtype = 'fileinput-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, preview = false, className, style, formikContext } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "preview", "className", "style", "formikContext"]);
|
|
27283
|
+
const defaultFormikContext = useFormikContext();
|
|
27284
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
27285
|
+
if (!activeContext) {
|
|
27286
|
+
console.error(`File '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
27287
|
+
return null;
|
|
27288
|
+
}
|
|
27289
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
27290
|
+
const fieldValue = getIn(values, alias);
|
|
27291
|
+
const fieldTouched = getIn(touched, alias);
|
|
27292
|
+
const fieldError = getIn(errors, alias);
|
|
27293
|
+
const selectedFile = fieldValue;
|
|
27294
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
27095
27295
|
const inputRef = useRef(null);
|
|
27096
27296
|
const containerRef = useRef(null);
|
|
27097
27297
|
const [previewUrl, setPreviewUrl] = useState(null);
|
|
@@ -27103,7 +27303,7 @@ const File$1 = (_a) => {
|
|
|
27103
27303
|
const file = (_a = event.currentTarget.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
27104
27304
|
if (file) {
|
|
27105
27305
|
setFieldValue(alias, file);
|
|
27106
|
-
setFieldTouched(alias, true);
|
|
27306
|
+
setFieldTouched(alias, true, false);
|
|
27107
27307
|
}
|
|
27108
27308
|
};
|
|
27109
27309
|
const handleClear = (e) => {
|
|
@@ -27167,14 +27367,14 @@ const File$1 = (_a) => {
|
|
|
27167
27367
|
if (inputtype === 'fileinput-outline')
|
|
27168
27368
|
e.currentTarget.style.borderColor = hasError ? 'var(--red-9)' : 'var(--gray-8)';
|
|
27169
27369
|
} }, !selectedFile ? (
|
|
27170
|
-
// --- EMPTY STATE ---
|
|
27370
|
+
// --- EMPTY STATE RENDER ---
|
|
27171
27371
|
React__default.createElement(p$5, { align: "center", gap: "3", style: { width: '100%', color: 'var(--gray-10)' } },
|
|
27172
27372
|
React__default.createElement(p$8, { style: { padding: 8, borderRadius: '50%', backgroundColor: 'var(--gray-3)' } },
|
|
27173
27373
|
React__default.createElement(Icon, { name: 'upload', width: "18", height: "18" })),
|
|
27174
27374
|
React__default.createElement(p$5, { direction: "column" },
|
|
27175
27375
|
React__default.createElement(p$d, { size: "2", weight: "bold", color: "gray" }, "Upload File"),
|
|
27176
27376
|
React__default.createElement(p$d, { size: "1", color: "gray" }, "Supports PDF, Images, Excel, JSON...")))) : (
|
|
27177
|
-
// --- SELECTED STATE ---
|
|
27377
|
+
// --- SELECTED STATE RENDER ---
|
|
27178
27378
|
React__default.createElement(p$5, { align: "center", gap: "4", style: { width: '100%' } },
|
|
27179
27379
|
preview && previewUrl ? (React__default.createElement(i$9, { ratio: 1, style: { width: 48, height: 48, borderRadius: 6, overflow: 'hidden', flexShrink: 0 } },
|
|
27180
27380
|
React__default.createElement("img", { src: previewUrl, alt: "Preview", style: { width: '100%', height: '100%', objectFit: 'cover' } }))) : (React__default.createElement(p$8, { style: {
|
|
@@ -27200,7 +27400,7 @@ const File$1 = (_a) => {
|
|
|
27200
27400
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
27201
27401
|
hasError ?
|
|
27202
27402
|
React__default.createElement(React__default.Fragment, null,
|
|
27203
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || "Required field")) : null))));
|
|
27403
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || (typeof fieldError === 'string' ? fieldError : "Required field"))) : null))));
|
|
27204
27404
|
};
|
|
27205
27405
|
|
|
27206
27406
|
const getFileIcon = (fileOrUrl) => {
|
|
@@ -27246,14 +27446,23 @@ const styles = {
|
|
|
27246
27446
|
}
|
|
27247
27447
|
};
|
|
27248
27448
|
const FileMultiple = (_a) => {
|
|
27249
|
-
var { inputtype = 'filemultiple-outline', alias, readOnly, width, inputLabel, placeholder = '', newRow, isHinted, hintText, hintUrl, errorText, preview = true, className, style } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "preview", "className", "style"]);
|
|
27250
|
-
const
|
|
27251
|
-
const
|
|
27449
|
+
var { inputtype = 'filemultiple-outline', alias, readOnly, width, inputLabel, placeholder = '', newRow, isHinted, hintText, hintUrl, errorText, preview = true, className, style, formikContext } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "preview", "className", "style", "formikContext"]);
|
|
27450
|
+
const defaultFormikContext = useFormikContext();
|
|
27451
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
27452
|
+
if (!activeContext) {
|
|
27453
|
+
console.error(`FileMultiple '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
27454
|
+
return null;
|
|
27455
|
+
}
|
|
27456
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
27457
|
+
const fieldValue = getIn(values, alias);
|
|
27458
|
+
const fieldTouched = getIn(touched, alias);
|
|
27459
|
+
const fieldError = getIn(errors, alias);
|
|
27252
27460
|
const inputRef = useRef(null);
|
|
27253
27461
|
const [objectUrls, setObjectUrls] = useState({});
|
|
27254
27462
|
const inputId = `${alias}FormInput`;
|
|
27255
27463
|
const errorId = `${alias}-error`;
|
|
27256
|
-
const currentFiles = Array.isArray(
|
|
27464
|
+
const currentFiles = Array.isArray(fieldValue) ? fieldValue : [];
|
|
27465
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
27257
27466
|
useEffect(() => {
|
|
27258
27467
|
if (!preview)
|
|
27259
27468
|
return;
|
|
@@ -27278,7 +27487,7 @@ const FileMultiple = (_a) => {
|
|
|
27278
27487
|
if (e.target.files && e.target.files.length > 0) {
|
|
27279
27488
|
const newFiles = Array.from(e.target.files);
|
|
27280
27489
|
setFieldValue(alias, [...currentFiles, ...newFiles]);
|
|
27281
|
-
setFieldTouched(alias, true);
|
|
27490
|
+
setFieldTouched(alias, true, false);
|
|
27282
27491
|
}
|
|
27283
27492
|
if (inputRef.current)
|
|
27284
27493
|
inputRef.current.value = '';
|
|
@@ -27292,7 +27501,6 @@ const FileMultiple = (_a) => {
|
|
|
27292
27501
|
}
|
|
27293
27502
|
};
|
|
27294
27503
|
const isNeumorphic = inputtype === 'filemultiple-neumorphic';
|
|
27295
|
-
const hasError = Boolean(meta.touched && meta.error);
|
|
27296
27504
|
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
27297
27505
|
React__default.createElement(p$5, { direction: "column", gap: "2", className: className, style: Object.assign({ width: '100%' }, style) },
|
|
27298
27506
|
React__default.createElement(p$8, { onClick: () => { var _a; return !readOnly && ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click()); }, p: "4", style: Object.assign(Object.assign({}, styles[inputtype]), { cursor: readOnly ? 'default' : 'pointer', transition: 'all 0.2s', borderColor: hasError ? 'var(--red-9)' : (styles[inputtype].borderBottom ? 'var(--accent-9)' : 'var(--gray-a8)'), position: 'relative', opacity: readOnly ? 0.7 : 1 }) },
|
|
@@ -27354,7 +27562,7 @@ const FileMultiple = (_a) => {
|
|
|
27354
27562
|
isHinted && (React__default.createElement(e, { content: hintText || "No hint available" },
|
|
27355
27563
|
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
27356
27564
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray', marginLeft: 4 } })))),
|
|
27357
|
-
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", style: { display: 'block', marginTop: 2 } }, typeof
|
|
27565
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", style: { display: 'block', marginTop: 2 } }, typeof fieldError === 'string' ? (errorText || fieldError) : 'Invalid file selection'))))));
|
|
27358
27566
|
};
|
|
27359
27567
|
|
|
27360
27568
|
var _excluded$6 = ["title"],
|
|
@@ -34673,9 +34881,24 @@ const ImageOutput = ({ id, src, alt = "Image", design = 'outline', layout = 'nor
|
|
|
34673
34881
|
};
|
|
34674
34882
|
|
|
34675
34883
|
const Input$2 = (_a) => {
|
|
34676
|
-
var { alias, inputtype = "text", width, inputLabel, readOnly = false, placeholder = '', newRow, isHinted, hintText, hintUrl, errorText, className, size = "2", style, inputvariant = 'input-outline', icon } = _a, props = __rest$1(_a, ["alias", "inputtype", "width", "inputLabel", "readOnly", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "className", "size", "style", "inputvariant", "icon"]);
|
|
34677
|
-
const
|
|
34678
|
-
const
|
|
34884
|
+
var { alias, inputtype = "text", width, inputLabel, readOnly = false, placeholder = '', newRow, isHinted, hintText, hintUrl, errorText, className, size = "2", style, inputvariant = 'input-outline', icon, formikContext } = _a, props = __rest$1(_a, ["alias", "inputtype", "width", "inputLabel", "readOnly", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "className", "size", "style", "inputvariant", "icon", "formikContext"]);
|
|
34885
|
+
const defaultFormikContext = useFormikContext();
|
|
34886
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
34887
|
+
if (!activeContext) {
|
|
34888
|
+
console.error(`Input '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
34889
|
+
return null;
|
|
34890
|
+
}
|
|
34891
|
+
const { values, touched, errors, handleChange, handleBlur } = activeContext;
|
|
34892
|
+
const fieldValue = getIn(values, alias);
|
|
34893
|
+
const fieldTouched = getIn(touched, alias);
|
|
34894
|
+
const fieldError = getIn(errors, alias);
|
|
34895
|
+
const inputField = {
|
|
34896
|
+
name: alias,
|
|
34897
|
+
value: fieldValue !== undefined && fieldValue !== null ? fieldValue : '',
|
|
34898
|
+
onChange: handleChange,
|
|
34899
|
+
onBlur: handleBlur,
|
|
34900
|
+
};
|
|
34901
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
34679
34902
|
const variantClass = inputvariant !== 'input-outline' ? `input-${inputvariant}` : '';
|
|
34680
34903
|
const errorId = `${alias}-error`;
|
|
34681
34904
|
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
@@ -34685,21 +34908,36 @@ const Input$2 = (_a) => {
|
|
|
34685
34908
|
inputLabel && (React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel)),
|
|
34686
34909
|
isHinted && (React__default.createElement(e, { content: hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
34687
34910
|
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { marginLeft: 4 } },
|
|
34688
|
-
React__default.createElement(
|
|
34689
|
-
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error', style: { display: 'block', marginTop: 2 } }, errorText ||
|
|
34911
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
34912
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error', style: { display: 'block', marginTop: 2 } }, errorText || (typeof fieldError === 'string' ? fieldError : `Required field`)))))));
|
|
34690
34913
|
};
|
|
34691
34914
|
|
|
34692
34915
|
const PasswordInput = (_a) => {
|
|
34693
|
-
var { alias, inputLabel, width, readOnly = false, placeholder = '', newRow, isHinted, hintText, hintUrl, errorText, inputvariant = 'input-outline', size = "2", className } = _a, props = __rest$1(_a, ["alias", "inputLabel", "width", "readOnly", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "inputvariant", "size", "className"]);
|
|
34916
|
+
var { alias, inputLabel, width, readOnly = false, placeholder = '', newRow, isHinted, hintText, hintUrl, errorText, inputvariant = 'input-outline', size = "2", className, formikContext } = _a, props = __rest$1(_a, ["alias", "inputLabel", "width", "readOnly", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "inputvariant", "size", "className", "formikContext"]);
|
|
34694
34917
|
const [showPassword, setShowPassword] = useState(false);
|
|
34695
34918
|
const toggleVisibility = () => setShowPassword(!showPassword);
|
|
34696
|
-
const
|
|
34697
|
-
const
|
|
34919
|
+
const defaultFormikContext = useFormikContext();
|
|
34920
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
34921
|
+
if (!activeContext) {
|
|
34922
|
+
console.error(`PasswordInput '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
34923
|
+
return null;
|
|
34924
|
+
}
|
|
34925
|
+
const { values, touched, errors, handleChange, handleBlur } = activeContext;
|
|
34926
|
+
const fieldValue = getIn(values, alias);
|
|
34927
|
+
const fieldTouched = getIn(touched, alias);
|
|
34928
|
+
const fieldError = getIn(errors, alias);
|
|
34929
|
+
const inputField = {
|
|
34930
|
+
name: alias,
|
|
34931
|
+
value: fieldValue !== undefined && fieldValue !== null ? fieldValue : '',
|
|
34932
|
+
onChange: handleChange,
|
|
34933
|
+
onBlur: handleBlur,
|
|
34934
|
+
};
|
|
34935
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
34698
34936
|
const variantClass = inputvariant !== 'input-outline' ? `input-${inputvariant}` : '';
|
|
34699
34937
|
const errorId = `${alias}-error`;
|
|
34700
34938
|
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
34701
34939
|
React__default.createElement(p$5, { direction: "column", gap: "2", style: { width: '100%' } },
|
|
34702
|
-
React__default.createElement(u, Object.assign({ size: size, type: showPassword ? "text" : "password", id: `${alias}FormInput`, readOnly: readOnly, "aria-describedby": `${alias}InputLabel`, placeholder: placeholder, color: hasError ? "red" : undefined, className: `${variantClass} ${className || ''}` },
|
|
34940
|
+
React__default.createElement(u, Object.assign({ size: size, type: showPassword ? "text" : "password", id: `${alias}FormInput`, readOnly: readOnly, "aria-describedby": `${alias}InputLabel`, placeholder: placeholder, color: hasError ? "red" : undefined, className: `${variantClass} ${className || ''}` }, inputField, props),
|
|
34703
34941
|
React__default.createElement(c, null,
|
|
34704
34942
|
React__default.createElement(Icon, { name: "lockclosed", height: "16", width: "16", style: { color: 'var(--gray-10)' } })),
|
|
34705
34943
|
React__default.createElement(c, null,
|
|
@@ -34709,8 +34947,8 @@ const PasswordInput = (_a) => {
|
|
|
34709
34947
|
inputLabel && (React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel)),
|
|
34710
34948
|
isHinted && (React__default.createElement(e, { content: hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
34711
34949
|
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { marginLeft: 4 } },
|
|
34712
|
-
React__default.createElement(
|
|
34713
|
-
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error', style: { display: 'block', marginTop: 2 } }, errorText ||
|
|
34950
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
34951
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error', style: { display: 'block', marginTop: 2 } }, errorText || (typeof fieldError === 'string' ? fieldError : `Required field`)))))));
|
|
34714
34952
|
};
|
|
34715
34953
|
|
|
34716
34954
|
// This file is a workaround for a bug in web browsers' "native"
|
|
@@ -42252,10 +42490,18 @@ var en = {
|
|
|
42252
42490
|
};
|
|
42253
42491
|
|
|
42254
42492
|
const PhoneInput = (_a) => {
|
|
42255
|
-
var { alias, inputLabel, width, placeholder = "Phone Number", newRow, isHinted, hintText, hintUrl, errorText, readOnly, inputvariant = 'input-outline', size = "2", className } = _a, props = __rest$1(_a, ["alias", "inputLabel", "width", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputvariant", "size", "className"]);
|
|
42256
|
-
const
|
|
42257
|
-
const
|
|
42258
|
-
|
|
42493
|
+
var { alias, inputLabel, width, placeholder = "Phone Number", newRow, isHinted, hintText, hintUrl, errorText, readOnly, inputvariant = 'input-outline', size = "2", className, formikContext } = _a, props = __rest$1(_a, ["alias", "inputLabel", "width", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputvariant", "size", "className", "formikContext"]);
|
|
42494
|
+
const defaultFormikContext = useFormikContext();
|
|
42495
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
42496
|
+
if (!activeContext) {
|
|
42497
|
+
console.error(`PhoneInput '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
42498
|
+
return null;
|
|
42499
|
+
}
|
|
42500
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
42501
|
+
const fieldValue = getIn(values, alias);
|
|
42502
|
+
const fieldTouched = getIn(touched, alias);
|
|
42503
|
+
const fieldError = getIn(errors, alias);
|
|
42504
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
42259
42505
|
const [country, setCountry] = useState('US');
|
|
42260
42506
|
const variantClass = inputvariant !== 'input-outline' ? `input-${inputvariant}` : '';
|
|
42261
42507
|
const errorId = `${alias}-error`;
|
|
@@ -42287,7 +42533,7 @@ const PhoneInput = (_a) => {
|
|
|
42287
42533
|
"(+",
|
|
42288
42534
|
getCountryCallingCode(c),
|
|
42289
42535
|
")")))))))),
|
|
42290
|
-
React__default.createElement(Input, { country: country, name: alias, international: true, withCountryCallingCode: false, value:
|
|
42536
|
+
React__default.createElement(Input, { country: country, name: alias, international: true, withCountryCallingCode: false, value: fieldValue || '', onChange: (val) => setFieldValue(alias, val || ''), onBlur: () => setFieldTouched(alias, true, false), readOnly: readOnly, placeholder: placeholder, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, style: {
|
|
42291
42537
|
flex: 1,
|
|
42292
42538
|
border: 'none',
|
|
42293
42539
|
outline: 'none',
|
|
@@ -42300,11 +42546,11 @@ const PhoneInput = (_a) => {
|
|
|
42300
42546
|
width: '100%'
|
|
42301
42547
|
} })),
|
|
42302
42548
|
React__default.createElement("div", { style: { marginTop: 4, display: 'flex', alignItems: 'center', gap: 6 } },
|
|
42303
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel),
|
|
42549
|
+
inputLabel && (React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel)),
|
|
42304
42550
|
isHinted && (React__default.createElement(e, { content: hintText || "No hint available" },
|
|
42305
42551
|
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { display: 'flex' } },
|
|
42306
|
-
React__default.createElement(
|
|
42307
|
-
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error' }, errorText ||
|
|
42552
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
42553
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error' }, errorText || (typeof fieldError === 'string' ? fieldError : `Required field`)))))));
|
|
42308
42554
|
};
|
|
42309
42555
|
|
|
42310
42556
|
const safeParseUuidFormat = (typeString) => {
|
|
@@ -42319,10 +42565,18 @@ const safeParseUuidFormat = (typeString) => {
|
|
|
42319
42565
|
}
|
|
42320
42566
|
};
|
|
42321
42567
|
const UUIDInput = (_a) => {
|
|
42322
|
-
var { alias, type = "uuid-4-4-4-4", inputLabel, width, delimiter = "-", format = [4, 4, 4, 4], placeholder = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', newRow, isHinted, hintText, hintUrl, errorText, readOnly = false, inputVariant = 'uuid-outline', size = "2", className } = _a, props = __rest$1(_a, ["alias", "type", "inputLabel", "width", "delimiter", "format", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputVariant", "size", "className"]);
|
|
42323
|
-
const
|
|
42324
|
-
const
|
|
42325
|
-
|
|
42568
|
+
var { alias, type = "uuid-4-4-4-4", inputLabel, width, delimiter = "-", format = [4, 4, 4, 4], placeholder = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', newRow, isHinted, hintText, hintUrl, errorText, readOnly = false, inputVariant = 'uuid-outline', size = "2", className, formikContext } = _a, props = __rest$1(_a, ["alias", "type", "inputLabel", "width", "delimiter", "format", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputVariant", "size", "className", "formikContext"]);
|
|
42569
|
+
const defaultFormikContext = useFormikContext();
|
|
42570
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
42571
|
+
if (!activeContext) {
|
|
42572
|
+
console.error(`UUIDInput '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
42573
|
+
return null;
|
|
42574
|
+
}
|
|
42575
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
42576
|
+
const fieldValue = getIn(values, alias);
|
|
42577
|
+
const fieldTouched = getIn(touched, alias);
|
|
42578
|
+
const fieldError = getIn(errors, alias);
|
|
42579
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
42326
42580
|
const [copied, setCopied] = useState(false);
|
|
42327
42581
|
const [uuidNumber, setUUIDNumber] = useState("");
|
|
42328
42582
|
const errorId = `${alias}-error`;
|
|
@@ -42351,11 +42605,11 @@ const UUIDInput = (_a) => {
|
|
|
42351
42605
|
const val = e.target.value;
|
|
42352
42606
|
const formatted = formatUUID(val);
|
|
42353
42607
|
setUUIDNumber(formatted);
|
|
42354
|
-
setFieldValue(alias,
|
|
42608
|
+
setFieldValue(alias, formatted);
|
|
42355
42609
|
};
|
|
42356
42610
|
const handleCopy = () => {
|
|
42357
|
-
if (
|
|
42358
|
-
navigator.clipboard.writeText(
|
|
42611
|
+
if (fieldValue) {
|
|
42612
|
+
navigator.clipboard.writeText(fieldValue);
|
|
42359
42613
|
setCopied(true);
|
|
42360
42614
|
setTimeout(() => setCopied(false), 2000);
|
|
42361
42615
|
}
|
|
@@ -42364,7 +42618,7 @@ const UUIDInput = (_a) => {
|
|
|
42364
42618
|
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
42365
42619
|
React__default.createElement(p$5, { direction: "column", gap: "2", style: { width: '100%' } },
|
|
42366
42620
|
React__default.createElement(u, Object.assign({ size: size, name: `${alias}UUIDFormInput`, variant: "surface", color: hasError ? 'red' : undefined, className: `${variantClass} ${className || ''}` }, props),
|
|
42367
|
-
React__default.createElement("input", { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, value:
|
|
42621
|
+
React__default.createElement("input", { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, value: fieldValue || '', onChange: handleChange, onBlur: () => setFieldTouched(alias, true, false), maxLength: maxTotalLength, readOnly: readOnly, placeholder: placeholder, autoComplete: "off", spellCheck: false, style: {
|
|
42368
42622
|
flex: 1,
|
|
42369
42623
|
border: 'none',
|
|
42370
42624
|
outline: 'none',
|
|
@@ -42379,13 +42633,13 @@ const UUIDInput = (_a) => {
|
|
|
42379
42633
|
} }),
|
|
42380
42634
|
React__default.createElement(c, null,
|
|
42381
42635
|
React__default.createElement(e, { content: copied ? "Copied!" : "Copy to clipboard" },
|
|
42382
|
-
React__default.createElement(o$5, { size: "1", variant: "ghost", color: copied ? "green" : "gray", onClick: handleCopy, type: "button", disabled: !
|
|
42636
|
+
React__default.createElement(o$5, { size: "1", variant: "ghost", color: copied ? "green" : "gray", onClick: handleCopy, type: "button", disabled: !fieldValue, style: { margin: 0 } }, copied ? React__default.createElement(CheckIcon, null) : React__default.createElement(CopyIcon, null))))),
|
|
42383
42637
|
React__default.createElement("div", null,
|
|
42384
42638
|
inputLabel && (React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel)),
|
|
42385
42639
|
isHinted && (React__default.createElement(e, { content: hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
42386
42640
|
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
42387
42641
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray', marginLeft: 4 } })))),
|
|
42388
|
-
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", style: { display: 'block', marginTop: 2 } }, errorText ||
|
|
42642
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", style: { display: 'block', marginTop: 2 } }, errorText || (typeof fieldError === 'string' ? fieldError : "Required field")))))));
|
|
42389
42643
|
};
|
|
42390
42644
|
|
|
42391
42645
|
var FaCcVisa = {};
|
|
@@ -47592,11 +47846,19 @@ const IMaskInput = React__default.forwardRef(IMaskInputFn);
|
|
|
47592
47846
|
|
|
47593
47847
|
const CreditCardInput = (_a) => {
|
|
47594
47848
|
var _b;
|
|
47595
|
-
var { alias, inputLabel, width, placeholder, newRow, isHinted, hintText, hintUrl, errorText, readOnly = false, inputvariant = 'input-outline', className } = _a; __rest$1(_a, ["alias", "inputLabel", "width", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputvariant", "className"]);
|
|
47596
|
-
const
|
|
47597
|
-
const
|
|
47598
|
-
|
|
47599
|
-
|
|
47849
|
+
var { alias, inputLabel, width, placeholder, newRow, isHinted, hintText, hintUrl, errorText, readOnly = false, inputvariant = 'input-outline', className, formikContext } = _a; __rest$1(_a, ["alias", "inputLabel", "width", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputvariant", "className", "formikContext"]);
|
|
47850
|
+
const defaultFormikContext = useFormikContext();
|
|
47851
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
47852
|
+
if (!activeContext) {
|
|
47853
|
+
console.error(`CreditCardInput '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
47854
|
+
return null;
|
|
47855
|
+
}
|
|
47856
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
47857
|
+
const fieldValue = getIn(values, alias);
|
|
47858
|
+
const fieldTouched = getIn(touched, alias);
|
|
47859
|
+
const fieldError = getIn(errors, alias);
|
|
47860
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
47861
|
+
const cardInfo = cardValidator.number(fieldValue);
|
|
47600
47862
|
const cardType = (_b = cardInfo.card) === null || _b === void 0 ? void 0 : _b.type;
|
|
47601
47863
|
const maskPattern = cardType === 'american-express' ? '0000 000000 00000' : '0000 0000 0000 0000';
|
|
47602
47864
|
const errorId = `${alias}-error`;
|
|
@@ -47622,7 +47884,7 @@ const CreditCardInput = (_a) => {
|
|
|
47622
47884
|
paddingRight: '12px',
|
|
47623
47885
|
cursor: 'text'
|
|
47624
47886
|
} },
|
|
47625
|
-
React__default.createElement(IMaskInput, { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, mask: maskPattern, readOnly: readOnly, value:
|
|
47887
|
+
React__default.createElement(IMaskInput, { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, mask: maskPattern, readOnly: readOnly, value: fieldValue || '', unmask: true, onAccept: (val) => setFieldValue(alias, val), onBlur: () => setFieldTouched(alias, true, false), placeholder: placeholder || '0000 0000 0000 0000', inputMode: "numeric", autoComplete: "cc-number", style: {
|
|
47626
47888
|
flex: 1,
|
|
47627
47889
|
border: 'none',
|
|
47628
47890
|
outline: 'none',
|
|
@@ -47636,12 +47898,12 @@ const CreditCardInput = (_a) => {
|
|
|
47636
47898
|
} }),
|
|
47637
47899
|
React__default.createElement("div", { style: { display: 'flex', alignItems: 'center' } }, getCardIcon())),
|
|
47638
47900
|
React__default.createElement("div", { style: { marginTop: 4, display: 'flex', alignItems: 'center', gap: 6 } },
|
|
47639
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel),
|
|
47901
|
+
inputLabel && (React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel)),
|
|
47640
47902
|
"\u00A0",
|
|
47641
|
-
isHinted && (React__default.createElement(e, { content: hintText || "No hint available" },
|
|
47903
|
+
isHinted && (React__default.createElement(e, { content: hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
47642
47904
|
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { display: 'flex' } },
|
|
47643
47905
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
47644
|
-
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error' }, errorText || `Required field`))))));
|
|
47906
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error' }, errorText || (typeof fieldError === 'string' ? fieldError : `Required field`)))))));
|
|
47645
47907
|
};
|
|
47646
47908
|
|
|
47647
47909
|
const CURRENCIES = {
|
|
@@ -47713,21 +47975,29 @@ const CURRENCIES = {
|
|
|
47713
47975
|
};
|
|
47714
47976
|
|
|
47715
47977
|
const CurrencyInput = (_a) => {
|
|
47716
|
-
var { alias, inputtype = "currency", inputLabel, width, defaultvalue = "USD", placeholder, newRow, isHinted, hintText, hintUrl, errorText, readOnly = false, inputvariant = 'input-outline', className } = _a; __rest$1(_a, ["alias", "inputtype", "inputLabel", "width", "defaultvalue", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputvariant", "className"]);
|
|
47717
|
-
const
|
|
47718
|
-
const
|
|
47978
|
+
var { alias, inputtype = "currency", inputLabel, width, defaultvalue = "USD", placeholder, newRow, isHinted, hintText, hintUrl, errorText, readOnly = false, inputvariant = 'input-outline', className, formikContext } = _a; __rest$1(_a, ["alias", "inputtype", "inputLabel", "width", "defaultvalue", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputvariant", "className", "formikContext"]);
|
|
47979
|
+
const defaultFormikContext = useFormikContext();
|
|
47980
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
47981
|
+
if (!activeContext) {
|
|
47982
|
+
console.error(`CurrencyInput '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
47983
|
+
return null;
|
|
47984
|
+
}
|
|
47985
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
47719
47986
|
const currencyAlias = `${alias}Currency`;
|
|
47720
|
-
const
|
|
47987
|
+
const amountFieldValue = getIn(values, alias);
|
|
47988
|
+
const amountFieldTouched = getIn(touched, alias);
|
|
47989
|
+
const amountFieldError = getIn(errors, alias);
|
|
47990
|
+
const currencyFieldValue = getIn(values, currencyAlias);
|
|
47721
47991
|
useEffect(() => {
|
|
47722
47992
|
if (inputtype !== "currency" && CURRENCIES[inputtype]) {
|
|
47723
|
-
|
|
47993
|
+
setFieldValue(currencyAlias, inputtype);
|
|
47724
47994
|
}
|
|
47725
|
-
else if (!
|
|
47726
|
-
|
|
47995
|
+
else if (!currencyFieldValue) {
|
|
47996
|
+
setFieldValue(currencyAlias, defaultvalue);
|
|
47727
47997
|
}
|
|
47728
|
-
}, [inputtype, defaultvalue]);
|
|
47729
|
-
const hasError = Boolean(
|
|
47730
|
-
const currentCode =
|
|
47998
|
+
}, [inputtype, defaultvalue, currencyFieldValue, currencyAlias, setFieldValue]);
|
|
47999
|
+
const hasError = Boolean(amountFieldTouched && amountFieldError);
|
|
48000
|
+
const currentCode = currencyFieldValue || "USD";
|
|
47731
48001
|
const activeCurrency = CURRENCIES[currentCode] || CURRENCIES.USD;
|
|
47732
48002
|
const variantClass = inputvariant !== 'input-outline' ? `input-${inputvariant}` : '';
|
|
47733
48003
|
const isOutline = inputvariant === 'input-outline';
|
|
@@ -47771,7 +48041,7 @@ const CurrencyInput = (_a) => {
|
|
|
47771
48041
|
normalizeZeros: true,
|
|
47772
48042
|
radix: ".",
|
|
47773
48043
|
mapToRadix: ['.'],
|
|
47774
|
-
}, { value:
|
|
48044
|
+
}, { value: amountFieldValue !== undefined && amountFieldValue !== null ? String(amountFieldValue) : '', unmask: true, onAccept: (val) => setFieldValue(alias, val), onBlur: () => setFieldTouched(alias, true, false), readOnly: readOnly, placeholder: placeholder || '0.00', style: {
|
|
47775
48045
|
flex: 1,
|
|
47776
48046
|
border: 'none',
|
|
47777
48047
|
outline: 'none',
|
|
@@ -47787,10 +48057,10 @@ const CurrencyInput = (_a) => {
|
|
|
47787
48057
|
React__default.createElement("div", null,
|
|
47788
48058
|
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel),
|
|
47789
48059
|
"\u00A0",
|
|
47790
|
-
isHinted && (React__default.createElement(e, { content: hintText || "No hint available" },
|
|
48060
|
+
isHinted && (React__default.createElement(e, { content: hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
47791
48061
|
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { display: 'flex' } },
|
|
47792
48062
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
47793
|
-
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error' }, errorText ||
|
|
48063
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error' }, errorText || (typeof amountFieldError === 'string' ? amountFieldError : `Required field`)))))));
|
|
47794
48064
|
};
|
|
47795
48065
|
|
|
47796
48066
|
var FaChartLine = {};
|
|
@@ -47811,10 +48081,18 @@ function requireFaChartLine () {
|
|
|
47811
48081
|
var FaChartLineExports = /*@__PURE__*/ requireFaChartLine();
|
|
47812
48082
|
|
|
47813
48083
|
const StockInput = (_a) => {
|
|
47814
|
-
var { alias, inputLabel, width, defaultvalue, placeholder, newRow, isHinted, hintText, hintUrl, errorText, readOnly = false, inputvariant = 'input-outline', className } = _a; __rest$1(_a, ["alias", "inputLabel", "width", "defaultvalue", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputvariant", "className"]);
|
|
47815
|
-
const
|
|
47816
|
-
const
|
|
47817
|
-
|
|
48084
|
+
var { alias, inputLabel, width, defaultvalue, placeholder, newRow, isHinted, hintText, hintUrl, errorText, readOnly = false, inputvariant = 'input-outline', className, formikContext } = _a; __rest$1(_a, ["alias", "inputLabel", "width", "defaultvalue", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputvariant", "className", "formikContext"]);
|
|
48085
|
+
const defaultFormikContext = useFormikContext();
|
|
48086
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
48087
|
+
if (!activeContext) {
|
|
48088
|
+
console.error(`StockInput '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
48089
|
+
return null;
|
|
48090
|
+
}
|
|
48091
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
48092
|
+
const fieldValue = getIn(values, alias);
|
|
48093
|
+
const fieldTouched = getIn(touched, alias);
|
|
48094
|
+
const fieldError = getIn(errors, alias);
|
|
48095
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
47818
48096
|
const variantClass = inputvariant !== 'input-outline' ? `input-${inputvariant}` : '';
|
|
47819
48097
|
const isOutline = inputvariant === 'input-outline';
|
|
47820
48098
|
const errorId = `${alias}-error`;
|
|
@@ -47846,7 +48124,7 @@ const StockInput = (_a) => {
|
|
|
47846
48124
|
React__default.createElement(p$5, { align: "center", style: { flex: 1, height: '100%', justifyContent: 'flex-end' } },
|
|
47847
48125
|
React__default.createElement(IMaskInput, { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, mask: Number, scale: 2, readOnly: readOnly,
|
|
47848
48126
|
// @ts-expect-error: known library type definition gap
|
|
47849
|
-
signed: String(false), thousandsSeparator: ",", padFractionalZeros: true, normalizeZeros: true, radix: ".", mapToRadix: ['.'], value:
|
|
48127
|
+
signed: String(false), thousandsSeparator: ",", padFractionalZeros: true, normalizeZeros: true, radix: ".", mapToRadix: ['.'], value: fieldValue !== undefined && fieldValue !== null ? String(fieldValue) : '', unmask: true, onAccept: (val) => setFieldValue(alias, val), onBlur: () => setFieldTouched(alias, true, false), placeholder: placeholder || "0.00", style: {
|
|
47850
48128
|
border: 'none',
|
|
47851
48129
|
outline: 'none',
|
|
47852
48130
|
background: 'transparent',
|
|
@@ -47859,19 +48137,27 @@ const StockInput = (_a) => {
|
|
|
47859
48137
|
fontFamily: 'var(--default-font-family)',
|
|
47860
48138
|
}, inputMode: "decimal", autoComplete: "off" }))),
|
|
47861
48139
|
React__default.createElement("div", null,
|
|
47862
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel),
|
|
48140
|
+
inputLabel && (React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel)),
|
|
47863
48141
|
"\u00A0",
|
|
47864
|
-
isHinted && (React__default.createElement(e, { content: hintText || "No hint available" },
|
|
48142
|
+
isHinted && (React__default.createElement(e, { content: hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
47865
48143
|
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { display: 'flex' } },
|
|
47866
48144
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
47867
|
-
hasError && (React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || `Required field`))))));
|
|
48145
|
+
hasError && (React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || (typeof fieldError === 'string' ? fieldError : `Required field`)))))));
|
|
47868
48146
|
};
|
|
47869
48147
|
|
|
47870
48148
|
const RadioGroupInput = (_a) => {
|
|
47871
|
-
var { inputtype = 'radio-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, style, inputOptions, direction = 'column', columns, className } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "style", "inputOptions", "direction", "columns", "className"]);
|
|
47872
|
-
const
|
|
47873
|
-
const
|
|
47874
|
-
|
|
48149
|
+
var { inputtype = 'radio-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, style, inputOptions, direction = 'column', columns, className, formikContext } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "style", "inputOptions", "direction", "columns", "className", "formikContext"]);
|
|
48150
|
+
const defaultFormikContext = useFormikContext();
|
|
48151
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
48152
|
+
if (!activeContext) {
|
|
48153
|
+
console.error(`RadioGroupInput '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
48154
|
+
return null;
|
|
48155
|
+
}
|
|
48156
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
48157
|
+
const fieldValue = getIn(values, alias);
|
|
48158
|
+
const fieldTouched = getIn(touched, alias);
|
|
48159
|
+
const fieldError = getIn(errors, alias);
|
|
48160
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
47875
48161
|
const containerRef = useRef(null);
|
|
47876
48162
|
const [neuVars, setNeuVars] = useState({});
|
|
47877
48163
|
const errorId = `${alias}-error`;
|
|
@@ -47922,15 +48208,15 @@ const RadioGroupInput = (_a) => {
|
|
|
47922
48208
|
transform: none; /* Don't scale if pressed in */
|
|
47923
48209
|
}
|
|
47924
48210
|
` } })),
|
|
47925
|
-
React__default.createElement(I$1, { name: alias, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, disabled: readOnly, value:
|
|
48211
|
+
React__default.createElement(I$1, { name: alias, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, disabled: readOnly, value: fieldValue !== undefined && fieldValue !== null ? String(fieldValue) : undefined, onValueChange: (val) => {
|
|
47926
48212
|
setFieldValue(alias, val);
|
|
47927
|
-
setTimeout(() => setFieldTouched(alias, true), 0);
|
|
48213
|
+
setTimeout(() => setFieldTouched(alias, true, false), 0);
|
|
47928
48214
|
} },
|
|
47929
48215
|
React__default.createElement(o$6, { columns: columns || (direction === 'row' ? 'repeat(auto-fit, minmax(100px, 1fr))' : '1'), gap: "3", style: neuVars }, inputOptions.map((inputoption) => {
|
|
47930
|
-
const isChecked = String(
|
|
47931
|
-
return (React__default.createElement(p$5, { asChild: true, key: inputoption.optionvalue, align: "center", gap: "2" },
|
|
48216
|
+
const isChecked = String(fieldValue) === String(inputoption.optionvalue);
|
|
48217
|
+
return (React__default.createElement(p$5, { asChild: true, key: String(inputoption.optionvalue), align: "center", gap: "2" },
|
|
47932
48218
|
React__default.createElement(p$d, { as: "label", size: "2", style: { cursor: 'pointer' } },
|
|
47933
|
-
React__default.createElement(y$1, { value: inputoption.optionvalue, className: inputtype === 'radio-neumorphic' ? 'neu-radio' : '', style: Object.assign({}, (inputtype === 'radio-outline' ? {
|
|
48219
|
+
React__default.createElement(y$1, { value: String(inputoption.optionvalue), className: inputtype === 'radio-neumorphic' ? 'neu-radio' : '', style: Object.assign({}, (inputtype === 'radio-outline' ? {
|
|
47934
48220
|
border: isChecked ? '2px solid var(--accent-9)' : '2px solid var(--gray-8)',
|
|
47935
48221
|
backgroundColor: 'transparent'
|
|
47936
48222
|
} : {})) }),
|
|
@@ -47946,16 +48232,24 @@ const RadioGroupInput = (_a) => {
|
|
|
47946
48232
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
47947
48233
|
hasError ?
|
|
47948
48234
|
React__default.createElement(React__default.Fragment, null,
|
|
47949
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || `Required field`)) : null))));
|
|
48235
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || (typeof fieldError === 'string' ? fieldError : `Required field`))) : null))));
|
|
47950
48236
|
};
|
|
47951
48237
|
|
|
47952
48238
|
const OptionSelect = (_a) => {
|
|
47953
|
-
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder, inputOptions, style, newRow, isHinted, hintText, hintUrl, errorText } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "inputOptions", "style", "newRow", "isHinted", "hintText", "hintUrl", "errorText"]);
|
|
48239
|
+
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder, inputOptions, style, newRow, isHinted, hintText, hintUrl, errorText, formikContext } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "inputOptions", "style", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "formikContext"]);
|
|
47954
48240
|
const triggerRef = useRef(null);
|
|
47955
48241
|
const [neuVars, setNeuVars] = useState({});
|
|
47956
|
-
const
|
|
47957
|
-
const
|
|
47958
|
-
|
|
48242
|
+
const defaultFormikContext = useFormikContext();
|
|
48243
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
48244
|
+
if (!activeContext) {
|
|
48245
|
+
console.error(`OptionSelect '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
48246
|
+
return null;
|
|
48247
|
+
}
|
|
48248
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
48249
|
+
const fieldValue = getIn(values, alias);
|
|
48250
|
+
const fieldTouched = getIn(touched, alias);
|
|
48251
|
+
const fieldError = getIn(errors, alias);
|
|
48252
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
47959
48253
|
const errorId = `${alias}-error`;
|
|
47960
48254
|
useEffect(() => {
|
|
47961
48255
|
if (inputtype === 'dropdown-neumorphic' && triggerRef.current) {
|
|
@@ -48033,23 +48327,23 @@ const OptionSelect = (_a) => {
|
|
|
48033
48327
|
cursor: pointer;
|
|
48034
48328
|
}
|
|
48035
48329
|
` } })),
|
|
48036
|
-
React__default.createElement(C$1, { name: alias, disabled: readOnly, value:
|
|
48330
|
+
React__default.createElement(C$1, { name: alias, disabled: readOnly, value: fieldValue || "", onValueChange: (val) => {
|
|
48037
48331
|
const finalVal = val === "__RESET__" ? "" : val;
|
|
48038
48332
|
setFieldValue(alias, finalVal);
|
|
48039
|
-
setTimeout(() => setFieldTouched(alias, true), 0);
|
|
48333
|
+
setTimeout(() => setFieldTouched(alias, true, false), 0);
|
|
48040
48334
|
if (props.onValueChange)
|
|
48041
48335
|
props.onValueChange(finalVal);
|
|
48042
48336
|
}, onOpenChange: (isOpen) => {
|
|
48043
48337
|
if (!isOpen) {
|
|
48044
|
-
setFieldTouched(alias, true);
|
|
48338
|
+
setFieldTouched(alias, true, false);
|
|
48045
48339
|
}
|
|
48046
48340
|
} },
|
|
48047
48341
|
React__default.createElement(u$1, Object.assign({ id: `${alias}FormInput`, ref: triggerRef, variant: "ghost", placeholder: placeholder || "Select an option", className: `${inputtype === 'dropdown-neumorphic' ? 'neu-select-trigger' : ''} ${props.className || ''}`, style: Object.assign(Object.assign({}, activeTriggerStyle), style) }, props)),
|
|
48048
48342
|
React__default.createElement(g, { position: "popper", sideOffset: 5, style: activeContentStyle },
|
|
48049
48343
|
React__default.createElement(v, { value: "__RESET__", className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '', style: { color: 'var(--gray-10)', fontStyle: 'italic' } }, placeholder || "Select an option"),
|
|
48050
48344
|
React__default.createElement(o$2, { size: "4", style: { margin: '4px 0', opacity: 0.5 } }),
|
|
48051
|
-
inputOptions.map((inputoption) => (React__default.createElement(React__default.Fragment, { key: inputoption.optionid || crypto.randomUUID() }, inputoption.optionurl ? (React__default.createElement(v, { id: String(inputoption.optionid) || '', value: inputoption.optionvalue, className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' },
|
|
48052
|
-
React__default.createElement("a", { onClick: (e) => { e.stopPropagation(); openLink(inputoption.optionurl || "#"); }, style: { textDecoration: 'none', color: 'inherit' } }, inputoption.text))) : (React__default.createElement(v, { id: String(inputoption.optionid) || '', value: inputoption.optionvalue, className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' }, inputoption.text))))))),
|
|
48345
|
+
inputOptions.map((inputoption) => (React__default.createElement(React__default.Fragment, { key: inputoption.optionid || crypto.randomUUID() }, inputoption.optionurl ? (React__default.createElement(v, { id: String(inputoption.optionid) || '', value: String(inputoption.optionvalue), className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' },
|
|
48346
|
+
React__default.createElement("a", { onClick: (e) => { e.stopPropagation(); openLink(inputoption.optionurl || "#"); }, style: { textDecoration: 'none', color: 'inherit' } }, inputoption.text))) : (React__default.createElement(v, { id: String(inputoption.optionid) || '', value: String(inputoption.optionvalue), className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' }, inputoption.text))))))),
|
|
48053
48347
|
React__default.createElement("div", null,
|
|
48054
48348
|
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel),
|
|
48055
48349
|
"\u00A0",
|
|
@@ -48058,18 +48352,25 @@ const OptionSelect = (_a) => {
|
|
|
48058
48352
|
React__default.createElement(e, { content: hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
48059
48353
|
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
48060
48354
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
48061
|
-
hasError
|
|
48062
|
-
React__default.createElement(
|
|
48063
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || meta.error || "Required field")) : null))));
|
|
48355
|
+
hasError && (React__default.createElement(React__default.Fragment, null,
|
|
48356
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || (typeof fieldError === 'string' ? fieldError : "Required field"))))))));
|
|
48064
48357
|
};
|
|
48065
48358
|
|
|
48066
48359
|
const MultipleSelect = (_a) => {
|
|
48067
48360
|
var _b;
|
|
48068
|
-
var { inputtype = 'multiselect-outline', alias, readOnly, width, inputLabel, placeholder = '', newRow, isHinted, hintText, hintUrl, errorText, style, inputOptions, className } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "style", "inputOptions", "className"]);
|
|
48069
|
-
const
|
|
48070
|
-
const
|
|
48071
|
-
|
|
48072
|
-
|
|
48361
|
+
var { inputtype = 'multiselect-outline', alias, readOnly, width, inputLabel, placeholder = '', newRow, isHinted, hintText, hintUrl, errorText, style, inputOptions, className, formikContext } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "style", "inputOptions", "className", "formikContext"]);
|
|
48362
|
+
const defaultFormikContext = useFormikContext();
|
|
48363
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
48364
|
+
if (!activeContext) {
|
|
48365
|
+
console.error(`MultipleSelect '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
48366
|
+
return null;
|
|
48367
|
+
}
|
|
48368
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
48369
|
+
const fieldValue = getIn(values, alias);
|
|
48370
|
+
const fieldTouched = getIn(touched, alias);
|
|
48371
|
+
const fieldError = getIn(errors, alias);
|
|
48372
|
+
const selectedValues = (Array.isArray(fieldValue) ? fieldValue : []);
|
|
48373
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
48073
48374
|
const triggerRef = useRef(null);
|
|
48074
48375
|
const [neuVars, setNeuVars] = useState({});
|
|
48075
48376
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -48079,11 +48380,11 @@ const MultipleSelect = (_a) => {
|
|
|
48079
48380
|
? selectedValues.filter((v) => v !== value) // Remove Unselected Values
|
|
48080
48381
|
: [...selectedValues, value]; // Add Selected Values
|
|
48081
48382
|
setFieldValue(alias, newValues);
|
|
48082
|
-
setTimeout(() => setFieldTouched(alias, true), 0);
|
|
48383
|
+
setTimeout(() => setFieldTouched(alias, true, false), 0);
|
|
48083
48384
|
};
|
|
48084
48385
|
const displayLabel = selectedValues.length > 0
|
|
48085
48386
|
? inputOptions
|
|
48086
|
-
.filter(inputoption => selectedValues.includes(inputoption.optionvalue))
|
|
48387
|
+
.filter(inputoption => selectedValues.includes(String(inputoption.optionvalue)))
|
|
48087
48388
|
.map(inputoption => inputoption.text)
|
|
48088
48389
|
.join(', ')
|
|
48089
48390
|
: placeholder;
|
|
@@ -48124,9 +48425,14 @@ const MultipleSelect = (_a) => {
|
|
|
48124
48425
|
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
48125
48426
|
React__default.createElement(p$5, { direction: "column", gap: "2", style: { width: '100%' } },
|
|
48126
48427
|
React__default.createElement("input", { type: "hidden", name: alias, value: JSON.stringify(selectedValues) }),
|
|
48127
|
-
React__default.createElement(P$1, { onOpenChange:
|
|
48428
|
+
React__default.createElement(P$1, { onOpenChange: (open) => {
|
|
48429
|
+
setIsOpen(open);
|
|
48430
|
+
if (!open) {
|
|
48431
|
+
setFieldTouched(alias, true, false);
|
|
48432
|
+
}
|
|
48433
|
+
} },
|
|
48128
48434
|
React__default.createElement(s$1, null,
|
|
48129
|
-
React__default.createElement("button", { id: `${alias}FormInput`, type: "button", ref: triggerRef, className: className, style: Object.assign(Object.assign({}, activeTrigger), style), "aria-describedby": `${alias}InputLabel
|
|
48435
|
+
React__default.createElement("button", { id: `${alias}FormInput`, type: "button", ref: triggerRef, className: className, style: Object.assign(Object.assign({}, activeTrigger), style), "aria-describedby": `${alias}InputLabel`, disabled: readOnly },
|
|
48130
48436
|
React__default.createElement("span", { style: {
|
|
48131
48437
|
overflow: 'hidden',
|
|
48132
48438
|
textOverflow: 'ellipsis',
|
|
@@ -48139,9 +48445,12 @@ const MultipleSelect = (_a) => {
|
|
|
48139
48445
|
React__default.createElement(p$5, { direction: "column", gap: "1" }, inputOptions.map((inputoption) => {
|
|
48140
48446
|
const isSelected = selectedValues.some((val) => String(val)
|
|
48141
48447
|
=== String(inputoption.optionvalue));
|
|
48142
|
-
return (React__default.createElement(p$5, { id: String(inputoption.optionid) || '', key: inputoption.optionid, align: "center", gap: "2", onClick: () =>
|
|
48448
|
+
return (React__default.createElement(p$5, { id: String(inputoption.optionid) || '', key: inputoption.optionid, align: "center", gap: "2", onClick: () => {
|
|
48449
|
+
if (!readOnly)
|
|
48450
|
+
handleToggle(String(inputoption.optionvalue));
|
|
48451
|
+
}, style: {
|
|
48143
48452
|
padding: '8px',
|
|
48144
|
-
cursor: 'pointer',
|
|
48453
|
+
cursor: readOnly ? 'default' : 'pointer',
|
|
48145
48454
|
borderRadius: '4px',
|
|
48146
48455
|
backgroundColor: isSelected ? 'var(--accent-a3)' : 'transparent',
|
|
48147
48456
|
transition: 'background-color 0.1s'
|
|
@@ -48159,15 +48468,23 @@ const MultipleSelect = (_a) => {
|
|
|
48159
48468
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
48160
48469
|
hasError ?
|
|
48161
48470
|
React__default.createElement(React__default.Fragment, null,
|
|
48162
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || `Required field`)) : null))));
|
|
48471
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || (typeof fieldError === 'string' ? fieldError : `Required field`))) : null))));
|
|
48163
48472
|
};
|
|
48164
48473
|
|
|
48165
48474
|
const SliderInput = (_a) => {
|
|
48166
|
-
var { inputtype = 'slider-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, minvalue = 0, maxvalue = 100, stepvalue = 1, className, style } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "minvalue", "maxvalue", "stepvalue", "className", "style"]);
|
|
48167
|
-
const
|
|
48168
|
-
const
|
|
48169
|
-
|
|
48170
|
-
|
|
48475
|
+
var { inputtype = 'slider-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, minvalue = 0, maxvalue = 100, stepvalue = 1, className, style, formikContext } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "minvalue", "maxvalue", "stepvalue", "className", "style", "formikContext"]);
|
|
48476
|
+
const defaultFormikContext = useFormikContext();
|
|
48477
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
48478
|
+
if (!activeContext) {
|
|
48479
|
+
console.error(`SliderInput '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
48480
|
+
return null;
|
|
48481
|
+
}
|
|
48482
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
48483
|
+
const fieldVal = getIn(values, alias);
|
|
48484
|
+
const fieldTouched = getIn(touched, alias);
|
|
48485
|
+
const fieldError = getIn(errors, alias);
|
|
48486
|
+
const fieldValue = Array.isArray(fieldVal) ? fieldVal : [fieldVal || minvalue];
|
|
48487
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
48171
48488
|
const containerRef = useRef(null);
|
|
48172
48489
|
const [neuVars, setNeuVars] = useState({});
|
|
48173
48490
|
const errorId = `${alias}-error`;
|
|
@@ -48246,7 +48563,7 @@ const SliderInput = (_a) => {
|
|
|
48246
48563
|
React__default.createElement(s, { name: alias, id: `${alias}FormInput`, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, min: minvalue, max: maxvalue, step: stepvalue, value: fieldValue, onValueChange: (val) => {
|
|
48247
48564
|
setFieldValue(alias, val[0]);
|
|
48248
48565
|
}, onValueCommit: () => {
|
|
48249
|
-
setFieldTouched(alias, true);
|
|
48566
|
+
setFieldTouched(alias, true, false);
|
|
48250
48567
|
}, className: inputtype === 'slider-neumorphic' ? 'neu-slider' : inputtype === 'slider-outline' ? 'outline-slider' : '', style: neuVars }),
|
|
48251
48568
|
React__default.createElement("div", null,
|
|
48252
48569
|
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel),
|
|
@@ -48258,22 +48575,30 @@ const SliderInput = (_a) => {
|
|
|
48258
48575
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
48259
48576
|
hasError ?
|
|
48260
48577
|
React__default.createElement(React__default.Fragment, null,
|
|
48261
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || `Required field`)) : null))));
|
|
48578
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || (typeof fieldError === 'string' ? fieldError : `Required field`))) : null))));
|
|
48262
48579
|
};
|
|
48263
48580
|
|
|
48264
48581
|
const RangeSlider = (_a) => {
|
|
48265
|
-
var { inputtype = 'range-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, minvalue = 0, maxvalue = 100, stepvalue = 1, minStepsBetweenThumbs = 0, className, style } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "minvalue", "maxvalue", "stepvalue", "minStepsBetweenThumbs", "className", "style"]);
|
|
48266
|
-
const
|
|
48267
|
-
const
|
|
48582
|
+
var { inputtype = 'range-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, minvalue = 0, maxvalue = 100, stepvalue = 1, minStepsBetweenThumbs = 0, className, style, formikContext } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "minvalue", "maxvalue", "stepvalue", "minStepsBetweenThumbs", "className", "style", "formikContext"]);
|
|
48583
|
+
const defaultFormikContext = useFormikContext();
|
|
48584
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
48585
|
+
if (!activeContext) {
|
|
48586
|
+
console.error(`RangeSlider '${alias}' must be used within a Formik provider or receive a formikContext prop.`);
|
|
48587
|
+
return null;
|
|
48588
|
+
}
|
|
48589
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
48590
|
+
const fieldVal = getIn(values, alias);
|
|
48591
|
+
const fieldTouched = getIn(touched, alias);
|
|
48592
|
+
const fieldError = getIn(errors, alias);
|
|
48268
48593
|
// Range Formik Logic
|
|
48269
48594
|
// Synopsis
|
|
48270
48595
|
// Radix slider component requires an array.
|
|
48271
|
-
// If field
|
|
48272
|
-
// If field
|
|
48273
|
-
// If field
|
|
48274
|
-
const isRange = Array.isArray(
|
|
48275
|
-
const
|
|
48276
|
-
const hasError = Boolean(
|
|
48596
|
+
// If field value is [20, 80] pass [20, 80].
|
|
48597
|
+
// If field value is 50 we pass [50].
|
|
48598
|
+
// If field value is undefined, default to [min] or [min, max].
|
|
48599
|
+
const isRange = Array.isArray(fieldVal);
|
|
48600
|
+
const sliderValue = isRange ? fieldVal : [fieldVal || minvalue];
|
|
48601
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
48277
48602
|
const containerRef = useRef(null);
|
|
48278
48603
|
const [neuVars, setNeuVars] = useState({});
|
|
48279
48604
|
const errorId = `${alias}-error`;
|
|
@@ -48291,7 +48616,7 @@ const RangeSlider = (_a) => {
|
|
|
48291
48616
|
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
48292
48617
|
React__default.createElement(p$5, { direction: "column", gap: "3", width: "100%", ref: containerRef, style: style, className: className },
|
|
48293
48618
|
React__default.createElement(p$5, { justify: "between", align: "center" },
|
|
48294
|
-
React__default.createElement(p$d, { size: "2", color: "gray", style: { fontVariantNumeric: 'tabular-nums' } },
|
|
48619
|
+
React__default.createElement(p$d, { size: "2", color: "gray", style: { fontVariantNumeric: 'tabular-nums' } }, sliderValue.join(' - '))),
|
|
48295
48620
|
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: `
|
|
48296
48621
|
/* Neumorphic */
|
|
48297
48622
|
.neu-slider .rt-SliderTrack {
|
|
@@ -48322,12 +48647,12 @@ const RangeSlider = (_a) => {
|
|
|
48322
48647
|
background-color: white; border: 2px solid var(--accent-9); box-shadow: none;
|
|
48323
48648
|
}
|
|
48324
48649
|
` } }),
|
|
48325
|
-
React__default.createElement(s, { name: alias, id: `${alias}FormInput`, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, min: minvalue, max: maxvalue, step: stepvalue, minStepsBetweenThumbs: minStepsBetweenThumbs, value:
|
|
48650
|
+
React__default.createElement(s, { name: alias, id: `${alias}FormInput`, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, min: minvalue, max: maxvalue, step: stepvalue, minStepsBetweenThumbs: minStepsBetweenThumbs, value: sliderValue, onValueChange: (val) => {
|
|
48326
48651
|
// LOGIC SYNOPSIS:
|
|
48327
48652
|
// If Range, set value as array.
|
|
48328
48653
|
// If Slider, set value as first value.
|
|
48329
48654
|
setFieldValue(alias, isRange ? val : val[0]);
|
|
48330
|
-
}, onValueCommit: () => setFieldTouched(alias, true), className: inputtype === 'range-neumorphic' ? 'neu-slider' : inputtype === 'range-outline' ? 'outline-slider' : '', style: neuVars }),
|
|
48655
|
+
}, onValueCommit: () => setFieldTouched(alias, true, false), className: inputtype === 'range-neumorphic' ? 'neu-slider' : inputtype === 'range-outline' ? 'outline-slider' : '', style: neuVars }),
|
|
48331
48656
|
React__default.createElement("div", null,
|
|
48332
48657
|
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: `${alias}FormInput` }, inputLabel),
|
|
48333
48658
|
"\u00A0",
|
|
@@ -48338,14 +48663,22 @@ const RangeSlider = (_a) => {
|
|
|
48338
48663
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
48339
48664
|
hasError ?
|
|
48340
48665
|
React__default.createElement(React__default.Fragment, null,
|
|
48341
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || `Required field`)) : null))));
|
|
48666
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, errorText || (typeof fieldError === 'string' ? fieldError : `Required field`))) : null))));
|
|
48342
48667
|
};
|
|
48343
48668
|
|
|
48344
48669
|
const Toggle = (_a) => {
|
|
48345
|
-
var { inputtype = 'toggle-neumorphic', alias, readOnly, width, inputLabel, style, children, newRow, isHinted, hintText, hintUrl, errorText, icon = '
|
|
48346
|
-
const
|
|
48347
|
-
const
|
|
48348
|
-
|
|
48670
|
+
var { inputtype = 'toggle-neumorphic', alias, readOnly, width, inputLabel, style, children, newRow, isHinted, hintText, hintUrl, errorText, icon = 'layers', formikContext } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "style", "children", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "icon", "formikContext"]);
|
|
48671
|
+
const defaultFormikContext = useFormikContext();
|
|
48672
|
+
const activeContext = formikContext || defaultFormikContext;
|
|
48673
|
+
if (!activeContext) {
|
|
48674
|
+
console.error(`xForm Toggle '${alias}' must be used within a Formik context provider or receive a formikContext prop.`);
|
|
48675
|
+
return null;
|
|
48676
|
+
}
|
|
48677
|
+
const { values, touched, errors, setFieldValue, setFieldTouched } = activeContext;
|
|
48678
|
+
const fieldValue = getIn(values, alias) || false;
|
|
48679
|
+
const fieldTouched = getIn(touched, alias);
|
|
48680
|
+
const fieldError = getIn(errors, alias);
|
|
48681
|
+
const hasError = Boolean(fieldTouched && fieldError);
|
|
48349
48682
|
const containerRef = useRef(null);
|
|
48350
48683
|
const [neuVars, setNeuVars] = useState({
|
|
48351
48684
|
'--neu-bg': '#ecf0f3',
|
|
@@ -48379,14 +48712,14 @@ const Toggle = (_a) => {
|
|
|
48379
48712
|
const handleToggle = (val) => {
|
|
48380
48713
|
if (!readOnly) {
|
|
48381
48714
|
setFieldValue(alias, val);
|
|
48382
|
-
setFieldTouched(alias, true);
|
|
48715
|
+
setFieldTouched(alias, true, false);
|
|
48383
48716
|
}
|
|
48384
48717
|
};
|
|
48385
|
-
const iconColor =
|
|
48718
|
+
const iconColor = fieldValue && !readOnly ? 'var(--accent-9)' : 'var(--gray-8)';
|
|
48386
48719
|
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
48387
48720
|
React__default.createElement("div", { ref: containerRef, style: { width: '100%', display: 'flex', flexDirection: 'column', gap: '4px' } },
|
|
48388
48721
|
inputtype === 'toggle-neumorphic' ? (React__default.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '12px' } },
|
|
48389
|
-
React__default.createElement("div", { className: "neu-toggle-wrapper", style: Object.assign(Object.assign({}, neuVars), { opacity: readOnly ? 0.6 : 1, pointerEvents: readOnly ? 'none' : 'auto' }), onClick: () => handleToggle(!
|
|
48722
|
+
React__default.createElement("div", { className: "neu-toggle-wrapper", style: Object.assign(Object.assign({}, neuVars), { opacity: readOnly ? 0.6 : 1, pointerEvents: readOnly ? 'none' : 'auto' }), onClick: () => handleToggle(!fieldValue) },
|
|
48390
48723
|
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: `
|
|
48391
48724
|
.neu-toggle-wrapper {
|
|
48392
48725
|
isolation: isolate;
|
|
@@ -48424,13 +48757,13 @@ const Toggle = (_a) => {
|
|
|
48424
48757
|
transform: translate3d(25%, 0, 0);
|
|
48425
48758
|
}
|
|
48426
48759
|
` } }),
|
|
48427
|
-
React__default.createElement("input", { id: `${alias}FormInput`, className: "neu-toggle-state", type: "checkbox", checked: !!
|
|
48760
|
+
React__default.createElement("input", { id: `${alias}FormInput`, className: "neu-toggle-state", type: "checkbox", checked: !!fieldValue, readOnly: true }),
|
|
48428
48761
|
React__default.createElement("div", { className: "neu-indicator" })),
|
|
48429
48762
|
React__default.createElement(Icon, { name: icon, height: "20", width: "20", color: iconColor, style: {
|
|
48430
48763
|
transition: 'color 0.3s ease',
|
|
48431
48764
|
opacity: readOnly ? 0.5 : 1,
|
|
48432
48765
|
cursor: 'pointer'
|
|
48433
|
-
}, onClick: () => handleToggle(!
|
|
48766
|
+
}, onClick: () => handleToggle(!fieldValue) }))) : (React__default.createElement(Root, { pressed: fieldValue, onPressedChange: handleToggle, name: alias, disabled: readOnly, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, asChild: true },
|
|
48434
48767
|
React__default.createElement(o$a, Object.assign({ disabled: readOnly }, props, { className: `design-toggle ${inputtype} ${props.className || ''}`, style: Object.assign(Object.assign(Object.assign(Object.assign({}, style), (inputtype === 'toggle' ? materialStyle : {})), (inputtype === 'toggle-material' ? materialStyle : {})), (inputtype === 'toggle-outline' ? outlineStyle : {})), type: "button" }),
|
|
48435
48768
|
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: `
|
|
48436
48769
|
.design-toggle.toggle-material[data-state='on'] {
|
|
@@ -48459,7 +48792,7 @@ const Toggle = (_a) => {
|
|
|
48459
48792
|
isHinted && (React__default.createElement(e, { content: hintText || "No hint available" },
|
|
48460
48793
|
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { marginLeft: 6 } },
|
|
48461
48794
|
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
48462
|
-
hasError && (React__default.createElement(p$d, { size: "1", color: "red", style: { display: 'block', marginTop: 2 } }, errorText || `Required field`))))));
|
|
48795
|
+
hasError && (React__default.createElement(p$d, { size: "1", color: "red", style: { display: 'block', marginTop: 2 } }, errorText || fieldError || `Required field`))))));
|
|
48463
48796
|
};
|
|
48464
48797
|
|
|
48465
48798
|
const SectionTitle = ({ title, width = 12, newRow = true, size = "5", subsize = "2", subTitle, align = "left", letterSpacing = "0.13em", withSeparator = true, className, backgroundColor, icon, titleColor, subtitleColor }) => {
|
|
@@ -48793,7 +49126,7 @@ const CodexItem = ({ stepId, children, }) => {
|
|
|
48793
49126
|
return (React__default.createElement("div", { className: "v-step-content-animation", style: { width: '100%' } }, children));
|
|
48794
49127
|
};
|
|
48795
49128
|
|
|
48796
|
-
const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLabel = "Back", finishLabel = "Submit", prevIcon = "doublearrowleft", nextIcon = "doublearrowright", finishIcon = "paperplane", onNext, onPrev, onFinish }) => {
|
|
49129
|
+
const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLabel = "Back", finishLabel = "Submit", prevIcon = "doublearrowleft", nextIcon = "doublearrowright", finishIcon = "paperplane", onSubmit = false, onNext, onPrev, onFinish }) => {
|
|
48797
49130
|
const { setActiveStepId, brandColor } = useStepper();
|
|
48798
49131
|
const handlePrev = () => {
|
|
48799
49132
|
if (onPrev)
|
|
@@ -48818,7 +49151,7 @@ const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLab
|
|
|
48818
49151
|
React__default.createElement(Icon, { name: prevIcon }),
|
|
48819
49152
|
"\u00A0")),
|
|
48820
49153
|
prevLabel)) : (React__default.createElement("div", null)),
|
|
48821
|
-
React__default.createElement(o$a, { variant: "solid", color: brandColor ? undefined : (nextStepId ? "blue" : "green"), onClick: handleNext, style: Object.assign({ cursor: 'pointer' }, (brandColor ? { backgroundColor: 'var(--codex-brand)', color: '#fff' } : {})) }, nextStepId ? (React__default.createElement(React__default.Fragment, null,
|
|
49154
|
+
React__default.createElement(o$a, { variant: "solid", color: brandColor ? undefined : (nextStepId ? "blue" : "green"), onClick: handleNext, style: Object.assign({ cursor: 'pointer' }, (brandColor ? { backgroundColor: 'var(--codex-brand)', color: '#fff' } : {})), type: onSubmit && !nextStepId ? "submit" : "button" }, nextStepId ? (React__default.createElement(React__default.Fragment, null,
|
|
48822
49155
|
nextIcon && React__default.createElement(React__default.Fragment, null,
|
|
48823
49156
|
React__default.createElement(Icon, { name: nextIcon }),
|
|
48824
49157
|
"\u00A0"),
|
|
@@ -48845,22 +49178,22 @@ const phoneInputType = ["phone", "phoneinput", "phone-input", "input-phone", "in
|
|
|
48845
49178
|
const creditCardInputType = ["creditcard", "creditcardinput", "creditcard-input", "input-creditcard", "inputcreditcard"];
|
|
48846
49179
|
const currencyInputType = ["currency", "currencyinput", "currency-input", "input-currency", "inputcurrency"];
|
|
48847
49180
|
const stockInputType = ["stock", "stockinput", "stock-input", "input-stock", "inputstock"];
|
|
48848
|
-
const radioInputType = ["radio", "radioinput", "radio-input", "input-radio", "inputradio"];
|
|
48849
|
-
const selectInputType = ["select", "selectinput", "select-input", "input-select", "inputselect"];
|
|
49181
|
+
const radioInputType = ["radio", "radioinput", "radio-input", "input-radio", "inputradio", "radiogroup", "radiogroup-input"];
|
|
49182
|
+
const selectInputType = ["select", "selectinput", "select-input", "input-select", "inputselect", "optionselect", "optionselect-input", "input-optionselect"];
|
|
48850
49183
|
const selectMultipleInputType = ["selectmultiple", "selectmultipleinput", "selectmultiple-input", "input-selectmultiple", "inputselectmultiple"];
|
|
48851
49184
|
const sliderInputType = ["slider", "sliderinput", "slider-input", "input-slider", "inputslider"];
|
|
48852
49185
|
const rangeSliderInputType = ["range", "rangeslider", "rangeinput", "rangesliderinput", "rangeslider-input", "range-input", "input-rangeslider", "inputrangeslider"];
|
|
48853
49186
|
const toggleInputType = ["toggle", "switch", "toggleinput", "toggle-input", "input-toggle", "inputtoggle"];
|
|
48854
49187
|
const conditionalInputType = ["conditional", "conditionaltoggle", "conditionalcheckbox", "conditionalselect", "conditional-toggle", "conditional-select", "conditional-checkbox"];
|
|
48855
49188
|
|
|
48856
|
-
const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice', brandColor = "#000000" }) => {
|
|
49189
|
+
const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice', brandColor = "#000000", onPrev, onNext, onFinish }) => {
|
|
48857
49190
|
const [dualToggled, setDualToggled] = useState(false);
|
|
48858
49191
|
const [neuVars] = useState({
|
|
48859
49192
|
'--neu-bg': '#ecf0f3',
|
|
48860
49193
|
'--neu-shadow-light': '#ffffff',
|
|
48861
49194
|
'--neu-shadow-dark': '#d1d9e6'
|
|
48862
49195
|
});
|
|
48863
|
-
const inputAlphaTrion = (inputAlias, inputType, inputWidth, inputLabel, inputMinValue, inputMaxValue, defaultValue, inputOptions, stepValue, inputHeight, toggledInput, newRow, inputPlaceholder, readOnly, isHinted, hintText, hintUrl, errorText, inputUID) => {
|
|
49196
|
+
const inputAlphaTrion = (inputAlias, inputType, inputWidth, inputLabel, inputMinValue, inputMaxValue, defaultValue, inputOptions, stepValue, inputHeight, toggledInput, triggerValue, newRow, inputPlaceholder, readOnly, isHinted, hintText, hintUrl, errorText, inputUID) => {
|
|
48864
49197
|
if (inputWidth == null || inputWidth > 12)
|
|
48865
49198
|
inputWidth = 4;
|
|
48866
49199
|
if (inputHeight == null)
|
|
@@ -48876,7 +49209,7 @@ const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice',
|
|
|
48876
49209
|
case buttonInputType.includes(normalizedType):
|
|
48877
49210
|
return React__default.createElement(ButtonInput, { alias: inputAlias, width: inputWidth, readOnly: readOnly, newRow: newRow, key: inputUID }, defaultValue);
|
|
48878
49211
|
case checkboxInputType.includes(normalizedType):
|
|
48879
|
-
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 });
|
|
49212
|
+
return React__default.createElement(CheckboxGroupInput, { alias: inputAlias, width: inputWidth, inputLabel: inputLabel, inputOptions: inputOptions || [InputOptionsPlaceholder], newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48880
49213
|
case conditionalInputType.includes(normalizedType):
|
|
48881
49214
|
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 });
|
|
48882
49215
|
case datePickerInputType.includes(normalizedType):
|
|
@@ -48886,7 +49219,7 @@ const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice',
|
|
|
48886
49219
|
case dateTimePickerInputType.includes(normalizedType):
|
|
48887
49220
|
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 });
|
|
48888
49221
|
case dropdownInputType.includes(normalizedType):
|
|
48889
|
-
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 });
|
|
49222
|
+
return React__default.createElement(Dropdown, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions || [InputOptionsPlaceholder], newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48890
49223
|
case fileInputType.includes(normalizedType):
|
|
48891
49224
|
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 });
|
|
48892
49225
|
case fileMultipleInputType.includes(normalizedType):
|
|
@@ -48906,11 +49239,11 @@ const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice',
|
|
|
48906
49239
|
case stockInputType.includes(normalizedType):
|
|
48907
49240
|
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 });
|
|
48908
49241
|
case radioInputType.includes(normalizedType):
|
|
48909
|
-
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 });
|
|
49242
|
+
return React__default.createElement(RadioGroupInput, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions || [InputOptionsPlaceholder], newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48910
49243
|
case selectInputType.includes(normalizedType):
|
|
48911
|
-
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 });
|
|
49244
|
+
return React__default.createElement(OptionSelect, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions || [InputOptionsPlaceholder], newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48912
49245
|
case selectMultipleInputType.includes(normalizedType):
|
|
48913
|
-
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 });
|
|
49246
|
+
return React__default.createElement(MultipleSelect, { alias: inputAlias, inputLabel: inputLabel, width: inputWidth, inputOptions: inputOptions || [InputOptionsPlaceholder], newRow: newRow, readOnly: readOnly, isHinted: isHinted, hintText: hintText, hintUrl: hintUrl, key: inputUID, errorText: errorText });
|
|
48914
49247
|
case sliderInputType.includes(normalizedType):
|
|
48915
49248
|
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 });
|
|
48916
49249
|
case rangeSliderInputType.includes(normalizedType):
|
|
@@ -48924,7 +49257,9 @@ const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice',
|
|
|
48924
49257
|
const renderQueries = (queries) => {
|
|
48925
49258
|
if (!queries)
|
|
48926
49259
|
return null;
|
|
48927
|
-
return queries.map((xFormelement) => (React__default.createElement(React__default.Fragment, { key: xFormelement.queryId }, inputAlphaTrion(xFormelement.inputAlias, xFormelement.inputType, xFormelement.inputWidth, xFormelement.inputLabel,
|
|
49260
|
+
return queries.map((xFormelement) => (React__default.createElement(React__default.Fragment, { key: xFormelement.queryId }, inputAlphaTrion(xFormelement.inputAlias, xFormelement.inputType, xFormelement.inputWidth, xFormelement.inputLabel, String(xFormelement.minValue), String(xFormelement.maxValue), xFormelement.defaultValue, xFormelement.inputOptions, xFormelement.stepValue, xFormelement.inputHeight,
|
|
49261
|
+
// Conditional ToggledInput (React Node) recursive handling
|
|
49262
|
+
xFormelement.toggledInput ? inputAlphaTrion(xFormelement.toggledInput.inputAlias, xFormelement.toggledInput.inputType, xFormelement.toggledInput.inputWidth, xFormelement.toggledInput.inputLabel, String(xFormelement.toggledInput.minValue), String(xFormelement.toggledInput.maxValue), xFormelement.toggledInput.defaultValue, xFormelement.toggledInput.inputOptions, xFormelement.toggledInput.stepValue, xFormelement.toggledInput.inputHeight, null, 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.triggerValue, xFormelement.newRow, xFormelement.inputPlaceholder, readOnlyMode, xFormelement.isHinted, xFormelement.hintText || "", xFormelement.hintUrl || "", xFormelement.errorText, String(xFormelement.queryId) || crypto.randomUUID()))));
|
|
48928
49263
|
};
|
|
48929
49264
|
const renderDisplayMode = () => {
|
|
48930
49265
|
switch (displayMode) {
|
|
@@ -48973,7 +49308,7 @@ const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice',
|
|
|
48973
49308
|
` } }),
|
|
48974
49309
|
React__default.createElement("input", { id: `teletraan1DualToggle`, className: "neu-toggle-state", type: "checkbox", checked: dualToggled, readOnly: true }),
|
|
48975
49310
|
React__default.createElement("div", { className: "neu-indicator" })),
|
|
48976
|
-
React__default.createElement(Icon, { name: "
|
|
49311
|
+
React__default.createElement(Icon, { name: "layers", height: "20", width: "20", color: brandColor, style: {
|
|
48977
49312
|
transition: 'color 0.3s ease',
|
|
48978
49313
|
opacity: readOnlyMode ? 0.5 : 1,
|
|
48979
49314
|
cursor: 'pointer'
|
|
@@ -49002,7 +49337,13 @@ const Teletraan1 = ({ xFormModel, readOnlyMode = false, displayMode = 'codice',
|
|
|
49002
49337
|
const nextStepId = index < array.length - 1 ? String(array[index + 1].sectionId) : undefined;
|
|
49003
49338
|
return (React__default.createElement(CodexItem, { key: formsection.sectionId, stepId: String(formsection.sectionId), title: formsection.title },
|
|
49004
49339
|
React__default.createElement(Row, { key: formsection.sectionId }, renderQueries(formsection.queries)),
|
|
49005
|
-
React__default.createElement(CodexControls, { prevStepId: prevStepId, nextStepId: nextStepId, onPrev: () =>
|
|
49340
|
+
React__default.createElement(CodexControls, { prevStepId: prevStepId, nextStepId: nextStepId, onPrev: () => {
|
|
49341
|
+
console.log(`Teletraan-1 Codex :: ${formsection.title} :: onPrev()`);
|
|
49342
|
+
}, onNext: () => {
|
|
49343
|
+
console.log(`Teletraan-1 Codex :: ${formsection.title} :: onNext()`);
|
|
49344
|
+
}, onFinish: () => {
|
|
49345
|
+
console.log(`Teletraan-1 Codex :: ${formsection.title} :: onFinish()`);
|
|
49346
|
+
} })));
|
|
49006
49347
|
}))));
|
|
49007
49348
|
case 'codice':
|
|
49008
49349
|
default:
|
|
@@ -53465,12 +53806,13 @@ function superRefine(fn) {
|
|
|
53465
53806
|
|
|
53466
53807
|
// JSON defintion (schema) for xForm object
|
|
53467
53808
|
const InputOptionSchema = object({
|
|
53468
|
-
|
|
53809
|
+
optionid: number().or(uuid()),
|
|
53469
53810
|
text: string(),
|
|
53470
|
-
|
|
53471
|
-
|
|
53472
|
-
|
|
53473
|
-
|
|
53811
|
+
optionvalue: string(),
|
|
53812
|
+
tag: string().optional(),
|
|
53813
|
+
score: number().or(float64()).optional(),
|
|
53814
|
+
note: string().optional(),
|
|
53815
|
+
optionurl: url().optional(),
|
|
53474
53816
|
});
|
|
53475
53817
|
const NestedQuerySchema = object({
|
|
53476
53818
|
queryId: number().or(uuid()),
|
|
@@ -53490,9 +53832,9 @@ const NestedQuerySchema = object({
|
|
|
53490
53832
|
hintText: string().nullish(),
|
|
53491
53833
|
hintUrl: url().nullish(),
|
|
53492
53834
|
queryResponse: any().nullable(),
|
|
53493
|
-
inputOptions: array(InputOptionSchema).
|
|
53835
|
+
inputOptions: array(InputOptionSchema).optional(),
|
|
53494
53836
|
toggledInput: any().nullable().optional(),
|
|
53495
|
-
|
|
53837
|
+
triggerValue: any().nullable().optional(),
|
|
53496
53838
|
errorText: string().optional()
|
|
53497
53839
|
});
|
|
53498
53840
|
const QuerySchema = object({
|
|
@@ -53515,11 +53857,11 @@ const QuerySchema = object({
|
|
|
53515
53857
|
queryResponse: any().nullable(),
|
|
53516
53858
|
inputOptions: array(InputOptionSchema).optional(),
|
|
53517
53859
|
toggledInput: NestedQuerySchema.nullable().optional(),
|
|
53518
|
-
|
|
53860
|
+
triggerValue: any().nullable().optional(),
|
|
53519
53861
|
errorText: string().optional()
|
|
53520
53862
|
});
|
|
53521
53863
|
const SectionSchema = object({
|
|
53522
|
-
sectionId: number(),
|
|
53864
|
+
sectionId: number().or(string()),
|
|
53523
53865
|
title: string(),
|
|
53524
53866
|
icon: string().nullable(),
|
|
53525
53867
|
queries: array(QuerySchema)
|
|
@@ -53527,7 +53869,7 @@ const SectionSchema = object({
|
|
|
53527
53869
|
const xFormSchema = object({
|
|
53528
53870
|
uuid: uuid(),
|
|
53529
53871
|
name: string(),
|
|
53530
|
-
logo:
|
|
53872
|
+
logo: url().nullable(),
|
|
53531
53873
|
brandcolor: string().nullable(),
|
|
53532
53874
|
logoPosition: string().nullable(),
|
|
53533
53875
|
model: array(SectionSchema),
|