@playkit-js/moderation 2.1.1 → 2.2.0-canary.10-af41e17
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/CHANGELOG.md +14 -0
- package/LICENSE +5 -5
- package/README.md +174 -8
- package/dist/playkit-moderation.js +1 -23
- package/dist/playkit-moderation.js.map +1 -1
- package/package.json +51 -53
- package/src/components/icons/error-icon.tsx +11 -0
- package/src/components/icons/index.ts +9 -0
- package/src/components/icons/success-icon.tsx +11 -0
- package/src/components/moderation/down-icon.tsx +12 -0
- package/src/components/moderation/moderation.scss +46 -25
- package/src/components/moderation/moderation.tsx +67 -104
- package/src/components/plugin-button/plugin-button.scss +14 -14
- package/src/components/plugin-button/plugin-button.tsx +26 -3
- package/src/components/popover/index.ts +1 -0
- package/src/components/popover/popover-menu.scss +4 -0
- package/src/components/popover/popover-menu.tsx +57 -0
- package/src/components/popover/popover.scss +30 -0
- package/src/components/popover/popover.tsx +224 -0
- package/src/global.d.ts +6 -6
- package/src/index.ts +14 -1
- package/src/moderation-plugin.scss +4 -12
- package/src/moderation-plugin.tsx +132 -161
- package/src/providers/index.ts +2 -0
- package/src/providers/report-loader.ts +69 -0
- package/src/providers/response-types/index.ts +2 -0
- package/src/providers/response-types/kaltura-moderation-flag-response.ts +13 -0
- package/src/providers/response-types/kaltura-moderation-flag.ts +51 -0
- package/src/variables.scss +4 -1
- package/src/assets/.gitkeep +0 -0
- package/src/assets/close.svg +0 -10
- package/src/assets/down.svg +0 -9
- package/src/assets/error.svg +0 -3
- package/src/assets/flag.svg +0 -6
- package/src/assets/report.svg +0 -3
- package/src/components/.gitkeep +0 -0
- package/src/components/moderation/assets/down.svg +0 -9
|
@@ -1,35 +1,13 @@
|
|
|
1
1
|
import {h, ComponentChild} from 'preact';
|
|
2
|
-
import {
|
|
3
|
-
ContribPluginManager,
|
|
4
|
-
CorePlugin,
|
|
5
|
-
OnMediaLoad,
|
|
6
|
-
OnMediaUnload,
|
|
7
|
-
OnPluginSetup,
|
|
8
|
-
ContribServices,
|
|
9
|
-
ContribPluginData,
|
|
10
|
-
ContribPluginConfigs,
|
|
11
|
-
} from '@playkit-js-contrib/plugin';
|
|
12
|
-
import {
|
|
13
|
-
UpperBarItem,
|
|
14
|
-
OverlayItem,
|
|
15
|
-
OverlayPositions,
|
|
16
|
-
ToastSeverity,
|
|
17
|
-
} from '@playkit-js-contrib/ui';
|
|
18
|
-
import {getContribLogger} from '@playkit-js-contrib/common';
|
|
19
|
-
import {KalturaModerationFlagType} from 'kaltura-typescript-client/api/types/KalturaModerationFlagType';
|
|
20
|
-
import {BaseEntryFlagAction} from 'kaltura-typescript-client/api/types/BaseEntryFlagAction';
|
|
21
|
-
import {KalturaClient} from 'kaltura-typescript-client';
|
|
22
|
-
import {KalturaModerationFlag} from 'kaltura-typescript-client/api/types/KalturaModerationFlag';
|
|
23
2
|
import {Moderation, ModerateOption} from './components/moderation';
|
|
24
3
|
import {PluginButton} from './components/plugin-button';
|
|
25
4
|
import * as styles from './moderation-plugin.scss';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
5
|
+
import {ui} from 'kaltura-player-js';
|
|
6
|
+
import {ContribServices, ToastSeverity, OnClickEvent} from '@playkit-js/common';
|
|
7
|
+
import {ReportLoader, KalturaModerationFlag} from './providers';
|
|
8
|
+
import {ErrorIcon} from './components/icons/error-icon';
|
|
9
|
+
import {SuccessIcon} from './components/icons/success-icon';
|
|
10
|
+
const {ReservedPresetAreas, ReservedPresetNames} = ui;
|
|
33
11
|
|
|
34
12
|
interface ModerationPluginConfig {
|
|
35
13
|
reportLength: number;
|
|
@@ -41,139 +19,133 @@ interface ModerationPluginConfig {
|
|
|
41
19
|
tooltipMessage: string;
|
|
42
20
|
}
|
|
43
21
|
|
|
44
|
-
export class ModerationPlugin
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const {playerConfig} = this._configs;
|
|
22
|
+
export class ModerationPlugin extends KalturaPlayer.core.BasePlugin {
|
|
23
|
+
static defaultConfig: ModerationPluginConfig = {
|
|
24
|
+
reportLength: 500,
|
|
25
|
+
onReportSentMessage: 'The report sent',
|
|
26
|
+
onReportErrorMessage: 'The report failed to send',
|
|
27
|
+
subtitle: '',
|
|
28
|
+
notificatonDuration: 5000,
|
|
29
|
+
tooltipMessage: 'Send report',
|
|
30
|
+
moderateOptions: [
|
|
31
|
+
{id: 1, label: 'Sexual Content'},
|
|
32
|
+
{id: 2, label: 'Violent Or Repulsive'},
|
|
33
|
+
{id: 3, label: 'Harmful Or Dangerous Act'},
|
|
34
|
+
{id: 4, label: 'Spam / Commercials'}
|
|
35
|
+
]
|
|
36
|
+
};
|
|
60
37
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
38
|
+
private _moderationOverlay = null;
|
|
39
|
+
private _wasPlayed = false; // keep state of the player so we can resume if needed
|
|
40
|
+
private _removeActiveOverlay: null | Function = null;
|
|
41
|
+
private _removePluginIcon: null | Function = null;
|
|
42
|
+
private _contribServices: ContribServices;
|
|
65
43
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
});
|
|
44
|
+
constructor(name: string, private _player: KalturaPlayerTypes.Player, config: ModerationPluginConfig) {
|
|
45
|
+
super(name, _player, config);
|
|
46
|
+
this._contribServices = ContribServices.get({kalturaPlayer: _player});
|
|
69
47
|
}
|
|
70
48
|
|
|
71
|
-
|
|
72
|
-
logger.
|
|
73
|
-
method: '
|
|
49
|
+
loadMedia(): void {
|
|
50
|
+
this.logger.debug('Moderation plugin loaded', {
|
|
51
|
+
method: 'loadMedia'
|
|
74
52
|
});
|
|
75
53
|
this._addPluginIcon();
|
|
76
54
|
}
|
|
77
55
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
method: 'onMediaUnload',
|
|
82
|
-
});
|
|
83
|
-
this._moderationOverlay = null;
|
|
84
|
-
}
|
|
56
|
+
// TODO: remove once contribServices migrated to BasePlugin
|
|
57
|
+
getUIComponents(): any[] {
|
|
58
|
+
return this._contribServices.register();
|
|
85
59
|
}
|
|
86
60
|
|
|
87
|
-
private _sentReport = (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
severity: ToastSeverity.Success,
|
|
116
|
-
});
|
|
117
|
-
if (this._wasPlayed) {
|
|
118
|
-
this._player.play();
|
|
119
|
-
}
|
|
120
|
-
if (callback) {
|
|
121
|
-
callback();
|
|
61
|
+
private _sentReport = (contentType: number, content: string, callback?: () => void) => {
|
|
62
|
+
const {onReportSentMessage, onReportErrorMessage} = this.config;
|
|
63
|
+
const {sources} = this._player;
|
|
64
|
+
return this._player.provider
|
|
65
|
+
.doRequest([{loader: ReportLoader, params: {comments: content, flagType: contentType, flaggedEntryId: sources.id}}])
|
|
66
|
+
.then((data: Map<string, any>) => {
|
|
67
|
+
if (data && data.has(ReportLoader.id)) {
|
|
68
|
+
const reportLoader = data.get(ReportLoader.id);
|
|
69
|
+
const moderationFlag: KalturaModerationFlag = reportLoader?.response?.moderationFlag;
|
|
70
|
+
if (moderationFlag) {
|
|
71
|
+
this.logger.debug('Moderation plugin submit OK');
|
|
72
|
+
this._toggleOverlay();
|
|
73
|
+
this._displayToast({
|
|
74
|
+
text: onReportSentMessage,
|
|
75
|
+
icon: (
|
|
76
|
+
<div className={styles.toastIcon}>
|
|
77
|
+
<SuccessIcon />
|
|
78
|
+
</div>
|
|
79
|
+
),
|
|
80
|
+
severity: ToastSeverity.Success
|
|
81
|
+
});
|
|
82
|
+
if (this._wasPlayed) {
|
|
83
|
+
this._player.play();
|
|
84
|
+
}
|
|
85
|
+
if (callback) {
|
|
86
|
+
callback();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
122
89
|
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
logger.
|
|
126
|
-
method: 'handleSubmit',
|
|
127
|
-
data: error,
|
|
128
|
-
});
|
|
90
|
+
})
|
|
91
|
+
.catch((e: any) => {
|
|
92
|
+
this.logger.warn(e);
|
|
129
93
|
this._toggleOverlay();
|
|
130
94
|
this._displayToast({
|
|
131
95
|
text: onReportErrorMessage,
|
|
132
|
-
icon:
|
|
133
|
-
|
|
96
|
+
icon: (
|
|
97
|
+
<div className={styles.toastIcon}>
|
|
98
|
+
<ErrorIcon />
|
|
99
|
+
</div>
|
|
100
|
+
),
|
|
101
|
+
severity: ToastSeverity.Error
|
|
134
102
|
});
|
|
135
|
-
}
|
|
136
|
-
);
|
|
103
|
+
});
|
|
137
104
|
};
|
|
138
105
|
|
|
139
|
-
private _displayToast = (options: {
|
|
140
|
-
|
|
141
|
-
icon: ComponentChild;
|
|
142
|
-
severity: ToastSeverity;
|
|
143
|
-
}): void => {
|
|
144
|
-
const {notificatonDuration} = this._configs.pluginConfig;
|
|
145
|
-
//display toast
|
|
106
|
+
private _displayToast = (options: {text: string; icon: ComponentChild; severity: ToastSeverity}): void => {
|
|
107
|
+
const {notificatonDuration} = this.config;
|
|
146
108
|
this._contribServices.toastManager.add({
|
|
147
109
|
title: 'Report Content',
|
|
148
110
|
text: options.text,
|
|
149
111
|
icon: options.icon,
|
|
150
112
|
duration: notificatonDuration,
|
|
151
|
-
severity:
|
|
113
|
+
severity: options.severity,
|
|
152
114
|
onClick: () => {
|
|
153
|
-
logger.
|
|
154
|
-
method: '_displayToast'
|
|
115
|
+
this.logger.debug(`Moderation clicked on toast`, {
|
|
116
|
+
method: '_displayToast'
|
|
155
117
|
});
|
|
156
|
-
}
|
|
118
|
+
}
|
|
157
119
|
});
|
|
158
120
|
};
|
|
159
121
|
|
|
160
|
-
private _toggleOverlay = (event?:
|
|
122
|
+
private _toggleOverlay = (event?: OnClickEvent, byKeyboard?: boolean) => {
|
|
123
|
+
if (this._removeActiveOverlay !== null) {
|
|
124
|
+
this._removeOverlay();
|
|
125
|
+
|
|
126
|
+
if (this._wasPlayed) {
|
|
127
|
+
this._player.play();
|
|
128
|
+
this._wasPlayed = false;
|
|
129
|
+
}
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
161
133
|
let closeButtonSelected = false;
|
|
162
|
-
if (
|
|
163
|
-
// triggered by keyboard
|
|
134
|
+
if (byKeyboard) {
|
|
164
135
|
closeButtonSelected = true;
|
|
165
136
|
}
|
|
166
|
-
const {reportLength, moderateOptions, subtitle, tooltipMessage} = this.
|
|
137
|
+
const {reportLength, moderateOptions, subtitle, tooltipMessage} = this.config;
|
|
167
138
|
const isPlaying = !(this._player as any).paused;
|
|
168
|
-
|
|
169
|
-
|
|
139
|
+
|
|
140
|
+
this.logger.debug(`Moderation toggle overlay player`, {
|
|
141
|
+
method: '_toggleOverlay'
|
|
170
142
|
});
|
|
143
|
+
|
|
171
144
|
if (this._moderationOverlay) {
|
|
172
|
-
this._contribServices.overlayManager.remove(this._moderationOverlay);
|
|
173
145
|
this._moderationOverlay = null;
|
|
174
146
|
if (this._wasPlayed) {
|
|
175
|
-
logger.
|
|
176
|
-
method: '_toggleOverlay'
|
|
147
|
+
this.logger.debug(`Moderation plugin paused player`, {
|
|
148
|
+
method: '_toggleOverlay'
|
|
177
149
|
});
|
|
178
150
|
this._wasPlayed = false;
|
|
179
151
|
this._player.play();
|
|
@@ -185,10 +157,11 @@ export class ModerationPlugin
|
|
|
185
157
|
this._player.pause();
|
|
186
158
|
}
|
|
187
159
|
|
|
188
|
-
this.
|
|
160
|
+
this._removeActiveOverlay = this._player.ui.addComponent({
|
|
189
161
|
label: 'moderation-overlay',
|
|
190
|
-
|
|
191
|
-
|
|
162
|
+
area: ReservedPresetAreas.PlayerArea,
|
|
163
|
+
presets: [ReservedPresetNames.Playback, ReservedPresetNames.Live],
|
|
164
|
+
get: () => (
|
|
192
165
|
<Moderation
|
|
193
166
|
onClick={this._toggleOverlay}
|
|
194
167
|
onSubmit={this._sentReport}
|
|
@@ -198,44 +171,42 @@ export class ModerationPlugin
|
|
|
198
171
|
moderateOptions={moderateOptions}
|
|
199
172
|
closeButtonSelected={closeButtonSelected}
|
|
200
173
|
/>
|
|
201
|
-
)
|
|
174
|
+
)
|
|
202
175
|
});
|
|
203
176
|
};
|
|
204
177
|
|
|
205
178
|
private _addPluginIcon(): void {
|
|
206
|
-
const {} = this.
|
|
207
|
-
this.
|
|
179
|
+
const {tooltipMessage} = this.config;
|
|
180
|
+
if (this._removePluginIcon) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
this._removePluginIcon = this._player.ui.addComponent({
|
|
208
184
|
label: 'Moderation',
|
|
209
|
-
|
|
210
|
-
|
|
185
|
+
area: ReservedPresetAreas.TopBarRightControls,
|
|
186
|
+
presets: [ReservedPresetNames.Playback, ReservedPresetNames.Live],
|
|
187
|
+
get: () => <PluginButton onClick={this._toggleOverlay} label={tooltipMessage} />
|
|
211
188
|
});
|
|
212
189
|
}
|
|
213
|
-
}
|
|
214
190
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
defaultConfig: {
|
|
227
|
-
reportLength: 500,
|
|
228
|
-
onReportSentMessage: 'Send report',
|
|
229
|
-
onReportErrorMessage: 'The report failed to send',
|
|
230
|
-
subtitle: '',
|
|
231
|
-
notificatonDuration: 5000,
|
|
232
|
-
tooltipMessage: 'Send report',
|
|
233
|
-
moderateOptions: [
|
|
234
|
-
{id: 1, label: 'Sexual Content'},
|
|
235
|
-
{id: 2, label: 'Violent Or Repulsive'},
|
|
236
|
-
{id: 3, label: 'Harmful Or Dangerous Act'},
|
|
237
|
-
{id: 4, label: 'Spam / Commercials'},
|
|
238
|
-
],
|
|
239
|
-
},
|
|
191
|
+
private _removeOverlay = () => {
|
|
192
|
+
if (this._removeActiveOverlay) {
|
|
193
|
+
this._removeActiveOverlay();
|
|
194
|
+
this._removeActiveOverlay = null;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
static isValid(): boolean {
|
|
199
|
+
return true;
|
|
240
200
|
}
|
|
241
|
-
|
|
201
|
+
|
|
202
|
+
reset(): void {
|
|
203
|
+
this._contribServices.reset();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
destroy(): void {
|
|
207
|
+
this._removeOverlay();
|
|
208
|
+
if (this._removePluginIcon) {
|
|
209
|
+
this._removePluginIcon();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import ILoader = KalturaPlayerTypes.ILoader;
|
|
2
|
+
import {KalturaModerationFlag, KalturaModerationFlagType, ObjectType, KalturaModerationFlagResponse} from './response-types';
|
|
3
|
+
const {RequestBuilder} = KalturaPlayer.providers;
|
|
4
|
+
|
|
5
|
+
interface ReportLoaderParams {
|
|
6
|
+
comments: string;
|
|
7
|
+
flagType: KalturaModerationFlagType;
|
|
8
|
+
flaggedEntryId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface ReportResponse {
|
|
12
|
+
moderationFlag?: KalturaModerationFlag;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class ReportLoader implements ILoader {
|
|
16
|
+
_comments: string;
|
|
17
|
+
_flagType: KalturaModerationFlagType;
|
|
18
|
+
_flaggedEntryId: string;
|
|
19
|
+
_requests: typeof RequestBuilder[] = [];
|
|
20
|
+
_response: ReportResponse = {};
|
|
21
|
+
|
|
22
|
+
static get id(): string {
|
|
23
|
+
return 'report';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
constructor({comments, flagType, flaggedEntryId}: ReportLoaderParams) {
|
|
27
|
+
this._comments = comments;
|
|
28
|
+
this._flagType = flagType;
|
|
29
|
+
this._flaggedEntryId = flaggedEntryId;
|
|
30
|
+
|
|
31
|
+
const headers: Map<string, string> = new Map();
|
|
32
|
+
|
|
33
|
+
const moderationFlagRequest = new RequestBuilder(headers);
|
|
34
|
+
moderationFlagRequest.service = 'baseentry';
|
|
35
|
+
moderationFlagRequest.action = 'flag';
|
|
36
|
+
moderationFlagRequest.params = {
|
|
37
|
+
moderationFlag: {
|
|
38
|
+
comments: this._comments,
|
|
39
|
+
flagType: this._flagType,
|
|
40
|
+
flaggedEntryId: this._flaggedEntryId,
|
|
41
|
+
objectType: ObjectType.KalturaModerationFlag
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
this.requests.push(moderationFlagRequest);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
set requests(requests: any[]) {
|
|
48
|
+
this._requests = requests;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
get requests(): any[] {
|
|
52
|
+
return this._requests;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
set response(response: any) {
|
|
56
|
+
const moderationFlagRequestResponse = new KalturaModerationFlagResponse(response[0]?.data);
|
|
57
|
+
if (moderationFlagRequestResponse) {
|
|
58
|
+
this._response.moderationFlag = moderationFlagRequestResponse?.data;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
get response(): any {
|
|
63
|
+
return this._response;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
isValid(): boolean {
|
|
67
|
+
return Boolean(this._flagType && this._flaggedEntryId);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {KalturaModerationFlag} from './kaltura-moderation-flag';
|
|
2
|
+
const {BaseServiceResult} = KalturaPlayer.providers.ResponseTypes;
|
|
3
|
+
|
|
4
|
+
export class KalturaModerationFlagResponse extends BaseServiceResult {
|
|
5
|
+
data?: KalturaModerationFlag;
|
|
6
|
+
|
|
7
|
+
constructor(responseObj: any) {
|
|
8
|
+
super(responseObj);
|
|
9
|
+
if (!this.hasError && responseObj.id) {
|
|
10
|
+
this.data = new KalturaModerationFlag(responseObj);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export enum ObjectType {
|
|
2
|
+
KalturaModerationFlag = 'KalturaModerationFlag'
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export enum KalturaModerationFlagType {
|
|
6
|
+
SEXUAL_CONTENT = 1,
|
|
7
|
+
VIOLENT_REPULSIVE = 2,
|
|
8
|
+
HARMFUL_DANGEROUS = 3,
|
|
9
|
+
SPAM_COMMERCIALS = 4,
|
|
10
|
+
COPYRIGHT = 5,
|
|
11
|
+
TERMS_OF_USE_VIOLATION = 6
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
enum KalturaModerationObjectType {
|
|
15
|
+
ENTRY = 2,
|
|
16
|
+
USER = 3
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
enum KalturaModerationFlagStatus {
|
|
20
|
+
PENDING = 1,
|
|
21
|
+
MODERATED = 2
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface KalturaModerationFlagArgs {
|
|
25
|
+
comments: string;
|
|
26
|
+
objectType: ObjectType;
|
|
27
|
+
createdAt: number;
|
|
28
|
+
updatedAt: number;
|
|
29
|
+
flagType: KalturaModerationFlagType;
|
|
30
|
+
flaggedEntryId: string;
|
|
31
|
+
id: number;
|
|
32
|
+
moderationObjectType: KalturaModerationObjectType;
|
|
33
|
+
partnerId: number;
|
|
34
|
+
status: KalturaModerationFlagStatus;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class KalturaModerationFlag {
|
|
38
|
+
comments: string;
|
|
39
|
+
objectType: ObjectType;
|
|
40
|
+
id: number;
|
|
41
|
+
status: KalturaModerationFlagStatus;
|
|
42
|
+
flagType: KalturaModerationFlagType;
|
|
43
|
+
|
|
44
|
+
constructor(moderationFlag: KalturaModerationFlagArgs) {
|
|
45
|
+
this.comments = moderationFlag.comments;
|
|
46
|
+
this.objectType = moderationFlag.objectType;
|
|
47
|
+
this.id = moderationFlag.id;
|
|
48
|
+
this.status = moderationFlag.status;
|
|
49
|
+
this.flagType = moderationFlag.flagType;
|
|
50
|
+
}
|
|
51
|
+
}
|
package/src/variables.scss
CHANGED
package/src/assets/.gitkeep
DELETED
|
File without changes
|
package/src/assets/close.svg
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->
|
|
4
|
-
<title>Icons/32/Close</title>
|
|
5
|
-
<desc>Created with Sketch.</desc>
|
|
6
|
-
<g id="Icons/32/Close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
7
|
-
<rect id="Bounds" x="0" y="0" width="32" height="32"></rect>
|
|
8
|
-
<path d="M17.9113162,16 L24.6072325,9.30408374 C25.1313645,8.77995172 25.1287183,7.92687249 24.6009229,7.3990771 C24.0694478,6.86760201 23.220227,6.86845682 22.6959163,7.39276754 L16,14.0886838 L9.30408374,7.39276754 C8.77995172,6.86863552 7.92687249,6.8712817 7.3990771,7.3990771 C6.86760201,7.93055219 6.86845682,8.77977302 7.39276754,9.30408374 L14.0886838,16 L7.39276754,22.6959163 C6.86863552,23.2200483 6.8712817,24.0731275 7.3990771,24.6009229 C7.93055219,25.132398 8.77977302,25.1315432 9.30408374,24.6072325 L16,17.9113162 L22.6959163,24.6072325 C23.2200483,25.1313645 24.0731275,25.1287183 24.6009229,24.6009229 C25.132398,24.0694478 25.1315432,23.220227 24.6072325,22.6959163 L17.9113162,16 Z" id="Close" fill="rgba(255,255,255,0.8)"></path>
|
|
9
|
-
</g>
|
|
10
|
-
</svg>
|
package/src/assets/down.svg
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->
|
|
4
|
-
<title>Icons/16/Arrow/down</title>
|
|
5
|
-
<desc>Created with Sketch.</desc>
|
|
6
|
-
<g id="Icons/16/Arrow/down" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
7
|
-
<path d="M4.78325732,5.37830235 C4.43990319,4.94572127 3.81088342,4.87338855 3.37830235,5.21674268 C2.94572127,5.56009681 2.87338855,6.18911658 3.21674268,6.62169765 L7.21674268,11.6611718 C7.61710439,12.165575 8.38289561,12.165575 8.78325732,11.6611718 L12.7832573,6.62169765 C13.1266115,6.18911658 13.0542787,5.56009681 12.6216977,5.21674268 C12.1891166,4.87338855 11.5600968,4.94572127 11.2167427,5.37830235 L8,9.43097528 L4.78325732,5.37830235 Z" id="Path-2" fill="#ffffff"></path>
|
|
8
|
-
</g>
|
|
9
|
-
</svg>
|
package/src/assets/error.svg
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
2
|
-
<path fill="#CCC" fill-rule="evenodd" d="M8 2c3.314 0 6 2.686 6 6s-2.686 6-6 6-6-2.686-6-6 2.686-6 6-6zm0 8c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1zm0-6c-.552 0-1 .444-1 1v3c0 .513.383.936.883.993L8 9c.552 0 1-.444 1-1V5c0-.513-.383-.936-.883-.993L8 4z"/>
|
|
3
|
-
</svg>
|
package/src/assets/flag.svg
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
2
|
-
<g fill="none" fill-rule="evenodd">
|
|
3
|
-
<path d="M0 0H32V32H0z"/>
|
|
4
|
-
<path fill="#FFF" d="M8.378 7.084l5.175 19.314c.134.497-.126 1.005-.594 1.19l-.112.037c-.533.143-1.08-.165-1.225-.71L6.447 7.603c-.134-.497.126-1.005.594-1.19l.112-.037c.533-.143 1.08.165 1.225.71zM21.882 7c1.878 0 2.79 1.622 1.84 3.239l-1.386 2.36 2.94 3.246C26.6 17.31 25.842 19 23.868 19h-10.21c-.452 0-.848-.304-.966-.741l-2.68-10c-.17-.635.31-1.259.967-1.259h10.902zm.211 1.994l-.21.006h-9.6l2.144 8h9.196l-3.263-3.604c-.293-.324-.342-.8-.12-1.178l1.757-2.992c.114-.194.168-.23.096-.232z" opacity=".8"/>
|
|
5
|
-
</g>
|
|
6
|
-
</svg>
|
package/src/assets/report.svg
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
2
|
-
<path fill="#CCC" fill-rule="evenodd" d="M3.292 1.488L6.69 14.172c.086.32-.076.646-.371.774l-.093.032c-.35.094-.712-.122-.805-.466L2.023 1.828c-.086-.32.076-.646.371-.774l.093-.032c.35-.094.712.122.805.466zm8.868-.055c1.233 0 1.832 1.065 1.208 2.127l-.91 1.55 1.93 2.132c.87.961.373 2.071-.923 2.071H6.76c-.297 0-.558-.2-.635-.486l-1.76-6.568c-.111-.417.203-.826.635-.826h7.16z"/>
|
|
3
|
-
</svg>
|
package/src/components/.gitkeep
DELETED
|
File without changes
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->
|
|
4
|
-
<title>Icons/16/Arrow/down</title>
|
|
5
|
-
<desc>Created with Sketch.</desc>
|
|
6
|
-
<g id="Icons/16/Arrow/down" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
7
|
-
<path d="M4.78325732,5.37830235 C4.43990319,4.94572127 3.81088342,4.87338855 3.37830235,5.21674268 C2.94572127,5.56009681 2.87338855,6.18911658 3.21674268,6.62169765 L7.21674268,11.6611718 C7.61710439,12.165575 8.38289561,12.165575 8.78325732,11.6611718 L12.7832573,6.62169765 C13.1266115,6.18911658 13.0542787,5.56009681 12.6216977,5.21674268 C12.1891166,4.87338855 11.5600968,4.94572127 11.2167427,5.37830235 L8,9.43097528 L4.78325732,5.37830235 Z" id="Path-2" fill="#FFFFFF"></path>
|
|
8
|
-
</g>
|
|
9
|
-
</svg>
|