@axinom/mosaic-managed-workflow-integration 0.17.0-rc.0 → 0.17.0-rc.2
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/hosting/get-object-storages.d.ts +1 -3
- package/dist/hosting/get-object-storages.d.ts.map +1 -1
- package/dist/hosting/get-object-storages.js +7 -9
- package/dist/hosting/get-object-storages.js.map +1 -1
- package/dist/image/image-extensions.d.ts +3 -0
- package/dist/image/image-extensions.d.ts.map +1 -1
- package/dist/image/image-extensions.js +3 -0
- package/dist/image/image-extensions.js.map +1 -1
- package/dist/image/thumbnail-renderer.d.ts +33 -11
- package/dist/image/thumbnail-renderer.d.ts.map +1 -1
- package/dist/image/thumbnail-renderer.js +46 -24
- package/dist/image/thumbnail-renderer.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/initialize.d.ts +8 -0
- package/dist/initialize.d.ts.map +1 -0
- package/dist/initialize.js +13 -0
- package/dist/initialize.js.map +1 -0
- package/dist/localization/helpers/localization-generator.d.ts +12 -8
- package/dist/localization/helpers/localization-generator.d.ts.map +1 -1
- package/dist/localization/helpers/localization-generator.js +17 -8
- package/dist/localization/helpers/localization-generator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/video/video-cue-points.d.ts +5 -5
- package/dist/video/video-cue-points.d.ts.map +1 -1
- package/dist/video/video-cue-points.js +13 -7
- package/dist/video/video-cue-points.js.map +1 -1
- package/dist/video/video-extensions.d.ts +3 -0
- package/dist/video/video-extensions.d.ts.map +1 -1
- package/dist/video/video-extensions.js +3 -0
- package/dist/video/video-extensions.js.map +1 -1
- package/package.json +4 -4
- package/src/hosting/get-object-storages.tsx +8 -10
- package/src/image/image-extensions.tsx +3 -0
- package/src/image/thumbnail-renderer.tsx +50 -35
- package/src/index.ts +1 -0
- package/src/initialize.ts +11 -0
- package/src/localization/helpers/localization-generator.ts +18 -9
- package/src/video/video-cue-points.ts +16 -10
- package/src/video/video-extensions.tsx +3 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PiletApi } from '@axinom/mosaic-portal';
|
|
2
1
|
/**
|
|
3
2
|
* Represents an object storage.
|
|
4
3
|
*/
|
|
@@ -10,6 +9,5 @@ export interface ObjectStorage {
|
|
|
10
9
|
* Get enabled Object Storages
|
|
11
10
|
* @returns
|
|
12
11
|
*/
|
|
13
|
-
export declare
|
|
14
|
-
export declare const setGetObjectStorages: (app: PiletApi) => void;
|
|
12
|
+
export declare const getObjectStorages: () => Promise<ObjectStorage[] | undefined>;
|
|
15
13
|
//# sourceMappingURL=get-object-storages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-object-storages.d.ts","sourceRoot":"","sources":["../../src/hosting/get-object-storages.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-object-storages.d.ts","sourceRoot":"","sources":["../../src/hosting/get-object-storages.tsx"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAa,QACzC,aAAa,EAAE,GAAG,SAAS,CAQ5B,CAAC"}
|
|
@@ -9,19 +9,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.getObjectStorages = void 0;
|
|
13
|
+
const initialize_1 = require("../initialize");
|
|
13
14
|
/**
|
|
14
15
|
* Get enabled Object Storages
|
|
15
16
|
* @returns
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const getObjectStorages = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
+
if (initialize_1.piletApi === undefined) {
|
|
20
|
+
throw new Error('The pilet API is not initialized. Please call `initializeIntegrationLib` before using this function.');
|
|
21
|
+
}
|
|
22
|
+
return initialize_1.piletApi.getData('getObjectStorages')();
|
|
21
23
|
});
|
|
22
24
|
exports.getObjectStorages = getObjectStorages;
|
|
23
|
-
const setGetObjectStorages = (app) => {
|
|
24
|
-
exports.getObjectStorages = () => { var _a; return (_a = app.getData('getObjectStorages')()) !== null && _a !== void 0 ? _a : exports.getObjectStorages; };
|
|
25
|
-
};
|
|
26
|
-
exports.setGetObjectStorages = setGetObjectStorages;
|
|
27
25
|
//# sourceMappingURL=get-object-storages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-object-storages.js","sourceRoot":"","sources":["../../src/hosting/get-object-storages.tsx"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-object-storages.js","sourceRoot":"","sources":["../../src/hosting/get-object-storages.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAyC;AAUzC;;;GAGG;AACI,MAAM,iBAAiB,GAAG,GAE/B,EAAE;IACF,IAAI,qBAAQ,KAAK,SAAS,EAAE;QAC1B,MAAM,IAAI,KAAK,CACb,sGAAsG,CACvG,CAAC;KACH;IACD,OAAO,qBAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;AACjD,CAAC,CAAA,CAAC;AATW,QAAA,iBAAiB,qBAS5B"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { PiletApi } from '@axinom/mosaic-portal';
|
|
2
2
|
import { ImageExtensions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Returns an object containing Extension components for the shared extensions provided by the image service.
|
|
5
|
+
*/
|
|
3
6
|
export declare const bindImageExtensions: (app: PiletApi) => ImageExtensions;
|
|
4
7
|
//# sourceMappingURL=image-extensions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-extensions.d.ts","sourceRoot":"","sources":["../../src/image/image-extensions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,OAAO,EAEL,eAAe,EAIhB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,mBAAmB,QAAS,QAAQ,KAAG,eAuCnD,CAAC"}
|
|
1
|
+
{"version":3,"file":"image-extensions.d.ts","sourceRoot":"","sources":["../../src/image/image-extensions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,OAAO,EAEL,eAAe,EAIhB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAS,QAAQ,KAAG,eAuCnD,CAAC"}
|
|
@@ -6,6 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.bindImageExtensions = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const default_extension_value_1 = require("../common/default-extension-value");
|
|
9
|
+
/**
|
|
10
|
+
* Returns an object containing Extension components for the shared extensions provided by the image service.
|
|
11
|
+
*/
|
|
9
12
|
const bindImageExtensions = (app) => {
|
|
10
13
|
const ImageCover = (props) => (react_1.default.createElement(app.Extension, { name: "image-cover", empty: default_extension_value_1.extensionDefaultValue, params: props }));
|
|
11
14
|
const ImageSelectExplorer = (props) => (react_1.default.createElement(app.Extension, { name: "image-select-explorer", empty: default_extension_value_1.extensionDefaultValue, params: props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-extensions.js","sourceRoot":"","sources":["../../src/image/image-extensions.tsx"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,+EAA0E;
|
|
1
|
+
{"version":3,"file":"image-extensions.js","sourceRoot":"","sources":["../../src/image/image-extensions.tsx"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,+EAA0E;AAS1E;;GAEG;AACI,MAAM,mBAAmB,GAAG,CAAC,GAAa,EAAmB,EAAE;IACpE,MAAM,UAAU,GAA8B,CAAC,KAAK,EAAE,EAAE,CAAC,CACvD,8BAAC,GAAG,CAAC,SAAS,IACZ,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,+CAAqB,EAC5B,MAAM,EAAE,KAAK,GACb,CACH,CAAC;IAEF,MAAM,mBAAmB,GAAuC,CAAC,KAAK,EAAE,EAAE,CAAC,CACzE,8BAAC,GAAG,CAAC,SAAS,IACZ,IAAI,EAAC,uBAAuB,EAC5B,KAAK,EAAE,+CAAqB,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,+CAAqB,EAC5B,MAAM,EAAE,KAAK,GACb,CACH,CAAC;IAEF,MAAM,YAAY,GAAgC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC3D,8BAAC,GAAG,CAAC,SAAS,IACZ,IAAI,EAAC,eAAe,EACpB,KAAK,EAAE,+CAAqB,EAC5B,MAAM,EAAE,KAAK,GACb,CACH,CAAC;IAEF,OAAO;QACL,UAAU;QACV,YAAY;QACZ,mBAAmB;QACnB,gBAAgB;KACjB,CAAC;AACJ,CAAC,CAAC;AAvCW,QAAA,mBAAmB,uBAuC9B"}
|
|
@@ -1,18 +1,40 @@
|
|
|
1
|
-
import { PiletApi } from '@axinom/mosaic-portal';
|
|
2
1
|
import { ColumnMap, ColumnRenderer, Data } from '@axinom/mosaic-ui';
|
|
3
2
|
import { ThumbnailProperty, ThumbnailResolver, ThumbnailResolverType } from './types';
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare let getThumbnailAndStateRenderer: <T extends Data>() => (_thumbnailPropertyOrResolver: keyof T | ThumbnailResolver<T>, _map?: ColumnMap, _resolverType?: ThumbnailResolverType) => ColumnRenderer<T>;
|
|
9
|
-
/**
|
|
10
|
-
* Sets the `getThumbnailAndStateRenderer` utility function from the PiletApi object.
|
|
4
|
+
* This function simplifies access to the shared functionality provided by the image workflow in the PiletApi object.
|
|
5
|
+
* In case the shared functionality is not available, a fallback renderer is returned.
|
|
11
6
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
7
|
+
* Make sure to initialize the integration library by calling the `initializeIntegrationLib` function,
|
|
8
|
+
* otherwise it will always return the fallback renderer.
|
|
14
9
|
*
|
|
15
|
-
*
|
|
10
|
+
* The renderer expects that the column is bound to the property containing the state. The thumbnail property is passed as an argument.
|
|
11
|
+
*
|
|
12
|
+
* @param thumbnailPropertyOrResolver
|
|
13
|
+
* Either the name of a property on the `data` object that has the following shape:
|
|
14
|
+
* ```ts
|
|
15
|
+
* {
|
|
16
|
+
* nodes: [{
|
|
17
|
+
* imageId: 'b437056b-c28e-46fa-ad9d-8bd16e7609fa'
|
|
18
|
+
* }]
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
* This reflects the shape a typical postgraphile response would have.
|
|
22
|
+
* The renderer will pick the fist imageId from the nodes array.
|
|
23
|
+
*
|
|
24
|
+
* Alternatively a callback function can be passed that resolves to a url location.
|
|
25
|
+
* The row data is passed as an argument.
|
|
26
|
+
* The method can either return the full url of the image or the uuid of the image.
|
|
27
|
+
* If the uuid is returned, the `resolverType` argument needs to be set to 'uuid'.
|
|
28
|
+
* @param stateMap An object of key/value pairs mapping column values to CSS colors. If an empty object is passed, no state will be rendered.
|
|
29
|
+
* ```ts
|
|
30
|
+
* {
|
|
31
|
+
* 'PUBLISHED': '#95C842',
|
|
32
|
+
* 'CHANGED': '#FFC81A',
|
|
33
|
+
* 'NOT_PUBLISHED': '#DDDDDD',
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
* @param resolverType either 'url' or 'uuid', depending on what your resolver is returning.
|
|
37
|
+
* @returns A thumbnail and state column renderer
|
|
16
38
|
*/
|
|
17
|
-
export declare
|
|
39
|
+
export declare const createThumbnailAndStateRenderer: <T extends Data>(thumbnailPropertyOrResolver: keyof T | ThumbnailResolver<T>, stateMap?: ColumnMap, resolverType?: ThumbnailResolverType) => ColumnRenderer<T>;
|
|
18
40
|
//# sourceMappingURL=thumbnail-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thumbnail-renderer.d.ts","sourceRoot":"","sources":["../../src/image/thumbnail-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"thumbnail-renderer.d.ts","sourceRoot":"","sources":["../../src/image/thumbnail-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGpE,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,+BAA+B,2FAE/B,SAAS,iBACL,qBAAqB,sBAcrC,CAAC"}
|
|
@@ -3,33 +3,55 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.createThumbnailAndStateRenderer = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const initialize_1 = require("../initialize");
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* A function that returns thumbnail and state renderer function.
|
|
19
|
-
* @returns A thumbnail and state column renderer
|
|
20
|
-
*/
|
|
21
|
-
let getThumbnailAndStateRenderer = () => thumbnailFallback;
|
|
22
|
-
exports.getThumbnailAndStateRenderer = getThumbnailAndStateRenderer;
|
|
23
|
-
/**
|
|
24
|
-
* Sets the `getThumbnailAndStateRenderer` utility function from the PiletApi object.
|
|
10
|
+
* This function simplifies access to the shared functionality provided by the image workflow in the PiletApi object.
|
|
11
|
+
* In case the shared functionality is not available, a fallback renderer is returned.
|
|
12
|
+
*
|
|
13
|
+
* Make sure to initialize the integration library by calling the `initializeIntegrationLib` function,
|
|
14
|
+
* otherwise it will always return the fallback renderer.
|
|
15
|
+
*
|
|
16
|
+
* The renderer expects that the column is bound to the property containing the state. The thumbnail property is passed as an argument.
|
|
25
17
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
18
|
+
* @param thumbnailPropertyOrResolver
|
|
19
|
+
* Either the name of a property on the `data` object that has the following shape:
|
|
20
|
+
* ```ts
|
|
21
|
+
* {
|
|
22
|
+
* nodes: [{
|
|
23
|
+
* imageId: 'b437056b-c28e-46fa-ad9d-8bd16e7609fa'
|
|
24
|
+
* }]
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
* This reflects the shape a typical postgraphile response would have.
|
|
28
|
+
* The renderer will pick the fist imageId from the nodes array.
|
|
28
29
|
*
|
|
29
|
-
*
|
|
30
|
+
* Alternatively a callback function can be passed that resolves to a url location.
|
|
31
|
+
* The row data is passed as an argument.
|
|
32
|
+
* The method can either return the full url of the image or the uuid of the image.
|
|
33
|
+
* If the uuid is returned, the `resolverType` argument needs to be set to 'uuid'.
|
|
34
|
+
* @param stateMap An object of key/value pairs mapping column values to CSS colors. If an empty object is passed, no state will be rendered.
|
|
35
|
+
* ```ts
|
|
36
|
+
* {
|
|
37
|
+
* 'PUBLISHED': '#95C842',
|
|
38
|
+
* 'CHANGED': '#FFC81A',
|
|
39
|
+
* 'NOT_PUBLISHED': '#DDDDDD',
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
* @param resolverType either 'url' or 'uuid', depending on what your resolver is returning.
|
|
43
|
+
* @returns A thumbnail and state column renderer
|
|
30
44
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
45
|
+
const createThumbnailAndStateRenderer = (thumbnailPropertyOrResolver, stateMap, resolverType) => {
|
|
46
|
+
const Renderer = (value, data) => {
|
|
47
|
+
if (initialize_1.piletApi === null || initialize_1.piletApi === void 0 ? void 0 : initialize_1.piletApi.getData('thumbnailAndStateRenderer')) {
|
|
48
|
+
return initialize_1.piletApi === null || initialize_1.piletApi === void 0 ? void 0 : initialize_1.piletApi.getData('thumbnailAndStateRenderer')(thumbnailPropertyOrResolver, stateMap, resolverType)(value, data);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return react_1.default.createElement("span", { title: "No Renderer" }, "No Renderer");
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
return Renderer;
|
|
55
|
+
};
|
|
56
|
+
exports.createThumbnailAndStateRenderer = createThumbnailAndStateRenderer;
|
|
35
57
|
//# sourceMappingURL=thumbnail-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thumbnail-renderer.js","sourceRoot":"","sources":["../../src/image/thumbnail-renderer.tsx"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"thumbnail-renderer.js","sourceRoot":"","sources":["../../src/image/thumbnail-renderer.tsx"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,8CAAyC;AAOzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACI,MAAM,+BAA+B,GAAG,CAC7C,2BAAwE,EACxE,QAAoB,EACpB,YAAoC,EACjB,EAAE;IACrB,MAAM,QAAQ,GAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClD,IAAI,qBAAQ,aAAR,qBAAQ,uBAAR,qBAAQ,CAAE,OAAO,CAAC,2BAA2B,CAAC,EAAE;YAClD,OAAO,qBAAQ,aAAR,qBAAQ,uBAAR,qBAAQ,CAAE,OAAO,CAAC,2BAA2B,EAClD,2BAA2B,EAC3B,QAAQ,EACR,YAAY,EACZ,KAAK,EAAE,IAAI,CAAC,CAAC;SAChB;aAAM;YACL,OAAO,wCAAM,KAAK,EAAC,aAAa,kBAAmB,CAAC;SACrD;IACH,CAAC,CAAC;IACF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAjBW,QAAA,+BAA+B,mCAiB1C"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,10 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.initializeIntegrationLib = void 0;
|
|
17
18
|
__exportStar(require("./channel"), exports);
|
|
18
19
|
__exportStar(require("./common"), exports);
|
|
19
20
|
__exportStar(require("./hosting"), exports);
|
|
20
21
|
__exportStar(require("./image"), exports);
|
|
22
|
+
var initialize_1 = require("./initialize");
|
|
23
|
+
Object.defineProperty(exports, "initializeIntegrationLib", { enumerable: true, get: function () { return initialize_1.initializeIntegrationLib; } });
|
|
21
24
|
__exportStar(require("./localization"), exports);
|
|
22
25
|
__exportStar(require("./piral-extensions"), exports);
|
|
23
26
|
__exportStar(require("./video"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAwD;AAA/C,sHAAA,wBAAwB,OAAA;AACjC,iDAA+B;AAC/B,qDAAmC;AACnC,0CAAwB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PiletApi } from '@axinom/mosaic-portal';
|
|
2
|
+
export declare let piletApi: PiletApi | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Initializes the integration library with the provided Pilet API.
|
|
5
|
+
* @param app the PiletAPI object
|
|
6
|
+
*/
|
|
7
|
+
export declare const initializeIntegrationLib: (app: PiletApi) => void;
|
|
8
|
+
//# sourceMappingURL=initialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../src/initialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,eAAO,IAAI,QAAQ,EAAE,QAAQ,GAAG,SAAqB,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAS,QAAQ,KAAG,IAExD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initializeIntegrationLib = exports.piletApi = void 0;
|
|
4
|
+
exports.piletApi = undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Initializes the integration library with the provided Pilet API.
|
|
7
|
+
* @param app the PiletAPI object
|
|
8
|
+
*/
|
|
9
|
+
const initializeIntegrationLib = (app) => {
|
|
10
|
+
exports.piletApi = app;
|
|
11
|
+
};
|
|
12
|
+
exports.initializeIntegrationLib = initializeIntegrationLib;
|
|
13
|
+
//# sourceMappingURL=initialize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.js","sourceRoot":"","sources":["../src/initialize.ts"],"names":[],"mappings":";;;AAEW,QAAA,QAAQ,GAAyB,SAAS,CAAC;AAEtD;;;GAGG;AACI,MAAM,wBAAwB,GAAG,CAAC,GAAa,EAAQ,EAAE;IAC9D,gBAAQ,GAAG,GAAG,CAAC;AACjB,CAAC,CAAC;AAFW,QAAA,wBAAwB,4BAEnC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PiletApi } from '@axinom/mosaic-portal';
|
|
2
1
|
import { LocalizationGenerator, LocalizationGeneratorParams } from '../types';
|
|
3
2
|
/**
|
|
4
3
|
* An object that maps entity types to their localization entry point paths
|
|
@@ -20,9 +19,13 @@ export declare const getLocalizationEntryPoints: () => LocalizationEntryPoints;
|
|
|
20
19
|
*/
|
|
21
20
|
export declare const getLocalizationEntryPoint: (entityType: string) => string | undefined;
|
|
22
21
|
/**
|
|
23
|
-
*
|
|
24
|
-
* to register localization entry points
|
|
25
|
-
*
|
|
22
|
+
* Instead of using this function directly, it is recommended to use `registerLocalizationEntryPoints` function instead.
|
|
23
|
+
* `registerLocalizationEntryPoints` is a wrapper around this function that provides a more convenient way to register localization entry points.
|
|
24
|
+
*
|
|
25
|
+
* This function is designed to be used as callback of the `app.getDataHelper('localization-registration', callback)` call.
|
|
26
|
+
*
|
|
27
|
+
* The function returns a function that can be called with a `LocalizationGenerator` function. When this function is called,
|
|
28
|
+
* it will register the localization entry points that were provided as `data`.
|
|
26
29
|
* @param data Data containing the information needed to register the localization station paths for the entity using the localization generator
|
|
27
30
|
* @returns A function that will register the localization entry points using provided `data`
|
|
28
31
|
* @example
|
|
@@ -42,10 +45,10 @@ export declare const getLocalizationEntryPoint: (entityType: string) => string |
|
|
|
42
45
|
*/
|
|
43
46
|
export declare function generateLocalizationEntryPoints(data: LocalizationGeneratorParams[]): (generator: LocalizationGenerator | undefined) => LocalizationEntryPoints;
|
|
44
47
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
48
|
+
* This function can be used to register embedded localization worklfows for entites.
|
|
49
|
+
* The localization service will register all required stations to provide an embedded localization workflow for the entity.
|
|
50
|
+
* To query then entry point for a specific entity, to e.g. create a details page action that links to the sub-workflow, use `getLocalizationEntryPoint` function.
|
|
47
51
|
* @param data Data containing the information needed to register the localization station paths for the entity using the localization generator
|
|
48
|
-
* @param app Pilet API instance
|
|
49
52
|
* @example
|
|
50
53
|
* ```ts
|
|
51
54
|
* registerLocalizationEntryPoints([
|
|
@@ -59,6 +62,7 @@ export declare function generateLocalizationEntryPoints(data: LocalizationGenera
|
|
|
59
62
|
* entityType: 'playlist'
|
|
60
63
|
* }
|
|
61
64
|
* ]
|
|
65
|
+
* ```
|
|
62
66
|
*/
|
|
63
|
-
export declare function registerLocalizationEntryPoints(data: LocalizationGeneratorParams[]
|
|
67
|
+
export declare function registerLocalizationEntryPoints(data: LocalizationGeneratorParams[]): void;
|
|
64
68
|
//# sourceMappingURL=localization-generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-generator.d.ts","sourceRoot":"","sources":["../../../src/localization/helpers/localization-generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"localization-generator.d.ts","sourceRoot":"","sources":["../../../src/localization/helpers/localization-generator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAE9E;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAI7D;;GAEG;AACH,eAAO,MAAM,0BAA0B,QAAO,uBACrB,CAAC;AAE1B;;;GAGG;AACH,eAAO,MAAM,yBAAyB,eACxB,MAAM,KACjB,MAAM,GAAG,SAAgD,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,2BAA2B,EAAE,eAGtB,qBAAqB,GAAG,SAAS,KAC3C,uBAAuB,CAW3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,2BAA2B,EAAE,GAClC,IAAI,CAUN"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerLocalizationEntryPoints = exports.generateLocalizationEntryPoints = exports.getLocalizationEntryPoint = exports.getLocalizationEntryPoints = void 0;
|
|
4
|
+
const initialize_1 = require("../../initialize");
|
|
4
5
|
const localizationEntryPoints = {};
|
|
5
6
|
/**
|
|
6
7
|
* @returns The list of all registered localization entry points
|
|
@@ -14,9 +15,13 @@ exports.getLocalizationEntryPoints = getLocalizationEntryPoints;
|
|
|
14
15
|
const getLocalizationEntryPoint = (entityType) => localizationEntryPoints[entityType];
|
|
15
16
|
exports.getLocalizationEntryPoint = getLocalizationEntryPoint;
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
-
* to register localization entry points
|
|
19
|
-
*
|
|
18
|
+
* Instead of using this function directly, it is recommended to use `registerLocalizationEntryPoints` function instead.
|
|
19
|
+
* `registerLocalizationEntryPoints` is a wrapper around this function that provides a more convenient way to register localization entry points.
|
|
20
|
+
*
|
|
21
|
+
* This function is designed to be used as callback of the `app.getDataHelper('localization-registration', callback)` call.
|
|
22
|
+
*
|
|
23
|
+
* The function returns a function that can be called with a `LocalizationGenerator` function. When this function is called,
|
|
24
|
+
* it will register the localization entry points that were provided as `data`.
|
|
20
25
|
* @param data Data containing the information needed to register the localization station paths for the entity using the localization generator
|
|
21
26
|
* @returns A function that will register the localization entry points using provided `data`
|
|
22
27
|
* @example
|
|
@@ -49,10 +54,10 @@ function generateLocalizationEntryPoints(data) {
|
|
|
49
54
|
}
|
|
50
55
|
exports.generateLocalizationEntryPoints = generateLocalizationEntryPoints;
|
|
51
56
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
57
|
+
* This function can be used to register embedded localization worklfows for entites.
|
|
58
|
+
* The localization service will register all required stations to provide an embedded localization workflow for the entity.
|
|
59
|
+
* To query then entry point for a specific entity, to e.g. create a details page action that links to the sub-workflow, use `getLocalizationEntryPoint` function.
|
|
54
60
|
* @param data Data containing the information needed to register the localization station paths for the entity using the localization generator
|
|
55
|
-
* @param app Pilet API instance
|
|
56
61
|
* @example
|
|
57
62
|
* ```ts
|
|
58
63
|
* registerLocalizationEntryPoints([
|
|
@@ -66,9 +71,13 @@ exports.generateLocalizationEntryPoints = generateLocalizationEntryPoints;
|
|
|
66
71
|
* entityType: 'playlist'
|
|
67
72
|
* }
|
|
68
73
|
* ]
|
|
74
|
+
* ```
|
|
69
75
|
*/
|
|
70
|
-
function registerLocalizationEntryPoints(data
|
|
71
|
-
|
|
76
|
+
function registerLocalizationEntryPoints(data) {
|
|
77
|
+
if (initialize_1.piletApi === undefined) {
|
|
78
|
+
throw new Error('The pilet API is not initialized. Please call `initializeIntegrationLib` before using this function or pass the API object as 2nd parameter.');
|
|
79
|
+
}
|
|
80
|
+
initialize_1.piletApi.getDataHelper('localization-registration', generateLocalizationEntryPoints(data));
|
|
72
81
|
}
|
|
73
82
|
exports.registerLocalizationEntryPoints = registerLocalizationEntryPoints;
|
|
74
83
|
//# sourceMappingURL=localization-generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-generator.js","sourceRoot":"","sources":["../../../src/localization/helpers/localization-generator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"localization-generator.js","sourceRoot":"","sources":["../../../src/localization/helpers/localization-generator.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAc5C,MAAM,uBAAuB,GAA4B,EAAE,CAAC;AAE5D;;GAEG;AACI,MAAM,0BAA0B,GAAG,GAA4B,EAAE,CACtE,uBAAuB,CAAC;AADb,QAAA,0BAA0B,8BACb;AAE1B;;;GAGG;AACI,MAAM,yBAAyB,GAAG,CACvC,UAAkB,EACE,EAAE,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAFhD,QAAA,yBAAyB,6BAEuB;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,+BAA+B,CAC7C,IAAmC;IAEnC,OAAO,CACL,SAA4C,EACnB,EAAE;QAC3B,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACxB,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;gBACjC,IAAI,IAAI,EAAE;oBACR,uBAAuB,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;iBACrD;YACH,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,uBAAuB,CAAC;IACjC,CAAC,CAAC;AACJ,CAAC;AAhBD,0EAgBC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,+BAA+B,CAC7C,IAAmC;IAEnC,IAAI,qBAAQ,KAAK,SAAS,EAAE;QAC1B,MAAM,IAAI,KAAK,CACb,8IAA8I,CAC/I,CAAC;KACH;IACD,qBAAQ,CAAC,aAAa,CACpB,2BAA2B,EAC3B,+BAA+B,CAAC,IAAI,CAAC,CACtC,CAAC;AACJ,CAAC;AAZD,0EAYC"}
|