kui-complex 0.0.61 → 0.0.62
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/ButtonSelect/cjs/index.js +12 -14
- package/ButtonSelect/cjs/index.js.map +1 -1
- package/ButtonSelect/index.d.ts +12 -12
- package/ButtonSelect/index.js +12 -14
- package/ButtonSelect/index.js.map +1 -1
- package/CalendarHeaderWithSelect/cjs/index.js +12 -14
- package/CalendarHeaderWithSelect/cjs/index.js.map +1 -1
- package/CalendarHeaderWithSelect/index.d.ts +3 -3
- package/CalendarHeaderWithSelect/index.js +12 -14
- package/CalendarHeaderWithSelect/index.js.map +1 -1
- package/InputDropdown/cjs/index.js +2 -7
- package/InputDropdown/cjs/index.js.map +1 -1
- package/InputDropdown/index.js +2 -7
- package/InputDropdown/index.js.map +1 -1
- package/InputSelect/cjs/index.js +12 -14
- package/InputSelect/cjs/index.js.map +1 -1
- package/InputSelect/index.d.ts +12 -12
- package/InputSelect/index.js +12 -14
- package/InputSelect/index.js.map +1 -1
- package/InputSelectDropdown/cjs/index.js +2 -7
- package/InputSelectDropdown/cjs/index.js.map +1 -1
- package/InputSelectDropdown/index.d.ts +3 -3
- package/InputSelectDropdown/index.js +2 -7
- package/InputSelectDropdown/index.js.map +1 -1
- package/InputWithDatePicker/cjs/index.js +12 -14
- package/InputWithDatePicker/cjs/index.js.map +1 -1
- package/InputWithDatePicker/index.js +12 -14
- package/InputWithDatePicker/index.js.map +1 -1
- package/SelectMonth/cjs/index.js +12 -14
- package/SelectMonth/cjs/index.js.map +1 -1
- package/SelectMonth/index.d.ts +12 -12
- package/SelectMonth/index.js +12 -14
- package/SelectMonth/index.js.map +1 -1
- package/SelectYear/cjs/index.js +12 -14
- package/SelectYear/cjs/index.js.map +1 -1
- package/SelectYear/index.d.ts +12 -12
- package/SelectYear/index.js +12 -14
- package/SelectYear/index.js.map +1 -1
- package/TestForm/cjs/index.js +12 -14
- package/TestForm/cjs/index.js.map +1 -1
- package/TestForm/index.js +12 -14
- package/TestForm/index.js.map +1 -1
- package/cjs/index.js +12 -14
- package/cjs/index.js.map +1 -1
- package/index.d.ts +12 -12
- package/index.js +12 -14
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -75,14 +75,11 @@ var InputDropdown = react.forwardRef(function (props, ref) {
|
|
|
75
75
|
};
|
|
76
76
|
});
|
|
77
77
|
react.useEffect(function () {
|
|
78
|
-
var _a
|
|
78
|
+
var _a;
|
|
79
79
|
if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
|
|
80
|
-
var inputMessage = (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(".KUI-InputMessage");
|
|
81
80
|
if (isOpen) {
|
|
82
81
|
buttonRef.current.style.zIndex = "4";
|
|
83
|
-
|
|
84
|
-
inputMessage.style.opacity = "0";
|
|
85
|
-
var scrollContainer = (_b = dropdownRef.current) === null || _b === void 0 ? void 0 : _b.children[0].children[0];
|
|
82
|
+
var scrollContainer = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0];
|
|
86
83
|
if (scrollContainer) {
|
|
87
84
|
var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
|
|
88
85
|
setIsScrollable(hasScroll);
|
|
@@ -90,8 +87,6 @@ var InputDropdown = react.forwardRef(function (props, ref) {
|
|
|
90
87
|
}
|
|
91
88
|
else {
|
|
92
89
|
buttonRef.current.style.zIndex = "1";
|
|
93
|
-
if (inputMessage)
|
|
94
|
-
inputMessage.style.opacity = "1";
|
|
95
90
|
}
|
|
96
91
|
}
|
|
97
92
|
}, [isOpen]);
|
|
@@ -180,7 +175,7 @@ var getFormError = function (name, form) {
|
|
|
180
175
|
var InputSelect = react.forwardRef(function (props, ref) {
|
|
181
176
|
var _a, _b;
|
|
182
177
|
var options = props.options, name = props.name, handleChange = props.handleChange, form = props.form, iconProps = props.iconProps, defaultValue = props.value, other = __rest(props, ["options", "name", "handleChange", "form", "iconProps", "value"]);
|
|
183
|
-
var _c = react.useState(false),
|
|
178
|
+
var _c = react.useState(false), isDropdownOpen = _c[0], setIsDropdownOpen = _c[1];
|
|
184
179
|
var _d = react.useState(defaultValue || getFormValue(name, form)), value = _d[0], setValue = _d[1];
|
|
185
180
|
var error = getFormError(name, form);
|
|
186
181
|
var inputRef = react.useRef(null);
|
|
@@ -191,10 +186,10 @@ var InputSelect = react.forwardRef(function (props, ref) {
|
|
|
191
186
|
if ((_b = (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) {
|
|
192
187
|
(_d = (_c = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _c === void 0 ? void 0 : _c.parentElement) === null || _d === void 0 ? void 0 : _d.parentElement.focus();
|
|
193
188
|
}
|
|
194
|
-
|
|
189
|
+
setIsDropdownOpen(function (prev) { return !prev; });
|
|
195
190
|
};
|
|
196
191
|
var handleCloseDropdown = function () {
|
|
197
|
-
|
|
192
|
+
setIsDropdownOpen(false);
|
|
198
193
|
};
|
|
199
194
|
var handleSelect = function (option) {
|
|
200
195
|
setValue(option.value);
|
|
@@ -219,15 +214,18 @@ var InputSelect = react.forwardRef(function (props, ref) {
|
|
|
219
214
|
inputRef.current = e;
|
|
220
215
|
register === null || register === void 0 ? void 0 : register.ref(e);
|
|
221
216
|
};
|
|
222
|
-
return (jsxRuntime$1.jsxs(Wrapper$1, { children: [jsxRuntime$1.jsx("input", { name: name, autoComplete: "off", hidden: true }), jsxRuntime$1.jsx(StyledInput, __assign({ onClick: handleOpenDropdown, readOnly: true, value: selectedLabel, message: error }, other, { endIcon: !props.disabled && (jsxRuntime$1.jsx(kuiIcon.HalfArrowIcon, __assign({ width: 12, height: 13, css: [
|
|
217
|
+
return (jsxRuntime$1.jsxs(Wrapper$1, { children: [jsxRuntime$1.jsx("input", { name: name, autoComplete: "off", hidden: true }), jsxRuntime$1.jsx(StyledInput, __assign({ onClick: handleOpenDropdown, readOnly: true, value: selectedLabel, message: error, isDropdownOpen: isDropdownOpen }, other, { endIcon: !props.disabled && (jsxRuntime$1.jsx(kuiIcon.HalfArrowIcon, __assign({ width: 12, height: 13, css: [
|
|
223
218
|
{ transition: "all linear .2s" },
|
|
224
|
-
|
|
219
|
+
isDropdownOpen && { transform: "rotate(180deg)" },
|
|
225
220
|
] }, iconProps))) }, register, { ref: forwardedRef })), options && options.length > 0 && !props.disabled && (jsxRuntime$1.jsx(InputSelectDropdown, { options: options, inputRef: {
|
|
226
221
|
current: (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
|
|
227
|
-
}, isOpenDropdown:
|
|
222
|
+
}, isOpenDropdown: isDropdownOpen, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, selectedValue: value }))] }));
|
|
228
223
|
});
|
|
229
224
|
var Wrapper$1 = styled__default["default"].div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n position: relative;\n text-align: left;\n width: fit-content;\n"], ["\n position: relative;\n text-align: left;\n width: fit-content;\n"])));
|
|
230
|
-
var StyledInput = styled__default["default"](kuiBasic.InputWithAdornments)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n"], ["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n"])))
|
|
225
|
+
var StyledInput = styled__default["default"](kuiBasic.InputWithAdornments)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n .KUI-InputMessage {\n opacity: ", ";\n }\n"], ["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n .KUI-InputMessage {\n opacity: ", ";\n }\n"])), function (_a) {
|
|
226
|
+
var isDropdownOpen = _a.isDropdownOpen;
|
|
227
|
+
return (isDropdownOpen ? 0 : 1);
|
|
228
|
+
});
|
|
231
229
|
var templateObject_1$1, templateObject_2;
|
|
232
230
|
|
|
233
231
|
var checkDisabled$1 = function (year, min, max) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/tslib/tslib.es6.js","../../../src/components/InputDropdown/index.tsx","../../../src/components/InputSelectDropdown/index.tsx","../../../src/utils/form.ts","../../../src/components/InputSelect/index.tsx","../../../src/components/SelectYear/index.tsx","../../../src/components/SelectMonth/index.tsx","../../../src/components/CalendarHeaderWithSelect/index.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import * as React from \"react\"\nimport { ForwardedRef, forwardRef, useEffect, useRef, useState } from \"react\"\nimport { Grid, theme } from \"kui-basic\"\nimport styled from \"@emotion/styled\"\nimport { InputDropdownProps } from \"./types\"\nimport {\n DropdownScrollStylesProps,\n DropdownStylesProps,\n} from \"../InputSelectDropdown/types\"\n\nconst InputDropdown = forwardRef(\n (props: InputDropdownProps, ref: ForwardedRef<HTMLDivElement>) => {\n const {\n isOpen,\n handleClose,\n buttonRef,\n children,\n endComponent,\n ...otherProps\n } = props\n const [isScrollable, setIsScrollable] = useState(false)\n const dropdownRef = useRef<HTMLDivElement | null>(null)\n\n const closePopUp = (e: any) => {\n if (dropdownRef.current && buttonRef && buttonRef.current) {\n if (\n !dropdownRef.current.contains(e.target) &&\n !buttonRef.current.contains(e.target)\n ) {\n handleClose()\n }\n }\n }\n\n useEffect(() => {\n document.addEventListener(\"click\", closePopUp)\n return () => {\n document.removeEventListener(\"click\", closePopUp)\n }\n })\n\n useEffect(() => {\n if (buttonRef?.current) {\n const inputMessage = buttonRef.current?.querySelector(\n \".KUI-InputMessage\"\n ) as HTMLDivElement | null\n if (isOpen) {\n buttonRef.current.style.zIndex = \"4\"\n if (inputMessage) inputMessage.style.opacity = \"0\"\n const scrollContainer = dropdownRef.current?.children[0].children[0]\n if (scrollContainer) {\n const hasScroll =\n scrollContainer.scrollHeight > scrollContainer.clientHeight\n setIsScrollable(hasScroll)\n }\n } else {\n buttonRef.current.style.zIndex = \"1\"\n if (inputMessage) inputMessage.style.opacity = \"1\"\n }\n }\n }, [isOpen])\n\n if (!isOpen) {\n return null\n }\n\n const forwardedRef = (elem: HTMLDivElement) => {\n if (typeof ref === \"function\") ref(elem)\n else if (ref) ref.current = elem\n\n dropdownRef.current = elem\n }\n\n return (\n <StyledDropdown\n data-testid=\"input_dropdown\"\n container\n ref={forwardedRef}\n isOpen={isOpen}\n {...otherProps}\n >\n <StyledWrapper isScrollable={isScrollable}>\n <ScrollingContainer\n isScrollable={isScrollable}\n className=\"KUI-InputDropdown_scroll\"\n >\n {children}\n </ScrollingContainer>\n </StyledWrapper>\n {endComponent}\n </StyledDropdown>\n )\n }\n)\n\nexport default InputDropdown\n\nconst StyledDropdown = styled(Grid)<DropdownStylesProps>`\n width: 100%;\n display: ${({ isOpen }) => (isOpen ? \"flex\" : \"none\")};\n position: absolute;\n background: ${theme.palette.grey.zero};\n z-index: 3;\n top: 50px;\n box-shadow: 0px 26px 34px 0px #0000001a;\n border-radius: 0 0 8px 8px;\n user-select: none;\n`\n\nconst StyledWrapper = styled.div<DropdownScrollStylesProps>`\n width: 100%;\n box-sizing: border-box;\n padding: ${({ isScrollable }) =>\n isScrollable ? \"14px 8px 8px 0\" : \"14px 0px 8px 0\"};\n`\n\nconst ScrollingContainer = styled.div<DropdownScrollStylesProps>`\n width: 100%;\n max-height: 389px;\n box-sizing: border-box;\n z-index: 3;\n overflow: auto;\n -ms-overflow-style: none;\n overflow-y: scroll;\n overflow-x: hidden;\n user-select: none;\n ::-webkit-scrollbar {\n width: ${({ isScrollable }) => (isScrollable ? \"4px\" : \"0px\")};\n position: absolute;\n right: 8px;\n }\n ::-webkit-scrollbar-track,\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n transition: all ease-out 0.3s;\n }\n\n ::-webkit-resizer,\n ::-webkit-scrollbar-button,\n ::-webkit-scrollbar-corner {\n display: none;\n }\n ::-webkit-scrollbar-track {\n background: ${theme.palette.grey.fifteenB};\n }\n\n ::-webkit-scrollbar-thumb {\n background: ${theme.palette.grey.thirty};\n }\n`\n","/** @jsxImportSource @emotion/react */\nimport * as React from \"react\"\nimport { ForwardedRef, forwardRef, useEffect, useRef } from \"react\"\nimport styled from \"@emotion/styled\"\nimport { css } from \"@emotion/react\"\nimport { Caption, theme } from \"kui-basic\"\nimport { InputSelectDropdownProps } from \"./types\"\nimport { OptionParams } from \"../InputSelect/types\"\nimport InputDropdown from \"../InputDropdown\"\n\nconst InputSelectDropdown = forwardRef(\n (\n {\n options,\n inputRef,\n isOpenDropdown,\n handleCloseDropdown,\n handleSelect,\n selectedValue,\n }: InputSelectDropdownProps,\n ref: ForwardedRef<HTMLDivElement>\n ) => {\n const dropdownRef = useRef<HTMLDivElement | null>(null)\n\n useEffect(() => {\n if (isOpenDropdown) {\n const element = document.querySelector(\n `[data-value=autocomplete_option_${selectedValue}]`\n )\n const coordinates = element?.getBoundingClientRect()\n\n if (coordinates && inputRef.current && element) {\n dropdownRef.current?.scrollTo({\n top:\n coordinates.top -\n inputRef.current.clientHeight -\n element.clientHeight,\n })\n }\n }\n }, [isOpenDropdown])\n\n const forwardedRef = (elem: HTMLDivElement) => {\n if (ref) {\n if (typeof ref === \"function\") ref(elem)\n else ref.current = elem\n }\n dropdownRef.current = elem\n }\n\n return (\n <StyledDropdown\n ref={forwardedRef}\n buttonRef={inputRef}\n isOpen={isOpenDropdown}\n handleClose={handleCloseDropdown}\n >\n {options.map((option: OptionParams, key: number) => (\n <OptionWrapper\n key={option.label}\n onClick={() => handleSelect(option)}\n data-value={`autocomplete_option_${option.value}`}\n data-testid={`autocomplete_option_${key}`}\n >\n <StyledOption\n css={selectedValue === option.value && selectedStyles}\n >\n <Caption size=\"sm\" weight={500}>\n {option.label}\n </Caption>\n </StyledOption>\n </OptionWrapper>\n ))}\n </StyledDropdown>\n )\n }\n)\n\nexport default InputSelectDropdown\n\nconst OptionWrapper = styled.div`\n width: 100%;\n padding: 2px 0;\n cursor: pointer;\n`\n\nconst StyledOption = styled.div`\n padding: 8px;\n transition: all ease-out 0.3s;\n border-radius: 4px;\n &:hover {\n background-color: ${theme.palette.background.light1};\n }\n`\n\nconst selectedStyles = css`\n background-color: ${theme.palette.background.light1};\n`\n\nconst StyledDropdown = styled(InputDropdown)`\n .KUI-InputDropdown_scroll {\n max-height: 142px;\n padding: 0 4px;\n }\n`\n","import { UseFormReturn } from \"react-hook-form\"\r\nimport { FieldError, FieldErrors } from \"react-hook-form/dist/types/errors\"\r\n\r\nconst getFormValue = <T extends object>(\r\n name?: string,\r\n form?: UseFormReturn<T> | null\r\n) => {\r\n const names = name?.split(\".\")\r\n let fieldValue = form?.control._formValues\r\n names?.forEach((field: string) => {\r\n if (fieldValue) {\r\n fieldValue = fieldValue[field]\r\n }\r\n })\r\n return fieldValue\r\n}\r\n\r\nconst getFormError = <T extends object>(\r\n name?: string,\r\n form?: UseFormReturn<T> | null\r\n) => {\r\n const names = name?.split(\".\")\r\n let fieldError = form?.formState.errors\r\n names?.forEach((field) => {\r\n if (fieldError) {\r\n // @ts-ignore\r\n fieldError = fieldError[field as keyof FieldErrors<T>]\r\n }\r\n })\r\n return (fieldError as FieldError)?.message\r\n}\r\n\r\nexport { getFormValue, getFormError }\r\n","/** @jsxImportSource @emotion/react */\nimport * as React from \"react\"\nimport { ForwardedRef, forwardRef, RefObject, useRef, useState } from \"react\"\nimport styled from \"@emotion/styled\"\nimport { FieldValues } from \"react-hook-form\"\nimport { HalfArrowIcon } from \"kui-icon\"\nimport { InputWithAdornments } from \"kui-basic\"\nimport InputSelectDropdown from \"../InputSelectDropdown\"\nimport { InputSelectProps, OptionParams } from \"./types\"\nimport { getFormError, getFormValue } from \"../../utils/form\"\n\nconst InputSelect = forwardRef(\n (props: InputSelectProps, ref: ForwardedRef<HTMLInputElement>) => {\n const {\n options,\n name,\n handleChange,\n form,\n iconProps,\n value: defaultValue,\n ...other\n } = props\n const [isOpenDropdown, setIsOpenDropDown] = useState(false)\n const [value, setValue] = useState<\n string | number | undefined | FieldValues\n >(defaultValue || getFormValue(name, form))\n const error = getFormError(name, form)\n const inputRef = useRef<HTMLInputElement>(null)\n const selectedLabel = options?.find(\n (option: OptionParams) => String(option.value) === String(value)\n )?.label\n\n const register = form?.register(name!)\n\n const handleOpenDropdown = () => {\n if (inputRef?.current?.parentElement?.parentElement) {\n inputRef?.current?.parentElement?.parentElement.focus()\n }\n setIsOpenDropDown((prev) => !prev)\n }\n\n const handleCloseDropdown = () => {\n setIsOpenDropDown(false)\n }\n\n const handleSelect = (option: OptionParams) => {\n setValue(option.value)\n if (handleChange) {\n handleChange(option.value)\n }\n if (form) {\n register?.onChange({\n target: { value: option.value, name },\n type: \"change\",\n })\n }\n handleCloseDropdown()\n }\n\n const forwardedRef = (e: HTMLInputElement) => {\n if (ref) {\n // eslint-disable-next-line no-param-reassign\n // @ts-ignore\n ref.current = e\n }\n // @ts-ignore\n inputRef.current = e\n register?.ref(e)\n }\n\n return (\n <Wrapper>\n <input name={name} autoComplete=\"off\" hidden />\n <StyledInput\n onClick={handleOpenDropdown}\n readOnly\n value={selectedLabel}\n message={error}\n {...other}\n endIcon={\n !props.disabled && (\n <HalfArrowIcon\n width={12}\n height={13}\n css={[\n { transition: \"all linear .2s\" },\n isOpenDropdown && { transform: \"rotate(180deg)\" },\n ]}\n {...iconProps}\n />\n )\n }\n {...register}\n ref={forwardedRef}\n />\n {options && options.length > 0 && !props.disabled && (\n <InputSelectDropdown\n options={options}\n inputRef={\n {\n current: inputRef?.current?.parentElement,\n } as RefObject<HTMLDivElement>\n }\n isOpenDropdown={isOpenDropdown}\n handleCloseDropdown={handleCloseDropdown}\n handleSelect={handleSelect}\n selectedValue={value}\n />\n )}\n </Wrapper>\n )\n }\n)\n\nexport default InputSelect\n\nconst Wrapper = styled.div`\n position: relative;\n text-align: left;\n width: fit-content;\n`\n\nconst StyledInput = styled(InputWithAdornments)`\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n`\n","import * as React from \"react\"\nimport { ForwardedRef, forwardRef } from \"react\"\nimport { SelectYearProps } from \"./types\"\nimport InputSelect from \"../InputSelect\"\n\nconst checkDisabled = (year: number, min?: number, max?: number) =>\n (min && year <= min) || (max && year >= max)\n\nconst SelectYear = forwardRef(\n (\n { yearOptions, options, min, max, ...props }: SelectYearProps,\n ref: ForwardedRef<HTMLInputElement>\n ) => {\n const formattedYearOptions = yearOptions.map((year) => ({\n ...year,\n disabled: checkDisabled(Number(year.value), min, max),\n }))\n\n return (\n <InputSelect\n ref={ref as any}\n label=\"Year\"\n options={formattedYearOptions}\n {...props}\n />\n )\n }\n)\n\nexport default SelectYear\n","import * as React from \"react\"\nimport { FieldValues } from \"react-hook-form\"\nimport { ForwardedRef, forwardRef } from \"react\"\nimport InputSelect from \"../InputSelect\"\nimport { InputSelectProps } from \"../InputSelect/types\"\nimport { SelectMonthProps } from \"./types\"\n\nconst checkDisabled = (\n month: number,\n min?: number | false,\n max?: number | false\n) => (min && month <= min) || (max && month >= max)\n\nconst monthValues = [\n { value: 0, label: \"January\" },\n { value: 1, label: \"February\" },\n { value: 2, label: \"March\" },\n { value: 3, label: \"April\" },\n { value: 4, label: \"May\" },\n { value: 5, label: \"June\" },\n { value: 6, label: \"July\" },\n { value: 7, label: \"August\" },\n { value: 8, label: \"September\" },\n { value: 9, label: \"October\" },\n { value: 10, label: \"November\" },\n { value: 11, label: \"December\" },\n]\n\nconst SelectMonth = forwardRef(\n (props: SelectMonthProps, ref: ForwardedRef<HTMLInputElement>) => {\n const { min, max, options, ...other } = props\n const formattedMonths = monthValues.map((month) => ({\n ...month,\n disabled: checkDisabled(month.value, min, max),\n }))\n\n return (\n <InputSelect\n ref={ref as any}\n label=\"Month\"\n options={formattedMonths}\n {...other}\n />\n )\n }\n)\n\nexport default SelectMonth\n","import * as React from \"react\"\nimport styled from \"@emotion/styled\"\nimport { Grid } from \"kui-basic\"\nimport { ForwardedRef, forwardRef } from \"react\"\nimport { DateTime } from \"luxon\"\nimport { CalendarHeaderProps } from \"./types\"\nimport SelectYear from \"../SelectYear\"\nimport SelectMonth from \"../SelectMonth\"\nimport * as fs from \"fs\"\n\nconst CalendarHeaderWithSelect = forwardRef(\n (\n {\n changeMonth,\n changeYear,\n date,\n yearOptions,\n max,\n min,\n }: CalendarHeaderProps,\n ref: ForwardedRef<HTMLDivElement>\n ) => {\n const year = date.getFullYear()\n const month = date.getMonth()\n const currentYear = DateTime.now().year\n const minMonth = min?.year === currentYear ? min?.month : 0\n const maxMonth = max?.year === currentYear ? max?.month : 11\n\n return (\n <Wrapper ref={ref}>\n <Grid container spacing={2}>\n <Grid item xs={6}>\n <SelectYear\n min={min?.year}\n max={max?.year}\n yearOptions={yearOptions}\n value={year}\n handleChange={changeYear}\n />\n </Grid>\n <Grid item xs={6}>\n <SelectMonth\n min={(Number(min?.year) >= currentYear && minMonth) as any}\n max={(Number(max?.year) <= currentYear && maxMonth) as any}\n value={month}\n handleChange={changeMonth}\n />\n </Grid>\n </Grid>\n </Wrapper>\n )\n }\n)\n\nexport default CalendarHeaderWithSelect\n\nconst Wrapper = styled.div`\n margin-bottom: 24px;\n @media (max-width: 900px) {\n padding: 0 18px;\n margin-bottom: 20px;\n }\n`\n"],"names":["forwardRef","useState","useRef","useEffect","_jsxs","StyledDropdown","_jsx","styled","Grid","templateObject_1","theme","templateObject_2","templateObject_3","Caption","css","Wrapper","HalfArrowIcon","InputWithAdornments","checkDisabled","DateTime"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAiBA;AACO,IAAI,QAAQ,GAAG,WAAW;AACjC,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,QAAQ,CAAC,CAAC,EAAE;AACrD,QAAQ,KAAK,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAC7D,YAAY,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAC7B,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACzF,SAAS;AACT,QAAQ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A,GAAG,KAAH,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,GAAG,CAAE,IAAI,EACd,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,IAAI,EACX,YAAY,EAAE,UAAU,EACxB,CAAA,EAAA,CAAA,CACG,EACPA,cAAA,CAACE,aAAI,EAAA,QAAA,CAAA,EAAC,IAAI,EAAA,IAAA,EAAC,EAAE,EAAE,CAAC,EAAA,EAAA,EAAA,QAAA,EACdF,cAAC,CAAA,WAAW,EACV,EAAA,GAAG,GAAG,MAAM,CAAC,GAAG,KAAA,IAAA,IAAH,GAAG,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAH,GAAG,CAAE,IAAI,CAAC,IAAI,WAAW,IAAI,QAAQ,CAAQ,EAC1D,GAAG,GAAG,MAAM,CAAC,GAAG,KAAH,IAAA,IAAA,GAAG,KAAH,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,GAAG,CAAE,IAAI,CAAC,IAAI,WAAW,IAAI,QAAQ,CAAQ,EAC1D,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,WAAW,EACzB,CAAA,EAAA,CAAA,CACG,CACF,EAAA,CAAA,CAAA,EAAA,CAAA,CACC,EACX;AACH,CAAC,EACF;AAID,IAAM,OAAO,GAAGC,0BAAM,CAAC,GAAG,CAAA,gBAAA,KAAA,gBAAA,GAAA,oBAAA,CAAA,CAAA,gHAAA,CAAA,EAAA,CAAA,gHAMzB,IAAA,CAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/tslib/tslib.es6.js","../../../src/components/InputDropdown/index.tsx","../../../src/components/InputSelectDropdown/index.tsx","../../../src/utils/form.ts","../../../src/components/InputSelect/index.tsx","../../../src/components/SelectYear/index.tsx","../../../src/components/SelectMonth/index.tsx","../../../src/components/CalendarHeaderWithSelect/index.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import * as React from \"react\"\nimport { ForwardedRef, forwardRef, useEffect, useRef, useState } from \"react\"\nimport { Grid, theme } from \"kui-basic\"\nimport styled from \"@emotion/styled\"\nimport { InputDropdownProps } from \"./types\"\nimport {\n DropdownScrollStylesProps,\n DropdownStylesProps,\n} from \"../InputSelectDropdown/types\"\n\nconst InputDropdown = forwardRef(\n (props: InputDropdownProps, ref: ForwardedRef<HTMLDivElement>) => {\n const {\n isOpen,\n handleClose,\n buttonRef,\n children,\n endComponent,\n ...otherProps\n } = props\n const [isScrollable, setIsScrollable] = useState(false)\n const dropdownRef = useRef<HTMLDivElement | null>(null)\n\n const closePopUp = (e: any) => {\n if (dropdownRef.current && buttonRef && buttonRef.current) {\n if (\n !dropdownRef.current.contains(e.target) &&\n !buttonRef.current.contains(e.target)\n ) {\n handleClose()\n }\n }\n }\n\n useEffect(() => {\n document.addEventListener(\"click\", closePopUp)\n return () => {\n document.removeEventListener(\"click\", closePopUp)\n }\n })\n\n useEffect(() => {\n if (buttonRef?.current) {\n if (isOpen) {\n buttonRef.current.style.zIndex = \"4\"\n const scrollContainer = dropdownRef.current?.children[0].children[0]\n if (scrollContainer) {\n const hasScroll =\n scrollContainer.scrollHeight > scrollContainer.clientHeight\n setIsScrollable(hasScroll)\n }\n } else {\n buttonRef.current.style.zIndex = \"1\"\n }\n }\n }, [isOpen])\n\n if (!isOpen) {\n return null\n }\n\n const forwardedRef = (elem: HTMLDivElement) => {\n if (typeof ref === \"function\") ref(elem)\n else if (ref) ref.current = elem\n\n dropdownRef.current = elem\n }\n\n return (\n <StyledDropdown\n data-testid=\"input_dropdown\"\n container\n ref={forwardedRef}\n isOpen={isOpen}\n {...otherProps}\n >\n <StyledWrapper isScrollable={isScrollable}>\n <ScrollingContainer\n isScrollable={isScrollable}\n className=\"KUI-InputDropdown_scroll\"\n >\n {children}\n </ScrollingContainer>\n </StyledWrapper>\n {endComponent}\n </StyledDropdown>\n )\n }\n)\n\nexport default InputDropdown\n\nconst StyledDropdown = styled(Grid)<DropdownStylesProps>`\n width: 100%;\n display: ${({ isOpen }) => (isOpen ? \"flex\" : \"none\")};\n position: absolute;\n background: ${theme.palette.grey.zero};\n z-index: 3;\n top: 50px;\n box-shadow: 0px 26px 34px 0px #0000001a;\n border-radius: 0 0 8px 8px;\n user-select: none;\n`\n\nconst StyledWrapper = styled.div<DropdownScrollStylesProps>`\n width: 100%;\n box-sizing: border-box;\n padding: ${({ isScrollable }) =>\n isScrollable ? \"14px 8px 8px 0\" : \"14px 0px 8px 0\"};\n`\n\nconst ScrollingContainer = styled.div<DropdownScrollStylesProps>`\n width: 100%;\n max-height: 389px;\n box-sizing: border-box;\n z-index: 3;\n overflow: auto;\n -ms-overflow-style: none;\n overflow-y: scroll;\n overflow-x: hidden;\n user-select: none;\n ::-webkit-scrollbar {\n width: ${({ isScrollable }) => (isScrollable ? \"4px\" : \"0px\")};\n position: absolute;\n right: 8px;\n }\n ::-webkit-scrollbar-track,\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n transition: all ease-out 0.3s;\n }\n\n ::-webkit-resizer,\n ::-webkit-scrollbar-button,\n ::-webkit-scrollbar-corner {\n display: none;\n }\n ::-webkit-scrollbar-track {\n background: ${theme.palette.grey.fifteenB};\n }\n\n ::-webkit-scrollbar-thumb {\n background: ${theme.palette.grey.thirty};\n }\n`\n","/** @jsxImportSource @emotion/react */\nimport * as React from \"react\"\nimport { ForwardedRef, forwardRef, useEffect, useRef } from \"react\"\nimport styled from \"@emotion/styled\"\nimport { css } from \"@emotion/react\"\nimport { Caption, theme } from \"kui-basic\"\nimport { InputSelectDropdownProps } from \"./types\"\nimport { OptionParams } from \"../InputSelect/types\"\nimport InputDropdown from \"../InputDropdown\"\n\nconst InputSelectDropdown = forwardRef(\n (\n {\n options,\n inputRef,\n isOpenDropdown,\n handleCloseDropdown,\n handleSelect,\n selectedValue,\n }: InputSelectDropdownProps,\n ref: ForwardedRef<HTMLDivElement>\n ) => {\n const dropdownRef = useRef<HTMLDivElement | null>(null)\n\n useEffect(() => {\n if (isOpenDropdown) {\n const element = document.querySelector(\n `[data-value=autocomplete_option_${selectedValue}]`\n )\n const coordinates = element?.getBoundingClientRect()\n\n if (coordinates && inputRef.current && element) {\n dropdownRef.current?.scrollTo({\n top:\n coordinates.top -\n inputRef.current.clientHeight -\n element.clientHeight,\n })\n }\n }\n }, [isOpenDropdown])\n\n const forwardedRef = (elem: HTMLDivElement) => {\n if (ref) {\n if (typeof ref === \"function\") ref(elem)\n else ref.current = elem\n }\n dropdownRef.current = elem\n }\n\n return (\n <StyledDropdown\n ref={forwardedRef}\n buttonRef={inputRef}\n isOpen={isOpenDropdown}\n handleClose={handleCloseDropdown}\n >\n {options.map((option: OptionParams, key: number) => (\n <OptionWrapper\n key={option.label}\n onClick={() => handleSelect(option)}\n data-value={`autocomplete_option_${option.value}`}\n data-testid={`autocomplete_option_${key}`}\n >\n <StyledOption\n css={selectedValue === option.value && selectedStyles}\n >\n <Caption size=\"sm\" weight={500}>\n {option.label}\n </Caption>\n </StyledOption>\n </OptionWrapper>\n ))}\n </StyledDropdown>\n )\n }\n)\n\nexport default InputSelectDropdown\n\nconst OptionWrapper = styled.div`\n width: 100%;\n padding: 2px 0;\n cursor: pointer;\n`\n\nconst StyledOption = styled.div`\n padding: 8px;\n transition: all ease-out 0.3s;\n border-radius: 4px;\n &:hover {\n background-color: ${theme.palette.background.light1};\n }\n`\n\nconst selectedStyles = css`\n background-color: ${theme.palette.background.light1};\n`\n\nconst StyledDropdown = styled(InputDropdown)`\n .KUI-InputDropdown_scroll {\n max-height: 142px;\n padding: 0 4px;\n }\n`\n","import { UseFormReturn } from \"react-hook-form\"\r\nimport { FieldError, FieldErrors } from \"react-hook-form/dist/types/errors\"\r\n\r\nconst getFormValue = <T extends object>(\r\n name?: string,\r\n form?: UseFormReturn<T> | null\r\n) => {\r\n const names = name?.split(\".\")\r\n let fieldValue = form?.control._formValues\r\n names?.forEach((field: string) => {\r\n if (fieldValue) {\r\n fieldValue = fieldValue[field]\r\n }\r\n })\r\n return fieldValue\r\n}\r\n\r\nconst getFormError = <T extends object>(\r\n name?: string,\r\n form?: UseFormReturn<T> | null\r\n) => {\r\n const names = name?.split(\".\")\r\n let fieldError = form?.formState.errors\r\n names?.forEach((field) => {\r\n if (fieldError) {\r\n // @ts-ignore\r\n fieldError = fieldError[field as keyof FieldErrors<T>]\r\n }\r\n })\r\n return (fieldError as FieldError)?.message\r\n}\r\n\r\nexport { getFormValue, getFormError }\r\n","/** @jsxImportSource @emotion/react */\nimport * as React from \"react\"\nimport { ForwardedRef, forwardRef, RefObject, useRef, useState } from \"react\"\nimport styled from \"@emotion/styled\"\nimport { FieldValues } from \"react-hook-form\"\nimport { HalfArrowIcon } from \"kui-icon\"\nimport { InputWithAdornments } from \"kui-basic\"\nimport InputSelectDropdown from \"../InputSelectDropdown\"\nimport { InputSelectProps, InputSelectStylesProps, OptionParams } from \"./types\"\nimport { getFormError, getFormValue } from \"../../utils/form\"\n\nconst InputSelect = forwardRef(\n (props: InputSelectProps, ref: ForwardedRef<HTMLInputElement>) => {\n const {\n options,\n name,\n handleChange,\n form,\n iconProps,\n value: defaultValue,\n ...other\n } = props\n const [isDropdownOpen, setIsDropdownOpen] = useState(false)\n const [value, setValue] = useState<\n string | number | undefined | FieldValues\n >(defaultValue || getFormValue(name, form))\n const error = getFormError(name, form)\n const inputRef = useRef<HTMLInputElement>(null)\n const selectedLabel = options?.find(\n (option: OptionParams) => String(option.value) === String(value)\n )?.label\n\n const register = form?.register(name!)\n\n const handleOpenDropdown = () => {\n if (inputRef?.current?.parentElement?.parentElement) {\n inputRef?.current?.parentElement?.parentElement.focus()\n }\n setIsDropdownOpen((prev) => !prev)\n }\n\n const handleCloseDropdown = () => {\n setIsDropdownOpen(false)\n }\n\n const handleSelect = (option: OptionParams) => {\n setValue(option.value)\n if (handleChange) {\n handleChange(option.value)\n }\n if (form) {\n register?.onChange({\n target: { value: option.value, name },\n type: \"change\",\n })\n }\n handleCloseDropdown()\n }\n\n const forwardedRef = (e: HTMLInputElement) => {\n if (ref) {\n // eslint-disable-next-line no-param-reassign\n // @ts-ignore\n ref.current = e\n }\n // @ts-ignore\n inputRef.current = e\n register?.ref(e)\n }\n\n return (\n <Wrapper>\n <input name={name} autoComplete=\"off\" hidden />\n <StyledInput\n onClick={handleOpenDropdown}\n readOnly\n value={selectedLabel}\n message={error}\n isDropdownOpen={isDropdownOpen}\n {...other}\n endIcon={\n !props.disabled && (\n <HalfArrowIcon\n width={12}\n height={13}\n css={[\n { transition: \"all linear .2s\" },\n isDropdownOpen && { transform: \"rotate(180deg)\" },\n ]}\n {...iconProps}\n />\n )\n }\n {...register}\n ref={forwardedRef}\n />\n {options && options.length > 0 && !props.disabled && (\n <InputSelectDropdown\n options={options}\n inputRef={\n {\n current: inputRef?.current?.parentElement,\n } as RefObject<HTMLDivElement>\n }\n isOpenDropdown={isDropdownOpen}\n handleCloseDropdown={handleCloseDropdown}\n handleSelect={handleSelect}\n selectedValue={value}\n />\n )}\n </Wrapper>\n )\n }\n)\n\nexport default InputSelect\n\nconst Wrapper = styled.div`\n position: relative;\n text-align: left;\n width: fit-content;\n`\n\nconst StyledInput = styled(InputWithAdornments)<InputSelectStylesProps>`\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n .KUI-InputMessage {\n opacity: ${({ isDropdownOpen }) => (isDropdownOpen ? 0 : 1)};\n }\n`\n","import * as React from \"react\"\nimport { ForwardedRef, forwardRef } from \"react\"\nimport { SelectYearProps } from \"./types\"\nimport InputSelect from \"../InputSelect\"\n\nconst checkDisabled = (year: number, min?: number, max?: number) =>\n (min && year <= min) || (max && year >= max)\n\nconst SelectYear = forwardRef(\n (\n { yearOptions, options, min, max, ...props }: SelectYearProps,\n ref: ForwardedRef<HTMLInputElement>\n ) => {\n const formattedYearOptions = yearOptions.map((year) => ({\n ...year,\n disabled: checkDisabled(Number(year.value), min, max),\n }))\n\n return (\n <InputSelect\n ref={ref as any}\n label=\"Year\"\n options={formattedYearOptions}\n {...props}\n />\n )\n }\n)\n\nexport default SelectYear\n","import * as React from \"react\"\nimport { FieldValues } from \"react-hook-form\"\nimport { ForwardedRef, forwardRef } from \"react\"\nimport InputSelect from \"../InputSelect\"\nimport { InputSelectProps } from \"../InputSelect/types\"\nimport { SelectMonthProps } from \"./types\"\n\nconst checkDisabled = (\n month: number,\n min?: number | false,\n max?: number | false\n) => (min && month <= min) || (max && month >= max)\n\nconst monthValues = [\n { value: 0, label: \"January\" },\n { value: 1, label: \"February\" },\n { value: 2, label: \"March\" },\n { value: 3, label: \"April\" },\n { value: 4, label: \"May\" },\n { value: 5, label: \"June\" },\n { value: 6, label: \"July\" },\n { value: 7, label: \"August\" },\n { value: 8, label: \"September\" },\n { value: 9, label: \"October\" },\n { value: 10, label: \"November\" },\n { value: 11, label: \"December\" },\n]\n\nconst SelectMonth = forwardRef(\n (props: SelectMonthProps, ref: ForwardedRef<HTMLInputElement>) => {\n const { min, max, options, ...other } = props\n const formattedMonths = monthValues.map((month) => ({\n ...month,\n disabled: checkDisabled(month.value, min, max),\n }))\n\n return (\n <InputSelect\n ref={ref as any}\n label=\"Month\"\n options={formattedMonths}\n {...other}\n />\n )\n }\n)\n\nexport default SelectMonth\n","import * as React from \"react\"\nimport styled from \"@emotion/styled\"\nimport { Grid } from \"kui-basic\"\nimport { ForwardedRef, forwardRef } from \"react\"\nimport { DateTime } from \"luxon\"\nimport { CalendarHeaderProps } from \"./types\"\nimport SelectYear from \"../SelectYear\"\nimport SelectMonth from \"../SelectMonth\"\nimport * as fs from \"fs\"\n\nconst CalendarHeaderWithSelect = forwardRef(\n (\n {\n changeMonth,\n changeYear,\n date,\n yearOptions,\n max,\n min,\n }: CalendarHeaderProps,\n ref: ForwardedRef<HTMLDivElement>\n ) => {\n const year = date.getFullYear()\n const month = date.getMonth()\n const currentYear = DateTime.now().year\n const minMonth = min?.year === currentYear ? min?.month : 0\n const maxMonth = max?.year === currentYear ? max?.month : 11\n\n return (\n <Wrapper ref={ref}>\n <Grid container spacing={2}>\n <Grid item xs={6}>\n <SelectYear\n min={min?.year}\n max={max?.year}\n yearOptions={yearOptions}\n value={year}\n handleChange={changeYear}\n />\n </Grid>\n <Grid item xs={6}>\n <SelectMonth\n min={(Number(min?.year) >= currentYear && minMonth) as any}\n max={(Number(max?.year) <= currentYear && maxMonth) as any}\n value={month}\n handleChange={changeMonth}\n />\n </Grid>\n </Grid>\n </Wrapper>\n )\n }\n)\n\nexport default CalendarHeaderWithSelect\n\nconst Wrapper = styled.div`\n margin-bottom: 24px;\n @media (max-width: 900px) {\n padding: 0 18px;\n margin-bottom: 20px;\n }\n`\n"],"names":["forwardRef","useState","useRef","useEffect","_jsxs","StyledDropdown","_jsx","styled","Grid","templateObject_1","theme","templateObject_2","templateObject_3","Caption","css","Wrapper","HalfArrowIcon","InputWithAdornments","checkDisabled","DateTime"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAiBA;AACO,IAAI,QAAQ,GAAG,WAAW;AACjC,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,QAAQ,CAAC,CAAC,EAAE;AACrD,QAAQ,KAAK,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAC7D,YAAY,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAC7B,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACzF,SAAS;AACT,QAAQ,OAAO,CAAC,CAAC;AACjB,MAAK;AACL,IAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAC3C,EAAC;AACD;AACO,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE;AAC7B,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;AACf,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACvF,QAAQ,CAAC,CAAC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A,GAAA,GAAG,CAAE,IAAI,CAAC,IAAI,WAAW,IAAI,QAAQ,CAAQ,EAC1D,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,WAAW,EACzB,CAAA,EAAA,CAAA,CACG,CACF,EAAA,CAAA,CAAA,EAAA,CAAA,CACC,EACX;AACH,CAAC,EACF;AAID,IAAM,OAAO,GAAGC,0BAAM,CAAC,GAAG,CAAA,gBAAA,KAAA,gBAAA,GAAA,oBAAA,CAAA,CAAA,gHAAA,CAAA,EAAA,CAAA,gHAMzB,IAAA,CAAA;;;;;"}
|
|
@@ -69,14 +69,11 @@ var InputDropdown = forwardRef(function (props, ref) {
|
|
|
69
69
|
};
|
|
70
70
|
});
|
|
71
71
|
useEffect(function () {
|
|
72
|
-
var _a
|
|
72
|
+
var _a;
|
|
73
73
|
if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
|
|
74
|
-
var inputMessage = (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(".KUI-InputMessage");
|
|
75
74
|
if (isOpen) {
|
|
76
75
|
buttonRef.current.style.zIndex = "4";
|
|
77
|
-
|
|
78
|
-
inputMessage.style.opacity = "0";
|
|
79
|
-
var scrollContainer = (_b = dropdownRef.current) === null || _b === void 0 ? void 0 : _b.children[0].children[0];
|
|
76
|
+
var scrollContainer = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0];
|
|
80
77
|
if (scrollContainer) {
|
|
81
78
|
var hasScroll = scrollContainer.scrollHeight > scrollContainer.clientHeight;
|
|
82
79
|
setIsScrollable(hasScroll);
|
|
@@ -84,8 +81,6 @@ var InputDropdown = forwardRef(function (props, ref) {
|
|
|
84
81
|
}
|
|
85
82
|
else {
|
|
86
83
|
buttonRef.current.style.zIndex = "1";
|
|
87
|
-
if (inputMessage)
|
|
88
|
-
inputMessage.style.opacity = "1";
|
|
89
84
|
}
|
|
90
85
|
}
|
|
91
86
|
}, [isOpen]);
|
|
@@ -174,7 +169,7 @@ var getFormError = function (name, form) {
|
|
|
174
169
|
var InputSelect = forwardRef(function (props, ref) {
|
|
175
170
|
var _a, _b;
|
|
176
171
|
var options = props.options, name = props.name, handleChange = props.handleChange, form = props.form, iconProps = props.iconProps, defaultValue = props.value, other = __rest(props, ["options", "name", "handleChange", "form", "iconProps", "value"]);
|
|
177
|
-
var _c = useState(false),
|
|
172
|
+
var _c = useState(false), isDropdownOpen = _c[0], setIsDropdownOpen = _c[1];
|
|
178
173
|
var _d = useState(defaultValue || getFormValue(name, form)), value = _d[0], setValue = _d[1];
|
|
179
174
|
var error = getFormError(name, form);
|
|
180
175
|
var inputRef = useRef(null);
|
|
@@ -185,10 +180,10 @@ var InputSelect = forwardRef(function (props, ref) {
|
|
|
185
180
|
if ((_b = (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) {
|
|
186
181
|
(_d = (_c = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _c === void 0 ? void 0 : _c.parentElement) === null || _d === void 0 ? void 0 : _d.parentElement.focus();
|
|
187
182
|
}
|
|
188
|
-
|
|
183
|
+
setIsDropdownOpen(function (prev) { return !prev; });
|
|
189
184
|
};
|
|
190
185
|
var handleCloseDropdown = function () {
|
|
191
|
-
|
|
186
|
+
setIsDropdownOpen(false);
|
|
192
187
|
};
|
|
193
188
|
var handleSelect = function (option) {
|
|
194
189
|
setValue(option.value);
|
|
@@ -213,15 +208,18 @@ var InputSelect = forwardRef(function (props, ref) {
|
|
|
213
208
|
inputRef.current = e;
|
|
214
209
|
register === null || register === void 0 ? void 0 : register.ref(e);
|
|
215
210
|
};
|
|
216
|
-
return (jsxs$1(Wrapper$1, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }), jsx$1(StyledInput, __assign({ onClick: handleOpenDropdown, readOnly: true, value: selectedLabel, message: error }, other, { endIcon: !props.disabled && (jsx$1(HalfArrowIcon, __assign({ width: 12, height: 13, css: [
|
|
211
|
+
return (jsxs$1(Wrapper$1, { children: [jsx$1("input", { name: name, autoComplete: "off", hidden: true }), jsx$1(StyledInput, __assign({ onClick: handleOpenDropdown, readOnly: true, value: selectedLabel, message: error, isDropdownOpen: isDropdownOpen }, other, { endIcon: !props.disabled && (jsx$1(HalfArrowIcon, __assign({ width: 12, height: 13, css: [
|
|
217
212
|
{ transition: "all linear .2s" },
|
|
218
|
-
|
|
213
|
+
isDropdownOpen && { transform: "rotate(180deg)" },
|
|
219
214
|
] }, iconProps))) }, register, { ref: forwardedRef })), options && options.length > 0 && !props.disabled && (jsx$1(InputSelectDropdown, { options: options, inputRef: {
|
|
220
215
|
current: (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.parentElement,
|
|
221
|
-
}, isOpenDropdown:
|
|
216
|
+
}, isOpenDropdown: isDropdownOpen, handleCloseDropdown: handleCloseDropdown, handleSelect: handleSelect, selectedValue: value }))] }));
|
|
222
217
|
});
|
|
223
218
|
var Wrapper$1 = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n position: relative;\n text-align: left;\n width: fit-content;\n"], ["\n position: relative;\n text-align: left;\n width: fit-content;\n"])));
|
|
224
|
-
var StyledInput = styled(InputWithAdornments)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n"], ["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n"])))
|
|
219
|
+
var StyledInput = styled(InputWithAdornments)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n .KUI-InputMessage {\n opacity: ", ";\n }\n"], ["\n cursor: pointer;\n input,\n label {\n cursor: pointer !important;\n }\n .KUI-InputMessage {\n opacity: ", ";\n }\n"])), function (_a) {
|
|
220
|
+
var isDropdownOpen = _a.isDropdownOpen;
|
|
221
|
+
return (isDropdownOpen ? 0 : 1);
|
|
222
|
+
});
|
|
225
223
|
var templateObject_1$1, templateObject_2;
|
|
226
224
|
|
|
227
225
|
var checkDisabled$1 = function (year, min, max) {
|