@orangelogic/design-system 4.35.0 → 4.37.0
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/library/components/types.js +19 -9
- package/library/package.json +1 -1
- package/library/packages/hybrid/video-advanced/src/react/plugins/CommentLine/CommentLine.d.ts +2 -2
- package/library/packages/hybrid/video-advanced/src/react/type.d.ts +11 -12
- package/library/packages/hybrid/video-advanced/src/video-advanced/video-advanced.d.ts +3 -3
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +6 -1
- package/library/packages/types/src/video-advanced.d.ts +1 -0
- package/package.json +1 -1
|
@@ -95083,26 +95083,34 @@ var j5 = class extends d {
|
|
|
95083
95083
|
let n = `${e}_${this.mappedDefaultLanguage}`;
|
|
95084
95084
|
return t.getRecords().some((e) => String(e.id).toLowerCase() === n);
|
|
95085
95085
|
}
|
|
95086
|
+
canBackfillDefaultLanguageTextRecord(e) {
|
|
95087
|
+
let t = this.dsm?.get(go.TranslatableTexts);
|
|
95088
|
+
if (!t) return !0;
|
|
95089
|
+
let n = `${e}_${this.mappedDefaultLanguage}`, r = t.getRecords().find((e) => String(e.id).toLowerCase() === n);
|
|
95090
|
+
return !r || r.get("isAutoBackfilled") === !0;
|
|
95091
|
+
}
|
|
95086
95092
|
hasDefaultLanguageAttributeRecord(e) {
|
|
95087
95093
|
let t = this.dsm?.get(go.TranslatableAttributes);
|
|
95088
95094
|
if (!t) return !1;
|
|
95089
95095
|
let n = `${e}_${this.mappedDefaultLanguage}`;
|
|
95090
95096
|
return t.getRecords().some((e) => String(e.id).toLowerCase() === n);
|
|
95091
95097
|
}
|
|
95092
|
-
storeTranslatableText(e, t) {
|
|
95098
|
+
storeTranslatableText(e, t, n = {}) {
|
|
95093
95099
|
if (!this.dsm) return;
|
|
95094
|
-
let
|
|
95095
|
-
if (
|
|
95096
|
-
let
|
|
95097
|
-
|
|
95100
|
+
let r = this.dsm.get(go.TranslatableTexts);
|
|
95101
|
+
if (r) {
|
|
95102
|
+
let i = r.getRecords().find((t) => t.id === e);
|
|
95103
|
+
i ? (i.set("content", t), n.isAutoBackfilled === !0 ? i.set("isAutoBackfilled", !0) : n.isAutoBackfilled === !1 && i.unset("isAutoBackfilled")) : r.addRecord({
|
|
95098
95104
|
content: t,
|
|
95099
|
-
id: e
|
|
95105
|
+
id: e,
|
|
95106
|
+
...n.isAutoBackfilled === !0 ? { isAutoBackfilled: !0 } : {}
|
|
95100
95107
|
});
|
|
95101
95108
|
} else this.dsm.add({
|
|
95102
95109
|
id: go.TranslatableTexts,
|
|
95103
95110
|
records: [{
|
|
95104
95111
|
content: t,
|
|
95105
|
-
id: e
|
|
95112
|
+
id: e,
|
|
95113
|
+
...n.isAutoBackfilled === !0 ? { isAutoBackfilled: !0 } : {}
|
|
95106
95114
|
}]
|
|
95107
95115
|
});
|
|
95108
95116
|
}
|
|
@@ -95945,9 +95953,11 @@ var j5 = class extends d {
|
|
|
95945
95953
|
}), this.contentBuilder?.on("custom:child-selected", (e) => {
|
|
95946
95954
|
this.childSelected = e;
|
|
95947
95955
|
}), this.contentBuilder?.on("custom:backfill-translatable-text", ({ content: e, id: t }) => {
|
|
95948
|
-
t && this.mappedDefaultLanguage && this.lang.toLowerCase() !== this.mappedDefaultLanguage && !this.hasDefaultLanguageTextRecord(t) && this.storeTranslatableText(`${t}_${this.mappedDefaultLanguage}`, e);
|
|
95956
|
+
t && this.mappedDefaultLanguage && this.lang.toLowerCase() !== this.mappedDefaultLanguage && !this.hasDefaultLanguageTextRecord(t) && this.storeTranslatableText(`${t}_${this.mappedDefaultLanguage}`, e, { isAutoBackfilled: !0 });
|
|
95949
95957
|
}), this.contentBuilder?.on("custom:save-translatable-text", ({ content: e, id: t }) => {
|
|
95950
|
-
|
|
95958
|
+
if (!t) return;
|
|
95959
|
+
let n = this.lang.toLowerCase();
|
|
95960
|
+
this.storeTranslatableText(`${t}_${n}`, e, n === this.mappedDefaultLanguage ? { isAutoBackfilled: !1 } : void 0), n !== this.mappedDefaultLanguage && this.canBackfillDefaultLanguageTextRecord(t) && this.storeTranslatableText(`${t}_${this.mappedDefaultLanguage}`, e, { isAutoBackfilled: !0 });
|
|
95951
95961
|
}), this.contentBuilder?.on("custom:save-translatable-attribute", ({ content: e, id: t }) => {
|
|
95952
95962
|
t && this.storeTranslatableAttribute(t, e);
|
|
95953
95963
|
});
|
package/library/package.json
CHANGED
package/library/packages/hybrid/video-advanced/src/react/plugins/CommentLine/CommentLine.d.ts
CHANGED
|
@@ -3,13 +3,13 @@ interface ICommentLineProps {
|
|
|
3
3
|
comments: IComment[];
|
|
4
4
|
onCommentClick: (args: {
|
|
5
5
|
id: string;
|
|
6
|
-
}) => void;
|
|
6
|
+
}, marker: HTMLElement) => void;
|
|
7
7
|
onCommentMouseLeave: (args: {
|
|
8
8
|
id: string;
|
|
9
9
|
}) => void;
|
|
10
10
|
onCommentMouseOver: (args: {
|
|
11
11
|
id: string;
|
|
12
|
-
}) => void;
|
|
12
|
+
}, marker: HTMLElement) => void;
|
|
13
13
|
seekToTime: (time: number) => void;
|
|
14
14
|
}
|
|
15
15
|
declare const _default: import('react').NamedExoticComponent<ICommentLineProps>;
|
|
@@ -21,6 +21,13 @@ export interface IComment {
|
|
|
21
21
|
export type TimelineMarker = IComment & {
|
|
22
22
|
occurrenceId: string;
|
|
23
23
|
};
|
|
24
|
+
export type CommentMarkerEventArgs = {
|
|
25
|
+
id: string;
|
|
26
|
+
markerCenterX?: number;
|
|
27
|
+
markerTop?: number;
|
|
28
|
+
timelineLeft?: number;
|
|
29
|
+
timelineRight?: number;
|
|
30
|
+
};
|
|
24
31
|
export type EnterPointRangeModePayload = {
|
|
25
32
|
endTime?: number;
|
|
26
33
|
startTime?: number;
|
|
@@ -233,12 +240,8 @@ export type Context = {
|
|
|
233
240
|
onFired: (handler: (args: any) => void) => () => void;
|
|
234
241
|
};
|
|
235
242
|
commentClickEvent: {
|
|
236
|
-
fire: (args:
|
|
237
|
-
|
|
238
|
-
}) => void;
|
|
239
|
-
onFired: (handler: (args: {
|
|
240
|
-
id: string;
|
|
241
|
-
}) => void) => () => void;
|
|
243
|
+
fire: (args: CommentMarkerEventArgs) => void;
|
|
244
|
+
onFired: (handler: (args: CommentMarkerEventArgs) => void) => () => void;
|
|
242
245
|
};
|
|
243
246
|
commentMouseLeaveEvent: {
|
|
244
247
|
fire: (args: {
|
|
@@ -249,12 +252,8 @@ export type Context = {
|
|
|
249
252
|
}) => void) => () => void;
|
|
250
253
|
};
|
|
251
254
|
commentMouseOverEvent: {
|
|
252
|
-
fire: (args:
|
|
253
|
-
|
|
254
|
-
}) => void;
|
|
255
|
-
onFired: (handler: (args: {
|
|
256
|
-
id: string;
|
|
257
|
-
}) => void) => () => void;
|
|
255
|
+
fire: (args: CommentMarkerEventArgs) => void;
|
|
256
|
+
onFired: (handler: (args: CommentMarkerEventArgs) => void) => () => void;
|
|
258
257
|
};
|
|
259
258
|
editorAddTracksEvent: {
|
|
260
259
|
execute: () => void;
|
|
@@ -46,12 +46,12 @@ import { default as CxVideoEditor } from '../video-editor/video-editor';
|
|
|
46
46
|
* @event cx-video-prev-frame - Fired when stepping to the previous frame.
|
|
47
47
|
* @event cx-video-enter-fullscreen - Fired when entering fullscreen.
|
|
48
48
|
* @event cx-video-exit-fullscreen - Fired when exiting fullscreen.
|
|
49
|
-
* @event {{ id: string }} cx-video-comment-click - Fired when a comment is clicked.
|
|
50
|
-
* @event {{ id: string }} cx-video-comment-mouseover - Fired when hovering a comment marker.
|
|
49
|
+
* @event {{ id: string; markerCenterX?: number; markerTop?: number; timelineLeft?: number; timelineRight?: number }} cx-video-comment-click - Fired when a comment is clicked.
|
|
50
|
+
* @event {{ id: string; markerCenterX?: number; markerTop?: number; timelineLeft?: number; timelineRight?: number }} cx-video-comment-mouseover - Fired when hovering a comment marker.
|
|
51
51
|
* @event {{ id: string }} cx-video-comment-mouseleave - Fired when leaving a comment marker.
|
|
52
52
|
* @event {{ name: string; data: unknown }} cx-video-event - Generic player event bridge.
|
|
53
53
|
* @event {{ layer: HTMLElement | null }} cx-video-annotation-layer-change - Fired when the player (re)mounts its annotation layer div; hosts mount annotators into this element.
|
|
54
|
-
* @event {{ key: 'activeTimelineSegmentId' | 'editMode' | 'enableAnnotation' | 'enableComment' | 'isCommentAnchorActive' | 'showCommentSidebar' | 'showSegmentSidebar' | 'startPosition' | 'stopPosition'; value: boolean | number | string | null }} cx-video-context-change - Fired when the player UI changes one of these context values (toggles, or the segment selection); hosts sync their context cells from it.
|
|
54
|
+
* @event {{ key: 'activeTimelineSegmentId' | 'editMode' | 'enableAnnotation' | 'enableComment' | 'isCommentAnchorActive' | 'loop' | 'showCommentSidebar' | 'showSegmentSidebar' | 'startPosition' | 'stopPosition'; value: boolean | number | string | null }} cx-video-context-change - Fired when the player UI changes one of these context values (toggles, or the segment selection); hosts sync their context cells from it.
|
|
55
55
|
* @event cx-video-closed - Fired when the player is torn down.
|
|
56
56
|
* @event cx-video-editor-undo - Fired when the editor undo action is requested.
|
|
57
57
|
* @event cx-video-editor-redo - Fired when the editor redo action is requested.
|
|
@@ -10,6 +10,9 @@ import { TemplateResult } from 'lit';
|
|
|
10
10
|
import { CxBlockPicker } from './components/block-picker';
|
|
11
11
|
import { CxConfigManager } from './components/config-manager';
|
|
12
12
|
import { CxRTEBubbleMenu, CxRTETableGenerator } from './plugins';
|
|
13
|
+
type TranslatableTextRecordOptions = {
|
|
14
|
+
isAutoBackfilled?: boolean;
|
|
15
|
+
};
|
|
13
16
|
/**
|
|
14
17
|
* @summary The `cx-content-builder` component is used to create and manage content blocks in a CMS.
|
|
15
18
|
*
|
|
@@ -359,8 +362,9 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
359
362
|
private ensureConfigUi;
|
|
360
363
|
storeTemplate(id: string, data: Record<string, any>, update?: boolean): void;
|
|
361
364
|
private hasDefaultLanguageTextRecord;
|
|
365
|
+
private canBackfillDefaultLanguageTextRecord;
|
|
362
366
|
private hasDefaultLanguageAttributeRecord;
|
|
363
|
-
storeTranslatableText(id: string, data: string): void;
|
|
367
|
+
storeTranslatableText(id: string, data: string, options?: TranslatableTextRecordOptions): void;
|
|
364
368
|
storeTranslatableAttribute(id: string, data: Record<string, Record<string, string>>): void;
|
|
365
369
|
private updateFrameSize;
|
|
366
370
|
handleSupportedLanguagesChange(): void;
|
|
@@ -740,3 +744,4 @@ declare global {
|
|
|
740
744
|
'cx-content-builder': CxContentBuilder;
|
|
741
745
|
}
|
|
742
746
|
}
|
|
747
|
+
export {};
|
|
@@ -10,6 +10,7 @@ export declare enum VideoContextOutputKey {
|
|
|
10
10
|
EnableAnnotation = "enableAnnotation",
|
|
11
11
|
EnableComment = "enableComment",
|
|
12
12
|
IsCommentAnchorActive = "isCommentAnchorActive",
|
|
13
|
+
Loop = "loop",
|
|
13
14
|
ShowCommentSidebar = "showCommentSidebar",
|
|
14
15
|
ShowSegmentSidebar = "showSegmentSidebar",
|
|
15
16
|
StartPosition = "startPosition",
|