intelicoreact 1.6.19 → 1.6.20
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/Atomic/FormElements/ActionAlert/ActionAlert.js +102 -1
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +89 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.js +232 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.props.js +3 -1
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +101 -1
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +70 -1
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +350 -1
- package/dist/Atomic/FormElements/Datepicker/Datepicker.props.js +3 -1
- package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.js +177 -1
- package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.props.js +3 -1
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +561 -1
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +20 -1
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +405 -1
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +94 -1
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +105 -1
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +67 -1
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +247 -1
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +160 -1
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +193 -1
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +135 -1
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +116 -1
- package/dist/Atomic/FormElements/Input/Input.js +467 -1
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +161 -1
- package/dist/Atomic/FormElements/InputColor/InputColor.js +64 -1
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +166 -1
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +354 -1
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +71 -1
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +693 -1
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +254 -1
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +32 -1
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +200 -1
- package/dist/Atomic/FormElements/InputLink/InputLink.js +99 -1
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +37 -1
- package/dist/Atomic/FormElements/InputMask/InputMask.js +1214 -1
- package/dist/Atomic/FormElements/InputMask/config.js +15 -1
- package/dist/Atomic/FormElements/InputMask/functions.js +58 -1
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +674 -1
- package/dist/Atomic/FormElements/InputMask2/config.js +15 -1
- package/dist/Atomic/FormElements/InputMask2/functions.js +58 -1
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +766 -1
- package/dist/Atomic/FormElements/InputMask3/config.js +15 -1
- package/dist/Atomic/FormElements/InputMask3/functions.js +58 -1
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +114 -1
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +140 -1
- package/dist/Atomic/FormElements/Label/Label.js +82 -1
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +506 -1
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +45 -1
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +331 -1
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +66 -1
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +80 -1
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +64 -1
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +54 -1
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +183 -1
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +209 -1
- package/dist/Atomic/FormElements/RangeList/RangeList.js +175 -1
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +43 -1
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +443 -1
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +858 -1
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +39 -1
- package/dist/Atomic/FormElements/Switcher/Switcher.js +59 -1
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +50 -1
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +47 -1
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +96 -1
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +40 -1
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +64 -1
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +170 -1
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +202 -1
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +67 -1
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +115 -1
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +826 -1
- package/dist/Atomic/FormElements/Text/Text.js +125 -1
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +45 -1
- package/dist/Atomic/FormElements/Textarea/Textarea.js +80 -1
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +176 -1
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +62 -1
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +127 -1
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +220 -1
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +83 -1
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +82 -1
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +101 -1
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +29 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +113 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +30 -1
- package/dist/Atomic/Layout/Header/Header.js +85 -1
- package/dist/Atomic/Layout/Spinner/Spinner.js +39 -1
- package/dist/Atomic/UI/Accordion/Accordion.js +118 -1
- package/dist/Atomic/UI/Accordion/AccordionItem.js +181 -1
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +238 -1
- package/dist/Atomic/UI/AccordionText/AccordionText.js +69 -1
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +207 -1
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +56 -1
- package/dist/Atomic/UI/Alert/Alert.js +72 -1
- package/dist/Atomic/UI/Arrow/Arrow.js +132 -1
- package/dist/Atomic/UI/Box/Box.js +52 -1
- package/dist/Atomic/UI/Button/Button.js +89 -1
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +72 -1
- package/dist/Atomic/UI/Chart/Chart.js +172 -1
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +95 -1
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +80 -1
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +188 -1
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +335 -1
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +43 -1
- package/dist/Atomic/UI/Chart/partial/utils.js +60 -1
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +109 -1
- package/dist/Atomic/UI/DateTime/DateTime.js +57 -1
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +44 -1
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +15 -1
- package/dist/Atomic/UI/DoubleString/DoubleString.js +102 -1
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +226 -1
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +221 -1
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +106 -1
- package/dist/Atomic/UI/Hint/Hint.js +193 -1
- package/dist/Atomic/UI/Hint/partials/_utils.js +51 -1
- package/dist/Atomic/UI/Modal/Modal.js +188 -1
- package/dist/Atomic/UI/Modal/ModalHOC.js +72 -1
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +46 -1
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +83 -1
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +200 -1
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.js +75 -1
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +80 -1
- package/dist/Atomic/UI/NavLine/NavLine.js +293 -1
- package/dist/Atomic/UI/PageTitle/PageTitle.js +75 -1
- package/dist/Atomic/UI/PieChart/PieChart.js +42 -1
- package/dist/Atomic/UI/Price/Price.js +22 -1
- package/dist/Atomic/UI/PriceRange/PriceRange.js +36 -1
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +71 -1
- package/dist/Atomic/UI/Status/Status.js +59 -1
- package/dist/Atomic/UI/Table/Partials/TdCell.js +87 -1
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +38 -1
- package/dist/Atomic/UI/Table/Partials/TdRow.js +99 -1
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +52 -1
- package/dist/Atomic/UI/Table/Table.js +63 -1
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +80 -1
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +28 -1
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +13 -1
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +53 -1
- package/dist/Atomic/UI/Tag/Tag.js +160 -1
- package/dist/Atomic/UI/TagList/TagList.js +251 -1
- package/dist/Atomic/UI/UserBox/UserBox.js +73 -1
- package/dist/Atomic/UI/WizardStepper/constructor.js +84 -1
- package/dist/Atomic/UI/WizardStepper/index.js +3 -1
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +37 -1
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/index.js +3 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +61 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/index.js +3 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +39 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/index.js +3 -1
- package/dist/Atomic/UI/WizardStepper/ui/icons.js +49 -1
- package/dist/Atomic/UI/WizardStepper/ui/index.js +3 -1
- package/dist/Classes/AbortableFetch.js +454 -1
- package/dist/Classes/AnimatedHandler.js +47 -1
- package/dist/Classes/RESTAPI/index.js +228 -1
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +457 -1
- package/dist/Classes/RESTAPI/partials/ApiBase.js +48 -1
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +112 -1
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +189 -1
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +252 -1
- package/dist/Classes/RESTAPI/partials/Utils.js +92 -1
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +3 -1
- package/dist/Classes/RESTAPI/partials/_utils.js +197 -1
- package/dist/Constants/index.constants.js +78 -1
- package/dist/Functions/Portal.js +22 -1
- package/dist/Functions/customEventListener.js +96 -1
- package/dist/Functions/dateTime.js +149 -1
- package/dist/Functions/fieldValueFormatters.js +405 -1
- package/dist/Functions/guards/assertions.js +66 -1
- package/dist/Functions/guards/safeValue.js +30 -1
- package/dist/Functions/guards/typeGuards.js +116 -1
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +95 -1
- package/dist/Functions/locale/createTranslator.js +32 -1
- package/dist/Functions/operations.js +130 -1
- package/dist/Functions/presets/inputMaskPresets.js +170 -1
- package/dist/Functions/presets/inputPresets.js +60 -1
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +45 -1
- package/dist/Functions/schemas.js +31 -1
- package/dist/Functions/useBodyScrollLock.js +17 -1
- package/dist/Functions/useClickOutside.js +15 -1
- package/dist/Functions/useDebounce.js +17 -1
- package/dist/Functions/useFieldFocus.js +84 -1
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +39 -1
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +159 -1
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +78 -1
- package/dist/Functions/useFormTools/functions/General.js +134 -1
- package/dist/Functions/useFormTools/functions/RenderFields.js +111 -1
- package/dist/Functions/useFormTools/functions/usePrevious.js +12 -1
- package/dist/Functions/useFormTools/index.js +778 -1
- package/dist/Functions/useInputHighlightError.js +67 -1
- package/dist/Functions/useIsMobile/useIsMobile.js +53 -1
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +21 -1
- package/dist/Functions/useKeyPress/useKeyPress.js +75 -1
- package/dist/Functions/useLocalStorage.js +34 -1
- package/dist/Functions/useLocationParams.js +27 -1
- package/dist/Functions/useMediaQuery.js +17 -1
- package/dist/Functions/useMetaInfo.js +43 -1
- package/dist/Functions/useMouseUpOutside.js +16 -1
- package/dist/Functions/useOnlineStatus.js +29 -1
- package/dist/Functions/usePasswordChecker.js +110 -1
- package/dist/Functions/usePrevious.js +12 -1
- package/dist/Functions/useResize.js +31 -1
- package/dist/Functions/useScrollTo.js +17 -1
- package/dist/Functions/useToggle.js +17 -1
- package/dist/Functions/utils.js +522 -1
- package/dist/Langs.js +168 -1
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +21 -1
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +23 -1
- package/dist/Molecular/CustomIcons/components/AppStore.js +29 -1
- package/dist/Molecular/CustomIcons/components/Arrow.js +32 -1
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +17 -1
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +22 -1
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +22 -1
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +17 -1
- package/dist/Molecular/CustomIcons/components/Bell.js +15 -1
- package/dist/Molecular/CustomIcons/components/Button.js +12 -1
- package/dist/Molecular/CustomIcons/components/Campaigns.js +16 -1
- package/dist/Molecular/CustomIcons/components/Check.js +14 -1
- package/dist/Molecular/CustomIcons/components/Check2.js +12 -1
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +12 -1
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +11 -1
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +11 -1
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +11 -1
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +11 -1
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +27 -1
- package/dist/Molecular/CustomIcons/components/Close.js +14 -1
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +17 -1
- package/dist/Molecular/CustomIcons/components/Delete.js +16 -1
- package/dist/Molecular/CustomIcons/components/Edit.js +15 -1
- package/dist/Molecular/CustomIcons/components/Email.js +31 -1
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +18 -1
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +35 -1
- package/dist/Molecular/CustomIcons/components/Flows.js +15 -1
- package/dist/Molecular/CustomIcons/components/Gift.js +25 -1
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +29 -1
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +29 -1
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +19 -1
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +20 -1
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +19 -1
- package/dist/Molecular/CustomIcons/components/Home.js +16 -1
- package/dist/Molecular/CustomIcons/components/Home2.js +22 -1
- package/dist/Molecular/CustomIcons/components/Key.js +23 -1
- package/dist/Molecular/CustomIcons/components/Landers.js +20 -1
- package/dist/Molecular/CustomIcons/components/Lock.js +15 -1
- package/dist/Molecular/CustomIcons/components/Mail.js +26 -1
- package/dist/Molecular/CustomIcons/components/Mastercard.js +73 -1
- package/dist/Molecular/CustomIcons/components/Minus.js +25 -1
- package/dist/Molecular/CustomIcons/components/Offers.js +16 -1
- package/dist/Molecular/CustomIcons/components/Pause.js +28 -1
- package/dist/Molecular/CustomIcons/components/PayPal.js +41 -1
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +28 -1
- package/dist/Molecular/CustomIcons/components/Phone.js +30 -1
- package/dist/Molecular/CustomIcons/components/Play.js +25 -1
- package/dist/Molecular/CustomIcons/components/Plus.js +25 -1
- package/dist/Molecular/CustomIcons/components/Profile.js +16 -1
- package/dist/Molecular/CustomIcons/components/QRCode.js +29 -1
- package/dist/Molecular/CustomIcons/components/Rectangle.js +12 -1
- package/dist/Molecular/CustomIcons/components/Revert.js +13 -1
- package/dist/Molecular/CustomIcons/components/Star.js +14 -1
- package/dist/Molecular/CustomIcons/components/Star2.js +16 -1
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +14 -1
- package/dist/Molecular/CustomIcons/components/Trash.js +15 -1
- package/dist/Molecular/CustomIcons/components/TrashRed.js +15 -1
- package/dist/Molecular/CustomIcons/components/Triggers.js +15 -1
- package/dist/Molecular/CustomIcons/components/User.js +25 -1
- package/dist/Molecular/CustomIcons/components/Visa.js +31 -1
- package/dist/Molecular/CustomIcons/components/X.js +12 -1
- package/dist/Molecular/CustomIcons/index.js +61 -1
- package/dist/Molecular/FormElement/FormElement.js +54 -1
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +184 -1
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +53 -1
- package/dist/Molecular/InputAddress/InputAddress.js +620 -1
- package/dist/Molecular/InputPassword/InputPassword.js +48 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
|
|
3
|
+
import cn from "classnames";
|
|
4
|
+
|
|
5
|
+
import { useOutsideToggle } from "../../../../Functions/utils";
|
|
6
|
+
import { KEY_CODE } from "../../Modal/Modal";
|
|
7
|
+
|
|
8
|
+
import "../Table.scss";
|
|
9
|
+
|
|
10
|
+
const TdWeight = ({ value, percent, onChange, className }) => {
|
|
11
|
+
const [state, setState] = useState(value);
|
|
12
|
+
const {
|
|
13
|
+
isToggled: isEdited,
|
|
14
|
+
toggleOff: unsetIsEdited,
|
|
15
|
+
toggleOn: setIsEdited,
|
|
16
|
+
} = useOutsideToggle(false);
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
setState(value);
|
|
20
|
+
}, [value, isEdited]);
|
|
21
|
+
|
|
22
|
+
const handleKeyUp = ({ keyCode, target }) => {
|
|
23
|
+
if (keyCode === KEY_CODE.ENTER) {
|
|
24
|
+
const newValue = Number(target.value) || 1;
|
|
25
|
+
onChange(newValue);
|
|
26
|
+
unsetIsEdited();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<>
|
|
32
|
+
{isEdited ? (
|
|
33
|
+
<Input
|
|
34
|
+
value={state}
|
|
35
|
+
onChange={(e) => setState(e)}
|
|
36
|
+
onBlur={unsetIsEdited}
|
|
37
|
+
onKeyUp={handleKeyUp}
|
|
38
|
+
autoFocus
|
|
39
|
+
/>
|
|
40
|
+
) : (
|
|
41
|
+
<div className={cn("td-weight", className)} onClick={setIsEdited}>
|
|
42
|
+
<span>{value}</span>
|
|
43
|
+
<span className="ml2 color--grey-gull">
|
|
44
|
+
({percent}
|
|
45
|
+
%)
|
|
46
|
+
</span>
|
|
47
|
+
</div>
|
|
48
|
+
)}
|
|
49
|
+
</>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default TdWeight;
|
|
@@ -1 +1,160 @@
|
|
|
1
|
-
function e(e,
|
|
1
|
+
function e(e, t) {
|
|
2
|
+
(null == t || t > e.length) && (t = e.length);
|
|
3
|
+
for(var n = 0, r = Array(t); n < t; n++)r[n] = e[n];
|
|
4
|
+
return r;
|
|
5
|
+
}
|
|
6
|
+
function t(t, n) {
|
|
7
|
+
return function(e) {
|
|
8
|
+
if (Array.isArray(e)) return e;
|
|
9
|
+
}(t) || function(e, t) {
|
|
10
|
+
var n, r, o = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
|
|
11
|
+
if (null != o) {
|
|
12
|
+
var a = [], l = !0, u = !1;
|
|
13
|
+
try {
|
|
14
|
+
for(o = o.call(e); !(l = (n = o.next()).done) && (a.push(n.value), !t || a.length !== t); l = !0);
|
|
15
|
+
} catch (e) {
|
|
16
|
+
u = !0, r = e;
|
|
17
|
+
} finally{
|
|
18
|
+
try {
|
|
19
|
+
l || null == o.return || o.return();
|
|
20
|
+
} finally{
|
|
21
|
+
if (u) throw r;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return a;
|
|
25
|
+
}
|
|
26
|
+
}(t, n) || function(t, n) {
|
|
27
|
+
if (t) {
|
|
28
|
+
if ("string" == typeof t) return e(t, n);
|
|
29
|
+
var r = Object.prototype.toString.call(t).slice(8, -1);
|
|
30
|
+
if ("Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r) return Array.from(r);
|
|
31
|
+
if ("Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return e(t, n);
|
|
32
|
+
}
|
|
33
|
+
}(t, n) || function() {
|
|
34
|
+
throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
35
|
+
}();
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(exports, "__esModule", {
|
|
38
|
+
value: !0
|
|
39
|
+
}), Object.defineProperty(exports, "default", {
|
|
40
|
+
enumerable: !0,
|
|
41
|
+
get: function() {
|
|
42
|
+
return f;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
var n = require("react/jsx-runtime"), r = i(require("classnames")), o = function(e, t) {
|
|
46
|
+
if (e && e.__esModule) return e;
|
|
47
|
+
if (null === e || (void 0 === e ? "undefined" : e && "undefined" != typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e) != "object" && "function" != typeof e) return {
|
|
48
|
+
default: e
|
|
49
|
+
};
|
|
50
|
+
var n = c(t);
|
|
51
|
+
if (n && n.has(e)) return n.get(e);
|
|
52
|
+
var r = {
|
|
53
|
+
__proto__: null
|
|
54
|
+
}, o = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
55
|
+
for(var a in e)if ("default" !== a && Object.prototype.hasOwnProperty.call(e, a)) {
|
|
56
|
+
var l = o ? Object.getOwnPropertyDescriptor(e, a) : null;
|
|
57
|
+
l && (l.get || l.set) ? Object.defineProperty(r, a, l) : r[a] = e[a];
|
|
58
|
+
}
|
|
59
|
+
return r.default = e, n && n.set(e, r), r;
|
|
60
|
+
}(require("react")), a = require("react-dom"), l = require("react-feather"), u = i(require("../../Layout/Spinner"));
|
|
61
|
+
function i(e) {
|
|
62
|
+
return e && e.__esModule ? e : {
|
|
63
|
+
default: e
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function c(e) {
|
|
67
|
+
if ("function" != typeof WeakMap) return null;
|
|
68
|
+
var t = new WeakMap(), n = new WeakMap();
|
|
69
|
+
return (c = function(e) {
|
|
70
|
+
return e ? n : t;
|
|
71
|
+
})(e);
|
|
72
|
+
}
|
|
73
|
+
function s() {}
|
|
74
|
+
require("./Tag.scss");
|
|
75
|
+
var f = function(e) {
|
|
76
|
+
var i, c, f = e.value, d = e.className, p = e.style, m = e.label, y = e.warning, v = e.removeItem, g = e.name, b = e.isPopup, h = e.popupInfoContent, j = e.popupClassName, w = e.id, x = e.isNoDismiss, _ = e.onClick, O = void 0 === _ ? s : _, P = e.testId, M = (0, o.useRef)(null), N = t((0, o.useState)(!1), 2), S = N[0], E = N[1], k = t((0, o.useState)(!1), 2), C = k[0], q = k[1], A = null != (c = null == M || null == (i = M.current) ? void 0 : i.getBoundingClientRect()) ? c : {}, I = A.x, L = A.y, D = A.height, R = A.width, T = window.scrollY, W = (0, o.useMemo)(function() {
|
|
77
|
+
if (!C || !(null == M ? void 0 : M.current)) return {};
|
|
78
|
+
var e, t = null == M || null == (e = M.current) ? void 0 : e.getBoundingClientRect(), n = t.x, r = t.y, o = t.height, a = t.width;
|
|
79
|
+
return {
|
|
80
|
+
left: "".concat(n, "px"),
|
|
81
|
+
top: "".concat(r + T, "px"),
|
|
82
|
+
transform: "translate(calc(-1 * calc(100% - ".concat(a / 2 + 22, "px)), ").concat(o + 10, "px)")
|
|
83
|
+
};
|
|
84
|
+
}, [
|
|
85
|
+
C,
|
|
86
|
+
I,
|
|
87
|
+
L,
|
|
88
|
+
R,
|
|
89
|
+
D,
|
|
90
|
+
T
|
|
91
|
+
]), B = function() {
|
|
92
|
+
b && q(!C), O(w);
|
|
93
|
+
}, z = function() {
|
|
94
|
+
q(!1);
|
|
95
|
+
};
|
|
96
|
+
return (0, o.useEffect)(function() {
|
|
97
|
+
return document.addEventListener('click', z, !0), function() {
|
|
98
|
+
document.removeEventListener('click', z, !0);
|
|
99
|
+
};
|
|
100
|
+
}, []), (0, o.useEffect)(function() {
|
|
101
|
+
var e = function() {
|
|
102
|
+
q(!1);
|
|
103
|
+
};
|
|
104
|
+
return window.addEventListener('scroll', e, !0), function() {
|
|
105
|
+
window.removeEventListener('scroll', e, !0);
|
|
106
|
+
};
|
|
107
|
+
}, []), (0, n.jsxs)("div", {
|
|
108
|
+
onMouseEnter: function() {
|
|
109
|
+
return E(!0);
|
|
110
|
+
},
|
|
111
|
+
onMouseLeave: function() {
|
|
112
|
+
return E(!1);
|
|
113
|
+
},
|
|
114
|
+
"data-testid": void 0 === P ? 'tag' : P,
|
|
115
|
+
role: "listitem",
|
|
116
|
+
"aria-label": "Tag: ".concat(m || g),
|
|
117
|
+
className: (0, r.default)('tag', d, {
|
|
118
|
+
'tag-warn': y
|
|
119
|
+
}),
|
|
120
|
+
style: null != p ? p : {},
|
|
121
|
+
onClick: function() {
|
|
122
|
+
return B();
|
|
123
|
+
},
|
|
124
|
+
ref: M,
|
|
125
|
+
children: [
|
|
126
|
+
y && 'string' == typeof y && (0, n.jsx)(l.AlertTriangle, {
|
|
127
|
+
className: "advanced-tags--warning-icon mr5",
|
|
128
|
+
"aria-label": "Warning"
|
|
129
|
+
}),
|
|
130
|
+
y && 'string' == typeof y && S && (0, n.jsx)("div", {
|
|
131
|
+
className: "tag__warn-hint",
|
|
132
|
+
role: "tooltip",
|
|
133
|
+
children: y
|
|
134
|
+
}),
|
|
135
|
+
(0, n.jsx)("span", {
|
|
136
|
+
className: "tag__label",
|
|
137
|
+
children: m || g
|
|
138
|
+
}),
|
|
139
|
+
v && !(void 0 === x || x) && (0, n.jsx)("button", {
|
|
140
|
+
type: "button",
|
|
141
|
+
onClick: function(e) {
|
|
142
|
+
null == e || e.preventDefault(), null == e || e.stopPropagation(), v(f);
|
|
143
|
+
},
|
|
144
|
+
"aria-label": "Remove ".concat(m || g),
|
|
145
|
+
className: "tag__button",
|
|
146
|
+
children: (0, n.jsx)(l.X, {
|
|
147
|
+
className: "color--text"
|
|
148
|
+
})
|
|
149
|
+
}),
|
|
150
|
+
C && (0, a.createPortal)((0, n.jsx)("div", {
|
|
151
|
+
id: "tagPopup".concat(f),
|
|
152
|
+
className: (0, r.default)('tag__popup', j),
|
|
153
|
+
style: W,
|
|
154
|
+
children: h || (0, n.jsx)(u.default, {
|
|
155
|
+
size: "small"
|
|
156
|
+
})
|
|
157
|
+
}), document.getElementById('app'))
|
|
158
|
+
]
|
|
159
|
+
});
|
|
160
|
+
};
|
|
@@ -1 +1,251 @@
|
|
|
1
|
-
|
|
1
|
+
import React, {
|
|
2
|
+
createRef,
|
|
3
|
+
useEffect,
|
|
4
|
+
useLayoutEffect,
|
|
5
|
+
useRef,
|
|
6
|
+
useState,
|
|
7
|
+
} from "react";
|
|
8
|
+
|
|
9
|
+
import cn from "classnames";
|
|
10
|
+
import { Edit3 } from "react-feather";
|
|
11
|
+
|
|
12
|
+
import { checkedRef } from "../../../Functions/utils";
|
|
13
|
+
import Tag from "../Tag/Tag";
|
|
14
|
+
|
|
15
|
+
import "./TagList.scss";
|
|
16
|
+
|
|
17
|
+
const TagList = ({
|
|
18
|
+
disabled,
|
|
19
|
+
className,
|
|
20
|
+
onTagClick,
|
|
21
|
+
removeItem = null,
|
|
22
|
+
items = [],
|
|
23
|
+
withToggle = true,
|
|
24
|
+
disableShowMore = false,
|
|
25
|
+
shownItemsCount = "auto",
|
|
26
|
+
testId = "test-taglist",
|
|
27
|
+
refProp,
|
|
28
|
+
|
|
29
|
+
renderOrder,
|
|
30
|
+
|
|
31
|
+
onEditClick,
|
|
32
|
+
onToggleRenderAll,
|
|
33
|
+
}) => {
|
|
34
|
+
const wrapperRef = useRef(null);
|
|
35
|
+
const [tagList, setTagList] = useState([]);
|
|
36
|
+
|
|
37
|
+
const [staticTagsCount, setStaticTagsCount] = useState(-1);
|
|
38
|
+
const [renderItemsCount, setRenderItemsCount] = useState(-1);
|
|
39
|
+
const [renderAll, setRenderAll] = useState(!withToggle);
|
|
40
|
+
|
|
41
|
+
const wrapperWidth =
|
|
42
|
+
wrapperRef?.current?.getBoundingClientRect()?.width ?? -1;
|
|
43
|
+
|
|
44
|
+
const setRenderAllInterceptor = (v) => {
|
|
45
|
+
setRenderAll(v);
|
|
46
|
+
onToggleRenderAll?.(v);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const getStaticTagsCount = (computedWidth) => {
|
|
50
|
+
if (typeof shownItemsCount === "number") return shownItemsCount;
|
|
51
|
+
|
|
52
|
+
const delta = typeof onEditClick === "function" ? 60 : 32;
|
|
53
|
+
|
|
54
|
+
const result = tagList.reduce(
|
|
55
|
+
(result, { itemRef }, index) => {
|
|
56
|
+
if (result.skip) return result;
|
|
57
|
+
|
|
58
|
+
const itemStyle =
|
|
59
|
+
itemRef?.current && window.getComputedStyle(itemRef.current);
|
|
60
|
+
|
|
61
|
+
const itemWidth = [
|
|
62
|
+
parseInt(itemRef.current?.getBoundingClientRect()?.width, 10),
|
|
63
|
+
parseInt(itemStyle?.marginLeft, 10),
|
|
64
|
+
parseInt(itemStyle?.marginRight, 10),
|
|
65
|
+
].reduce((result, item) => {
|
|
66
|
+
if (!isNaN(item)) result += item;
|
|
67
|
+
return result;
|
|
68
|
+
}, 0);
|
|
69
|
+
|
|
70
|
+
if (
|
|
71
|
+
(!isNaN(itemWidth) &&
|
|
72
|
+
itemWidth > 0 &&
|
|
73
|
+
itemWidth + result.width < computedWidth - delta) ||
|
|
74
|
+
index === 0
|
|
75
|
+
) {
|
|
76
|
+
result = {
|
|
77
|
+
count: result.count + 1,
|
|
78
|
+
width: result.width + itemWidth,
|
|
79
|
+
items: [...result.items, { w: itemWidth, r: itemRef?.current }],
|
|
80
|
+
};
|
|
81
|
+
} else {
|
|
82
|
+
result.skip = true;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return result;
|
|
86
|
+
},
|
|
87
|
+
{ count: 0, width: 0, items: [], skip: false },
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
if (result?.items?.length === 1 && tagList.length > 1) {
|
|
91
|
+
result.items[0].r.style.maxWidth = `${computedWidth - delta - 8}px`;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return result?.count;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const cancelDefault = (e, cb = () => {}) => {
|
|
98
|
+
e?.preventDefault();
|
|
99
|
+
e?.stopPropagation();
|
|
100
|
+
|
|
101
|
+
cb(e);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const renderTags = () => {
|
|
105
|
+
const tagsRenderOrder =
|
|
106
|
+
renderOrder ?? tagList.map(({ value, id }) => value ?? id);
|
|
107
|
+
|
|
108
|
+
return tagsRenderOrder.map((v, i) => {
|
|
109
|
+
const item = tagList.find(({ value, id }) => (value ?? id) === v);
|
|
110
|
+
|
|
111
|
+
if (!item) return null;
|
|
112
|
+
|
|
113
|
+
const isHidden =
|
|
114
|
+
renderItemsCount !== -1 && staticTagsCount !== -1
|
|
115
|
+
? i >= renderItemsCount
|
|
116
|
+
: false;
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<div
|
|
120
|
+
className={`tag-list_wrapper_item ${isHidden ? "tag-list_wrapper_item--hidden" : ""}`}
|
|
121
|
+
key={`tag-list-item-${item?.id ?? item?.value}`}
|
|
122
|
+
ref={checkedRef(item?.itemRef)}
|
|
123
|
+
>
|
|
124
|
+
<Tag
|
|
125
|
+
testId={`test-taglist-item-${item?.id ?? item?.value}`}
|
|
126
|
+
{...item}
|
|
127
|
+
onClick={onTagClick}
|
|
128
|
+
removeItem={removeItem}
|
|
129
|
+
/>
|
|
130
|
+
</div>
|
|
131
|
+
);
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const renderMoreTags = () => {
|
|
136
|
+
if (
|
|
137
|
+
tagList?.length < shownItemsCount ||
|
|
138
|
+
!tagList?.length ||
|
|
139
|
+
disableShowMore
|
|
140
|
+
)
|
|
141
|
+
return null;
|
|
142
|
+
const restItems = tagList.length - renderItemsCount;
|
|
143
|
+
|
|
144
|
+
if (restItems === 0 || !withToggle || staticTagsCount === -1) return null;
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<Tag
|
|
148
|
+
label={`+${restItems}`}
|
|
149
|
+
className="tag-list_wrapper_render-more"
|
|
150
|
+
onClick={
|
|
151
|
+
disableShowMore
|
|
152
|
+
? () => {}
|
|
153
|
+
: (e) => cancelDefault(e, () => setRenderAllInterceptor(true))
|
|
154
|
+
}
|
|
155
|
+
/>
|
|
156
|
+
);
|
|
157
|
+
};
|
|
158
|
+
const renderHideTags = () => {
|
|
159
|
+
if (
|
|
160
|
+
renderItemsCount !== tagList?.length ||
|
|
161
|
+
!withToggle ||
|
|
162
|
+
staticTagsCount === -1 ||
|
|
163
|
+
staticTagsCount === tagList?.length
|
|
164
|
+
)
|
|
165
|
+
return null;
|
|
166
|
+
|
|
167
|
+
return (
|
|
168
|
+
<Tag
|
|
169
|
+
label="..."
|
|
170
|
+
className="tag-list_wrapper_hide-more"
|
|
171
|
+
onClick={(e) => cancelDefault(e, () => setRenderAllInterceptor(false))}
|
|
172
|
+
/>
|
|
173
|
+
);
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
// Set TagList Items
|
|
177
|
+
useEffect(() => {
|
|
178
|
+
setStaticTagsCount(-1);
|
|
179
|
+
setRenderItemsCount(-1);
|
|
180
|
+
setRenderAllInterceptor(false);
|
|
181
|
+
setTagList(items.map((item) => ({ ...item, itemRef: createRef() })));
|
|
182
|
+
}, [items]);
|
|
183
|
+
|
|
184
|
+
// Count Row Tags
|
|
185
|
+
useLayoutEffect(() => {
|
|
186
|
+
if (withToggle && wrapperWidth !== -1 && staticTagsCount === -1) {
|
|
187
|
+
let computedWidth = wrapperWidth;
|
|
188
|
+
|
|
189
|
+
if (computedWidth === 0) {
|
|
190
|
+
computedWidth = parseInt(
|
|
191
|
+
wrapperRef?.current
|
|
192
|
+
? window.getComputedStyle(wrapperRef?.current)?.width
|
|
193
|
+
: 0,
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (!isNaN(computedWidth)) {
|
|
198
|
+
setStaticTagsCount(getStaticTagsCount(computedWidth));
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}, [tagList, wrapperWidth, wrapperRef?.current]);
|
|
202
|
+
|
|
203
|
+
//
|
|
204
|
+
useLayoutEffect(() => {
|
|
205
|
+
setRenderItemsCount(staticTagsCount);
|
|
206
|
+
}, [staticTagsCount]);
|
|
207
|
+
|
|
208
|
+
// Toggle Show/Hide More Tags
|
|
209
|
+
useEffect(() => {
|
|
210
|
+
setRenderItemsCount(renderAll ? tagList?.length : staticTagsCount);
|
|
211
|
+
}, [renderAll]);
|
|
212
|
+
|
|
213
|
+
useEffect(() => {
|
|
214
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
215
|
+
if (wrapperRef?.current && refProp) refProp.current = wrapperRef?.current;
|
|
216
|
+
}, [wrapperRef?.current]);
|
|
217
|
+
|
|
218
|
+
return (
|
|
219
|
+
<div
|
|
220
|
+
className={cn(
|
|
221
|
+
"tag-list_wrapper",
|
|
222
|
+
`${
|
|
223
|
+
renderItemsCount !== tagList?.length ||
|
|
224
|
+
!withToggle ||
|
|
225
|
+
staticTagsCount === -1 ||
|
|
226
|
+
staticTagsCount === tagList?.length
|
|
227
|
+
? "tag-list_wrapper--only-static-items"
|
|
228
|
+
: "tag-list_wrapper--all-items"
|
|
229
|
+
}`,
|
|
230
|
+
className,
|
|
231
|
+
{ "tag-list_wrapper--disabled": disabled },
|
|
232
|
+
)}
|
|
233
|
+
style={{
|
|
234
|
+
visibility: staticTagsCount === -1 ? "hidden" : "visible",
|
|
235
|
+
zIndex: staticTagsCount === -1 ? "-1" : "auto",
|
|
236
|
+
}}
|
|
237
|
+
ref={wrapperRef}
|
|
238
|
+
>
|
|
239
|
+
{renderTags()}
|
|
240
|
+
{renderMoreTags()}
|
|
241
|
+
{renderHideTags()}
|
|
242
|
+
{typeof onEditClick === "function" && (
|
|
243
|
+
<div className="tag-list__edit-trigger">
|
|
244
|
+
<Edit3 onClick={onEditClick} />
|
|
245
|
+
</div>
|
|
246
|
+
)}
|
|
247
|
+
</div>
|
|
248
|
+
);
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export default TagList;
|
|
@@ -1 +1,73 @@
|
|
|
1
|
-
Object.defineProperty(exports,
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: !0
|
|
3
|
+
}), Object.defineProperty(exports, "default", {
|
|
4
|
+
enumerable: !0,
|
|
5
|
+
get: function() {
|
|
6
|
+
return o;
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
var e = require("react/jsx-runtime"), r = l(require("classnames"));
|
|
10
|
+
require("react");
|
|
11
|
+
var a = require("../../../Functions/utils"), s = l(require("../../FormElements/Label/Label")), t = l(require("../Button/Button"));
|
|
12
|
+
function l(e) {
|
|
13
|
+
return e && e.__esModule ? e : {
|
|
14
|
+
default: e
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
require("./UserBox.scss");
|
|
18
|
+
var o = function(l) {
|
|
19
|
+
var o = l.name, n = void 0 === o ? 'Username' : o, d = l.role, i = l.id, u = l.onClick, c = l.isModal, x = l.className, b = l.colors, m = l.testId, v = n.charAt(0).toUpperCase();
|
|
20
|
+
return (0, e.jsx)("div", {
|
|
21
|
+
"data-testid": void 0 === m ? 'userbox' : m,
|
|
22
|
+
className: (0, r.default)('td-user-box', x),
|
|
23
|
+
role: "region",
|
|
24
|
+
"aria-label": "User box for ".concat(n),
|
|
25
|
+
children: c ? (0, e.jsxs)(e.Fragment, {
|
|
26
|
+
children: [
|
|
27
|
+
(0, e.jsx)("div", {
|
|
28
|
+
style: {
|
|
29
|
+
backgroundColor: (0, a.getColorById)(i, b)
|
|
30
|
+
},
|
|
31
|
+
className: "td-user-box__avatar",
|
|
32
|
+
children: v
|
|
33
|
+
}),
|
|
34
|
+
(0, e.jsxs)("div", {
|
|
35
|
+
className: "td-user-box__user-data",
|
|
36
|
+
children: [
|
|
37
|
+
(0, e.jsx)(t.default, {
|
|
38
|
+
className: "p0 no-shadow",
|
|
39
|
+
onClick: u,
|
|
40
|
+
label: n,
|
|
41
|
+
variant: "link"
|
|
42
|
+
}),
|
|
43
|
+
d && (0, e.jsx)("span", {
|
|
44
|
+
children: d
|
|
45
|
+
})
|
|
46
|
+
]
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
}) : (0, e.jsxs)(e.Fragment, {
|
|
50
|
+
children: [
|
|
51
|
+
(0, e.jsx)("div", {
|
|
52
|
+
style: {
|
|
53
|
+
backgroundColor: (0, a.getColorById)(i)
|
|
54
|
+
},
|
|
55
|
+
className: "td-user-box__avatar",
|
|
56
|
+
children: v
|
|
57
|
+
}),
|
|
58
|
+
(0, e.jsxs)("div", {
|
|
59
|
+
className: "td-user-box__user-data",
|
|
60
|
+
children: [
|
|
61
|
+
(0, e.jsx)(s.default, {
|
|
62
|
+
label: n
|
|
63
|
+
}),
|
|
64
|
+
d && (0, e.jsx)("span", {
|
|
65
|
+
"aria-label": "User role: ".concat(d),
|
|
66
|
+
children: d
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
};
|
|
@@ -1 +1,84 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Status from '../Status/Status';
|
|
3
|
+
export const WIZARD_STEP_VARIANTS = Object.freeze({
|
|
4
|
+
DEFAULT: 'default',
|
|
5
|
+
DONE: 'done',
|
|
6
|
+
ACTIVE: 'active',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const JSXMockComponent = () => {
|
|
10
|
+
const arr = [
|
|
11
|
+
{ title: 'Requested Amont', value: '$15,000' },
|
|
12
|
+
{ title: 'Repayment Amount', value: '$15,001' },
|
|
13
|
+
{ title: 'Repayment Date', value: '12/12/2021' },
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
const textStyles = {
|
|
17
|
+
fontSize: '14px',
|
|
18
|
+
fontWeight: 400,
|
|
19
|
+
lineHeight: '20px',
|
|
20
|
+
letterSpacing: '0.2px'
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return arr.map(row => {
|
|
24
|
+
return <div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '250px'}}>
|
|
25
|
+
<span style={textStyles}>{row.title}</span>
|
|
26
|
+
<span style={textStyles}>{row.value}</span>
|
|
27
|
+
</div>
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const mockData = [
|
|
32
|
+
{
|
|
33
|
+
key: 'businessInfo',
|
|
34
|
+
label: 'Provide Business Info',
|
|
35
|
+
description: 'This information will help us to evaluate your application',
|
|
36
|
+
isFinished: true,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: 'principal',
|
|
40
|
+
label: 'Add Principal Information',
|
|
41
|
+
description: 'A principal is essentially another name for a company owner. At some corporations, the principal is also the founder, CEO, or even the chief investor',
|
|
42
|
+
isFinished: true,
|
|
43
|
+
isOptional: true,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: 'coOwners',
|
|
47
|
+
label: 'Add Co-Owners',
|
|
48
|
+
description: '{merchantName} will receive that amount from {lenderNmae}',
|
|
49
|
+
isActive: true,
|
|
50
|
+
titleSlot: <span className='custom-title-slot'>$15,001</span>,
|
|
51
|
+
contentSlot: <JSXMockComponent />,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: 'bankAccount',
|
|
55
|
+
label: 'Add a Bank Account',
|
|
56
|
+
description: 'Your bank account information will be used to securely and automatically transfer the funds',
|
|
57
|
+
titleSlot: <Status label="Some JSX" status="draft" />,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: 'documents',
|
|
61
|
+
label: 'Upload Documents',
|
|
62
|
+
description: 'Please upload the required documents',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: 'review',
|
|
66
|
+
label: 'Review & Submit',
|
|
67
|
+
description: 'Please review the information and submit your application',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: 'success',
|
|
71
|
+
label: 'Success',
|
|
72
|
+
description: 'Your application has been submitted successfully',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: 'failure',
|
|
76
|
+
label: 'Failure',
|
|
77
|
+
description: 'Your application has been failed',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
key: 'pending',
|
|
81
|
+
label: 'Pending',
|
|
82
|
+
description: 'Your application is under review',
|
|
83
|
+
},
|
|
84
|
+
]
|