@ilo-org/react 0.0.18 → 0.1.0
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/CHANGELOG.md +16 -0
- package/lib/cjs/AccordionCtx-fe08ff45.js +9 -0
- package/lib/cjs/Callout.args-bcd5a9f1.js +17 -0
- package/lib/cjs/DailyMotion-97d1831a.js +260 -0
- package/lib/cjs/Facebook-ccb27d1d.js +240 -0
- package/lib/cjs/FilePlayer-81b9fc3f.js +597 -0
- package/lib/cjs/GlobalCtx-97e4b433.js +9 -0
- package/lib/cjs/Kaltura-d6c19814.js +236 -0
- package/lib/cjs/ListCtx-7db7fe04.js +9 -0
- package/lib/cjs/Mixcloud-f02a460e.js +223 -0
- package/lib/cjs/Preview-8238ea6e.js +227 -0
- package/lib/cjs/SoundCloud-cd1b1590.js +250 -0
- package/lib/cjs/Streamable-f47da42a.js +235 -0
- package/lib/cjs/TagCtx-929c7753.js +7 -0
- package/lib/cjs/Twitch-c503e140.js +245 -0
- package/lib/cjs/Vidyard-d9c2f073.js +238 -0
- package/lib/cjs/Vimeo-009601ef.js +286 -0
- package/lib/cjs/Wistia-8c9f4c58.js +289 -0
- package/lib/cjs/YouTube-ec5847d4.js +378 -0
- package/lib/cjs/_commonjsHelpers-9f9f50a8.js +39 -0
- package/lib/cjs/components/Accordion/Accordion.js +47 -0
- package/lib/cjs/components/Accordion/AccordionButton.js +34 -0
- package/lib/cjs/components/Accordion/AccordionItem.js +21 -0
- package/lib/cjs/components/Accordion/AccordionPanel.js +30 -0
- package/lib/cjs/components/Accordion/index.js +22 -0
- package/lib/cjs/components/Button/Button.js +36 -0
- package/lib/cjs/components/Button/index.js +39 -0
- package/lib/cjs/components/Callout/Callout.js +47 -0
- package/lib/cjs/components/Callout/index.js +19 -0
- package/lib/cjs/components/Checkbox/Checkbox.js +34 -0
- package/lib/cjs/components/Checkbox/index.js +17 -0
- package/lib/cjs/components/ChoiceGroup/ChoiceGroup.js +34 -0
- package/lib/cjs/components/ChoiceGroup/index.js +19 -0
- package/lib/cjs/components/Collapse/Collapse.js +725 -0
- package/lib/cjs/components/Collapse/index.js +18 -0
- package/lib/cjs/components/ContextMenu/ContextMenu.js +20 -0
- package/lib/cjs/components/ContextMenu/index.js +13 -0
- package/lib/cjs/components/Credit/Credit.js +33 -0
- package/lib/cjs/components/Credit/index.js +13 -0
- package/lib/cjs/components/DatePicker/DatePicker.js +32 -0
- package/lib/cjs/components/DatePicker/index.js +17 -0
- package/lib/cjs/components/Dropdown/Dropdown.js +35 -0
- package/lib/cjs/components/Dropdown/index.js +17 -0
- package/lib/cjs/components/Empty/Empty.js +19 -0
- package/lib/cjs/components/Empty/index.js +13 -0
- package/lib/cjs/components/Fieldset/Fieldset.js +24 -0
- package/lib/cjs/components/Fieldset/index.js +15 -0
- package/lib/cjs/components/FileUpload/FileUpload.js +35 -0
- package/lib/cjs/components/FileUpload/index.js +17 -0
- package/lib/cjs/components/Form/Form.js +66 -0
- package/lib/cjs/components/Form/index.js +31 -0
- package/lib/cjs/components/FormElement/FormElement.js +19 -0
- package/lib/cjs/components/FormElement/index.js +8 -0
- package/lib/cjs/components/FormGroup/FormGroup.js +58 -0
- package/lib/cjs/components/FormGroup/index.js +26 -0
- package/lib/cjs/components/GlobalProvider/GlobalProvider.js +18 -0
- package/lib/cjs/components/GlobalProvider/index.js +11 -0
- package/lib/cjs/components/Heading/Heading.js +22 -0
- package/lib/cjs/components/Heading/index.js +13 -0
- package/lib/cjs/components/Hero/Hero.js +25 -0
- package/lib/cjs/components/Hero/HeroCard.js +25 -0
- package/lib/cjs/components/Hero/index.js +17 -0
- package/lib/cjs/components/Icon/Icon.js +43 -0
- package/lib/cjs/components/Icon/index.js +13 -0
- package/lib/cjs/components/Image/Image.js +31 -0
- package/lib/cjs/components/Image/index.js +14 -0
- package/lib/cjs/components/Input/Input.js +32 -0
- package/lib/cjs/components/Input/index.js +17 -0
- package/lib/cjs/components/Link/Link.js +23 -0
- package/lib/cjs/components/Link/index.js +13 -0
- package/lib/cjs/components/LinkList/LinkList.js +22 -0
- package/lib/cjs/components/LinkList/index.js +13 -0
- package/lib/cjs/components/List/List.js +25 -0
- package/lib/cjs/components/List/ListItem.js +21 -0
- package/lib/cjs/components/List/index.js +16 -0
- package/lib/cjs/components/Loading/Loading.js +21 -0
- package/lib/cjs/components/Loading/index.js +13 -0
- package/lib/cjs/components/Notification/Notification.js +41 -0
- package/lib/cjs/components/Notification/index.js +17 -0
- package/lib/cjs/components/NumberPicker/NumberPicker.js +32 -0
- package/lib/cjs/components/NumberPicker/index.js +17 -0
- package/lib/cjs/components/Pagination/Pagination.js +49 -0
- package/lib/cjs/components/Pagination/index.js +13 -0
- package/lib/cjs/components/Profile/Profile.js +19 -0
- package/lib/cjs/components/Profile/index.js +13 -0
- package/lib/cjs/components/Radio/Radio.js +29 -0
- package/lib/cjs/components/Radio/index.js +14 -0
- package/lib/cjs/components/ReadMore/ReadMore.js +38 -0
- package/lib/cjs/components/ReadMore/index.js +14 -0
- package/lib/cjs/components/RichText/RichText.js +19 -0
- package/lib/cjs/components/RichText/index.js +13 -0
- package/lib/cjs/components/SearchField/SearchField.js +38 -0
- package/lib/cjs/components/SearchField/index.js +18 -0
- package/lib/cjs/components/TableOfContents/TableOfContents.js +22 -0
- package/lib/cjs/components/TableOfContents/index.js +13 -0
- package/lib/cjs/components/Tag/Tag.js +54 -0
- package/lib/cjs/components/Tag/TagSet.js +46 -0
- package/lib/cjs/components/Tag/index.js +20 -0
- package/lib/cjs/components/Textarea/Textarea.js +32 -0
- package/lib/cjs/components/Textarea/index.js +17 -0
- package/lib/cjs/components/Tooltip/Tooltip.js +103 -0
- package/lib/cjs/components/Tooltip/index.js +14 -0
- package/lib/cjs/components/Video/Video.js +29 -0
- package/lib/cjs/components/Video/VideoPlayer.js +1452 -0
- package/lib/cjs/components/Video/index.js +20 -0
- package/lib/cjs/components/index.js +115 -0
- package/lib/cjs/css-9c93400b.js +81 -0
- package/lib/cjs/hooks/index.js +13 -0
- package/lib/cjs/hooks/useGlobalSettings.js +13 -0
- package/lib/cjs/hooks/useVideoPlayer.js +75 -0
- package/lib/cjs/index-1b6434f0.js +1191 -0
- package/lib/cjs/index.js +115 -0
- package/lib/cjs/patterns-b55db71f.js +579 -0
- package/lib/cjs/utils/checkArrayDuplicates.js +7 -0
- package/lib/cjs/utils/createChainedFunction.js +30 -0
- package/lib/cjs/utils/getDefaultDimensionValue.js +22 -0
- package/lib/cjs/utils/hoursMinutesSeconds.js +12 -0
- package/lib/cjs/utils/index.js +18 -0
- package/lib/cjs/utils/transitionEndListener.js +161 -0
- package/lib/cjs/utils/triggerBrowserReflow.js +8 -0
- package/lib/esm/AccordionCtx-8c051900.js +6 -0
- package/lib/esm/Callout.args-3a0e0416.js +15 -0
- package/lib/esm/DailyMotion-b35dc8bb.js +258 -0
- package/lib/esm/Facebook-c3c77787.js +238 -0
- package/lib/esm/FilePlayer-540e4c5a.js +595 -0
- package/lib/esm/GlobalCtx-7fb23cfa.js +7 -0
- package/lib/esm/Kaltura-4ac3cda3.js +234 -0
- package/lib/esm/ListCtx-da435fdf.js +6 -0
- package/lib/esm/Mixcloud-3d4e0760.js +221 -0
- package/lib/esm/Preview-6d2a6792.js +225 -0
- package/lib/esm/SoundCloud-306d6c78.js +248 -0
- package/lib/esm/Streamable-aa3d544e.js +233 -0
- package/lib/esm/TagCtx-34c545fe.js +5 -0
- package/lib/esm/Twitch-4a1a1565.js +243 -0
- package/lib/esm/Vidyard-fe74c274.js +236 -0
- package/lib/esm/Vimeo-074f2c39.js +284 -0
- package/lib/esm/Wistia-0a2b73b0.js +287 -0
- package/lib/esm/YouTube-d58f130b.js +376 -0
- package/lib/esm/_commonjsHelpers-849bcf65.js +35 -0
- package/lib/esm/components/Accordion/Accordion.js +45 -0
- package/lib/esm/components/Accordion/AccordionButton.js +32 -0
- package/lib/esm/components/Accordion/AccordionItem.js +19 -0
- package/lib/esm/components/Accordion/AccordionPanel.js +28 -0
- package/lib/esm/components/Accordion/index.js +13 -0
- package/lib/esm/components/Button/Button.js +34 -0
- package/lib/esm/components/Button/index.js +36 -0
- package/lib/esm/components/Callout/Callout.js +45 -0
- package/lib/esm/components/Callout/index.js +12 -0
- package/lib/esm/components/Checkbox/Checkbox.js +32 -0
- package/lib/esm/components/Checkbox/index.js +11 -0
- package/lib/esm/components/ChoiceGroup/ChoiceGroup.js +32 -0
- package/lib/esm/components/ChoiceGroup/index.js +13 -0
- package/lib/esm/components/Collapse/Collapse.js +723 -0
- package/lib/esm/components/Collapse/index.js +12 -0
- package/lib/esm/components/ContextMenu/ContextMenu.js +18 -0
- package/lib/esm/components/ContextMenu/index.js +7 -0
- package/lib/esm/components/Credit/Credit.js +31 -0
- package/lib/esm/components/Credit/index.js +7 -0
- package/lib/esm/components/DatePicker/DatePicker.js +30 -0
- package/lib/esm/components/DatePicker/index.js +11 -0
- package/lib/esm/components/Dropdown/Dropdown.js +33 -0
- package/lib/esm/components/Dropdown/index.js +11 -0
- package/lib/esm/components/Empty/Empty.js +17 -0
- package/lib/esm/components/Empty/index.js +7 -0
- package/lib/esm/components/Fieldset/Fieldset.js +22 -0
- package/lib/esm/components/Fieldset/index.js +9 -0
- package/lib/esm/components/FileUpload/FileUpload.js +33 -0
- package/lib/esm/components/FileUpload/index.js +11 -0
- package/lib/esm/components/Form/Form.js +64 -0
- package/lib/esm/components/Form/index.js +25 -0
- package/lib/esm/components/FormElement/FormElement.js +17 -0
- package/lib/esm/components/FormElement/index.js +2 -0
- package/lib/esm/components/FormGroup/FormGroup.js +56 -0
- package/lib/esm/components/FormGroup/index.js +20 -0
- package/lib/esm/components/GlobalProvider/GlobalProvider.js +16 -0
- package/lib/esm/components/GlobalProvider/index.js +4 -0
- package/lib/esm/components/Heading/Heading.js +20 -0
- package/lib/esm/components/Heading/index.js +7 -0
- package/lib/esm/components/Hero/Hero.js +23 -0
- package/lib/esm/components/Hero/HeroCard.js +23 -0
- package/lib/esm/components/Hero/index.js +10 -0
- package/lib/esm/components/Icon/Icon.js +22 -0
- package/lib/esm/components/Icon/index.js +7 -0
- package/lib/esm/components/Image/Image.js +29 -0
- package/lib/esm/components/Image/index.js +8 -0
- package/lib/esm/components/Input/Input.js +30 -0
- package/lib/esm/components/Input/index.js +11 -0
- package/lib/esm/components/Link/Link.js +21 -0
- package/lib/esm/components/Link/index.js +7 -0
- package/lib/esm/components/LinkList/LinkList.js +20 -0
- package/lib/esm/components/LinkList/index.js +7 -0
- package/lib/esm/components/List/List.js +23 -0
- package/lib/esm/components/List/ListItem.js +19 -0
- package/lib/esm/components/List/index.js +9 -0
- package/lib/esm/components/Loading/Loading.js +19 -0
- package/lib/esm/components/Loading/index.js +7 -0
- package/lib/esm/components/Notification/Notification.js +39 -0
- package/lib/esm/components/Notification/index.js +11 -0
- package/lib/esm/components/NumberPicker/NumberPicker.js +30 -0
- package/lib/esm/components/NumberPicker/index.js +11 -0
- package/lib/esm/components/Pagination/Pagination.js +47 -0
- package/lib/esm/components/Pagination/index.js +7 -0
- package/lib/esm/components/Profile/Profile.js +17 -0
- package/lib/esm/components/Profile/index.js +7 -0
- package/lib/esm/components/Radio/Radio.js +27 -0
- package/lib/esm/components/Radio/index.js +8 -0
- package/lib/esm/components/ReadMore/ReadMore.js +36 -0
- package/lib/esm/components/ReadMore/index.js +8 -0
- package/lib/esm/components/RichText/RichText.js +17 -0
- package/lib/esm/components/RichText/index.js +7 -0
- package/lib/esm/components/SearchField/SearchField.js +36 -0
- package/lib/esm/components/SearchField/index.js +12 -0
- package/lib/esm/components/TableOfContents/TableOfContents.js +20 -0
- package/lib/esm/components/TableOfContents/index.js +7 -0
- package/lib/esm/components/Tag/Tag.js +52 -0
- package/lib/esm/components/Tag/TagSet.js +44 -0
- package/lib/esm/components/Tag/index.js +13 -0
- package/lib/esm/components/Textarea/Textarea.js +30 -0
- package/lib/esm/components/Textarea/index.js +11 -0
- package/lib/esm/components/Tooltip/Tooltip.js +101 -0
- package/lib/esm/components/Tooltip/index.js +8 -0
- package/lib/esm/components/Video/Video.js +27 -0
- package/lib/esm/components/Video/VideoPlayer.js +1450 -0
- package/lib/esm/components/Video/index.js +14 -0
- package/lib/esm/components/index.js +68 -0
- package/lib/esm/css-7414f50b.js +79 -0
- package/lib/esm/hooks/index.js +6 -0
- package/lib/esm/hooks/useGlobalSettings.js +11 -0
- package/lib/esm/hooks/useVideoPlayer.js +73 -0
- package/lib/esm/index-8ebb2cc1.js +1191 -0
- package/lib/esm/index.js +68 -0
- package/lib/esm/patterns-3a3fa9d6.js +575 -0
- package/lib/esm/utils/checkArrayDuplicates.js +5 -0
- package/lib/esm/utils/createChainedFunction.js +28 -0
- package/lib/esm/utils/getDefaultDimensionValue.js +20 -0
- package/lib/esm/utils/hoursMinutesSeconds.js +10 -0
- package/lib/esm/utils/index.js +7 -0
- package/lib/esm/utils/transitionEndListener.js +159 -0
- package/lib/esm/utils/triggerBrowserReflow.js +6 -0
- package/lib/types/react/src/components/Accordion/Accordion.d.ts +4 -0
- package/lib/types/react/src/components/Accordion/Accordion.props.d.ts +33 -0
- package/lib/types/react/src/components/Accordion/AccordionButton.d.ts +4 -0
- package/lib/types/react/src/components/Accordion/AccordionButton.props.d.ts +11 -0
- package/lib/types/react/src/components/Accordion/AccordionCtx.d.ts +4 -0
- package/lib/types/react/src/components/Accordion/AccordionItem.d.ts +4 -0
- package/lib/types/react/src/components/Accordion/AccordionItem.props.d.ts +21 -0
- package/lib/types/react/src/components/Accordion/AccordionPanel.d.ts +4 -0
- package/lib/types/react/src/components/Accordion/AccordionPanel.props.d.ts +17 -0
- package/lib/types/react/src/components/Accordion/index.d.ts +4 -0
- package/lib/types/react/src/components/Button/Button.args.d.ts +11 -0
- package/lib/types/react/src/components/Button/Button.d.ts +4 -0
- package/lib/types/react/src/components/Button/Button.props.d.ts +64 -0
- package/lib/types/react/src/components/Button/index.d.ts +2 -0
- package/lib/types/react/src/components/Callout/Callout.args.d.ts +8 -0
- package/lib/types/react/src/components/Callout/Callout.d.ts +4 -0
- package/lib/types/react/src/components/Callout/Callout.props.d.ts +50 -0
- package/lib/types/react/src/components/Callout/index.d.ts +2 -0
- package/lib/types/react/src/components/Checkbox/Checkbox.d.ts +4 -0
- package/lib/types/react/src/components/Checkbox/Checkbox.props.d.ts +13 -0
- package/lib/types/react/src/components/Checkbox/index.d.ts +1 -0
- package/lib/types/react/src/components/ChoiceGroup/ChoiceGroup.d.ts +4 -0
- package/lib/types/react/src/components/ChoiceGroup/ChoiceGroup.props.d.ts +20 -0
- package/lib/types/react/src/components/ChoiceGroup/index.d.ts +1 -0
- package/lib/types/react/src/components/Collapse/Collapse.d.ts +3 -0
- package/lib/types/react/src/components/Collapse/Collapse.props.d.ts +76 -0
- package/lib/types/react/src/components/Collapse/index.d.ts +1 -0
- package/lib/types/react/src/components/ContextMenu/ContextMenu.d.ts +4 -0
- package/lib/types/react/src/components/ContextMenu/ContextMenu.props.d.ts +25 -0
- package/lib/types/react/src/components/ContextMenu/index.d.ts +1 -0
- package/lib/types/react/src/components/Credit/Credit.d.ts +4 -0
- package/lib/types/react/src/components/Credit/Credit.props.d.ts +10 -0
- package/lib/types/react/src/components/Credit/index.d.ts +1 -0
- package/lib/types/react/src/components/DatePicker/DatePicker.d.ts +4 -0
- package/lib/types/react/src/components/DatePicker/DatePicker.props.d.ts +54 -0
- package/lib/types/react/src/components/DatePicker/index.d.ts +1 -0
- package/lib/types/react/src/components/Dropdown/Dropdown.d.ts +4 -0
- package/lib/types/react/src/components/Dropdown/Dropdown.props.d.ts +69 -0
- package/lib/types/react/src/components/Dropdown/index.d.ts +1 -0
- package/lib/types/react/src/components/Empty/Empty.d.ts +4 -0
- package/lib/types/react/src/components/Empty/Empty.props.d.ts +11 -0
- package/lib/types/react/src/components/Empty/index.d.ts +1 -0
- package/lib/types/react/src/components/Fieldset/Fieldset.d.ts +4 -0
- package/lib/types/react/src/components/Fieldset/Fieldset.props.d.ts +35 -0
- package/lib/types/react/src/components/Fieldset/index.d.ts +1 -0
- package/lib/types/react/src/components/FileUpload/FileUpload.d.ts +4 -0
- package/lib/types/react/src/components/FileUpload/FileUpload.props.d.ts +50 -0
- package/lib/types/react/src/components/FileUpload/index.d.ts +1 -0
- package/lib/types/react/src/components/Form/Form.d.ts +4 -0
- package/lib/types/react/src/components/Form/Form.props.d.ts +114 -0
- package/lib/types/react/src/components/Form/index.d.ts +1 -0
- package/lib/types/react/src/components/FormElement/FormElement.d.ts +4 -0
- package/lib/types/react/src/components/FormElement/FormElement.props.d.ts +47 -0
- package/lib/types/react/src/components/FormElement/index.d.ts +1 -0
- package/lib/types/react/src/components/FormGroup/FormGroup.d.ts +4 -0
- package/lib/types/react/src/components/FormGroup/FormGroup.props.d.ts +81 -0
- package/lib/types/react/src/components/FormGroup/index.d.ts +1 -0
- package/lib/types/react/src/components/GlobalProvider/GlobalCtx.d.ts +2 -0
- package/lib/types/react/src/components/GlobalProvider/GlobalProvider.d.ts +4 -0
- package/lib/types/react/src/components/GlobalProvider/GlobalProvider.props.d.ts +13 -0
- package/lib/types/react/src/components/GlobalProvider/index.d.ts +2 -0
- package/lib/types/react/src/components/Heading/Heading.d.ts +4 -0
- package/lib/types/react/src/components/Heading/Heading.props.d.ts +20 -0
- package/lib/types/react/src/components/Heading/index.d.ts +1 -0
- package/lib/types/react/src/components/Hero/Hero.d.ts +4 -0
- package/lib/types/react/src/components/Hero/Hero.props.d.ts +25 -0
- package/lib/types/react/src/components/Hero/HeroCard.d.ts +4 -0
- package/lib/types/react/src/components/Hero/HeroCard.props.d.ts +54 -0
- package/lib/types/react/src/components/Hero/index.d.ts +2 -0
- package/lib/types/react/src/components/Icon/Icon.d.ts +4 -0
- package/lib/types/react/src/components/Icon/Icon.props.d.ts +14 -0
- package/lib/types/react/src/components/Icon/index.d.ts +1 -0
- package/lib/types/react/src/components/Image/Image.d.ts +4 -0
- package/lib/types/react/src/components/Image/Image.props.d.ts +33 -0
- package/lib/types/react/src/components/Image/index.d.ts +1 -0
- package/lib/types/react/src/components/Input/Input.d.ts +4 -0
- package/lib/types/react/src/components/Input/Input.props.d.ts +51 -0
- package/lib/types/react/src/components/Input/index.d.ts +1 -0
- package/lib/types/react/src/components/Link/Link.d.ts +4 -0
- package/lib/types/react/src/components/Link/Link.props.d.ts +32 -0
- package/lib/types/react/src/components/Link/index.d.ts +1 -0
- package/lib/types/react/src/components/LinkList/LinkList.d.ts +4 -0
- package/lib/types/react/src/components/LinkList/LinkList.props.d.ts +44 -0
- package/lib/types/react/src/components/LinkList/index.d.ts +1 -0
- package/lib/types/react/src/components/List/List.d.ts +4 -0
- package/lib/types/react/src/components/List/List.props.d.ts +31 -0
- package/lib/types/react/src/components/List/ListCtx.d.ts +4 -0
- package/lib/types/react/src/components/List/ListItem.d.ts +4 -0
- package/lib/types/react/src/components/List/ListItem.props.d.ts +21 -0
- package/lib/types/react/src/components/List/index.d.ts +2 -0
- package/lib/types/react/src/components/Loading/Loading.d.ts +4 -0
- package/lib/types/react/src/components/Loading/Loading.props.d.ts +19 -0
- package/lib/types/react/src/components/Loading/index.d.ts +1 -0
- package/lib/types/react/src/components/Notification/Notification.d.ts +4 -0
- package/lib/types/react/src/components/Notification/Notification.props.d.ts +56 -0
- package/lib/types/react/src/components/Notification/index.d.ts +1 -0
- package/lib/types/react/src/components/NumberPicker/NumberPicker.d.ts +4 -0
- package/lib/types/react/src/components/NumberPicker/NumberPicker.props.d.ts +46 -0
- package/lib/types/react/src/components/NumberPicker/index.d.ts +1 -0
- package/lib/types/react/src/components/Pagination/Pagination.d.ts +4 -0
- package/lib/types/react/src/components/Pagination/Pagination.props.d.ts +54 -0
- package/lib/types/react/src/components/Pagination/index.d.ts +1 -0
- package/lib/types/react/src/components/Profile/Profile.d.ts +4 -0
- package/lib/types/react/src/components/Profile/Profile.props.d.ts +37 -0
- package/lib/types/react/src/components/Profile/index.d.ts +1 -0
- package/lib/types/react/src/components/Radio/Radio.d.ts +4 -0
- package/lib/types/react/src/components/Radio/Radio.props.d.ts +14 -0
- package/lib/types/react/src/components/Radio/index.d.ts +1 -0
- package/lib/types/react/src/components/ReadMore/ReadMore.d.ts +4 -0
- package/lib/types/react/src/components/ReadMore/ReadMore.props.d.ts +32 -0
- package/lib/types/react/src/components/ReadMore/index.d.ts +1 -0
- package/lib/types/react/src/components/RichText/RichText.d.ts +4 -0
- package/lib/types/react/src/components/RichText/RichText.props.d.ts +10 -0
- package/lib/types/react/src/components/RichText/index.d.ts +1 -0
- package/lib/types/react/src/components/SearchField/SearchField.d.ts +4 -0
- package/lib/types/react/src/components/SearchField/SearchField.props.d.ts +29 -0
- package/lib/types/react/src/components/SearchField/index.d.ts +1 -0
- package/lib/types/react/src/components/TableOfContents/TableOfContents.d.ts +4 -0
- package/lib/types/react/src/components/TableOfContents/TableOfContents.props.d.ts +20 -0
- package/lib/types/react/src/components/TableOfContents/index.d.ts +1 -0
- package/lib/types/react/src/components/Tag/Tag.d.ts +4 -0
- package/lib/types/react/src/components/Tag/Tag.props.d.ts +28 -0
- package/lib/types/react/src/components/Tag/TagCtx.d.ts +2 -0
- package/lib/types/react/src/components/Tag/TagSet.d.ts +4 -0
- package/lib/types/react/src/components/Tag/TagSet.props.d.ts +30 -0
- package/lib/types/react/src/components/Tag/index.d.ts +2 -0
- package/lib/types/react/src/components/Textarea/Textarea.d.ts +4 -0
- package/lib/types/react/src/components/Textarea/Textarea.props.d.ts +59 -0
- package/lib/types/react/src/components/Textarea/index.d.ts +1 -0
- package/lib/types/react/src/components/Tooltip/Tooltip.d.ts +4 -0
- package/lib/types/react/src/components/Tooltip/Tooltip.props.d.ts +35 -0
- package/lib/types/react/src/components/Tooltip/index.d.ts +1 -0
- package/lib/types/react/src/components/Video/Video.d.ts +4 -0
- package/lib/types/react/src/components/Video/Video.props.d.ts +66 -0
- package/lib/types/react/src/components/Video/VideoPlayer.d.ts +4 -0
- package/lib/types/react/src/components/Video/VideoPlayer.props.d.ts +67 -0
- package/lib/types/react/src/components/Video/index.d.ts +1 -0
- package/lib/types/react/src/components/index.d.ts +39 -0
- package/lib/types/react/src/hooks/index.d.ts +2 -0
- package/lib/types/react/src/hooks/useGlobalSettings.d.ts +4 -0
- package/lib/types/react/src/hooks/useVideoPlayer.d.ts +12 -0
- package/lib/types/react/src/index.d.ts +1 -0
- package/lib/types/react/src/types/index.d.ts +26 -0
- package/lib/types/react/src/utils/checkArrayDuplicates.d.ts +1 -0
- package/lib/types/react/src/utils/createChainedFunction.d.ts +11 -0
- package/lib/types/react/src/utils/getDefaultDimensionValue.d.ts +3 -0
- package/lib/types/react/src/utils/hoursMinutesSeconds.d.ts +1 -0
- package/lib/types/react/src/utils/index.d.ts +6 -0
- package/lib/types/react/src/utils/transitionEndListener.d.ts +1 -0
- package/lib/types/react/src/utils/triggerBrowserReflow.d.ts +1 -0
- package/package.json +115 -77
- package/public/hero.jpg +0 -0
- package/public/ilo-dg.jpg +0 -0
- package/public/ilo-headquarters.jpg +0 -0
- package/public/large.jpg +0 -0
- package/public/media-file-poster.jpg +0 -0
- package/public/medium.jpg +0 -0
- package/public/small.jpg +0 -0
- package/public/video-example.mp4 +0 -0
- package/public/youtube-video-poster.avif +0 -0
- package/rollup.config.mjs +70 -0
- package/src/components/Accordion/Accordion.args.ts +1 -1
- package/src/components/Accordion/{Accordion.props.d.ts → Accordion.props.ts} +6 -4
- package/src/components/Accordion/Accordion.tsx +4 -12
- package/src/components/Accordion/{AccordionButton.props.d.ts → AccordionButton.props.ts} +0 -0
- package/src/components/Accordion/AccordionButton.tsx +2 -4
- package/src/components/Accordion/AccordionCtx.ts +9 -0
- package/src/components/Accordion/{AccordionItem.props.d.ts → AccordionItem.props.ts} +0 -0
- package/src/components/Accordion/AccordionItem.tsx +3 -9
- package/src/components/Accordion/{AccordionPanel.props.d.ts → AccordionPanel.props.ts} +0 -0
- package/src/components/Accordion/AccordionPanel.tsx +2 -3
- package/src/components/Accordion/index.ts +0 -0
- package/src/components/Button/Button.args.ts +12 -467
- package/src/components/Button/{Button.props.d.ts → Button.props.ts} +17 -7
- package/src/components/Button/Button.tsx +9 -1
- package/src/components/Button/index.ts +1 -0
- package/src/components/Callout/Callout.args.ts +17 -43
- package/src/components/Callout/{Callout.props.d.ts → Callout.props.ts} +2 -3
- package/src/components/Callout/Callout.tsx +4 -4
- package/src/components/Callout/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.args.ts +1 -3
- package/src/components/Checkbox/Checkbox.props.ts +13 -0
- package/src/components/Checkbox/Checkbox.tsx +1 -1
- package/src/components/ChoiceGroup/ChoiceGroup.args.ts +15 -12
- package/src/components/ChoiceGroup/ChoiceGroup.props.ts +25 -0
- package/src/components/ChoiceGroup/ChoiceGroup.tsx +1 -1
- package/src/components/Collapse/{Collapse.props.d.ts → Collapse.props.ts} +0 -0
- package/src/components/Collapse/Collapse.tsx +4 -4
- package/src/components/ContextMenu/ContextMenu.args.ts +10 -10
- package/src/components/ContextMenu/{ContextMenu.props.d.ts → ContextMenu.props.ts} +0 -0
- package/src/components/Credit/{Credit.props.d.ts → Credit.props.ts} +0 -0
- package/src/components/DatePicker/DatePicker.args.ts +6 -6
- package/src/components/DatePicker/{DatePicker.props.d.ts → DatePicker.props.ts} +1 -3
- package/src/components/DatePicker/DatePicker.tsx +4 -4
- package/src/components/Dropdown/Dropdown.args.ts +5 -5
- package/src/components/Dropdown/{Dropdown.props.d.ts → Dropdown.props.ts} +1 -1
- package/src/components/Dropdown/Dropdown.tsx +1 -1
- package/src/components/Empty/{Empty.props.d.ts → Empty.props.ts} +7 -0
- package/src/components/Empty/Empty.tsx +2 -2
- package/src/components/Fieldset/{Fieldset.props.d.ts → Fieldset.props.ts} +10 -3
- package/src/components/Fieldset/Fieldset.tsx +4 -4
- package/src/components/FileUpload/FileUpload.args.ts +4 -4
- package/src/components/FileUpload/{FileUpload.props.d.ts → FileUpload.props.ts} +1 -3
- package/src/components/FileUpload/FileUpload.tsx +1 -1
- package/src/components/Form/Form.args.ts +4 -82
- package/src/components/Form/Form.props.ts +137 -0
- package/src/components/FormElement/{FormElement.props.d.ts → FormElement.props.ts} +12 -5
- package/src/components/FormElement/FormElement.tsx +9 -16
- package/src/components/FormGroup/FormGroup.args.ts +2 -1
- package/src/components/FormGroup/FormGroup.props.ts +102 -0
- package/src/components/GlobalProvider/GlobalCtx.ts +6 -0
- package/src/components/GlobalProvider/{GlobalProvider.props.d.ts → GlobalProvider.props.ts} +1 -1
- package/src/components/GlobalProvider/GlobalProvider.tsx +3 -9
- package/src/components/GlobalProvider/index.ts +2 -0
- package/src/components/Heading/Heading.args.ts +9 -6
- package/src/components/Heading/{Heading.props.d.ts → Heading.props.ts} +3 -3
- package/src/components/Hero/Hero.args.ts +14 -14
- package/src/components/Hero/{Hero.props.d.ts → Hero.props.ts} +7 -6
- package/src/components/Hero/Hero.tsx +1 -1
- package/src/components/Hero/{HeroCard.props.d.ts → HeroCard.props.ts} +6 -6
- package/src/components/Icon/{Icon.props.d.ts → Icon.props.ts} +1 -1
- package/src/components/Image/Image.args.ts +9 -15
- package/src/components/Image/{Image.props.d.ts → Image.props.ts} +0 -0
- package/src/components/Input/Input.args.ts +10 -10
- package/src/components/Input/{Input.props.d.ts → Input.props.ts} +3 -3
- package/src/components/Input/Input.tsx +1 -1
- package/src/components/Link/{Link.props.d.ts → Link.props.ts} +8 -3
- package/src/components/Link/Link.tsx +3 -10
- package/src/components/LinkList/{LinkList.props.d.ts → LinkList.props.ts} +2 -2
- package/src/components/List/List.args.ts +0 -4
- package/src/components/List/{List.props.d.ts → List.props.ts} +9 -8
- package/src/components/List/List.tsx +3 -4
- package/src/components/List/ListCtx.ts +7 -0
- package/src/components/List/{ListItem.props.d.ts → ListItem.props.ts} +0 -0
- package/src/components/List/ListItem.tsx +3 -4
- package/src/components/Loading/{Loading.props.d.ts → Loading.props.ts} +3 -3
- package/src/components/Notification/{Notification.props.d.ts → Notification.props.ts} +3 -3
- package/src/components/Notification/Notification.tsx +1 -1
- package/src/components/NumberPicker/NumberPicker.args.ts +4 -4
- package/src/components/NumberPicker/{NumberPicker.props.d.ts → NumberPicker.props.ts} +1 -1
- package/src/components/NumberPicker/NumberPicker.tsx +1 -1
- package/src/components/Pagination/Pagination.args.ts +2 -2
- package/src/components/Pagination/{Pagination.props.d.ts → Pagination.props.ts} +1 -1
- package/src/components/Profile/Profile.args.ts +16 -16
- package/src/components/Profile/{Profile.props.d.ts → Profile.props.ts} +0 -0
- package/src/components/Radio/Radio.args.ts +3 -4
- package/src/components/Radio/Radio.props.ts +14 -0
- package/src/components/Radio/Radio.tsx +1 -1
- package/src/components/ReadMore/ReadMore.args.ts +23 -0
- package/src/components/ReadMore/{ReadMore.props.d.ts → ReadMore.props.ts} +2 -2
- package/src/components/RichText/{RichText.props.d.ts → RichText.props.ts} +1 -1
- package/src/components/RichText/richText.args.ts +25 -2
- package/src/components/SearchField/SearchField.args.ts +8 -8
- package/src/components/SearchField/{SearchField.props.d.ts → SearchField.props.ts} +3 -3
- package/src/components/SearchField/SearchField.tsx +26 -19
- package/src/components/TableOfContents/{TableOfContents.props.d.ts → TableOfContents.props.ts} +0 -0
- package/src/components/Tag/{Tag.props.d.ts → Tag.props.ts} +4 -4
- package/src/components/Tag/Tag.tsx +8 -3
- package/src/components/Tag/TagCtx.ts +4 -0
- package/src/components/Tag/TagSet.args.ts +0 -2
- package/src/components/Tag/{TagSet.props.d.ts → TagSet.props.ts} +5 -4
- package/src/components/Tag/TagSet.tsx +3 -13
- package/src/components/Textarea/Textarea.args.ts +0 -10
- package/src/components/Textarea/{Textarea.props.d.ts → Textarea.props.ts} +5 -3
- package/src/components/Textarea/Textarea.tsx +1 -1
- package/src/components/Tooltip/Tooltip.args.ts +4 -8
- package/src/components/Tooltip/{Tooltip.props.d.ts → Tooltip.props.ts} +4 -9
- package/src/components/Tooltip/Tooltip.tsx +3 -2
- package/src/components/Video/Video.args.ts +16 -44
- package/src/components/Video/{Video.props.d.ts → Video.props.ts} +8 -13
- package/src/components/Video/Video.tsx +2 -2
- package/src/components/Video/{VideoPlayer.props.d.ts → VideoPlayer.props.ts} +7 -5
- package/src/components/Video/VideoPlayer.tsx +2 -2
- package/src/components/Video/media-file-poster.jpg +0 -0
- package/src/components/index.ts +44 -0
- package/src/hooks/index.ts +2 -0
- package/src/index.ts +1 -19
- package/src/types/index.ts +27 -26
- package/src/utils/index.ts +6 -0
- package/tsconfig.build.json +7 -3
- package/.eslintrc.js +0 -36
- package/.storybook/main.js +0 -28
- package/.storybook/manager-head.html +0 -2
- package/.storybook/manager.js +0 -6
- package/.storybook/preview.tsx +0 -40
- package/.storybook/styles.scss +0 -1
- package/.storybook/theme.js +0 -11
- package/.turbo/turbo-build.log +0 -525
- package/.turbo/turbo-check.log +0 -4
- package/.turbo/turbo-test.log +0 -889
- package/=6.4.0 +0 -115
- package/=7.21.4 +0 -21
- package/lib/index.esm.js +0 -24
- package/lib/index.esm.js.map +0 -1
- package/lib/index.js +0 -24
- package/lib/index.js.map +0 -1
- package/rollup.config.js +0 -40
- package/src/__tests__/Accordion.test.tsx +0 -52
- package/src/__tests__/Button.test.tsx +0 -60
- package/src/__tests__/Callout.test.tsx +0 -41
- package/src/__tests__/ContextMenu.test.tsx +0 -19
- package/src/__tests__/Dropdown.test.tsx +0 -38
- package/src/__tests__/Form.test.tsx +0 -34
- package/src/__tests__/Heading.test.tsx +0 -51
- package/src/__tests__/Hero.test.tsx +0 -22
- package/src/__tests__/Image.test.tsx +0 -21
- package/src/__tests__/LinkList.test.tsx +0 -17
- package/src/__tests__/List.test.tsx +0 -37
- package/src/__tests__/Loading.text.tsx +0 -33
- package/src/__tests__/Notification.test.tsx +0 -39
- package/src/__tests__/Pagination.test.tsx +0 -58
- package/src/__tests__/Profile.test.tsx +0 -48
- package/src/__tests__/ReadMore.test.tsx +0 -42
- package/src/__tests__/RichText.test.tsx +0 -16
- package/src/__tests__/SearchField.test.tsx +0 -35
- package/src/__tests__/TableOfContents.test.tsx +0 -12
- package/src/__tests__/Tag.test.tsx +0 -10
- package/src/components/Checkbox/Checkbox.props.d.ts +0 -61
- package/src/components/ChoiceGroup/ChoiceGroup.props.d.ts +0 -57
- package/src/components/Empty/Empty.args.ts +0 -14
- package/src/components/Form/Form.props.d.ts +0 -84
- package/src/components/FormGroup/FormGroup.props.d.ts +0 -71
- package/src/components/GlobalProvider/index.js +0 -4
- package/src/components/Link/Link.args.ts +0 -36
- package/src/components/Radio/Radio.props.d.ts +0 -66
- package/src/components/ReadMore/readMore.args.ts +0 -35
- package/src/setup.ts +0 -6
- package/src/stories/Accordion.stories.tsx +0 -99
- package/src/stories/Button.stories.tsx +0 -375
- package/src/stories/Callout.stories.tsx +0 -195
- package/src/stories/ContextMenu.stories.tsx +0 -80
- package/src/stories/Dropdown.stories.tsx +0 -91
- package/src/stories/Empty.stories.tsx +0 -48
- package/src/stories/Form.stories.tsx +0 -67
- package/src/stories/Heading.stories.tsx +0 -191
- package/src/stories/Hero.stories.tsx +0 -194
- package/src/stories/Image.stories.tsx +0 -71
- package/src/stories/Introduction.stories.mdx +0 -258
- package/src/stories/Link.stories.tsx +0 -104
- package/src/stories/LinkList.stories.tsx +0 -74
- package/src/stories/List.stories.tsx +0 -255
- package/src/stories/Loading.stories.tsx +0 -103
- package/src/stories/Notification.stories.tsx +0 -176
- package/src/stories/Pagination.stories.tsx +0 -63
- package/src/stories/Profile.stories.tsx +0 -84
- package/src/stories/ReadMore.stories.tsx +0 -80
- package/src/stories/RichText.stories.tsx +0 -59
- package/src/stories/SearchField.stories.tsx +0 -87
- package/src/stories/TableOfContents.stories.tsx +0 -50
- package/src/stories/Tag.stories.tsx +0 -226
- package/src/stories/Tooltip.stories.tsx +0 -92
- package/src/stories/Video.stories.tsx +0 -69
- package/src/stories/Welcome.stories.mdx +0 -63
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/storybook-static/01daf23af61cc99e9d75.woff2 +0 -0
- package/storybook-static/06a2da828c8b6497ba7a.woff +0 -0
- package/storybook-static/0fa24adac56865ac7e5f.ttf +0 -0
- package/storybook-static/160.a21381a2.iframe.bundle.js +0 -1
- package/storybook-static/1dbed2ef5cef8fcb4cbe.ttf +0 -0
- package/storybook-static/1fa1c16a4a45d13f0df8.ttf +0 -0
- package/storybook-static/212.faba6ad0.iframe.bundle.js +0 -7
- package/storybook-static/212.faba6ad0.iframe.bundle.js.LICENSE.txt +0 -108
- package/storybook-static/212.faba6ad0.iframe.bundle.js.map +0 -1
- package/storybook-static/23cdaa8575b5e003dcde.eot +0 -0
- package/storybook-static/247.21581a11a07ce2f03d0c.manager.bundle.js +0 -2
- package/storybook-static/247.21581a11a07ce2f03d0c.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/247.271b628d.iframe.bundle.js +0 -2
- package/storybook-static/247.271b628d.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/259.03b8a6d8.iframe.bundle.js +0 -1
- package/storybook-static/27d33755a2b827666dc5.woff +0 -0
- package/storybook-static/294.491cce4d5ae7b9c2ffce.manager.bundle.js +0 -1
- package/storybook-static/294.549e3f8d.iframe.bundle.js +0 -1
- package/storybook-static/409a9c398a28ee4d74ff.eot +0 -0
- package/storybook-static/444.6156221a84c3a87f5c02.manager.bundle.js +0 -2
- package/storybook-static/444.6156221a84c3a87f5c02.manager.bundle.js.LICENSE.txt +0 -94
- package/storybook-static/4bf5fc6f93ba10519c82.eot +0 -0
- package/storybook-static/504.f9ef513c.iframe.bundle.js +0 -2
- package/storybook-static/504.f9ef513c.iframe.bundle.js.LICENSE.txt +0 -11
- package/storybook-static/639.044e85595b528d3f28da.manager.bundle.js +0 -2
- package/storybook-static/639.044e85595b528d3f28da.manager.bundle.js.LICENSE.txt +0 -31
- package/storybook-static/639.c568c669.iframe.bundle.js +0 -2
- package/storybook-static/639.c568c669.iframe.bundle.js.LICENSE.txt +0 -31
- package/storybook-static/642.1f308c6d963e823cc20e.manager.bundle.js +0 -2
- package/storybook-static/642.1f308c6d963e823cc20e.manager.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/642.d92dc22b.iframe.bundle.js +0 -2
- package/storybook-static/642.d92dc22b.iframe.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/6a159f0a2005668f1f78.woff +0 -0
- package/storybook-static/720.f44d4e1f5203b6083ae4.manager.bundle.js +0 -1
- package/storybook-static/73ba1c910e0f7bfc6b18.woff2 +0 -0
- package/storybook-static/837.1b65801453b1ce7ef7d1.manager.bundle.js +0 -1
- package/storybook-static/837.95523cc4.iframe.bundle.js +0 -1
- package/storybook-static/8a142c29a318c432117a.woff +0 -0
- package/storybook-static/914.d1f142bbe477c1136f06.manager.bundle.js +0 -1
- package/storybook-static/914.feb1fea5.iframe.bundle.js +0 -1
- package/storybook-static/9db5d05810cb98f2831f.ttf +0 -0
- package/storybook-static/9ff97e342523931a4992.eot +0 -0
- package/storybook-static/a40d436619020fb67db5.woff +0 -0
- package/storybook-static/a46b8d4aa3504103cdde.ttf +0 -0
- package/storybook-static/b53d0e74edc5a5fbef0a.ttf +0 -0
- package/storybook-static/c12a83f816844ff94375.ttf +0 -0
- package/storybook-static/c807e115c00aaffbac11.woff2 +0 -0
- package/storybook-static/cadb6b94d6b0ecc3a86a.woff2 +0 -0
- package/storybook-static/d0cff1b064bcd84324fe.eot +0 -0
- package/storybook-static/d3434771ad7e9030387e.ttf +0 -0
- package/storybook-static/d8610c2a4fe5c177f4f6.woff +0 -0
- package/storybook-static/d970f426740b938f39e1.woff +0 -0
- package/storybook-static/d9c7eba773ff1c8df5bb.eot +0 -0
- package/storybook-static/dd4645bdb2f1e1a47ed7.woff2 +0 -0
- package/storybook-static/e0a63577ac642885f067.eot +0 -0
- package/storybook-static/f632ebfa0d7b7085d542.woff2 +0 -0
- package/storybook-static/f93e2252d7112c3bcca5.woff2 +0 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +0 -364
- package/storybook-static/index.html +0 -59
- package/storybook-static/main.28d30a3024752e90423a.manager.bundle.js +0 -1
- package/storybook-static/main.3ae24e12.iframe.bundle.js +0 -1
- package/storybook-static/project.json +0 -1
- package/storybook-static/reactPlayerDailyMotion.469cc00f.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerFacebook.1423bb15.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerFilePlayer.e19e24a0.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerKaltura.d1eb0868.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerMixcloud.9f1b1691.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerPreview.9295696b.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerSoundCloud.d420395c.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerStreamable.9b655bf3.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerTwitch.e90e6dea.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerVidyard.a37ae6b3.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerVimeo.a7f367ee.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerWistia.fb351944.iframe.bundle.js +0 -1
- package/storybook-static/reactPlayerYouTube.3514e11a.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.3bae6a4f.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.e45b096081911dbee3c7.manager.bundle.js +0 -1
- package/storybook-static/static/css/main.19ed5330.css +0 -3
- package/storybook-static/static/css/main.19ed5330.css.map +0 -1
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _commonjsHelpers = require('./_commonjsHelpers-9f9f50a8.js');
|
|
4
|
+
var require$$0 = require('react');
|
|
5
|
+
var patterns = require('./patterns-b55db71f.js');
|
|
6
|
+
|
|
7
|
+
function _mergeNamespaces(n, m) {
|
|
8
|
+
m.forEach(function (e) {
|
|
9
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
10
|
+
if (k !== 'default' && !(k in n)) {
|
|
11
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return e[k]; }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var FilePlayer$2 = {};
|
|
23
|
+
|
|
24
|
+
(function (exports) {
|
|
25
|
+
|
|
26
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
27
|
+
|
|
28
|
+
Object.defineProperty(exports, "__esModule", {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
exports["default"] = void 0;
|
|
32
|
+
|
|
33
|
+
var _react = _interopRequireWildcard(require$$0);
|
|
34
|
+
|
|
35
|
+
var _utils = patterns.utils;
|
|
36
|
+
|
|
37
|
+
var _patterns = patterns.patterns;
|
|
38
|
+
|
|
39
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
40
|
+
|
|
41
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
42
|
+
|
|
43
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
44
|
+
|
|
45
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
46
|
+
|
|
47
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
48
|
+
|
|
49
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
50
|
+
|
|
51
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
52
|
+
|
|
53
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
54
|
+
|
|
55
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
56
|
+
|
|
57
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
58
|
+
|
|
59
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
60
|
+
|
|
61
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
62
|
+
|
|
63
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
64
|
+
|
|
65
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
66
|
+
|
|
67
|
+
var HAS_NAVIGATOR = typeof navigator !== 'undefined';
|
|
68
|
+
var IS_IPAD_PRO = HAS_NAVIGATOR && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;
|
|
69
|
+
var IS_IOS = HAS_NAVIGATOR && (/iPad|iPhone|iPod/.test(navigator.userAgent) || IS_IPAD_PRO) && !window.MSStream;
|
|
70
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js';
|
|
71
|
+
var HLS_GLOBAL = 'Hls';
|
|
72
|
+
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
73
|
+
var DASH_GLOBAL = 'dashjs';
|
|
74
|
+
var FLV_SDK_URL = 'https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js';
|
|
75
|
+
var FLV_GLOBAL = 'flvjs';
|
|
76
|
+
var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
77
|
+
var MATCH_CLOUDFLARE_STREAM = /https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/;
|
|
78
|
+
var REPLACE_CLOUDFLARE_STREAM = 'https://videodelivery.net/{id}/manifest/video.m3u8';
|
|
79
|
+
|
|
80
|
+
var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
81
|
+
_inherits(FilePlayer, _Component);
|
|
82
|
+
|
|
83
|
+
var _super = _createSuper(FilePlayer);
|
|
84
|
+
|
|
85
|
+
function FilePlayer() {
|
|
86
|
+
var _this;
|
|
87
|
+
|
|
88
|
+
_classCallCheck(this, FilePlayer);
|
|
89
|
+
|
|
90
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
91
|
+
_args[_key] = arguments[_key];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
95
|
+
|
|
96
|
+
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
97
|
+
var _this$props;
|
|
98
|
+
|
|
99
|
+
return (_this$props = _this.props).onReady.apply(_this$props, arguments);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
103
|
+
var _this$props2;
|
|
104
|
+
|
|
105
|
+
return (_this$props2 = _this.props).onPlay.apply(_this$props2, arguments);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
_defineProperty(_assertThisInitialized(_this), "onBuffer", function () {
|
|
109
|
+
var _this$props3;
|
|
110
|
+
|
|
111
|
+
return (_this$props3 = _this.props).onBuffer.apply(_this$props3, arguments);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
_defineProperty(_assertThisInitialized(_this), "onBufferEnd", function () {
|
|
115
|
+
var _this$props4;
|
|
116
|
+
|
|
117
|
+
return (_this$props4 = _this.props).onBufferEnd.apply(_this$props4, arguments);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
121
|
+
var _this$props5;
|
|
122
|
+
|
|
123
|
+
return (_this$props5 = _this.props).onPause.apply(_this$props5, arguments);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
127
|
+
var _this$props6;
|
|
128
|
+
|
|
129
|
+
return (_this$props6 = _this.props).onEnded.apply(_this$props6, arguments);
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
_defineProperty(_assertThisInitialized(_this), "onError", function () {
|
|
133
|
+
var _this$props7;
|
|
134
|
+
|
|
135
|
+
return (_this$props7 = _this.props).onError.apply(_this$props7, arguments);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayBackRateChange", function (event) {
|
|
139
|
+
return _this.props.onPlaybackRateChange(event.target.playbackRate);
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
_defineProperty(_assertThisInitialized(_this), "onEnablePIP", function () {
|
|
143
|
+
var _this$props8;
|
|
144
|
+
|
|
145
|
+
return (_this$props8 = _this.props).onEnablePIP.apply(_this$props8, arguments);
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
_defineProperty(_assertThisInitialized(_this), "onDisablePIP", function (e) {
|
|
149
|
+
var _this$props9 = _this.props,
|
|
150
|
+
onDisablePIP = _this$props9.onDisablePIP,
|
|
151
|
+
playing = _this$props9.playing;
|
|
152
|
+
onDisablePIP(e);
|
|
153
|
+
|
|
154
|
+
if (playing) {
|
|
155
|
+
_this.play();
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
_defineProperty(_assertThisInitialized(_this), "onPresentationModeChange", function (e) {
|
|
160
|
+
if (_this.player && (0, _utils.supportsWebKitPresentationMode)(_this.player)) {
|
|
161
|
+
var webkitPresentationMode = _this.player.webkitPresentationMode;
|
|
162
|
+
|
|
163
|
+
if (webkitPresentationMode === 'picture-in-picture') {
|
|
164
|
+
_this.onEnablePIP(e);
|
|
165
|
+
} else if (webkitPresentationMode === 'inline') {
|
|
166
|
+
_this.onDisablePIP(e);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
_defineProperty(_assertThisInitialized(_this), "onSeek", function (e) {
|
|
172
|
+
_this.props.onSeek(e.target.currentTime);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
176
|
+
_this.player.muted = true;
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
_defineProperty(_assertThisInitialized(_this), "unmute", function () {
|
|
180
|
+
_this.player.muted = false;
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
184
|
+
if (typeof source === 'string') {
|
|
185
|
+
return /*#__PURE__*/_react["default"].createElement("source", {
|
|
186
|
+
key: index,
|
|
187
|
+
src: source
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return /*#__PURE__*/_react["default"].createElement("source", _extends({
|
|
192
|
+
key: index
|
|
193
|
+
}, source));
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
197
|
+
return /*#__PURE__*/_react["default"].createElement("track", _extends({
|
|
198
|
+
key: index
|
|
199
|
+
}, track));
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
_defineProperty(_assertThisInitialized(_this), "ref", function (player) {
|
|
203
|
+
if (_this.player) {
|
|
204
|
+
// Store previous player to be used by removeListeners()
|
|
205
|
+
_this.prevPlayer = _this.player;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
_this.player = player;
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
return _this;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
_createClass(FilePlayer, [{
|
|
215
|
+
key: "componentDidMount",
|
|
216
|
+
value: function componentDidMount() {
|
|
217
|
+
this.props.onMount && this.props.onMount(this);
|
|
218
|
+
this.addListeners(this.player);
|
|
219
|
+
|
|
220
|
+
if (IS_IOS) {
|
|
221
|
+
this.player.load();
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}, {
|
|
225
|
+
key: "componentDidUpdate",
|
|
226
|
+
value: function componentDidUpdate(prevProps) {
|
|
227
|
+
if (this.shouldUseAudio(this.props) !== this.shouldUseAudio(prevProps)) {
|
|
228
|
+
this.removeListeners(this.prevPlayer, prevProps.url);
|
|
229
|
+
this.addListeners(this.player);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (this.props.url !== prevProps.url && !(0, _utils.isMediaStream)(this.props.url)) {
|
|
233
|
+
this.player.srcObject = null;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
237
|
+
key: "componentWillUnmount",
|
|
238
|
+
value: function componentWillUnmount() {
|
|
239
|
+
this.removeListeners(this.player);
|
|
240
|
+
|
|
241
|
+
if (this.hls) {
|
|
242
|
+
this.hls.destroy();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}, {
|
|
246
|
+
key: "addListeners",
|
|
247
|
+
value: function addListeners(player) {
|
|
248
|
+
var _this$props10 = this.props,
|
|
249
|
+
url = _this$props10.url,
|
|
250
|
+
playsinline = _this$props10.playsinline;
|
|
251
|
+
player.addEventListener('play', this.onPlay);
|
|
252
|
+
player.addEventListener('waiting', this.onBuffer);
|
|
253
|
+
player.addEventListener('playing', this.onBufferEnd);
|
|
254
|
+
player.addEventListener('pause', this.onPause);
|
|
255
|
+
player.addEventListener('seeked', this.onSeek);
|
|
256
|
+
player.addEventListener('ended', this.onEnded);
|
|
257
|
+
player.addEventListener('error', this.onError);
|
|
258
|
+
player.addEventListener('ratechange', this.onPlayBackRateChange);
|
|
259
|
+
player.addEventListener('enterpictureinpicture', this.onEnablePIP);
|
|
260
|
+
player.addEventListener('leavepictureinpicture', this.onDisablePIP);
|
|
261
|
+
player.addEventListener('webkitpresentationmodechanged', this.onPresentationModeChange);
|
|
262
|
+
|
|
263
|
+
if (!this.shouldUseHLS(url)) {
|
|
264
|
+
// onReady is handled by hls.js
|
|
265
|
+
player.addEventListener('canplay', this.onReady);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (playsinline) {
|
|
269
|
+
player.setAttribute('playsinline', '');
|
|
270
|
+
player.setAttribute('webkit-playsinline', '');
|
|
271
|
+
player.setAttribute('x5-playsinline', '');
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}, {
|
|
275
|
+
key: "removeListeners",
|
|
276
|
+
value: function removeListeners(player, url) {
|
|
277
|
+
player.removeEventListener('canplay', this.onReady);
|
|
278
|
+
player.removeEventListener('play', this.onPlay);
|
|
279
|
+
player.removeEventListener('waiting', this.onBuffer);
|
|
280
|
+
player.removeEventListener('playing', this.onBufferEnd);
|
|
281
|
+
player.removeEventListener('pause', this.onPause);
|
|
282
|
+
player.removeEventListener('seeked', this.onSeek);
|
|
283
|
+
player.removeEventListener('ended', this.onEnded);
|
|
284
|
+
player.removeEventListener('error', this.onError);
|
|
285
|
+
player.removeEventListener('ratechange', this.onPlayBackRateChange);
|
|
286
|
+
player.removeEventListener('enterpictureinpicture', this.onEnablePIP);
|
|
287
|
+
player.removeEventListener('leavepictureinpicture', this.onDisablePIP);
|
|
288
|
+
player.removeEventListener('webkitpresentationmodechanged', this.onPresentationModeChange);
|
|
289
|
+
|
|
290
|
+
if (!this.shouldUseHLS(url)) {
|
|
291
|
+
// onReady is handled by hls.js
|
|
292
|
+
player.removeEventListener('canplay', this.onReady);
|
|
293
|
+
}
|
|
294
|
+
} // Proxy methods to prevent listener leaks
|
|
295
|
+
|
|
296
|
+
}, {
|
|
297
|
+
key: "shouldUseAudio",
|
|
298
|
+
value: function shouldUseAudio(props) {
|
|
299
|
+
if (props.config.forceVideo) {
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (props.config.attributes.poster) {
|
|
304
|
+
return false; // Use <video> so that poster is shown
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
return _patterns.AUDIO_EXTENSIONS.test(props.url) || props.config.forceAudio;
|
|
308
|
+
}
|
|
309
|
+
}, {
|
|
310
|
+
key: "shouldUseHLS",
|
|
311
|
+
value: function shouldUseHLS(url) {
|
|
312
|
+
if (this.props.config.forceHLS) {
|
|
313
|
+
return true;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if (IS_IOS) {
|
|
317
|
+
return false;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
return _patterns.HLS_EXTENSIONS.test(url) || MATCH_CLOUDFLARE_STREAM.test(url);
|
|
321
|
+
}
|
|
322
|
+
}, {
|
|
323
|
+
key: "shouldUseDASH",
|
|
324
|
+
value: function shouldUseDASH(url) {
|
|
325
|
+
return _patterns.DASH_EXTENSIONS.test(url) || this.props.config.forceDASH;
|
|
326
|
+
}
|
|
327
|
+
}, {
|
|
328
|
+
key: "shouldUseFLV",
|
|
329
|
+
value: function shouldUseFLV(url) {
|
|
330
|
+
return _patterns.FLV_EXTENSIONS.test(url) || this.props.config.forceFLV;
|
|
331
|
+
}
|
|
332
|
+
}, {
|
|
333
|
+
key: "load",
|
|
334
|
+
value: function load(url) {
|
|
335
|
+
var _this2 = this;
|
|
336
|
+
|
|
337
|
+
var _this$props$config = this.props.config,
|
|
338
|
+
hlsVersion = _this$props$config.hlsVersion,
|
|
339
|
+
hlsOptions = _this$props$config.hlsOptions,
|
|
340
|
+
dashVersion = _this$props$config.dashVersion,
|
|
341
|
+
flvVersion = _this$props$config.flvVersion;
|
|
342
|
+
|
|
343
|
+
if (this.hls) {
|
|
344
|
+
this.hls.destroy();
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (this.dash) {
|
|
348
|
+
this.dash.reset();
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (this.shouldUseHLS(url)) {
|
|
352
|
+
(0, _utils.getSDK)(HLS_SDK_URL.replace('VERSION', hlsVersion), HLS_GLOBAL).then(function (Hls) {
|
|
353
|
+
_this2.hls = new Hls(hlsOptions);
|
|
354
|
+
|
|
355
|
+
_this2.hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
|
356
|
+
_this2.props.onReady();
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
_this2.hls.on(Hls.Events.ERROR, function (e, data) {
|
|
360
|
+
_this2.props.onError(e, data, _this2.hls, Hls);
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
if (MATCH_CLOUDFLARE_STREAM.test(url)) {
|
|
364
|
+
var id = url.match(MATCH_CLOUDFLARE_STREAM)[1];
|
|
365
|
+
|
|
366
|
+
_this2.hls.loadSource(REPLACE_CLOUDFLARE_STREAM.replace('{id}', id));
|
|
367
|
+
} else {
|
|
368
|
+
_this2.hls.loadSource(url);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
_this2.hls.attachMedia(_this2.player);
|
|
372
|
+
|
|
373
|
+
_this2.props.onLoaded();
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (this.shouldUseDASH(url)) {
|
|
378
|
+
(0, _utils.getSDK)(DASH_SDK_URL.replace('VERSION', dashVersion), DASH_GLOBAL).then(function (dashjs) {
|
|
379
|
+
_this2.dash = dashjs.MediaPlayer().create();
|
|
380
|
+
|
|
381
|
+
_this2.dash.initialize(_this2.player, url, _this2.props.playing);
|
|
382
|
+
|
|
383
|
+
_this2.dash.on('error', _this2.props.onError);
|
|
384
|
+
|
|
385
|
+
if (parseInt(dashVersion) < 3) {
|
|
386
|
+
_this2.dash.getDebug().setLogToBrowserConsole(false);
|
|
387
|
+
} else {
|
|
388
|
+
_this2.dash.updateSettings({
|
|
389
|
+
debug: {
|
|
390
|
+
logLevel: dashjs.Debug.LOG_LEVEL_NONE
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
_this2.props.onLoaded();
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (this.shouldUseFLV(url)) {
|
|
400
|
+
(0, _utils.getSDK)(FLV_SDK_URL.replace('VERSION', flvVersion), FLV_GLOBAL).then(function (flvjs) {
|
|
401
|
+
_this2.flv = flvjs.createPlayer({
|
|
402
|
+
type: 'flv',
|
|
403
|
+
url: url
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
_this2.flv.attachMediaElement(_this2.player);
|
|
407
|
+
|
|
408
|
+
_this2.flv.on(flvjs.Events.ERROR, function (e, data) {
|
|
409
|
+
_this2.props.onError(e, data, _this2.flv, flvjs);
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
_this2.flv.load();
|
|
413
|
+
|
|
414
|
+
_this2.props.onLoaded();
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
if (url instanceof Array) {
|
|
419
|
+
// When setting new urls (<source>) on an already loaded video,
|
|
420
|
+
// HTMLMediaElement.load() is needed to reset the media element
|
|
421
|
+
// and restart the media resource. Just replacing children source
|
|
422
|
+
// dom nodes is not enough
|
|
423
|
+
this.player.load();
|
|
424
|
+
} else if ((0, _utils.isMediaStream)(url)) {
|
|
425
|
+
try {
|
|
426
|
+
this.player.srcObject = url;
|
|
427
|
+
} catch (e) {
|
|
428
|
+
this.player.src = window.URL.createObjectURL(url);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}, {
|
|
433
|
+
key: "play",
|
|
434
|
+
value: function play() {
|
|
435
|
+
var promise = this.player.play();
|
|
436
|
+
|
|
437
|
+
if (promise) {
|
|
438
|
+
promise["catch"](this.props.onError);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}, {
|
|
442
|
+
key: "pause",
|
|
443
|
+
value: function pause() {
|
|
444
|
+
this.player.pause();
|
|
445
|
+
}
|
|
446
|
+
}, {
|
|
447
|
+
key: "stop",
|
|
448
|
+
value: function stop() {
|
|
449
|
+
this.player.removeAttribute('src');
|
|
450
|
+
|
|
451
|
+
if (this.dash) {
|
|
452
|
+
this.dash.reset();
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}, {
|
|
456
|
+
key: "seekTo",
|
|
457
|
+
value: function seekTo(seconds) {
|
|
458
|
+
this.player.currentTime = seconds;
|
|
459
|
+
}
|
|
460
|
+
}, {
|
|
461
|
+
key: "setVolume",
|
|
462
|
+
value: function setVolume(fraction) {
|
|
463
|
+
this.player.volume = fraction;
|
|
464
|
+
}
|
|
465
|
+
}, {
|
|
466
|
+
key: "enablePIP",
|
|
467
|
+
value: function enablePIP() {
|
|
468
|
+
if (this.player.requestPictureInPicture && document.pictureInPictureElement !== this.player) {
|
|
469
|
+
this.player.requestPictureInPicture();
|
|
470
|
+
} else if ((0, _utils.supportsWebKitPresentationMode)(this.player) && this.player.webkitPresentationMode !== 'picture-in-picture') {
|
|
471
|
+
this.player.webkitSetPresentationMode('picture-in-picture');
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}, {
|
|
475
|
+
key: "disablePIP",
|
|
476
|
+
value: function disablePIP() {
|
|
477
|
+
if (document.exitPictureInPicture && document.pictureInPictureElement === this.player) {
|
|
478
|
+
document.exitPictureInPicture();
|
|
479
|
+
} else if ((0, _utils.supportsWebKitPresentationMode)(this.player) && this.player.webkitPresentationMode !== 'inline') {
|
|
480
|
+
this.player.webkitSetPresentationMode('inline');
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}, {
|
|
484
|
+
key: "setPlaybackRate",
|
|
485
|
+
value: function setPlaybackRate(rate) {
|
|
486
|
+
try {
|
|
487
|
+
this.player.playbackRate = rate;
|
|
488
|
+
} catch (error) {
|
|
489
|
+
this.props.onError(error);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}, {
|
|
493
|
+
key: "getDuration",
|
|
494
|
+
value: function getDuration() {
|
|
495
|
+
if (!this.player) return null;
|
|
496
|
+
var _this$player = this.player,
|
|
497
|
+
duration = _this$player.duration,
|
|
498
|
+
seekable = _this$player.seekable; // on iOS, live streams return Infinity for the duration
|
|
499
|
+
// so instead we use the end of the seekable timerange
|
|
500
|
+
|
|
501
|
+
if (duration === Infinity && seekable.length > 0) {
|
|
502
|
+
return seekable.end(seekable.length - 1);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
return duration;
|
|
506
|
+
}
|
|
507
|
+
}, {
|
|
508
|
+
key: "getCurrentTime",
|
|
509
|
+
value: function getCurrentTime() {
|
|
510
|
+
if (!this.player) return null;
|
|
511
|
+
return this.player.currentTime;
|
|
512
|
+
}
|
|
513
|
+
}, {
|
|
514
|
+
key: "getSecondsLoaded",
|
|
515
|
+
value: function getSecondsLoaded() {
|
|
516
|
+
if (!this.player) return null;
|
|
517
|
+
var buffered = this.player.buffered;
|
|
518
|
+
|
|
519
|
+
if (buffered.length === 0) {
|
|
520
|
+
return 0;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
var end = buffered.end(buffered.length - 1);
|
|
524
|
+
var duration = this.getDuration();
|
|
525
|
+
|
|
526
|
+
if (end > duration) {
|
|
527
|
+
return duration;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
return end;
|
|
531
|
+
}
|
|
532
|
+
}, {
|
|
533
|
+
key: "getSource",
|
|
534
|
+
value: function getSource(url) {
|
|
535
|
+
var useHLS = this.shouldUseHLS(url);
|
|
536
|
+
var useDASH = this.shouldUseDASH(url);
|
|
537
|
+
var useFLV = this.shouldUseFLV(url);
|
|
538
|
+
|
|
539
|
+
if (url instanceof Array || (0, _utils.isMediaStream)(url) || useHLS || useDASH || useFLV) {
|
|
540
|
+
return undefined;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
if (MATCH_DROPBOX_URL.test(url)) {
|
|
544
|
+
return url.replace('www.dropbox.com', 'dl.dropboxusercontent.com');
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
return url;
|
|
548
|
+
}
|
|
549
|
+
}, {
|
|
550
|
+
key: "render",
|
|
551
|
+
value: function render() {
|
|
552
|
+
var _this$props11 = this.props,
|
|
553
|
+
url = _this$props11.url,
|
|
554
|
+
playing = _this$props11.playing,
|
|
555
|
+
loop = _this$props11.loop,
|
|
556
|
+
controls = _this$props11.controls,
|
|
557
|
+
muted = _this$props11.muted,
|
|
558
|
+
config = _this$props11.config,
|
|
559
|
+
width = _this$props11.width,
|
|
560
|
+
height = _this$props11.height;
|
|
561
|
+
var useAudio = this.shouldUseAudio(this.props);
|
|
562
|
+
var Element = useAudio ? 'audio' : 'video';
|
|
563
|
+
var style = {
|
|
564
|
+
width: width === 'auto' ? width : '100%',
|
|
565
|
+
height: height === 'auto' ? height : '100%'
|
|
566
|
+
};
|
|
567
|
+
return /*#__PURE__*/_react["default"].createElement(Element, _extends({
|
|
568
|
+
ref: this.ref,
|
|
569
|
+
src: this.getSource(url),
|
|
570
|
+
style: style,
|
|
571
|
+
preload: "auto",
|
|
572
|
+
autoPlay: playing || undefined,
|
|
573
|
+
controls: controls,
|
|
574
|
+
muted: muted,
|
|
575
|
+
loop: loop
|
|
576
|
+
}, config.attributes), url instanceof Array && url.map(this.renderSourceElement), config.tracks.map(this.renderTrack));
|
|
577
|
+
}
|
|
578
|
+
}]);
|
|
579
|
+
|
|
580
|
+
return FilePlayer;
|
|
581
|
+
}(_react.Component);
|
|
582
|
+
|
|
583
|
+
exports["default"] = FilePlayer;
|
|
584
|
+
|
|
585
|
+
_defineProperty(FilePlayer, "displayName", 'FilePlayer');
|
|
586
|
+
|
|
587
|
+
_defineProperty(FilePlayer, "canPlay", _patterns.canPlay.file);
|
|
588
|
+
} (FilePlayer$2));
|
|
589
|
+
|
|
590
|
+
var FilePlayer = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(FilePlayer$2);
|
|
591
|
+
|
|
592
|
+
var FilePlayer$1 = /*#__PURE__*/_mergeNamespaces({
|
|
593
|
+
__proto__: null,
|
|
594
|
+
default: FilePlayer
|
|
595
|
+
}, [FilePlayer$2]);
|
|
596
|
+
|
|
597
|
+
exports.FilePlayer = FilePlayer$1;
|