@chayns-components/core 5.0.0-beta.48 → 5.0.0-beta.482
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/README.md +3 -19
- package/lib/api/image/post.d.ts +14 -0
- package/lib/api/image/post.js +33 -0
- package/lib/api/image/post.js.map +1 -0
- package/lib/api/signature/delete.d.ts +1 -0
- package/lib/api/signature/delete.js +27 -0
- package/lib/api/signature/delete.js.map +1 -0
- package/lib/api/signature/get.d.ts +1 -0
- package/lib/api/signature/get.js +33 -0
- package/lib/api/signature/get.js.map +1 -0
- package/lib/api/signature/put.d.ts +1 -0
- package/lib/api/signature/put.js +31 -0
- package/lib/api/signature/put.js.map +1 -0
- package/lib/api/theme/get.d.ts +2 -0
- package/lib/api/theme/get.js +14 -0
- package/lib/api/theme/get.js.map +1 -0
- package/lib/api/video/post.d.ts +15 -0
- package/lib/api/video/post.js +30 -0
- package/lib/api/video/post.js.map +1 -0
- package/lib/components/accordion/Accordion.d.ts +21 -6
- package/lib/components/accordion/Accordion.js +78 -54
- package/lib/components/accordion/Accordion.js.map +1 -1
- package/lib/components/accordion/Accordion.styles.d.ts +11 -7
- package/lib/components/accordion/Accordion.styles.js +66 -53
- package/lib/components/accordion/Accordion.styles.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.d.ts +9 -1
- package/lib/components/accordion/accordion-body/AccordionBody.js +12 -20
- package/lib/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/components/accordion/accordion-body/AccordionBody.styles.d.ts +268 -3
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js +6 -15
- package/lib/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.js +8 -16
- package/lib/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/components/accordion/accordion-content/AccordionContent.styles.d.ts +8 -6
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js +7 -16
- package/lib/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
- package/lib/components/accordion/accordion-group/AccordionGroup.d.ts +9 -2
- package/lib/components/accordion/accordion-group/AccordionGroup.js +15 -20
- package/lib/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.d.ts +2 -0
- package/lib/components/accordion/accordion-head/AccordionHead.js +45 -40
- package/lib/components/accordion/accordion-head/AccordionHead.js.map +1 -1
- package/lib/components/accordion/accordion-head/AccordionHead.styles.d.ts +2424 -15
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js +70 -61
- package/lib/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.js +4 -12
- package/lib/components/accordion/accordion-intro/AccordionIntro.js.map +1 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.d.ts +2 -1
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js +2 -10
- package/lib/components/accordion/accordion-intro/AccordionIntro.styles.js.map +1 -1
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js +20 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js.map +1 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.d.ts +7 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js +26 -0
- package/lib/components/accordion/accordion-item/AccordionItem.styles.js.map +1 -0
- package/lib/components/amount-control/AmountControl.d.ts +22 -0
- package/lib/components/amount-control/AmountControl.js +178 -0
- package/lib/components/amount-control/AmountControl.js.map +1 -0
- package/lib/components/amount-control/AmountControl.styles.d.ts +288 -0
- package/lib/components/amount-control/AmountControl.styles.js +50 -0
- package/lib/components/amount-control/AmountControl.styles.js.map +1 -0
- package/lib/components/badge/Badge.d.ts +5 -1
- package/lib/components/badge/Badge.js +12 -17
- package/lib/components/badge/Badge.js.map +1 -1
- package/lib/components/badge/Badge.styles.d.ts +9 -4
- package/lib/components/badge/Badge.styles.js +12 -14
- package/lib/components/badge/Badge.styles.js.map +1 -1
- package/lib/components/button/Button.d.ts +5 -1
- package/lib/components/button/Button.js +71 -20
- package/lib/components/button/Button.js.map +1 -1
- package/lib/components/button/Button.styles.d.ts +813 -6
- package/lib/components/button/Button.styles.js +44 -26
- package/lib/components/button/Button.styles.js.map +1 -1
- package/lib/components/checkbox/Checkbox.d.ts +10 -2
- package/lib/components/checkbox/Checkbox.js +19 -22
- package/lib/components/checkbox/Checkbox.js.map +1 -1
- package/lib/components/checkbox/Checkbox.styles.d.ts +12 -5
- package/lib/components/checkbox/Checkbox.styles.js +70 -63
- package/lib/components/checkbox/Checkbox.styles.js.map +1 -1
- package/lib/components/color-scheme-provider/ColorSchemeProvider.d.ts +6 -0
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js +75 -40
- package/lib/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/components/combobox/ComboBox.d.ts +43 -0
- package/lib/components/combobox/ComboBox.js +183 -0
- package/lib/components/combobox/ComboBox.js.map +1 -0
- package/lib/components/combobox/ComboBox.styles.d.ts +291 -0
- package/lib/components/combobox/ComboBox.styles.js +198 -0
- package/lib/components/combobox/ComboBox.styles.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.d.ts +12 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js +32 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.js.map +1 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.d.ts +12 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js +54 -0
- package/lib/components/combobox/combobox-item/ComboBoxItem.styles.js.map +1 -0
- package/lib/components/content-card/ContentCard.d.ts +13 -0
- package/lib/components/content-card/ContentCard.js +14 -0
- package/lib/components/content-card/ContentCard.js.map +1 -0
- package/lib/components/content-card/ContentCard.styles.d.ts +2 -0
- package/lib/components/content-card/ContentCard.styles.js +32 -0
- package/lib/components/content-card/ContentCard.styles.js.map +1 -0
- package/lib/components/context-menu/ContextMenu.d.ts +3 -3
- package/lib/components/context-menu/ContextMenu.js +43 -53
- package/lib/components/context-menu/ContextMenu.js.map +1 -1
- package/lib/components/context-menu/ContextMenu.styles.d.ts +2 -1
- package/lib/components/context-menu/ContextMenu.styles.js +2 -10
- package/lib/components/context-menu/ContextMenu.styles.js.map +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js +17 -23
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +275 -10
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js +25 -38
- package/lib/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -1
- package/lib/components/file-input/FileInput.d.ts +29 -0
- package/lib/components/file-input/FileInput.js +112 -0
- package/lib/components/file-input/FileInput.js.map +1 -0
- package/lib/components/file-input/FileInput.styles.d.ts +277 -0
- package/lib/components/file-input/FileInput.styles.js +39 -0
- package/lib/components/file-input/FileInput.styles.js.map +1 -0
- package/lib/components/file-input/file-list/FileListItem.d.ts +9 -0
- package/lib/components/file-input/file-list/FileListItem.js +27 -0
- package/lib/components/file-input/file-list/FileListItem.js.map +1 -0
- package/lib/components/file-input/file-list/FileListItem.styles.d.ts +2 -0
- package/lib/components/file-input/file-list/FileListItem.styles.js +3 -0
- package/lib/components/file-input/file-list/FileListItem.styles.js.map +1 -0
- package/lib/components/filter-buttons/FilterButtons.d.ts +22 -0
- package/lib/components/filter-buttons/FilterButtons.js +79 -0
- package/lib/components/filter-buttons/FilterButtons.js.map +1 -0
- package/lib/components/filter-buttons/FilterButtons.styles.d.ts +2 -0
- package/lib/components/filter-buttons/FilterButtons.styles.js +7 -0
- package/lib/components/filter-buttons/FilterButtons.styles.js.map +1 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.d.ts +14 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.js +38 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.js.map +1 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.d.ts +287 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js +98 -0
- package/lib/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -0
- package/lib/components/grid-image/GridImage.js +20 -29
- package/lib/components/grid-image/GridImage.js.map +1 -1
- package/lib/components/grid-image/GridImage.styles.d.ts +15 -14
- package/lib/components/grid-image/GridImage.styles.js +21 -32
- package/lib/components/grid-image/GridImage.styles.js.map +1 -1
- package/lib/components/icon/Icon.js +20 -25
- package/lib/components/icon/Icon.js.map +1 -1
- package/lib/components/icon/Icon.styles.d.ts +13 -12
- package/lib/components/icon/Icon.styles.js +23 -33
- package/lib/components/icon/Icon.styles.js.map +1 -1
- package/lib/components/input/Input.d.ts +42 -2
- package/lib/components/input/Input.js +96 -29
- package/lib/components/input/Input.js.map +1 -1
- package/lib/components/input/Input.styles.d.ts +559 -7
- package/lib/components/input/Input.styles.js +118 -41
- package/lib/components/input/Input.styles.js.map +1 -1
- package/lib/components/list/List.d.ts +6 -0
- package/lib/components/list/List.js +16 -23
- package/lib/components/list/List.js.map +1 -1
- package/lib/components/list/list-item/ListItem.d.ts +1 -1
- package/lib/components/list/list-item/ListItem.js +24 -30
- package/lib/components/list/list-item/ListItem.js.map +1 -1
- package/lib/components/list/list-item/ListItem.styles.d.ts +9 -6
- package/lib/components/list/list-item/ListItem.styles.js +30 -39
- package/lib/components/list/list-item/ListItem.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.d.ts +6 -2
- package/lib/components/list/list-item/list-item-body/ListItemBody.js +28 -15
- package/lib/components/list/list-item/list-item-body/ListItemBody.js.map +1 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +267 -1
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js +3 -11
- package/lib/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.d.ts +8 -2
- package/lib/components/list/list-item/list-item-content/ListItemContent.js +4 -12
- package/lib/components/list/list-item/list-item-content/ListItemContent.js.map +1 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.d.ts +2 -1
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js +2 -10
- package/lib/components/list/list-item/list-item-content/ListItemContent.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.js +25 -35
- package/lib/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +546 -16
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js +19 -38
- package/lib/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js +5 -13
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.d.ts +2 -1
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js +2 -10
- package/lib/components/list/list-item/list-item-head/list-item-icon/ListItemIcon.styles.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +11 -21
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -1
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts +8 -7
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +7 -16
- package/lib/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -1
- package/lib/components/mention-finder/MentionFinder.d.ts +31 -0
- package/lib/components/mention-finder/MentionFinder.js +130 -0
- package/lib/components/mention-finder/MentionFinder.js.map +1 -0
- package/lib/components/mention-finder/MentionFinder.styles.d.ts +272 -0
- package/lib/components/mention-finder/MentionFinder.styles.js +84 -0
- package/lib/components/mention-finder/MentionFinder.styles.js.map +1 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.d.ts +10 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js +23 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.js.map +1 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.d.ts +11 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js +83 -0
- package/lib/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -0
- package/lib/components/number-input/NumberInput.d.ts +54 -0
- package/lib/components/number-input/NumberInput.js +133 -0
- package/lib/components/number-input/NumberInput.js.map +1 -0
- package/lib/components/popup/Popup.d.ts +30 -0
- package/lib/components/popup/Popup.js +150 -0
- package/lib/components/popup/Popup.js.map +1 -0
- package/lib/components/popup/Popup.styles.d.ts +5 -0
- package/lib/components/popup/Popup.styles.js +21 -0
- package/lib/components/popup/Popup.styles.js.map +1 -0
- package/lib/components/popup/popup-content/PopupContent.d.ts +10 -0
- package/lib/components/popup/popup-content/PopupContent.js +64 -0
- package/lib/components/popup/popup-content/PopupContent.js.map +1 -0
- package/lib/components/popup/popup-content/PopupContent.styles.d.ts +274 -0
- package/lib/components/popup/popup-content/PopupContent.styles.js +84 -0
- package/lib/components/popup/popup-content/PopupContent.styles.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.d.ts +13 -0
- package/lib/components/progress-bar/ProgressBar.js +31 -0
- package/lib/components/progress-bar/ProgressBar.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.styles.d.ts +272 -0
- package/lib/components/progress-bar/ProgressBar.styles.js +30 -0
- package/lib/components/progress-bar/ProgressBar.styles.js.map +1 -0
- package/lib/components/radio-button/RadioButton.d.ts +30 -0
- package/lib/components/radio-button/RadioButton.js +92 -0
- package/lib/components/radio-button/RadioButton.js.map +1 -0
- package/lib/components/radio-button/RadioButton.styles.d.ts +287 -0
- package/lib/components/radio-button/RadioButton.styles.js +105 -0
- package/lib/components/radio-button/RadioButton.styles.js.map +1 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +17 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js +38 -0
- package/lib/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.d.ts +13 -0
- package/lib/components/scroll-view/ScrollView.js +19 -0
- package/lib/components/scroll-view/ScrollView.js.map +1 -0
- package/lib/components/scroll-view/ScrollView.styles.d.ts +9 -0
- package/lib/components/scroll-view/ScrollView.styles.js +41 -0
- package/lib/components/scroll-view/ScrollView.styles.js.map +1 -0
- package/lib/components/search-box/SearchBox.d.ts +41 -0
- package/lib/components/search-box/SearchBox.js +267 -0
- package/lib/components/search-box/SearchBox.js.map +1 -0
- package/lib/components/search-box/SearchBox.styles.d.ts +274 -0
- package/lib/components/search-box/SearchBox.styles.js +71 -0
- package/lib/components/search-box/SearchBox.styles.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.d.ts +11 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js +27 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.js.map +1 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.d.ts +13 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js +55 -0
- package/lib/components/search-box/search-box-item/SearchBoxItem.styles.js.map +1 -0
- package/lib/components/search-input/SearchInput.d.ts +33 -0
- package/lib/components/search-input/SearchInput.js +93 -0
- package/lib/components/search-input/SearchInput.js.map +1 -0
- package/lib/components/search-input/SearchInput.styles.d.ts +534 -0
- package/lib/components/search-input/SearchInput.styles.js +19 -0
- package/lib/components/search-input/SearchInput.styles.js.map +1 -0
- package/lib/components/select-button/SelectButton.d.ts +34 -0
- package/lib/components/select-button/SelectButton.js +56 -0
- package/lib/components/select-button/SelectButton.js.map +1 -0
- package/lib/components/select-button/SelectButton.styles.d.ts +2 -0
- package/lib/components/select-button/SelectButton.styles.js +3 -0
- package/lib/components/select-button/SelectButton.styles.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.d.ts +27 -0
- package/lib/components/setup-wizard/SetupWizard.js +73 -0
- package/lib/components/setup-wizard/SetupWizard.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.styles.d.ts +2 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js +3 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.d.ts +21 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +49 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.d.ts +3 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js +7 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.d.ts +18 -0
- package/lib/components/sharing-bar/SharingBar.js +101 -0
- package/lib/components/sharing-bar/SharingBar.js.map +1 -0
- package/lib/components/sharing-bar/SharingBar.styles.d.ts +6 -0
- package/lib/components/sharing-bar/SharingBar.styles.js +17 -0
- package/lib/components/sharing-bar/SharingBar.styles.js.map +1 -0
- package/lib/components/signature/Signature.d.ts +33 -0
- package/lib/components/signature/Signature.js +95 -0
- package/lib/components/signature/Signature.js.map +1 -0
- package/lib/components/signature/Signature.styles.d.ts +5 -0
- package/lib/components/signature/Signature.styles.js +14 -0
- package/lib/components/signature/Signature.styles.js.map +1 -0
- package/lib/components/slider/Slider.d.ts +45 -0
- package/lib/components/slider/Slider.js +181 -0
- package/lib/components/slider/Slider.js.map +1 -0
- package/lib/components/slider/Slider.styles.d.ts +16 -0
- package/lib/components/slider/Slider.styles.js +98 -0
- package/lib/components/slider/Slider.styles.js.map +1 -0
- package/lib/components/slider-button/SliderButton.d.ts +23 -0
- package/lib/components/slider-button/SliderButton.js +148 -0
- package/lib/components/slider-button/SliderButton.js.map +1 -0
- package/lib/components/slider-button/SliderButton.styles.d.ts +279 -0
- package/lib/components/slider-button/SliderButton.styles.js +62 -0
- package/lib/components/slider-button/SliderButton.styles.js.map +1 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.d.ts +31 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.js +36 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.js.map +1 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.d.ts +19 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js +93 -0
- package/lib/components/small-wait-cursor/SmallWaitCursor.styles.js.map +1 -0
- package/lib/components/tag-input/TagInput.d.ts +22 -0
- package/lib/components/tag-input/TagInput.js +79 -0
- package/lib/components/tag-input/TagInput.js.map +1 -0
- package/lib/components/tag-input/TagInput.styles.d.ts +9 -0
- package/lib/components/tag-input/TagInput.styles.js +41 -0
- package/lib/components/tag-input/TagInput.styles.js.map +1 -0
- package/lib/components/text-area/TextArea.d.ts +29 -0
- package/lib/components/text-area/TextArea.js +49 -0
- package/lib/components/text-area/TextArea.js.map +1 -0
- package/lib/components/text-area/TextArea.styles.d.ts +16 -0
- package/lib/components/text-area/TextArea.styles.js +101 -0
- package/lib/components/text-area/TextArea.styles.js.map +1 -0
- package/lib/components/tooltip/Tooltip.d.ts +22 -0
- package/lib/components/tooltip/Tooltip.js +33 -0
- package/lib/components/tooltip/Tooltip.js.map +1 -0
- package/lib/components/tooltip/Tooltip.styles.d.ts +2 -0
- package/lib/components/tooltip/Tooltip.styles.js +3 -0
- package/lib/components/tooltip/Tooltip.styles.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.d.ts +13 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js +22 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.js.map +1 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.d.ts +15 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js +36 -0
- package/lib/components/tooltip/tooltip-item/TooltipItem.styles.js.map +1 -0
- package/lib/components/truncation/Truncation.d.ts +34 -0
- package/lib/components/truncation/Truncation.js +132 -0
- package/lib/components/truncation/Truncation.js.map +1 -0
- package/lib/components/truncation/Truncation.styles.d.ts +277 -0
- package/lib/components/truncation/Truncation.styles.js +44 -0
- package/lib/components/truncation/Truncation.styles.js.map +1 -0
- package/lib/constants/mentionFinder.d.ts +4 -0
- package/lib/constants/mentionFinder.js +6 -0
- package/lib/constants/mentionFinder.js.map +1 -0
- package/lib/constants/numberInput.d.ts +5 -0
- package/lib/constants/numberInput.js +6 -0
- package/lib/constants/numberInput.js.map +1 -0
- package/lib/constants/signature.d.ts +1 -0
- package/lib/constants/signature.js +2 -0
- package/lib/constants/signature.js.map +1 -0
- package/lib/hooks/useElementSize.d.ts +2 -0
- package/lib/hooks/useElementSize.js +9 -0
- package/lib/hooks/useElementSize.js.map +1 -0
- package/lib/hooks/uuid.js +4 -11
- package/lib/hooks/uuid.js.map +1 -1
- package/lib/index.d.ts +44 -1
- package/lib/index.js +49 -111
- package/lib/index.js.map +1 -1
- package/lib/types/chayns.d.ts +67 -1
- package/lib/types/chayns.js +3 -10
- package/lib/types/chayns.js.map +1 -1
- package/lib/types/colorSchemeProvider.d.ts +15 -0
- package/lib/types/colorSchemeProvider.js +9 -0
- package/lib/types/colorSchemeProvider.js.map +1 -0
- package/lib/types/comboBox.d.ts +4 -0
- package/lib/types/comboBox.js +6 -0
- package/lib/types/comboBox.js.map +1 -0
- package/lib/{components/context-menu/constants/alignment.js → types/contextMenu.js} +4 -11
- package/lib/types/contextMenu.js.map +1 -0
- package/lib/types/file.d.ts +46 -0
- package/lib/types/file.js +2 -0
- package/lib/types/file.js.map +1 -0
- package/lib/types/filterButtons.d.ts +15 -0
- package/lib/types/filterButtons.js +11 -0
- package/lib/types/filterButtons.js.map +1 -0
- package/lib/types/popup.d.ts +16 -0
- package/lib/types/popup.js +10 -0
- package/lib/types/popup.js.map +1 -0
- package/lib/types/radioButton.d.ts +4 -0
- package/lib/types/radioButton.js +2 -0
- package/lib/types/radioButton.js.map +1 -0
- package/lib/types/searchBox.d.ts +5 -0
- package/lib/types/searchBox.js +2 -0
- package/lib/types/searchBox.js.map +1 -0
- package/lib/types/selectButton.d.ts +4 -0
- package/lib/types/selectButton.js +2 -0
- package/lib/types/selectButton.js.map +1 -0
- package/lib/types/signature.d.ts +10 -0
- package/lib/types/signature.js +2 -0
- package/lib/types/signature.js.map +1 -0
- package/lib/types/slider-button.d.ts +4 -0
- package/lib/types/slider-button.js +2 -0
- package/lib/types/slider-button.js.map +1 -0
- package/lib/types/tagInput.d.ts +4 -0
- package/lib/types/tagInput.js +2 -0
- package/lib/types/tagInput.js.map +1 -0
- package/lib/types/tooltip.d.ts +9 -0
- package/lib/types/tooltip.js +2 -0
- package/lib/types/tooltip.js.map +1 -0
- package/lib/types/truncation.d.ts +5 -0
- package/lib/types/truncation.js +7 -0
- package/lib/types/truncation.js.map +1 -0
- package/lib/{components/accordion/utils.js → utils/accordion.js} +2 -9
- package/lib/utils/accordion.js.map +1 -0
- package/lib/utils/amountControl.d.ts +7 -0
- package/lib/utils/amountControl.js +15 -0
- package/lib/utils/amountControl.js.map +1 -0
- package/lib/utils/calculate.d.ts +5 -0
- package/lib/utils/calculate.js +63 -0
- package/lib/utils/calculate.js.map +1 -0
- package/lib/utils/file.d.ts +363 -0
- package/lib/utils/file.js +393 -0
- package/lib/utils/file.js.map +1 -0
- package/lib/utils/fileDialog.d.ts +7 -0
- package/lib/utils/fileDialog.js +65 -0
- package/lib/utils/fileDialog.js.map +1 -0
- package/lib/utils/font.d.ts +8 -0
- package/lib/utils/font.js +67 -0
- package/lib/utils/font.js.map +1 -0
- package/lib/utils/icon.js +5 -0
- package/lib/utils/icon.js.map +1 -0
- package/lib/utils/isTobitEmployee.d.ts +1 -0
- package/lib/utils/isTobitEmployee.js +21 -0
- package/lib/utils/isTobitEmployee.js.map +1 -0
- package/lib/utils/numberInput.d.ts +23 -0
- package/lib/utils/numberInput.js +83 -0
- package/lib/utils/numberInput.js.map +1 -0
- package/lib/utils/searchBox.d.ts +7 -0
- package/lib/utils/searchBox.js +16 -0
- package/lib/utils/searchBox.js.map +1 -0
- package/lib/utils/slider.d.ts +7 -0
- package/lib/utils/slider.js +28 -0
- package/lib/utils/slider.js.map +1 -0
- package/lib/utils/sliderButton.d.ts +15 -0
- package/lib/utils/sliderButton.js +45 -0
- package/lib/utils/sliderButton.js.map +1 -0
- package/lib/utils/truncation.d.ts +1 -0
- package/lib/utils/truncation.js +27 -0
- package/lib/utils/truncation.js.map +1 -0
- package/lib/utils/uploadFile.d.ts +7 -0
- package/lib/utils/uploadFile.js +35 -0
- package/lib/utils/uploadFile.js.map +1 -0
- package/package.json +32 -21
- package/lib/components/accordion/utils.js.map +0 -1
- package/lib/components/context-menu/constants/alignment.js.map +0 -1
- package/lib/components/icon/utils.js +0 -13
- package/lib/components/icon/utils.js.map +0 -1
- /package/lib/{components/context-menu/constants/alignment.d.ts → types/contextMenu.d.ts} +0 -0
- /package/lib/{components/accordion/utils.d.ts → utils/accordion.d.ts} +0 -0
- /package/lib/{components/icon/utils.d.ts → utils/icon.d.ts} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { IconStyle } from '../types/colorSchemeProvider';
|
|
2
|
+
const fonts = [{
|
|
3
|
+
family: 'Noto Color Emoji',
|
|
4
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.0.woff2',
|
|
5
|
+
unicodeRange: 'U+1f1e6-1f1ff'
|
|
6
|
+
}, {
|
|
7
|
+
family: 'Noto Color Emoji',
|
|
8
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.1.woff2',
|
|
9
|
+
unicodeRange: 'U+200d, U+2620, U+26a7, U+fe0f, U+1f308, U+1f38c, U+1f3c1, U+1f3f3-1f3f4, U+1f6a9, U+e0062-e0063, U+e0065, U+e0067, U+e006c, U+e006e, U+e0073-e0074, U+e0077, U+e007f'
|
|
10
|
+
}, {
|
|
11
|
+
family: 'Noto Color Emoji',
|
|
12
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.2.woff2',
|
|
13
|
+
unicodeRange: 'U+23, U+2a, U+30-39, U+a9, U+ae, U+200d, U+203c, U+2049, U+20e3, U+2122, U+2139, U+2194-2199, U+21a9-21aa, U+23cf, U+23e9-23ef, U+23f8-23fa, U+24c2, U+25aa-25ab, U+25b6, U+25c0, U+25fb-25fe, U+2611, U+2622-2623, U+2626, U+262a, U+262e-262f, U+2638, U+2640, U+2642, U+2648-2653, U+2660, U+2663, U+2665-2666, U+2668, U+267b, U+267e-267f, U+2695, U+269b-269c, U+26a0, U+26a7, U+26aa-26ab, U+26ce, U+26d4, U+2705, U+2714, U+2716, U+271d, U+2721, U+2733-2734, U+2747, U+274c, U+274e, U+2753-2755, U+2757, U+2764, U+2795-2797, U+27a1, U+27b0, U+27bf, U+2934-2935, U+2b05-2b07, U+2b1b-2b1c, U+2b55, U+3030, U+303d, U+3297, U+3299, U+fe0f, U+1f170-1f171, U+1f17e-1f17f, U+1f18e, U+1f191-1f19a, U+1f201-1f202, U+1f21a, U+1f22f, U+1f232-1f23a, U+1f250-1f251, U+1f310, U+1f3a6, U+1f3b5-1f3b6, U+1f3bc, U+1f3e7, U+1f441, U+1f499-1f49c, U+1f49f-1f4a0, U+1f4a2, U+1f4ac-1f4ad, U+1f4b1-1f4b2, U+1f4b9, U+1f4db, U+1f4f2-1f4f6, U+1f500-1f50a, U+1f515, U+1f518-1f524, U+1f52f-1f53d, U+1f549, U+1f54e, U+1f5a4, U+1f5e8, U+1f5ef, U+1f6ab, U+1f6ad-1f6b1, U+1f6b3, U+1f6b7-1f6bc, U+1f6be, U+1f6c2-1f6c5, U+1f6d0-1f6d1, U+1f6d7, U+1f6dc, U+1f7e0-1f7eb, U+1f7f0, U+1f90d-1f90e, U+1f9e1, U+1fa75-1fa77, U+1faaf'
|
|
14
|
+
}, {
|
|
15
|
+
family: 'Noto Color Emoji',
|
|
16
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.3.woff2',
|
|
17
|
+
unicodeRange: 'U+231a-231b, U+2328, U+23f0-23f3, U+2602, U+260e, U+2692, U+2694, U+2696-2697, U+2699, U+26b0-26b1, U+26cf, U+26d1, U+26d3, U+2702, U+2709, U+270f, U+2712, U+fe0f, U+1f302, U+1f321, U+1f392-1f393, U+1f3a9, U+1f3bd, U+1f3ee, U+1f3f7, U+1f3fa, U+1f451-1f462, U+1f484, U+1f489-1f48a, U+1f48c-1f48e, U+1f4a1, U+1f4a3, U+1f4b0, U+1f4b3-1f4b8, U+1f4bb-1f4da, U+1f4dc-1f4f1, U+1f4ff, U+1f50b-1f514, U+1f516-1f517, U+1f526-1f529, U+1f52c-1f52e, U+1f550-1f567, U+1f56f-1f570, U+1f576, U+1f587, U+1f58a-1f58d, U+1f5a5, U+1f5a8, U+1f5b1-1f5b2, U+1f5c2-1f5c4, U+1f5d1-1f5d3, U+1f5dc-1f5de, U+1f5e1, U+1f5f3, U+1f6aa, U+1f6ac, U+1f6bd, U+1f6bf, U+1f6c1, U+1f6cb, U+1f6cd-1f6cf, U+1f6d2, U+1f6e0-1f6e1, U+1f6f0, U+1f97b-1f97f, U+1f9af, U+1f9ba, U+1f9e2-1f9e6, U+1f9ea-1f9ec, U+1f9ee-1f9f4, U+1f9f7-1f9ff, U+1fa71-1fa74, U+1fa79-1fa7b, U+1fa86, U+1fa91-1fa93, U+1fa96, U+1fa99-1faa0, U+1faa2-1faa7, U+1faaa-1faae'
|
|
18
|
+
}, {
|
|
19
|
+
family: 'Noto Color Emoji',
|
|
20
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.4.woff2',
|
|
21
|
+
unicodeRange: 'U+265f, U+26bd-26be, U+26f3, U+26f8, U+fe0f, U+1f004, U+1f0cf, U+1f380-1f384, U+1f386-1f38b, U+1f38d-1f391, U+1f396-1f397, U+1f399-1f39b, U+1f39e-1f39f, U+1f3a3-1f3a5, U+1f3a7-1f3a9, U+1f3ab-1f3b4, U+1f3b7-1f3bb, U+1f3bd-1f3c0, U+1f3c5-1f3c6, U+1f3c8-1f3c9, U+1f3cf-1f3d3, U+1f3f8-1f3f9, U+1f47e, U+1f4e2, U+1f4f7-1f4fd, U+1f52b, U+1f579, U+1f58c-1f58d, U+1f5bc, U+1f6f7, U+1f6f9, U+1f6fc, U+1f93f, U+1f941, U+1f945, U+1f947-1f94f, U+1f9e7-1f9e9, U+1f9f5-1f9f6, U+1fa70-1fa71, U+1fa80-1fa81, U+1fa83-1fa85, U+1fa87-1fa88, U+1fa94-1fa95, U+1fa97-1fa98, U+1faa1, U+1faa9'
|
|
22
|
+
}, {
|
|
23
|
+
family: 'Noto Color Emoji',
|
|
24
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.5.woff2',
|
|
25
|
+
unicodeRange: 'U+2693, U+26e9-26ea, U+26f1-26f2, U+26f4-26f5, U+26fa, U+26fd, U+2708, U+fe0f, U+1f301, U+1f303, U+1f306-1f307, U+1f309, U+1f310, U+1f3a0-1f3a2, U+1f3aa, U+1f3cd-1f3ce, U+1f3d5, U+1f3d7-1f3db, U+1f3df-1f3e6, U+1f3e8-1f3ed, U+1f3ef-1f3f0, U+1f488, U+1f492, U+1f4ba, U+1f54b-1f54d, U+1f5fa-1f5ff, U+1f680-1f6a2, U+1f6a4-1f6a8, U+1f6b2, U+1f6d1, U+1f6d5-1f6d6, U+1f6dd-1f6df, U+1f6e2-1f6e5, U+1f6e9, U+1f6eb-1f6ec, U+1f6f3-1f6f6, U+1f6f8, U+1f6fa-1f6fb, U+1f9bc-1f9bd, U+1f9ed, U+1f9f3, U+1fa7c'
|
|
26
|
+
}, {
|
|
27
|
+
family: 'Noto Color Emoji',
|
|
28
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.6.woff2',
|
|
29
|
+
unicodeRange: 'U+2615, U+fe0f, U+1f32d-1f330, U+1f336, U+1f33d, U+1f345-1f37f, U+1f382, U+1f52a, U+1f942-1f944, U+1f950-1f96f, U+1f99e, U+1f9aa, U+1f9c0-1f9cb, U+1fad0-1fadb'
|
|
30
|
+
}, {
|
|
31
|
+
family: 'Noto Color Emoji',
|
|
32
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.7.woff2',
|
|
33
|
+
unicodeRange: 'U+200d, U+2600-2601, U+2603-2604, U+2614, U+2618, U+26a1, U+26c4-26c5, U+26c8, U+26f0, U+2728, U+2744, U+2b1b, U+2b50, U+fe0f, U+1f300, U+1f304-1f305, U+1f308, U+1f30a-1f30f, U+1f311-1f321, U+1f324-1f32c, U+1f331-1f335, U+1f337-1f33c, U+1f33e-1f344, U+1f3d4, U+1f3d6, U+1f3dc-1f3de, U+1f3f5, U+1f400-1f43f, U+1f490, U+1f4a7, U+1f4ab, U+1f4ae, U+1f525, U+1f54a, U+1f573, U+1f577-1f578, U+1f648-1f64a, U+1f940, U+1f980-1f9ae, U+1f9ba, U+1fa90, U+1faa8, U+1fab0-1fabd, U+1fabf, U+1face-1facf, U+1fae7'
|
|
34
|
+
}, {
|
|
35
|
+
family: 'Noto Color Emoji',
|
|
36
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.8.woff2',
|
|
37
|
+
unicodeRange: 'U+200d, U+2640, U+2642, U+2695-2696, U+26f7, U+26f9, U+2708, U+2764, U+fe0f, U+1f33e, U+1f373, U+1f37c, U+1f384-1f385, U+1f393, U+1f3a4, U+1f3a8, U+1f3c2-1f3c4, U+1f3c7, U+1f3ca-1f3cc, U+1f3eb, U+1f3ed, U+1f3fb-1f3ff, U+1f466-1f478, U+1f47c, U+1f481-1f483, U+1f486-1f487, U+1f48b, U+1f48f, U+1f491, U+1f4bb-1f4bc, U+1f527, U+1f52c, U+1f574-1f575, U+1f57a, U+1f645-1f647, U+1f64b, U+1f64d-1f64e, U+1f680, U+1f692, U+1f6a3, U+1f6b4-1f6b6, U+1f6c0, U+1f6cc, U+1f91d, U+1f926, U+1f930-1f931, U+1f934-1f93a, U+1f93c-1f93e, U+1f977, U+1f9af-1f9b3, U+1f9b8-1f9b9, U+1f9bc-1f9bd, U+1f9cc-1f9cf, U+1f9d1-1f9df, U+1fa82, U+1fac3-1fac5'
|
|
38
|
+
}, {
|
|
39
|
+
family: 'Noto Color Emoji',
|
|
40
|
+
src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.9.woff2',
|
|
41
|
+
unicodeRange: 'U+200d, U+261d, U+2620, U+2639-263a, U+2665, U+270a-270d, U+2728, U+2763-2764, U+2b50, U+fe0f, U+1f31a-1f31f, U+1f32b, U+1f383, U+1f389, U+1f3fb-1f3ff, U+1f440-1f450, U+1f463-1f465, U+1f479-1f47b, U+1f47d-1f480, U+1f485, U+1f48b-1f48c, U+1f493-1f49f, U+1f4a4-1f4a6, U+1f4a8-1f4ab, U+1f4af, U+1f525, U+1f573, U+1f590, U+1f595-1f596, U+1f5a4, U+1f5e3, U+1f600-1f644, U+1f648-1f64a, U+1f64c, U+1f64f, U+1f90c-1f925, U+1f927-1f92f, U+1f932-1f933, U+1f970-1f976, U+1f978-1f97a, U+1f9a0, U+1f9b4-1f9b7, U+1f9bb, U+1f9be-1f9bf, U+1f9d0, U+1f9e0-1f9e1, U+1fa75-1fa79, U+1fac0-1fac2, U+1fae0-1fae6, U+1fae8, U+1faf0-1faf8'
|
|
42
|
+
}];
|
|
43
|
+
export const convertIconStyle = iconStyle => {
|
|
44
|
+
switch (iconStyle) {
|
|
45
|
+
case IconStyle.SOLID:
|
|
46
|
+
return 'fa-solid';
|
|
47
|
+
case IconStyle.DUOTONE:
|
|
48
|
+
return 'fa-duotone';
|
|
49
|
+
case IconStyle.SHARP:
|
|
50
|
+
return 'fa-sharp';
|
|
51
|
+
case IconStyle.LIGHT:
|
|
52
|
+
return 'fa-light';
|
|
53
|
+
default:
|
|
54
|
+
return 'fa-regular';
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
export const generateFontFaces = () => fonts.map(font => `
|
|
58
|
+
@font-face {
|
|
59
|
+
font-display: swap;
|
|
60
|
+
font-family: "${font.family}";
|
|
61
|
+
font-style: normal;
|
|
62
|
+
font-weight: 400;
|
|
63
|
+
src: url("${font.src}") format("woff2");
|
|
64
|
+
${font.unicodeRange ? `unicode-range: ${font.unicodeRange};` : ''}
|
|
65
|
+
}
|
|
66
|
+
`).join('');
|
|
67
|
+
//# sourceMappingURL=font.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font.js","names":["IconStyle","fonts","family","src","unicodeRange","convertIconStyle","iconStyle","SOLID","DUOTONE","SHARP","LIGHT","generateFontFaces","map","font","join"],"sources":["../../src/utils/font.ts"],"sourcesContent":["import { IconStyle } from '../types/colorSchemeProvider';\n\nexport interface Font {\n family: string;\n src: string;\n unicodeRange?: string;\n}\n\nconst fonts: Font[] = [\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.0.woff2',\n unicodeRange: 'U+1f1e6-1f1ff',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.1.woff2',\n unicodeRange:\n 'U+200d, U+2620, U+26a7, U+fe0f, U+1f308, U+1f38c, U+1f3c1, U+1f3f3-1f3f4, U+1f6a9, U+e0062-e0063, U+e0065, U+e0067, U+e006c, U+e006e, U+e0073-e0074, U+e0077, U+e007f',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.2.woff2',\n unicodeRange:\n 'U+23, U+2a, U+30-39, U+a9, U+ae, U+200d, U+203c, U+2049, U+20e3, U+2122, U+2139, U+2194-2199, U+21a9-21aa, U+23cf, U+23e9-23ef, U+23f8-23fa, U+24c2, U+25aa-25ab, U+25b6, U+25c0, U+25fb-25fe, U+2611, U+2622-2623, U+2626, U+262a, U+262e-262f, U+2638, U+2640, U+2642, U+2648-2653, U+2660, U+2663, U+2665-2666, U+2668, U+267b, U+267e-267f, U+2695, U+269b-269c, U+26a0, U+26a7, U+26aa-26ab, U+26ce, U+26d4, U+2705, U+2714, U+2716, U+271d, U+2721, U+2733-2734, U+2747, U+274c, U+274e, U+2753-2755, U+2757, U+2764, U+2795-2797, U+27a1, U+27b0, U+27bf, U+2934-2935, U+2b05-2b07, U+2b1b-2b1c, U+2b55, U+3030, U+303d, U+3297, U+3299, U+fe0f, U+1f170-1f171, U+1f17e-1f17f, U+1f18e, U+1f191-1f19a, U+1f201-1f202, U+1f21a, U+1f22f, U+1f232-1f23a, U+1f250-1f251, U+1f310, U+1f3a6, U+1f3b5-1f3b6, U+1f3bc, U+1f3e7, U+1f441, U+1f499-1f49c, U+1f49f-1f4a0, U+1f4a2, U+1f4ac-1f4ad, U+1f4b1-1f4b2, U+1f4b9, U+1f4db, U+1f4f2-1f4f6, U+1f500-1f50a, U+1f515, U+1f518-1f524, U+1f52f-1f53d, U+1f549, U+1f54e, U+1f5a4, U+1f5e8, U+1f5ef, U+1f6ab, U+1f6ad-1f6b1, U+1f6b3, U+1f6b7-1f6bc, U+1f6be, U+1f6c2-1f6c5, U+1f6d0-1f6d1, U+1f6d7, U+1f6dc, U+1f7e0-1f7eb, U+1f7f0, U+1f90d-1f90e, U+1f9e1, U+1fa75-1fa77, U+1faaf',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.3.woff2',\n unicodeRange:\n 'U+231a-231b, U+2328, U+23f0-23f3, U+2602, U+260e, U+2692, U+2694, U+2696-2697, U+2699, U+26b0-26b1, U+26cf, U+26d1, U+26d3, U+2702, U+2709, U+270f, U+2712, U+fe0f, U+1f302, U+1f321, U+1f392-1f393, U+1f3a9, U+1f3bd, U+1f3ee, U+1f3f7, U+1f3fa, U+1f451-1f462, U+1f484, U+1f489-1f48a, U+1f48c-1f48e, U+1f4a1, U+1f4a3, U+1f4b0, U+1f4b3-1f4b8, U+1f4bb-1f4da, U+1f4dc-1f4f1, U+1f4ff, U+1f50b-1f514, U+1f516-1f517, U+1f526-1f529, U+1f52c-1f52e, U+1f550-1f567, U+1f56f-1f570, U+1f576, U+1f587, U+1f58a-1f58d, U+1f5a5, U+1f5a8, U+1f5b1-1f5b2, U+1f5c2-1f5c4, U+1f5d1-1f5d3, U+1f5dc-1f5de, U+1f5e1, U+1f5f3, U+1f6aa, U+1f6ac, U+1f6bd, U+1f6bf, U+1f6c1, U+1f6cb, U+1f6cd-1f6cf, U+1f6d2, U+1f6e0-1f6e1, U+1f6f0, U+1f97b-1f97f, U+1f9af, U+1f9ba, U+1f9e2-1f9e6, U+1f9ea-1f9ec, U+1f9ee-1f9f4, U+1f9f7-1f9ff, U+1fa71-1fa74, U+1fa79-1fa7b, U+1fa86, U+1fa91-1fa93, U+1fa96, U+1fa99-1faa0, U+1faa2-1faa7, U+1faaa-1faae',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.4.woff2',\n unicodeRange:\n 'U+265f, U+26bd-26be, U+26f3, U+26f8, U+fe0f, U+1f004, U+1f0cf, U+1f380-1f384, U+1f386-1f38b, U+1f38d-1f391, U+1f396-1f397, U+1f399-1f39b, U+1f39e-1f39f, U+1f3a3-1f3a5, U+1f3a7-1f3a9, U+1f3ab-1f3b4, U+1f3b7-1f3bb, U+1f3bd-1f3c0, U+1f3c5-1f3c6, U+1f3c8-1f3c9, U+1f3cf-1f3d3, U+1f3f8-1f3f9, U+1f47e, U+1f4e2, U+1f4f7-1f4fd, U+1f52b, U+1f579, U+1f58c-1f58d, U+1f5bc, U+1f6f7, U+1f6f9, U+1f6fc, U+1f93f, U+1f941, U+1f945, U+1f947-1f94f, U+1f9e7-1f9e9, U+1f9f5-1f9f6, U+1fa70-1fa71, U+1fa80-1fa81, U+1fa83-1fa85, U+1fa87-1fa88, U+1fa94-1fa95, U+1fa97-1fa98, U+1faa1, U+1faa9',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.5.woff2',\n unicodeRange:\n 'U+2693, U+26e9-26ea, U+26f1-26f2, U+26f4-26f5, U+26fa, U+26fd, U+2708, U+fe0f, U+1f301, U+1f303, U+1f306-1f307, U+1f309, U+1f310, U+1f3a0-1f3a2, U+1f3aa, U+1f3cd-1f3ce, U+1f3d5, U+1f3d7-1f3db, U+1f3df-1f3e6, U+1f3e8-1f3ed, U+1f3ef-1f3f0, U+1f488, U+1f492, U+1f4ba, U+1f54b-1f54d, U+1f5fa-1f5ff, U+1f680-1f6a2, U+1f6a4-1f6a8, U+1f6b2, U+1f6d1, U+1f6d5-1f6d6, U+1f6dd-1f6df, U+1f6e2-1f6e5, U+1f6e9, U+1f6eb-1f6ec, U+1f6f3-1f6f6, U+1f6f8, U+1f6fa-1f6fb, U+1f9bc-1f9bd, U+1f9ed, U+1f9f3, U+1fa7c',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.6.woff2',\n unicodeRange:\n 'U+2615, U+fe0f, U+1f32d-1f330, U+1f336, U+1f33d, U+1f345-1f37f, U+1f382, U+1f52a, U+1f942-1f944, U+1f950-1f96f, U+1f99e, U+1f9aa, U+1f9c0-1f9cb, U+1fad0-1fadb',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.7.woff2',\n unicodeRange:\n 'U+200d, U+2600-2601, U+2603-2604, U+2614, U+2618, U+26a1, U+26c4-26c5, U+26c8, U+26f0, U+2728, U+2744, U+2b1b, U+2b50, U+fe0f, U+1f300, U+1f304-1f305, U+1f308, U+1f30a-1f30f, U+1f311-1f321, U+1f324-1f32c, U+1f331-1f335, U+1f337-1f33c, U+1f33e-1f344, U+1f3d4, U+1f3d6, U+1f3dc-1f3de, U+1f3f5, U+1f400-1f43f, U+1f490, U+1f4a7, U+1f4ab, U+1f4ae, U+1f525, U+1f54a, U+1f573, U+1f577-1f578, U+1f648-1f64a, U+1f940, U+1f980-1f9ae, U+1f9ba, U+1fa90, U+1faa8, U+1fab0-1fabd, U+1fabf, U+1face-1facf, U+1fae7',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.8.woff2',\n unicodeRange:\n 'U+200d, U+2640, U+2642, U+2695-2696, U+26f7, U+26f9, U+2708, U+2764, U+fe0f, U+1f33e, U+1f373, U+1f37c, U+1f384-1f385, U+1f393, U+1f3a4, U+1f3a8, U+1f3c2-1f3c4, U+1f3c7, U+1f3ca-1f3cc, U+1f3eb, U+1f3ed, U+1f3fb-1f3ff, U+1f466-1f478, U+1f47c, U+1f481-1f483, U+1f486-1f487, U+1f48b, U+1f48f, U+1f491, U+1f4bb-1f4bc, U+1f527, U+1f52c, U+1f574-1f575, U+1f57a, U+1f645-1f647, U+1f64b, U+1f64d-1f64e, U+1f680, U+1f692, U+1f6a3, U+1f6b4-1f6b6, U+1f6c0, U+1f6cc, U+1f91d, U+1f926, U+1f930-1f931, U+1f934-1f93a, U+1f93c-1f93e, U+1f977, U+1f9af-1f9b3, U+1f9b8-1f9b9, U+1f9bc-1f9bd, U+1f9cc-1f9cf, U+1f9d1-1f9df, U+1fa82, U+1fac3-1fac5',\n },\n {\n family: 'Noto Color Emoji',\n src: 'https://api.chayns-static.space/font/NotoColorEmoji/v24/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.9.woff2',\n unicodeRange:\n 'U+200d, U+261d, U+2620, U+2639-263a, U+2665, U+270a-270d, U+2728, U+2763-2764, U+2b50, U+fe0f, U+1f31a-1f31f, U+1f32b, U+1f383, U+1f389, U+1f3fb-1f3ff, U+1f440-1f450, U+1f463-1f465, U+1f479-1f47b, U+1f47d-1f480, U+1f485, U+1f48b-1f48c, U+1f493-1f49f, U+1f4a4-1f4a6, U+1f4a8-1f4ab, U+1f4af, U+1f525, U+1f573, U+1f590, U+1f595-1f596, U+1f5a4, U+1f5e3, U+1f600-1f644, U+1f648-1f64a, U+1f64c, U+1f64f, U+1f90c-1f925, U+1f927-1f92f, U+1f932-1f933, U+1f970-1f976, U+1f978-1f97a, U+1f9a0, U+1f9b4-1f9b7, U+1f9bb, U+1f9be-1f9bf, U+1f9d0, U+1f9e0-1f9e1, U+1fa75-1fa79, U+1fac0-1fac2, U+1fae0-1fae6, U+1fae8, U+1faf0-1faf8',\n },\n];\n\nexport const convertIconStyle = (iconStyle: IconStyle) => {\n switch (iconStyle) {\n case IconStyle.SOLID:\n return 'fa-solid';\n case IconStyle.DUOTONE:\n return 'fa-duotone';\n case IconStyle.SHARP:\n return 'fa-sharp';\n case IconStyle.LIGHT:\n return 'fa-light';\n default:\n return 'fa-regular';\n }\n};\n\nexport const generateFontFaces = () =>\n fonts\n .map(\n (font) => `\n @font-face {\n font-display: swap;\n font-family: \"${font.family}\";\n font-style: normal;\n font-weight: 400;\n src: url(\"${font.src}\") format(\"woff2\");\n ${font.unicodeRange ? `unicode-range: ${font.unicodeRange};` : ''}\n }\n`,\n )\n .join('');\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,8BAA8B;AAQxD,MAAMC,KAAa,GAAG,CAClB;EACIC,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EAAE;AAClB,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,EACD;EACIF,MAAM,EAAE,kBAAkB;EAC1BC,GAAG,EAAE,kHAAkH;EACvHC,YAAY,EACR;AACR,CAAC,CACJ;AAED,OAAO,MAAMC,gBAAgB,GAAIC,SAAoB,IAAK;EACtD,QAAQA,SAAS;IACb,KAAKN,SAAS,CAACO,KAAK;MAChB,OAAO,UAAU;IACrB,KAAKP,SAAS,CAACQ,OAAO;MAClB,OAAO,YAAY;IACvB,KAAKR,SAAS,CAACS,KAAK;MAChB,OAAO,UAAU;IACrB,KAAKT,SAAS,CAACU,KAAK;MAChB,OAAO,UAAU;IACrB;MACI,OAAO,YAAY;EAC3B;AACJ,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAC7BV,KAAK,CACAW,GAAG,CACCC,IAAI,IAAM;AACvB;AACA;AACA,oBAAoBA,IAAI,CAACX,MAAO;AAChC;AACA;AACA,gBAAgBW,IAAI,CAACV,GAAI;AACzB,MAAMU,IAAI,CAACT,YAAY,GAAI,kBAAiBS,IAAI,CAACT,YAAa,GAAE,GAAG,EAAG;AACtE;AACA,CACQ,CAAC,CACAU,IAAI,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.js","names":["getStackSizeFactor","icon","sizeFactorString","match","parseInt","undefined"],"sources":["../../src/utils/icon.ts"],"sourcesContent":["export const getStackSizeFactor = (icon: string) => {\n const sizeFactorString = icon.match(/fa-stack-([\\d])x/)?.[1];\n\n return typeof sizeFactorString === 'string' ? parseInt(sizeFactorString, 10) : undefined;\n};\n"],"mappings":"AAAA,OAAO,MAAMA,kBAAkB,GAAIC,IAAY,IAAK;EAChD,MAAMC,gBAAgB,GAAGD,IAAI,CAACE,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;EAE5D,OAAO,OAAOD,gBAAgB,KAAK,QAAQ,GAAGE,QAAQ,CAACF,gBAAgB,EAAE,EAAE,CAAC,GAAGG,SAAS;AAC5F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isTobitEmployee: () => Promise<boolean>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UacServiceClient } from '@chayns/uac-service';
|
|
2
|
+
import { getAccessToken, getSite, getUser } from 'chayns-api';
|
|
3
|
+
const client = new UacServiceClient({
|
|
4
|
+
getToken: async () => (await getAccessToken()).accessToken || '',
|
|
5
|
+
getDefaultSiteId: () => getSite().id,
|
|
6
|
+
getDefaultPersonId: () => getUser()?.personId || ''
|
|
7
|
+
});
|
|
8
|
+
export const isTobitEmployee = async () => {
|
|
9
|
+
const siteInfos = await client.getMembershipSites({
|
|
10
|
+
groupId: 8255
|
|
11
|
+
});
|
|
12
|
+
let isEmployee = false;
|
|
13
|
+
siteInfos.forEach(_ref => {
|
|
14
|
+
let {
|
|
15
|
+
siteId
|
|
16
|
+
} = _ref;
|
|
17
|
+
isEmployee = siteId === '60038-22141';
|
|
18
|
+
});
|
|
19
|
+
return isEmployee;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=isTobitEmployee.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isTobitEmployee.js","names":["UacServiceClient","getAccessToken","getSite","getUser","client","getToken","accessToken","getDefaultSiteId","id","getDefaultPersonId","personId","isTobitEmployee","siteInfos","getMembershipSites","groupId","isEmployee","forEach","_ref","siteId"],"sources":["../../src/utils/isTobitEmployee.ts"],"sourcesContent":["import { UacServiceClient } from '@chayns/uac-service';\nimport { getAccessToken, getSite, getUser } from 'chayns-api';\n\nconst client = new UacServiceClient({\n getToken: async () => (await getAccessToken()).accessToken || '',\n getDefaultSiteId: () => getSite().id,\n getDefaultPersonId: () => getUser()?.personId || '',\n});\n\nexport const isTobitEmployee = async () => {\n const siteInfos = await client.getMembershipSites({ groupId: 8255 });\n\n let isEmployee = false;\n\n siteInfos.forEach(({ siteId }) => {\n isEmployee = siteId === '60038-22141';\n });\n\n return isEmployee;\n};\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,cAAc,EAAEC,OAAO,EAAEC,OAAO,QAAQ,YAAY;AAE7D,MAAMC,MAAM,GAAG,IAAIJ,gBAAgB,CAAC;EAChCK,QAAQ,EAAE,MAAAA,CAAA,KAAY,CAAC,MAAMJ,cAAc,CAAC,CAAC,EAAEK,WAAW,IAAI,EAAE;EAChEC,gBAAgB,EAAEA,CAAA,KAAML,OAAO,CAAC,CAAC,CAACM,EAAE;EACpCC,kBAAkB,EAAEA,CAAA,KAAMN,OAAO,CAAC,CAAC,EAAEO,QAAQ,IAAI;AACrD,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAG,MAAAA,CAAA,KAAY;EACvC,MAAMC,SAAS,GAAG,MAAMR,MAAM,CAACS,kBAAkB,CAAC;IAAEC,OAAO,EAAE;EAAK,CAAC,CAAC;EAEpE,IAAIC,UAAU,GAAG,KAAK;EAEtBH,SAAS,CAACI,OAAO,CAACC,IAAA,IAAgB;IAAA,IAAf;MAAEC;IAAO,CAAC,GAAAD,IAAA;IACzBF,UAAU,GAAGG,MAAM,KAAK,aAAa;EACzC,CAAC,CAAC;EAEF,OAAOH,UAAU;AACrB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface ParseFloatWithDecimals {
|
|
2
|
+
({ stringValue, decimals }: {
|
|
3
|
+
stringValue: string;
|
|
4
|
+
decimals?: number;
|
|
5
|
+
}): number;
|
|
6
|
+
}
|
|
7
|
+
export declare const parseFloatWithDecimals: ParseFloatWithDecimals;
|
|
8
|
+
interface FormateNumberOptions {
|
|
9
|
+
number: number | string | null;
|
|
10
|
+
isMoneyInput?: boolean;
|
|
11
|
+
isTimeInput?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const formateNumber: ({ number, isMoneyInput, isTimeInput }: FormateNumberOptions) => string;
|
|
14
|
+
interface IsValidString {
|
|
15
|
+
(config: {
|
|
16
|
+
string: string;
|
|
17
|
+
isDecimalInput?: boolean;
|
|
18
|
+
isMoneyInput?: boolean;
|
|
19
|
+
isTimeInput?: boolean;
|
|
20
|
+
}): boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const isValidString: IsValidString;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { DECIMAL_TEST, INTEGER_TEST, MONEY_TEST, TIME_TEST } from '../constants/numberInput';
|
|
2
|
+
export const parseFloatWithDecimals = _ref => {
|
|
3
|
+
let {
|
|
4
|
+
stringValue,
|
|
5
|
+
decimals
|
|
6
|
+
} = _ref;
|
|
7
|
+
const parsed = parseFloat(stringValue);
|
|
8
|
+
if (decimals) {
|
|
9
|
+
return parseFloat(parsed.toFixed(decimals));
|
|
10
|
+
}
|
|
11
|
+
return parsed;
|
|
12
|
+
};
|
|
13
|
+
export const formateNumber = _ref2 => {
|
|
14
|
+
let {
|
|
15
|
+
number,
|
|
16
|
+
isMoneyInput,
|
|
17
|
+
isTimeInput
|
|
18
|
+
} = _ref2;
|
|
19
|
+
if (isTimeInput && typeof number === 'string') {
|
|
20
|
+
let hours = 0;
|
|
21
|
+
let minutes = 0;
|
|
22
|
+
const firstTwoNumbers = Number(number.substring(0, 2));
|
|
23
|
+
let lastTwoNumbers = 0;
|
|
24
|
+
let lastTwoNumbersLength = 0;
|
|
25
|
+
if (number.includes(':')) {
|
|
26
|
+
lastTwoNumbers = Number(number.substring(3, 5));
|
|
27
|
+
lastTwoNumbersLength = number.substring(3, 5).length;
|
|
28
|
+
} else {
|
|
29
|
+
lastTwoNumbers = Number(number.substring(2, 4));
|
|
30
|
+
lastTwoNumbersLength = number.substring(2, 4).length;
|
|
31
|
+
}
|
|
32
|
+
hours = firstTwoNumbers > 23 ? 23 : firstTwoNumbers;
|
|
33
|
+
if (lastTwoNumbers < 7 && lastTwoNumbersLength === 1) {
|
|
34
|
+
minutes = lastTwoNumbers * 10;
|
|
35
|
+
} else {
|
|
36
|
+
minutes = lastTwoNumbers > 59 ? 59 : lastTwoNumbers;
|
|
37
|
+
}
|
|
38
|
+
const hoursStr = hours < 10 ? `0${hours}` : `${hours}`;
|
|
39
|
+
const minutesStr = minutes < 10 ? `0${minutes}` : `${minutes}`;
|
|
40
|
+
return `${hoursStr}:${minutesStr}`;
|
|
41
|
+
}
|
|
42
|
+
if (typeof number !== 'number') {
|
|
43
|
+
return '';
|
|
44
|
+
}
|
|
45
|
+
return number.toLocaleString('de-DE', {
|
|
46
|
+
useGrouping: true,
|
|
47
|
+
minimumFractionDigits: isMoneyInput ? 2 : undefined,
|
|
48
|
+
maximumFractionDigits: isMoneyInput ? 2 : undefined,
|
|
49
|
+
maximumSignificantDigits: !isMoneyInput ? 20 : undefined
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
export const isValidString = _ref3 => {
|
|
53
|
+
let {
|
|
54
|
+
isDecimalInput,
|
|
55
|
+
isMoneyInput,
|
|
56
|
+
isTimeInput,
|
|
57
|
+
string
|
|
58
|
+
} = _ref3;
|
|
59
|
+
let isValid = false;
|
|
60
|
+
|
|
61
|
+
// Allows numbers, one (comma/point) and any number of decimal places
|
|
62
|
+
if (isDecimalInput && DECIMAL_TEST.test(string)) {
|
|
63
|
+
isValid = true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Allows numbers but excludes numbers with leading 0
|
|
67
|
+
if (isMoneyInput && MONEY_TEST.test(string)) {
|
|
68
|
+
isValid = true;
|
|
69
|
+
}
|
|
70
|
+
if (isTimeInput && TIME_TEST) {
|
|
71
|
+
isValid = true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Allows numbers but excludes numbers with leading 0
|
|
75
|
+
if (!isDecimalInput && !isMoneyInput && !isTimeInput && INTEGER_TEST.test(string)) {
|
|
76
|
+
isValid = true;
|
|
77
|
+
}
|
|
78
|
+
if (string.length === 0) {
|
|
79
|
+
isValid = true;
|
|
80
|
+
}
|
|
81
|
+
return isValid;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=numberInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numberInput.js","names":["DECIMAL_TEST","INTEGER_TEST","MONEY_TEST","TIME_TEST","parseFloatWithDecimals","_ref","stringValue","decimals","parsed","parseFloat","toFixed","formateNumber","_ref2","number","isMoneyInput","isTimeInput","hours","minutes","firstTwoNumbers","Number","substring","lastTwoNumbers","lastTwoNumbersLength","includes","length","hoursStr","minutesStr","toLocaleString","useGrouping","minimumFractionDigits","undefined","maximumFractionDigits","maximumSignificantDigits","isValidString","_ref3","isDecimalInput","string","isValid","test"],"sources":["../../src/utils/numberInput.ts"],"sourcesContent":["import { DECIMAL_TEST, INTEGER_TEST, MONEY_TEST, TIME_TEST } from '../constants/numberInput';\n\ninterface ParseFloatWithDecimals {\n ({ stringValue, decimals }: { stringValue: string; decimals?: number }): number;\n}\n\nexport const parseFloatWithDecimals: ParseFloatWithDecimals = ({ stringValue, decimals }) => {\n const parsed = parseFloat(stringValue);\n\n if (decimals) {\n return parseFloat(parsed.toFixed(decimals));\n }\n\n return parsed;\n};\n\ninterface FormateNumberOptions {\n number: number | string | null;\n isMoneyInput?: boolean;\n isTimeInput?: boolean;\n}\n\nexport const formateNumber = ({ number, isMoneyInput, isTimeInput }: FormateNumberOptions) => {\n if (isTimeInput && typeof number === 'string') {\n let hours = 0;\n let minutes = 0;\n\n const firstTwoNumbers = Number(number.substring(0, 2));\n let lastTwoNumbers = 0;\n let lastTwoNumbersLength = 0;\n\n if (number.includes(':')) {\n lastTwoNumbers = Number(number.substring(3, 5));\n lastTwoNumbersLength = number.substring(3, 5).length;\n } else {\n lastTwoNumbers = Number(number.substring(2, 4));\n lastTwoNumbersLength = number.substring(2, 4).length;\n }\n\n hours = firstTwoNumbers > 23 ? 23 : firstTwoNumbers;\n\n if (lastTwoNumbers < 7 && lastTwoNumbersLength === 1) {\n minutes = lastTwoNumbers * 10;\n } else {\n minutes = lastTwoNumbers > 59 ? 59 : lastTwoNumbers;\n }\n\n const hoursStr = hours < 10 ? `0${hours}` : `${hours}`;\n const minutesStr = minutes < 10 ? `0${minutes}` : `${minutes}`;\n\n return `${hoursStr}:${minutesStr}`;\n }\n\n if (typeof number !== 'number') {\n return '';\n }\n\n return number.toLocaleString('de-DE', {\n useGrouping: true,\n minimumFractionDigits: isMoneyInput ? 2 : undefined,\n maximumFractionDigits: isMoneyInput ? 2 : undefined,\n maximumSignificantDigits: !isMoneyInput ? 20 : undefined,\n });\n};\n\ninterface IsValidString {\n (config: {\n string: string;\n isDecimalInput?: boolean;\n isMoneyInput?: boolean;\n isTimeInput?: boolean;\n }): boolean;\n}\n\nexport const isValidString: IsValidString = ({\n isDecimalInput,\n isMoneyInput,\n isTimeInput,\n string,\n}) => {\n let isValid = false;\n\n // Allows numbers, one (comma/point) and any number of decimal places\n if (isDecimalInput && DECIMAL_TEST.test(string)) {\n isValid = true;\n }\n\n // Allows numbers but excludes numbers with leading 0\n if (isMoneyInput && MONEY_TEST.test(string)) {\n isValid = true;\n }\n\n if (isTimeInput && TIME_TEST) {\n isValid = true;\n }\n\n // Allows numbers but excludes numbers with leading 0\n if (!isDecimalInput && !isMoneyInput && !isTimeInput && INTEGER_TEST.test(string)) {\n isValid = true;\n }\n\n if (string.length === 0) {\n isValid = true;\n }\n\n return isValid;\n};\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,YAAY,EAAEC,UAAU,EAAEC,SAAS,QAAQ,0BAA0B;AAM5F,OAAO,MAAMC,sBAA8C,GAAGC,IAAA,IAA+B;EAAA,IAA9B;IAAEC,WAAW;IAAEC;EAAS,CAAC,GAAAF,IAAA;EACpF,MAAMG,MAAM,GAAGC,UAAU,CAACH,WAAW,CAAC;EAEtC,IAAIC,QAAQ,EAAE;IACV,OAAOE,UAAU,CAACD,MAAM,CAACE,OAAO,CAACH,QAAQ,CAAC,CAAC;EAC/C;EAEA,OAAOC,MAAM;AACjB,CAAC;AAQD,OAAO,MAAMG,aAAa,GAAGC,KAAA,IAAiE;EAAA,IAAhE;IAAEC,MAAM;IAAEC,YAAY;IAAEC;EAAkC,CAAC,GAAAH,KAAA;EACrF,IAAIG,WAAW,IAAI,OAAOF,MAAM,KAAK,QAAQ,EAAE;IAC3C,IAAIG,KAAK,GAAG,CAAC;IACb,IAAIC,OAAO,GAAG,CAAC;IAEf,MAAMC,eAAe,GAAGC,MAAM,CAACN,MAAM,CAACO,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtD,IAAIC,cAAc,GAAG,CAAC;IACtB,IAAIC,oBAAoB,GAAG,CAAC;IAE5B,IAAIT,MAAM,CAACU,QAAQ,CAAC,GAAG,CAAC,EAAE;MACtBF,cAAc,GAAGF,MAAM,CAACN,MAAM,CAACO,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;MAC/CE,oBAAoB,GAAGT,MAAM,CAACO,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAACI,MAAM;IACxD,CAAC,MAAM;MACHH,cAAc,GAAGF,MAAM,CAACN,MAAM,CAACO,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;MAC/CE,oBAAoB,GAAGT,MAAM,CAACO,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAACI,MAAM;IACxD;IAEAR,KAAK,GAAGE,eAAe,GAAG,EAAE,GAAG,EAAE,GAAGA,eAAe;IAEnD,IAAIG,cAAc,GAAG,CAAC,IAAIC,oBAAoB,KAAK,CAAC,EAAE;MAClDL,OAAO,GAAGI,cAAc,GAAG,EAAE;IACjC,CAAC,MAAM;MACHJ,OAAO,GAAGI,cAAc,GAAG,EAAE,GAAG,EAAE,GAAGA,cAAc;IACvD;IAEA,MAAMI,QAAQ,GAAGT,KAAK,GAAG,EAAE,GAAI,IAAGA,KAAM,EAAC,GAAI,GAAEA,KAAM,EAAC;IACtD,MAAMU,UAAU,GAAGT,OAAO,GAAG,EAAE,GAAI,IAAGA,OAAQ,EAAC,GAAI,GAAEA,OAAQ,EAAC;IAE9D,OAAQ,GAAEQ,QAAS,IAAGC,UAAW,EAAC;EACtC;EAEA,IAAI,OAAOb,MAAM,KAAK,QAAQ,EAAE;IAC5B,OAAO,EAAE;EACb;EAEA,OAAOA,MAAM,CAACc,cAAc,CAAC,OAAO,EAAE;IAClCC,WAAW,EAAE,IAAI;IACjBC,qBAAqB,EAAEf,YAAY,GAAG,CAAC,GAAGgB,SAAS;IACnDC,qBAAqB,EAAEjB,YAAY,GAAG,CAAC,GAAGgB,SAAS;IACnDE,wBAAwB,EAAE,CAAClB,YAAY,GAAG,EAAE,GAAGgB;EACnD,CAAC,CAAC;AACN,CAAC;AAWD,OAAO,MAAMG,aAA4B,GAAGC,KAAA,IAKtC;EAAA,IALuC;IACzCC,cAAc;IACdrB,YAAY;IACZC,WAAW;IACXqB;EACJ,CAAC,GAAAF,KAAA;EACG,IAAIG,OAAO,GAAG,KAAK;;EAEnB;EACA,IAAIF,cAAc,IAAInC,YAAY,CAACsC,IAAI,CAACF,MAAM,CAAC,EAAE;IAC7CC,OAAO,GAAG,IAAI;EAClB;;EAEA;EACA,IAAIvB,YAAY,IAAIZ,UAAU,CAACoC,IAAI,CAACF,MAAM,CAAC,EAAE;IACzCC,OAAO,GAAG,IAAI;EAClB;EAEA,IAAItB,WAAW,IAAIZ,SAAS,EAAE;IAC1BkC,OAAO,GAAG,IAAI;EAClB;;EAEA;EACA,IAAI,CAACF,cAAc,IAAI,CAACrB,YAAY,IAAI,CAACC,WAAW,IAAId,YAAY,CAACqC,IAAI,CAACF,MAAM,CAAC,EAAE;IAC/EC,OAAO,GAAG,IAAI;EAClB;EAEA,IAAID,MAAM,CAACZ,MAAM,KAAK,CAAC,EAAE;IACrBa,OAAO,GAAG,IAAI;EAClB;EAEA,OAAOA,OAAO;AAClB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const searchList = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
searchString,
|
|
4
|
+
items
|
|
5
|
+
} = _ref;
|
|
6
|
+
const matchingItems = [];
|
|
7
|
+
const lowercaseSearchString = searchString.toLowerCase();
|
|
8
|
+
items.forEach(item => {
|
|
9
|
+
const lowercaseText = item.text.toLowerCase();
|
|
10
|
+
if (lowercaseText.includes(lowercaseSearchString)) {
|
|
11
|
+
matchingItems.push(item);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
return matchingItems;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=searchBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchBox.js","names":["searchList","_ref","searchString","items","matchingItems","lowercaseSearchString","toLowerCase","forEach","item","lowercaseText","text","includes","push"],"sources":["../../src/utils/searchBox.ts"],"sourcesContent":["import type { ISearchBoxItem } from '../types/searchBox';\n\ninterface SearchListOptions {\n items: ISearchBoxItem[];\n searchString: string;\n}\n\nexport const searchList = ({ searchString, items }: SearchListOptions) => {\n const matchingItems: ISearchBoxItem[] = [];\n\n const lowercaseSearchString = searchString.toLowerCase();\n\n items.forEach((item) => {\n const lowercaseText = item.text.toLowerCase();\n\n if (lowercaseText.includes(lowercaseSearchString)) {\n matchingItems.push(item);\n }\n });\n\n return matchingItems;\n};\n"],"mappings":"AAOA,OAAO,MAAMA,UAAU,GAAGC,IAAA,IAAgD;EAAA,IAA/C;IAAEC,YAAY;IAAEC;EAAyB,CAAC,GAAAF,IAAA;EACjE,MAAMG,aAA+B,GAAG,EAAE;EAE1C,MAAMC,qBAAqB,GAAGH,YAAY,CAACI,WAAW,CAAC,CAAC;EAExDH,KAAK,CAACI,OAAO,CAAEC,IAAI,IAAK;IACpB,MAAMC,aAAa,GAAGD,IAAI,CAACE,IAAI,CAACJ,WAAW,CAAC,CAAC;IAE7C,IAAIG,aAAa,CAACE,QAAQ,CAACN,qBAAqB,CAAC,EAAE;MAC/CD,aAAa,CAACQ,IAAI,CAACJ,IAAI,CAAC;IAC5B;EACJ,CAAC,CAAC;EAEF,OAAOJ,aAAa;AACxB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Theme } from '../components/color-scheme-provider/ColorSchemeProvider';
|
|
2
|
+
export interface FillSlider {
|
|
3
|
+
fromSlider: HTMLInputElement;
|
|
4
|
+
toSlider: HTMLInputElement;
|
|
5
|
+
theme: Theme;
|
|
6
|
+
}
|
|
7
|
+
export declare const fillSlider: ({ fromSlider, toSlider, theme }: FillSlider) => void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const fillSlider = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
fromSlider,
|
|
4
|
+
toSlider,
|
|
5
|
+
theme
|
|
6
|
+
} = _ref;
|
|
7
|
+
const rangeDistance = Number(toSlider.max) - Number(toSlider.min);
|
|
8
|
+
const fromPosition = Number(fromSlider.value) - Number(toSlider.min);
|
|
9
|
+
const toPosition = Number(toSlider.value) - Number(toSlider.min);
|
|
10
|
+
const backgroundColor = theme['403'];
|
|
11
|
+
const trackColor = theme['409'];
|
|
12
|
+
if (!backgroundColor || !trackColor) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const gradient = `linear-gradient(
|
|
16
|
+
to right,
|
|
17
|
+
${backgroundColor} 0%,
|
|
18
|
+
${backgroundColor} ${fromPosition / rangeDistance * 100}%,
|
|
19
|
+
${trackColor} ${fromPosition / rangeDistance * 100}%,
|
|
20
|
+
${trackColor} ${toPosition / rangeDistance * 100}%,
|
|
21
|
+
${backgroundColor} ${toPosition / rangeDistance * 100}%,
|
|
22
|
+
${backgroundColor} 100%)`;
|
|
23
|
+
|
|
24
|
+
// Apply the gradient to the appropriate slider
|
|
25
|
+
toSlider.style.background = gradient;
|
|
26
|
+
fromSlider.style.background = gradient;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.js","names":["fillSlider","_ref","fromSlider","toSlider","theme","rangeDistance","Number","max","min","fromPosition","value","toPosition","backgroundColor","trackColor","gradient","style","background"],"sources":["../../src/utils/slider.ts"],"sourcesContent":["import type { Theme } from '../components/color-scheme-provider/ColorSchemeProvider';\n\nexport interface FillSlider {\n fromSlider: HTMLInputElement;\n toSlider: HTMLInputElement;\n theme: Theme;\n}\n\nexport const fillSlider = ({ fromSlider, toSlider, theme }: FillSlider) => {\n const rangeDistance = Number(toSlider.max) - Number(toSlider.min);\n const fromPosition = Number(fromSlider.value) - Number(toSlider.min);\n const toPosition = Number(toSlider.value) - Number(toSlider.min);\n\n const backgroundColor = theme['403'];\n const trackColor = theme['409'];\n\n if (!backgroundColor || !trackColor) {\n return;\n }\n\n const gradient = `linear-gradient(\n to right,\n ${backgroundColor} 0%,\n ${backgroundColor} ${(fromPosition / rangeDistance) * 100}%,\n ${trackColor} ${(fromPosition / rangeDistance) * 100}%,\n ${trackColor} ${(toPosition / rangeDistance) * 100}%,\n ${backgroundColor} ${(toPosition / rangeDistance) * 100}%,\n ${backgroundColor} 100%)`;\n\n // Apply the gradient to the appropriate slider\n toSlider.style.background = gradient;\n fromSlider.style.background = gradient;\n};\n"],"mappings":"AAQA,OAAO,MAAMA,UAAU,GAAGC,IAAA,IAAiD;EAAA,IAAhD;IAAEC,UAAU;IAAEC,QAAQ;IAAEC;EAAkB,CAAC,GAAAH,IAAA;EAClE,MAAMI,aAAa,GAAGC,MAAM,CAACH,QAAQ,CAACI,GAAG,CAAC,GAAGD,MAAM,CAACH,QAAQ,CAACK,GAAG,CAAC;EACjE,MAAMC,YAAY,GAAGH,MAAM,CAACJ,UAAU,CAACQ,KAAK,CAAC,GAAGJ,MAAM,CAACH,QAAQ,CAACK,GAAG,CAAC;EACpE,MAAMG,UAAU,GAAGL,MAAM,CAACH,QAAQ,CAACO,KAAK,CAAC,GAAGJ,MAAM,CAACH,QAAQ,CAACK,GAAG,CAAC;EAEhE,MAAMI,eAAe,GAAGR,KAAK,CAAC,KAAK,CAAC;EACpC,MAAMS,UAAU,GAAGT,KAAK,CAAC,KAAK,CAAC;EAE/B,IAAI,CAACQ,eAAe,IAAI,CAACC,UAAU,EAAE;IACjC;EACJ;EAEA,MAAMC,QAAQ,GAAI;AACtB;AACA,QAAQF,eAAgB;AACxB,QAAQA,eAAgB,IAAIH,YAAY,GAAGJ,aAAa,GAAI,GAAI;AAChE,QAAQQ,UAAW,IAAIJ,YAAY,GAAGJ,aAAa,GAAI,GAAI;AAC3D,QAAQQ,UAAW,IAAIF,UAAU,GAAGN,aAAa,GAAI,GAAI;AACzD,QAAQO,eAAgB,IAAID,UAAU,GAAGN,aAAa,GAAI,GAAI;AAC9D,QAAQO,eAAgB,QAAO;;EAE3B;EACAT,QAAQ,CAACY,KAAK,CAACC,UAAU,GAAGF,QAAQ;EACpCZ,UAAU,CAACa,KAAK,CAACC,UAAU,GAAGF,QAAQ;AAC1C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AnimationScope } from 'framer-motion';
|
|
2
|
+
interface GetNearestPointProps {
|
|
3
|
+
position: number;
|
|
4
|
+
snapPoints: number[];
|
|
5
|
+
}
|
|
6
|
+
export declare const getNearestPoint: ({ snapPoints, position }: GetNearestPointProps) => {
|
|
7
|
+
nearestIndex: number;
|
|
8
|
+
nearestPoint: number;
|
|
9
|
+
};
|
|
10
|
+
interface GetThumbPositionProps {
|
|
11
|
+
scope: AnimationScope;
|
|
12
|
+
itemWidth: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const getThumbPosition: ({ itemWidth, scope }: GetThumbPositionProps) => number | undefined;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export const getNearestPoint = _ref => {
|
|
2
|
+
let {
|
|
3
|
+
snapPoints,
|
|
4
|
+
position
|
|
5
|
+
} = _ref;
|
|
6
|
+
let nearestIndex = -1;
|
|
7
|
+
let nearestPoint = -Infinity;
|
|
8
|
+
for (let i = 0; i < snapPoints.length; i++) {
|
|
9
|
+
const index = snapPoints[i];
|
|
10
|
+
if (index && index < position && index > nearestPoint) {
|
|
11
|
+
nearestPoint = index;
|
|
12
|
+
nearestIndex = i;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
nearestIndex,
|
|
17
|
+
nearestPoint
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export const getThumbPosition = _ref2 => {
|
|
21
|
+
let {
|
|
22
|
+
itemWidth,
|
|
23
|
+
scope
|
|
24
|
+
} = _ref2;
|
|
25
|
+
if (!scope.current) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const {
|
|
29
|
+
transform
|
|
30
|
+
} = scope.current.style;
|
|
31
|
+
let position;
|
|
32
|
+
if (transform === 'none') {
|
|
33
|
+
position = 0;
|
|
34
|
+
} else {
|
|
35
|
+
const match = transform.match(/translateX\(([-\d.]+)px\)/);
|
|
36
|
+
if (match && match[1]) {
|
|
37
|
+
position = parseFloat(match[1]);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (!position) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return position + itemWidth / 2;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=sliderButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sliderButton.js","names":["getNearestPoint","_ref","snapPoints","position","nearestIndex","nearestPoint","Infinity","i","length","index","getThumbPosition","_ref2","itemWidth","scope","current","undefined","transform","style","match","parseFloat"],"sources":["../../src/utils/sliderButton.ts"],"sourcesContent":["import type { AnimationScope } from 'framer-motion';\n\ninterface GetNearestPointProps {\n position: number;\n snapPoints: number[];\n}\nexport const getNearestPoint = ({ snapPoints, position }: GetNearestPointProps) => {\n let nearestIndex = -1;\n let nearestPoint = -Infinity;\n\n for (let i = 0; i < snapPoints.length; i++) {\n const index = snapPoints[i];\n\n if (index && index < position && index > nearestPoint) {\n nearestPoint = index;\n nearestIndex = i;\n }\n }\n\n return { nearestIndex, nearestPoint };\n};\n\ninterface GetThumbPositionProps {\n scope: AnimationScope;\n itemWidth: number;\n}\n\nexport const getThumbPosition = ({ itemWidth, scope }: GetThumbPositionProps) => {\n if (!scope.current) {\n return undefined;\n }\n\n const { transform } = (scope.current as HTMLElement).style;\n let position;\n\n if (transform === 'none') {\n position = 0;\n } else {\n const match = transform.match(/translateX\\(([-\\d.]+)px\\)/);\n\n if (match && match[1]) {\n position = parseFloat(match[1]);\n }\n }\n\n if (!position) {\n return undefined;\n }\n\n return position + itemWidth / 2;\n};\n"],"mappings":"AAMA,OAAO,MAAMA,eAAe,GAAGC,IAAA,IAAoD;EAAA,IAAnD;IAAEC,UAAU;IAAEC;EAA+B,CAAC,GAAAF,IAAA;EAC1E,IAAIG,YAAY,GAAG,CAAC,CAAC;EACrB,IAAIC,YAAY,GAAG,CAACC,QAAQ;EAE5B,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,UAAU,CAACM,MAAM,EAAED,CAAC,EAAE,EAAE;IACxC,MAAME,KAAK,GAAGP,UAAU,CAACK,CAAC,CAAC;IAE3B,IAAIE,KAAK,IAAIA,KAAK,GAAGN,QAAQ,IAAIM,KAAK,GAAGJ,YAAY,EAAE;MACnDA,YAAY,GAAGI,KAAK;MACpBL,YAAY,GAAGG,CAAC;IACpB;EACJ;EAEA,OAAO;IAAEH,YAAY;IAAEC;EAAa,CAAC;AACzC,CAAC;AAOD,OAAO,MAAMK,gBAAgB,GAAGC,KAAA,IAAiD;EAAA,IAAhD;IAAEC,SAAS;IAAEC;EAA6B,CAAC,GAAAF,KAAA;EACxE,IAAI,CAACE,KAAK,CAACC,OAAO,EAAE;IAChB,OAAOC,SAAS;EACpB;EAEA,MAAM;IAAEC;EAAU,CAAC,GAAIH,KAAK,CAACC,OAAO,CAAiBG,KAAK;EAC1D,IAAId,QAAQ;EAEZ,IAAIa,SAAS,KAAK,MAAM,EAAE;IACtBb,QAAQ,GAAG,CAAC;EAChB,CAAC,MAAM;IACH,MAAMe,KAAK,GAAGF,SAAS,CAACE,KAAK,CAAC,2BAA2B,CAAC;IAE1D,IAAIA,KAAK,IAAIA,KAAK,CAAC,CAAC,CAAC,EAAE;MACnBf,QAAQ,GAAGgB,UAAU,CAACD,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC;EACJ;EAEA,IAAI,CAACf,QAAQ,EAAE;IACX,OAAOY,SAAS;EACpB;EAEA,OAAOZ,QAAQ,GAAGS,SAAS,GAAG,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const truncateElement: (element: HTMLElement, referenceHeight: number) => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const doesElementOverflow = (element, referenceHeight) => element.scrollHeight > referenceHeight;
|
|
2
|
+
const doesElementHasOnlyText = element => {
|
|
3
|
+
// Check if element has no child elements.
|
|
4
|
+
if (element.children.length === 0) {
|
|
5
|
+
// If element has text (not empty), it is only text.
|
|
6
|
+
return element.textContent !== '';
|
|
7
|
+
}
|
|
8
|
+
// Element has child elements or no text, so it's not only text.
|
|
9
|
+
return false;
|
|
10
|
+
};
|
|
11
|
+
const removeLastLeafElement = element => {
|
|
12
|
+
// remove last element of html element where the last element is a leaf element and its content is a string
|
|
13
|
+
const lastChild = element.lastElementChild;
|
|
14
|
+
if (lastChild && !doesElementHasOnlyText(lastChild) && lastChild.hasChildNodes()) {
|
|
15
|
+
removeLastLeafElement(lastChild);
|
|
16
|
+
} else if (lastChild && doesElementHasOnlyText(lastChild) && lastChild.textContent && lastChild.textContent.length > 25) {
|
|
17
|
+
lastChild.textContent = `${lastChild.textContent.substring(0, lastChild.textContent.length - 25)} ...`;
|
|
18
|
+
} else if (lastChild) {
|
|
19
|
+
element.removeChild(lastChild);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export const truncateElement = (element, referenceHeight) => {
|
|
23
|
+
while (doesElementOverflow(element, referenceHeight)) {
|
|
24
|
+
removeLastLeafElement(element);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=truncation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"truncation.js","names":["doesElementOverflow","element","referenceHeight","scrollHeight","doesElementHasOnlyText","children","length","textContent","removeLastLeafElement","lastChild","lastElementChild","hasChildNodes","substring","removeChild","truncateElement"],"sources":["../../src/utils/truncation.ts"],"sourcesContent":["const doesElementOverflow = (element: HTMLElement, referenceHeight: number): boolean =>\n element.scrollHeight > referenceHeight;\n\nconst doesElementHasOnlyText = (element: HTMLElement): boolean => {\n // Check if element has no child elements.\n if (element.children.length === 0) {\n // If element has text (not empty), it is only text.\n return element.textContent !== '';\n }\n // Element has child elements or no text, so it's not only text.\n return false;\n};\n\nconst removeLastLeafElement = (element: HTMLElement) => {\n // remove last element of html element where the last element is a leaf element and its content is a string\n const lastChild: Element | null = element.lastElementChild;\n if (\n lastChild &&\n !doesElementHasOnlyText(lastChild as HTMLElement) &&\n lastChild.hasChildNodes()\n ) {\n removeLastLeafElement(lastChild as HTMLElement);\n } else if (\n lastChild &&\n doesElementHasOnlyText(lastChild as HTMLElement) &&\n lastChild.textContent &&\n lastChild.textContent.length > 25\n ) {\n lastChild.textContent = `${lastChild.textContent.substring(\n 0,\n lastChild.textContent.length - 25,\n )} ...`;\n } else if (lastChild) {\n element.removeChild(lastChild);\n }\n};\nexport const truncateElement = (element: HTMLElement, referenceHeight: number) => {\n while (doesElementOverflow(element, referenceHeight)) {\n removeLastLeafElement(element);\n }\n};\n"],"mappings":"AAAA,MAAMA,mBAAmB,GAAGA,CAACC,OAAoB,EAAEC,eAAuB,KACtED,OAAO,CAACE,YAAY,GAAGD,eAAe;AAE1C,MAAME,sBAAsB,GAAIH,OAAoB,IAAc;EAC9D;EACA,IAAIA,OAAO,CAACI,QAAQ,CAACC,MAAM,KAAK,CAAC,EAAE;IAC/B;IACA,OAAOL,OAAO,CAACM,WAAW,KAAK,EAAE;EACrC;EACA;EACA,OAAO,KAAK;AAChB,CAAC;AAED,MAAMC,qBAAqB,GAAIP,OAAoB,IAAK;EACpD;EACA,MAAMQ,SAAyB,GAAGR,OAAO,CAACS,gBAAgB;EAC1D,IACID,SAAS,IACT,CAACL,sBAAsB,CAACK,SAAwB,CAAC,IACjDA,SAAS,CAACE,aAAa,CAAC,CAAC,EAC3B;IACEH,qBAAqB,CAACC,SAAwB,CAAC;EACnD,CAAC,MAAM,IACHA,SAAS,IACTL,sBAAsB,CAACK,SAAwB,CAAC,IAChDA,SAAS,CAACF,WAAW,IACrBE,SAAS,CAACF,WAAW,CAACD,MAAM,GAAG,EAAE,EACnC;IACEG,SAAS,CAACF,WAAW,GAAI,GAAEE,SAAS,CAACF,WAAW,CAACK,SAAS,CACtD,CAAC,EACDH,SAAS,CAACF,WAAW,CAACD,MAAM,GAAG,EACnC,CAAE,MAAK;EACX,CAAC,MAAM,IAAIG,SAAS,EAAE;IAClBR,OAAO,CAACY,WAAW,CAACJ,SAAS,CAAC;EAClC;AACJ,CAAC;AACD,OAAO,MAAMK,eAAe,GAAGA,CAACb,OAAoB,EAAEC,eAAuB,KAAK;EAC9E,OAAOF,mBAAmB,CAACC,OAAO,EAAEC,eAAe,CAAC,EAAE;IAClDM,qBAAqB,CAACP,OAAO,CAAC;EAClC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Image, InternalFileItem, Video } from '../types/file';
|
|
2
|
+
interface UploadFilesOptions {
|
|
3
|
+
fileToUpload: InternalFileItem;
|
|
4
|
+
callback: (UploadedFile: Video | Image) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const uploadFile: ({ fileToUpload, callback }: UploadFilesOptions) => Promise<void>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { postImage } from '../api/image/post';
|
|
2
|
+
import { postVideo } from '../api/video/post';
|
|
3
|
+
export const uploadFile = async _ref => {
|
|
4
|
+
let {
|
|
5
|
+
fileToUpload,
|
|
6
|
+
callback
|
|
7
|
+
} = _ref;
|
|
8
|
+
if (!fileToUpload || fileToUpload.state !== 'none') {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (fileToUpload.file?.type.includes('video/')) {
|
|
12
|
+
const uploadedVideo = await postVideo({
|
|
13
|
+
file: fileToUpload.file
|
|
14
|
+
});
|
|
15
|
+
if (uploadedVideo) {
|
|
16
|
+
callback({
|
|
17
|
+
...uploadedVideo,
|
|
18
|
+
id: uploadedVideo.id.toString()
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (fileToUpload.file?.type.includes('image/')) {
|
|
23
|
+
const uploadedImage = await postImage({
|
|
24
|
+
file: fileToUpload.file
|
|
25
|
+
});
|
|
26
|
+
if (uploadedImage) {
|
|
27
|
+
callback({
|
|
28
|
+
url: `${uploadedImage.base}/${uploadedImage.key}`,
|
|
29
|
+
id: uploadedImage.key,
|
|
30
|
+
meta: uploadedImage.meta
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=uploadFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploadFile.js","names":["postImage","postVideo","uploadFile","_ref","fileToUpload","callback","state","file","type","includes","uploadedVideo","id","toString","uploadedImage","url","base","key","meta"],"sources":["../../src/utils/uploadFile.ts"],"sourcesContent":["import { postImage } from '../api/image/post';\nimport { postVideo } from '../api/video/post';\nimport type { Image, InternalFileItem, Video } from '../types/file';\n\ninterface UploadFilesOptions {\n fileToUpload: InternalFileItem;\n callback: (UploadedFile: Video | Image) => void;\n}\n\nexport const uploadFile = async ({ fileToUpload, callback }: UploadFilesOptions): Promise<void> => {\n if (!fileToUpload || fileToUpload.state !== 'none') {\n return;\n }\n\n if (fileToUpload.file?.type.includes('video/')) {\n const uploadedVideo = await postVideo({ file: fileToUpload.file });\n\n if (uploadedVideo) {\n callback({\n ...uploadedVideo,\n id: uploadedVideo.id.toString(),\n });\n }\n }\n\n if (fileToUpload.file?.type.includes('image/')) {\n const uploadedImage = await postImage({ file: fileToUpload.file });\n\n if (uploadedImage) {\n callback({\n url: `${uploadedImage.base}/${uploadedImage.key}`,\n id: uploadedImage.key,\n meta: uploadedImage.meta,\n });\n }\n }\n};\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,SAAS,QAAQ,mBAAmB;AAQ7C,OAAO,MAAMC,UAAU,GAAG,MAAAC,IAAA,IAAyE;EAAA,IAAlE;IAAEC,YAAY;IAAEC;EAA6B,CAAC,GAAAF,IAAA;EAC3E,IAAI,CAACC,YAAY,IAAIA,YAAY,CAACE,KAAK,KAAK,MAAM,EAAE;IAChD;EACJ;EAEA,IAAIF,YAAY,CAACG,IAAI,EAAEC,IAAI,CAACC,QAAQ,CAAC,QAAQ,CAAC,EAAE;IAC5C,MAAMC,aAAa,GAAG,MAAMT,SAAS,CAAC;MAAEM,IAAI,EAAEH,YAAY,CAACG;IAAK,CAAC,CAAC;IAElE,IAAIG,aAAa,EAAE;MACfL,QAAQ,CAAC;QACL,GAAGK,aAAa;QAChBC,EAAE,EAAED,aAAa,CAACC,EAAE,CAACC,QAAQ,CAAC;MAClC,CAAC,CAAC;IACN;EACJ;EAEA,IAAIR,YAAY,CAACG,IAAI,EAAEC,IAAI,CAACC,QAAQ,CAAC,QAAQ,CAAC,EAAE;IAC5C,MAAMI,aAAa,GAAG,MAAMb,SAAS,CAAC;MAAEO,IAAI,EAAEH,YAAY,CAACG;IAAK,CAAC,CAAC;IAElE,IAAIM,aAAa,EAAE;MACfR,QAAQ,CAAC;QACLS,GAAG,EAAG,GAAED,aAAa,CAACE,IAAK,IAAGF,aAAa,CAACG,GAAI,EAAC;QACjDL,EAAE,EAAEE,aAAa,CAACG,GAAG;QACrBC,IAAI,EAAEJ,aAAa,CAACI;MACxB,CAAC,CAAC;IACN;EACJ;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.482",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"browserslist": [
|
|
7
|
+
">0.5%",
|
|
8
|
+
"not dead",
|
|
9
|
+
"not op_mini all",
|
|
10
|
+
"not IE 11"
|
|
11
|
+
],
|
|
5
12
|
"keywords": [
|
|
6
13
|
"chayns",
|
|
7
14
|
"react",
|
|
@@ -33,34 +40,38 @@
|
|
|
33
40
|
"url": "https://github.com/TobitSoftware/chayns-components/issues"
|
|
34
41
|
},
|
|
35
42
|
"devDependencies": {
|
|
36
|
-
"@babel/cli": "^7.
|
|
37
|
-
"@babel/core": "^7.
|
|
38
|
-
"@babel/preset-env": "^7.
|
|
39
|
-
"@babel/preset-react": "^7.
|
|
40
|
-
"@babel/preset-typescript": "^7.
|
|
41
|
-
"@types/react": "^
|
|
42
|
-
"@types/react-dom": "^
|
|
43
|
-
"@types/styled-components": "^5.1.
|
|
44
|
-
"@types/uuid": "^9.0.
|
|
45
|
-
"babel-loader": "^
|
|
46
|
-
"lerna": "^
|
|
47
|
-
"react": "^
|
|
48
|
-
"react-dom": "^
|
|
49
|
-
"
|
|
43
|
+
"@babel/cli": "^7.23.9",
|
|
44
|
+
"@babel/core": "^7.23.9",
|
|
45
|
+
"@babel/preset-env": "^7.23.9",
|
|
46
|
+
"@babel/preset-react": "^7.23.3",
|
|
47
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
48
|
+
"@types/react": "^18.2.57",
|
|
49
|
+
"@types/react-dom": "^18.2.19",
|
|
50
|
+
"@types/styled-components": "^5.1.34",
|
|
51
|
+
"@types/uuid": "^9.0.8",
|
|
52
|
+
"babel-loader": "^9.1.3",
|
|
53
|
+
"lerna": "^8.1.2",
|
|
54
|
+
"react": "^18.2.0",
|
|
55
|
+
"react-dom": "^18.2.0",
|
|
56
|
+
"styled-components": "^6.1.8",
|
|
57
|
+
"typescript": "^5.3.3"
|
|
50
58
|
},
|
|
51
59
|
"dependencies": {
|
|
52
60
|
"@chayns/colors": "^2.0.0",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"uuid": "^9.0.
|
|
61
|
+
"@chayns/uac-service": "^0.0.46",
|
|
62
|
+
"@react-hook/resize-observer": "^1.2.6",
|
|
63
|
+
"clsx": "^2.1.0",
|
|
64
|
+
"uuid": "^9.0.1"
|
|
57
65
|
},
|
|
58
66
|
"peerDependencies": {
|
|
67
|
+
"chayns-api": ">=1.0.50",
|
|
68
|
+
"framer-motion": ">=10.18.0",
|
|
59
69
|
"react": ">=16.14.0",
|
|
60
|
-
"react-dom": ">=16.14.0"
|
|
70
|
+
"react-dom": ">=16.14.0",
|
|
71
|
+
"styled-components": ">=5.3.11"
|
|
61
72
|
},
|
|
62
73
|
"publishConfig": {
|
|
63
74
|
"access": "public"
|
|
64
75
|
},
|
|
65
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "28d942f880706347e1fbfb75ff203e722c647027"
|
|
66
77
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["getAccordionHeadHeight","isWrapped","title","width","element","document","createElement","style","fontSize","opacity","pointerEvents","whiteSpace","innerText","body","appendChild","closedHeight","Math","max","clientHeight","fontWeight","openHeight","removeChild","closed","open"],"sources":["../../../src/components/accordion/utils.ts"],"sourcesContent":["interface GetAccordionHeadHeightOptions {\n isWrapped?: boolean;\n title: string;\n width: number;\n}\n\ninterface GetAccordionHeadHeightResult {\n closed: number;\n open: number;\n}\n\nexport const getAccordionHeadHeight = ({\n isWrapped,\n title,\n width,\n}: GetAccordionHeadHeightOptions): GetAccordionHeadHeightResult => {\n const element = document.createElement('div');\n\n element.style.fontSize = '1rem';\n element.style.opacity = '0';\n element.style.pointerEvents = 'none';\n element.style.whiteSpace = 'nowrap';\n element.style.width = `${width}px`;\n\n element.innerText = title;\n\n document.body.appendChild(element);\n\n const closedHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);\n\n if (isWrapped) {\n element.style.fontWeight = 'bold';\n } else {\n element.style.fontSize = '1.3rem';\n }\n\n element.style.whiteSpace = 'normal';\n\n const openHeight = Math.max(element.clientHeight + 8, isWrapped ? 40 : 33);\n\n document.body.removeChild(element);\n\n return { closed: closedHeight, open: openHeight };\n};\n"],"mappings":";;;;;;AAWO,MAAMA,sBAAsB,GAAG,QAI6B;EAAA,IAJ5B;IACnCC,SAAS;IACTC,KAAK;IACLC;EAC2B,CAAC;EAC5B,MAAMC,OAAO,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAE7CF,OAAO,CAACG,KAAK,CAACC,QAAQ,GAAG,MAAM;EAC/BJ,OAAO,CAACG,KAAK,CAACE,OAAO,GAAG,GAAG;EAC3BL,OAAO,CAACG,KAAK,CAACG,aAAa,GAAG,MAAM;EACpCN,OAAO,CAACG,KAAK,CAACI,UAAU,GAAG,QAAQ;EACnCP,OAAO,CAACG,KAAK,CAACJ,KAAK,GAAI,GAAEA,KAAM,IAAG;EAElCC,OAAO,CAACQ,SAAS,GAAGV,KAAK;EAEzBG,QAAQ,CAACQ,IAAI,CAACC,WAAW,CAACV,OAAO,CAAC;EAElC,MAAMW,YAAY,GAAGC,IAAI,CAACC,GAAG,CAACb,OAAO,CAACc,YAAY,GAAG,CAAC,EAAEjB,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC;EAE5E,IAAIA,SAAS,EAAE;IACXG,OAAO,CAACG,KAAK,CAACY,UAAU,GAAG,MAAM;EACrC,CAAC,MAAM;IACHf,OAAO,CAACG,KAAK,CAACC,QAAQ,GAAG,QAAQ;EACrC;EAEAJ,OAAO,CAACG,KAAK,CAACI,UAAU,GAAG,QAAQ;EAEnC,MAAMS,UAAU,GAAGJ,IAAI,CAACC,GAAG,CAACb,OAAO,CAACc,YAAY,GAAG,CAAC,EAAEjB,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC;EAE1EI,QAAQ,CAACQ,IAAI,CAACQ,WAAW,CAACjB,OAAO,CAAC;EAElC,OAAO;IAAEkB,MAAM,EAAEP,YAAY;IAAEQ,IAAI,EAAEH;EAAW,CAAC;AACrD,CAAC;AAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alignment.js","names":["ContextMenuAlignment"],"sources":["../../../../src/components/context-menu/constants/alignment.ts"],"sourcesContent":["export enum ContextMenuAlignment {\n TopLeft,\n BottomLeft,\n TopRight,\n BottomRight,\n TopCenter,\n BottomCenter,\n}\n"],"mappings":";;;;;;IAAYA,oBAAoB;AAAA;AAAA,WAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,oCAApBA,oBAAoB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getStackSizeFactor = void 0;
|
|
7
|
-
const getStackSizeFactor = icon => {
|
|
8
|
-
var _icon$match;
|
|
9
|
-
const sizeFactorString = (_icon$match = icon.match(/fa-stack-([\d])x/)) === null || _icon$match === void 0 ? void 0 : _icon$match[1];
|
|
10
|
-
return typeof sizeFactorString === 'string' ? parseInt(sizeFactorString, 10) : undefined;
|
|
11
|
-
};
|
|
12
|
-
exports.getStackSizeFactor = getStackSizeFactor;
|
|
13
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["getStackSizeFactor","icon","sizeFactorString","match","parseInt","undefined"],"sources":["../../../src/components/icon/utils.ts"],"sourcesContent":["export const getStackSizeFactor = (icon: string) => {\n const sizeFactorString = icon.match(/fa-stack-([\\d])x/)?.[1];\n\n return typeof sizeFactorString === 'string' ? parseInt(sizeFactorString, 10) : undefined;\n};\n"],"mappings":";;;;;;AAAO,MAAMA,kBAAkB,GAAIC,IAAY,IAAK;EAAA;EAChD,MAAMC,gBAAgB,kBAAGD,IAAI,CAACE,KAAK,CAAC,kBAAkB,CAAC,gDAA9B,YAAiC,CAAC,CAAC;EAE5D,OAAO,OAAOD,gBAAgB,KAAK,QAAQ,GAAGE,QAAQ,CAACF,gBAAgB,EAAE,EAAE,CAAC,GAAGG,SAAS;AAC5F,CAAC;AAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|