@corva/ui 0.96.0-4 → 0.96.0-rc.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/cjs-bundle/components/AddComment/Popover.js +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js +1 -1
- package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
- package/cjs-bundle/components/Annotations/components/AnnotationsList/components/Annotation/index.js +1 -1
- package/cjs-bundle/components/Annotations/components/LastAnnotation/index.js +1 -1
- package/cjs-bundle/components/Autocomplete/Autocomplete.js +1 -1
- package/cjs-bundle/components/Avatar/index.js +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
- package/cjs-bundle/components/Breadcrumbs/index.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Checkbox/index.js +1 -1
- package/cjs-bundle/components/Chip/index.js +1 -1
- package/cjs-bundle/components/Comment/CommentIcon/index.js +1 -1
- package/cjs-bundle/components/Comment/index.js +1 -1
- package/cjs-bundle/components/CommentInput/index.js +1 -1
- package/cjs-bundle/components/CommentsInfo/index.js +1 -1
- package/cjs-bundle/components/ContextMenuItem/index.js +1 -1
- package/cjs-bundle/components/CopyToClipboard/CopyToClipboard.js +1 -1
- package/cjs-bundle/components/Counter/index.js +1 -1
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/cjs-bundle/components/EmptyState/EmptyState.js +1 -1
- package/cjs-bundle/components/EmptyState/constants.js +1 -1
- package/cjs-bundle/components/EmptyState/utils.js +1 -1
- package/cjs-bundle/components/EmptyView/EmptyAppView/EmptyAppView.js +1 -1
- package/cjs-bundle/components/EmptyView/EmptyView.js +1 -1
- package/cjs-bundle/components/FeedItem/components/AvatarIcon.js +1 -1
- package/cjs-bundle/components/FileIcon/FileIcon.js +1 -1
- package/cjs-bundle/components/MenuItem/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/cjs-bundle/components/SettingEditors/ColorEditor/index.js +1 -1
- package/cjs-bundle/components/SettingEditors/ColorEditor/style.css.js +1 -1
- package/cjs-bundle/components/Template/TemplateSharingDialog/UsersChipSelector.js +1 -1
- package/cjs-bundle/components/UserMention/index.js +1 -1
- package/cjs-bundle/components/index.js +1 -1
- package/components/AddComment/Popover.js +1 -1
- package/components/AddComment/components/Content.js +1 -1
- package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
- package/components/Annotations/components/AnnotationsList/components/Annotation/index.js +1 -1
- package/components/Annotations/components/LastAnnotation/index.js +1 -1
- package/components/Autocomplete/Autocomplete.d.ts +41 -36
- package/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/components/Autocomplete/Autocomplete.js +1 -1
- package/components/Autocomplete/Autocomplete.stories.d.ts +13 -0
- package/components/Autocomplete/Autocomplete.stories.d.ts.map +1 -0
- package/components/Avatar/Avatar.stories.d.ts +19 -0
- package/components/Avatar/Avatar.stories.d.ts.map +1 -0
- package/components/Avatar/index.d.ts +9 -101
- package/components/Avatar/index.d.ts.map +1 -1
- package/components/Avatar/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/Breadcrumbs/Breadcrumbs.stories.d.ts +8 -0
- package/components/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
- package/components/Breadcrumbs/index.d.ts +11 -10
- package/components/Breadcrumbs/index.d.ts.map +1 -1
- package/components/Breadcrumbs/index.js +1 -1
- package/components/Button/Button.stories.d.ts.map +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/components/Checkbox/Checkbox.stories.d.ts +10 -0
- package/components/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/components/Checkbox/index.d.ts +13 -11
- package/components/Checkbox/index.d.ts.map +1 -1
- package/components/Checkbox/index.js +1 -1
- package/components/Chip/Chip.stories.d.ts +9 -0
- package/components/Chip/Chip.stories.d.ts.map +1 -0
- package/components/Chip/index.d.ts +9 -8
- package/components/Chip/index.d.ts.map +1 -1
- package/components/Chip/index.js +1 -1
- package/components/ColorPicker/ColorPicker.stories.d.ts +8 -0
- package/components/ColorPicker/ColorPicker.stories.d.ts.map +1 -0
- package/components/Comment/CommentIcon/CommentIcon.stories.d.ts +8 -0
- package/components/Comment/CommentIcon/CommentIcon.stories.d.ts.map +1 -0
- package/components/Comment/CommentIcon/index.d.ts +5 -20
- package/components/Comment/CommentIcon/index.d.ts.map +1 -1
- package/components/Comment/CommentIcon/index.js +1 -1
- package/components/Comment/index.js +1 -1
- package/components/CommentInput/index.js +1 -1
- package/components/CommentsInfo/index.js +1 -1
- package/components/ContextMenuItem/ContextMenuItem.stories.d.ts +10 -0
- package/components/ContextMenuItem/ContextMenuItem.stories.d.ts.map +1 -0
- package/components/ContextMenuItem/index.d.ts +11 -23
- package/components/ContextMenuItem/index.d.ts.map +1 -1
- package/components/ContextMenuItem/index.js +1 -1
- package/components/CopyToClipboard/CopyToClipboard.d.ts +23 -41
- package/components/CopyToClipboard/CopyToClipboard.d.ts.map +1 -1
- package/components/CopyToClipboard/CopyToClipboard.js +1 -1
- package/components/CopyToClipboard/CopyToClipboard.stories.d.ts +8 -0
- package/components/CopyToClipboard/CopyToClipboard.stories.d.ts.map +1 -0
- package/components/Counter/Counter.stories.d.ts +10 -0
- package/components/Counter/Counter.stories.d.ts.map +1 -0
- package/components/Counter/index.d.ts +11 -33
- package/components/Counter/index.d.ts.map +1 -1
- package/components/Counter/index.js +1 -1
- package/components/DatePicker/DatePicker.stories.d.ts +8 -0
- package/components/DatePicker/DatePicker.stories.d.ts.map +1 -0
- package/components/DateTimePicker/DateTimePicker.stories.d.ts +8 -0
- package/components/DateTimePicker/DateTimePicker.stories.d.ts.map +1 -0
- package/components/DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.d.ts +4 -4
- package/components/DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.d.ts.map +1 -1
- package/components/DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.stories.d.ts +9 -0
- package/components/DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.stories.d.ts.map +1 -0
- package/components/DevCenter/AppHeader/AppHeader.stories.d.ts +15 -0
- package/components/DevCenter/AppHeader/AppHeader.stories.d.ts.map +1 -0
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.d.ts +10 -7
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.d.ts.map +1 -1
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.stories.d.ts +8 -0
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.stories.d.ts.map +1 -0
- package/components/DocumentViewer/DocumentViewer.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/components/EmptyState/EmptyState.d.ts +18 -55
- package/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/components/EmptyState/EmptyState.js +1 -1
- package/components/EmptyState/EmptyState.stories.d.ts +11 -0
- package/components/EmptyState/EmptyState.stories.d.ts.map +1 -0
- package/components/EmptyState/constants.d.ts +7 -38
- package/components/EmptyState/constants.d.ts.map +1 -1
- package/components/EmptyState/constants.js +1 -1
- package/components/EmptyState/images/index.d.ts.map +1 -1
- package/components/EmptyState/utils.d.ts +1 -1
- package/components/EmptyState/utils.d.ts.map +1 -1
- package/components/EmptyState/utils.js +1 -1
- package/components/EmptyView/EmptyAppView/EmptyAppView.d.ts +24 -81
- package/components/EmptyView/EmptyAppView/EmptyAppView.d.ts.map +1 -1
- package/components/EmptyView/EmptyAppView/EmptyAppView.js +1 -1
- package/components/EmptyView/EmptyAppView/EmptyAppView.stories.d.ts +11 -0
- package/components/EmptyView/EmptyAppView/EmptyAppView.stories.d.ts.map +1 -0
- package/components/EmptyView/EmptyView.d.ts +16 -30
- package/components/EmptyView/EmptyView.d.ts.map +1 -1
- package/components/EmptyView/EmptyView.js +1 -1
- package/components/EmptyView/EmptyView.stories.d.ts +8 -0
- package/components/EmptyView/EmptyView.stories.d.ts.map +1 -0
- package/components/FeedItem/components/AvatarIcon.js +1 -1
- package/components/FileIcon/FileIcon.d.ts +4 -3
- package/components/FileIcon/FileIcon.d.ts.map +1 -1
- package/components/FileIcon/FileIcon.js +1 -1
- package/components/FileIcon/FileIcon.stories.d.ts +8 -981
- package/components/FileIcon/FileIcon.stories.d.ts.map +1 -1
- package/components/MenuItem/MenuItem.stories.d.ts +10 -0
- package/components/MenuItem/MenuItem.stories.d.ts.map +1 -0
- package/components/MenuItem/index.d.ts +15 -1
- package/components/MenuItem/index.d.ts.map +1 -1
- package/components/MenuItem/index.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/components/SettingEditors/ColorEditor/ColorEditor.stories.d.ts +9 -0
- package/components/SettingEditors/ColorEditor/ColorEditor.stories.d.ts.map +1 -0
- package/components/SettingEditors/ColorEditor/index.d.ts +18 -89
- package/components/SettingEditors/ColorEditor/index.d.ts.map +1 -1
- package/components/SettingEditors/ColorEditor/index.js +1 -1
- package/components/SettingEditors/ColorEditor/style.css.js +1 -1
- package/components/Template/TemplateSharingDialog/UsersChipSelector.js +1 -1
- package/components/UserMention/index.js +1 -1
- package/components/index.js +1 -1
- package/package.json +1 -1
- package/storyBookHelpers/components.d.ts +3 -2
- package/storyBookHelpers/components.d.ts.map +1 -1
- package/storyBookHelpers/index.d.ts +1 -0
- package/storyBookHelpers/index.d.ts.map +1 -1
- package/storyBookHelpers/types.d.ts +6 -0
- package/storyBookHelpers/types.d.ts.map +1 -0
- package/storyBookHelpers/utils.d.ts +9 -4
- package/storyBookHelpers/utils.d.ts.map +1 -1
package/components/Chip/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as i}from"react/jsx-runtime";import{forwardRef as t}from"react";import s from"
|
|
1
|
+
import{__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as i}from"react/jsx-runtime";import{forwardRef as t}from"react";import s from"classnames";import{makeStyles as c,Chip as e}from"@material-ui/core";import{CloseSmallIcon as n}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";var a=function(o){var i=o.width,t=void 0===i?24:i,s=o.height,c=void 0===s?24:s,e=o.fill,n=(void 0===e?"":e).replace("#","%23");return"<svg width='".concat(t,"' height='").concat(c,"' viewBox='0 0 24 24' fill='").concat(n,"' xmlns='http://www.w3.org/2000/svg'><path d='M20.5303 6.46967C20.8232 6.76256 20.8232 7.23744 20.5303 7.53033L10.5303 17.5303C10.2374 17.8232 9.76256 17.8232 9.46967 17.5303L4.46967 12.5303C4.17678 12.2374 4.17678 11.7626 4.46967 11.4697C4.76256 11.1768 5.23744 11.1768 5.53033 11.4697L10 15.9393L19.4697 6.46967C19.7626 6.17678 20.2374 6.17678 20.5303 6.46967Z'/></svg>")},r=c((function(o){return{checked:{"&::before":{content:'url("data:image/svg+xml; utf8, '.concat(a({fill:o.palette.primary.main}),'")'),display:"flex",alignItems:"center",justifyContent:"center",width:24,height:16,lineHeight:"16px",marginLeft:8,marginRight:"-4px",paddingTop:3},"&.Mui-disabled::before":{content:'url("data:image/svg+xml; utf8, '.concat(a({fill:o.palette.primary.text8}),'")')},"&.MuiChip-sizeSmall::before":{content:'url("data:image/svg+xml; utf8, '.concat(a({width:12,fill:o.palette.primary.main}),'")'),width:16,height:16},"&.MuiChip-sizeSmall.Mui-disabled::before":{content:'url("data:image/svg+xml; utf8, '.concat(a({width:12,fill:o.palette.primary.text8}),'")')},"&.MuiChip-root.MuiChip-clickable":{"& .MuiChip-label, & .MuiChip-deleteIcon, & .MuiChip-icon":{color:"#FFFFFF"}},"& .MuiChip-label:first-child":{marginLeft:"-4px"}},basic:{"&:not([data-not-migrated-MuiChip])":{"&.MuiChip-sizeSmall":{height:12,"& .MuiChip-label":{fontSize:10}},border:"none",textTransform:"uppercase",backgroundColor:o.palette.primary.main,padding:"0 8px",height:16,"& .MuiChip-label":{fontSize:12,fontWeight:500,lineHeight:"12px",letterSpacing:"1px",color:o.palette.background.b1,padding:0},"&:hover":{backgroundColor:o.palette.primary.main,"& .MuiChip-label":{color:o.palette.background.b1}}}}}})),l=t((function(t,c){var a,l=t.checked,m=t.classes,p=void 0===m?{}:m,d=t["data-testid"],u=void 0===d?"Chip":d,h=r(),f=s(t.className,((a={})[h.basic]="basic"===t.variant,a)),g="basic"===t.variant?"default":t.variant;return i(e,o({},t,l?{"data-testid":"Chip",ref:c,className:f,classes:o(o({},p),{root:s(p.root,h.checked)}),variant:g,deleteIcon:i(n,{"data-testid":"".concat("Chip","_remove_icon"),size:16})}:{"data-testId":u,ref:c,className:f,variant:g,deleteIcon:i(n,{"data-testid":"".concat("Chip","_remove_icon"),size:16})}))}));export{l as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import ColorPicker from './ColorPicker';
|
|
4
|
+
declare type Props = ComponentProps<typeof ColorPicker>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
//# sourceMappingURL=ColorPicker.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorPicker.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,aAAK,KAAK,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAeF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAA+B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import CommentIcon from './index';
|
|
4
|
+
declare type Props = ComponentProps<typeof CommentIcon>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
//# sourceMappingURL=CommentIcon.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommentIcon.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Comment/CommentIcon/CommentIcon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,WAAW,MAAM,SAAS,CAAC;AAElC,aAAK,KAAK,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAUF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAA+B,CAAC"}
|
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
({ displayName, imgSrc, size }: CommentIconProps): JSX.Element;
|
|
7
|
-
propTypes: {
|
|
8
|
-
displayName: PropTypes.Requireable<string>;
|
|
9
|
-
imgSrc: PropTypes.Requireable<string>;
|
|
10
|
-
size: PropTypes.Requireable<number>;
|
|
11
|
-
};
|
|
12
|
-
defaultProps: {
|
|
13
|
-
displayName: string;
|
|
14
|
-
imgSrc: any;
|
|
15
|
-
size: number;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
declare const commentIconProps: {
|
|
19
|
-
displayName: PropTypes.Requireable<string>;
|
|
20
|
-
imgSrc: PropTypes.Requireable<string>;
|
|
21
|
-
size: PropTypes.Requireable<number>;
|
|
2
|
+
export declare type CommentIconProps = {
|
|
3
|
+
displayName?: string;
|
|
4
|
+
imgSrc?: string;
|
|
5
|
+
size?: number;
|
|
22
6
|
};
|
|
7
|
+
declare const CommentIcon: ({ displayName, imgSrc, size }: CommentIconProps) => JSX.Element;
|
|
23
8
|
export default CommentIcon;
|
|
24
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Comment/CommentIcon/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Comment/CommentIcon/index.tsx"],"names":[],"mappings":";AAkCA,oBAAY,gBAAgB,GAAG;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,QAAA,MAAM,WAAW,kCAA6C,gBAAgB,KAAG,WAgBhF,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as i}from"react/jsx-runtime";import
|
|
1
|
+
import{__assign as t}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as i}from"react/jsx-runtime";import{makeStyles as o,Tooltip as e,IconButton as r,Badge as a}from"@material-ui/core";import{isNativeDetected as l,isMobileDetected as m}from"../../../utils/mobileDetect.js";import{AvatarComponent as s}from"../../Avatar/index.js";import p from"./BadgeIcon.js";var d=l||m,n=o((function(t){return{icon:{padding:0,"&:hover":{"& .MuiBadge-root .MuiBadge-badge svg path":{"&:first-of-type":{fill:t.palette.primary.light}},"& .MuiAvatar-root":{outline:"1px solid ".concat(t.palette.primary.light)}},marginTop:4},badge:{top:2,right:6,"&:hover":{"& svg path":{"&:first-of-type":{fill:t.palette.primary.light}}}},tooltip:{marginTop:8}}})),c=function(o){var l=o.displayName,m=void 0===l?"":l,c=o.imgSrc,g=o.size,f=void 0===g?24:g,u=n();return i(e,t({title:!d&&"Add Comment",placement:"bottom",classes:{tooltip:u.tooltip}},{children:i(r,t({classes:{root:u.icon}},{children:i(a,t({classes:{badge:u.badge},badgeContent:i(p,{})},{children:i(s,{displayName:m,size:f,imgSrc:c})}))}))}))};export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import c from"@babel/runtime/regenerator";import{createRef as l,PureComponent as m}from"react";import p from"prop-types";import u from"moment";import{get as d,includes as h,noop as f}from"lodash";import v from"classnames";import{withStyles as y}from"@material-ui/core/styles";import b from"@material-ui/core/Typography";import g from"@material-ui/core/Menu";import C from"@material-ui/core/MenuItem";import M from"@material-ui/icons/MoreVert";import{deleteFeedItemComment as D}from"../../clients/jsonApi/index.js";import E from"./styles.css.js";import w from"../CommentWrapper.js";import O from"../CommentLoader.js";import I from"../CommentInput/index.js";import j
|
|
1
|
+
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import c from"@babel/runtime/regenerator";import{createRef as l,PureComponent as m}from"react";import p from"prop-types";import u from"moment";import{get as d,includes as h,noop as f}from"lodash";import v from"classnames";import{withStyles as y}from"@material-ui/core/styles";import b from"@material-ui/core/Typography";import g from"@material-ui/core/Menu";import C from"@material-ui/core/MenuItem";import M from"@material-ui/icons/MoreVert";import{deleteFeedItemComment as D}from"../../clients/jsonApi/index.js";import E from"./styles.css.js";import w from"../CommentWrapper.js";import O from"../CommentLoader.js";import I from"../CommentInput/index.js";import{AvatarComponent as j}from"../Avatar/index.js";import k from"../Attachment/index.js";import x from"../IconButton/index.js";import A from"../ConfirmationDialog.js";import N from"../UserCardPopover.js";import{formatMentionText as _}from"../UserMention/utils/index.js";import{isNativeDetected as S}from"../../utils/mobileDetect.js";import R from"../../utils/main.js";import{jsxs as P,jsx as U}from"react/jsx-runtime";function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return i(this,n)}}var W={chatAvatarWrapper:{paddingTop:2,position:"absolute",top:6,left:0},commentInfoContainer:{display:"inline-flex",alignItems:"center",width:"100%",paddingTop:5},userNameWrapper:{overflow:"hidden"},infoContainer:{display:"inline-block",verticalAlign:"top",width:"100%",paddingLeft:33}},T=function(i){o(p,m);var a=L(p);function p(n){var o,i;return t(this,p),o=a.call(this,n),s(r(o),"deleteComment",(i=e(c.mark((function e(t,n){var r;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,D(t,n);case 3:r=e.sent,e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0);case 9:return e.abrupt("return",r);case 10:case"end":return e.stop()}}),e,null,[[0,6]])}))),function(e,t){return i.apply(this,arguments)})),s(r(o),"showIntoView",(function(){o.props.handleShowOnMount(),o.commentEl.current.scrollIntoView({block:"end"})})),s(r(o),"handleOpenActionsMenu",(function(e){e.stopPropagation(),o.setState({actionsMenuAnchorEl:e.currentTarget})})),s(r(o),"handleCloseActionsMenu",(function(e){e.stopPropagation(),o.setState({actionsMenuAnchorEl:null})})),s(r(o),"handleKeyDown",(function(e){27===e.keyCode&&o.setState({isEditing:!1}),document.removeEventListener("keydown",o.handleKeyDown,!1)})),s(r(o),"handleEditMenuItem",(function(){document.addEventListener("keydown",o.handleKeyDown,!1),o.setState({isEditing:!0},(function(){o.inputEl.current&&o.inputEl.current.focus()}))})),s(r(o),"getEditCommentProps",(function(){var e=o.props.comment,t=e.id,n=e.body,r=e.attachment;return{editFeedItemId:e.feed_activity_id,editCommentId:t,editComment:n,editAttachment:r}})),s(r(o),"onEditFinish",(function(){o.setState({isEditing:!1,isLoading:!1})})),s(r(o),"handleDeleteMenuItem",(function(){o.setState({openDeleteDialog:!0})})),s(r(o),"handleDelete",e(c.mark((function e(){var t,n,r;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.props.comment.id,n=o.props.comment.feed_activity_id,o.setState({isLoading:!0}),e.next=5,o.deleteComment(n,t);case 5:r=e.sent,o.setState({isLoading:!1,openDeleteDialog:!1}),r&&o.props.handleDeleteCallback(t);case 8:case"end":return e.stop()}}),e)})))),o.state={actionsMenuAnchorEl:null,isLoading:!1,isEditing:!1,openDeleteDialog:!1},o.inputEl=l(),o.commentEl=l(),o}return n(p,[{key:"componentDidMount",value:function(){this.props.showOnMount&&this.showIntoView()}},{key:"isCurrentUserCommentCreator",get:function(){return Number(d(this.props.comment,["user","id"]))===Number(this.props.currentUser.id)}},{key:"renderMenuIcon",value:function(){var e=this.isCurrentUserCommentCreator,t=this.isCurrentUserCommentCreator||h(this.props.comment.allowed_actions,"destroy");return t||e?P("div",{className:E.cCommentMenu,children:[U(x,{"data-testid":"".concat("comment","_menuButton"),"aria-label":"Actions","aria-owns":this.state.actionsMenuAnchorEl?"c-comment__actions-menu":void 0,"aria-haspopup":"true",className:this.props.classes.iconButtonRoot,size:"small",onClick:this.handleOpenActionsMenu,children:U(M,{})}),P(g,{id:"c-comment__actions-menu",anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:this.state.actionsMenuAnchorEl,open:!!this.state.actionsMenuAnchorEl,onClick:this.handleCloseActionsMenu,onClose:this.handleCloseActionsMenu,children:[e&&U(C,{"data-testid":"".concat("comment","_editMenuItem"),onClick:this.handleEditMenuItem,children:"Edit"}),t&&U(C,{"data-testid":"".concat("comment","_deleteMenuItem"),onClick:this.handleDeleteMenuItem,children:"Delete"})]})]}):null}},{key:"render",value:function(){var e,t,n=this,r=this.state,o=r.isLoading,i=r.isEditing;if(o){var a=this.props.spaceAround;return U(O,{spaceAround:a})}var c=this.props,l=c.comment,m=c.classes,p=c.spaceAround,h=c.isNative,y=c.patchCommentCallback,g=c.companyId;if(i)return U(I,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({inputRef:this.inputEl,postComment:f,exitEditMode:this.onEditFinish,setIsEditting:function(){return n.setState({isLoading:!0})},patchCommentCallback:y,companyId:g,currentUser:this.props.currentUser},this.getEditCommentProps()));var C=R.getUserFullName(l.user),M=h?"MM/DD HH:mm":"MM/DD/YY HH:mm",D=u(l.created_at).format(M),x=(null==l||null===(e=l.attachment)||void 0===e?void 0:e.signed_url)||(null==l||null===(t=l.attachment)||void 0===t?void 0:t.url),S=d(l,["attachment","size"]),L=d(l,["attachment","file_name"]);return P("div",{"data-testid":"".concat("comment","_commentItem_").concat(l.body),className:v(E.cComment,s({},E.cCommentNative,h)),ref:this.commentEl,children:[P(w,{spaceAround:p,className:this.props.classes.commentWrapper,children:[U("div",{style:W.chatAvatarWrapper,children:h?U(j,{size:24,displayName:C,imgSrc:d(l,["user","profile_photo"]),className:this.props.classes.avatar}):U(N,{user:l.user,currentUser:this.props.currentUser,children:U(j,{size:24,displayName:C,imgSrc:d(l,["user","profile_photo"]),className:this.props.classes.avatar})})}),P("div",{style:W.infoContainer,children:[U("div",{children:P("div",{style:W.commentInfoContainer,children:[U("div",{style:W.userNameWrapper,children:U(b,{"data-testid":"".concat("comment","_userName"),variant:"subtitle2",noWrap:!0,className:m.userName,children:C})}),U("div",{style:W.timeWrapper,children:U(b,{"data-testid":"".concat("comment","_addTime"),variant:"caption",classes:{root:m.timeRoot},children:D})})]})}),P("div",{className:E.cCommentBody,children:[this.renderMenuIcon(),U(b,{"data-testid":"".concat("comment","_commentMessage"),variant:"body1",classes:{root:m.textRoot},children:_(l.body,l.mentioned_users,h,"#00bcd4",this.props.currentUser)}),x&&U(k,{attachmentUrl:x,attachmentSize:S,size:"small",fileName:L})]})]})]}),this.state.openDeleteDialog&&U(A,{open:this.state.openDeleteDialog,text:"Do you really want to delete comment?",handleClose:function(){return n.setState({openDeleteDialog:!1})},handleOk:this.handleDelete,okText:"Delete"})]})}}]),p}();T.propTypes={comment:p.shape({}).isRequired,showOnMount:p.bool,spaceAround:p.bool,handleShowOnMount:p.func,handleEdit:p.func,handleDeleteCallback:p.func.isRequired,patchCommentCallback:p.func.isRequired,companyId:p.number,currentUser:p.shape(),classes:p.shape({}).isRequired,isNative:p.bool},T.defaultProps={showOnMount:!1,spaceAround:!1,handleShowOnMount:f,handleEdit:f,companyId:null,isNative:S,currentUser:{}};var B=y((function(e){return{commentWrapper:{width:"100%"},timeRoot:{color:e.palette.primary.text7,float:"right",marginRight:5,marginLeft:8,fontSize:"12px"},textRoot:{marginTop:5,color:"#CCC",fontWeight:"normal",fontSize:"14px"},iconButtonRoot:{float:"right",visibility:"hidden",color:e.palette.primary.text7},userName:{fontSize:"12px",fontWeight:"bold"}}}))(T);export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import i from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import{PureComponent as c}from"react";import p from"prop-types";import m from"lodash/noop";import{withStyles as u}from"@material-ui/core/styles";import{Paper as d,TextField as h,InputAdornment as f,Collapse as g,Typography as C}from"@material-ui/core";import b from"classnames";import{get as I}from"lodash";import v from"@material-ui/core/colors/grey";import{patchFeedItemComment as x}from"../../clients/jsonApi/index.js";import y from"./styles.css.js";import E from"../Avatar/index.js";import F from"../FileUploadIconButton.js";import S from"../EmojiIconButton.js";import U from"../FailedFileUploading.js";import N from"../UserMention/index.js";import k from"../FilePreview/index.js";import A from"../IconButton/index.js";import M from"../Icons/SendIcon.js";import{isSuggestionsListOpened as R}from"../UserMention/utils/index.js";import j from"../../utils/main.js";import{isNativeDetected as B}from"../../utils/mobileDetect.js";import{notifyCommentEdit as w,notifyCommentPost as P}from"../../utils/nativeMessages.js";import{jsxs as T,jsx as L}from"react/jsx-runtime";function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=r(t);if(e){var i=r(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return a(this,n)}}var D={chatAvatarWrapper:{display:"flex",alignItems:"center",position:"absolute",left:0,height:32},commentTextFieldContainer:{position:"relative",margin:"0"},commentTextFieldContainerSpaceAround:{position:"relative",margin:"20px 10px"}},_=function(a){i(p,c);var r=z(p);function p(n){var i,a,c;return e(this,p),i=r.call(this,n),s(o(i),"handleSelectEmoji",(function(t){return i.setState((function(e){var n=e.comment;return{comment:"".concat(n).concat(t.native)}}))})),s(o(i),"postComment",(a=t(l.mark((function t(e){var n;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.props.postComment(e);case 3:n=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0.message);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(t){return a.apply(this,arguments)})),s(o(i),"patchComment",(c=t(l.mark((function t(e){var n,o,a,r;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.props,o=n.editFeedItemId,a=n.editCommentId,t.prev=1,t.next=4,x(o,a,e);case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0.message);case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t){return c.apply(this,arguments)})),s(o(i),"clearCommentField",(function(t){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},(function(){i.focusOnRef(),t&&"function"==typeof t&&t()}))})),s(o(i),"handleKeyDown",(function(t){var e=t.key;"Escape"===e&&i.props.exitEditMode(),"Enter"===e&&(R()||(t.preventDefault(),i.handleSendComment()))})),s(o(i),"handleAttachmentLoadingError",(function(t){i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:t})})),s(o(i),"handleFileUpload",(function(t,e,n){i.setState({attachmentUrl:t,attachmentName:e,attachmentSize:n,attachmentLoadingError:null})})),s(o(i),"handleNativeFileUpload",(function(){var t=i.state.comment;i.isEditMode?(w(t),i.clearCommentField(i.props.exitEditMode)):(P(t),i.clearCommentField())})),s(o(i),"handleFileDelete",(function(){return i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null})})),s(o(i),"handleSendComment",t(l.mark((function t(){var e,n,o;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=i.state.comment?i.state.comment.trim():null)||i.state.attachmentUrl){t.next=3;break}return t.abrupt("return");case 3:if(n={comment:{body:e,attachment:{url:i.state.attachmentUrl,size:i.state.attachmentSize,file_name:i.state.attachmentName}}},!i.isEditMode){t.next=16;break}return i.props.setIsEditting(!0),t.next=8,i.patchComment(n);case 8:return o=t.sent,t.next=11,i.props.patchCommentCallback(o);case 11:i.props.setIsEditting(!1),i.clearCommentField(),i.props.exitEditMode(),t.next=24;break;case 16:return i.props.setIsPosting(!0),t.next=19,i.postComment(n);case 19:return o=t.sent,t.next=22,i.props.postCommentCallback(o);case 22:i.props.setIsPosting(!1),i.clearCommentField();case 24:case"end":return t.stop()}}),t)})))),s(o(i),"handleCancelClick",(function(){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},i.props.exitEditMode())})),i.state={comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:null,isInputFocused:!1},i}return n(p,[{key:"componentDidMount",value:function(){this.isEditMode&&this.setInitialCommentValue()}},{key:"componentDidUpdate",value:function(t){(this.isEditMode&&!t.editFeedItemId||this.props.editCommentId&&this.props.editCommentId!==t.editCommentId)&&this.setInitialCommentValue()}},{key:"isEditMode",get:function(){return!!this.props.editFeedItemId}},{key:"setInitialCommentValue",value:function(){var t=this.props.editAttachment?this.props.editAttachment.url:null;this.setState({comment:this.props.editComment,attachmentUrl:t,attachmentName:t?this.props.editAttachment.file_name||j.getFileNameWithExtensionFromPath(t):null,attachmentSize:this.props.editAttachment?this.props.editAttachment.size:null})}},{key:"focusOnRef",value:function(){this.props.inputRef&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var t,e=this,n=this.props,o=n.classes,i=n.currentUser,a="".concat(I(i,["attributes","first_name"])||I(i,"first_name")," ").concat(I(i,["attributes","last_name"])||I(i,"last_name")),r=this.state.isInputFocused||this.state.attachmentUrl||this.state.comment||this.props.editComment||(null===(t=this.props.editAttachment)||void 0===t?void 0:t.url);return T("div",{style:this.props.spaceAround?D.commentTextFieldContainerSpaceAround:D.commentTextFieldContainer,children:[L("div",{style:D.chatAvatarWrapper,children:L(E,{displayName:a,size:32,imgSrc:this.props.currentUser&&this.props.currentUser.profile_photo})}),L(d,{className:this.props.classes.paperRoot,children:L(h,{"data-testid":"".concat("commentInput","_input"),placeholder:"Type Comment",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:N,inputProps:{onChange:function(t){return e.setState({comment:t})},singleLine:!0,value:this.state.comment||"",inputRef:this.props.inputRef,withLightTheme:!1,onMount:this.props.onMount,companyId:this.props.companyId,autoFocus:this.props.autoFocus,disabled:this.props.disabled,onFocus:function(){return e.setState({isInputFocused:!0})},onBlur:function(){return e.setState({isInputFocused:!1})},allowSuggestionsAboveCursor:!0},endAdornment:!this.props.isNative&&T(f,{position:"end",className:this.props.classes.inputAdornment,children:[!this.state.attachmentUrl&&L("div",{className:b(y.cCommentInputIconContainer,y.cCommentInputIconUpload),children:L(F,{openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:this.handleFileUpload,onError:this.handleAttachmentLoadingError,fileUploadIconClassName:this.props.classes.additionalActionButton,htmlColor:v[400],inputId:"comment-attachment-".concat(this.props.editCommentId||this.props.parentId),tooltipProps:{title:"Attach File",classes:{tooltip:o.iconTooltip},placement:"top"}})}),L("div",{className:y.cCommentInputIconContainer,children:L(S,{"data-testid":"".concat("commentInput","_emojiButton"),handleSelectEmoji:this.handleSelectEmoji,emojiIconClassName:this.props.classes.additionalActionButton,htmlColor:v[400],disableRipple:!0,tooltipProps:{title:"Add Emoji",classes:{tooltip:o.iconTooltip},placement:"top"}})})]}),disableUnderline:!0,classes:{root:this.props.classes.inputRoot,input:this.props.classes.inputEl}},className:this.props.classes.input,onKeyDown:this.handleKeyDown})}),this.state.attachmentLoadingError&&L(U,{errorMessage:this.state.attachmentLoadingError,className:this.props.classes.fileUploadingError}),this.state.attachmentUrl&&L(k,{fileName:this.state.attachmentName,fileUrl:this.state.attachmentUrl,handleFileDelete:this.handleFileDelete,classes:this.props.classes}),L(g,{in:r,mountOnEnter:!0,unmountOnExit:!0,children:T("div",{className:y.cCommentInputSendContainer,children:[L("div",{className:y.cCommentInputSendContainerCancel,children:L(C,{"data-testid":"".concat("commentInput","_cancel"),variant:"caption",className:b(this.props.classes.inputMain,this.props.classes.cancelText,this.props.classes.highlightedLabel),component:"div",gutterBottom:!0,onClick:this.handleCancelClick,children:"Cancel"})}),T("div",{className:y.cCommentInputSendContainerSend,children:[T(C,{variant:"caption",className:b(this.props.classes.inputMain,this.props.classes.inputHelper),component:"div",gutterBottom:!0,children:["Press ",L(C,{variant:"caption",color:"primary",className:b(this.props.classes.inputMain,this.props.classes.highlightedLabel),children:"Enter"})," to send"]}),L(A,{size:"large",tooltipProps:{title:"Send"},"data-testid":"".concat("commentInput","_sendButton"),onClick:this.handleSendComment,classes:{root:this.props.classes.sendButton},children:L(M,{})})]})]})})]})}}]),p}();_.propTypes={inputRef:p.shape({current:p.shape({focus:p.shape({})})}),editFeedItemId:p.number,editCommentId:p.number,editComment:p.string,editAttachment:p.shape({url:p.string,size:p.number,file_name:p.string}),spaceAround:p.bool,postComment:p.func.isRequired,postCommentCallback:p.func,patchCommentCallback:p.func,exitEditMode:p.func,setIsPosting:p.func,setIsEditting:p.func,onMount:p.func,autoFocus:p.bool,disabled:p.bool,classes:p.shape({}).isRequired,currentUser:p.shape(),isNative:p.bool,companyId:p.number,parentId:p.string},_.defaultProps={inputRef:null,editFeedItemId:null,editCommentId:null,parentId:null,editComment:null,editAttachment:{},spaceAround:!1,setIsPosting:m,setIsEditting:m,onMount:m,autoFocus:void 0,disabled:!1,patchCommentCallback:m,postCommentCallback:m,exitEditMode:m,companyId:null,currentUser:{},isNative:B};var O=u((function(t){return{paperRoot:{width:"calc(100% - 48px)",marginLeft:48,display:"inline-block",height:32,border:"0","&:focus-within":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.primary.main)},boxShadow:"none",background:"#4D4D4D"},input:{paddingLeft:5,width:"100%"},inputRoot:{height:32,paddingRight:"8px",lineHeight:"29px",paddingLeft:"8px"},inputEl:{padding:"0 0 0 6px",height:"100%"},additionalActionButton:{padding:"6px"},nativeActionButton:{margin:"5px 10px",cursor:"pointer"},fileUploadingError:{marginTop:10,marginLeft:24},inputMain:{marginBottom:0,fontSize:"11px",color:t.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:t.palette.primary.main},iconTooltip:{marginTop:"3px"},sendButton:{"&:hover":{backgroundColor:"rgba(3,188,212, 0.1)"},"&.MuiButtonBase-root":{padding:7}},inputAdornment:{marginBottom:"0!important",height:"100%"}}}))(_);export{O as default};
|
|
1
|
+
import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import i from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import{PureComponent as c}from"react";import p from"prop-types";import m from"lodash/noop";import{withStyles as u}from"@material-ui/core/styles";import{Paper as d,TextField as h,InputAdornment as f,Collapse as g,Typography as C}from"@material-ui/core";import b from"classnames";import{get as I}from"lodash";import v from"@material-ui/core/colors/grey";import{patchFeedItemComment as x}from"../../clients/jsonApi/index.js";import y from"./styles.css.js";import{AvatarComponent as E}from"../Avatar/index.js";import F from"../FileUploadIconButton.js";import S from"../EmojiIconButton.js";import U from"../FailedFileUploading.js";import N from"../UserMention/index.js";import k from"../FilePreview/index.js";import A from"../IconButton/index.js";import M from"../Icons/SendIcon.js";import{isSuggestionsListOpened as R}from"../UserMention/utils/index.js";import j from"../../utils/main.js";import{isNativeDetected as B}from"../../utils/mobileDetect.js";import{notifyCommentEdit as w,notifyCommentPost as P}from"../../utils/nativeMessages.js";import{jsxs as T,jsx as L}from"react/jsx-runtime";function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=r(t);if(e){var i=r(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return a(this,n)}}var D={chatAvatarWrapper:{display:"flex",alignItems:"center",position:"absolute",left:0,height:32},commentTextFieldContainer:{position:"relative",margin:"0"},commentTextFieldContainerSpaceAround:{position:"relative",margin:"20px 10px"}},_=function(a){i(p,c);var r=z(p);function p(n){var i,a,c;return e(this,p),i=r.call(this,n),s(o(i),"handleSelectEmoji",(function(t){return i.setState((function(e){var n=e.comment;return{comment:"".concat(n).concat(t.native)}}))})),s(o(i),"postComment",(a=t(l.mark((function t(e){var n;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.props.postComment(e);case 3:n=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0.message);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(t){return a.apply(this,arguments)})),s(o(i),"patchComment",(c=t(l.mark((function t(e){var n,o,a,r;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.props,o=n.editFeedItemId,a=n.editCommentId,t.prev=1,t.next=4,x(o,a,e);case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0.message);case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t){return c.apply(this,arguments)})),s(o(i),"clearCommentField",(function(t){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},(function(){i.focusOnRef(),t&&"function"==typeof t&&t()}))})),s(o(i),"handleKeyDown",(function(t){var e=t.key;"Escape"===e&&i.props.exitEditMode(),"Enter"===e&&(R()||(t.preventDefault(),i.handleSendComment()))})),s(o(i),"handleAttachmentLoadingError",(function(t){i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:t})})),s(o(i),"handleFileUpload",(function(t,e,n){i.setState({attachmentUrl:t,attachmentName:e,attachmentSize:n,attachmentLoadingError:null})})),s(o(i),"handleNativeFileUpload",(function(){var t=i.state.comment;i.isEditMode?(w(t),i.clearCommentField(i.props.exitEditMode)):(P(t),i.clearCommentField())})),s(o(i),"handleFileDelete",(function(){return i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null})})),s(o(i),"handleSendComment",t(l.mark((function t(){var e,n,o;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=i.state.comment?i.state.comment.trim():null)||i.state.attachmentUrl){t.next=3;break}return t.abrupt("return");case 3:if(n={comment:{body:e,attachment:{url:i.state.attachmentUrl,size:i.state.attachmentSize,file_name:i.state.attachmentName}}},!i.isEditMode){t.next=16;break}return i.props.setIsEditting(!0),t.next=8,i.patchComment(n);case 8:return o=t.sent,t.next=11,i.props.patchCommentCallback(o);case 11:i.props.setIsEditting(!1),i.clearCommentField(),i.props.exitEditMode(),t.next=24;break;case 16:return i.props.setIsPosting(!0),t.next=19,i.postComment(n);case 19:return o=t.sent,t.next=22,i.props.postCommentCallback(o);case 22:i.props.setIsPosting(!1),i.clearCommentField();case 24:case"end":return t.stop()}}),t)})))),s(o(i),"handleCancelClick",(function(){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},i.props.exitEditMode())})),i.state={comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:null,isInputFocused:!1},i}return n(p,[{key:"componentDidMount",value:function(){this.isEditMode&&this.setInitialCommentValue()}},{key:"componentDidUpdate",value:function(t){(this.isEditMode&&!t.editFeedItemId||this.props.editCommentId&&this.props.editCommentId!==t.editCommentId)&&this.setInitialCommentValue()}},{key:"isEditMode",get:function(){return!!this.props.editFeedItemId}},{key:"setInitialCommentValue",value:function(){var t=this.props.editAttachment?this.props.editAttachment.url:null;this.setState({comment:this.props.editComment,attachmentUrl:t,attachmentName:t?this.props.editAttachment.file_name||j.getFileNameWithExtensionFromPath(t):null,attachmentSize:this.props.editAttachment?this.props.editAttachment.size:null})}},{key:"focusOnRef",value:function(){this.props.inputRef&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var t,e=this,n=this.props,o=n.classes,i=n.currentUser,a="".concat(I(i,["attributes","first_name"])||I(i,"first_name")," ").concat(I(i,["attributes","last_name"])||I(i,"last_name")),r=this.state.isInputFocused||this.state.attachmentUrl||this.state.comment||this.props.editComment||(null===(t=this.props.editAttachment)||void 0===t?void 0:t.url);return T("div",{style:this.props.spaceAround?D.commentTextFieldContainerSpaceAround:D.commentTextFieldContainer,children:[L("div",{style:D.chatAvatarWrapper,children:L(E,{displayName:a,size:32,imgSrc:this.props.currentUser&&this.props.currentUser.profile_photo})}),L(d,{className:this.props.classes.paperRoot,children:L(h,{"data-testid":"".concat("commentInput","_input"),placeholder:"Type Comment",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:N,inputProps:{onChange:function(t){return e.setState({comment:t})},singleLine:!0,value:this.state.comment||"",inputRef:this.props.inputRef,withLightTheme:!1,onMount:this.props.onMount,companyId:this.props.companyId,autoFocus:this.props.autoFocus,disabled:this.props.disabled,onFocus:function(){return e.setState({isInputFocused:!0})},onBlur:function(){return e.setState({isInputFocused:!1})},allowSuggestionsAboveCursor:!0},endAdornment:!this.props.isNative&&T(f,{position:"end",className:this.props.classes.inputAdornment,children:[!this.state.attachmentUrl&&L("div",{className:b(y.cCommentInputIconContainer,y.cCommentInputIconUpload),children:L(F,{openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:this.handleFileUpload,onError:this.handleAttachmentLoadingError,fileUploadIconClassName:this.props.classes.additionalActionButton,htmlColor:v[400],inputId:"comment-attachment-".concat(this.props.editCommentId||this.props.parentId),tooltipProps:{title:"Attach File",classes:{tooltip:o.iconTooltip},placement:"top"}})}),L("div",{className:y.cCommentInputIconContainer,children:L(S,{"data-testid":"".concat("commentInput","_emojiButton"),handleSelectEmoji:this.handleSelectEmoji,emojiIconClassName:this.props.classes.additionalActionButton,htmlColor:v[400],disableRipple:!0,tooltipProps:{title:"Add Emoji",classes:{tooltip:o.iconTooltip},placement:"top"}})})]}),disableUnderline:!0,classes:{root:this.props.classes.inputRoot,input:this.props.classes.inputEl}},className:this.props.classes.input,onKeyDown:this.handleKeyDown})}),this.state.attachmentLoadingError&&L(U,{errorMessage:this.state.attachmentLoadingError,className:this.props.classes.fileUploadingError}),this.state.attachmentUrl&&L(k,{fileName:this.state.attachmentName,fileUrl:this.state.attachmentUrl,handleFileDelete:this.handleFileDelete,classes:this.props.classes}),L(g,{in:r,mountOnEnter:!0,unmountOnExit:!0,children:T("div",{className:y.cCommentInputSendContainer,children:[L("div",{className:y.cCommentInputSendContainerCancel,children:L(C,{"data-testid":"".concat("commentInput","_cancel"),variant:"caption",className:b(this.props.classes.inputMain,this.props.classes.cancelText,this.props.classes.highlightedLabel),component:"div",gutterBottom:!0,onClick:this.handleCancelClick,children:"Cancel"})}),T("div",{className:y.cCommentInputSendContainerSend,children:[T(C,{variant:"caption",className:b(this.props.classes.inputMain,this.props.classes.inputHelper),component:"div",gutterBottom:!0,children:["Press ",L(C,{variant:"caption",color:"primary",className:b(this.props.classes.inputMain,this.props.classes.highlightedLabel),children:"Enter"})," to send"]}),L(A,{size:"large",tooltipProps:{title:"Send"},"data-testid":"".concat("commentInput","_sendButton"),onClick:this.handleSendComment,classes:{root:this.props.classes.sendButton},children:L(M,{})})]})]})})]})}}]),p}();_.propTypes={inputRef:p.shape({current:p.shape({focus:p.shape({})})}),editFeedItemId:p.number,editCommentId:p.number,editComment:p.string,editAttachment:p.shape({url:p.string,size:p.number,file_name:p.string}),spaceAround:p.bool,postComment:p.func.isRequired,postCommentCallback:p.func,patchCommentCallback:p.func,exitEditMode:p.func,setIsPosting:p.func,setIsEditting:p.func,onMount:p.func,autoFocus:p.bool,disabled:p.bool,classes:p.shape({}).isRequired,currentUser:p.shape(),isNative:p.bool,companyId:p.number,parentId:p.string},_.defaultProps={inputRef:null,editFeedItemId:null,editCommentId:null,parentId:null,editComment:null,editAttachment:{},spaceAround:!1,setIsPosting:m,setIsEditting:m,onMount:m,autoFocus:void 0,disabled:!1,patchCommentCallback:m,postCommentCallback:m,exitEditMode:m,companyId:null,currentUser:{},isNative:B};var O=u((function(t){return{paperRoot:{width:"calc(100% - 48px)",marginLeft:48,display:"inline-block",height:32,border:"0","&:focus-within":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.primary.main)},boxShadow:"none",background:"#4D4D4D"},input:{paddingLeft:5,width:"100%"},inputRoot:{height:32,paddingRight:"8px",lineHeight:"29px",paddingLeft:"8px"},inputEl:{padding:"0 0 0 6px",height:"100%"},additionalActionButton:{padding:"6px"},nativeActionButton:{margin:"5px 10px",cursor:"pointer"},fileUploadingError:{marginTop:10,marginLeft:24},inputMain:{marginBottom:0,fontSize:"11px",color:t.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:t.palette.primary.main},iconTooltip:{marginTop:"3px"},sendButton:{"&:hover":{backgroundColor:"rgba(3,188,212, 0.1)"},"&.MuiButtonBase-root":{padding:7}},inputAdornment:{marginBottom:"0!important",height:"100%"}}}))(_);export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"prop-types";import{withStyles as t}from"@material-ui/core/styles";import{Tooltip as o,Typography as r}from"@material-ui/core";import s from"@material-ui/core/colors/grey";import i from"./styles.css.js";import{isNativeDetected as a}from"../../utils/mobileDetect.js";import n
|
|
1
|
+
import e from"prop-types";import{withStyles as t}from"@material-ui/core/styles";import{Tooltip as o,Typography as r}from"@material-ui/core";import s from"@material-ui/core/colors/grey";import i from"./styles.css.js";import{isNativeDetected as a}from"../../utils/mobileDetect.js";import{AvatarComponent as n}from"../Avatar/index.js";import c from"../UserCardPopover.js";import{jsxs as m,Fragment as l,jsx as p}from"react/jsx-runtime";var u=function(e){return e?"".concat(e.first_name," ").concat(e.last_name):""},d=function(e){var t=e.users,o=e.noReactionsText,r=t.length;if(!r)return o;var s="";r>19&&(s="\nand ".concat(r-19," more..."));var i=t.slice(0,19).join("\n");return"".concat(i).concat(s)},h=function(e){var t=e.likesCount,s=e.usersWhoLike,a=e.commentsCount,h=e.usersWhoCommented,f=e.onCommentsClick,v=e.currentUser,y=e.activeUsersList,C=e.classes,k=e.isNative,g=e.small;return m(l,{children:[!!t&&p(o,{title:p(d,{users:s,noReactionsText:"Nobody likes this yet..."}),enterTouchDelay:0,classes:{popper:C.tooltip},placement:"top",children:m(r,{"data-testid":"".concat("FeedPo","_likesCounter_").concat(t),className:C.reactionTypographyRoot,variant:"caption",children:["Likes ",t]})}),!!a&&p("span",{onClick:f,children:p(o,{title:p(d,{users:h,noReactionsText:"Nobody commented this yet..."}),enterTouchDelay:0,classes:{popper:C.tooltip},placement:"top",children:m(r,{"data-testid":"".concat("FeedPo","_commentsCounter_").concat(a),className:C.reactionTypographyRoot,variant:"caption",children:["Comments ",a]})})}),p("div",{"data-testid":"".concat("FeedPo","_activeUsersCounter_").concat(y&&y.length),className:i.cCommentsInfoActiveUsersList,children:y.map((function(e){return k?p(n,{displayName:u(e),imgSrc:e.profile_photo,className:C.avatarInList,size:g?24:32},e.id):p(c,{user:e,currentUser:v,children:p(n,{displayName:u(e),imgSrc:e.profile_photo,size:g?24:32,className:C.avatarInList})},e.id)}))})]})},f={reactionTypographyRoot:{color:s[400],margin:"0 8px",cursor:"pointer","&:hover":{textDecoration:"underline",textUnderlineOffset:"4px",color:"#fff"}},avatarInList:{marginRight:3,borderWidth:1},tooltip:{whiteSpace:"pre-line"}};h.propTypes={likesCount:e.number,usersWhoLike:e.arrayOf(e.shape({})),commentsCount:e.number,usersWhoCommented:e.arrayOf(e.string).isRequired,onCommentsClick:e.func,activeUsersList:e.arrayOf(e.shape({})).isRequired,classes:e.shape({}).isRequired,isNative:e.bool,small:e.bool,currentUser:e.shape({})},h.defaultProps={likesCount:0,usersWhoLike:[],commentsCount:0,onCommentsClick:function(){},small:!1,isNative:a,currentUser:{}};var v=t(f)(h);export{v as default};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import ContextMenuItem from './index';
|
|
4
|
+
declare type Props = ComponentProps<typeof ContextMenuItem>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
export declare const UsageExample: () => JSX.Element;
|
|
9
|
+
export declare const Disabled: () => JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ContextMenuItem.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextMenuItem.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenuItem/ContextMenuItem.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAEjD,OAAO,eAAe,MAAM,SAAS,CAAC;AAKtC,aAAK,KAAK,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAIpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAsBF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAAmC,CAAC;AAExE,eAAO,MAAM,YAAY,mBAwBxB,CAAC;AAKF,eAAO,MAAM,QAAQ,mBAcpB,CAAC"}
|
|
@@ -1,25 +1,13 @@
|
|
|
1
|
+
import { MenuItemProps } from '../MenuItem';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
declare type ContextMenuItemProps = MenuItemProps & {
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Indicates the icon type: different icon types require different styling
|
|
7
|
+
*/
|
|
8
|
+
iconType?: 'mui' | 'iconPark';
|
|
9
|
+
small?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const ContextMenuItem: ({ classes, icon, children, small, iconType, ...otherProps }: ContextMenuItemProps) => JSX.Element;
|
|
1
12
|
export default ContextMenuItem;
|
|
2
|
-
declare function ContextMenuItem({ classes, icon, children, small, iconType, ...otherProps }: {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
classes?: {};
|
|
5
|
-
icon: any;
|
|
6
|
-
children: any;
|
|
7
|
-
small: any;
|
|
8
|
-
iconType: any;
|
|
9
|
-
}): JSX.Element;
|
|
10
|
-
declare namespace ContextMenuItem {
|
|
11
|
-
namespace propTypes {
|
|
12
|
-
const children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
13
|
-
const icon: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
14
|
-
const iconType: PropTypes.Requireable<string>;
|
|
15
|
-
const small: PropTypes.Requireable<boolean>;
|
|
16
|
-
}
|
|
17
|
-
namespace defaultProps {
|
|
18
|
-
const small_1: boolean;
|
|
19
|
-
export { small_1 as small };
|
|
20
|
-
const iconType_1: string;
|
|
21
|
-
export { iconType_1 as iconType };
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
import PropTypes from "prop-types";
|
|
25
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenuItem/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenuItem/index.tsx"],"names":[],"mappings":"AAIA,OAAiB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAmClC,aAAK,oBAAoB,GAAG,aAAa,GAAG;IAC1C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,QAAA,MAAM,eAAe,gEAOlB,oBAAoB,gBAYtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{__rest as t,__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as i,jsx as r}from"react/jsx-runtime";import o from"classnames";import n from"@material-ui/core/ListItemIcon";import{makeStyles as a}from"@material-ui/core";import l from"../MenuItem/index.js";var s=a((function(t){return{menuItem:{height:function(t){return t.small?36:54},lineHeight:function(t){return t.small?"17px":"24px"},"&:hover svg":{fill:function(e){var i=e.iconType,r=e.disabled;return"iconPark"===i?"":r?t.palette.primary.text9:t.palette.primary.contrastText},color:function(e){var i=e.iconType,r=e.disabled;return"mui"===i?"":r?t.palette.primary.text9:t.palette.primary.contrastText}}},listItemIcon:{paddingRight:t.spacing(1),color:function(e){return e.disabled?t.palette.primary.text9:t.palette.primary.text7},minWidth:"auto",fontSize:function(t){return t.small?16:24},"& .MuiSvgIcon-root":{fontSize:"inherit"}}}})),m=function(a){var m=a.classes,c=void 0===m?{}:m,p=a.icon,u=a.children,d=a.small,f=a.iconType,h=void 0===f?"mui":f,x=t(a,["classes","icon","children","small","iconType"]),y=s({small:d,disabled:x.disabled,iconType:h});return i(l,e({classes:e(e({},c),{root:o(y.menuItem,c.root)})},x,{children:[r(n,e({classes:{root:y.listItemIcon}},{children:p})),u]}))};export{m as default};
|
|
@@ -1,43 +1,25 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { TooltipProps } from '@material-ui/core';
|
|
3
|
+
export declare type CopyToClipboardProps = {
|
|
4
|
+
/**
|
|
5
|
+
* ⚠️ Must be a string
|
|
6
|
+
*/
|
|
7
|
+
children: string;
|
|
8
|
+
dataTestId?: string;
|
|
9
|
+
IconComponent?: ComponentType<any>;
|
|
10
|
+
tooltipProps?: {
|
|
11
|
+
title?: string;
|
|
12
|
+
placement?: TooltipProps['placement'];
|
|
13
|
+
delay?: number;
|
|
14
|
+
};
|
|
15
|
+
classes?: {
|
|
16
|
+
root?: string;
|
|
17
|
+
icon?: string;
|
|
18
|
+
iconWrapper?: string;
|
|
19
|
+
tooltip?: string;
|
|
20
|
+
tooltipPopper?: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
declare const CopyToClipboard: ({ children, classes, dataTestId, IconComponent, tooltipProps, }: CopyToClipboardProps) => JSX.Element;
|
|
1
24
|
export default CopyToClipboard;
|
|
2
|
-
declare function CopyToClipboard({ children, classes, dataTestId, IconComponent, tooltipProps }: {
|
|
3
|
-
children: any;
|
|
4
|
-
classes: any;
|
|
5
|
-
dataTestId: any;
|
|
6
|
-
IconComponent: any;
|
|
7
|
-
tooltipProps: any;
|
|
8
|
-
}): JSX.Element;
|
|
9
|
-
declare namespace CopyToClipboard {
|
|
10
|
-
namespace propTypes {
|
|
11
|
-
const children: PropTypes.Validator<string>;
|
|
12
|
-
const dataTestId: PropTypes.Requireable<string>;
|
|
13
|
-
const IconComponent: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
14
|
-
const tooltipProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
15
|
-
title: PropTypes.Requireable<string>;
|
|
16
|
-
placement: PropTypes.Requireable<string>;
|
|
17
|
-
delay: PropTypes.Requireable<number>;
|
|
18
|
-
}>>;
|
|
19
|
-
const classes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
|
-
root: PropTypes.Requireable<string>;
|
|
21
|
-
icon: PropTypes.Requireable<string>;
|
|
22
|
-
iconWrapper: PropTypes.Requireable<string>;
|
|
23
|
-
tooltip: PropTypes.Requireable<string>;
|
|
24
|
-
tooltipPopper: PropTypes.Requireable<string>;
|
|
25
|
-
}>>;
|
|
26
|
-
}
|
|
27
|
-
namespace defaultProps {
|
|
28
|
-
const dataTestId_1: any;
|
|
29
|
-
export { dataTestId_1 as dataTestId };
|
|
30
|
-
export function IconComponent_1(): JSX.Element;
|
|
31
|
-
export { IconComponent_1 as IconComponent };
|
|
32
|
-
export namespace tooltipProps_1 {
|
|
33
|
-
const title: string;
|
|
34
|
-
const placement: string;
|
|
35
|
-
const delay: number;
|
|
36
|
-
}
|
|
37
|
-
export { tooltipProps_1 as tooltipProps };
|
|
38
|
-
const classes_1: {};
|
|
39
|
-
export { classes_1 as classes };
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
import PropTypes from "prop-types";
|
|
43
25
|
//# sourceMappingURL=CopyToClipboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipboard.d.ts","sourceRoot":"","sources":["../../../src/components/CopyToClipboard/CopyToClipboard.
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.d.ts","sourceRoot":"","sources":["../../../src/components/CopyToClipboard/CopyToClipboard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAuB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAsBtE,oBAAY,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;QACtC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,eAAe,oEAUlB,oBAAoB,gBAqCtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"
|
|
1
|
+
import{__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as s}from"react/jsx-runtime";import{useState as c,useEffect as i}from"react";import t from"classnames";import{makeStyles as n,Tooltip as r}from"@material-ui/core";import{CopyIcon as e}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import m from"../../utils/main.js";var p=n((function(o){return{iconWrapper:{color:o.palette.primary.text6,cursor:"pointer",paddingLeft:4,display:"flex",alignItems:"center","&:hover":{color:o.palette.primary.contrastText}},tooltip:{color:o.palette.primary.text6,backgroundColor:"rgba(20, 20, 20, 0.5)"}}})),a=function(n){var a=n.children,l=n.classes,u=void 0===l?{}:l,d=n.dataTestId,I=n.IconComponent,j=void 0===I?function(){return s(e,{size:16})}:I,f=n.tooltipProps,C=void 0===f?{title:"Copied",placement:"bottom",delay:1500}:f,b=c(!1),h=b[0],x=b[1],k=p();return i((function(){var o=setTimeout((function(){x(!1)}),C.delay);return function(){return clearTimeout(o)}}),[h]),s(r,o({classes:{tooltip:t(k.tooltip,u.tooltip),popper:u.tooltipPopper},title:C.title,open:h,disableFocusListener:!0,disableHoverListener:!0,placement:C.placement},{children:s("span",o({className:t(k.iconWrapper,u.iconWrapper),onClick:function(){x(!0),m.copyToClipboard(a)}},{children:s(j,{className:u.icon,"data-testid":d})}))}))};export{a as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import CopyToClipboard from './CopyToClipboard';
|
|
4
|
+
declare type Props = ComponentProps<typeof CopyToClipboard>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
//# sourceMappingURL=CopyToClipboard.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.stories.d.ts","sourceRoot":"","sources":["../../../src/components/CopyToClipboard/CopyToClipboard.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,aAAK,KAAK,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAEpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAYF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAAmC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import Counter from './index';
|
|
4
|
+
declare type Props = ComponentProps<typeof Counter>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
export declare const Usage: () => JSX.Element;
|
|
9
|
+
export declare const Colored: () => JSX.Element;
|
|
10
|
+
//# sourceMappingURL=Counter.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Counter.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/Counter.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,OAAO,MAAM,SAAS,CAAC;AAI9B,aAAK,KAAK,GAAG,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC;AAE5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAWF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAA2B,CAAC;AAEhE,eAAO,MAAM,KAAK,mBA6BjB,CAAC;AAMF,eAAO,MAAM,OAAO,mBA6BnB,CAAC"}
|
|
@@ -1,38 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare const Counter: {
|
|
8
|
-
(props: CounterProps): JSX.Element;
|
|
9
|
-
propTypes: {
|
|
10
|
-
classes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
11
|
-
root: PropTypes.Requireable<string>;
|
|
12
|
-
}>>;
|
|
13
|
-
size: PropTypes.Requireable<string>;
|
|
14
|
-
limited: PropTypes.Requireable<boolean>;
|
|
15
|
-
clickable: PropTypes.Requireable<boolean>;
|
|
16
|
-
label: PropTypes.Validator<string>;
|
|
17
|
-
tooltip: PropTypes.Requireable<string>;
|
|
18
|
-
};
|
|
19
|
-
defaultProps: {
|
|
20
|
-
classes: {};
|
|
21
|
-
size: string;
|
|
22
|
-
limited: boolean;
|
|
23
|
-
clickable: boolean;
|
|
24
|
-
tooltip: string;
|
|
2
|
+
import { ChipProps } from '@material-ui/core';
|
|
3
|
+
export declare type CounterProps = Omit<ChipProps, 'classes' | 'size' | 'label' | 'clickable' | 'children' | 'avatar' | 'icon' | 'deleteIcon' | 'onDelete' | 'variant' | 'color' | 'className'> & {
|
|
4
|
+
label: string;
|
|
5
|
+
classes?: {
|
|
6
|
+
root?: string;
|
|
25
7
|
};
|
|
8
|
+
size?: 'small' | 'medium' | 'large';
|
|
9
|
+
limited?: boolean;
|
|
10
|
+
clickable?: boolean;
|
|
11
|
+
tooltip?: string;
|
|
12
|
+
className?: string;
|
|
26
13
|
};
|
|
27
|
-
declare const
|
|
28
|
-
classes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
29
|
-
root: PropTypes.Requireable<string>;
|
|
30
|
-
}>>;
|
|
31
|
-
size: PropTypes.Requireable<string>;
|
|
32
|
-
limited: PropTypes.Requireable<boolean>;
|
|
33
|
-
clickable: PropTypes.Requireable<boolean>;
|
|
34
|
-
label: PropTypes.Validator<string>;
|
|
35
|
-
tooltip: PropTypes.Requireable<string>;
|
|
36
|
-
};
|
|
14
|
+
declare const Counter: ({ classes, size, limited, clickable, tooltip, ...rest }: CounterProps) => JSX.Element;
|
|
37
15
|
export default Counter;
|
|
38
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/index.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAmB,SAAS,EAAuB,MAAM,mBAAmB,CAAC;AA4FpF,oBAAY,YAAY,GAAG,IAAI,CAC7B,SAAS,EACP,SAAS,GACT,MAAM,GACN,OAAO,GACP,WAAW,GACX,UAAU,GACV,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,UAAU,GACV,SAAS,GACT,OAAO,GACP,WAAW,CACd,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF,QAAA,MAAM,OAAO,4DAOV,YAAY,KAAG,WAuBjB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__rest as o,__assign as i}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as s}from"react/jsx-runtime";import t from"classnames";import{capitalize as c}from"lodash";import{makeStyles as n,Tooltip as e,Chip as p}from"@material-ui/core";import{CloseSmallIcon as r}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";var m=n((function(o){return{rootChip:{"&.MuiChip-root":{backgroundColor:o.palette.background.b9,color:o.palette.primary.text6,textAlign:"center","&:hover":{color:o.palette.primary.contrastText,"& .MuiSvgIcon-root":{color:o.palette.primary.contrastText}},"& span.MuiChip-label":{padding:0}}},tooltip:{marginTop:"10px"},closeIcon:{marginRight:"-2px !important",marginLeft:"2px !important",color:o.palette.primary.text6},sizeSmall:{"&.MuiChip-root":{minWidth:16,height:16,padding:"1px 2px","& span":{fontSize:"11px",lineHeight:"14px"}}},sizeSmallLimited:{"&.MuiChip-root":{padding:"1px 3px"}},sizeMedium:{"&.MuiChip-root":{minWidth:24,height:24,padding:"2px 4px","& span":{fontSize:"14px",lineHeight:"20px"}}},sizeMediumLimited:{"&.MuiChip-root":{padding:"2px 6px"}},sizeMediumClickable:{"&.MuiChip-root":{padding:"2px 6px"}},sizeLarge:{"&.MuiChip-root":{minWidth:32,height:32,padding:"5px 7px","& span":{fontSize:"16px",lineHeight:"22px"}}},sizeLargeLimited:{"&.MuiChip-root":{padding:"5px 8px"}},sizeLargeClickable:{"&.MuiChip-root":{padding:"5px 8px"}}}})),a=function(n){var a=n.classes,l=void 0===a?{}:a,d=n.size,u=void 0===d?"medium":d,h=n.limited,x=void 0!==h&&h,I=n.clickable,g=void 0!==I&&I,j=n.tooltip,C=void 0===j?"":j,z=o(n,["classes","size","limited","clickable","tooltip"]),b=m();return s(e,i({title:C,classes:{tooltip:b.tooltip}},{children:s(p,i({},z,{size:u,classes:i(i({},l),{root:t(l.root,b.rootChip,b["size".concat(c(u))],x&&b["size".concat(c(u),"Limited")],g&&b["size".concat(c(u),"Clickable")])}),clickable:g,deleteIcon:s(r,{className:b.closeIcon,size:16})}))}))};export{a as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import DatePicker from './index';
|
|
4
|
+
declare type Props = ComponentProps<typeof DatePicker>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
//# sourceMappingURL=DatePicker.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAEjD,OAAO,UAAU,MAAM,SAAS,CAAC;AAEjC,aAAK,KAAK,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAWF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBASnC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import DateTimePicker from './index';
|
|
4
|
+
declare type Props = ComponentProps<typeof DateTimePicker>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
//# sourceMappingURL=DateTimePicker.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimePicker.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DateTimePicker/DateTimePicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAEjD,OAAO,cAAc,MAAM,SAAS,CAAC;AAErC,aAAK,KAAK,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC;AAEnD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAWF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBASnC,CAAC"}
|
|
@@ -2,17 +2,17 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { AppSideBarProps } from '~/components/DevCenter/AppSideBar/AppSideBar';
|
|
3
3
|
import { AppSettingsPopoverProps } from '~/components/DevCenter/AppSettingsPopover/AppSettingsPopover';
|
|
4
4
|
export interface AppFilterPanelLayoutProps {
|
|
5
|
-
|
|
5
|
+
sideBarContent: ReactNode;
|
|
6
|
+
appSettingsPopoverProps?: Omit<AppSettingsPopoverProps, 'children' | 'classes'>;
|
|
6
7
|
children?: ReactNode;
|
|
7
|
-
classes
|
|
8
|
+
classes?: {
|
|
8
9
|
appLayout?: string;
|
|
9
10
|
content?: string;
|
|
10
11
|
contentWrapper?: string;
|
|
11
12
|
header?: string;
|
|
12
13
|
};
|
|
13
14
|
header?: ReactNode;
|
|
14
|
-
|
|
15
|
-
sideBarProps?: AppSideBarProps;
|
|
15
|
+
sideBarProps?: Omit<AppSideBarProps, 'anchor'>;
|
|
16
16
|
}
|
|
17
17
|
export declare const AppFilterPanelLayout: ({ appSettingsPopoverProps, children, classes, header, sideBarContent, sideBarProps, }: AppFilterPanelLayoutProps) => JSX.Element;
|
|
18
18
|
//# sourceMappingURL=AppFilterPanelLayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppFilterPanelLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAA4B,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAGpG,OAAO,EAEL,uBAAuB,EACxB,MAAM,8DAA8D,CAAC;AA6CtE,MAAM,WAAW,yBAAyB;IACxC,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppFilterPanelLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAA4B,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAGpG,OAAO,EAEL,uBAAuB,EACxB,MAAM,8DAA8D,CAAC;AA6CtE,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,SAAS,CAAC;IAE1B,uBAAuB,CAAC,EAAE,IAAI,CAAC,uBAAuB,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;IAChF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE;QACR,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,YAAY,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;CAChD;AA8BD,eAAO,MAAM,oBAAoB,0FAO9B,yBAAyB,KAAG,WA0C9B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { AppFilterPanelLayout } from './AppFilterPanelLayout';
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
|
+
declare type Props = ComponentProps<typeof AppFilterPanelLayout>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
export declare const Tablet: () => JSX.Element;
|
|
9
|
+
//# sourceMappingURL=AppFilterPanelLayout.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppFilterPanelLayout.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAsB,MAAM,OAAO,CAAC;AAI1D,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAItC,aAAK,KAAK,GAAG,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEzD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAaF,eAAe,IAAI,CAAC;AAapB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAqBnC,CAAC;AAEF,eAAO,MAAM,MAAM,mBAuBlB,CAAC"}
|