@ringcentral/juno 2.16.1 → 2.17.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/components/Text/index.d.ts +0 -1
- package/components/Text/index.js +0 -1
- package/components/index.d.ts +0 -1
- package/components/index.js +0 -1
- package/es6/components/Text/index.js +0 -1
- package/es6/components/index.js +0 -1
- package/foundation/theme/ThemeHandler.d.ts +1 -1
- package/foundation/theme/ThemeSwitcherProvider/ThemeSwitcherProvider.d.ts +2 -2
- package/package.json +1 -1
- package/components/Autocomplete/Autocomplete.d.ts +0 -4
- package/components/Autocomplete/Autocomplete.js +0 -7
- package/components/Autocomplete/index.d.ts +0 -1
- package/components/Autocomplete/index.js +0 -4
- package/components/Grid/deprecated/Grid.d.ts +0 -6
- package/components/Grid/deprecated/Grid.js +0 -8
- package/components/Grid/deprecated/index.d.ts +0 -1
- package/components/Grid/deprecated/index.js +0 -4
- package/components/ImageView/ImageView.d.ts +0 -311
- package/components/ImageView/ImageView.js +0 -206
- package/components/ImageView/index.d.ts +0 -1
- package/components/ImageView/index.js +0 -4
- package/components/Tables/Table.d.ts +0 -34
- package/components/Tables/Table.js +0 -31
- package/components/Tables/TableBodyCellContent.d.ts +0 -10
- package/components/Tables/TableBodyCellContent.js +0 -16
- package/components/Tables/TableHead.d.ts +0 -4
- package/components/Tables/TableHead.js +0 -18
- package/components/Tables/TableHeadCell.d.ts +0 -4
- package/components/Tables/TableHeadCell.js +0 -64
- package/components/Tables/TableRow.d.ts +0 -3
- package/components/Tables/TableRow.js +0 -6
- package/components/Tables/index.d.ts +0 -7
- package/components/Tables/index.js +0 -10
- package/components/Tables/styled.d.ts +0 -24
- package/components/Tables/styled.js +0 -46
- package/components/Tables/types.d.ts +0 -60
- package/components/Tables/types.js +0 -49
- package/components/Text/TextWithEllipsis.d.ts +0 -6
- package/components/Text/TextWithEllipsis.js +0 -21
- package/components/TextWithHighlight/TextWithHighlight.d.ts +0 -6
- package/components/TextWithHighlight/TextWithHighlight.js +0 -20
- package/components/TextWithHighlight/index.d.ts +0 -1
- package/components/TextWithHighlight/index.js +0 -4
- package/components/TextWithLink/TextWithLink.d.ts +0 -14
- package/components/TextWithLink/TextWithLink.js +0 -31
- package/components/TextWithLink/index.d.ts +0 -1
- package/components/TextWithLink/index.js +0 -4
- package/components/TextWithTooltip/TextWithTooltip.d.ts +0 -8
- package/components/TextWithTooltip/TextWithTooltip.js +0 -35
- package/components/TextWithTooltip/index.d.ts +0 -1
- package/components/TextWithTooltip/index.js +0 -4
- package/es6/components/Autocomplete/Autocomplete.js +0 -4
- package/es6/components/Autocomplete/index.js +0 -1
- package/es6/components/Grid/deprecated/Grid.js +0 -6
- package/es6/components/Grid/deprecated/index.js +0 -1
- package/es6/components/ImageView/ImageView.js +0 -204
- package/es6/components/ImageView/index.js +0 -1
- package/es6/components/Tables/Table.js +0 -29
- package/es6/components/Tables/TableBodyCellContent.js +0 -14
- package/es6/components/Tables/TableHead.js +0 -15
- package/es6/components/Tables/TableHeadCell.js +0 -62
- package/es6/components/Tables/TableRow.js +0 -4
- package/es6/components/Tables/index.js +0 -7
- package/es6/components/Tables/styled.js +0 -38
- package/es6/components/Tables/types.js +0 -41
- package/es6/components/Text/TextWithEllipsis.js +0 -19
- package/es6/components/TextWithHighlight/TextWithHighlight.js +0 -18
- package/es6/components/TextWithHighlight/index.js +0 -1
- package/es6/components/TextWithLink/TextWithLink.js +0 -29
- package/es6/components/TextWithLink/index.js +0 -1
- package/es6/components/TextWithTooltip/TextWithTooltip.js +0 -33
- package/es6/components/TextWithTooltip/index.js +0 -1
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
declare enum TABLE_BORDER_TYPE {
|
|
3
|
-
BORDERED = "table-bordered",
|
|
4
|
-
NONE = ""
|
|
5
|
-
}
|
|
6
|
-
declare enum TABLE_STICKY_TYPE {
|
|
7
|
-
STICKY = "table-sticky",
|
|
8
|
-
NONE = ""
|
|
9
|
-
}
|
|
10
|
-
declare enum TABLE_TYPE {
|
|
11
|
-
AUTO = "table-auto",
|
|
12
|
-
MODAL = "table-modal",
|
|
13
|
-
CARD = "table-card",
|
|
14
|
-
FULL = "table-full"
|
|
15
|
-
}
|
|
16
|
-
declare enum COLUMN_TEXT_ALIGN {
|
|
17
|
-
LEFT = "left",
|
|
18
|
-
RIGHT = "right"
|
|
19
|
-
}
|
|
20
|
-
declare type ColumnProps = {
|
|
21
|
-
automationID?: string;
|
|
22
|
-
width?: number | string;
|
|
23
|
-
title: string;
|
|
24
|
-
sortKey?: any;
|
|
25
|
-
textAlign?: COLUMN_TEXT_ALIGN;
|
|
26
|
-
};
|
|
27
|
-
declare type TableHeadCellProps = {
|
|
28
|
-
sortHandler?: (sortDirection: ORDER_TABLE_BY, sortKey: any) => void;
|
|
29
|
-
sortDirection?: ORDER_TABLE_BY;
|
|
30
|
-
} & ColumnProps;
|
|
31
|
-
declare type TableHeadProps = {
|
|
32
|
-
loading?: boolean;
|
|
33
|
-
width?: number;
|
|
34
|
-
columnData: ColumnProps[];
|
|
35
|
-
sortMap?: SortMap;
|
|
36
|
-
titleCells?: ComponentType<ColumnProps>[];
|
|
37
|
-
textAlign?: COLUMN_TEXT_ALIGN;
|
|
38
|
-
sortHandler?: (sortDirection: ORDER_TABLE_BY, sortKey: any) => void;
|
|
39
|
-
};
|
|
40
|
-
declare type SortMap = {
|
|
41
|
-
sortKey: any;
|
|
42
|
-
sortDirection: ORDER_TABLE_BY;
|
|
43
|
-
};
|
|
44
|
-
declare enum ORDER_TABLE_BY {
|
|
45
|
-
ASC = 0,
|
|
46
|
-
DESC = 1,
|
|
47
|
-
NONE = 2
|
|
48
|
-
}
|
|
49
|
-
declare enum ARIA_SORT_VALUES {
|
|
50
|
-
ASC = "ascending",
|
|
51
|
-
DESC = "descending",
|
|
52
|
-
NONE = "none",
|
|
53
|
-
OTHER = "other"
|
|
54
|
-
}
|
|
55
|
-
declare enum SORT_ICON_CLASS {
|
|
56
|
-
SORT_UP = "icon-sort-up",
|
|
57
|
-
SORT_DOWN = "icon-sort-down"
|
|
58
|
-
}
|
|
59
|
-
export { ARIA_SORT_VALUES, COLUMN_TEXT_ALIGN, ORDER_TABLE_BY, SORT_ICON_CLASS, TABLE_BORDER_TYPE, TABLE_STICKY_TYPE, TABLE_TYPE, };
|
|
60
|
-
export type { ColumnProps, SortMap, TableHeadCellProps, TableHeadProps };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var TABLE_BORDER_TYPE;
|
|
4
|
-
(function (TABLE_BORDER_TYPE) {
|
|
5
|
-
TABLE_BORDER_TYPE["BORDERED"] = "table-bordered";
|
|
6
|
-
TABLE_BORDER_TYPE["NONE"] = "";
|
|
7
|
-
})(TABLE_BORDER_TYPE || (TABLE_BORDER_TYPE = {}));
|
|
8
|
-
exports.TABLE_BORDER_TYPE = TABLE_BORDER_TYPE;
|
|
9
|
-
var TABLE_STICKY_TYPE;
|
|
10
|
-
(function (TABLE_STICKY_TYPE) {
|
|
11
|
-
TABLE_STICKY_TYPE["STICKY"] = "table-sticky";
|
|
12
|
-
TABLE_STICKY_TYPE["NONE"] = "";
|
|
13
|
-
})(TABLE_STICKY_TYPE || (TABLE_STICKY_TYPE = {}));
|
|
14
|
-
exports.TABLE_STICKY_TYPE = TABLE_STICKY_TYPE;
|
|
15
|
-
var TABLE_TYPE;
|
|
16
|
-
(function (TABLE_TYPE) {
|
|
17
|
-
TABLE_TYPE["AUTO"] = "table-auto";
|
|
18
|
-
TABLE_TYPE["MODAL"] = "table-modal";
|
|
19
|
-
TABLE_TYPE["CARD"] = "table-card";
|
|
20
|
-
TABLE_TYPE["FULL"] = "table-full";
|
|
21
|
-
})(TABLE_TYPE || (TABLE_TYPE = {}));
|
|
22
|
-
exports.TABLE_TYPE = TABLE_TYPE;
|
|
23
|
-
var COLUMN_TEXT_ALIGN;
|
|
24
|
-
(function (COLUMN_TEXT_ALIGN) {
|
|
25
|
-
COLUMN_TEXT_ALIGN["LEFT"] = "left";
|
|
26
|
-
COLUMN_TEXT_ALIGN["RIGHT"] = "right";
|
|
27
|
-
})(COLUMN_TEXT_ALIGN || (COLUMN_TEXT_ALIGN = {}));
|
|
28
|
-
exports.COLUMN_TEXT_ALIGN = COLUMN_TEXT_ALIGN;
|
|
29
|
-
var ORDER_TABLE_BY;
|
|
30
|
-
(function (ORDER_TABLE_BY) {
|
|
31
|
-
ORDER_TABLE_BY[ORDER_TABLE_BY["ASC"] = 0] = "ASC";
|
|
32
|
-
ORDER_TABLE_BY[ORDER_TABLE_BY["DESC"] = 1] = "DESC";
|
|
33
|
-
ORDER_TABLE_BY[ORDER_TABLE_BY["NONE"] = 2] = "NONE";
|
|
34
|
-
})(ORDER_TABLE_BY || (ORDER_TABLE_BY = {}));
|
|
35
|
-
exports.ORDER_TABLE_BY = ORDER_TABLE_BY;
|
|
36
|
-
var ARIA_SORT_VALUES;
|
|
37
|
-
(function (ARIA_SORT_VALUES) {
|
|
38
|
-
ARIA_SORT_VALUES["ASC"] = "ascending";
|
|
39
|
-
ARIA_SORT_VALUES["DESC"] = "descending";
|
|
40
|
-
ARIA_SORT_VALUES["NONE"] = "none";
|
|
41
|
-
ARIA_SORT_VALUES["OTHER"] = "other";
|
|
42
|
-
})(ARIA_SORT_VALUES || (ARIA_SORT_VALUES = {}));
|
|
43
|
-
exports.ARIA_SORT_VALUES = ARIA_SORT_VALUES;
|
|
44
|
-
var SORT_ICON_CLASS;
|
|
45
|
-
(function (SORT_ICON_CLASS) {
|
|
46
|
-
SORT_ICON_CLASS["SORT_UP"] = "icon-sort-up";
|
|
47
|
-
SORT_ICON_CLASS["SORT_DOWN"] = "icon-sort-down";
|
|
48
|
-
})(SORT_ICON_CLASS || (SORT_ICON_CLASS = {}));
|
|
49
|
-
exports.SORT_ICON_CLASS = SORT_ICON_CLASS;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/** @deprecated should not use that, just use `RcText` with `titleWhenOverflow` and `flexFull` */
|
|
3
|
-
declare const RcTextWithEllipsis: import("styled-components").StyledComponentClass<Pick<import("@material-ui/core/OverridableComponent").DefaultComponentProps<import("@material-ui/core").TypographyTypeMap<{}, "span">>, "key" | "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "display" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "variant" | "innerRef" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & React.RefAttributes<any>, import("../../foundation").RcTheme, Pick<Pick<import("@material-ui/core/OverridableComponent").DefaultComponentProps<import("@material-ui/core").TypographyTypeMap<{}, "span">>, "key" | "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "display" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "variant" | "innerRef" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & React.RefAttributes<any>, "ref" | "key" | "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "display" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "slot" | "title" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "variant" | "innerRef" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
|
|
4
|
-
theme?: import("../../foundation").RcTheme | undefined;
|
|
5
|
-
}>;
|
|
6
|
-
export { RcTextWithEllipsis };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
-
var core_1 = require("@material-ui/core");
|
|
6
|
-
var foundation_1 = require("../../foundation");
|
|
7
|
-
var styled_components_1 = tslib_1.__importDefault(require("../../foundation/styled-components"));
|
|
8
|
-
var _RcTextWithEllipsis = react_1.forwardRef(function (props, ref) {
|
|
9
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
10
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
11
|
-
foundation_1.useDeprecatedLog({
|
|
12
|
-
component: 'RcTextWithEllipsis',
|
|
13
|
-
message: 'should not use that, just use `RcText` with `titleWhenOverflow` and `flexFull`',
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return react_1.default.createElement(core_1.Typography, tslib_1.__assign({}, props, { ref: ref }));
|
|
17
|
-
});
|
|
18
|
-
/** @deprecated should not use that, just use `RcText` with `titleWhenOverflow` and `flexFull` */
|
|
19
|
-
var RcTextWithEllipsis = styled_components_1.default(_RcTextWithEllipsis)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", ";\n flex: 1 1 auto;\n"], ["\n ", ";\n flex: 1 1 auto;\n"])), foundation_1.ellipsis());
|
|
20
|
-
exports.RcTextWithEllipsis = RcTextWithEllipsis;
|
|
21
|
-
var templateObject_1;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/** @deprecated should not use that, just use RcText with `highlight` */
|
|
3
|
-
declare const RcTextWithHighlight: (props: {
|
|
4
|
-
children: string | number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | (string | number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | null)[] | null;
|
|
5
|
-
}) => JSX.Element;
|
|
6
|
-
export { RcTextWithHighlight };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
var react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
var foundation_1 = require("../../foundation");
|
|
6
|
-
var styled_components_1 = tslib_1.__importDefault(require("../../foundation/styled-components"));
|
|
7
|
-
var StyledSpan = styled_components_1.default.span(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n color: ", ";\n background-color: ", ";\n a {\n color: inherit;\n }\n"], ["\n color: ", ";\n background-color: ", ";\n a {\n color: inherit;\n }\n"])), foundation_1.palette2('highlight', 'f01'), foundation_1.palette2('highlight', 'b02'));
|
|
8
|
-
/** @deprecated should not use that, just use RcText with `highlight` */
|
|
9
|
-
var RcTextWithHighlight = function (props) {
|
|
10
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
11
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12
|
-
foundation_1.useDeprecatedLog({
|
|
13
|
-
component: 'RcTextWithHighlight',
|
|
14
|
-
message: 'should not use that, just use RcText with `highlight`',
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return react_1.default.createElement(StyledSpan, tslib_1.__assign({ className: "highlight-term" }, props));
|
|
18
|
-
};
|
|
19
|
-
exports.RcTextWithHighlight = RcTextWithHighlight;
|
|
20
|
-
var templateObject_1;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TextWithHighlight';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TypographyProps } from '@material-ui/core/Typography';
|
|
3
|
-
import { RcBaseProps } from '../../foundation/typings';
|
|
4
|
-
import { RcLinkProps } from '../Link';
|
|
5
|
-
declare type RcTextWithLinkProps = {
|
|
6
|
-
text: string;
|
|
7
|
-
linkText: string;
|
|
8
|
-
onClick?: (event: React.MouseEvent<HTMLSpanElement>) => void;
|
|
9
|
-
TypographyProps?: RcBaseProps<TypographyProps>;
|
|
10
|
-
RcLinkProps?: RcLinkProps;
|
|
11
|
-
};
|
|
12
|
-
/** @deprecated please don't use that component, just use RcText and RcLink directly */
|
|
13
|
-
declare const RcTextWithLink: React.MemoExoticComponent<(props: RcTextWithLinkProps) => JSX.Element>;
|
|
14
|
-
export { RcTextWithLink };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
-
var Typography_1 = tslib_1.__importDefault(require("@material-ui/core/Typography"));
|
|
6
|
-
var foundation_1 = require("../../foundation");
|
|
7
|
-
var styled_components_1 = tslib_1.__importDefault(require("../../foundation/styled-components"));
|
|
8
|
-
var Link_1 = require("../Link");
|
|
9
|
-
var TipsText = styled_components_1.default(Typography_1.default)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n && {\n color: ", ";\n ", ";\n * {\n ", ";\n }\n }\n"], ["\n && {\n color: ", ";\n ", ";\n * {\n ", ";\n }\n }\n"])), foundation_1.palette2('neutral', 'f04'), foundation_1.typography('caption1'), foundation_1.typography('caption1'));
|
|
10
|
-
/** @deprecated please don't use that component, just use RcText and RcLink directly */
|
|
11
|
-
var RcTextWithLink = react_1.memo(function (props) {
|
|
12
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
13
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14
|
-
foundation_1.useDeprecatedLog({
|
|
15
|
-
component: 'RcTextWithLink',
|
|
16
|
-
message: "please don't use that component, just use `RcText` and RcLink directly",
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
var text = props.text, linkText = props.linkText, onClick = props.onClick, TypographyProps = props.TypographyProps, RcLinkProps = props.RcLinkProps;
|
|
20
|
-
var textProps;
|
|
21
|
-
if (TypographyProps) {
|
|
22
|
-
var innerRef = TypographyProps.innerRef, rest = tslib_1.__rest(TypographyProps, ["innerRef"]);
|
|
23
|
-
textProps = rest;
|
|
24
|
-
}
|
|
25
|
-
return (react_1.default.createElement(TipsText, tslib_1.__assign({}, textProps),
|
|
26
|
-
text,
|
|
27
|
-
react_1.default.createElement(Link_1.RcLink, tslib_1.__assign({ handleOnClick: onClick }, RcLinkProps), linkText)));
|
|
28
|
-
});
|
|
29
|
-
exports.RcTextWithLink = RcTextWithLink;
|
|
30
|
-
RcTextWithLink.displayName = 'RcTextWithLink';
|
|
31
|
-
var templateObject_1;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TextWithLink';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/** @deprecated please don't use that component, just use `RcText` with `title` directly */
|
|
3
|
-
declare const RcTextWithTooltip: (props: {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
tooltip?: string | undefined;
|
|
6
|
-
textColor?: (string & Record<never, never>) | "action.grayDark" | "action.grayLight" | "action.primary" | "avatar.ash" | "avatar.blueberry" | "avatar.brass" | "avatar.global" | "avatar.gold" | "avatar.lake" | "avatar.oasis" | "avatar.pear" | "avatar.persimmon" | "avatar.sage" | "avatar.tomato" | "content.brand" | "danger.b01" | "danger.b02" | "danger.b03" | "danger.b04" | "danger.f01" | "danger.f02" | "danger.f11" | "dialHeader.avatarBg" | "dialHeader.avatarIcon" | "dialHeader.bg" | "dialHeader.focusBorder" | "dialHeader.icon" | "dialHeader.text" | "dialHeader.textHint" | "disabled.b01" | "disabled.f01" | "disabled.f02" | "header.bgLeft" | "header.bgOverlay" | "header.bgOverlayDisabled" | "header.bgRight" | "header.border" | "header.divider" | "header.fabBg" | "header.fabIcon" | "header.focusBorder" | "header.icon" | "header.iconDisabled" | "header.text" | "header.textHint" | "highContrast" | "highlight.b01" | "highlight.b02" | "highlight.b03" | "highlight.f01" | "highlight.f02" | "informative.b01" | "informative.f01" | "informative.f02" | "interactive.b01" | "interactive.b02" | "interactive.f01" | "label.black02" | "label.blue01" | "label.blue02" | "label.green01" | "label.green02" | "label.orange01" | "label.orange02" | "label.purple01" | "label.purple02" | "label.red01" | "label.red02" | "label.teal01" | "label.teal02" | "label.yellow01" | "label.yellow02" | "nav.b01" | "nav.b02" | "nav.bookmark" | "nav.ctlDefault" | "nav.ctlSelected" | "nav.f01" | "nav.f02" | "nav.f03" | "nav.f04" | "nav.iconDefault" | "nav.iconSelected" | "nav.line" | "nav.mention" | "nav.menuBg" | "nav.menuText" | "neutral.b01" | "neutral.b02" | "neutral.b03" | "neutral.b04" | "neutral.b05" | "neutral.b06" | "neutral.elevation" | "neutral.f01" | "neutral.f02" | "neutral.f03" | "neutral.f04" | "neutral.f05" | "neutral.f06" | "neutral.f07" | "neutral.f11" | "neutral.l01" | "neutral.l02" | "neutral.l03" | "neutral.l04" | "neutral.transparent" | "presence.available" | "presence.busy" | "presence.invisible" | "subAction" | "success.b01" | "success.b02" | "success.b03" | "success.b04" | "success.b05" | "success.f01" | "success.f02" | "success.f11" | "tab.default" | "tab.selected" | "umi.bg" | "umi.mentioned" | "umi.text" | "warning.b01" | "warning.b02" | "warning.b03" | "warning.f01" | "warning.f02" | "warning.f11" | string[] | import("../../foundation/styles/newPalette").PaletteReturnType | undefined;
|
|
7
|
-
}) => JSX.Element;
|
|
8
|
-
export { RcTextWithTooltip };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
-
var foundation_1 = require("../../foundation");
|
|
6
|
-
var StyledText = foundation_1.styled.span(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n color: ", ";\n"], ["\n color: ",
|
|
7
|
-
";\n"])), function (_a) {
|
|
8
|
-
var textColor = _a.textColor;
|
|
9
|
-
return foundation_1.getParsePaletteColor(textColor, foundation_1.palette2('neutral', 'f06'));
|
|
10
|
-
});
|
|
11
|
-
/** @deprecated please don't use that component, just use `RcText` with `title` directly */
|
|
12
|
-
var RcTextWithTooltip = function (props) {
|
|
13
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
15
|
-
foundation_1.useDeprecatedLog({
|
|
16
|
-
component: 'RcTextWithTooltip',
|
|
17
|
-
message: "please don't use that component, just use `RcText` with `title` directly",
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
var tooltip = props.tooltip, children = props.children, _a = props.textColor, textColor = _a === void 0 ? ['neutral', 'f06'] : _a;
|
|
21
|
-
var ref = react_1.useRef(null);
|
|
22
|
-
var _b = tslib_1.__read(react_1.useState(false), 2), showTooltip = _b[0], setShowTooltip = _b[1];
|
|
23
|
-
var onMouseOver = function () {
|
|
24
|
-
var span = ref.current;
|
|
25
|
-
if (span && span.parentElement) {
|
|
26
|
-
var _a = span.parentElement, scrollHeight = _a.scrollHeight, scrollWidth = _a.scrollWidth, clientHeight = _a.clientHeight, clientWidth = _a.clientWidth;
|
|
27
|
-
setShowTooltip(scrollWidth > clientWidth || scrollHeight > clientHeight);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
var toolTipText = typeof children === 'string' ? children : tooltip || '';
|
|
31
|
-
return (react_1.default.createElement("span", { title: showTooltip ? toolTipText : '', onMouseOver: onMouseOver, ref: ref },
|
|
32
|
-
react_1.default.createElement(StyledText, { textColor: textColor }, children)));
|
|
33
|
-
};
|
|
34
|
-
exports.RcTextWithTooltip = RcTextWithTooltip;
|
|
35
|
-
var templateObject_1;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TextWithTooltip';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Autocomplete';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import MuiGrid from '@material-ui/core/Grid';
|
|
4
|
-
export var RcGrid = React.memo(function (props) { return React.createElement(MuiGrid, __assign({}, props)); });
|
|
5
|
-
RcGrid.displayName = 'RcGrid';
|
|
6
|
-
RcGrid.dependencies = [RcGrid];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Grid';
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { __assign, __awaiter, __extends, __generator, __makeTemplateObject, __rest } from "tslib";
|
|
2
|
-
import React, { createRef, } from 'react';
|
|
3
|
-
import cloneDeep from 'lodash/cloneDeep';
|
|
4
|
-
import values from 'lodash/values';
|
|
5
|
-
import { ImageBroken } from '@ringcentral/juno-icon';
|
|
6
|
-
import styled from '../../foundation/styled-components';
|
|
7
|
-
import { RcIcon } from '../Icon';
|
|
8
|
-
var StyledLoadingPage = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
9
|
-
var StyledBackground = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: block;\n overflow: hidden;\n box-shadow: ", ";\n visibility: ", ";\n user-select: none;\n height: ", "px;\n width: ", "px;\n"], ["\n display: block;\n overflow: hidden;\n box-shadow: ", ";\n visibility: ", ";\n user-select: none;\n height: ", "px;\n width: ", "px;\n"])), function (_a) {
|
|
10
|
-
var theme = _a.theme;
|
|
11
|
-
return theme.shadows[7];
|
|
12
|
-
}, function (_a) {
|
|
13
|
-
var visibility = _a.visibility;
|
|
14
|
-
return visibility;
|
|
15
|
-
}, function (_a) {
|
|
16
|
-
var height = _a.height;
|
|
17
|
-
return height;
|
|
18
|
-
}, function (_a) {
|
|
19
|
-
var width = _a.width;
|
|
20
|
-
return width;
|
|
21
|
-
});
|
|
22
|
-
var HiddenImage = styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n visibility: hidden;\n display: none;\n"], ["\n visibility: hidden;\n display: none;\n"])));
|
|
23
|
-
function isThumbnailMode(props) {
|
|
24
|
-
return props.thumbnailSrc && props.thumbnailSrc !== props.src;
|
|
25
|
-
}
|
|
26
|
-
var RcImageView = /** @class */ (function (_super) {
|
|
27
|
-
__extends(RcImageView, _super);
|
|
28
|
-
function RcImageView(props) {
|
|
29
|
-
var _this = _super.call(this, props) || this;
|
|
30
|
-
_this._imageRef = createRef();
|
|
31
|
-
_this._canvasRef = createRef();
|
|
32
|
-
_this.getImageRef = function () {
|
|
33
|
-
return _this.props.imageRef || _this._imageRef;
|
|
34
|
-
};
|
|
35
|
-
_this._drawToCanvas = function (imgBitmap) {
|
|
36
|
-
var canvasE = _this._canvasRef.current;
|
|
37
|
-
if (!canvasE) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
var ctx = canvasE.getContext('2d');
|
|
41
|
-
if (ctx) {
|
|
42
|
-
if (!imgBitmap) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
var naturalWidth = imgBitmap.width, naturalHeight = imgBitmap.height;
|
|
46
|
-
canvasE.width = naturalWidth;
|
|
47
|
-
canvasE.height = naturalHeight;
|
|
48
|
-
ctx.drawImage(imgBitmap, 0, 0, naturalWidth, naturalHeight, 0, 0, naturalWidth, naturalHeight);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
_this._loadHandler = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
52
|
-
var _a, loadings, currentShow, _b, onSizeLoad, onLoad, _c, naturalWidth, naturalHeight, performanceTracerEnd, target, bitmap;
|
|
53
|
-
var _d;
|
|
54
|
-
return __generator(this, function (_e) {
|
|
55
|
-
switch (_e.label) {
|
|
56
|
-
case 0:
|
|
57
|
-
_a = this.state, loadings = _a.loadings, currentShow = _a.currentShow;
|
|
58
|
-
_b = this.props, onSizeLoad = _b.onSizeLoad, onLoad = _b.onLoad;
|
|
59
|
-
if (currentShow === 'raw') {
|
|
60
|
-
_c = event.currentTarget, naturalWidth = _c.naturalWidth, naturalHeight = _c.naturalHeight;
|
|
61
|
-
onSizeLoad === null || onSizeLoad === void 0 ? void 0 : onSizeLoad(naturalWidth, naturalHeight);
|
|
62
|
-
onLoad === null || onLoad === void 0 ? void 0 : onLoad();
|
|
63
|
-
performanceTracerEnd = this.props.performanceTracerEnd;
|
|
64
|
-
performanceTracerEnd === null || performanceTracerEnd === void 0 ? void 0 : performanceTracerEnd();
|
|
65
|
-
}
|
|
66
|
-
this.setState({
|
|
67
|
-
loadings: __assign(__assign({}, loadings), (_d = {}, _d[currentShow] = false, _d)),
|
|
68
|
-
});
|
|
69
|
-
if (!this._canvasRef.current) {
|
|
70
|
-
return [2 /*return*/];
|
|
71
|
-
}
|
|
72
|
-
target = event.target;
|
|
73
|
-
if (!('createImageBitmap' in window)) return [3 /*break*/, 2];
|
|
74
|
-
return [4 /*yield*/, createImageBitmap(target)];
|
|
75
|
-
case 1:
|
|
76
|
-
bitmap = _e.sent();
|
|
77
|
-
this._drawToCanvas(bitmap);
|
|
78
|
-
return [3 /*break*/, 3];
|
|
79
|
-
case 2:
|
|
80
|
-
this._drawToCanvas(target);
|
|
81
|
-
_e.label = 3;
|
|
82
|
-
case 3: return [2 /*return*/];
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}); };
|
|
86
|
-
_this._errorHandler = function () {
|
|
87
|
-
var _a, _b;
|
|
88
|
-
var _c = _this.state, loadings = _c.loadings, errors = _c.errors, currentShow = _c.currentShow;
|
|
89
|
-
var onError = _this.props.onError;
|
|
90
|
-
if (currentShow === 'raw') {
|
|
91
|
-
onError === null || onError === void 0 ? void 0 : onError();
|
|
92
|
-
}
|
|
93
|
-
_this.setState({
|
|
94
|
-
loadings: __assign(__assign({}, loadings), (_a = {}, _a[currentShow] = false, _a)),
|
|
95
|
-
errors: __assign(__assign({}, errors), (_b = {}, _b[currentShow] = true, _b)),
|
|
96
|
-
});
|
|
97
|
-
onError === null || onError === void 0 ? void 0 : onError();
|
|
98
|
-
};
|
|
99
|
-
_this.rawImageLoader = function () {
|
|
100
|
-
var currentShow = _this.state.currentShow;
|
|
101
|
-
var _a = _this.props, thumbnailSrc = _a.thumbnailSrc, src = _a.src;
|
|
102
|
-
var currentShowSrc = currentShow === 'raw' ? src : thumbnailSrc;
|
|
103
|
-
if (!currentShowSrc) {
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
106
|
-
var pathName = new URL(currentShowSrc).pathname;
|
|
107
|
-
var isGif = /\.gif$/.test(pathName);
|
|
108
|
-
if (isGif) {
|
|
109
|
-
return (React.createElement("img", __assign({ src: currentShowSrc, alt: "", onLoad: _this._loadHandler, onError: _this._errorHandler }, _this._imageAttributes)));
|
|
110
|
-
}
|
|
111
|
-
return (React.createElement(React.Fragment, null,
|
|
112
|
-
_this.canvasRenderer(),
|
|
113
|
-
React.createElement(HiddenImage, { src: currentShowSrc, onLoad: _this._loadHandler, onError: _this._errorHandler })));
|
|
114
|
-
};
|
|
115
|
-
_this.canvasRenderer = function () {
|
|
116
|
-
return (React.createElement(StyledBackground, __assign({}, _this._imageAttributes, { visibility: _this.error ? 'hidden' : 'visible' }),
|
|
117
|
-
React.createElement("canvas", { ref: _this._canvasRef, style: { width: '100%' } })));
|
|
118
|
-
};
|
|
119
|
-
var performanceTracerStart = _this.props.performanceTracerStart;
|
|
120
|
-
performanceTracerStart === null || performanceTracerStart === void 0 ? void 0 : performanceTracerStart();
|
|
121
|
-
_this.state = _this.getInitState(props);
|
|
122
|
-
var _a = _this.props, width = _a.width, height = _a.height, onSizeLoad = _a.onSizeLoad;
|
|
123
|
-
if (width && height && onSizeLoad) {
|
|
124
|
-
onSizeLoad === null || onSizeLoad === void 0 ? void 0 : onSizeLoad(Number(width), Number(height));
|
|
125
|
-
}
|
|
126
|
-
return _this;
|
|
127
|
-
}
|
|
128
|
-
RcImageView.prototype.getInitState = function (props) {
|
|
129
|
-
if (isThumbnailMode(props)) {
|
|
130
|
-
return cloneDeep(RcImageView.initThumbnailModeState);
|
|
131
|
-
}
|
|
132
|
-
return cloneDeep(RcImageView.initState);
|
|
133
|
-
};
|
|
134
|
-
RcImageView.prototype._errorView = function () {
|
|
135
|
-
if (!this.error) {
|
|
136
|
-
return null;
|
|
137
|
-
}
|
|
138
|
-
return (React.createElement(StyledLoadingPage, null,
|
|
139
|
-
React.createElement(RcIcon, { size: "xxxlarge", color: "neutral.f02", symbol: ImageBroken })));
|
|
140
|
-
};
|
|
141
|
-
RcImageView.prototype._hiddenRawLoader = function () {
|
|
142
|
-
var _this = this;
|
|
143
|
-
var _a = this.state, loadings = _a.loadings, errors = _a.errors, currentShow = _a.currentShow;
|
|
144
|
-
var _b = this.props, onSizeLoad = _b.onSizeLoad, src = _b.src;
|
|
145
|
-
return (currentShow !== 'raw' && (React.createElement(HiddenImage, { src: src, onLoad: function (event) {
|
|
146
|
-
var _a = event.currentTarget, naturalWidth = _a.naturalWidth, naturalHeight = _a.naturalHeight;
|
|
147
|
-
onSizeLoad === null || onSizeLoad === void 0 ? void 0 : onSizeLoad(naturalWidth, naturalHeight);
|
|
148
|
-
_this.setState({
|
|
149
|
-
loadings: __assign(__assign({}, loadings), { raw: false }),
|
|
150
|
-
currentShow: 'raw',
|
|
151
|
-
});
|
|
152
|
-
}, onError: function () {
|
|
153
|
-
_this.setState({
|
|
154
|
-
loadings: __assign(__assign({}, loadings), { raw: false }),
|
|
155
|
-
errors: __assign(__assign({}, errors), { raw: true }),
|
|
156
|
-
});
|
|
157
|
-
} })));
|
|
158
|
-
};
|
|
159
|
-
Object.defineProperty(RcImageView.prototype, "error", {
|
|
160
|
-
get: function () {
|
|
161
|
-
var errors = this.state.errors;
|
|
162
|
-
return values(errors).every(function (status) { return !!status; });
|
|
163
|
-
},
|
|
164
|
-
enumerable: true,
|
|
165
|
-
configurable: true
|
|
166
|
-
});
|
|
167
|
-
Object.defineProperty(RcImageView.prototype, "_imageAttributes", {
|
|
168
|
-
get: function () {
|
|
169
|
-
var _a = this.props, onSizeLoad = _a.onSizeLoad, onLoad = _a.onLoad, onError = _a.onError, loadingPlaceHolder = _a.loadingPlaceHolder, viewRef = _a.imageRef, thumbnailSrc = _a.thumbnailSrc, src = _a.src, performanceTracerEnd = _a.performanceTracerEnd, performanceTracerStart = _a.performanceTracerStart, rest = __rest(_a, ["onSizeLoad", "onLoad", "onError", "loadingPlaceHolder", "imageRef", "thumbnailSrc", "src", "performanceTracerEnd", "performanceTracerStart"]);
|
|
170
|
-
return __assign(__assign({}, rest), { ref: this.getImageRef() });
|
|
171
|
-
},
|
|
172
|
-
enumerable: true,
|
|
173
|
-
configurable: true
|
|
174
|
-
});
|
|
175
|
-
RcImageView.prototype.render = function () {
|
|
176
|
-
return (React.createElement(React.Fragment, null,
|
|
177
|
-
this.rawImageLoader(),
|
|
178
|
-
this._hiddenRawLoader(),
|
|
179
|
-
this._errorView()));
|
|
180
|
-
};
|
|
181
|
-
RcImageView.initState = {
|
|
182
|
-
loadings: {
|
|
183
|
-
raw: true,
|
|
184
|
-
},
|
|
185
|
-
errors: {
|
|
186
|
-
raw: false,
|
|
187
|
-
},
|
|
188
|
-
currentShow: 'raw',
|
|
189
|
-
};
|
|
190
|
-
RcImageView.initThumbnailModeState = {
|
|
191
|
-
loadings: {
|
|
192
|
-
raw: true,
|
|
193
|
-
thumbnail: true,
|
|
194
|
-
},
|
|
195
|
-
errors: {
|
|
196
|
-
raw: false,
|
|
197
|
-
thumbnail: false,
|
|
198
|
-
},
|
|
199
|
-
currentShow: 'thumbnail',
|
|
200
|
-
};
|
|
201
|
-
return RcImageView;
|
|
202
|
-
}(React.Component));
|
|
203
|
-
export { RcImageView };
|
|
204
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ImageView';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { __makeTemplateObject } from "tslib";
|
|
2
|
-
import React, { forwardRef, useMemo } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { styled, useThemeProps } from '../../foundation';
|
|
5
|
-
import { StyledTable, TableWrapper } from './styled';
|
|
6
|
-
import { TABLE_BORDER_TYPE, TABLE_STICKY_TYPE, TABLE_TYPE } from './types';
|
|
7
|
-
var _RcTable = forwardRef(function (inProps, ref) {
|
|
8
|
-
var props = useThemeProps({ props: inProps, name: 'RcTable' });
|
|
9
|
-
var header = props.header, children = props.children, desc = props.desc, tableSticky = props.tableSticky, tableType = props.tableType, tableBorder = props.tableBorder, classes = props.classes, className = props.className;
|
|
10
|
-
var containerClass = useMemo(function () {
|
|
11
|
-
var _a;
|
|
12
|
-
return clsx(className, classes === null || classes === void 0 ? void 0 : classes.root, (_a = {},
|
|
13
|
-
_a[TABLE_BORDER_TYPE.BORDERED] = tableBorder === TABLE_BORDER_TYPE.BORDERED,
|
|
14
|
-
_a));
|
|
15
|
-
}, [className, classes, tableBorder]);
|
|
16
|
-
var tableClass = useMemo(function () {
|
|
17
|
-
var _a;
|
|
18
|
-
return clsx(classes === null || classes === void 0 ? void 0 : classes.table, tableType || TABLE_TYPE.CARD, (_a = {},
|
|
19
|
-
_a[TABLE_STICKY_TYPE.STICKY] = tableSticky === TABLE_STICKY_TYPE.STICKY,
|
|
20
|
-
_a));
|
|
21
|
-
}, [classes, tableSticky, tableType]);
|
|
22
|
-
return (React.createElement(TableWrapper, { className: containerClass },
|
|
23
|
-
React.createElement(StyledTable, { className: tableClass, "aria-label": desc, ref: ref },
|
|
24
|
-
header ? header : null,
|
|
25
|
-
React.createElement("tbody", null, children))));
|
|
26
|
-
});
|
|
27
|
-
var RcTable = styled(_RcTable)(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
|
28
|
-
export { RcTable };
|
|
29
|
-
var templateObject_1;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
2
|
-
import React, { forwardRef } from 'react';
|
|
3
|
-
import { styled } from '../../foundation';
|
|
4
|
-
import { RcTypography } from '../Typography';
|
|
5
|
-
var _RcTableBodyCellContent = forwardRef(function (_a, ref) {
|
|
6
|
-
var children = _a.children, _b = _a.noWrap, noWrap = _b === void 0 ? true : _b, rest = __rest(_a, ["children", "noWrap"]);
|
|
7
|
-
return (React.createElement(RcTypography, __assign({ ref: ref, noWrap: noWrap, component: "div", color: "neutral.f05" }, rest), children));
|
|
8
|
-
});
|
|
9
|
-
var RcTableBodyCellContent = styled(_RcTableBodyCellContent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n text-align: ", ";\n"], ["\n text-align: ", ";\n"])), function (_a) {
|
|
10
|
-
var textAlign = _a.textAlign;
|
|
11
|
-
return textAlign;
|
|
12
|
-
});
|
|
13
|
-
export { RcTableBodyCellContent };
|
|
14
|
-
var templateObject_1;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyledTableRow } from './styled';
|
|
3
|
-
import { RcTableHeadCell } from './TableHeadCell';
|
|
4
|
-
import { ORDER_TABLE_BY } from './types';
|
|
5
|
-
var RcTableHeadView = function (props) {
|
|
6
|
-
var columnData = props.columnData, sortMap = props.sortMap, sortHandler = props.sortHandler;
|
|
7
|
-
return (React.createElement("thead", null,
|
|
8
|
-
React.createElement(StyledTableRow, null, columnData.map(function (column) {
|
|
9
|
-
var sortDirection = sortMap && sortMap.sortKey === column.sortKey
|
|
10
|
-
? sortMap.sortDirection
|
|
11
|
-
: ORDER_TABLE_BY.NONE;
|
|
12
|
-
return (React.createElement(RcTableHeadCell, { key: column.sortKey + "-" + column.title, width: column.width, title: column.title, sortDirection: sortDirection, sortKey: column.sortKey, sortHandler: sortHandler, textAlign: column.textAlign, automationID: column.automationID }));
|
|
13
|
-
}))));
|
|
14
|
-
};
|
|
15
|
-
export { RcTableHeadView };
|