@playkit-js/moderation 3.2.1 → 3.2.2-canary.2-aed86f3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playkit-js/moderation",
3
- "version": "3.2.1",
3
+ "version": "3.2.2-canary.2-aed86f3",
4
4
  "main": "dist/playkit-moderation.js",
5
5
  "private": false,
6
6
  "bugs": {
@@ -66,9 +66,9 @@
66
66
  "html5 player"
67
67
  ],
68
68
  "dependencies": {
69
- "@playkit-js/common": "^1.0.18",
70
- "@playkit-js/ui-managers": "^1.3.2",
69
+ "@playkit-js/common": "^1.1.1",
71
70
  "@playkit-js/playkit-js-ui": "^0.73.0",
71
+ "@playkit-js/ui-managers": "^1.3.2",
72
72
  "cypress": "^12.2.0"
73
73
  },
74
74
  "kaltura": {
@@ -1,10 +1,10 @@
1
1
  import {h, Component} from 'preact';
2
2
  import {Popover} from '../popover';
3
- import {OnClick, A11yWrapper, OverlayPortal} from '@playkit-js/common';
3
+ import {OnClick, Button, OverlayPortal} from '@playkit-js/common';
4
4
  import * as styles from './moderation.scss';
5
5
  import {DownIcon} from './down-icon';
6
6
 
7
- const {Tooltip, Overlay, PLAYER_SIZE} = KalturaPlayer.ui.components;
7
+ const {Overlay, PLAYER_SIZE} = KalturaPlayer.ui.components;
8
8
  const {withText, Text} = KalturaPlayer.ui.preacti18n;
9
9
  const {
10
10
  redux: {connect}
@@ -170,19 +170,14 @@ export class Moderation extends Component<MergedProps, ModerationState> {
170
170
  />
171
171
  <div className={styles.submitWrapper}>
172
172
  <div className={styles.characterCounter} data-testid="characterCounter">{`${reportContent.length}/${reportLength}`}</div>
173
- <Tooltip label={tooltipMessage} classNames={styles.tooltip}>
174
- <A11yWrapper onClick={this._handleSubmit}>
175
- <button
176
- role="button"
177
- aria-disabled={submitButtonDisabled}
178
- aria-label={this.props.sendReportLabel}
179
- className={[styles.submitButton, submitButtonDisabled ? styles.disabled : ''].join(' ')}
180
- tabIndex={0}
181
- data-testid="submitButton">
182
- {this.props.sendReportLabel}
183
- </button>
184
- </A11yWrapper>
185
- </Tooltip>
173
+ <Button
174
+ onClick={this._handleSubmit}
175
+ tooltip={{label: tooltipMessage, className: styles.tooltip}}
176
+ disabled={submitButtonDisabled}
177
+ ariaLabel={this.props.sendReportLabel}
178
+ testId={'submitButton'}>
179
+ {this.props.sendReportLabel}
180
+ </Button>
186
181
  </div>
187
182
  </form>
188
183
  </div>
@@ -117,12 +117,12 @@ export class Popover extends Component<PopoverProps, PopoverState> {
117
117
  {props.options.map((el, index) => {
118
118
  return (
119
119
  <A11yWrapper
120
+ role="menuitem"
120
121
  onClick={this._handleClickOnOption(el.onMenuChosen)}
121
122
  onDownKeyPressed={this._handleDownKeyPressed(index)}
122
123
  onUpKeyPressed={this._handleUpKeyPressed(index)}>
123
124
  <div
124
125
  tabIndex={0}
125
- role="menuitem"
126
126
  aria-label={el.label}
127
127
  className={styles.popoverMenuItem}
128
128
  ref={node => {