@axinom/mosaic-managed-workflow-integration 0.1.3-rc.9 → 0.1.4-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.
Files changed (80) hide show
  1. package/dist/common/default-extension-value.d.ts +3 -0
  2. package/dist/common/default-extension-value.d.ts.map +1 -0
  3. package/dist/common/default-extension-value.js +3 -0
  4. package/dist/common/default-extension-value.js.map +1 -0
  5. package/dist/common/index.d.ts +4 -0
  6. package/dist/common/index.d.ts.map +1 -0
  7. package/dist/common/index.js +4 -0
  8. package/dist/common/index.js.map +1 -0
  9. package/dist/common/models.d.ts +17 -0
  10. package/dist/common/models.d.ts.map +1 -0
  11. package/dist/common/models.js +2 -0
  12. package/dist/common/models.js.map +1 -0
  13. package/dist/common/piral-extensions.d.ts +10 -0
  14. package/dist/common/piral-extensions.d.ts.map +1 -0
  15. package/dist/common/piral-extensions.js +2 -0
  16. package/dist/common/piral-extensions.js.map +1 -0
  17. package/dist/image/image-extensions.d.ts +4 -0
  18. package/dist/image/image-extensions.d.ts.map +1 -0
  19. package/dist/image/image-extensions.js +15 -0
  20. package/dist/image/image-extensions.js.map +1 -0
  21. package/dist/image/index.d.ts +4 -0
  22. package/dist/image/index.d.ts.map +1 -0
  23. package/dist/image/index.js +4 -0
  24. package/dist/image/index.js.map +1 -0
  25. package/dist/image/thumbnail-renderer.d.ts +9 -0
  26. package/dist/image/thumbnail-renderer.d.ts.map +1 -0
  27. package/dist/image/thumbnail-renderer.js +16 -0
  28. package/dist/image/thumbnail-renderer.js.map +1 -0
  29. package/dist/image/types/image-cover-extension.d.ts +5 -0
  30. package/dist/image/types/image-cover-extension.d.ts.map +1 -0
  31. package/dist/image/types/image-cover-extension.js +2 -0
  32. package/dist/image/types/image-cover-extension.js.map +1 -0
  33. package/dist/image/types/image-explorer-extension.d.ts +46 -0
  34. package/dist/image/types/image-explorer-extension.d.ts.map +1 -0
  35. package/dist/image/types/image-explorer-extension.js +2 -0
  36. package/dist/image/types/image-explorer-extension.js.map +1 -0
  37. package/dist/image/types/image-extensions.d.ts +12 -0
  38. package/dist/image/types/image-extensions.d.ts.map +1 -0
  39. package/dist/image/types/image-extensions.js +2 -0
  40. package/dist/image/types/image-extensions.js.map +1 -0
  41. package/dist/image/types/image-preview-extension.d.ts +8 -0
  42. package/dist/image/types/image-preview-extension.d.ts.map +1 -0
  43. package/dist/image/types/image-preview-extension.js +2 -0
  44. package/dist/image/types/image-preview-extension.js.map +1 -0
  45. package/dist/image/types/image-select-field-extension.d.ts +17 -0
  46. package/dist/image/types/image-select-field-extension.d.ts.map +1 -0
  47. package/dist/image/types/image-select-field-extension.js +2 -0
  48. package/dist/image/types/image-select-field-extension.js.map +1 -0
  49. package/dist/image/types/index.d.ts +6 -0
  50. package/dist/image/types/index.d.ts.map +1 -0
  51. package/dist/image/types/index.js +6 -0
  52. package/dist/image/types/index.js.map +1 -0
  53. package/dist/index.d.ts +2 -0
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +3 -17
  56. package/dist/index.js.map +1 -1
  57. package/dist/localization/helpers/index.js +1 -17
  58. package/dist/localization/helpers/index.js.map +1 -1
  59. package/dist/localization/helpers/localization-generator.js +3 -9
  60. package/dist/localization/helpers/localization-generator.js.map +1 -1
  61. package/dist/localization/index.js +2 -18
  62. package/dist/localization/index.js.map +1 -1
  63. package/dist/localization/types/index.js +1 -17
  64. package/dist/localization/types/index.js.map +1 -1
  65. package/dist/localization/types/localization-generator.js +1 -2
  66. package/package.json +14 -2
  67. package/src/common/default-extension-value.tsx +5 -0
  68. package/src/common/index.ts +3 -0
  69. package/src/common/models.ts +18 -0
  70. package/src/common/piral-extensions.ts +15 -0
  71. package/src/image/image-extensions.tsx +51 -0
  72. package/src/image/index.ts +3 -0
  73. package/src/image/thumbnail-renderer.tsx +30 -0
  74. package/src/image/types/image-cover-extension.ts +4 -0
  75. package/src/image/types/image-explorer-extension.ts +49 -0
  76. package/src/image/types/image-extensions.ts +11 -0
  77. package/src/image/types/image-preview-extension.ts +8 -0
  78. package/src/image/types/image-select-field-extension.ts +19 -0
  79. package/src/image/types/index.ts +5 -0
  80. package/src/index.ts +2 -0
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const extensionDefaultValue: () => JSX.Element;
3
+ //# sourceMappingURL=default-extension-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-extension-value.d.ts","sourceRoot":"","sources":["../../src/common/default-extension-value.tsx"],"names":[],"mappings":";AAEA,eAAO,MAAM,qBAAqB,QAAO,WAExC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export const extensionDefaultValue = () => (React.createElement("div", null, "Extension not Loaded"));
3
+ //# sourceMappingURL=default-extension-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-extension-value.js","sourceRoot":"","sources":["../../src/common/default-extension-value.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAgB,EAAE,CAAC,CACtD,wDAA+B,CAChC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './default-extension-value';
2
+ export * from './models';
3
+ export * from './piral-extensions';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './default-extension-value';
2
+ export * from './models';
3
+ export * from './piral-extensions';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /** All built-in and custom scalars, mapped to their actual values */
2
+ interface Scalars {
3
+ /** A universally unique identifier as defined by [RFC 4122](https://tools.ietf.org/html/rfc4122). */
4
+ UUID: any;
5
+ /** A floating point number that requires more precision than IEEE 754 binary 64 */
6
+ BigFloat: any;
7
+ /**
8
+ * A point in time as described by the [ISO
9
+ * 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. May or may not include a timezone.
10
+ */
11
+ Datetime: any;
12
+ }
13
+ export type Datetime = Scalars['Datetime'];
14
+ export type BigFloat = Scalars['BigFloat'];
15
+ export type ID = Scalars['UUID'];
16
+ export {};
17
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/common/models.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=piral-extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"piral-extensions.js","sourceRoot":"","sources":["../../src/common/piral-extensions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { PiletApi } from '@axinom/mosaic-portal';
2
+ import { ImageExtensions } from './types';
3
+ export declare const bindImageExtensions: (app: PiletApi) => ImageExtensions;
4
+ //# sourceMappingURL=image-extensions.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { extensionDefaultValue } from '../common/default-extension-value';
3
+ export const bindImageExtensions = (app) => {
4
+ const ImageCover = (props) => (React.createElement(app.Extension, { name: "image-cover", empty: extensionDefaultValue, params: props }));
5
+ const ImageSelectExplorer = (props) => (React.createElement(app.Extension, { name: "image-select-explorer", empty: extensionDefaultValue, params: props }));
6
+ const ImageSelectField = (props) => (React.createElement(app.Extension, { name: "image-select-field", empty: extensionDefaultValue, params: props }));
7
+ const ImagePreview = (props) => (React.createElement(app.Extension, { name: "image-preview", empty: extensionDefaultValue, params: props }));
8
+ return {
9
+ ImageCover,
10
+ ImagePreview,
11
+ ImageSelectExplorer,
12
+ ImageSelectField,
13
+ };
14
+ };
15
+ //# sourceMappingURL=image-extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-extensions.js","sourceRoot":"","sources":["../../src/image/image-extensions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAS1E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,GAAa,EAAmB,EAAE;IACpE,MAAM,UAAU,GAA8B,CAAC,KAAK,EAAE,EAAE,CAAC,CACvD,oBAAC,GAAG,CAAC,SAAS,IACZ,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,qBAAqB,EAC5B,MAAM,EAAE,KAAK,GACb,CACH,CAAC;IAEF,MAAM,mBAAmB,GAAuC,CAAC,KAAK,EAAE,EAAE,CAAC,CACzE,oBAAC,GAAG,CAAC,SAAS,IACZ,IAAI,EAAC,uBAAuB,EAC5B,KAAK,EAAE,qBAAqB,EAC5B,MAAM,EAAE,KAAK,GACb,CACH,CAAC;IAEF,MAAM,gBAAgB,GAAoC,CAAC,KAAK,EAAE,EAAE,CAAC,CACnE,oBAAC,GAAG,CAAC,SAAS,IACZ,IAAI,EAAC,oBAAoB,EACzB,KAAK,EAAE,qBAAqB,EAC5B,MAAM,EAAE,KAAK,GACb,CACH,CAAC;IAEF,MAAM,YAAY,GAAgC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC3D,oBAAC,GAAG,CAAC,SAAS,IACZ,IAAI,EAAC,eAAe,EACpB,KAAK,EAAE,qBAAqB,EAC5B,MAAM,EAAE,KAAK,GACb,CACH,CAAC;IAEF,OAAO;QACL,UAAU;QACV,YAAY;QACZ,mBAAmB;QACnB,gBAAgB;KACjB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './image-extensions';
2
+ export * from './thumbnail-renderer';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/image/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './image-extensions';
2
+ export * from './thumbnail-renderer';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/image/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { PiletApi } from '@axinom/mosaic-portal';
2
+ import { ColumnMap, ColumnRenderer, Data } from '@axinom/mosaic-ui';
3
+ export declare let getThumbnailAndStateRenderer: () => (_thumbnailProperty: keyof Data, _map?: ColumnMap) => ColumnRenderer<Data>;
4
+ /**
5
+ * Initializes the getThumbnailAndStateRenderer function.
6
+ * @param app The PiletApi object.
7
+ */
8
+ export declare function setGetThumbnailAndStateRenderer(app: PiletApi): void;
9
+ //# sourceMappingURL=thumbnail-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumbnail-renderer.d.ts","sourceRoot":"","sources":["../../src/image/thumbnail-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAgBpE,eAAO,IAAI,4BAA4B,6BACjB,MAAM,IAAI,SACvB,SAAS,KACb,eAAe,IAAI,CAAuB,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAGnE"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ const thumbnailFallback = (_thumbnailProperty, _map) => {
3
+ const ThumbnailFallbackRenderer = (_state, _data) => {
4
+ return React.createElement("span", { title: "No Renderer" }, "No Renderer");
5
+ };
6
+ return ThumbnailFallbackRenderer;
7
+ };
8
+ export let getThumbnailAndStateRenderer = () => thumbnailFallback;
9
+ /**
10
+ * Initializes the getThumbnailAndStateRenderer function.
11
+ * @param app The PiletApi object.
12
+ */
13
+ export function setGetThumbnailAndStateRenderer(app) {
14
+ getThumbnailAndStateRenderer = () => { var _a; return (_a = app.getData('thumbnailAndStateRenderer')) !== null && _a !== void 0 ? _a : thumbnailFallback; };
15
+ }
16
+ //# sourceMappingURL=thumbnail-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumbnail-renderer.js","sourceRoot":"","sources":["../../src/image/thumbnail-renderer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,iBAAiB,GAAG,CACxB,kBAA8B,EAC9B,IAAgB,EACM,EAAE;IACxB,MAAM,yBAAyB,GAAG,CAChC,MAAe,EACf,KAAc,EACD,EAAE;QACf,OAAO,8BAAM,KAAK,EAAC,aAAa,kBAAmB,CAAC;IACtD,CAAC,CAAC;IACF,OAAO,yBAAyB,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,CAAC,IAAI,4BAA4B,GAAG,GAGf,EAAE,CAAC,iBAAiB,CAAC;AAEhD;;;GAGG;AACH,MAAM,UAAU,+BAA+B,CAAC,GAAa;IAC3D,4BAA4B,GAAG,GAAG,EAAE,WAClC,OAAA,MAAA,GAAG,CAAC,OAAO,CAAC,2BAA2B,CAAC,mCAAI,iBAAiB,CAAA,EAAA,CAAC;AAClE,CAAC"}
@@ -0,0 +1,5 @@
1
+ export interface ImageCoverProps {
2
+ /** Image Id */
3
+ id: string;
4
+ }
5
+ //# sourceMappingURL=image-cover-extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-cover-extension.d.ts","sourceRoot":"","sources":["../../../src/image/types/image-cover-extension.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,eAAe;IACf,EAAE,EAAE,MAAM,CAAC;CACZ"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=image-cover-extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-cover-extension.js","sourceRoot":"","sources":["../../../src/image/types/image-cover-extension.ts"],"names":[],"mappings":""}
@@ -0,0 +1,46 @@
1
+ import { FilterValues } from '@axinom/mosaic-ui';
2
+ import { BigFloat, Datetime, ID } from '../../common';
3
+ export interface ImageSelectExplorerProps {
4
+ /** Optional Title shown in page header (default: 'Images') */
5
+ title?: string;
6
+ /** Whether or not the selection of multiple items is allowed (default: true) */
7
+ allowBulkSelect?: boolean;
8
+ /** IDs of items which will be excluded from the explorer. Can be used to remove already selected items. */
9
+ excludeItems?: ID[];
10
+ /** Unique identifier used to store states related to explorer */
11
+ stationKey?: string;
12
+ /** In multi-select mode, whether the Select All button will be displayed. This is currently not fully supported. (default: false) */
13
+ enableSelectAll?: boolean;
14
+ /** Image Type */
15
+ imageType?: string;
16
+ /** A set of initial filter values which the Explorer will use. (default: empty) */
17
+ predefinedFilterValues?: FilterValues<ImageData>;
18
+ /**
19
+ * Callback called when the user finished the selection.
20
+ * The IDs of the selected item (or items) will be passed as argument to the callback.
21
+ */
22
+ onSelected: (value: ID[]) => void;
23
+ /** Callback called when the user cancels the selection */
24
+ onCancel?: () => void;
25
+ }
26
+ export interface ImageData {
27
+ id: ID;
28
+ thumbnailPath: string;
29
+ title: string;
30
+ sourceFileName: string;
31
+ sourceFileType: string;
32
+ focalX?: BigFloat;
33
+ imageTypeKey: string;
34
+ createdDate: Datetime;
35
+ updatedDate: Datetime;
36
+ isArchived: boolean;
37
+ imagesTags: ImageTag[];
38
+ imageType?: ImageType;
39
+ }
40
+ export interface ImageTag {
41
+ name: string;
42
+ }
43
+ export interface ImageType {
44
+ title: string;
45
+ }
46
+ //# sourceMappingURL=image-explorer-extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-explorer-extension.d.ts","sourceRoot":"","sources":["../../../src/image/types/image-explorer-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,wBAAwB;IACvC,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2GAA2G;IAC3G,YAAY,CAAC,EAAE,EAAE,EAAE,CAAC;IACpB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qIAAqI;IACrI,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,sBAAsB,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACjD;;;OAGG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,IAAI,CAAC;IAClC,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,EAAE,CAAC;IACP,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,QAAQ,CAAC;IACtB,WAAW,EAAE,QAAQ,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=image-explorer-extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-explorer-extension.js","sourceRoot":"","sources":["../../../src/image/types/image-explorer-extension.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { ImageCoverProps } from './image-cover-extension';
3
+ import { ImageSelectExplorerProps } from './image-explorer-extension';
4
+ import { ImagePreviewProps } from './image-preview-extension';
5
+ import { ImageSelectFieldProps } from './image-select-field-extension';
6
+ export interface ImageExtensions {
7
+ ImageCover: React.FC<ImageCoverProps>;
8
+ ImagePreview: React.FC<ImagePreviewProps>;
9
+ ImageSelectExplorer: React.FC<ImageSelectExplorerProps>;
10
+ ImageSelectField: React.FC<ImageSelectFieldProps>;
11
+ }
12
+ //# sourceMappingURL=image-extensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-extensions.d.ts","sourceRoot":"","sources":["../../../src/image/types/image-extensions.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC;IACtC,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;IAC1C,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAC;IACxD,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC;CACnD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=image-extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-extensions.js","sourceRoot":"","sources":["../../../src/image/types/image-extensions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { ImageLoaderProps } from '@axinom/mosaic-ui';
2
+ export interface ImagePreviewProps extends Omit<ImageLoaderProps, 'imgSrc'> {
3
+ /** Image Id */
4
+ id?: string | null;
5
+ /** Whether to render a full size preview image or a thumbnail. default('preview') */
6
+ type?: 'preview' | 'thumbnail';
7
+ }
8
+ //# sourceMappingURL=image-preview-extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-preview-extension.d.ts","sourceRoot":"","sources":["../../../src/image/types/image-preview-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC;IACzE,eAAe;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,qFAAqF;IACrF,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CAChC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=image-preview-extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-preview-extension.js","sourceRoot":"","sources":["../../../src/image/types/image-preview-extension.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import { BaseFormControl, BaseInputEvents } from '@axinom/mosaic-ui';
2
+ import { ID } from '../../common';
3
+ export interface ImageSelectFieldProps 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
+ /** Image's scope for filtering images by its type */
11
+ imageScope?: string;
12
+ /** Raised when the value has changed */
13
+ onChange: (event: unknown) => void;
14
+ /** Default tag to filter results by */
15
+ defaultFilterTag?: string;
16
+ }
17
+ //# sourceMappingURL=image-select-field-extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-select-field-extension.d.ts","sourceRoot":"","sources":["../../../src/image/types/image-select-field-extension.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,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=image-select-field-extension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-select-field-extension.js","sourceRoot":"","sources":["../../../src/image/types/image-select-field-extension.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export * from './image-cover-extension';
2
+ export * from './image-explorer-extension';
3
+ export * from './image-extensions';
4
+ export * from './image-preview-extension';
5
+ export * from './image-select-field-extension';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/image/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './image-cover-extension';
2
+ export * from './image-explorer-extension';
3
+ export * from './image-extensions';
4
+ export * from './image-preview-extension';
5
+ export * from './image-select-field-extension';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/image/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
+ export * from './common';
2
+ export * from './image';
1
3
  export * from './localization';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -1,18 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./localization"), exports);
1
+ export * from './common';
2
+ export * from './image';
3
+ export * from './localization';
18
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
@@ -1,18 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./localization-generator"), exports);
1
+ export * from './localization-generator';
18
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/localization/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/localization/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -1,18 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateLocalizationEntryPoints = exports.getTranslationEntryPoint = exports.getTranslationEntryPoints = void 0;
4
1
  const translationEntryPoints = {};
5
2
  /**
6
3
  * @returns The list of all registered localization entry points
7
4
  */
8
- const getTranslationEntryPoints = () => translationEntryPoints;
9
- exports.getTranslationEntryPoints = getTranslationEntryPoints;
5
+ export const getTranslationEntryPoints = () => translationEntryPoints;
10
6
  /**
11
7
  * @param entityType Name of the entity type set when registering the localization entry point
12
8
  * @returns Path to the localization station for the given entity type
13
9
  */
14
- const getTranslationEntryPoint = (entityType) => translationEntryPoints[entityType];
15
- exports.getTranslationEntryPoint = getTranslationEntryPoint;
10
+ export const getTranslationEntryPoint = (entityType) => translationEntryPoints[entityType];
16
11
  /**
17
12
  * Use as a callback for method `app.getDataHelper('localization-registration', callback)`
18
13
  * to register localization entry points
@@ -34,7 +29,7 @@ exports.getTranslationEntryPoint = getTranslationEntryPoint;
34
29
  * ]));
35
30
  * ```
36
31
  */
37
- function generateLocalizationEntryPoints(data) {
32
+ export function generateLocalizationEntryPoints(data) {
38
33
  return (generator) => {
39
34
  if (generator) {
40
35
  data.forEach((dataItem) => {
@@ -47,5 +42,4 @@ function generateLocalizationEntryPoints(data) {
47
42
  return translationEntryPoints;
48
43
  };
49
44
  }
50
- exports.generateLocalizationEntryPoints = generateLocalizationEntryPoints;
51
45
  //# sourceMappingURL=localization-generator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"localization-generator.js","sourceRoot":"","sources":["../../../src/localization/helpers/localization-generator.ts"],"names":[],"mappings":";;;AAaA,MAAM,sBAAsB,GAA2B,EAAE,CAAC;AAE1D;;GAEG;AACI,MAAM,yBAAyB,GAAG,GAA2B,EAAE,CACpE,sBAAsB,CAAC;AADZ,QAAA,yBAAyB,6BACb;AAEzB;;;GAGG;AACI,MAAM,wBAAwB,GAAG,CACtC,UAAkB,EACE,EAAE,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAF/C,QAAA,wBAAwB,4BAEuB;AAE5D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,+BAA+B,CAC7C,IAAmC;IAEnC,OAAO,CACL,SAA4C,EACpB,EAAE;QAC1B,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,sBAAsB,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;iBACpD;YACH,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,sBAAsB,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC;AAhBD,0EAgBC"}
1
+ {"version":3,"file":"localization-generator.js","sourceRoot":"","sources":["../../../src/localization/helpers/localization-generator.ts"],"names":[],"mappings":"AAaA,MAAM,sBAAsB,GAA2B,EAAE,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAA2B,EAAE,CACpE,sBAAsB,CAAC;AAEzB;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,UAAkB,EACE,EAAE,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,+BAA+B,CAC7C,IAAmC;IAEnC,OAAO,CACL,SAA4C,EACpB,EAAE;QAC1B,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,sBAAsB,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;iBACpD;YACH,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,sBAAsB,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC"}
@@ -1,19 +1,3 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./helpers"), exports);
18
- __exportStar(require("./types"), exports);
1
+ export * from './helpers';
2
+ export * from './types';
19
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/localization/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/localization/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
@@ -1,18 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./localization-generator"), exports);
1
+ export * from './localization-generator';
18
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/localization/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/localization/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=localization-generator.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axinom/mosaic-managed-workflow-integration",
3
- "version": "0.1.3-rc.9",
3
+ "version": "0.1.4-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,12 +23,24 @@
23
23
  "lint": "eslint . --ext .ts,.tsx,.js --color --cache"
24
24
  },
25
25
  "devDependencies": {
26
+ "@axinom/mosaic-portal": "^0.18.0-rc.0",
27
+ "@axinom/mosaic-ui": "^0.34.0-rc.0",
28
+ "@types/react": "^17",
29
+ "@types/react-dom": "^17",
26
30
  "eslint": "^8.35.0",
31
+ "react": "^17.0.2",
32
+ "react-dom": "^17.0.2",
27
33
  "rimraf": "^3.0.2",
28
34
  "typescript": "^5.0.4"
29
35
  },
36
+ "peerDependencies": {
37
+ "@axinom/mosaic-portal": "*",
38
+ "@axinom/mosaic-ui": "workspace:^",
39
+ "react": ">=17.0.1",
40
+ "react-dom": ">=17.0.1"
41
+ },
30
42
  "publishConfig": {
31
43
  "access": "public"
32
44
  },
33
- "gitHead": "7c7271e1c257693a5459d96f7c42767770572fd9"
45
+ "gitHead": "a62a9adac583099cd318f914b1cdeb2d3d84cc63"
34
46
  }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+
3
+ export const extensionDefaultValue = (): JSX.Element => (
4
+ <div>Extension not Loaded</div>
5
+ );
@@ -0,0 +1,3 @@
1
+ export * from './default-extension-value';
2
+ export * from './models';
3
+ export * from './piral-extensions';
@@ -0,0 +1,18 @@
1
+ /** All built-in and custom scalars, mapped to their actual values */
2
+ interface Scalars {
3
+ /** A universally unique identifier as defined by [RFC 4122](https://tools.ietf.org/html/rfc4122). */
4
+ UUID: any;
5
+ /** A floating point number that requires more precision than IEEE 754 binary 64 */
6
+ BigFloat: any;
7
+ /**
8
+ * A point in time as described by the [ISO
9
+ * 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. May or may not include a timezone.
10
+ */
11
+ Datetime: any;
12
+ }
13
+
14
+ export type Datetime = Scalars['Datetime'];
15
+
16
+ export type BigFloat = Scalars['BigFloat'];
17
+
18
+ export type ID = Scalars['UUID'];
@@ -0,0 +1,15 @@
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
+ }
@@ -0,0 +1,51 @@
1
+ import { PiletApi } from '@axinom/mosaic-portal';
2
+ import React from 'react';
3
+ import { extensionDefaultValue } from '../common/default-extension-value';
4
+ import {
5
+ ImageCoverProps,
6
+ ImageExtensions,
7
+ ImagePreviewProps,
8
+ ImageSelectExplorerProps,
9
+ ImageSelectFieldProps,
10
+ } from './types';
11
+
12
+ export const bindImageExtensions = (app: PiletApi): ImageExtensions => {
13
+ const ImageCover: React.FC<ImageCoverProps> = (props) => (
14
+ <app.Extension
15
+ name="image-cover"
16
+ empty={extensionDefaultValue}
17
+ params={props}
18
+ />
19
+ );
20
+
21
+ const ImageSelectExplorer: React.FC<ImageSelectExplorerProps> = (props) => (
22
+ <app.Extension
23
+ name="image-select-explorer"
24
+ empty={extensionDefaultValue}
25
+ params={props}
26
+ />
27
+ );
28
+
29
+ const ImageSelectField: React.FC<ImageSelectFieldProps> = (props) => (
30
+ <app.Extension
31
+ name="image-select-field"
32
+ empty={extensionDefaultValue}
33
+ params={props}
34
+ />
35
+ );
36
+
37
+ const ImagePreview: React.FC<ImagePreviewProps> = (props) => (
38
+ <app.Extension
39
+ name="image-preview"
40
+ empty={extensionDefaultValue}
41
+ params={props}
42
+ />
43
+ );
44
+
45
+ return {
46
+ ImageCover,
47
+ ImagePreview,
48
+ ImageSelectExplorer,
49
+ ImageSelectField,
50
+ };
51
+ };
@@ -0,0 +1,3 @@
1
+ export * from './image-extensions';
2
+ export * from './thumbnail-renderer';
3
+ export * from './types';
@@ -0,0 +1,30 @@
1
+ import { PiletApi } from '@axinom/mosaic-portal';
2
+ import { ColumnMap, ColumnRenderer, Data } from '@axinom/mosaic-ui';
3
+ import React from 'react';
4
+
5
+ const thumbnailFallback = (
6
+ _thumbnailProperty: keyof Data,
7
+ _map?: ColumnMap,
8
+ ): ColumnRenderer<Data> => {
9
+ const ThumbnailFallbackRenderer = (
10
+ _state: unknown,
11
+ _data: unknown,
12
+ ): JSX.Element => {
13
+ return <span title="No Renderer">No Renderer</span>;
14
+ };
15
+ return ThumbnailFallbackRenderer;
16
+ };
17
+
18
+ export let getThumbnailAndStateRenderer = (): ((
19
+ _thumbnailProperty: keyof Data,
20
+ _map?: ColumnMap,
21
+ ) => ColumnRenderer<Data>) => thumbnailFallback;
22
+
23
+ /**
24
+ * Initializes the getThumbnailAndStateRenderer function.
25
+ * @param app The PiletApi object.
26
+ */
27
+ export function setGetThumbnailAndStateRenderer(app: PiletApi): void {
28
+ getThumbnailAndStateRenderer = () =>
29
+ app.getData('thumbnailAndStateRenderer') ?? thumbnailFallback;
30
+ }
@@ -0,0 +1,4 @@
1
+ export interface ImageCoverProps {
2
+ /** Image Id */
3
+ id: string;
4
+ }
@@ -0,0 +1,49 @@
1
+ import { FilterValues } from '@axinom/mosaic-ui';
2
+ import { BigFloat, Datetime, ID } from '../../common';
3
+
4
+ export interface ImageSelectExplorerProps {
5
+ /** Optional Title shown in page header (default: 'Images') */
6
+ title?: string;
7
+ /** Whether or not the selection of multiple items is allowed (default: true) */
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 multi-select mode, whether the Select All button will be displayed. This is currently not fully supported. (default: false) */
14
+ enableSelectAll?: boolean;
15
+ /** Image Type */
16
+ imageType?: string;
17
+ /** A set of initial filter values which the Explorer will use. (default: empty) */
18
+ predefinedFilterValues?: FilterValues<ImageData>;
19
+ /**
20
+ * Callback called when the user finished the selection.
21
+ * The IDs of the selected item (or items) will be passed as argument to the callback.
22
+ */
23
+ onSelected: (value: ID[]) => void;
24
+ /** Callback called when the user cancels the selection */
25
+ onCancel?: () => void;
26
+ }
27
+
28
+ export interface ImageData {
29
+ id: ID;
30
+ thumbnailPath: string;
31
+ title: string;
32
+ sourceFileName: string;
33
+ sourceFileType: string;
34
+ focalX?: BigFloat;
35
+ imageTypeKey: string;
36
+ createdDate: Datetime;
37
+ updatedDate: Datetime;
38
+ isArchived: boolean;
39
+ imagesTags: ImageTag[];
40
+ imageType?: ImageType;
41
+ }
42
+
43
+ export interface ImageTag {
44
+ name: string;
45
+ }
46
+
47
+ export interface ImageType {
48
+ title: string;
49
+ }
@@ -0,0 +1,11 @@
1
+ import { ImageCoverProps } from './image-cover-extension';
2
+ import { ImageSelectExplorerProps } from './image-explorer-extension';
3
+ import { ImagePreviewProps } from './image-preview-extension';
4
+ import { ImageSelectFieldProps } from './image-select-field-extension';
5
+
6
+ export interface ImageExtensions {
7
+ ImageCover: React.FC<ImageCoverProps>;
8
+ ImagePreview: React.FC<ImagePreviewProps>;
9
+ ImageSelectExplorer: React.FC<ImageSelectExplorerProps>;
10
+ ImageSelectField: React.FC<ImageSelectFieldProps>;
11
+ }
@@ -0,0 +1,8 @@
1
+ import { ImageLoaderProps } from '@axinom/mosaic-ui';
2
+
3
+ export interface ImagePreviewProps extends Omit<ImageLoaderProps, 'imgSrc'> {
4
+ /** Image Id */
5
+ id?: string | null;
6
+ /** Whether to render a full size preview image or a thumbnail. default('preview') */
7
+ type?: 'preview' | 'thumbnail';
8
+ }
@@ -0,0 +1,19 @@
1
+ import { BaseFormControl, BaseInputEvents } from '@axinom/mosaic-ui';
2
+ import { ID } from '../../common';
3
+
4
+ export interface ImageSelectFieldProps
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
+ /** Image's scope for filtering images by its type */
14
+ imageScope?: string;
15
+ /** Raised when the value has changed */
16
+ onChange: (event: unknown) => void;
17
+ /** Default tag to filter results by */
18
+ defaultFilterTag?: string;
19
+ }
@@ -0,0 +1,5 @@
1
+ export * from './image-cover-extension';
2
+ export * from './image-explorer-extension';
3
+ export * from './image-extensions';
4
+ export * from './image-preview-extension';
5
+ export * from './image-select-field-extension';
package/src/index.ts CHANGED
@@ -1 +1,3 @@
1
+ export * from './common';
2
+ export * from './image';
1
3
  export * from './localization';