@ebay/ui-core-react 4.2.6 → 5.0.1
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/common/event-utils/index.d.ts +10 -7
- package/common/event-utils/index.d.ts.map +1 -1
- package/common/event-utils/index.js +11 -3
- package/common/event-utils/types.d.ts +7 -0
- package/common/event-utils/types.d.ts.map +1 -1
- package/common/event-utils/types.js +12 -0
- package/common/floating-label-utils/hooks.d.ts +2 -1
- package/common/floating-label-utils/hooks.d.ts.map +1 -1
- package/common/floating-label-utils/hooks.js +5 -4
- package/ebay-alert-dialog/README.md +3 -2
- package/ebay-alert-dialog/alert-dialog.d.ts +0 -1
- package/ebay-alert-dialog/alert-dialog.d.ts.map +1 -1
- package/ebay-alert-dialog/alert-dialog.js +1 -1
- package/ebay-breadcrumbs/README.md +1 -1
- package/ebay-breadcrumbs/breadcrumbs.d.ts +3 -2
- package/ebay-breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/ebay-breadcrumbs/breadcrumbs.js +1 -1
- package/ebay-button/README.md +4 -4
- package/ebay-carousel/carousel-control-button.js +2 -2
- package/ebay-carousel/carousel.js +1 -1
- package/ebay-checkbox/README.md +11 -10
- package/ebay-checkbox/checkbox.d.ts +15 -3
- package/ebay-checkbox/checkbox.d.ts.map +1 -1
- package/ebay-checkbox/checkbox.js +9 -4
- package/ebay-confirm-dialog/README.md +6 -6
- package/ebay-confirm-dialog/confirm-dialog.d.ts +0 -1
- package/ebay-confirm-dialog/confirm-dialog.d.ts.map +1 -1
- package/ebay-confirm-dialog/confirm-dialog.js +1 -1
- package/ebay-dialog-base/components/dialogBase.d.ts +3 -2
- package/ebay-dialog-base/components/dialogBase.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialogBase.js +6 -3
- package/ebay-drawer-dialog/README.md +7 -6
- package/ebay-drawer-dialog/components/drawer.d.ts +3 -0
- package/ebay-drawer-dialog/components/drawer.d.ts.map +1 -1
- package/ebay-fake-menu/README.md +5 -5
- package/ebay-fake-menu/menu-item.d.ts +1 -1
- package/ebay-fake-menu/menu-item.d.ts.map +1 -1
- package/ebay-fake-menu/menu.d.ts +9 -5
- package/ebay-fake-menu/menu.d.ts.map +1 -1
- package/ebay-fake-menu/menu.js +2 -2
- package/ebay-fake-menu-button/README.md +9 -4
- package/ebay-fake-menu-button/menu-button.d.ts +9 -2
- package/ebay-fake-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button.js +7 -5
- package/ebay-fullscreen-dialog/fullscreen-dialog.d.ts +0 -1
- package/ebay-fullscreen-dialog/fullscreen-dialog.d.ts.map +1 -1
- package/ebay-fullscreen-dialog/fullscreen-dialog.js +1 -1
- package/ebay-icon/types.d.ts +1 -1
- package/ebay-icon/types.d.ts.map +1 -1
- package/ebay-icon-button/README.md +9 -0
- package/ebay-icon-button/icon-button.d.ts +3 -1
- package/ebay-icon-button/icon-button.d.ts.map +1 -1
- package/ebay-icon-button/icon-button.js +8 -2
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts +0 -1
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts.map +1 -1
- package/ebay-lightbox-dialog/lightbox-dialog.js +1 -1
- package/ebay-listbox-button/README.md +8 -1
- package/ebay-listbox-button/listbox-button.d.ts +11 -3
- package/ebay-listbox-button/listbox-button.d.ts.map +1 -1
- package/ebay-listbox-button/listbox-button.js +41 -16
- package/ebay-menu/README.md +5 -4
- package/ebay-menu/menu-item.d.ts +1 -1
- package/ebay-menu/menu-item.d.ts.map +1 -1
- package/ebay-menu/menu.d.ts +4 -4
- package/ebay-menu/menu.d.ts.map +1 -1
- package/ebay-menu/menu.js +85 -42
- package/ebay-menu/types.d.ts +21 -12
- package/ebay-menu/types.d.ts.map +1 -1
- package/ebay-menu-button/README.md +2 -2
- package/ebay-menu-button/menu-button.d.ts +3 -3
- package/ebay-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-menu-button/menu-button.js +18 -4
- package/ebay-page-notice/README.md +5 -1
- package/ebay-page-notice/index.d.ts +1 -1
- package/ebay-page-notice/index.d.ts.map +1 -1
- package/ebay-page-notice/page-notice.d.ts +5 -4
- package/ebay-page-notice/page-notice.d.ts.map +1 -1
- package/ebay-page-notice/page-notice.js +7 -8
- package/ebay-pagination/README.md +5 -5
- package/ebay-pagination/pagination-item.d.ts +8 -4
- package/ebay-pagination/pagination-item.d.ts.map +1 -1
- package/ebay-pagination/pagination-item.js +2 -1
- package/ebay-pagination/pagination.d.ts +8 -5
- package/ebay-pagination/pagination.d.ts.map +1 -1
- package/ebay-pagination/pagination.js +1 -1
- package/ebay-panel-dialog/panel-dialog.d.ts +0 -1
- package/ebay-panel-dialog/panel-dialog.d.ts.map +1 -1
- package/ebay-panel-dialog/panel-dialog.js +1 -1
- package/ebay-radio/README.md +7 -2
- package/ebay-radio/radio.d.ts +12 -3
- package/ebay-radio/radio.d.ts.map +1 -1
- package/ebay-radio/radio.js +7 -5
- package/ebay-section-notice/README.md +5 -0
- package/ebay-section-notice/index.d.ts +1 -1
- package/ebay-section-notice/index.d.ts.map +1 -1
- package/ebay-section-notice/section-notice.d.ts +6 -3
- package/ebay-section-notice/section-notice.d.ts.map +1 -1
- package/ebay-section-notice/section-notice.js +32 -4
- package/ebay-select/README.md +3 -1
- package/ebay-select/ebay-select.d.ts +7 -2
- package/ebay-select/ebay-select.d.ts.map +1 -1
- package/ebay-select/ebay-select.js +1 -1
- package/ebay-select/index.d.ts +1 -1
- package/ebay-select/index.d.ts.map +1 -1
- package/ebay-split-button/README.md +2 -2
- package/ebay-split-button/split-button.js +1 -1
- package/ebay-split-button/types.d.ts +2 -3
- package/ebay-split-button/types.d.ts.map +1 -1
- package/ebay-star-rating-select/README.md +8 -0
- package/ebay-star-rating-select/star-rating-select.d.ts +8 -4
- package/ebay-star-rating-select/star-rating-select.d.ts.map +1 -1
- package/ebay-star-rating-select/star-rating-select.js +8 -8
- package/ebay-svg/svg.d.ts.map +1 -1
- package/ebay-svg/svg.js +266 -28
- package/ebay-switch/README.md +5 -1
- package/ebay-switch/ebay-switch.d.ts +7 -3
- package/ebay-switch/ebay-switch.d.ts.map +1 -1
- package/ebay-switch/ebay-switch.js +6 -3
- package/ebay-tabs/README.md +6 -10
- package/ebay-tabs/tab-panel.d.ts +0 -1
- package/ebay-tabs/tab-panel.d.ts.map +1 -1
- package/ebay-tabs/tab-panel.js +2 -2
- package/ebay-tabs/tab.d.ts +1 -7
- package/ebay-tabs/tab.d.ts.map +1 -1
- package/ebay-tabs/tab.js +2 -7
- package/ebay-tabs/tabs.d.ts +7 -1
- package/ebay-tabs/tabs.d.ts.map +1 -1
- package/ebay-tabs/tabs.js +12 -19
- package/ebay-textbox/README.md +16 -9
- package/ebay-textbox/postfix-icon.d.ts.map +1 -1
- package/ebay-textbox/postfix-icon.js +25 -3
- package/ebay-textbox/prefix-icon.d.ts.map +1 -1
- package/ebay-textbox/prefix-icon.js +24 -2
- package/ebay-textbox/textbox.d.ts +17 -7
- package/ebay-textbox/textbox.d.ts.map +1 -1
- package/ebay-textbox/textbox.js +47 -14
- package/ebay-textbox/types.d.ts +2 -2
- package/ebay-textbox/types.d.ts.map +1 -1
- package/ebay-video/README.md +7 -5
- package/ebay-video/controls.d.ts.map +1 -1
- package/ebay-video/controls.js +10 -4
- package/ebay-video/reportButton.d.ts +1 -5
- package/ebay-video/reportButton.d.ts.map +1 -1
- package/ebay-video/reportButton.js +3 -3
- package/ebay-video/video.d.ts +13 -10
- package/ebay-video/video.d.ts.map +1 -1
- package/ebay-video/video.js +4 -1
- package/package.json +1 -1
package/ebay-video/README.md
CHANGED
|
@@ -37,14 +37,16 @@ import 'shaka-player/dist/controls.css'
|
|
|
37
37
|
| a11yPlayText | String | Yes | a11y text for the play button |
|
|
38
38
|
| errorText | String | Yes | content for error when an either the library or video cannot load |
|
|
39
39
|
| reportText | String | Yes | text for report button |
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
|
|
|
40
|
+
## Callbacks
|
|
41
|
+
| Name | Required | Description | Arguments |
|
|
42
|
+
|----------------|----------|------------------------------------------------------------------|---------------------------------------------|
|
|
43
|
+
| onLoadError | No | triggered when there is a load error with video player or source | (Event) |
|
|
44
|
+
| onPlay | No | triggered when playback starts | (Event, { player }) |
|
|
45
|
+
| onVolumeChange | No | triggered when volume is changed | (Event, { volume: number, muted: boolean }) |
|
|
46
|
+
| onReport | No | triggered when report button is clicked | |
|
|
44
47
|
|
|
45
48
|
|
|
46
49
|
## EbayVideoSource Props
|
|
47
|
-
|
|
48
50
|
| Name | Type | Required | Description |
|
|
49
51
|
|------|--------|----------|-----------------------------------------------------------------------------------------------------------------|
|
|
50
52
|
| src | String | Yes | video/playlist URL
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/ebay-video/controls.tsx"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAAC,QAAQ,aAAW,GAAG;IAAE,MAAM,MAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/ebay-video/controls.tsx"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAAC,QAAQ,aAAW,GAAG;IAAE,MAAM,MAAA;CAAE,CA0B9D"}
|
package/ebay-video/controls.js
CHANGED
|
@@ -28,7 +28,10 @@ function customControls(onReport) {
|
|
|
28
28
|
__extends(class_1, _super);
|
|
29
29
|
function class_1(parent, controls, text) {
|
|
30
30
|
var _this = _super.call(this, parent, controls) || this;
|
|
31
|
-
appendChild(parent, react_1.default.createElement(reportButton_1.ReportButton,
|
|
31
|
+
appendChild(parent, react_1.default.createElement(reportButton_1.ReportButton, null, text), function (button) {
|
|
32
|
+
// have to listen to clicks this way (React onClick will not work):
|
|
33
|
+
_this.eventManager.listen(button, 'click', onReport);
|
|
34
|
+
});
|
|
32
35
|
return _this;
|
|
33
36
|
}
|
|
34
37
|
return class_1;
|
|
@@ -45,8 +48,11 @@ function customControls(onReport) {
|
|
|
45
48
|
return { Report: Report };
|
|
46
49
|
}
|
|
47
50
|
exports.customControls = customControls;
|
|
48
|
-
function appendChild(container, reactElement) {
|
|
51
|
+
function appendChild(container, reactElement, callback) {
|
|
49
52
|
var tempEl = document.createElement('div');
|
|
50
|
-
react_dom_1.default.render(reactElement, tempEl)
|
|
51
|
-
|
|
53
|
+
react_dom_1.default.render(reactElement, tempEl, function () {
|
|
54
|
+
var child = tempEl.firstChild;
|
|
55
|
+
container.appendChild(child);
|
|
56
|
+
callback(child);
|
|
57
|
+
});
|
|
52
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reportButton.d.ts","sourceRoot":"","sources":["../../src/ebay-video/reportButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reportButton.d.ts","sourceRoot":"","sources":["../../src/ebay-video/reportButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjC,eAAO,MAAM,YAAY,EAAE,EAI1B,CAAA"}
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ReportButton = void 0;
|
|
7
|
-
var ebay_icon_1 = require("../ebay-icon");
|
|
8
7
|
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var ebay_icon_1 = require("../ebay-icon");
|
|
9
9
|
exports.ReportButton = function (_a) {
|
|
10
|
-
var
|
|
11
|
-
return (react_1.default.createElement("button", { className: "video-player__report-button"
|
|
10
|
+
var children = _a.children;
|
|
11
|
+
return (react_1.default.createElement("button", { className: "video-player__report-button" },
|
|
12
12
|
react_1.default.createElement(ebay_icon_1.EbayIcon, { name: "flag24" }),
|
|
13
13
|
children));
|
|
14
14
|
};
|
package/ebay-video/video.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { ComponentProps, FC,
|
|
1
|
+
import { ComponentProps, FC, MouseEvent } from 'react';
|
|
2
2
|
import { VideoAction, VideoPlayView } from './types';
|
|
3
|
-
|
|
3
|
+
import { EbayEventHandler } from '../common/event-utils/types';
|
|
4
|
+
export declare type PlayEventProps = {
|
|
5
|
+
player: Player;
|
|
6
|
+
};
|
|
7
|
+
export declare type VolumeChangeProps = {
|
|
8
|
+
volume: number;
|
|
9
|
+
muted: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare type EbayVideoProps = Omit<ComponentProps<'video'>, 'onPlay' | 'onVolumeChange'> & {
|
|
4
12
|
width?: number;
|
|
5
13
|
height?: number;
|
|
6
14
|
thumbnail?: string;
|
|
@@ -18,14 +26,9 @@ export declare type EbayVideoProps = ComponentProps<'video'> & {
|
|
|
18
26
|
errorText: string;
|
|
19
27
|
reportText?: string;
|
|
20
28
|
onLoadError?: (err: Error) => void;
|
|
21
|
-
onPlay?:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
onVolumeChange?: (e: SyntheticEvent, { volume: number, muted: boolean }: {
|
|
25
|
-
volume: any;
|
|
26
|
-
muted: any;
|
|
27
|
-
}) => void;
|
|
28
|
-
onReport?: () => void;
|
|
29
|
+
onPlay?: EbayEventHandler<HTMLVideoElement, PlayEventProps>;
|
|
30
|
+
onVolumeChange?: EbayEventHandler<HTMLVideoElement, VolumeChangeProps>;
|
|
31
|
+
onReport?: (event?: MouseEvent<HTMLButtonElement>) => void;
|
|
29
32
|
};
|
|
30
33
|
declare const EbayVideo: FC<EbayVideoProps>;
|
|
31
34
|
export default EbayVideo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/ebay-video/video.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../src/ebay-video/video.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EA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,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAqOjC,CAAA;AAgBD,eAAe,SAAS,CAAA"}
|
package/ebay-video/video.js
CHANGED
|
@@ -182,7 +182,10 @@ var EbayVideo = function (_a) {
|
|
|
182
182
|
};
|
|
183
183
|
var handleVolumeChange = function (e) {
|
|
184
184
|
var eventTarget = e.currentTarget;
|
|
185
|
-
onVolumeChange(e, {
|
|
185
|
+
onVolumeChange(e, {
|
|
186
|
+
volume: Math.round((eventTarget.volume + Number.EPSILON) * 100) / 100,
|
|
187
|
+
muted: eventTarget.muted
|
|
188
|
+
});
|
|
186
189
|
};
|
|
187
190
|
var handleOnPause = function () {
|
|
188
191
|
// On IOS, the controls force showing up if the video exist fullscreen while playing.
|