@axinom/mosaic-managed-workflow-integration 0.1.4-rc.8 → 0.2.0-rc.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/dist/channel/index.d.ts +2 -0
- package/dist/channel/index.d.ts.map +1 -0
- package/dist/channel/index.js +18 -0
- package/dist/channel/index.js.map +1 -0
- package/dist/channel/types/fast-provider.d.ts +22 -0
- package/dist/channel/types/fast-provider.d.ts.map +1 -0
- package/dist/channel/types/fast-provider.js +3 -0
- package/dist/channel/types/fast-provider.js.map +1 -0
- package/dist/channel/types/index.d.ts +2 -0
- package/dist/channel/types/index.d.ts.map +1 -0
- package/dist/channel/types/index.js +18 -0
- package/dist/channel/types/index.js.map +1 -0
- package/dist/common/default-extension-value.js +9 -2
- package/dist/common/default-extension-value.js.map +1 -1
- package/dist/common/index.d.ts +1 -2
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +18 -3
- package/dist/common/index.js.map +1 -1
- package/dist/common/types/index.d.ts +2 -0
- package/dist/common/types/index.d.ts.map +1 -0
- package/dist/common/types/index.js +18 -0
- package/dist/common/types/index.js.map +1 -0
- package/dist/common/{models.d.ts → types/models.d.ts} +1 -0
- package/dist/common/types/models.d.ts.map +1 -0
- package/dist/common/types/models.js +3 -0
- package/dist/common/{models.js.map → types/models.js.map} +1 -1
- package/dist/image/image-extensions.js +14 -7
- package/dist/image/image-extensions.js.map +1 -1
- package/dist/image/index.js +19 -3
- package/dist/image/index.js.map +1 -1
- package/dist/image/thumbnail-renderer.d.ts +11 -2
- package/dist/image/thumbnail-renderer.d.ts.map +1 -1
- package/dist/image/thumbnail-renderer.js +26 -7
- package/dist/image/thumbnail-renderer.js.map +1 -1
- package/dist/image/types/image-cover-extension.js +2 -1
- package/dist/image/types/image-explorer-extension.js +2 -1
- package/dist/image/types/image-extensions.js +2 -1
- package/dist/image/types/image-preview-extension.js +2 -1
- package/dist/image/types/image-select-field-extension.js +2 -1
- package/dist/image/types/index.d.ts +1 -0
- package/dist/image/types/index.d.ts.map +1 -1
- package/dist/image/types/index.js +22 -5
- package/dist/image/types/index.js.map +1 -1
- package/dist/image/types/thumbnail-renderer.d.ts +40 -0
- package/dist/image/types/thumbnail-renderer.d.ts.map +1 -0
- package/dist/image/types/thumbnail-renderer.js +3 -0
- package/dist/image/types/thumbnail-renderer.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/dist/localization/helpers/index.js +17 -1
- package/dist/localization/helpers/index.js.map +1 -1
- package/dist/localization/helpers/localization-generator.js +9 -3
- package/dist/localization/helpers/localization-generator.js.map +1 -1
- package/dist/localization/index.js +18 -2
- package/dist/localization/index.js.map +1 -1
- package/dist/localization/types/index.js +17 -1
- package/dist/localization/types/index.js.map +1 -1
- package/dist/localization/types/localization-generator.js +2 -1
- package/dist/piral-extensions.d.ts +20 -0
- package/dist/piral-extensions.d.ts.map +1 -0
- package/dist/piral-extensions.js +3 -0
- package/dist/piral-extensions.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/video/index.d.ts +4 -0
- package/dist/video/index.d.ts.map +1 -0
- package/dist/video/index.js +20 -0
- package/dist/video/index.js.map +1 -0
- package/dist/video/types/index.d.ts +4 -0
- package/dist/video/types/index.d.ts.map +1 -0
- package/dist/video/types/index.js +20 -0
- package/dist/video/types/index.js.map +1 -0
- package/dist/video/types/video-extensions.d.ts +8 -0
- package/dist/video/types/video-extensions.d.ts.map +1 -0
- package/dist/video/types/video-extensions.js +3 -0
- package/dist/video/types/video-extensions.js.map +1 -0
- package/dist/video/types/video-select-explorer.d.ts +80 -0
- package/dist/video/types/video-select-explorer.d.ts.map +1 -0
- package/dist/video/types/video-select-explorer.js +41 -0
- package/dist/video/types/video-select-explorer.js.map +1 -0
- package/dist/video/types/video-select-field.d.ts +17 -0
- package/dist/video/types/video-select-field.d.ts.map +1 -0
- package/dist/video/types/video-select-field.js +3 -0
- package/dist/video/types/video-select-field.js.map +1 -0
- package/dist/video/video-cue-points.d.ts +25 -0
- package/dist/video/video-cue-points.d.ts.map +1 -0
- package/dist/video/video-cue-points.js +12 -0
- package/dist/video/video-cue-points.js.map +1 -0
- package/dist/video/video-extensions.d.ts +4 -0
- package/dist/video/video-extensions.d.ts.map +1 -0
- package/dist/video/video-extensions.js +18 -0
- package/dist/video/video-extensions.js.map +1 -0
- package/package.json +4 -4
- package/src/channel/index.ts +1 -0
- package/src/channel/types/fast-provider.ts +23 -0
- package/src/channel/types/index.ts +1 -0
- package/src/common/index.ts +1 -2
- package/src/common/types/index.ts +1 -0
- package/src/common/{models.ts → types/models.ts} +2 -0
- package/src/image/thumbnail-renderer.tsx +25 -7
- package/src/image/types/index.ts +1 -0
- package/src/image/types/thumbnail-renderer.ts +41 -0
- package/src/index.ts +3 -0
- package/src/piral-extensions.ts +27 -0
- package/src/video/index.ts +3 -0
- package/src/video/types/index.ts +3 -0
- package/src/video/types/video-extensions.ts +7 -0
- package/src/video/types/video-select-explorer.ts +83 -0
- package/src/video/types/video-select-field.ts +19 -0
- package/src/video/video-cue-points.ts +32 -0
- package/src/video/video-extensions.tsx +31 -0
- package/dist/common/models.d.ts.map +0 -1
- package/dist/common/models.js +0 -2
- package/dist/common/piral-extensions.d.ts +0 -10
- package/dist/common/piral-extensions.d.ts.map +0 -1
- package/dist/common/piral-extensions.js +0 -2
- package/dist/common/piral-extensions.js.map +0 -1
- package/src/common/piral-extensions.ts +0 -15
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PreviewStatus = exports.OutputFormat = exports.EncodingState = void 0;
|
|
4
|
+
var EncodingState;
|
|
5
|
+
(function (EncodingState) {
|
|
6
|
+
/** Waiting */
|
|
7
|
+
EncodingState["Waiting"] = "WAITING";
|
|
8
|
+
/** In progress */
|
|
9
|
+
EncodingState["InProgress"] = "IN_PROGRESS";
|
|
10
|
+
/** Ready */
|
|
11
|
+
EncodingState["Ready"] = "READY";
|
|
12
|
+
/** Error */
|
|
13
|
+
EncodingState["Error"] = "ERROR";
|
|
14
|
+
/** Not started */
|
|
15
|
+
EncodingState["NotStarted"] = "NOT_STARTED";
|
|
16
|
+
/** Initializing */
|
|
17
|
+
EncodingState["Initializing"] = "INITIALIZING";
|
|
18
|
+
})(EncodingState = exports.EncodingState || (exports.EncodingState = {}));
|
|
19
|
+
var OutputFormat;
|
|
20
|
+
(function (OutputFormat) {
|
|
21
|
+
/** HLS */
|
|
22
|
+
OutputFormat["Hls"] = "HLS";
|
|
23
|
+
/** DASH */
|
|
24
|
+
OutputFormat["Dash"] = "DASH";
|
|
25
|
+
/** DASH & HLS */
|
|
26
|
+
OutputFormat["DashHls"] = "DASH_HLS";
|
|
27
|
+
/** CMAF */
|
|
28
|
+
OutputFormat["Cmaf"] = "CMAF";
|
|
29
|
+
/** DASH On Demand */
|
|
30
|
+
OutputFormat["DashOnDemand"] = "DASH_ON_DEMAND";
|
|
31
|
+
})(OutputFormat = exports.OutputFormat || (exports.OutputFormat = {}));
|
|
32
|
+
var PreviewStatus;
|
|
33
|
+
(function (PreviewStatus) {
|
|
34
|
+
/** Not previewed */
|
|
35
|
+
PreviewStatus["NotPreviewed"] = "NOT_PREVIEWED";
|
|
36
|
+
/** Not approved */
|
|
37
|
+
PreviewStatus["NotApproved"] = "NOT_APPROVED";
|
|
38
|
+
/** Approved */
|
|
39
|
+
PreviewStatus["Approved"] = "APPROVED";
|
|
40
|
+
})(PreviewStatus = exports.PreviewStatus || (exports.PreviewStatus = {}));
|
|
41
|
+
//# sourceMappingURL=video-select-explorer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-select-explorer.js","sourceRoot":"","sources":["../../../src/video/types/video-select-explorer.ts"],"names":[],"mappings":";;;AA2CA,IAAY,aAaX;AAbD,WAAY,aAAa;IACvB,cAAc;IACd,oCAAmB,CAAA;IACnB,kBAAkB;IAClB,2CAA0B,CAAA;IAC1B,YAAY;IACZ,gCAAe,CAAA;IACf,YAAY;IACZ,gCAAe,CAAA;IACf,kBAAkB;IAClB,2CAA0B,CAAA;IAC1B,mBAAmB;IACnB,8CAA6B,CAAA;AAC/B,CAAC,EAbW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAaxB;AAED,IAAY,YAWX;AAXD,WAAY,YAAY;IACtB,UAAU;IACV,2BAAW,CAAA;IACX,WAAW;IACX,6BAAa,CAAA;IACb,iBAAiB;IACjB,oCAAoB,CAAA;IACpB,WAAW;IACX,6BAAa,CAAA;IACb,qBAAqB;IACrB,+CAA+B,CAAA;AACjC,CAAC,EAXW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAWvB;AAED,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,oBAAoB;IACpB,+CAA8B,CAAA;IAC9B,mBAAmB;IACnB,6CAA4B,CAAA;IAC5B,eAAe;IACf,sCAAqB,CAAA;AACvB,CAAC,EAPW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAOxB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseFormControl, BaseInputEvents } from '@axinom/mosaic-ui';
|
|
2
|
+
import { ID } from '../../common';
|
|
3
|
+
export interface VideoSelectFieldProps extends BaseFormControl, BaseInputEvents {
|
|
4
|
+
/** Current value the form control has */
|
|
5
|
+
value?: ID[];
|
|
6
|
+
/** Maximum number of items which can be assigned */
|
|
7
|
+
maxItems?: number;
|
|
8
|
+
/** Label to be displayed */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Default tag to filter results by */
|
|
11
|
+
defaultFilterTag?: string;
|
|
12
|
+
/** Raised when the value has changed */
|
|
13
|
+
onChange: (event: unknown) => void;
|
|
14
|
+
/** Controls the sticky option of the video list */
|
|
15
|
+
isSticky?: boolean;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=video-select-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-select-field.d.ts","sourceRoot":"","sources":["../../../src/video/types/video-select-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,WAAW,qBACf,SAAQ,eAAe,EACrB,eAAe;IACjB,yCAAyC;IACzC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;IACb,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wCAAwC;IACxC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-select-field.js","sourceRoot":"","sources":["../../../src/video/types/video-select-field.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PiletApi } from '@axinom/mosaic-portal';
|
|
2
|
+
import { ID, Maybe } from '../common';
|
|
3
|
+
import { EncodingState } from './types';
|
|
4
|
+
interface VideoServiceCuePoints {
|
|
5
|
+
__typename?: 'CuePoint';
|
|
6
|
+
id: ID;
|
|
7
|
+
timeInSeconds: number;
|
|
8
|
+
}
|
|
9
|
+
interface VideoData {
|
|
10
|
+
__typename?: 'Video';
|
|
11
|
+
lengthInSeconds?: Maybe<number>;
|
|
12
|
+
encodingState: EncodingState;
|
|
13
|
+
cuePoints: {
|
|
14
|
+
__typename?: 'CuePointsConnection';
|
|
15
|
+
nodes: VideoServiceCuePoints[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare let getVideoCuePointsData: () => (id: ID, cuePointTypeKeys?: string[]) => Promise<VideoData>;
|
|
19
|
+
/**
|
|
20
|
+
* Initializes the video-cue-points-data function.
|
|
21
|
+
* @param app The PiletApi object.
|
|
22
|
+
*/
|
|
23
|
+
export declare function setGetVideoCuePointsData(app: PiletApi): void;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=video-cue-points.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-cue-points.d.ts","sourceRoot":"","sources":["../../src/video/video-cue-points.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,qBAAqB;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,EAAE,EAAE,EAAE,CAAC;IACP,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,SAAS;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,EAAE;QACT,UAAU,CAAC,EAAE,qBAAqB,CAAC;QACnC,KAAK,EAAE,qBAAqB,EAAE,CAAC;KAChC,CAAC;CACH;AAED,eAAO,IAAI,qBAAqB,EAAE,MAAM,CACtC,EAAE,EAAE,EAAE,EACN,gBAAgB,CAAC,EAAE,MAAM,EAAE,KACxB,OAAO,CAAC,SAAS,CAAC,CAAC;AAExB;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAE5D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setGetVideoCuePointsData = exports.getVideoCuePointsData = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Initializes the video-cue-points-data function.
|
|
6
|
+
* @param app The PiletApi object.
|
|
7
|
+
*/
|
|
8
|
+
function setGetVideoCuePointsData(app) {
|
|
9
|
+
exports.getVideoCuePointsData = () => app.getData('video-cue-points-data');
|
|
10
|
+
}
|
|
11
|
+
exports.setGetVideoCuePointsData = setGetVideoCuePointsData;
|
|
12
|
+
//# sourceMappingURL=video-cue-points.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-cue-points.js","sourceRoot":"","sources":["../../src/video/video-cue-points.ts"],"names":[],"mappings":";;;AAyBA;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,GAAa;IACpD,6BAAqB,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;AACrE,CAAC;AAFD,4DAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-extensions.d.ts","sourceRoot":"","sources":["../../src/video/video-extensions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,OAAO,EACL,eAAe,EAGhB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,mBAAmB,QAAS,QAAQ,KAAG,eAqBnD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.bindVideoExtensions = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
const bindVideoExtensions = (app) => {
|
|
10
|
+
const VideoSelectExplorer = (props) => (react_1.default.createElement(app.Extension, { name: "video-select-explorer", empty: common_1.extensionDefaultValue, params: props }));
|
|
11
|
+
const VideoSelectField = (props) => (react_1.default.createElement(app.Extension, { name: "video-select-field", empty: common_1.extensionDefaultValue, params: props }));
|
|
12
|
+
return {
|
|
13
|
+
VideoSelectExplorer,
|
|
14
|
+
VideoSelectField,
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
exports.bindVideoExtensions = bindVideoExtensions;
|
|
18
|
+
//# sourceMappingURL=video-extensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-extensions.js","sourceRoot":"","sources":["../../src/video/video-extensions.tsx"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,sCAAkD;AAO3C,MAAM,mBAAmB,GAAG,CAAC,GAAa,EAAmB,EAAE;IACpE,MAAM,mBAAmB,GAAuC,CAAC,KAAK,EAAE,EAAE,CAAC,CACzE,8BAAC,GAAG,CAAC,SAAS,IACZ,IAAI,EAAC,uBAAuB,EAC5B,KAAK,EAAE,8BAAqB,EAC5B,MAAM,EAAE,KAAK,GACb,CACH,CAAC;IAEF,MAAM,gBAAgB,GAAoC,CAAC,KAAK,EAAE,EAAE,CAAC,CACnE,8BAAC,GAAG,CAAC,SAAS,IACZ,IAAI,EAAC,oBAAoB,EACzB,KAAK,EAAE,8BAAqB,EAC5B,MAAM,EAAE,KAAK,GACb,CACH,CAAC;IAEF,OAAO;QACL,mBAAmB;QACnB,gBAAgB;KACjB,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,mBAAmB,uBAqB9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-managed-workflow-integration",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-rc.0",
|
|
4
4
|
"description": "Shared types and helpers for integrating functionality provided by managed service workflows",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"lint": "eslint . --ext .ts,.tsx,.js --color --cache"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@axinom/mosaic-portal": "^0.18.0-rc.
|
|
27
|
-
"@axinom/mosaic-ui": "^0.34.0-rc.
|
|
26
|
+
"@axinom/mosaic-portal": "^0.18.0-rc.18",
|
|
27
|
+
"@axinom/mosaic-ui": "^0.34.0-rc.18",
|
|
28
28
|
"@types/react": "^17",
|
|
29
29
|
"@types/react-dom": "^17",
|
|
30
30
|
"eslint": "^8.35.0",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "f1bb8f0764177210d9b811135b90569f86f6ee32"
|
|
46
46
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ID, Maybe } from '../../common';
|
|
2
|
+
|
|
3
|
+
export interface FastProviderData {
|
|
4
|
+
type: string;
|
|
5
|
+
label: string;
|
|
6
|
+
selectionComponent: React.FC<{
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onSelected: (items: ProgramEntity[]) => void;
|
|
9
|
+
}>;
|
|
10
|
+
detailsResolver?: (params: {
|
|
11
|
+
entityId: string;
|
|
12
|
+
entityType: string;
|
|
13
|
+
}) => string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type FastProviderType = 'fast-provider';
|
|
17
|
+
|
|
18
|
+
export interface ProgramEntity {
|
|
19
|
+
title: string;
|
|
20
|
+
videoId: ID;
|
|
21
|
+
entityId: string;
|
|
22
|
+
imageId?: Maybe<ID>;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fast-provider';
|
package/src/common/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './models';
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { PiletApi } from '@axinom/mosaic-portal';
|
|
2
2
|
import { ColumnMap, ColumnRenderer, Data } from '@axinom/mosaic-ui';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import {
|
|
5
|
+
ThumbnailProperty,
|
|
6
|
+
ThumbnailResolver,
|
|
7
|
+
ThumbnailResolverType,
|
|
8
|
+
} from './types';
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
10
|
+
/**
|
|
11
|
+
* A fallback for the `getThumbnailAndStateRenderer` function.
|
|
12
|
+
*/
|
|
13
|
+
const thumbnailFallback = <T extends Data>(
|
|
14
|
+
_thumbnailPropertyOrResolver: ThumbnailProperty<T> | ThumbnailResolver<T>,
|
|
7
15
|
_map?: ColumnMap,
|
|
8
|
-
|
|
16
|
+
_resolverType?: ThumbnailResolverType,
|
|
17
|
+
): ColumnRenderer<T> => {
|
|
9
18
|
const ThumbnailFallbackRenderer = (
|
|
10
19
|
_state: unknown,
|
|
11
20
|
_data: unknown,
|
|
@@ -15,13 +24,22 @@ const thumbnailFallback = (
|
|
|
15
24
|
return ThumbnailFallbackRenderer;
|
|
16
25
|
};
|
|
17
26
|
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
/**
|
|
28
|
+
* A function that returns thumbnail and state renderer function.
|
|
29
|
+
* @returns A thumbnail and state column renderer
|
|
30
|
+
*/
|
|
31
|
+
export let getThumbnailAndStateRenderer = <T extends Data>(): ((
|
|
32
|
+
_thumbnailPropertyOrResolver: ThumbnailProperty<T> | ThumbnailResolver<T>,
|
|
20
33
|
_map?: ColumnMap,
|
|
21
|
-
|
|
34
|
+
_resolverType?: ThumbnailResolverType,
|
|
35
|
+
) => ColumnRenderer<T>) => thumbnailFallback;
|
|
22
36
|
|
|
23
37
|
/**
|
|
24
|
-
*
|
|
38
|
+
* Sets the `getThumbnailAndStateRenderer` utility function from the PiletApi object.
|
|
39
|
+
*
|
|
40
|
+
* The `getThumbnailAndStateRenderer` function simplifies access to shared functionality provided by the image workflow in the PiletApi object.
|
|
41
|
+
* It is used to retrieve the thumbnail renderer function, which is supplied by the image pilet.
|
|
42
|
+
*
|
|
25
43
|
* @param app The PiletApi object.
|
|
26
44
|
*/
|
|
27
45
|
export function setGetThumbnailAndStateRenderer(app: PiletApi): void {
|
package/src/image/types/index.ts
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A property name of the data object that will be used to access the UUID of a thumbnail image.
|
|
3
|
+
*
|
|
4
|
+
* The property value can be an image UUID directly or an object with the following structure:
|
|
5
|
+
* {
|
|
6
|
+
* nodes?: { imageId?: Scalars['UUID'] }[];
|
|
7
|
+
* }
|
|
8
|
+
* @example
|
|
9
|
+
* // thumbnail property name 'images' for a value containing an object
|
|
10
|
+
* {
|
|
11
|
+
* images: {
|
|
12
|
+
* nodes: [
|
|
13
|
+
* {
|
|
14
|
+
* imageId: '12345678-1234-1234-1234-123456789012'
|
|
15
|
+
* }
|
|
16
|
+
* ]
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
* @example
|
|
20
|
+
* // thumbnail property name 'imageId' for a value containing a string
|
|
21
|
+
* {
|
|
22
|
+
* imageId: '12345678-1234-1234-1234-123456789012'
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* @template T - The type of the data object containing the thumbnail property.
|
|
26
|
+
*/
|
|
27
|
+
export type ThumbnailProperty<T> = keyof T;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A function that resolves the thumbnail url or imageId from the data
|
|
31
|
+
* @param data The data object
|
|
32
|
+
* @returns The thumbnail url or image UUID
|
|
33
|
+
*/
|
|
34
|
+
export type ThumbnailResolver<T> = (data: T) => string | undefined;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Specifies the type of `ThumbnailResolver` (defaults to 'url')
|
|
38
|
+
* `uuid` will resolve the imageId of the thumbnail that will be used to construct the thumbnail url
|
|
39
|
+
* `url` will resolve the thumbnail url directly from the data
|
|
40
|
+
*/
|
|
41
|
+
export type ThumbnailResolverType = 'uuid' | 'url';
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PiletApi } from '@axinom/mosaic-portal';
|
|
2
|
+
import { FastProviderData, FastProviderType } from './channel';
|
|
3
|
+
import {
|
|
4
|
+
ImageCoverProps,
|
|
5
|
+
ImagePreviewProps,
|
|
6
|
+
ImageSelectExplorerProps,
|
|
7
|
+
ImageSelectFieldProps,
|
|
8
|
+
} from './image';
|
|
9
|
+
import { VideoSelectExplorerProps, VideoSelectFieldProps } from './video';
|
|
10
|
+
|
|
11
|
+
declare module '@axinom/mosaic-portal' {
|
|
12
|
+
export interface PiralCustomExtensionSlotMap {
|
|
13
|
+
'image-cover': ImageCoverProps;
|
|
14
|
+
'image-select-field': ImageSelectFieldProps;
|
|
15
|
+
'image-preview': ImagePreviewProps;
|
|
16
|
+
'image-select-explorer': ImageSelectExplorerProps;
|
|
17
|
+
'video-select-explorer': VideoSelectExplorerProps;
|
|
18
|
+
'video-select-field': VideoSelectFieldProps;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface ProviderRegistration {
|
|
22
|
+
(type: FastProviderType, data: FastProviderData): void;
|
|
23
|
+
}
|
|
24
|
+
interface GetProviders {
|
|
25
|
+
(type: FastProviderType): FastProviderData[];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VideoSelectExplorerProps } from './video-select-explorer';
|
|
2
|
+
import { VideoSelectFieldProps } from './video-select-field';
|
|
3
|
+
|
|
4
|
+
export interface VideoExtensions {
|
|
5
|
+
VideoSelectExplorer: React.FC<VideoSelectExplorerProps>;
|
|
6
|
+
VideoSelectField: React.FC<VideoSelectFieldProps>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { FilterValues, ItemSelection } from '@axinom/mosaic-ui';
|
|
2
|
+
import { Datetime, ID, Maybe } from '../../common';
|
|
3
|
+
|
|
4
|
+
export interface VideoSelectExplorerProps {
|
|
5
|
+
/** Optional Title shown in page header (default: 'Videos') */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Whether or not the selection of multiple items is allowed (default: false) */
|
|
8
|
+
allowBulkSelect?: boolean;
|
|
9
|
+
/** IDs of items which will be excluded from the explorer. Can be used to remove already selected items. */
|
|
10
|
+
excludeItems?: ID[];
|
|
11
|
+
/** Unique identifier used to store states related to explorer */
|
|
12
|
+
stationKey?: string;
|
|
13
|
+
/** In multiselect mode, whether the Select All button will be displayed. This is currently not fully supported. (default: false) */
|
|
14
|
+
enableSelectAll?: boolean;
|
|
15
|
+
/** A set of initial filter values which the Explorer will use. (default: empty) */
|
|
16
|
+
predefinedFilterValues?: FilterValues<Video>;
|
|
17
|
+
/**
|
|
18
|
+
* Callback called when the user finished the selection.
|
|
19
|
+
* The IDs of the selected item (or items) will be passed as argument to the callback.
|
|
20
|
+
*/
|
|
21
|
+
onSelection: (selection: ItemSelection<Video>) => void;
|
|
22
|
+
/** Callback called when the user cancels the selection */
|
|
23
|
+
onCancel?: () => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Video {
|
|
27
|
+
id: ID;
|
|
28
|
+
title: string;
|
|
29
|
+
isProtected: boolean;
|
|
30
|
+
encodingState: EncodingState;
|
|
31
|
+
audioLanguages: Maybe<string>[];
|
|
32
|
+
captionLanguages: Maybe<string>[];
|
|
33
|
+
subtitleLanguages: Maybe<string>[];
|
|
34
|
+
lengthInSeconds?: Maybe<number>;
|
|
35
|
+
isArchived: boolean;
|
|
36
|
+
createdDate: Datetime;
|
|
37
|
+
updatedDate: Datetime;
|
|
38
|
+
sourceFullFileName?: Maybe<string>;
|
|
39
|
+
previewStatus: PreviewStatus;
|
|
40
|
+
outputFormat: OutputFormat;
|
|
41
|
+
videosTags: { nodes: VideosTag[] };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export enum EncodingState {
|
|
45
|
+
/** Waiting */
|
|
46
|
+
Waiting = 'WAITING',
|
|
47
|
+
/** In progress */
|
|
48
|
+
InProgress = 'IN_PROGRESS',
|
|
49
|
+
/** Ready */
|
|
50
|
+
Ready = 'READY',
|
|
51
|
+
/** Error */
|
|
52
|
+
Error = 'ERROR',
|
|
53
|
+
/** Not started */
|
|
54
|
+
NotStarted = 'NOT_STARTED',
|
|
55
|
+
/** Initializing */
|
|
56
|
+
Initializing = 'INITIALIZING',
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export enum OutputFormat {
|
|
60
|
+
/** HLS */
|
|
61
|
+
Hls = 'HLS',
|
|
62
|
+
/** DASH */
|
|
63
|
+
Dash = 'DASH',
|
|
64
|
+
/** DASH & HLS */
|
|
65
|
+
DashHls = 'DASH_HLS',
|
|
66
|
+
/** CMAF */
|
|
67
|
+
Cmaf = 'CMAF',
|
|
68
|
+
/** DASH On Demand */
|
|
69
|
+
DashOnDemand = 'DASH_ON_DEMAND',
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export enum PreviewStatus {
|
|
73
|
+
/** Not previewed */
|
|
74
|
+
NotPreviewed = 'NOT_PREVIEWED',
|
|
75
|
+
/** Not approved */
|
|
76
|
+
NotApproved = 'NOT_APPROVED',
|
|
77
|
+
/** Approved */
|
|
78
|
+
Approved = 'APPROVED',
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface VideosTag {
|
|
82
|
+
name: string;
|
|
83
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseFormControl, BaseInputEvents } from '@axinom/mosaic-ui';
|
|
2
|
+
import { ID } from '../../common';
|
|
3
|
+
|
|
4
|
+
export interface VideoSelectFieldProps
|
|
5
|
+
extends BaseFormControl,
|
|
6
|
+
BaseInputEvents {
|
|
7
|
+
/** Current value the form control has */
|
|
8
|
+
value?: ID[];
|
|
9
|
+
/** Maximum number of items which can be assigned */
|
|
10
|
+
maxItems?: number;
|
|
11
|
+
/** Label to be displayed */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Default tag to filter results by */
|
|
14
|
+
defaultFilterTag?: string;
|
|
15
|
+
/** Raised when the value has changed */
|
|
16
|
+
onChange: (event: unknown) => void;
|
|
17
|
+
/** Controls the sticky option of the video list */
|
|
18
|
+
isSticky?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PiletApi } from '@axinom/mosaic-portal';
|
|
2
|
+
import { ID, Maybe } from '../common';
|
|
3
|
+
import { EncodingState } from './types';
|
|
4
|
+
|
|
5
|
+
interface VideoServiceCuePoints {
|
|
6
|
+
__typename?: 'CuePoint';
|
|
7
|
+
id: ID;
|
|
8
|
+
timeInSeconds: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface VideoData {
|
|
12
|
+
__typename?: 'Video';
|
|
13
|
+
lengthInSeconds?: Maybe<number>;
|
|
14
|
+
encodingState: EncodingState;
|
|
15
|
+
cuePoints: {
|
|
16
|
+
__typename?: 'CuePointsConnection';
|
|
17
|
+
nodes: VideoServiceCuePoints[];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export let getVideoCuePointsData: () => (
|
|
22
|
+
id: ID,
|
|
23
|
+
cuePointTypeKeys?: string[],
|
|
24
|
+
) => Promise<VideoData>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Initializes the video-cue-points-data function.
|
|
28
|
+
* @param app The PiletApi object.
|
|
29
|
+
*/
|
|
30
|
+
export function setGetVideoCuePointsData(app: PiletApi): void {
|
|
31
|
+
getVideoCuePointsData = () => app.getData('video-cue-points-data');
|
|
32
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PiletApi } from '@axinom/mosaic-portal';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { extensionDefaultValue } from '../common';
|
|
4
|
+
import {
|
|
5
|
+
VideoExtensions,
|
|
6
|
+
VideoSelectExplorerProps,
|
|
7
|
+
VideoSelectFieldProps,
|
|
8
|
+
} from './types';
|
|
9
|
+
|
|
10
|
+
export const bindVideoExtensions = (app: PiletApi): VideoExtensions => {
|
|
11
|
+
const VideoSelectExplorer: React.FC<VideoSelectExplorerProps> = (props) => (
|
|
12
|
+
<app.Extension
|
|
13
|
+
name="video-select-explorer"
|
|
14
|
+
empty={extensionDefaultValue}
|
|
15
|
+
params={props}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const VideoSelectField: React.FC<VideoSelectFieldProps> = (props) => (
|
|
20
|
+
<app.Extension
|
|
21
|
+
name="video-select-field"
|
|
22
|
+
empty={extensionDefaultValue}
|
|
23
|
+
params={props}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
VideoSelectExplorer,
|
|
29
|
+
VideoSelectField,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/common/models.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,UAAU,OAAO;IACf,qGAAqG;IACrG,IAAI,EAAE,GAAG,CAAC;IACV,mFAAmF;IACnF,QAAQ,EAAE,GAAG,CAAC;IACd;;;OAGG;IACH,QAAQ,EAAE,GAAG,CAAC;CACf;AAED,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,MAAM,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/common/models.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ImageCoverProps, ImagePreviewProps, ImageSelectExplorerProps, ImageSelectFieldProps } from '../image';
|
|
2
|
-
declare module '@axinom/mosaic-portal' {
|
|
3
|
-
interface PiralCustomExtensionSlotMap {
|
|
4
|
-
'image-cover': ImageCoverProps;
|
|
5
|
-
'image-select-field': ImageSelectFieldProps;
|
|
6
|
-
'image-preview': ImagePreviewProps;
|
|
7
|
-
'image-select-explorer': ImageSelectExplorerProps;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=piral-extensions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"piral-extensions.d.ts","sourceRoot":"","sources":["../../src/common/piral-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAiB,2BAA2B;QAC1C,aAAa,EAAE,eAAe,CAAC;QAC/B,oBAAoB,EAAE,qBAAqB,CAAC;QAC5C,eAAe,EAAE,iBAAiB,CAAC;QACnC,uBAAuB,EAAE,wBAAwB,CAAC;KACnD;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"piral-extensions.js","sourceRoot":"","sources":["../../src/common/piral-extensions.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ImageCoverProps,
|
|
3
|
-
ImagePreviewProps,
|
|
4
|
-
ImageSelectExplorerProps,
|
|
5
|
-
ImageSelectFieldProps,
|
|
6
|
-
} from '../image';
|
|
7
|
-
|
|
8
|
-
declare module '@axinom/mosaic-portal' {
|
|
9
|
-
export interface PiralCustomExtensionSlotMap {
|
|
10
|
-
'image-cover': ImageCoverProps;
|
|
11
|
-
'image-select-field': ImageSelectFieldProps;
|
|
12
|
-
'image-preview': ImagePreviewProps;
|
|
13
|
-
'image-select-explorer': ImageSelectExplorerProps;
|
|
14
|
-
}
|
|
15
|
-
}
|