@openlettermarketing/olc-react-sdk 2.1.6-beta.17 → 2.1.6-beta.19
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/README.md +0 -6
- package/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/build/types/src/App.d.ts +9 -0
- package/build/types/src/components/TemplateBuilder/index.d.ts +9 -0
- package/build/types/src/components/TopNavigation/ProofApprovalModal/index.d.ts +17 -0
- package/build/types/src/components/TopNavigation/index.d.ts +9 -0
- package/build/types/src/index.d.ts +10 -2
- package/build/types/src/utils/types.d.ts +24 -0
- package/build/types/version.d.ts +1 -1
- package/package.json +1 -1
package/build/types/src/App.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ProofApprovalValue, ProofRevisionValue } from './utils/types';
|
|
2
3
|
interface AppProps {
|
|
3
4
|
secretKey: string;
|
|
4
5
|
platformName?: string | null;
|
|
@@ -24,6 +25,12 @@ interface AppProps {
|
|
|
24
25
|
gsvCost?: number;
|
|
25
26
|
showTemplateTypesPage?: boolean;
|
|
26
27
|
showHireDesignerOption?: boolean;
|
|
28
|
+
showProofActions?: boolean;
|
|
29
|
+
proofApprovalMode?: boolean;
|
|
30
|
+
readOnlyMode?: boolean;
|
|
31
|
+
proofRevision?: ProofRevisionValue;
|
|
32
|
+
proofApproval?: ProofApprovalValue;
|
|
33
|
+
customTemplateQueryId?: string | number;
|
|
27
34
|
currentTheme?: string | null | undefined;
|
|
28
35
|
styles?: any;
|
|
29
36
|
onReturnAndNavigate?: () => void;
|
|
@@ -40,6 +47,8 @@ interface AppProps {
|
|
|
40
47
|
onDeleteQRCodes?: (id: string | number) => Promise<void>;
|
|
41
48
|
onUploadQRCode?: (payload: any) => Promise<any>;
|
|
42
49
|
onEditQRCode?: (payload: any) => Promise<any>;
|
|
50
|
+
onAcceptProof?: (payload: any) => Promise<any>;
|
|
51
|
+
onDenyProof?: (payload: any) => Promise<any>;
|
|
43
52
|
onSubmit?: (payload: any) => Promise<any>;
|
|
44
53
|
}
|
|
45
54
|
declare const App: React.FC<AppProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StoreType } from 'polotno/model/store';
|
|
3
|
+
import { ProofApprovalValue, ProofRevisionValue } from '../../utils/types';
|
|
3
4
|
import './styles.scss';
|
|
4
5
|
/**
|
|
5
6
|
* This code defines a React functional component called `TemplateBuilder` that is responsible for rendering a template builder interface.
|
|
@@ -34,6 +35,12 @@ interface TemplateBuilderProps {
|
|
|
34
35
|
gsvCost?: number;
|
|
35
36
|
selectedTemplateType?: string | null;
|
|
36
37
|
currentTheme?: string | null | undefined;
|
|
38
|
+
showProofActions?: boolean;
|
|
39
|
+
proofApprovalMode?: boolean;
|
|
40
|
+
readOnlyMode?: boolean;
|
|
41
|
+
proofRevision?: ProofRevisionValue;
|
|
42
|
+
proofApproval?: ProofApprovalValue;
|
|
43
|
+
customTemplateQueryId?: string | number;
|
|
37
44
|
onReturnAndNavigate?: () => void;
|
|
38
45
|
onGetCustomFields?: () => Promise<any>;
|
|
39
46
|
onDuplicateTemplate?: (payload: any) => Promise<any>;
|
|
@@ -48,6 +55,8 @@ interface TemplateBuilderProps {
|
|
|
48
55
|
onDeleteQRCodes?: (id: string | number) => Promise<void>;
|
|
49
56
|
onUploadQRCode?: (payload: any) => Promise<any>;
|
|
50
57
|
onEditQRCode?: (payload: any) => Promise<any>;
|
|
58
|
+
onAcceptProof?: (payload: any) => Promise<any>;
|
|
59
|
+
onDenyProof?: (payload: any) => Promise<any>;
|
|
51
60
|
}
|
|
52
61
|
declare const TemplateBuilder: React.FC<TemplateBuilderProps>;
|
|
53
62
|
export default TemplateBuilder;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProofRevisionValue } from '../../../utils/types';
|
|
3
|
+
import './styles.scss';
|
|
4
|
+
export interface ProofDenyFormValues {
|
|
5
|
+
reason: string;
|
|
6
|
+
files: File[];
|
|
7
|
+
}
|
|
8
|
+
interface ProofApprovalModalProps {
|
|
9
|
+
open: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
currentTheme?: string | null | undefined;
|
|
12
|
+
revision?: ProofRevisionValue;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
onSubmit?: (values: ProofDenyFormValues) => Promise<boolean | void | any>;
|
|
15
|
+
}
|
|
16
|
+
declare const ProofApprovalModal: React.FC<ProofApprovalModalProps>;
|
|
17
|
+
export default ProofApprovalModal;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ProofActionPayload, ProofApprovalValue, ProofRevisionValue } from '../../utils/types';
|
|
2
3
|
import './styles.scss';
|
|
3
4
|
interface TopNavigationProps {
|
|
4
5
|
store: any;
|
|
@@ -10,8 +11,16 @@ interface TopNavigationProps {
|
|
|
10
11
|
allowedAddOns?: any;
|
|
11
12
|
allowAdditionalPage?: boolean;
|
|
12
13
|
currentTheme?: string | null | undefined;
|
|
14
|
+
showProofActions?: boolean;
|
|
15
|
+
proofApprovalMode?: boolean;
|
|
16
|
+
readOnlyMode?: boolean;
|
|
17
|
+
proofRevision?: ProofRevisionValue;
|
|
18
|
+
proofApproval?: ProofApprovalValue;
|
|
19
|
+
customTemplateQueryId?: string | number;
|
|
13
20
|
onDuplicateTemplate?: (payload: any) => Promise<any>;
|
|
14
21
|
onReturnAndNavigate?: () => void;
|
|
22
|
+
onAcceptProof?: (payload: ProofActionPayload) => Promise<any>;
|
|
23
|
+
onDenyProof?: (payload: FormData) => Promise<any>;
|
|
15
24
|
onSubmit?: (payload: any) => Promise<any>;
|
|
16
25
|
}
|
|
17
26
|
declare const TopNavigation: React.FC<TopNavigationProps>;
|
|
@@ -6,7 +6,7 @@ import '@fontsource/inter/600.css';
|
|
|
6
6
|
import '@fontsource/inter/700.css';
|
|
7
7
|
import '@fontsource/inter/800.css';
|
|
8
8
|
import { CustomCSSProperties } from './utils/customStyles';
|
|
9
|
-
import { AddOnTypes, TemplateTypes } from './utils/types';
|
|
9
|
+
import { AddOnTypes, ProofApprovalValue, ProofRevisionValue, TemplateTypes } from './utils/types';
|
|
10
10
|
interface TemplateBuilderProps {
|
|
11
11
|
container: HTMLElement | null;
|
|
12
12
|
secretKey: string;
|
|
@@ -36,6 +36,12 @@ interface TemplateBuilderProps {
|
|
|
36
36
|
qrScanNotificationEnabled?: boolean;
|
|
37
37
|
showTemplateTypesPage?: boolean;
|
|
38
38
|
showHireDesignerOption?: boolean;
|
|
39
|
+
showProofActions?: boolean;
|
|
40
|
+
proofApprovalMode?: boolean;
|
|
41
|
+
readOnlyMode?: boolean;
|
|
42
|
+
proofRevision?: ProofRevisionValue;
|
|
43
|
+
proofApproval?: ProofApprovalValue;
|
|
44
|
+
customTemplateQueryId?: string | number;
|
|
39
45
|
currentTheme?: string | null | undefined;
|
|
40
46
|
onReturnAndNavigate?: () => void;
|
|
41
47
|
onHireDesignerNavigate?: () => void;
|
|
@@ -51,10 +57,12 @@ interface TemplateBuilderProps {
|
|
|
51
57
|
onDeleteQRCodes?: (id: string | number) => Promise<void>;
|
|
52
58
|
onUploadQRCode?: (payload: any) => Promise<any>;
|
|
53
59
|
onEditQRCode?: (payload: any) => Promise<any>;
|
|
60
|
+
onAcceptProof?: (payload: any) => Promise<any>;
|
|
61
|
+
onDenyProof?: (payload: any) => Promise<any>;
|
|
54
62
|
onSubmit?: (payload: any) => Promise<any>;
|
|
55
63
|
styles?: {
|
|
56
64
|
root?: CustomCSSProperties;
|
|
57
65
|
};
|
|
58
66
|
}
|
|
59
|
-
declare const TemplateBuilder: ({ container, secretKey, publicApiKey, platformName, templateGalleryModal, createTemplateRoute, templateBuilderRoute, olcTemplate, designerTemplateQuery, sandbox, allowSenderFields, allowPropertyFields, allowAdditionalPage, showQrScanNotificationFields, defaultQrNotificationEmail, qrScanNotificationEnabled, excludedFields, designerQueryAmount, allowedAddOns, allowedTemplateSections, env, restrictedProducts, disallowedProducts, propertyOfferCost, customPropertyOfferCost, gsvCost, showTemplateTypesPage, showHireDesignerOption, currentTheme, onReturnAndNavigate, onHireDesignerNavigate, onCreateCustomTemplateQuery, onGetOneTemplate, onGetTemplates, onGetCustomFields, onDuplicateTemplate, onGetBrandingImages, onDeleteBrandingImage, onUploadBrandingImage, onGetQRCodes, onDeleteQRCodes, onUploadQRCode, onEditQRCode, onSubmit, styles, }: TemplateBuilderProps) => void;
|
|
67
|
+
declare const TemplateBuilder: ({ container, secretKey, publicApiKey, platformName, templateGalleryModal, createTemplateRoute, templateBuilderRoute, olcTemplate, designerTemplateQuery, sandbox, allowSenderFields, allowPropertyFields, allowAdditionalPage, showQrScanNotificationFields, defaultQrNotificationEmail, qrScanNotificationEnabled, excludedFields, designerQueryAmount, allowedAddOns, allowedTemplateSections, env, restrictedProducts, disallowedProducts, propertyOfferCost, customPropertyOfferCost, gsvCost, showTemplateTypesPage, showHireDesignerOption, showProofActions, proofApprovalMode, readOnlyMode, proofRevision, proofApproval, customTemplateQueryId, currentTheme, onReturnAndNavigate, onHireDesignerNavigate, onCreateCustomTemplateQuery, onGetOneTemplate, onGetTemplates, onGetCustomFields, onDuplicateTemplate, onGetBrandingImages, onDeleteBrandingImage, onUploadBrandingImage, onGetQRCodes, onDeleteQRCodes, onUploadQRCode, onEditQRCode, onAcceptProof, onDenyProof, onSubmit, styles, }: TemplateBuilderProps) => void;
|
|
60
68
|
export default TemplateBuilder;
|
|
@@ -6,3 +6,27 @@ export type AddOnTypes = {
|
|
|
6
6
|
export type TemplateTypes = {
|
|
7
7
|
[key in TemplateTypesValue]?: string;
|
|
8
8
|
};
|
|
9
|
+
export type ProofRevisionValue = string | number | {
|
|
10
|
+
currentRevision?: string | number;
|
|
11
|
+
current_revision?: string | number;
|
|
12
|
+
current?: string | number;
|
|
13
|
+
revision?: string | number;
|
|
14
|
+
totalRevision?: string | number;
|
|
15
|
+
totalRevisions?: string | number;
|
|
16
|
+
total_revision?: string | number;
|
|
17
|
+
total_revisions?: string | number;
|
|
18
|
+
total?: string | number;
|
|
19
|
+
};
|
|
20
|
+
export type ProofActionPayload = {
|
|
21
|
+
templateId?: string | number;
|
|
22
|
+
customTemplateQueryId?: string | number;
|
|
23
|
+
decision?: 'replace' | 'create_new';
|
|
24
|
+
comment?: string;
|
|
25
|
+
};
|
|
26
|
+
export type ProofApprovalValue = {
|
|
27
|
+
status?: string;
|
|
28
|
+
isDeniable?: boolean;
|
|
29
|
+
sourceTemplateId?: string | number | null;
|
|
30
|
+
revisionsCount?: string | number;
|
|
31
|
+
lastAction?: string | null;
|
|
32
|
+
};
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION: "2.1.6-beta.
|
|
1
|
+
export const SDK_VERSION: "2.1.6-beta.19";
|
package/package.json
CHANGED