akeyless-client-commons 1.0.132 → 1.0.134
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/dist/components/index.css +0 -6
- package/dist/components/index.css.map +1 -1
- package/dist/components/index.d.mts +16 -6
- package/dist/components/index.d.ts +16 -6
- package/dist/components/index.js +309 -186
- package/dist/components/index.mjs +302 -187
- package/dist/types/index.d.mts +20 -2
- package/dist/types/index.d.ts +20 -2
- package/package.json +1 -1
|
@@ -913,7 +913,7 @@ var callCenterDomain = isLocal ? "http://localhost:9003/api/call-center" : baseD
|
|
|
913
913
|
import { useState } from "react";
|
|
914
914
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
915
915
|
var Checkbox = function(param) {
|
|
916
|
-
var
|
|
916
|
+
var _param_id = param.id, id = _param_id === void 0 ? Math.random().toString() : _param_id, _param_checked = param.checked, checked = _param_checked === void 0 ? false : _param_checked, setChecked = param.setChecked, _param_rotate = param.rotate, rotate = _param_rotate === void 0 ? true : _param_rotate, className = param.className, circleClassName = param.circleClassName, containerClassName = param.containerClassName, elementClassName = param.elementClassName, name = param.name, props = param.props, title = param.title;
|
|
917
917
|
var _useState = _sliced_to_array(useState(checked), 2), isChecked = _useState[0], setIsChecked = _useState[1];
|
|
918
918
|
var toggleChecked = function() {
|
|
919
919
|
setIsChecked(!isChecked);
|
|
@@ -930,12 +930,14 @@ var Checkbox = function(param) {
|
|
|
930
930
|
checked: isChecked,
|
|
931
931
|
onChange: toggleChecked
|
|
932
932
|
}),
|
|
933
|
-
/* @__PURE__ */ jsxs("label", _object_spread_props(_object_spread({
|
|
933
|
+
/* @__PURE__ */ jsxs("label", _object_spread_props(_object_spread({
|
|
934
|
+
title: title
|
|
935
|
+
}, props), {
|
|
934
936
|
htmlFor: id,
|
|
935
937
|
className: cn("relative block w-[42px] h-[24px] cursor-pointer transform-gpu", className),
|
|
936
938
|
children: [
|
|
937
939
|
/* @__PURE__ */ jsx("div", {
|
|
938
|
-
className: cn("relative
|
|
940
|
+
className: cn("relative w-[40px] h-[22px] rounded-[12px] transition-colors duration-200 ease-in-out ".concat(isChecked ? "bg-[#52d66b]" : "bg-[#c8ccd4]"), elementClassName)
|
|
939
941
|
}),
|
|
940
942
|
/* @__PURE__ */ jsx("span", {
|
|
941
943
|
className: cn("absolute ".concat(rotate ? "left-0" : "right-0", " top-0 w-[24px] h-[24px] bg-white rounded-full shadow-md transition-transform duration-200 ease-in-out ").concat(isChecked ? rotate ? "translate-x-[18px]" : "-translate-x-[18px]" : ""), circleClassName),
|
|
@@ -4734,7 +4736,9 @@ var Filter = memo(function(param) {
|
|
|
4734
4736
|
}),
|
|
4735
4737
|
/* @__PURE__ */ jsx17("div", {
|
|
4736
4738
|
className: "overflow-auto h-[80%] flex flex-col gap-1 w-full cursor-pointer ",
|
|
4737
|
-
children: (_filterOptions_filterableColumn_dataKey = filterOptions[filterableColumn.dataKey]) === null || _filterOptions_filterableColumn_dataKey === void 0 ? void 0 : _filterOptions_filterableColumn_dataKey.
|
|
4739
|
+
children: (_filterOptions_filterableColumn_dataKey = filterOptions[filterableColumn.dataKey]) === null || _filterOptions_filterableColumn_dataKey === void 0 ? void 0 : _filterOptions_filterableColumn_dataKey.sort(function(a, b) {
|
|
4740
|
+
return b.localeCompare(a);
|
|
4741
|
+
}).map(function(option, i) {
|
|
4738
4742
|
var _filters_filterableColumn_dataKey;
|
|
4739
4743
|
return /* @__PURE__ */ jsxs12("div", {
|
|
4740
4744
|
className: "flex items-center px-2 justify-start hover:bg-[#547f22] hover:text-white",
|
|
@@ -5385,7 +5389,7 @@ var useSortValues = function(options, sortDirection, sortAsNumber) {
|
|
|
5385
5389
|
return sortOptions;
|
|
5386
5390
|
};
|
|
5387
5391
|
var InputContainer = function(param) {
|
|
5388
|
-
var validationError = param.validationError, _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_inputType = param.inputType, inputType = _param_inputType === void 0 ? "text" : _param_inputType, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_validationName = param.validationName, validationName = _param_validationName === void 0 ? "textNumbers" : _param_validationName, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, placeholder = param.placeholder, props = param.props, minLength = param.minLength, onKeyDown = param.onKeyDown, onChange = param.onChange, direction = param.direction, value = param.value, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName;
|
|
5392
|
+
var validationError = param.validationError, _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_inputType = param.inputType, inputType = _param_inputType === void 0 ? "text" : _param_inputType, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_validationName = param.validationName, validationName = _param_validationName === void 0 ? "textNumbers" : _param_validationName, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, placeholder = param.placeholder, props = param.props, minLength = param.minLength, onKeyDown = param.onKeyDown, onChange = param.onChange, direction = param.direction, value = param.value, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName, title = param.title;
|
|
5389
5393
|
var handleChangeFunction = useCallback5(function(e) {
|
|
5390
5394
|
handleChange(e);
|
|
5391
5395
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
@@ -5399,38 +5403,48 @@ var InputContainer = function(param) {
|
|
|
5399
5403
|
}, [
|
|
5400
5404
|
handleChangeFunction
|
|
5401
5405
|
]);
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5406
|
+
var containerProps = useMemo8(function() {
|
|
5407
|
+
return {
|
|
5408
|
+
containerClassName: containerClassName,
|
|
5409
|
+
direction: direction,
|
|
5410
|
+
labelClassName: labelClassName,
|
|
5411
|
+
labelContent: labelContent,
|
|
5412
|
+
labelWithDots: labelWithDots,
|
|
5413
|
+
labelsCommonClassName: labelsCommonClassName,
|
|
5414
|
+
name: name,
|
|
5415
|
+
required: required
|
|
5416
|
+
};
|
|
5417
|
+
}, [
|
|
5418
|
+
containerClassName,
|
|
5419
|
+
direction,
|
|
5420
|
+
labelClassName,
|
|
5421
|
+
labelContent,
|
|
5422
|
+
labelWithDots,
|
|
5423
|
+
labelsCommonClassName,
|
|
5424
|
+
name,
|
|
5425
|
+
required
|
|
5426
|
+
]);
|
|
5427
|
+
return /* @__PURE__ */ jsx19(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5428
|
+
children: /* @__PURE__ */ jsx19("input", _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, props), {
|
|
5429
|
+
title: title,
|
|
5430
|
+
minLength: minLength,
|
|
5431
|
+
placeholder: placeholder,
|
|
5432
|
+
className: cn("flex-1 bg-inherit h-9 py-2 px-3", defaultFormElementBorderClassName, elementClassName),
|
|
5433
|
+
defaultValue: defaultValue
|
|
5434
|
+
}), validationProps), {
|
|
5435
|
+
value: value,
|
|
5436
|
+
onChange: function(e) {
|
|
5437
|
+
return handleChangeFunction(e);
|
|
5438
|
+
},
|
|
5439
|
+
required: required,
|
|
5440
|
+
name: name,
|
|
5441
|
+
onKeyDown: onKeyDown,
|
|
5442
|
+
type: inputType
|
|
5443
|
+
}))
|
|
5444
|
+
}));
|
|
5431
5445
|
};
|
|
5432
5446
|
var SelectContainer = function(param) {
|
|
5433
|
-
var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_optionClassName = param.optionClassName, optionClassName = _param_optionClassName === void 0 ? "" : _param_optionClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_selectClassName = param.selectClassName, selectClassName = _param_selectClassName === void 0 ? "" : _param_selectClassName, _param_optionsContainerClassName = param.optionsContainerClassName, optionsContainerClassName = _param_optionsContainerClassName === void 0 ? "" : _param_optionsContainerClassName, _param_sortDirection = param.sortDirection, sortDirection = _param_sortDirection === void 0 ? "abc" : _param_sortDirection, sortAsNumber = param.sortAsNumber, direction = param.direction, onChange = param.onChange, labelWithDots = param.labelWithDots, iconClassName = param.iconClassName, labelsCommonClassName = param.labelsCommonClassName;
|
|
5447
|
+
var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_optionClassName = param.optionClassName, optionClassName = _param_optionClassName === void 0 ? "" : _param_optionClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_selectClassName = param.selectClassName, selectClassName = _param_selectClassName === void 0 ? "" : _param_selectClassName, _param_optionsContainerClassName = param.optionsContainerClassName, optionsContainerClassName = _param_optionsContainerClassName === void 0 ? "" : _param_optionsContainerClassName, _param_sortDirection = param.sortDirection, sortDirection = _param_sortDirection === void 0 ? "abc" : _param_sortDirection, sortAsNumber = param.sortAsNumber, direction = param.direction, onChange = param.onChange, labelWithDots = param.labelWithDots, iconClassName = param.iconClassName, labelsCommonClassName = param.labelsCommonClassName, title = param.title;
|
|
5434
5448
|
var _sortOptions_, _options_find;
|
|
5435
5449
|
var sortOptions = useSortValues(options, sortDirection, sortAsNumber);
|
|
5436
5450
|
var _useState8 = _sliced_to_array(useState8(false), 2), isOpen = _useState8[0], setIsOpen = _useState8[1];
|
|
@@ -5440,181 +5454,276 @@ var SelectContainer = function(param) {
|
|
|
5440
5454
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
5441
5455
|
setIsOpen(false);
|
|
5442
5456
|
};
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5457
|
+
var containerProps = useMemo8(function() {
|
|
5458
|
+
return {
|
|
5459
|
+
containerClassName: containerClassName,
|
|
5460
|
+
direction: direction,
|
|
5461
|
+
labelClassName: labelClassName,
|
|
5462
|
+
labelContent: labelContent,
|
|
5463
|
+
labelWithDots: labelWithDots,
|
|
5464
|
+
labelsCommonClassName: labelsCommonClassName,
|
|
5465
|
+
name: name,
|
|
5466
|
+
required: required
|
|
5467
|
+
};
|
|
5468
|
+
}, [
|
|
5469
|
+
containerClassName,
|
|
5470
|
+
direction,
|
|
5471
|
+
labelClassName,
|
|
5472
|
+
labelContent,
|
|
5473
|
+
labelWithDots,
|
|
5474
|
+
labelsCommonClassName,
|
|
5475
|
+
name,
|
|
5476
|
+
required
|
|
5477
|
+
]);
|
|
5478
|
+
return /* @__PURE__ */ jsx19(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5479
|
+
children: /* @__PURE__ */ jsxs14("div", {
|
|
5480
|
+
title: title,
|
|
5481
|
+
style: {
|
|
5482
|
+
direction: direction
|
|
5483
|
+
},
|
|
5484
|
+
className: cn("flex-1 relative", elementClassName),
|
|
5485
|
+
onClick: function() {
|
|
5486
|
+
return setIsOpen(!isOpen);
|
|
5487
|
+
},
|
|
5488
|
+
children: [
|
|
5489
|
+
/* @__PURE__ */ jsx19("div", {
|
|
5490
|
+
className: cn("h-9 max-h-9 py-2 px-3 flex items-center justify-center cursor-pointer", defaultFormElementBorderClassName, selectClassName),
|
|
5491
|
+
children: ((_options_find = options.find(function(opt) {
|
|
5492
|
+
return opt.value === selectedValue;
|
|
5493
|
+
})) === null || _options_find === void 0 ? void 0 : _options_find.label) || selectedValue
|
|
5494
|
+
}),
|
|
5495
|
+
isOpen ? /* @__PURE__ */ jsx19("i", {
|
|
5496
|
+
className: cn("fa-light fa-chevron-up absolute top-3 ".concat(direction === "ltr" ? "right-2" : "left-2", " cursor-pointer"), iconClassName)
|
|
5497
|
+
}) : /* @__PURE__ */ jsx19("i", {
|
|
5498
|
+
className: cn("fa-light fa-chevron-down absolute top-3 ".concat(direction === "ltr" ? "right-2" : "left-2", " cursor-pointer"), iconClassName)
|
|
5499
|
+
}),
|
|
5500
|
+
isOpen && /* @__PURE__ */ jsx19("div", {
|
|
5501
|
+
className: cn("absolute w-full bg-white border border-gray-300 max-h-32 overflow-y-auto z-10", optionsContainerClassName),
|
|
5502
|
+
children: sortOptions.map(function(option) {
|
|
5503
|
+
return /* @__PURE__ */ jsx19("div", {
|
|
5504
|
+
className: "p-2 cursor-pointer hover:bg-gray-200 ".concat(optionClassName),
|
|
5505
|
+
onClick: function() {
|
|
5506
|
+
return handleOptionClick(option.value);
|
|
5507
|
+
},
|
|
5508
|
+
children: option.label
|
|
5509
|
+
}, option.value);
|
|
5492
5510
|
})
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5511
|
+
}),
|
|
5512
|
+
/* @__PURE__ */ jsx19("input", {
|
|
5513
|
+
value: selectedValue,
|
|
5514
|
+
type: "hidden",
|
|
5515
|
+
name: name,
|
|
5516
|
+
required: required
|
|
5517
|
+
})
|
|
5518
|
+
]
|
|
5519
|
+
})
|
|
5520
|
+
}));
|
|
5497
5521
|
};
|
|
5498
5522
|
function MultiSelect(param) {
|
|
5499
5523
|
var onChange = param.onChange, selectedOptions = param.selectedOptions, emptyOptionsElement = param.emptyOptionsElement, unremovableOptions = param.unremovableOptions, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_styles = param.styles, styles = _param_styles === void 0 ? {} : _param_styles, _param_name = param.name, name = _param_name === void 0 ? "multipleSelect" : _param_name, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "Select items" : _param_placeholder, labelContent = param.labelContent, required = param.required, labelClassName = param.labelClassName, groupBy = param.groupBy, onSearch = param.onSearch, onSearchSync = param.onSearchSync, triggerSearchOnFocus = param.triggerSearchOnFocus, _param_sortDirection = param.sortDirection, sortDirection = _param_sortDirection === void 0 ? "abc" : _param_sortDirection, sortAsNumber = param.sortAsNumber, direction = param.direction, createNewOptionLabel = param.createNewOptionLabel, searchInputProps = param.searchInputProps, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName;
|
|
5500
5524
|
var sortOptions = useSortValues(options, sortDirection, sortAsNumber);
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5525
|
+
var containerProps = useMemo8(function() {
|
|
5526
|
+
return {
|
|
5527
|
+
containerClassName: styles.containerClassName,
|
|
5528
|
+
direction: direction,
|
|
5529
|
+
labelClassName: labelClassName,
|
|
5530
|
+
labelContent: labelContent,
|
|
5531
|
+
labelWithDots: labelWithDots,
|
|
5532
|
+
labelsCommonClassName: labelsCommonClassName,
|
|
5533
|
+
name: name,
|
|
5534
|
+
required: required,
|
|
5535
|
+
defaultContainerClassName: !!labelContent
|
|
5536
|
+
};
|
|
5537
|
+
}, [
|
|
5538
|
+
styles.containerClassName,
|
|
5539
|
+
direction,
|
|
5540
|
+
labelClassName,
|
|
5541
|
+
labelContent,
|
|
5542
|
+
labelWithDots,
|
|
5543
|
+
labelsCommonClassName,
|
|
5544
|
+
name,
|
|
5545
|
+
required
|
|
5546
|
+
]);
|
|
5547
|
+
return /* @__PURE__ */ jsx19(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5548
|
+
children: /* @__PURE__ */ jsx19(multiselect_default, {
|
|
5549
|
+
commandProps: {
|
|
5550
|
+
label: placeholder
|
|
5551
|
+
},
|
|
5552
|
+
name: name,
|
|
5553
|
+
defaultOptions: sortOptions,
|
|
5554
|
+
unremovableOptions: unremovableOptions,
|
|
5555
|
+
value: selectedOptions,
|
|
5556
|
+
onChange: onChange,
|
|
5557
|
+
onSearch: onSearch,
|
|
5558
|
+
onSearchSync: onSearchSync,
|
|
5559
|
+
triggerSearchOnFocus: triggerSearchOnFocus,
|
|
5560
|
+
groupBy: groupBy,
|
|
5561
|
+
placeholder: placeholder,
|
|
5562
|
+
createNewOptionLabel: createNewOptionLabel,
|
|
5563
|
+
hideClearAllButton: true,
|
|
5564
|
+
hidePlaceholderWhenSelected: true,
|
|
5565
|
+
badgeClassName: styles.badgeClassName,
|
|
5566
|
+
className: cn(defaultFormElementBorderClassName, styles.className),
|
|
5567
|
+
dropdownClassName: styles.dropdownClassName,
|
|
5568
|
+
dropdownOptionClassName: styles.dropdownOptionClassName,
|
|
5569
|
+
emptyIndicator: emptyOptionsElement || /* @__PURE__ */ jsx19("p", {
|
|
5570
|
+
className: "text-center text-sm",
|
|
5571
|
+
children: "all options selected."
|
|
5512
5572
|
}),
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
defaultOptions: sortOptions,
|
|
5519
|
-
unremovableOptions: unremovableOptions,
|
|
5520
|
-
value: selectedOptions,
|
|
5521
|
-
onChange: onChange,
|
|
5522
|
-
onSearch: onSearch,
|
|
5523
|
-
onSearchSync: onSearchSync,
|
|
5524
|
-
triggerSearchOnFocus: triggerSearchOnFocus,
|
|
5525
|
-
groupBy: groupBy,
|
|
5526
|
-
placeholder: placeholder,
|
|
5527
|
-
createNewOptionLabel: createNewOptionLabel,
|
|
5528
|
-
hideClearAllButton: true,
|
|
5529
|
-
hidePlaceholderWhenSelected: true,
|
|
5530
|
-
badgeClassName: styles.badgeClassName,
|
|
5531
|
-
className: cn(defaultFormElementBorderClassName, styles.className),
|
|
5532
|
-
dropdownClassName: styles.dropdownClassName,
|
|
5533
|
-
dropdownOptionClassName: styles.dropdownOptionClassName,
|
|
5534
|
-
emptyIndicator: emptyOptionsElement || /* @__PURE__ */ jsx19("p", {
|
|
5535
|
-
className: "text-center text-sm",
|
|
5536
|
-
children: "all options selected."
|
|
5537
|
-
}),
|
|
5538
|
-
emptyIndicatorClassName: styles.emptyIndicatorClassName,
|
|
5539
|
-
dropdownContainerClassName: styles.dropdownContainerClassName,
|
|
5540
|
-
inputProps: searchInputProps
|
|
5541
|
-
})
|
|
5542
|
-
]
|
|
5543
|
-
});
|
|
5573
|
+
emptyIndicatorClassName: styles.emptyIndicatorClassName,
|
|
5574
|
+
dropdownContainerClassName: styles.dropdownContainerClassName,
|
|
5575
|
+
inputProps: searchInputProps
|
|
5576
|
+
})
|
|
5577
|
+
}));
|
|
5544
5578
|
}
|
|
5545
5579
|
var SelectWithSearch = function(param) {
|
|
5546
5580
|
var options = param.options, labelClassName = param.labelClassName, labelContent = param.labelContent, name = param.name, onChange = param.onChange, value = param.value, placeholder = param.placeholder, required = param.required, defaultValue = param.defaultValue, notFoundLabel = param.notFoundLabel, searchPlaceholder = param.searchPlaceholder, containerClassName = param.containerClassName, dropdownClassName = param.dropdownClassName, dropdownOptionClassName = param.dropdownOptionClassName, elementClassName = param.elementClassName, notFoundLabelClassName = param.notFoundLabelClassName, searchClassName = param.searchClassName, buttonClassName = param.buttonClassName, buttonFocusClassName = param.buttonFocusClassName, _param_sortDirection = param.sortDirection, sortDirection = _param_sortDirection === void 0 ? "abc" : _param_sortDirection, sortAsNumber = param.sortAsNumber, disabled = param.disabled, direction = param.direction, createNewOptionLabel = param.createNewOptionLabel, createNewOptionContainerClassName = param.createNewOptionContainerClassName, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName;
|
|
5547
5581
|
var sortOptions = useSortValues(options, sortDirection, sortAsNumber);
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5582
|
+
var containerProps = useMemo8(function() {
|
|
5583
|
+
return {
|
|
5584
|
+
containerClassName: containerClassName,
|
|
5585
|
+
direction: direction,
|
|
5586
|
+
labelClassName: labelClassName,
|
|
5587
|
+
labelContent: labelContent,
|
|
5588
|
+
labelWithDots: labelWithDots,
|
|
5589
|
+
labelsCommonClassName: labelsCommonClassName,
|
|
5590
|
+
name: name,
|
|
5591
|
+
required: required
|
|
5592
|
+
};
|
|
5593
|
+
}, [
|
|
5594
|
+
containerClassName,
|
|
5595
|
+
direction,
|
|
5596
|
+
labelClassName,
|
|
5597
|
+
labelContent,
|
|
5598
|
+
labelWithDots,
|
|
5599
|
+
labelsCommonClassName,
|
|
5600
|
+
name,
|
|
5601
|
+
required
|
|
5602
|
+
]);
|
|
5603
|
+
return /* @__PURE__ */ jsx19(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5604
|
+
children: /* @__PURE__ */ jsx19(SearchSelect, {
|
|
5605
|
+
direction: direction,
|
|
5606
|
+
createNewOptionLabel: createNewOptionLabel,
|
|
5607
|
+
createNewOptionContainerClassName: createNewOptionContainerClassName,
|
|
5608
|
+
options: sortOptions,
|
|
5609
|
+
value: value,
|
|
5610
|
+
onChange: onChange,
|
|
5611
|
+
defaultValue: defaultValue,
|
|
5612
|
+
name: name,
|
|
5613
|
+
elementClassName: elementClassName,
|
|
5614
|
+
selectPlaceholder: placeholder,
|
|
5615
|
+
buttonClassName: cn(defaultFormElementBorderClassName, buttonClassName),
|
|
5616
|
+
buttonFocusClassName: buttonFocusClassName,
|
|
5617
|
+
disabled: disabled,
|
|
5618
|
+
searchClassName: searchClassName,
|
|
5619
|
+
searchPlaceholder: searchPlaceholder,
|
|
5620
|
+
dropdownClassName: dropdownClassName,
|
|
5621
|
+
dropdownOptionClassName: dropdownOptionClassName,
|
|
5622
|
+
notFoundLabelClassName: notFoundLabelClassName,
|
|
5623
|
+
notFoundLabel: notFoundLabel
|
|
5624
|
+
})
|
|
5625
|
+
}));
|
|
5583
5626
|
};
|
|
5584
5627
|
var TextAreaContainer = function(param) {
|
|
5585
5628
|
var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, placeholder = param.placeholder, props = param.props, minLength = param.minLength, onKeyDown = param.onKeyDown, onChange = param.onChange, direction = param.direction, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName;
|
|
5629
|
+
var containerProps = useMemo8(function() {
|
|
5630
|
+
return {
|
|
5631
|
+
containerClassName: containerClassName,
|
|
5632
|
+
direction: direction,
|
|
5633
|
+
labelClassName: labelClassName,
|
|
5634
|
+
labelContent: labelContent,
|
|
5635
|
+
labelWithDots: labelWithDots,
|
|
5636
|
+
labelsCommonClassName: labelsCommonClassName,
|
|
5637
|
+
name: name,
|
|
5638
|
+
required: required
|
|
5639
|
+
};
|
|
5640
|
+
}, [
|
|
5641
|
+
containerClassName,
|
|
5642
|
+
direction,
|
|
5643
|
+
labelClassName,
|
|
5644
|
+
labelContent,
|
|
5645
|
+
labelWithDots,
|
|
5646
|
+
labelsCommonClassName,
|
|
5647
|
+
name,
|
|
5648
|
+
required
|
|
5649
|
+
]);
|
|
5650
|
+
return /* @__PURE__ */ jsx19(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5651
|
+
children: /* @__PURE__ */ jsx19("textarea", _object_spread_props(_object_spread({}, props), {
|
|
5652
|
+
onChange: onChange,
|
|
5653
|
+
minLength: minLength,
|
|
5654
|
+
placeholder: placeholder,
|
|
5655
|
+
className: cn("flex-1 bg-inherit min-h-16 max-h-52 overflow-auto px-2 py-1", defaultFormElementBorderClassName, elementClassName),
|
|
5656
|
+
defaultValue: defaultValue,
|
|
5657
|
+
required: required,
|
|
5658
|
+
name: name,
|
|
5659
|
+
onKeyDown: onKeyDown
|
|
5660
|
+
}))
|
|
5661
|
+
}));
|
|
5662
|
+
};
|
|
5663
|
+
var FormSeparator = function(param) {
|
|
5664
|
+
var props = param.props, children = param.children;
|
|
5665
|
+
return /* @__PURE__ */ jsx19("div", _object_spread_props(_object_spread({}, props), {
|
|
5666
|
+
className: cn("border-b-[1px] border-gray-300 h-[1px]", props === null || props === void 0 ? void 0 : props.className),
|
|
5667
|
+
children: children
|
|
5668
|
+
}));
|
|
5669
|
+
};
|
|
5670
|
+
var CheckboxContainer = function(param) {
|
|
5671
|
+
var id = param.id, checked = param.checked, setChecked = param.setChecked, circleClassName = param.circleClassName, className = param.className, containerClassName = param.containerClassName, elementClassName = param.elementClassName, name = param.name, direction = param.direction, labelClassName = param.labelClassName, labelContent = param.labelContent, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName, props = param.props, rotate = param.rotate, title = param.title, required = param.required;
|
|
5672
|
+
var containerProps = useMemo8(function() {
|
|
5673
|
+
return {
|
|
5674
|
+
containerClassName: containerClassName,
|
|
5675
|
+
direction: direction,
|
|
5676
|
+
labelClassName: labelClassName,
|
|
5677
|
+
labelContent: labelContent,
|
|
5678
|
+
labelWithDots: labelWithDots,
|
|
5679
|
+
labelsCommonClassName: labelsCommonClassName,
|
|
5680
|
+
name: name,
|
|
5681
|
+
required: required
|
|
5682
|
+
};
|
|
5683
|
+
}, [
|
|
5684
|
+
containerClassName,
|
|
5685
|
+
direction,
|
|
5686
|
+
labelClassName,
|
|
5687
|
+
labelContent,
|
|
5688
|
+
labelWithDots,
|
|
5689
|
+
labelsCommonClassName,
|
|
5690
|
+
name,
|
|
5691
|
+
required
|
|
5692
|
+
]);
|
|
5693
|
+
return /* @__PURE__ */ jsx19(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5694
|
+
children: /* @__PURE__ */ jsx19(Checkbox, {
|
|
5695
|
+
id: id,
|
|
5696
|
+
name: name,
|
|
5697
|
+
checked: checked,
|
|
5698
|
+
setChecked: setChecked,
|
|
5699
|
+
props: props,
|
|
5700
|
+
rotate: rotate,
|
|
5701
|
+
circleClassName: circleClassName,
|
|
5702
|
+
className: className,
|
|
5703
|
+
containerClassName: containerClassName,
|
|
5704
|
+
elementClassName: elementClassName,
|
|
5705
|
+
title: title
|
|
5706
|
+
})
|
|
5707
|
+
}));
|
|
5708
|
+
};
|
|
5709
|
+
var FormElementContainer = function(param) {
|
|
5710
|
+
var containerClassName = param.containerClassName, direction = param.direction, labelClassName = param.labelClassName, labelContent = param.labelContent, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName, name = param.name, required = param.required, children = param.children, _param_defaultContainerClassName = param.defaultContainerClassName, defaultContainerClassName = _param_defaultContainerClassName === void 0 ? true : _param_defaultContainerClassName;
|
|
5586
5711
|
return /* @__PURE__ */ jsxs14("div", {
|
|
5587
|
-
className: cn(defaultFormElementContainerClassName, containerClassName),
|
|
5712
|
+
className: cn(defaultContainerClassName ? defaultFormElementContainerClassName : "", containerClassName),
|
|
5588
5713
|
children: [
|
|
5589
5714
|
labelContent && /* @__PURE__ */ jsx19(ElementLabel, {
|
|
5590
5715
|
labelsCommonClassName: labelsCommonClassName,
|
|
5716
|
+
withDots: labelWithDots,
|
|
5591
5717
|
direction: direction,
|
|
5592
5718
|
labelContent: labelContent,
|
|
5593
5719
|
labelClassName: labelClassName,
|
|
5594
5720
|
name: name,
|
|
5595
|
-
required: required
|
|
5596
|
-
withDots: labelWithDots
|
|
5721
|
+
required: required
|
|
5597
5722
|
}),
|
|
5598
|
-
|
|
5599
|
-
onChange: onChange,
|
|
5600
|
-
minLength: minLength,
|
|
5601
|
-
placeholder: placeholder,
|
|
5602
|
-
className: cn("flex-1 bg-inherit min-h-16 max-h-52 overflow-auto px-2 py-1", defaultFormElementBorderClassName, elementClassName),
|
|
5603
|
-
defaultValue: defaultValue,
|
|
5604
|
-
required: required,
|
|
5605
|
-
name: name,
|
|
5606
|
-
onKeyDown: onKeyDown
|
|
5607
|
-
}))
|
|
5723
|
+
children
|
|
5608
5724
|
]
|
|
5609
5725
|
});
|
|
5610
5726
|
};
|
|
5611
|
-
var FormSeparator = function(param) {
|
|
5612
|
-
var props = param.props, children = param.children;
|
|
5613
|
-
return /* @__PURE__ */ jsx19("div", _object_spread_props(_object_spread({}, props), {
|
|
5614
|
-
className: cn("border-b-[1px] border-gray-300 h-[1px]", props === null || props === void 0 ? void 0 : props.className),
|
|
5615
|
-
children: children
|
|
5616
|
-
}));
|
|
5617
|
-
};
|
|
5618
5727
|
var ElementLabel = function(param) {
|
|
5619
5728
|
var labelContent = param.labelContent, labelClassName = param.labelClassName, name = param.name, required = param.required, _param_withDots = param.withDots, withDots = _param_withDots === void 0 ? false : _param_withDots, direction = param.direction, labelsCommonClassName = param.labelsCommonClassName;
|
|
5620
5729
|
return /* @__PURE__ */ jsxs14("label", {
|
|
@@ -5700,7 +5809,8 @@ var ModularForm = function(param) {
|
|
|
5700
5809
|
var hasMinLengthType = function(element2) {
|
|
5701
5810
|
return ![
|
|
5702
5811
|
"custom",
|
|
5703
|
-
"separator"
|
|
5812
|
+
"separator",
|
|
5813
|
+
"checkbox"
|
|
5704
5814
|
].includes(element2.type);
|
|
5705
5815
|
};
|
|
5706
5816
|
if (hasMinLengthType(element) && element.minLength) {
|
|
@@ -5774,6 +5884,11 @@ var ModularForm = function(param) {
|
|
|
5774
5884
|
direction: direction,
|
|
5775
5885
|
labelsCommonClassName: labelsCommonClassName
|
|
5776
5886
|
}), index2);
|
|
5887
|
+
case "checkbox":
|
|
5888
|
+
return /* @__PURE__ */ jsx20(CheckboxContainer, _object_spread_props(_object_spread({}, element), {
|
|
5889
|
+
direction: direction,
|
|
5890
|
+
labelsCommonClassName: labelsCommonClassName
|
|
5891
|
+
}), index2);
|
|
5777
5892
|
case "multiSelect":
|
|
5778
5893
|
return /* @__PURE__ */ jsx20(MultiSelect, _object_spread_props(_object_spread({}, element), {
|
|
5779
5894
|
direction: direction,
|
|
@@ -5992,5 +6107,5 @@ function Slot2(props) {
|
|
|
5992
6107
|
})
|
|
5993
6108
|
});
|
|
5994
6109
|
}
|
|
5995
|
-
export { Badge, BooleanUi, Button, Checkbox, CodeInput, ConfirmForm, DatePicker, DisplayAllRowsButton, DurationUI, ElementLabel, ErrorBoundary, ExportToExcel, Filter, FormSeparator, GeoUi, Input, InputContainer, InternationalPhonePicker, Loader, LoginWithGoogleButton, MaxRowsLabel, ModularForm_default as ModularForm, MultiSelect, NumberUI, PhoneUI, ProgressComponent, Search, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, TableProvider, TableRow2 as TableRow, TextAreaContainer, TimesUI, Version, badgeVariants, buttonVariants, defaultFormElementBorderClassName, defaultFormElementContainerClassName, useDebounce, useSortValues };
|
|
6110
|
+
export { Badge, BooleanUi, Button, Checkbox, CheckboxContainer, CodeInput, ConfirmForm, DatePicker, DisplayAllRowsButton, DurationUI, ElementLabel, ErrorBoundary, ExportToExcel, Filter, FormElementContainer, FormSeparator, GeoUi, Input, InputContainer, InternationalPhonePicker, Loader, LoginWithGoogleButton, MaxRowsLabel, ModularForm_default as ModularForm, MultiSelect, NumberUI, PhoneUI, ProgressComponent, Search, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, TableProvider, TableRow2 as TableRow, TextAreaContainer, TimesUI, Version, badgeVariants, buttonVariants, defaultFormElementBorderClassName, defaultFormElementContainerClassName, useDebounce, useSortValues };
|
|
5996
6111
|
//# sourceMappingURL=index.mjs.map
|