intelicoreact 1.6.22 → 1.6.24
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 +98 -1
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +48 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.js +249 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.props.js +4 -1
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +65 -1
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +52 -1
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +424 -1
- package/dist/Atomic/FormElements/Datepicker/Datepicker.props.js +4 -1
- package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.js +173 -1
- package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.props.js +4 -1
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +735 -1
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +20 -1
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +529 -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 +200 -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 +87 -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 +57 -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 +222 -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 +44 -1
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +100 -1
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +52 -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.interface.ts +2 -2
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +1110 -1
- package/dist/Atomic/FormElements/Text/Text.js +125 -1
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +49 -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 +119 -1
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +188 -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 +44 -1
- package/dist/Atomic/UI/Accordion/Accordion.js +108 -1
- package/dist/Atomic/UI/Accordion/AccordionItem.js +176 -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 +47 -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 +70 -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 +256 -1
- package/dist/Atomic/UI/Hint/partials/_utils.js +64 -1
- package/dist/Atomic/UI/Modal/Modal.js +179 -1
- package/dist/Atomic/UI/Modal/ModalHOC.js +97 -1
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +71 -1
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +110 -1
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +192 -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 +317 -1
- package/dist/Atomic/UI/PageTitle/PageTitle.js +77 -1
- package/dist/Atomic/UI/PieChart/PieChart.js +42 -1
- package/dist/Atomic/UI/Price/Price.js +31 -1
- package/dist/Atomic/UI/PriceRange/PriceRange.js +44 -1
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +98 -1
- package/dist/Atomic/UI/Status/Status.js +67 -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 +167 -1
- package/dist/Atomic/UI/TagList/TagList.js +251 -1
- package/dist/Atomic/UI/UserBox/UserBox.js +86 -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 +294 -1
- package/dist/Functions/guards/safeValue.js +75 -1
- package/dist/Functions/guards/typeGuards.js +373 -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 +33 -1
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +52 -1
- package/dist/Functions/useKeyPress/useKeyPress.js +52 -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 +626 -1
- package/dist/Molecular/InputPassword/InputPassword.js +48 -1
- package/dist/index.js +104 -1
- package/package.json +1 -1
- package/dist/Molecular/InputAddress/InputAddress.d.ts +0 -26
- package/dist/Molecular/InputAddress/InputAddress.js.map +0 -1
|
@@ -1 +1,167 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
13
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
14
|
+
const _reactdom = require("react-dom");
|
|
15
|
+
const _reactfeather = require("react-feather");
|
|
16
|
+
const _Spinner = /*#__PURE__*/ _interop_require_default(require("../../Layout/Spinner"));
|
|
17
|
+
require("./Tag.scss");
|
|
18
|
+
function _interop_require_default(obj) {
|
|
19
|
+
return obj && obj.__esModule ? obj : {
|
|
20
|
+
default: obj
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
24
|
+
if (typeof WeakMap !== "function") return null;
|
|
25
|
+
var cacheBabelInterop = new WeakMap();
|
|
26
|
+
var cacheNodeInterop = new WeakMap();
|
|
27
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
28
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
29
|
+
})(nodeInterop);
|
|
30
|
+
}
|
|
31
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
32
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
33
|
+
return obj;
|
|
34
|
+
}
|
|
35
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
36
|
+
return {
|
|
37
|
+
default: obj
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
41
|
+
if (cache && cache.has(obj)) {
|
|
42
|
+
return cache.get(obj);
|
|
43
|
+
}
|
|
44
|
+
var newObj = {
|
|
45
|
+
__proto__: null
|
|
46
|
+
};
|
|
47
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
48
|
+
for(var key in obj){
|
|
49
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
50
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
51
|
+
if (desc && (desc.get || desc.set)) {
|
|
52
|
+
Object.defineProperty(newObj, key, desc);
|
|
53
|
+
} else {
|
|
54
|
+
newObj[key] = obj[key];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
newObj.default = obj;
|
|
59
|
+
if (cache) {
|
|
60
|
+
cache.set(obj, newObj);
|
|
61
|
+
}
|
|
62
|
+
return newObj;
|
|
63
|
+
}
|
|
64
|
+
const CN = 'tag';
|
|
65
|
+
function defaultOnClick() {}
|
|
66
|
+
const Tag = ({ value, className, style, label, warning, removeItem, name, isPopup, popupInfoContent, popupClassName, id, isNoDismiss = true, onClick = defaultOnClick, testId = CN })=>{
|
|
67
|
+
var _tagRef_current;
|
|
68
|
+
const tagRef = (0, _react.useRef)(null);
|
|
69
|
+
const [isTagHover, setIsTagHover] = (0, _react.useState)(false);
|
|
70
|
+
const [isTagPopupOpened, setIsTagPopupOpened] = (0, _react.useState)(false);
|
|
71
|
+
var _tagRef_current_getBoundingClientRect;
|
|
72
|
+
const { x, y, height, width } = (_tagRef_current_getBoundingClientRect = tagRef === null || tagRef === void 0 ? void 0 : (_tagRef_current = tagRef.current) === null || _tagRef_current === void 0 ? void 0 : _tagRef_current.getBoundingClientRect()) !== null && _tagRef_current_getBoundingClientRect !== void 0 ? _tagRef_current_getBoundingClientRect : {};
|
|
73
|
+
const { scrollY } = window;
|
|
74
|
+
const tagPopupStyles = (0, _react.useMemo)(()=>{
|
|
75
|
+
var _tagRef_current;
|
|
76
|
+
if (!isTagPopupOpened || !(tagRef === null || tagRef === void 0 ? void 0 : tagRef.current)) return {};
|
|
77
|
+
const { x, y, height, width } = tagRef === null || tagRef === void 0 ? void 0 : (_tagRef_current = tagRef.current) === null || _tagRef_current === void 0 ? void 0 : _tagRef_current.getBoundingClientRect();
|
|
78
|
+
return {
|
|
79
|
+
left: `${x}px`,
|
|
80
|
+
top: `${y + scrollY}px`,
|
|
81
|
+
transform: `translate(calc(-1 * calc(100% - ${width / 2 + 22}px)), ${height + 10}px)`
|
|
82
|
+
};
|
|
83
|
+
}, [
|
|
84
|
+
isTagPopupOpened,
|
|
85
|
+
x,
|
|
86
|
+
y,
|
|
87
|
+
width,
|
|
88
|
+
height,
|
|
89
|
+
scrollY
|
|
90
|
+
]);
|
|
91
|
+
const handle = {
|
|
92
|
+
onTagClick: ()=>{
|
|
93
|
+
if (isPopup) {
|
|
94
|
+
setIsTagPopupOpened(!isTagPopupOpened);
|
|
95
|
+
}
|
|
96
|
+
onClick(id);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const handleClickOutside = ()=>{
|
|
100
|
+
setIsTagPopupOpened(false);
|
|
101
|
+
};
|
|
102
|
+
(0, _react.useEffect)(()=>{
|
|
103
|
+
document.addEventListener('click', handleClickOutside, true);
|
|
104
|
+
return ()=>{
|
|
105
|
+
document.removeEventListener('click', handleClickOutside, true);
|
|
106
|
+
};
|
|
107
|
+
}, []);
|
|
108
|
+
(0, _react.useEffect)(()=>{
|
|
109
|
+
const handleScroll = ()=>{
|
|
110
|
+
setIsTagPopupOpened(false);
|
|
111
|
+
};
|
|
112
|
+
window.addEventListener('scroll', handleScroll, true);
|
|
113
|
+
return ()=>{
|
|
114
|
+
window.removeEventListener('scroll', handleScroll, true);
|
|
115
|
+
};
|
|
116
|
+
}, []);
|
|
117
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
118
|
+
onMouseEnter: ()=>setIsTagHover(true),
|
|
119
|
+
onMouseLeave: ()=>setIsTagHover(false),
|
|
120
|
+
"data-testid": testId,
|
|
121
|
+
role: "listitem",
|
|
122
|
+
"aria-label": `Tag: ${label || name}`,
|
|
123
|
+
className: (0, _classnames.default)(CN, className, {
|
|
124
|
+
'tag-warn': warning
|
|
125
|
+
}),
|
|
126
|
+
style: style !== null && style !== void 0 ? style : {},
|
|
127
|
+
onClick: ()=>handle.onTagClick(),
|
|
128
|
+
ref: tagRef,
|
|
129
|
+
children: [
|
|
130
|
+
warning && typeof warning === 'string' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.AlertTriangle, {
|
|
131
|
+
className: "advanced-tags--warning-icon mr5",
|
|
132
|
+
"aria-label": "Warning"
|
|
133
|
+
}),
|
|
134
|
+
warning && typeof warning === 'string' && isTagHover && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
135
|
+
className: "tag__warn-hint",
|
|
136
|
+
role: "tooltip",
|
|
137
|
+
children: warning
|
|
138
|
+
}),
|
|
139
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
140
|
+
className: "tag__label",
|
|
141
|
+
children: label || name
|
|
142
|
+
}),
|
|
143
|
+
removeItem && !isNoDismiss && /*#__PURE__*/ (0, _jsxruntime.jsx)("button", {
|
|
144
|
+
type: "button",
|
|
145
|
+
onClick: (e)=>{
|
|
146
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
147
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
148
|
+
removeItem(value);
|
|
149
|
+
},
|
|
150
|
+
"aria-label": `Remove ${label || name}`,
|
|
151
|
+
className: "tag__button",
|
|
152
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.X, {
|
|
153
|
+
className: "color--text"
|
|
154
|
+
})
|
|
155
|
+
}),
|
|
156
|
+
isTagPopupOpened && /*#__PURE__*/ (0, _reactdom.createPortal)(/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
157
|
+
id: `tagPopup${value}`,
|
|
158
|
+
className: (0, _classnames.default)('tag__popup', popupClassName),
|
|
159
|
+
style: tagPopupStyles,
|
|
160
|
+
children: !popupInfoContent ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {
|
|
161
|
+
size: "small"
|
|
162
|
+
}) : popupInfoContent
|
|
163
|
+
}), document.getElementById('app'))
|
|
164
|
+
]
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
const _default = Tag;
|
|
@@ -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,86 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
13
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
14
|
+
const _utils = require("../../../Functions/utils");
|
|
15
|
+
const _Label = /*#__PURE__*/ _interop_require_default(require("../../FormElements/Label/Label"));
|
|
16
|
+
const _Button = /*#__PURE__*/ _interop_require_default(require("../Button/Button"));
|
|
17
|
+
require("./UserBox.scss");
|
|
18
|
+
function _interop_require_default(obj) {
|
|
19
|
+
return obj && obj.__esModule ? obj : {
|
|
20
|
+
default: obj
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const UserBox = ({ name = 'Username', role, id, onClick, isModal, className, colors, testId = 'userbox' })=>{
|
|
24
|
+
const getNameFirstLetter = name.charAt(0).toUpperCase();
|
|
25
|
+
const renderUser = ()=>{
|
|
26
|
+
if (isModal) {
|
|
27
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
30
|
+
style: {
|
|
31
|
+
backgroundColor: (0, _utils.getColorById)(id, colors)
|
|
32
|
+
},
|
|
33
|
+
className: "td-user-box__avatar",
|
|
34
|
+
children: getNameFirstLetter
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
37
|
+
className: "td-user-box__user-data",
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
40
|
+
className: "p0 no-shadow",
|
|
41
|
+
onClick: onClick,
|
|
42
|
+
label: name,
|
|
43
|
+
variant: "link"
|
|
44
|
+
}),
|
|
45
|
+
role && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
46
|
+
children: role
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
} else {
|
|
53
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
56
|
+
style: {
|
|
57
|
+
backgroundColor: (0, _utils.getColorById)(id)
|
|
58
|
+
},
|
|
59
|
+
className: "td-user-box__avatar",
|
|
60
|
+
children: getNameFirstLetter
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
63
|
+
className: "td-user-box__user-data",
|
|
64
|
+
children: [
|
|
65
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.default, {
|
|
66
|
+
label: name
|
|
67
|
+
}),
|
|
68
|
+
role && /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
69
|
+
"aria-label": `User role: ${role}`,
|
|
70
|
+
children: role
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
79
|
+
"data-testid": testId,
|
|
80
|
+
className: (0, _classnames.default)('td-user-box', className),
|
|
81
|
+
role: "region",
|
|
82
|
+
"aria-label": `User box for ${name}`,
|
|
83
|
+
children: renderUser()
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
const _default = UserBox;
|
|
@@ -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
|
+
]
|
|
@@ -1 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
|
|
4
|
+
import './StateIcon.scss';
|
|
5
|
+
import { WIZARD_STEP_VARIANTS } from '../../constructor';
|
|
6
|
+
|
|
7
|
+
const DefaultPoint = () => {
|
|
8
|
+
return (
|
|
9
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
10
|
+
<circle cx="8" cy="8" r="4" />
|
|
11
|
+
</svg>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const DonePoint = () => {
|
|
16
|
+
return (
|
|
17
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
18
|
+
<path d="M12.5 5L7 10.5L4 7.5" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
|
|
19
|
+
</svg>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const RC = 'state-icon';
|
|
24
|
+
|
|
25
|
+
const { ACTIVE, DEFAULT, DONE } = WIZARD_STEP_VARIANTS;
|
|
26
|
+
|
|
27
|
+
export const StateIcon = ({ variant = DEFAULT, className }) => {
|
|
28
|
+
const computedState = variant === ACTIVE || variant === DONE ? variant : DEFAULT;
|
|
29
|
+
|
|
30
|
+
const Inner = {
|
|
31
|
+
[DEFAULT]: <DefaultPoint />,
|
|
32
|
+
[ACTIVE]: <DefaultPoint />, // with styles bg
|
|
33
|
+
[DONE]: <DonePoint />,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return <div className={cn(RC, `${RC}--${computedState}`, className)}>{Inner[computedState]}</div>;
|
|
37
|
+
};
|