@hitachivantara/uikit-react-lab 2.6.18
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 +2334 -0
- package/LICENSE.txt +201 -0
- package/README.md +11 -0
- package/dist/AppSwitcherPanel/Action/Action.d.ts +67 -0
- package/dist/AppSwitcherPanel/Action/Action.js +255 -0
- package/dist/AppSwitcherPanel/Action/Action.js.map +1 -0
- package/dist/AppSwitcherPanel/Action/index.d.ts +2 -0
- package/dist/AppSwitcherPanel/Action/index.js +21 -0
- package/dist/AppSwitcherPanel/Action/index.js.map +1 -0
- package/dist/AppSwitcherPanel/Action/styles.js +91 -0
- package/dist/AppSwitcherPanel/Action/styles.js.map +1 -0
- package/dist/AppSwitcherPanel/AppSwitcherPanel.d.ts +50 -0
- package/dist/AppSwitcherPanel/AppSwitcherPanel.js +230 -0
- package/dist/AppSwitcherPanel/AppSwitcherPanel.js.map +1 -0
- package/dist/AppSwitcherPanel/index.d.ts +2 -0
- package/dist/AppSwitcherPanel/index.js +21 -0
- package/dist/AppSwitcherPanel/index.js.map +1 -0
- package/dist/AppSwitcherPanel/styles.js +83 -0
- package/dist/AppSwitcherPanel/styles.js.map +1 -0
- package/dist/CodeEditor/CodeEditor.d.ts +14 -0
- package/dist/CodeEditor/CodeEditor.js +144 -0
- package/dist/CodeEditor/CodeEditor.js.map +1 -0
- package/dist/CodeEditor/index.d.ts +2 -0
- package/dist/CodeEditor/index.js +16 -0
- package/dist/CodeEditor/index.js.map +1 -0
- package/dist/CodeEditor/styles.js +53 -0
- package/dist/CodeEditor/styles.js.map +1 -0
- package/dist/Footer/Footer.d.ts +12 -0
- package/dist/Footer/Footer.js +67 -0
- package/dist/Footer/Footer.js.map +1 -0
- package/dist/Footer/index.d.ts +2 -0
- package/dist/Footer/index.js +16 -0
- package/dist/Footer/index.js.map +1 -0
- package/dist/Footer/styles.js +54 -0
- package/dist/Footer/styles.js.map +1 -0
- package/dist/FormComposer/FormComposer.d.ts +41 -0
- package/dist/FormComposer/FormComposer.js +258 -0
- package/dist/FormComposer/FormComposer.js.map +1 -0
- package/dist/FormComposer/index.d.ts +2 -0
- package/dist/FormComposer/index.js +16 -0
- package/dist/FormComposer/index.js.map +1 -0
- package/dist/FormComposer/styles.js +39 -0
- package/dist/FormComposer/styles.js.map +1 -0
- package/dist/Loading/Loading.d.ts +32 -0
- package/dist/Loading/Loading.js +89 -0
- package/dist/Loading/Loading.js.map +1 -0
- package/dist/Loading/LoadingWithDelay.d.ts +12 -0
- package/dist/Loading/LoadingWithDelay.js +135 -0
- package/dist/Loading/LoadingWithDelay.js.map +1 -0
- package/dist/Loading/index.d.ts +2 -0
- package/dist/Loading/index.js +16 -0
- package/dist/Loading/index.js.map +1 -0
- package/dist/Loading/styles.js +85 -0
- package/dist/Loading/styles.js.map +1 -0
- package/dist/NavigationAnchors/NavigationAnchors.d.ts +46 -0
- package/dist/NavigationAnchors/NavigationAnchors.js +297 -0
- package/dist/NavigationAnchors/NavigationAnchors.js.map +1 -0
- package/dist/NavigationAnchors/index.d.ts +2 -0
- package/dist/NavigationAnchors/index.js +16 -0
- package/dist/NavigationAnchors/index.js.map +1 -0
- package/dist/NavigationAnchors/styles.js +87 -0
- package/dist/NavigationAnchors/styles.js.map +1 -0
- package/dist/NotificationPanel/Notification/Notification.js +153 -0
- package/dist/NotificationPanel/Notification/Notification.js.map +1 -0
- package/dist/NotificationPanel/Notification/index.js +21 -0
- package/dist/NotificationPanel/Notification/index.js.map +1 -0
- package/dist/NotificationPanel/Notification/styles.js +73 -0
- package/dist/NotificationPanel/Notification/styles.js.map +1 -0
- package/dist/NotificationPanel/NotificationPanel.d.ts +49 -0
- package/dist/NotificationPanel/NotificationPanel.js +219 -0
- package/dist/NotificationPanel/NotificationPanel.js.map +1 -0
- package/dist/NotificationPanel/Panel/Panel.js +202 -0
- package/dist/NotificationPanel/Panel/Panel.js.map +1 -0
- package/dist/NotificationPanel/Panel/index.js +21 -0
- package/dist/NotificationPanel/Panel/index.js.map +1 -0
- package/dist/NotificationPanel/Panel/styles.js +84 -0
- package/dist/NotificationPanel/Panel/styles.js.map +1 -0
- package/dist/NotificationPanel/index.d.ts +2 -0
- package/dist/NotificationPanel/index.js +16 -0
- package/dist/NotificationPanel/index.js.map +1 -0
- package/dist/NotificationPanel/styles.js +16 -0
- package/dist/NotificationPanel/styles.js.map +1 -0
- package/dist/Slider/KnobRing/KnobRing.js +26 -0
- package/dist/Slider/KnobRing/KnobRing.js.map +1 -0
- package/dist/Slider/KnobRing/index.js +19 -0
- package/dist/Slider/KnobRing/index.js.map +1 -0
- package/dist/Slider/KnobRing/styles.js +40 -0
- package/dist/Slider/KnobRing/styles.js.map +1 -0
- package/dist/Slider/Slider.d.ts +133 -0
- package/dist/Slider/Slider.js +607 -0
- package/dist/Slider/Slider.js.map +1 -0
- package/dist/Slider/index.d.ts +2 -0
- package/dist/Slider/index.js +16 -0
- package/dist/Slider/index.js.map +1 -0
- package/dist/Slider/styles.js +125 -0
- package/dist/Slider/styles.js.map +1 -0
- package/dist/TimePicker/PeriodPicker/PeriodPicker.js +128 -0
- package/dist/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -0
- package/dist/TimePicker/PeriodPicker/index.js +21 -0
- package/dist/TimePicker/PeriodPicker/index.js.map +1 -0
- package/dist/TimePicker/PeriodPicker/styles.js +63 -0
- package/dist/TimePicker/PeriodPicker/styles.js.map +1 -0
- package/dist/TimePicker/TimePicker.d.ts +77 -0
- package/dist/TimePicker/TimePicker.js +425 -0
- package/dist/TimePicker/TimePicker.js.map +1 -0
- package/dist/TimePicker/UnitTimePicker/UnitTimePicker.js +225 -0
- package/dist/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -0
- package/dist/TimePicker/UnitTimePicker/index.js +21 -0
- package/dist/TimePicker/UnitTimePicker/index.js.map +1 -0
- package/dist/TimePicker/UnitTimePicker/styles.js +80 -0
- package/dist/TimePicker/UnitTimePicker/styles.js.map +1 -0
- package/dist/TimePicker/enums.js +40 -0
- package/dist/TimePicker/enums.js.map +1 -0
- package/dist/TimePicker/index.d.ts +2 -0
- package/dist/TimePicker/index.js +16 -0
- package/dist/TimePicker/index.js.map +1 -0
- package/dist/TimePicker/styles.js +113 -0
- package/dist/TimePicker/styles.js.map +1 -0
- package/dist/TimePicker/timePickerConverter.js +90 -0
- package/dist/TimePicker/timePickerConverter.js.map +1 -0
- package/dist/TimePicker/timePickerFormatter.js +77 -0
- package/dist/TimePicker/timePickerFormatter.js.map +1 -0
- package/dist/TimePicker/timePickerUtils.js +36 -0
- package/dist/TimePicker/timePickerUtils.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/Action/Action.d.ts +67 -0
- package/dist/legacy/AppSwitcherPanel/Action/Action.js +214 -0
- package/dist/legacy/AppSwitcherPanel/Action/Action.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/Action/index.d.ts +2 -0
- package/dist/legacy/AppSwitcherPanel/Action/index.js +7 -0
- package/dist/legacy/AppSwitcherPanel/Action/index.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/Action/styles.js +83 -0
- package/dist/legacy/AppSwitcherPanel/Action/styles.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/AppSwitcherPanel.d.ts +50 -0
- package/dist/legacy/AppSwitcherPanel/AppSwitcherPanel.js +195 -0
- package/dist/legacy/AppSwitcherPanel/AppSwitcherPanel.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/index.d.ts +2 -0
- package/dist/legacy/AppSwitcherPanel/index.js +7 -0
- package/dist/legacy/AppSwitcherPanel/index.js.map +1 -0
- package/dist/legacy/AppSwitcherPanel/styles.js +65 -0
- package/dist/legacy/AppSwitcherPanel/styles.js.map +1 -0
- package/dist/legacy/CodeEditor/CodeEditor.d.ts +14 -0
- package/dist/legacy/CodeEditor/CodeEditor.js +114 -0
- package/dist/legacy/CodeEditor/CodeEditor.js.map +1 -0
- package/dist/legacy/CodeEditor/index.d.ts +2 -0
- package/dist/legacy/CodeEditor/index.js +2 -0
- package/dist/legacy/CodeEditor/index.js.map +1 -0
- package/dist/legacy/CodeEditor/styles.js +45 -0
- package/dist/legacy/CodeEditor/styles.js.map +1 -0
- package/dist/legacy/Footer/Footer.d.ts +12 -0
- package/dist/legacy/Footer/Footer.js +51 -0
- package/dist/legacy/Footer/Footer.js.map +1 -0
- package/dist/legacy/Footer/index.d.ts +2 -0
- package/dist/legacy/Footer/index.js +2 -0
- package/dist/legacy/Footer/index.js.map +1 -0
- package/dist/legacy/Footer/styles.js +44 -0
- package/dist/legacy/Footer/styles.js.map +1 -0
- package/dist/legacy/FormComposer/FormComposer.d.ts +41 -0
- package/dist/legacy/FormComposer/FormComposer.js +218 -0
- package/dist/legacy/FormComposer/FormComposer.js.map +1 -0
- package/dist/legacy/FormComposer/index.d.ts +2 -0
- package/dist/legacy/FormComposer/index.js +2 -0
- package/dist/legacy/FormComposer/index.js.map +1 -0
- package/dist/legacy/FormComposer/styles.js +31 -0
- package/dist/legacy/FormComposer/styles.js.map +1 -0
- package/dist/legacy/Loading/Loading.d.ts +32 -0
- package/dist/legacy/Loading/Loading.js +71 -0
- package/dist/legacy/Loading/Loading.js.map +1 -0
- package/dist/legacy/Loading/LoadingWithDelay.d.ts +12 -0
- package/dist/legacy/Loading/LoadingWithDelay.js +97 -0
- package/dist/legacy/Loading/LoadingWithDelay.js.map +1 -0
- package/dist/legacy/Loading/index.d.ts +2 -0
- package/dist/legacy/Loading/index.js +2 -0
- package/dist/legacy/Loading/index.js.map +1 -0
- package/dist/legacy/Loading/styles.js +78 -0
- package/dist/legacy/Loading/styles.js.map +1 -0
- package/dist/legacy/NavigationAnchors/NavigationAnchors.d.ts +46 -0
- package/dist/legacy/NavigationAnchors/NavigationAnchors.js +275 -0
- package/dist/legacy/NavigationAnchors/NavigationAnchors.js.map +1 -0
- package/dist/legacy/NavigationAnchors/index.d.ts +2 -0
- package/dist/legacy/NavigationAnchors/index.js +2 -0
- package/dist/legacy/NavigationAnchors/index.js.map +1 -0
- package/dist/legacy/NavigationAnchors/styles.js +70 -0
- package/dist/legacy/NavigationAnchors/styles.js.map +1 -0
- package/dist/legacy/NotificationPanel/Notification/Notification.js +119 -0
- package/dist/legacy/NotificationPanel/Notification/Notification.js.map +1 -0
- package/dist/legacy/NotificationPanel/Notification/index.js +7 -0
- package/dist/legacy/NotificationPanel/Notification/index.js.map +1 -0
- package/dist/legacy/NotificationPanel/Notification/styles.js +56 -0
- package/dist/legacy/NotificationPanel/Notification/styles.js.map +1 -0
- package/dist/legacy/NotificationPanel/NotificationPanel.d.ts +49 -0
- package/dist/legacy/NotificationPanel/NotificationPanel.js +182 -0
- package/dist/legacy/NotificationPanel/NotificationPanel.js.map +1 -0
- package/dist/legacy/NotificationPanel/Panel/Panel.js +166 -0
- package/dist/legacy/NotificationPanel/Panel/Panel.js.map +1 -0
- package/dist/legacy/NotificationPanel/Panel/index.js +7 -0
- package/dist/legacy/NotificationPanel/Panel/index.js.map +1 -0
- package/dist/legacy/NotificationPanel/Panel/styles.js +66 -0
- package/dist/legacy/NotificationPanel/Panel/styles.js.map +1 -0
- package/dist/legacy/NotificationPanel/index.d.ts +2 -0
- package/dist/legacy/NotificationPanel/index.js +2 -0
- package/dist/legacy/NotificationPanel/index.js.map +1 -0
- package/dist/legacy/NotificationPanel/styles.js +9 -0
- package/dist/legacy/NotificationPanel/styles.js.map +1 -0
- package/dist/legacy/Slider/KnobRing/KnobRing.js +15 -0
- package/dist/legacy/Slider/KnobRing/KnobRing.js.map +1 -0
- package/dist/legacy/Slider/KnobRing/index.js +5 -0
- package/dist/legacy/Slider/KnobRing/index.js.map +1 -0
- package/dist/legacy/Slider/KnobRing/styles.js +32 -0
- package/dist/legacy/Slider/KnobRing/styles.js.map +1 -0
- package/dist/legacy/Slider/Slider.d.ts +133 -0
- package/dist/legacy/Slider/Slider.js +583 -0
- package/dist/legacy/Slider/Slider.js.map +1 -0
- package/dist/legacy/Slider/index.d.ts +2 -0
- package/dist/legacy/Slider/index.js +2 -0
- package/dist/legacy/Slider/index.js.map +1 -0
- package/dist/legacy/Slider/styles.js +108 -0
- package/dist/legacy/Slider/styles.js.map +1 -0
- package/dist/legacy/TimePicker/PeriodPicker/PeriodPicker.js +110 -0
- package/dist/legacy/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -0
- package/dist/legacy/TimePicker/PeriodPicker/index.js +7 -0
- package/dist/legacy/TimePicker/PeriodPicker/index.js.map +1 -0
- package/dist/legacy/TimePicker/PeriodPicker/styles.js +46 -0
- package/dist/legacy/TimePicker/PeriodPicker/styles.js.map +1 -0
- package/dist/legacy/TimePicker/TimePicker.d.ts +77 -0
- package/dist/legacy/TimePicker/TimePicker.js +402 -0
- package/dist/legacy/TimePicker/TimePicker.js.map +1 -0
- package/dist/legacy/TimePicker/UnitTimePicker/UnitTimePicker.js +207 -0
- package/dist/legacy/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -0
- package/dist/legacy/TimePicker/UnitTimePicker/index.js +7 -0
- package/dist/legacy/TimePicker/UnitTimePicker/index.js.map +1 -0
- package/dist/legacy/TimePicker/UnitTimePicker/styles.js +63 -0
- package/dist/legacy/TimePicker/UnitTimePicker/styles.js.map +1 -0
- package/dist/legacy/TimePicker/enums.js +32 -0
- package/dist/legacy/TimePicker/enums.js.map +1 -0
- package/dist/legacy/TimePicker/index.d.ts +2 -0
- package/dist/legacy/TimePicker/index.js +2 -0
- package/dist/legacy/TimePicker/index.js.map +1 -0
- package/dist/legacy/TimePicker/styles.js +96 -0
- package/dist/legacy/TimePicker/styles.js.map +1 -0
- package/dist/legacy/TimePicker/timePickerConverter.js +71 -0
- package/dist/legacy/TimePicker/timePickerConverter.js.map +1 -0
- package/dist/legacy/TimePicker/timePickerFormatter.js +63 -0
- package/dist/legacy/TimePicker/timePickerFormatter.js.map +1 -0
- package/dist/legacy/TimePicker/timePickerUtils.js +27 -0
- package/dist/legacy/TimePicker/timePickerUtils.js.map +1 -0
- package/dist/legacy/index.d.ts +26 -0
- package/dist/legacy/index.js +11 -0
- package/dist/legacy/index.js.map +1 -0
- package/dist/legacy/withStyleProps/WithStyleProps.js +14 -0
- package/dist/legacy/withStyleProps/WithStyleProps.js.map +1 -0
- package/dist/legacy/withStyleProps/index.js +2 -0
- package/dist/legacy/withStyleProps/index.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/Action/Action.d.ts +67 -0
- package/dist/modern/AppSwitcherPanel/Action/Action.js +177 -0
- package/dist/modern/AppSwitcherPanel/Action/Action.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/Action/index.d.ts +2 -0
- package/dist/modern/AppSwitcherPanel/Action/index.js +7 -0
- package/dist/modern/AppSwitcherPanel/Action/index.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/Action/styles.js +77 -0
- package/dist/modern/AppSwitcherPanel/Action/styles.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/AppSwitcherPanel.d.ts +50 -0
- package/dist/modern/AppSwitcherPanel/AppSwitcherPanel.js +167 -0
- package/dist/modern/AppSwitcherPanel/AppSwitcherPanel.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/index.d.ts +2 -0
- package/dist/modern/AppSwitcherPanel/index.js +7 -0
- package/dist/modern/AppSwitcherPanel/index.js.map +1 -0
- package/dist/modern/AppSwitcherPanel/styles.js +55 -0
- package/dist/modern/AppSwitcherPanel/styles.js.map +1 -0
- package/dist/modern/CodeEditor/CodeEditor.d.ts +14 -0
- package/dist/modern/CodeEditor/CodeEditor.js +109 -0
- package/dist/modern/CodeEditor/CodeEditor.js.map +1 -0
- package/dist/modern/CodeEditor/index.d.ts +2 -0
- package/dist/modern/CodeEditor/index.js +2 -0
- package/dist/modern/CodeEditor/index.js.map +1 -0
- package/dist/modern/CodeEditor/styles.js +43 -0
- package/dist/modern/CodeEditor/styles.js.map +1 -0
- package/dist/modern/Footer/Footer.d.ts +12 -0
- package/dist/modern/Footer/Footer.js +51 -0
- package/dist/modern/Footer/Footer.js.map +1 -0
- package/dist/modern/Footer/index.d.ts +2 -0
- package/dist/modern/Footer/index.js +2 -0
- package/dist/modern/Footer/index.js.map +1 -0
- package/dist/modern/Footer/styles.js +43 -0
- package/dist/modern/Footer/styles.js.map +1 -0
- package/dist/modern/FormComposer/FormComposer.d.ts +41 -0
- package/dist/modern/FormComposer/FormComposer.js +183 -0
- package/dist/modern/FormComposer/FormComposer.js.map +1 -0
- package/dist/modern/FormComposer/index.d.ts +2 -0
- package/dist/modern/FormComposer/index.js +2 -0
- package/dist/modern/FormComposer/index.js.map +1 -0
- package/dist/modern/FormComposer/styles.js +29 -0
- package/dist/modern/FormComposer/styles.js.map +1 -0
- package/dist/modern/Loading/Loading.d.ts +32 -0
- package/dist/modern/Loading/Loading.js +72 -0
- package/dist/modern/Loading/Loading.js.map +1 -0
- package/dist/modern/Loading/LoadingWithDelay.d.ts +12 -0
- package/dist/modern/Loading/LoadingWithDelay.js +92 -0
- package/dist/modern/Loading/LoadingWithDelay.js.map +1 -0
- package/dist/modern/Loading/index.d.ts +2 -0
- package/dist/modern/Loading/index.js +2 -0
- package/dist/modern/Loading/index.js.map +1 -0
- package/dist/modern/Loading/styles.js +76 -0
- package/dist/modern/Loading/styles.js.map +1 -0
- package/dist/modern/NavigationAnchors/NavigationAnchors.d.ts +46 -0
- package/dist/modern/NavigationAnchors/NavigationAnchors.js +243 -0
- package/dist/modern/NavigationAnchors/NavigationAnchors.js.map +1 -0
- package/dist/modern/NavigationAnchors/index.d.ts +2 -0
- package/dist/modern/NavigationAnchors/index.js +2 -0
- package/dist/modern/NavigationAnchors/index.js.map +1 -0
- package/dist/modern/NavigationAnchors/styles.js +61 -0
- package/dist/modern/NavigationAnchors/styles.js.map +1 -0
- package/dist/modern/NotificationPanel/Notification/Notification.js +90 -0
- package/dist/modern/NotificationPanel/Notification/Notification.js.map +1 -0
- package/dist/modern/NotificationPanel/Notification/index.js +7 -0
- package/dist/modern/NotificationPanel/Notification/index.js.map +1 -0
- package/dist/modern/NotificationPanel/Notification/styles.js +45 -0
- package/dist/modern/NotificationPanel/Notification/styles.js.map +1 -0
- package/dist/modern/NotificationPanel/NotificationPanel.d.ts +49 -0
- package/dist/modern/NotificationPanel/NotificationPanel.js +153 -0
- package/dist/modern/NotificationPanel/NotificationPanel.js.map +1 -0
- package/dist/modern/NotificationPanel/Panel/Panel.js +133 -0
- package/dist/modern/NotificationPanel/Panel/Panel.js.map +1 -0
- package/dist/modern/NotificationPanel/Panel/index.js +7 -0
- package/dist/modern/NotificationPanel/Panel/index.js.map +1 -0
- package/dist/modern/NotificationPanel/Panel/styles.js +56 -0
- package/dist/modern/NotificationPanel/Panel/styles.js.map +1 -0
- package/dist/modern/NotificationPanel/index.d.ts +2 -0
- package/dist/modern/NotificationPanel/index.js +2 -0
- package/dist/modern/NotificationPanel/index.js.map +1 -0
- package/dist/modern/NotificationPanel/styles.js +9 -0
- package/dist/modern/NotificationPanel/styles.js.map +1 -0
- package/dist/modern/Slider/KnobRing/KnobRing.js +17 -0
- package/dist/modern/Slider/KnobRing/KnobRing.js.map +1 -0
- package/dist/modern/Slider/KnobRing/index.js +5 -0
- package/dist/modern/Slider/KnobRing/index.js.map +1 -0
- package/dist/modern/Slider/KnobRing/styles.js +34 -0
- package/dist/modern/Slider/KnobRing/styles.js.map +1 -0
- package/dist/modern/Slider/Slider.d.ts +133 -0
- package/dist/modern/Slider/Slider.js +542 -0
- package/dist/modern/Slider/Slider.js.map +1 -0
- package/dist/modern/Slider/index.d.ts +2 -0
- package/dist/modern/Slider/index.js +2 -0
- package/dist/modern/Slider/index.js.map +1 -0
- package/dist/modern/Slider/styles.js +99 -0
- package/dist/modern/Slider/styles.js.map +1 -0
- package/dist/modern/TimePicker/PeriodPicker/PeriodPicker.js +88 -0
- package/dist/modern/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -0
- package/dist/modern/TimePicker/PeriodPicker/index.js +7 -0
- package/dist/modern/TimePicker/PeriodPicker/index.js.map +1 -0
- package/dist/modern/TimePicker/PeriodPicker/styles.js +37 -0
- package/dist/modern/TimePicker/PeriodPicker/styles.js.map +1 -0
- package/dist/modern/TimePicker/TimePicker.d.ts +77 -0
- package/dist/modern/TimePicker/TimePicker.js +394 -0
- package/dist/modern/TimePicker/TimePicker.js.map +1 -0
- package/dist/modern/TimePicker/UnitTimePicker/UnitTimePicker.js +186 -0
- package/dist/modern/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -0
- package/dist/modern/TimePicker/UnitTimePicker/index.js +7 -0
- package/dist/modern/TimePicker/UnitTimePicker/index.js.map +1 -0
- package/dist/modern/TimePicker/UnitTimePicker/styles.js +54 -0
- package/dist/modern/TimePicker/UnitTimePicker/styles.js.map +1 -0
- package/dist/modern/TimePicker/enums.js +32 -0
- package/dist/modern/TimePicker/enums.js.map +1 -0
- package/dist/modern/TimePicker/index.d.ts +2 -0
- package/dist/modern/TimePicker/index.js +2 -0
- package/dist/modern/TimePicker/index.js.map +1 -0
- package/dist/modern/TimePicker/styles.js +87 -0
- package/dist/modern/TimePicker/styles.js.map +1 -0
- package/dist/modern/TimePicker/timePickerConverter.js +66 -0
- package/dist/modern/TimePicker/timePickerConverter.js.map +1 -0
- package/dist/modern/TimePicker/timePickerFormatter.js +62 -0
- package/dist/modern/TimePicker/timePickerFormatter.js.map +1 -0
- package/dist/modern/TimePicker/timePickerUtils.js +26 -0
- package/dist/modern/TimePicker/timePickerUtils.js.map +1 -0
- package/dist/modern/index.d.ts +26 -0
- package/dist/modern/index.js +11 -0
- package/dist/modern/index.js.map +1 -0
- package/dist/modern/withStyleProps/WithStyleProps.js +10 -0
- package/dist/modern/withStyleProps/WithStyleProps.js.map +1 -0
- package/dist/modern/withStyleProps/index.js +2 -0
- package/dist/modern/withStyleProps/index.js.map +1 -0
- package/dist/withStyleProps/WithStyleProps.js +25 -0
- package/dist/withStyleProps/WithStyleProps.js.map +1 -0
- package/dist/withStyleProps/index.js +16 -0
- package/dist/withStyleProps/index.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.keys.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.symbol.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.array.filter.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.object.to-string.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
16
|
+
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
|
|
19
|
+
Object.defineProperty(exports, "__esModule", {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
exports.default = void 0;
|
|
23
|
+
|
|
24
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
+
|
|
26
|
+
require("core-js/modules/es.array.concat.js");
|
|
27
|
+
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
+
|
|
32
|
+
var styles = function styles(theme) {
|
|
33
|
+
return {
|
|
34
|
+
root: {
|
|
35
|
+
display: "flex",
|
|
36
|
+
minHeight: "68px",
|
|
37
|
+
backgroundColor: theme.palette.common.white,
|
|
38
|
+
color: theme.hv.palette.accent.acce1,
|
|
39
|
+
padding: "".concat(theme.hv.spacing.sm, "px ").concat(theme.hv.spacing.sm, "px"),
|
|
40
|
+
"&$read": {
|
|
41
|
+
backgroundColor: theme.hv.palette.atmosphere.atmo2
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
read: {},
|
|
45
|
+
iconContainer: {
|
|
46
|
+
width: "32px",
|
|
47
|
+
marginRight: "".concat(theme.hv.spacing.sm, "px")
|
|
48
|
+
},
|
|
49
|
+
title: _objectSpread(_objectSpread({}, theme.hv.typography.highlightText), {}, {
|
|
50
|
+
marginBottom: "5px",
|
|
51
|
+
"&$read": _objectSpread({}, theme.hv.typography.normalText)
|
|
52
|
+
}),
|
|
53
|
+
timeContainer: _objectSpread(_objectSpread({}, theme.hv.typography.vizText), {}, {
|
|
54
|
+
display: "flex",
|
|
55
|
+
alignItems: "center"
|
|
56
|
+
}),
|
|
57
|
+
bullet: {
|
|
58
|
+
width: "6px",
|
|
59
|
+
height: "6px",
|
|
60
|
+
borderRadius: "50%",
|
|
61
|
+
marginRight: "6px",
|
|
62
|
+
backgroundColor: theme.palette.common.black,
|
|
63
|
+
"&$hide": {
|
|
64
|
+
display: "none"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
hide: {}
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var _default = styles;
|
|
72
|
+
exports.default = _default;
|
|
73
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","display","minHeight","backgroundColor","palette","common","white","color","hv","accent","acce1","padding","spacing","sm","atmosphere","atmo2","read","iconContainer","width","marginRight","title","typography","highlightText","marginBottom","normalText","timeContainer","vizText","alignItems","bullet","height","borderRadius","black","hide"],"sources":["../../../src/NotificationPanel/Notification/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n display: \"flex\",\n minHeight: \"68px\",\n backgroundColor: theme.palette.common.white,\n color: theme.hv.palette.accent.acce1,\n padding: `${theme.hv.spacing.sm}px ${theme.hv.spacing.sm}px`,\n\n \"&$read\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo2,\n },\n },\n read: {},\n iconContainer: {\n width: \"32px\",\n marginRight: `${theme.hv.spacing.sm}px`,\n },\n title: {\n ...theme.hv.typography.highlightText,\n marginBottom: \"5px\",\n\n \"&$read\": {\n ...theme.hv.typography.normalText,\n },\n },\n timeContainer: {\n ...theme.hv.typography.vizText,\n display: \"flex\",\n alignItems: \"center\",\n },\n bullet: {\n width: \"6px\",\n height: \"6px\",\n borderRadius: \"50%\",\n marginRight: \"6px\",\n backgroundColor: theme.palette.common.black,\n\n \"&$hide\": {\n display: \"none\",\n },\n },\n hide: {},\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAE,MADL;MAEJC,SAAS,EAAE,MAFP;MAGJC,eAAe,EAAEJ,KAAK,CAACK,OAAN,CAAcC,MAAd,CAAqBC,KAHlC;MAIJC,KAAK,EAAER,KAAK,CAACS,EAAN,CAASJ,OAAT,CAAiBK,MAAjB,CAAwBC,KAJ3B;MAKJC,OAAO,YAAKZ,KAAK,CAACS,EAAN,CAASI,OAAT,CAAiBC,EAAtB,gBAA8Bd,KAAK,CAACS,EAAN,CAASI,OAAT,CAAiBC,EAA/C,OALH;MAOJ,UAAU;QACRV,eAAe,EAAEJ,KAAK,CAACS,EAAN,CAASJ,OAAT,CAAiBU,UAAjB,CAA4BC;MADrC;IAPN,CADmB;IAYzBC,IAAI,EAAE,EAZmB;IAazBC,aAAa,EAAE;MACbC,KAAK,EAAE,MADM;MAEbC,WAAW,YAAKpB,KAAK,CAACS,EAAN,CAASI,OAAT,CAAiBC,EAAtB;IAFE,CAbU;IAiBzBO,KAAK,kCACArB,KAAK,CAACS,EAAN,CAASa,UAAT,CAAoBC,aADpB;MAEHC,YAAY,EAAE,KAFX;MAIH,4BACKxB,KAAK,CAACS,EAAN,CAASa,UAAT,CAAoBG,UADzB;IAJG,EAjBoB;IAyBzBC,aAAa,kCACR1B,KAAK,CAACS,EAAN,CAASa,UAAT,CAAoBK,OADZ;MAEXzB,OAAO,EAAE,MAFE;MAGX0B,UAAU,EAAE;IAHD,EAzBY;IA8BzBC,MAAM,EAAE;MACNV,KAAK,EAAE,KADD;MAENW,MAAM,EAAE,KAFF;MAGNC,YAAY,EAAE,KAHR;MAINX,WAAW,EAAE,KAJP;MAKNhB,eAAe,EAAEJ,KAAK,CAACK,OAAN,CAAcC,MAAd,CAAqB0B,KALhC;MAON,UAAU;QACR9B,OAAO,EAAE;MADD;IAPJ,CA9BiB;IAyCzB+B,IAAI,EAAE;EAzCmB,CAAZ;AAAA,CAAf;;eA4CelC,M"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StandardProps } from "@material-ui/core";
|
|
3
|
+
|
|
4
|
+
interface Header {
|
|
5
|
+
/**
|
|
6
|
+
* The title of the header
|
|
7
|
+
*/
|
|
8
|
+
headerTitle: string;
|
|
9
|
+
/**
|
|
10
|
+
* The icon that denoted close functionality
|
|
11
|
+
*/
|
|
12
|
+
headerCloseImg: React.ElementType<React.HTMLAttributes<HTMLElement>>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface Notification {
|
|
16
|
+
/**
|
|
17
|
+
* Id of notification
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type HvNotificationPanelClassKey = "panel" | "badgeBorder";
|
|
23
|
+
|
|
24
|
+
export interface HvNotificationPanelProps
|
|
25
|
+
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvNotificationPanelClassKey> {
|
|
26
|
+
/**
|
|
27
|
+
* 'true' if panel is open or 'false' if the panel is not open
|
|
28
|
+
*/
|
|
29
|
+
open?: boolean;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* renderable element that opens the notification panel
|
|
33
|
+
*/
|
|
34
|
+
icon: React.ElementType<React.HTMLAttributes<HTMLElement>>;
|
|
35
|
+
/**
|
|
36
|
+
* Object that holds header properties
|
|
37
|
+
*/
|
|
38
|
+
header: Header;
|
|
39
|
+
/**
|
|
40
|
+
* Array of notification object to be rendered inside the panel
|
|
41
|
+
*/
|
|
42
|
+
notifications: Notification[];
|
|
43
|
+
/**
|
|
44
|
+
* renderable footer element
|
|
45
|
+
*/
|
|
46
|
+
footer: React.ElementType<React.HTMLAttributes<HTMLElement>>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default function HvNotificationPanel(props: HvNotificationPanelProps): JSX.Element | null;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.to-string.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.reflect.construct.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.array.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.string.iterator.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/es.weak-map.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
|
|
19
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
20
|
+
|
|
21
|
+
Object.defineProperty(exports, "__esModule", {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
exports.default = void 0;
|
|
25
|
+
|
|
26
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
27
|
+
|
|
28
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
29
|
+
|
|
30
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
31
|
+
|
|
32
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
33
|
+
|
|
34
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
35
|
+
|
|
36
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
37
|
+
|
|
38
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
39
|
+
|
|
40
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
41
|
+
|
|
42
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
43
|
+
|
|
44
|
+
var _map = _interopRequireDefault(require("lodash/map"));
|
|
45
|
+
|
|
46
|
+
var _core = require("@material-ui/core");
|
|
47
|
+
|
|
48
|
+
var _uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
49
|
+
|
|
50
|
+
var _Panel = _interopRequireDefault(require("./Panel"));
|
|
51
|
+
|
|
52
|
+
var _Notification = _interopRequireDefault(require("./Notification"));
|
|
53
|
+
|
|
54
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
55
|
+
|
|
56
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
57
|
+
|
|
58
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
59
|
+
|
|
60
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
61
|
+
|
|
62
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Notification Panel displays all of read and unread notifications. Still in development
|
|
66
|
+
*/
|
|
67
|
+
var HvNotificationPanel = /*#__PURE__*/function (_Component) {
|
|
68
|
+
(0, _inherits2.default)(HvNotificationPanel, _Component);
|
|
69
|
+
|
|
70
|
+
var _super = _createSuper(HvNotificationPanel);
|
|
71
|
+
|
|
72
|
+
function HvNotificationPanel(props) {
|
|
73
|
+
var _this;
|
|
74
|
+
|
|
75
|
+
(0, _classCallCheck2.default)(this, HvNotificationPanel);
|
|
76
|
+
_this = _super.call(this, props);
|
|
77
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleIconClick", function () {
|
|
78
|
+
_this.setState(function (prevState) {
|
|
79
|
+
return {
|
|
80
|
+
open: !prevState.open
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleIconKeyDown", function (e) {
|
|
85
|
+
if (e.keyCode === 13) {
|
|
86
|
+
_this.setState(function (prevState) {
|
|
87
|
+
return {
|
|
88
|
+
open: !prevState.open
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClose", function () {
|
|
94
|
+
_this.setState({
|
|
95
|
+
open: false
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
_this.state = {
|
|
99
|
+
open: props.open
|
|
100
|
+
};
|
|
101
|
+
return _this;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
(0, _createClass2.default)(HvNotificationPanel, [{
|
|
105
|
+
key: "render",
|
|
106
|
+
value: function render() {
|
|
107
|
+
var _this$props = this.props,
|
|
108
|
+
classes = _this$props.classes,
|
|
109
|
+
icon = _this$props.icon,
|
|
110
|
+
header = _this$props.header,
|
|
111
|
+
footer = _this$props.footer,
|
|
112
|
+
notifications = _this$props.notifications;
|
|
113
|
+
var open = this.state.open;
|
|
114
|
+
var n = (0, _map.default)(notifications, function (notification) {
|
|
115
|
+
return /*#__PURE__*/_react.default.createElement(_Notification.default, {
|
|
116
|
+
key: notification.id,
|
|
117
|
+
notification: notification
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
var panelProps = {
|
|
121
|
+
open: open,
|
|
122
|
+
classes: {
|
|
123
|
+
panel: classes.panel
|
|
124
|
+
},
|
|
125
|
+
onClose: this.onClose,
|
|
126
|
+
header: header,
|
|
127
|
+
footer: footer,
|
|
128
|
+
notifications: notifications
|
|
129
|
+
};
|
|
130
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
131
|
+
className: classes.root
|
|
132
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
133
|
+
role: "button",
|
|
134
|
+
className: classes.iconWrapper,
|
|
135
|
+
tabIndex: "0",
|
|
136
|
+
onKeyDown: this.handleIconKeyDown,
|
|
137
|
+
onClick: this.handleIconClick
|
|
138
|
+
}, /*#__PURE__*/_react.default.createElement(_uikitReactCore.HvBadge, {
|
|
139
|
+
icon: icon,
|
|
140
|
+
showCount: true,
|
|
141
|
+
count: notifications.length,
|
|
142
|
+
classes: {
|
|
143
|
+
root: classes.badgeBorder
|
|
144
|
+
}
|
|
145
|
+
})), /*#__PURE__*/_react.default.createElement(_Panel.default, panelProps, n));
|
|
146
|
+
}
|
|
147
|
+
}]);
|
|
148
|
+
return HvNotificationPanel;
|
|
149
|
+
}(_react.Component);
|
|
150
|
+
|
|
151
|
+
process.env.NODE_ENV !== "production" ? HvNotificationPanel.propTypes = {
|
|
152
|
+
/**
|
|
153
|
+
* 'true' if panel is open or 'false' if the panel is not open
|
|
154
|
+
*/
|
|
155
|
+
open: _propTypes.default.bool,
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* A Jss Object used to override or extend the styles applied.
|
|
159
|
+
*/
|
|
160
|
+
classes: _propTypes.default.shape({
|
|
161
|
+
root: _propTypes.default.string,
|
|
162
|
+
iconWrapper: _propTypes.default.string,
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* styles object applied to the panel
|
|
166
|
+
*/
|
|
167
|
+
panel: _propTypes.default.any,
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* styles object applied to badgeContainer
|
|
171
|
+
*/
|
|
172
|
+
badgeBorder: _propTypes.default.any
|
|
173
|
+
}).isRequired,
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* renderable element that opens the notification panel
|
|
177
|
+
*/
|
|
178
|
+
icon: _propTypes.default.element.isRequired,
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Object that holds header properties
|
|
182
|
+
*/
|
|
183
|
+
header: _propTypes.default.shape({
|
|
184
|
+
/**
|
|
185
|
+
* The title of the header
|
|
186
|
+
*/
|
|
187
|
+
headerTitle: _propTypes.default.string.isRequired,
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The icon that denoted close functionality
|
|
191
|
+
*/
|
|
192
|
+
headerCloseImg: _propTypes.default.element.isRequired
|
|
193
|
+
}).isRequired,
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Array of notification object to be rendered inside the panel
|
|
197
|
+
*/
|
|
198
|
+
notifications: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
199
|
+
/**
|
|
200
|
+
* Id of notification
|
|
201
|
+
*/
|
|
202
|
+
id: _propTypes.default.string.isRequired
|
|
203
|
+
})).isRequired,
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* renderable footer element
|
|
207
|
+
*/
|
|
208
|
+
footer: _propTypes.default.element.isRequired
|
|
209
|
+
} : void 0;
|
|
210
|
+
HvNotificationPanel.defaultProps = {
|
|
211
|
+
open: false
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
var _default = (0, _core.withStyles)(_styles.default, {
|
|
215
|
+
name: "HvNotificationPanel"
|
|
216
|
+
})(HvNotificationPanel);
|
|
217
|
+
|
|
218
|
+
exports.default = _default;
|
|
219
|
+
//# sourceMappingURL=NotificationPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationPanel.js","names":["HvNotificationPanel","props","setState","prevState","open","e","keyCode","state","classes","icon","header","footer","notifications","n","map","notification","id","panelProps","panel","onClose","root","iconWrapper","handleIconKeyDown","handleIconClick","length","badgeBorder","Component","propTypes","PropTypes","bool","shape","string","any","isRequired","element","headerTitle","headerCloseImg","arrayOf","defaultProps","withStyles","styles","name"],"sources":["../../src/NotificationPanel/NotificationPanel.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport map from \"lodash/map\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvBadge } from \"@hitachivantara/uikit-react-core\";\nimport Panel from \"./Panel\";\nimport Notification from \"./Notification\";\nimport styles from \"./styles\";\n\n/**\n * Notification Panel displays all of read and unread notifications. Still in development\n */\nclass HvNotificationPanel extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n open: props.open,\n };\n }\n\n handleIconClick = () => {\n this.setState((prevState) => ({\n open: !prevState.open,\n }));\n };\n\n handleIconKeyDown = (e) => {\n if (e.keyCode === 13) {\n this.setState((prevState) => ({\n open: !prevState.open,\n }));\n }\n };\n\n onClose = () => {\n this.setState({\n open: false,\n });\n };\n\n render() {\n const { classes, icon, header, footer, notifications } = this.props;\n const { open } = this.state;\n\n const n = map(notifications, (notification) => (\n <Notification key={notification.id} notification={notification} />\n ));\n\n const panelProps = {\n open,\n classes: {\n panel: classes.panel,\n },\n onClose: this.onClose,\n header,\n footer,\n notifications,\n };\n\n return (\n <div className={classes.root}>\n <div\n role=\"button\"\n className={classes.iconWrapper}\n tabIndex=\"0\"\n onKeyDown={this.handleIconKeyDown}\n onClick={this.handleIconClick}\n >\n <HvBadge\n icon={icon}\n showCount\n count={notifications.length}\n classes={{ root: classes.badgeBorder }}\n />\n </div>\n <Panel {...panelProps}>{n}</Panel>\n </div>\n );\n }\n}\n\nHvNotificationPanel.propTypes = {\n /**\n * 'true' if panel is open or 'false' if the panel is not open\n */\n open: PropTypes.bool,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n root: PropTypes.string,\n iconWrapper: PropTypes.string,\n /**\n * styles object applied to the panel\n */\n panel: PropTypes.any,\n /**\n * styles object applied to badgeContainer\n */\n badgeBorder: PropTypes.any,\n }).isRequired,\n /**\n * renderable element that opens the notification panel\n */\n icon: PropTypes.element.isRequired,\n /**\n * Object that holds header properties\n */\n header: PropTypes.shape({\n /**\n * The title of the header\n */\n headerTitle: PropTypes.string.isRequired,\n /**\n * The icon that denoted close functionality\n */\n headerCloseImg: PropTypes.element.isRequired,\n }).isRequired,\n /**\n * Array of notification object to be rendered inside the panel\n */\n notifications: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * Id of notification\n */\n id: PropTypes.string.isRequired,\n })\n ).isRequired,\n /**\n * renderable footer element\n */\n footer: PropTypes.element.isRequired,\n};\n\nHvNotificationPanel.defaultProps = {\n open: false,\n};\n\nexport default withStyles(styles, { name: \"HvNotificationPanel\" })(HvNotificationPanel);\n"],"mappings":"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"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.reflect.construct.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.array.iterator.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.weak-map.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
14
|
+
|
|
15
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
16
|
+
|
|
17
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
18
|
+
|
|
19
|
+
Object.defineProperty(exports, "__esModule", {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
exports.default = void 0;
|
|
23
|
+
|
|
24
|
+
require("core-js/modules/es.array.concat.js");
|
|
25
|
+
|
|
26
|
+
require("core-js/modules/es.array.filter.js");
|
|
27
|
+
|
|
28
|
+
require("core-js/modules/es.object.to-string.js");
|
|
29
|
+
|
|
30
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
31
|
+
|
|
32
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
33
|
+
|
|
34
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
35
|
+
|
|
36
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
37
|
+
|
|
38
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
39
|
+
|
|
40
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
41
|
+
|
|
42
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
43
|
+
|
|
44
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
45
|
+
|
|
46
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
47
|
+
|
|
48
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
49
|
+
|
|
50
|
+
var _uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
51
|
+
|
|
52
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
53
|
+
|
|
54
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
55
|
+
|
|
56
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
57
|
+
|
|
58
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
59
|
+
|
|
60
|
+
var EnterKeyCode = 13;
|
|
61
|
+
|
|
62
|
+
var Panel = /*#__PURE__*/function (_Component) {
|
|
63
|
+
(0, _inherits2.default)(Panel, _Component);
|
|
64
|
+
|
|
65
|
+
var _super = _createSuper(Panel);
|
|
66
|
+
|
|
67
|
+
function Panel() {
|
|
68
|
+
var _this;
|
|
69
|
+
|
|
70
|
+
(0, _classCallCheck2.default)(this, Panel);
|
|
71
|
+
|
|
72
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
73
|
+
args[_key] = arguments[_key];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
77
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onKeyDownClose", function (e) {
|
|
78
|
+
if (e.keyCode === EnterKeyCode) {
|
|
79
|
+
var onClose = _this.props.onClose;
|
|
80
|
+
onClose();
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
return _this;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
(0, _createClass2.default)(Panel, [{
|
|
87
|
+
key: "render",
|
|
88
|
+
value: function render() {
|
|
89
|
+
var _this$props = this.props,
|
|
90
|
+
classes = _this$props.classes,
|
|
91
|
+
open = _this$props.open,
|
|
92
|
+
_this$props$header = _this$props.header,
|
|
93
|
+
headerTitle = _this$props$header.headerTitle,
|
|
94
|
+
headerCloseImg = _this$props$header.headerCloseImg,
|
|
95
|
+
notifications = _this$props.notifications,
|
|
96
|
+
onClose = _this$props.onClose,
|
|
97
|
+
footer = _this$props.footer,
|
|
98
|
+
children = _this$props.children;
|
|
99
|
+
|
|
100
|
+
var newNotificationCount = _lodash.default.filter(notifications, function (notification) {
|
|
101
|
+
return !notification.isRead;
|
|
102
|
+
}).length;
|
|
103
|
+
|
|
104
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
105
|
+
className: "".concat(classes.root, " ").concat(open ? classes.open : "", " ").concat(classes.panel),
|
|
106
|
+
ref: this.rootRef
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
108
|
+
className: classes.header
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
110
|
+
className: classes.titleContainer
|
|
111
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
+
className: classes.title
|
|
113
|
+
}, headerTitle), /*#__PURE__*/_react.default.createElement(_uikitReactCore.HvBadge, {
|
|
114
|
+
count: newNotificationCount,
|
|
115
|
+
showCount: true
|
|
116
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
117
|
+
role: "button",
|
|
118
|
+
className: classes.close,
|
|
119
|
+
tabIndex: "0",
|
|
120
|
+
onKeyDown: this.onKeyDownClose,
|
|
121
|
+
onClick: onClose
|
|
122
|
+
}, headerCloseImg)), /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
+
className: classes.notificationsContainer
|
|
124
|
+
}, children), /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
+
className: classes.footerContainer
|
|
126
|
+
}, footer));
|
|
127
|
+
}
|
|
128
|
+
}]);
|
|
129
|
+
return Panel;
|
|
130
|
+
}(_react.Component);
|
|
131
|
+
|
|
132
|
+
exports.default = Panel;
|
|
133
|
+
process.env.NODE_ENV !== "production" ? Panel.propTypes = {
|
|
134
|
+
/**
|
|
135
|
+
* 'true' if the panel is open or 'false if the panel is closed
|
|
136
|
+
*/
|
|
137
|
+
open: _propTypes.default.bool,
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Number of new notifications
|
|
141
|
+
*/
|
|
142
|
+
notifications: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
143
|
+
/**
|
|
144
|
+
* 'true' if notification has been read; 'false' otherwise
|
|
145
|
+
*/
|
|
146
|
+
isRead: _propTypes.default.bool.isRequired
|
|
147
|
+
}).isRequired),
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* A Jss Object used to override or extend the styles applied.
|
|
151
|
+
*/
|
|
152
|
+
classes: _propTypes.default.shape({
|
|
153
|
+
/**
|
|
154
|
+
* styles applied to the panel
|
|
155
|
+
*/
|
|
156
|
+
panel: _propTypes.default.string,
|
|
157
|
+
root: _propTypes.default.string,
|
|
158
|
+
open: _propTypes.default.string,
|
|
159
|
+
header: _propTypes.default.string,
|
|
160
|
+
titleContainer: _propTypes.default.string,
|
|
161
|
+
title: _propTypes.default.string,
|
|
162
|
+
close: _propTypes.default.string,
|
|
163
|
+
notificationsContainer: _propTypes.default.string,
|
|
164
|
+
footerContainer: _propTypes.default.string
|
|
165
|
+
}).isRequired,
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The function that will be executed when the panel is closed
|
|
169
|
+
*/
|
|
170
|
+
onClose: _propTypes.default.func.isRequired,
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Object that holds header properties
|
|
174
|
+
*/
|
|
175
|
+
header: _propTypes.default.shape({
|
|
176
|
+
/**
|
|
177
|
+
* The title of the header
|
|
178
|
+
*/
|
|
179
|
+
headerTitle: _propTypes.default.string.isRequired,
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The icon that denoted close functionality
|
|
183
|
+
*/
|
|
184
|
+
headerCloseImg: _propTypes.default.element.isRequired
|
|
185
|
+
}).isRequired,
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The renderable footer element
|
|
189
|
+
*/
|
|
190
|
+
footer: _propTypes.default.element.isRequired,
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Node to be rendered
|
|
194
|
+
*/
|
|
195
|
+
children: _propTypes.default.node
|
|
196
|
+
} : void 0;
|
|
197
|
+
Panel.defaultProps = {
|
|
198
|
+
open: false,
|
|
199
|
+
notifications: [],
|
|
200
|
+
children: null
|
|
201
|
+
};
|
|
202
|
+
//# sourceMappingURL=Panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Panel.js","names":["EnterKeyCode","Panel","e","keyCode","onClose","props","classes","open","header","headerTitle","headerCloseImg","notifications","footer","children","newNotificationCount","_","filter","notification","isRead","length","root","panel","rootRef","titleContainer","title","close","onKeyDownClose","notificationsContainer","footerContainer","Component","propTypes","PropTypes","bool","arrayOf","shape","isRequired","string","func","element","node","defaultProps"],"sources":["../../../src/NotificationPanel/Panel/Panel.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport _ from \"lodash\";\nimport { HvBadge } from \"@hitachivantara/uikit-react-core\";\n\nconst EnterKeyCode = 13;\n\nexport default class Panel extends Component {\n onKeyDownClose = (e) => {\n if (e.keyCode === EnterKeyCode) {\n const { onClose } = this.props;\n onClose();\n }\n };\n\n render() {\n const {\n classes,\n open,\n header: { headerTitle, headerCloseImg },\n notifications,\n onClose,\n footer,\n children,\n } = this.props;\n const newNotificationCount = _.filter(\n notifications,\n (notification) => !notification.isRead\n ).length;\n\n return (\n <div\n className={`${classes.root} ${open ? classes.open : \"\"} ${classes.panel}`}\n ref={this.rootRef}\n >\n <div className={classes.header}>\n <div className={classes.titleContainer}>\n <div className={classes.title}>{headerTitle}</div>\n <HvBadge count={newNotificationCount} showCount />\n </div>\n <div\n role=\"button\"\n className={classes.close}\n tabIndex=\"0\"\n onKeyDown={this.onKeyDownClose}\n onClick={onClose}\n >\n {headerCloseImg}\n </div>\n </div>\n <div className={classes.notificationsContainer}>{children}</div>\n <div className={classes.footerContainer}>{footer}</div>\n </div>\n );\n }\n}\n\nPanel.propTypes = {\n /**\n * 'true' if the panel is open or 'false if the panel is closed\n */\n open: PropTypes.bool,\n /**\n * Number of new notifications\n */\n notifications: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * 'true' if notification has been read; 'false' otherwise\n */\n isRead: PropTypes.bool.isRequired,\n }).isRequired\n ),\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * styles applied to the panel\n */\n panel: PropTypes.string,\n root: PropTypes.string,\n open: PropTypes.string,\n header: PropTypes.string,\n titleContainer: PropTypes.string,\n title: PropTypes.string,\n close: PropTypes.string,\n notificationsContainer: PropTypes.string,\n footerContainer: PropTypes.string,\n }).isRequired,\n /**\n * The function that will be executed when the panel is closed\n */\n onClose: PropTypes.func.isRequired,\n /**\n * Object that holds header properties\n */\n header: PropTypes.shape({\n /**\n * The title of the header\n */\n headerTitle: PropTypes.string.isRequired,\n /**\n * The icon that denoted close functionality\n */\n headerCloseImg: PropTypes.element.isRequired,\n }).isRequired,\n /**\n * The renderable footer element\n */\n footer: PropTypes.element.isRequired,\n /**\n * Node to be rendered\n */\n children: PropTypes.node,\n};\n\nPanel.defaultProps = {\n open: false,\n notifications: [],\n children: null,\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _withStyles = _interopRequireDefault(require("@material-ui/core/styles/withStyles"));
|
|
11
|
+
|
|
12
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
13
|
+
|
|
14
|
+
var _Panel = _interopRequireDefault(require("./Panel"));
|
|
15
|
+
|
|
16
|
+
var _default = (0, _withStyles.default)(_styles.default, {
|
|
17
|
+
name: "HvNotificationPanelPanel"
|
|
18
|
+
})(_Panel.default);
|
|
19
|
+
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["withStyles","styles","name","Panel"],"sources":["../../../src/NotificationPanel/Panel/index.js"],"sourcesContent":["import withStyles from \"@material-ui/core/styles/withStyles\";\nimport styles from \"./styles\";\nimport Panel from \"./Panel\";\n\nexport default withStyles(styles, { name: \"HvNotificationPanelPanel\" })(Panel);\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;eAEe,IAAAA,mBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAyDC,cAAzD,C"}
|