@yoobic/yobi 7.7.86 → 7.7.87
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/dist/cjs/index.cjs.js +2 -1
- package/dist/cjs/{video-player-helpers-07afe78c.js → video-player-helpers-658b4a9a.js} +17 -5
- package/dist/cjs/yoo-form-videoplayer.cjs.entry.js +1 -1
- package/dist/cjs/yoo-section-list.cjs.entry.js +2 -2
- package/dist/cjs/yoo-videoplayer-dailymotion.cjs.entry.js +1 -1
- package/dist/cjs/yoo-videoplayer-videojs.cjs.entry.js +1 -1
- package/dist/cjs/yoo-videoplayer-vimeo.cjs.entry.js +1 -1
- package/dist/cjs/yoo-videoplayer-youtube.cjs.entry.js +1 -1
- package/dist/collection/components/app-boost/section-list/section-list.js +2 -2
- package/dist/collection/utils/helpers/video-player-helpers.js +16 -5
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/index.esm.js +1 -1
- package/dist/design-system/{p-d51ee577.entry.js → p-260a81e6.entry.js} +1 -1
- package/dist/design-system/p-497f00b1.entry.js +1 -0
- package/dist/design-system/{p-ae197453.entry.js → p-6504133f.entry.js} +1 -1
- package/dist/design-system/{p-71cca219.entry.js → p-671b34db.entry.js} +1 -1
- package/dist/design-system/p-b289eb9a.js +1 -0
- package/dist/design-system/{p-50fdc9f2.entry.js → p-d2d9ca4d.entry.js} +1 -1
- package/dist/design-system/{p-eef60f76.entry.js → p-fb884de6.entry.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{video-player-helpers-cd3527ae.js → video-player-helpers-866ceaa0.js} +17 -6
- package/dist/esm/yoo-form-videoplayer.entry.js +1 -1
- package/dist/esm/yoo-section-list.entry.js +2 -2
- package/dist/esm/yoo-videoplayer-dailymotion.entry.js +1 -1
- package/dist/esm/yoo-videoplayer-videojs.entry.js +1 -1
- package/dist/esm/yoo-videoplayer-vimeo.entry.js +1 -1
- package/dist/esm/yoo-videoplayer-youtube.entry.js +1 -1
- package/dist/types/utils/helpers/video-player-helpers.d.ts +1 -0
- package/package.json +1 -1
- package/dist/design-system/p-46c2f5f9.js +0 -1
- package/dist/design-system/p-577f31e4.entry.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -28,7 +28,7 @@ const mapHelpers = require('./map-helpers-021bd715.js');
|
|
|
28
28
|
const observerHelpers = require('./observer-helpers-b02f15af.js');
|
|
29
29
|
const openingHoursHelpers = require('./opening-hours-helpers-bc0712b1.js');
|
|
30
30
|
const operationHelpers = require('./operation-helpers-131a9c24.js');
|
|
31
|
-
const videoPlayerHelpers = require('./video-player-helpers-
|
|
31
|
+
const videoPlayerHelpers = require('./video-player-helpers-658b4a9a.js');
|
|
32
32
|
const frameworkDelegate = require('./framework-delegate-cd1dd95f.js');
|
|
33
33
|
const overlays = require('./overlays-27cf91fb.js');
|
|
34
34
|
const theme = require('./theme-e757b365.js');
|
|
@@ -307,6 +307,7 @@ exports.getWaitlistVisitTags = operationHelpers.getWaitlistVisitTags;
|
|
|
307
307
|
exports.getWorkflowStepBadge = operationHelpers.getWorkflowStepBadge;
|
|
308
308
|
exports.LANGUAGES_DATA = videoPlayerHelpers.LANGUAGES_DATA;
|
|
309
309
|
exports.fixVideoSource = videoPlayerHelpers.fixVideoSource;
|
|
310
|
+
exports.fixVimeoSource = videoPlayerHelpers.fixVimeoSource;
|
|
310
311
|
exports.getDailymotionPlayerAPI = videoPlayerHelpers.getDailymotionPlayerAPI;
|
|
311
312
|
exports.getSourceType = videoPlayerHelpers.getSourceType;
|
|
312
313
|
exports.getVideoId = videoPlayerHelpers.getVideoId;
|
|
@@ -51,7 +51,7 @@ function isNumeric(item) {
|
|
|
51
51
|
function fixVideoSource(field) {
|
|
52
52
|
const source = field.url || field.value || field.videoData || '';
|
|
53
53
|
const arr = !field.videoData && source.split('/');
|
|
54
|
-
|
|
54
|
+
const videoId = arr && arr[arr.length - 1];
|
|
55
55
|
let newSource = source;
|
|
56
56
|
if (field.videoData) {
|
|
57
57
|
newSource = rrule.isFile(field.videoData) ? URL.createObjectURL(field.videoData) : field.videoData;
|
|
@@ -63,13 +63,24 @@ function fixVideoSource(field) {
|
|
|
63
63
|
newSource = 'https://www.dailymotion.com/embed/video/' + videoId;
|
|
64
64
|
}
|
|
65
65
|
if (videoPlayerHelpers.isVimeoSource(newSource)) {
|
|
66
|
-
|
|
67
|
-
videoId = arr[arr.length - 2];
|
|
68
|
-
}
|
|
69
|
-
newSource = 'https://player.vimeo.com/video/' + videoId;
|
|
66
|
+
return fixVimeoSource(newSource);
|
|
70
67
|
}
|
|
71
68
|
return newSource;
|
|
72
69
|
}
|
|
70
|
+
function fixVimeoSource(source) {
|
|
71
|
+
const arr = source === null || source === void 0 ? void 0 : source.split('/');
|
|
72
|
+
const lastItem = arr === null || arr === void 0 ? void 0 : arr[arr.length - 1];
|
|
73
|
+
const secondLastItem = arr === null || arr === void 0 ? void 0 : arr[arr.length - 2];
|
|
74
|
+
const URL_PREFIX = 'https://player.vimeo.com/video/';
|
|
75
|
+
const MIN_VIDEO_ID_LENGTH = 3;
|
|
76
|
+
if (isNumeric(lastItem)) {
|
|
77
|
+
return `${URL_PREFIX}${lastItem}`;
|
|
78
|
+
}
|
|
79
|
+
else if (!(source === null || source === void 0 ? void 0 : source.includes('player.vimeo.com')) && isNumeric(secondLastItem) && (secondLastItem === null || secondLastItem === void 0 ? void 0 : secondLastItem.length) > MIN_VIDEO_ID_LENGTH) {
|
|
80
|
+
return `${URL_PREFIX}${secondLastItem}?h=${lastItem}`;
|
|
81
|
+
}
|
|
82
|
+
return source;
|
|
83
|
+
}
|
|
73
84
|
function openVideoPlayerInModal(type, coreParams, modalParams) {
|
|
74
85
|
const videoModal = document.createElement('yoo-videoplayer-core');
|
|
75
86
|
const videoPlayerCoreParameters = Object.assign({ fullscreen: false, controls: true }, coreParams);
|
|
@@ -205,6 +216,7 @@ function getVideoSubtitlesFromFiles(files) {
|
|
|
205
216
|
|
|
206
217
|
exports.LANGUAGES_DATA = LANGUAGES_DATA;
|
|
207
218
|
exports.fixVideoSource = fixVideoSource;
|
|
219
|
+
exports.fixVimeoSource = fixVimeoSource;
|
|
208
220
|
exports.getDailymotionPlayerAPI = getDailymotionPlayerAPI;
|
|
209
221
|
exports.getSourceType = getSourceType;
|
|
210
222
|
exports.getVideoId = getVideoId;
|
|
@@ -6,7 +6,7 @@ const index = require('./index-fd52e687.js');
|
|
|
6
6
|
const rrule = require('./rrule-f8e7fec2.js');
|
|
7
7
|
require('./input-bar.interface-b96b7107.js');
|
|
8
8
|
require('./ResizeObserver.es-2edf4ecd.js');
|
|
9
|
-
const videoPlayerHelpers = require('./video-player-helpers-
|
|
9
|
+
const videoPlayerHelpers = require('./video-player-helpers-658b4a9a.js');
|
|
10
10
|
require('./isUndefined-8f9cfd10.js');
|
|
11
11
|
require('./isNumber-4c1ace60.js');
|
|
12
12
|
require('./video-player-helpers-a6d263f8.js');
|
|
@@ -452,7 +452,7 @@ const YooSectionListComponent = class {
|
|
|
452
452
|
}
|
|
453
453
|
renderSectionItem(item) {
|
|
454
454
|
let checkboxRef;
|
|
455
|
-
return (index.h("div", { class: "item selectable", onMouseEnter: this.getItemMouseEnterAction(), onMouseLeave: this.getItemMouseLeaveAction() }, index.h("div", { class: "checkbox", ref: (el) => checkboxRef = el }, !this.disableBatchActions && this.isOwner && item.isSelectable !== false && index.h("yoo-form-checkbox", { onInputChanged: (ev) => this.onCheckboxClicked(ev, item, checkboxRef) })), index.h("div", { class: "item-container", onClick: () => this.itemClicked.emit(item) }, index.h("div", { class: "title-container" }, item.user && index.h("yoo-avatars", { layout: "list", users: [item.user], size: "small" }), item.title && index.h("div", { class: "title" }, index.h("yoo-truncate", { innerHTML: rrule.translateMulti(item.title) })), item.text && index.h("div", { class: "description" }, index.h("yoo-truncate", null, rrule.translateMulti(item.text)))), index.h("div", { class: "info-container" }, item.columns && item.columns.map((column) => this.renderSectionItemColumn(column))), !this.disableSortable && !this.isReadonly && index.h("div", { class: "draggable" }, index.h("yoo-icon", { name: "draggable", color: "text-color", size: "medium" })), (this.isPublisher || this.isViewer) && this.countSuffix === 'lessons' ? this.renderViewerPublisherActions() : this.renderItemActions(item))));
|
|
455
|
+
return (index.h("div", { class: "item selectable", onMouseEnter: this.getItemMouseEnterAction(), onMouseLeave: this.getItemMouseLeaveAction() }, index.h("div", { class: "checkbox", ref: (el) => checkboxRef = el }, !this.disableBatchActions && this.isOwner && item.isSelectable !== false && index.h("yoo-form-checkbox", { onInputChanged: (ev) => this.onCheckboxClicked(ev, item, checkboxRef) })), index.h("div", { class: "item-container", onClick: () => this.itemClicked.emit(item) }, index.h("div", { class: "title-container" }, item.user && index.h("yoo-avatars", { layout: "list", users: [item.user], size: "small" }), item.title && index.h("div", { class: "title" }, index.h("yoo-truncate", { innerHTML: rrule.translateMulti(item.title) })), item.text && index.h("div", { class: "description" }, index.h("yoo-truncate", null, rrule.translateMulti(item.text)))), index.h("div", { class: "info-container" }, item.columns && item.columns.map((column) => this.renderSectionItemColumn(column))), !this.disableSortable && !this.isReadonly && index.h("div", { class: "draggable" }, index.h("yoo-icon", { name: "draggable", color: "text-color", size: "medium" })), !this.isOwner && (this.isPublisher || this.isViewer) && this.countSuffix === 'lessons' ? this.renderViewerPublisherActions() : this.renderItemActions(item))));
|
|
456
456
|
}
|
|
457
457
|
renderSectionItemColumn(column) {
|
|
458
458
|
return (index.h("div", { class: "column" }, column.icon && index.h("yoo-icon", { name: column.icon, size: "small" }), index.h("div", { class: "value" }, rrule.translate(column.value))));
|
|
@@ -464,7 +464,7 @@ const YooSectionListComponent = class {
|
|
|
464
464
|
if (!this.itemActions || !this.itemActions.length) {
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
|
-
const actions = this.itemActions.map((action) => (Object.assign(Object.assign({}, action), { handler: () => action.handler(i), isVisible: () => (action === null || action === void 0 ? void 0 : action.visible) ? action.visible() : true })));
|
|
467
|
+
const actions = this.itemActions.map((action) => (Object.assign(Object.assign({}, action), { handler: () => action.handler(i), isVisible: () => (action === null || action === void 0 ? void 0 : action.visible) ? action.visible(i) : true })));
|
|
468
468
|
return (index.h("div", { class: "item-actions" }, index.h("yoo-context-menu", { contentButtons: actions, placement: "below" }, index.h("yoo-button", { disabled: this.isViewer && this.countSuffix === 'users' ? true : false, size: "medium" }, index.h("yoo-icon", { size: "small", name: "more", color: "stable" })))));
|
|
469
469
|
}
|
|
470
470
|
render() {
|
|
@@ -6,7 +6,7 @@ const index = require('./index-fd52e687.js');
|
|
|
6
6
|
const rrule = require('./rrule-f8e7fec2.js');
|
|
7
7
|
require('./input-bar.interface-b96b7107.js');
|
|
8
8
|
require('./ResizeObserver.es-2edf4ecd.js');
|
|
9
|
-
const videoPlayerHelpers = require('./video-player-helpers-
|
|
9
|
+
const videoPlayerHelpers = require('./video-player-helpers-658b4a9a.js');
|
|
10
10
|
const index$1 = require('./index-e4be1010.js');
|
|
11
11
|
const remove = require('./remove-41707d5a.js');
|
|
12
12
|
require('./isUndefined-8f9cfd10.js');
|
|
@@ -12,7 +12,7 @@ const videoPlayerHelpers$1 = require('./video-player-helpers-a6d263f8.js');
|
|
|
12
12
|
require('./ResizeObserver.es-2edf4ecd.js');
|
|
13
13
|
const commonHelpers = require('./common-helpers-797be2a6.js');
|
|
14
14
|
const observerHelpers = require('./observer-helpers-b02f15af.js');
|
|
15
|
-
const videoPlayerHelpers = require('./video-player-helpers-
|
|
15
|
+
const videoPlayerHelpers = require('./video-player-helpers-658b4a9a.js');
|
|
16
16
|
const index$1 = require('./index-e4be1010.js');
|
|
17
17
|
const document$1 = require('./document-b4cc3315.js');
|
|
18
18
|
require('./validate-f2c2f205.js');
|
|
@@ -6,7 +6,7 @@ const index = require('./index-fd52e687.js');
|
|
|
6
6
|
require('./rrule-f8e7fec2.js');
|
|
7
7
|
require('./input-bar.interface-b96b7107.js');
|
|
8
8
|
require('./ResizeObserver.es-2edf4ecd.js');
|
|
9
|
-
const videoPlayerHelpers = require('./video-player-helpers-
|
|
9
|
+
const videoPlayerHelpers = require('./video-player-helpers-658b4a9a.js');
|
|
10
10
|
const index$1 = require('./index-e4be1010.js');
|
|
11
11
|
require('./isUndefined-8f9cfd10.js');
|
|
12
12
|
require('./isNumber-4c1ace60.js');
|
|
@@ -6,7 +6,7 @@ const index = require('./index-fd52e687.js');
|
|
|
6
6
|
const rrule = require('./rrule-f8e7fec2.js');
|
|
7
7
|
require('./input-bar.interface-b96b7107.js');
|
|
8
8
|
require('./ResizeObserver.es-2edf4ecd.js');
|
|
9
|
-
const videoPlayerHelpers = require('./video-player-helpers-
|
|
9
|
+
const videoPlayerHelpers = require('./video-player-helpers-658b4a9a.js');
|
|
10
10
|
const index$1 = require('./index-e4be1010.js');
|
|
11
11
|
require('./isUndefined-8f9cfd10.js');
|
|
12
12
|
require('./isNumber-4c1ace60.js');
|
|
@@ -440,7 +440,7 @@ export class YooSectionListComponent {
|
|
|
440
440
|
h("div", { class: "info-container" }, item.columns && item.columns.map((column) => this.renderSectionItemColumn(column))),
|
|
441
441
|
!this.disableSortable && !this.isReadonly && h("div", { class: "draggable" },
|
|
442
442
|
h("yoo-icon", { name: "draggable", color: "text-color", size: "medium" })),
|
|
443
|
-
(this.isPublisher || this.isViewer) && this.countSuffix === 'lessons' ? this.renderViewerPublisherActions() : this.renderItemActions(item))));
|
|
443
|
+
!this.isOwner && (this.isPublisher || this.isViewer) && this.countSuffix === 'lessons' ? this.renderViewerPublisherActions() : this.renderItemActions(item))));
|
|
444
444
|
}
|
|
445
445
|
renderSectionItemColumn(column) {
|
|
446
446
|
return (h("div", { class: "column" },
|
|
@@ -456,7 +456,7 @@ export class YooSectionListComponent {
|
|
|
456
456
|
if (!this.itemActions || !this.itemActions.length) {
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
|
-
const actions = this.itemActions.map((action) => (Object.assign(Object.assign({}, action), { handler: () => action.handler(i), isVisible: () => (action === null || action === void 0 ? void 0 : action.visible) ? action.visible() : true })));
|
|
459
|
+
const actions = this.itemActions.map((action) => (Object.assign(Object.assign({}, action), { handler: () => action.handler(i), isVisible: () => (action === null || action === void 0 ? void 0 : action.visible) ? action.visible(i) : true })));
|
|
460
460
|
return (h("div", { class: "item-actions" },
|
|
461
461
|
h("yoo-context-menu", { contentButtons: actions, placement: "below" },
|
|
462
462
|
h("yoo-button", { disabled: this.isViewer && this.countSuffix === 'users' ? true : false, size: "medium" },
|
|
@@ -47,7 +47,7 @@ function isNumeric(item) {
|
|
|
47
47
|
export function fixVideoSource(field) {
|
|
48
48
|
const source = field.url || field.value || field.videoData || '';
|
|
49
49
|
const arr = !field.videoData && source.split('/');
|
|
50
|
-
|
|
50
|
+
const videoId = arr && arr[arr.length - 1];
|
|
51
51
|
let newSource = source;
|
|
52
52
|
if (field.videoData) {
|
|
53
53
|
newSource = isFile(field.videoData) ? URL.createObjectURL(field.videoData) : field.videoData;
|
|
@@ -59,13 +59,24 @@ export function fixVideoSource(field) {
|
|
|
59
59
|
newSource = 'https://www.dailymotion.com/embed/video/' + videoId;
|
|
60
60
|
}
|
|
61
61
|
if (isVimeoSource(newSource)) {
|
|
62
|
-
|
|
63
|
-
videoId = arr[arr.length - 2];
|
|
64
|
-
}
|
|
65
|
-
newSource = 'https://player.vimeo.com/video/' + videoId;
|
|
62
|
+
return fixVimeoSource(newSource);
|
|
66
63
|
}
|
|
67
64
|
return newSource;
|
|
68
65
|
}
|
|
66
|
+
export function fixVimeoSource(source) {
|
|
67
|
+
const arr = source === null || source === void 0 ? void 0 : source.split('/');
|
|
68
|
+
const lastItem = arr === null || arr === void 0 ? void 0 : arr[arr.length - 1];
|
|
69
|
+
const secondLastItem = arr === null || arr === void 0 ? void 0 : arr[arr.length - 2];
|
|
70
|
+
const URL_PREFIX = 'https://player.vimeo.com/video/';
|
|
71
|
+
const MIN_VIDEO_ID_LENGTH = 3;
|
|
72
|
+
if (isNumeric(lastItem)) {
|
|
73
|
+
return `${URL_PREFIX}${lastItem}`;
|
|
74
|
+
}
|
|
75
|
+
else if (!(source === null || source === void 0 ? void 0 : source.includes('player.vimeo.com')) && isNumeric(secondLastItem) && (secondLastItem === null || secondLastItem === void 0 ? void 0 : secondLastItem.length) > MIN_VIDEO_ID_LENGTH) {
|
|
76
|
+
return `${URL_PREFIX}${secondLastItem}?h=${lastItem}`;
|
|
77
|
+
}
|
|
78
|
+
return source;
|
|
79
|
+
}
|
|
69
80
|
export function openVideoPlayerInModal(type, coreParams, modalParams) {
|
|
70
81
|
const videoModal = document.createElement('yoo-videoplayer-core');
|
|
71
82
|
const videoPlayerCoreParameters = Object.assign({ fullscreen: false, controls: true }, coreParams);
|