Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTGold committed May 5, 2024
1 parent 5ff0513 commit fba0378
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 117 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@playkit-js/playkit-js-downloads",
"version": "1.2.0",
"version": "1.2.2",
"main": "dist/playkit-downloads.js",
"homepage": "https://github.com/kaltura/playkit-js-downloads#readme",
"scripts": {
Expand All @@ -27,7 +27,7 @@
},
"devDependencies": {
"@playkit-js/common": "1.5.2-canary.0-f23d183",
"@playkit-js/kaltura-player-js": "3.17.15-canary.0-b412bfc",
"@playkit-js/kaltura-player-js": "3.17.0-canary.0-634f42e",
"@playkit-js/ui-managers": "1.4.3-canary.0-b33eab0",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
Expand All @@ -50,10 +50,10 @@
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1",
"@playkit-js/playkit-js-ui": "0.79.0-canary.0-da9bbc3"
"@playkit-js/playkit-js-ui": "^0.77.8"
},
"peerDependencies": {
"@playkit-js/kaltura-player-js": "3.17.15-canary.0-b412bfc\n"
"@playkit-js/kaltura-player-js": "3.14.4"
},
"kaltura": {
"name": "downloads",
Expand Down
1 change: 0 additions & 1 deletion src/components/attachments-list/attachments-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const AttachmentsList = withText({

const _renderAttachments = (attachments: Array<KalturaAttachmentAsset>) => {
return attachments.map((attachment: KalturaAttachmentAsset) => {
// @ts-expect-error - TS2345: Argument of type 'import("ui-managers/node_modules/preact/src/index").ComponentChildren' is not assignable to parameter of type 'import("playkit-js-downloads/node_modules/preact/src/index").ComponentChildren'. Type 'bigint' is not assignable to type 'ComponentChildren'.
return _renderDownloadItem(attachment.id, _buildFileName(attachment), attachment.downloadUrl, getIconByFileExt(attachment.fileExt));
});
};
Expand Down
3 changes: 3 additions & 0 deletions src/components/download-overlay/download-overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import {createRef} from 'preact';
import {useState, useEffect} from 'preact/hooks';
import {DownloadMetadata} from '../../types';
import {ui} from '@playkit-js/kaltura-player-js';

// @ts-expect-error - TS2339: Property 'bindActions' does not exist on type
const {bindActions} = ui.utils;
// @ts-expect-error - TS2339: Property 'bindActions' does not exist on type
const overlayActions = ui.reducers.overlay.actions;

const {withEventManager} = KalturaPlayer.ui.Event;
Expand Down
6 changes: 3 additions & 3 deletions src/download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {DownloadEvent} from './event';

const {ReservedPresetNames} = ui;
const {Text} = ui.preacti18n;

// @ts-expect-error - TS2339: Property 'MiniAudioUI' does not exist on type
const PRESETS = [ReservedPresetNames.Playback, ReservedPresetNames.Img, ReservedPresetNames.MiniAudioUI];

class Download extends KalturaPlayer.core.BasePlugin {
Expand Down Expand Up @@ -88,7 +88,7 @@ class Download extends KalturaPlayer.core.BasePlugin {
if (this.iconId > 0) {
return;
}
// console.log('21212', ReservedPresetNames.MiniAudioUI)
// @ts-expect-error - TS2339: Property 'MiniAudioUI' does not exist on type
if (this.store.getState().shell['activePresetName'] !== ReservedPresetNames.MiniAudioUI) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Expand All @@ -102,10 +102,10 @@ class Download extends KalturaPlayer.core.BasePlugin {
path: DOWNLOAD
},
onClick: this._handleClick as any,
// @ts-expect-error - TS2322: Type '() => JSXInternal.Element' is not assignable to type 'ComponentClass<Record<string, never>, {}> | FunctionalComponent<Record<string, never>>'.
component: () => {
return <DownloadOverlayButton setRef={this._setPluginButtonRef} />;
},
// @ts-expect-error - TS2339: Property 'MiniAudioUI' does not exist on type
presets: PRESETS.filter(presetName => presetName !== ReservedPresetNames.MiniAudioUI)
}) as number;
}
Expand Down

0 comments on commit fba0378

Please sign in to comment.