@openlettermarketing/olc-react-sdk 2.1.6-beta.4 → 2.1.6-beta.5
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/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/build/types/src/utils/message.d.ts +1 -0
- package/build/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/TopNavigation/FieldValidationModal/index.tsx +14 -5
- package/src/components/TopNavigation/FieldValidationModal/styles.scss +49 -3
- package/src/components/TopNavigation/index.tsx +7 -3
- package/src/utils/message.ts +1 -0
- package/version.js +1 -1
|
@@ -140,6 +140,7 @@ export declare const MESSAGES: {
|
|
|
140
140
|
readonly TITLE: "Invalid Fields";
|
|
141
141
|
readonly HEADING: "The following fields are not recognized";
|
|
142
142
|
readonly DESCRIPTION: "The following field(s) used in this template are not recognized by the system. You can save the template as is, but these fields will not populate with data. To resolve this, remove or replace them with valid field names.";
|
|
143
|
+
readonly LIST_REGION_LABEL: "Unrecognized template fields";
|
|
143
144
|
readonly ACKNOWLEDGE_LABEL: "I understand that saving now will preserve these invalid fields, but they will not be populated with data.";
|
|
144
145
|
readonly CONTINUE_BUTTON: "Continue Saving";
|
|
145
146
|
readonly CANCEL_BUTTON: "Cancel";
|
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.5";
|
package/package.json
CHANGED
|
@@ -59,11 +59,20 @@ const FieldValidationModal: React.FC<FieldValidationModalProps> = ({
|
|
|
59
59
|
<p className="field-validation-description">
|
|
60
60
|
{MESSAGES.TEMPLATE.FIELD_VALIDATION.DESCRIPTION}
|
|
61
61
|
</p>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
<div
|
|
63
|
+
className="field-validation-list-scroll"
|
|
64
|
+
role="region"
|
|
65
|
+
aria-label={MESSAGES.TEMPLATE.FIELD_VALIDATION.LIST_REGION_LABEL}
|
|
66
|
+
>
|
|
67
|
+
<ul className="field-validation-list">
|
|
68
|
+
{invalidFields.map((field, index) => (
|
|
69
|
+
<li key={`${field}-${index}`}>
|
|
70
|
+
<span className="field-validation-list-index">{index + 1}.</span>
|
|
71
|
+
<span className="field-validation-list-text">{field}</span>
|
|
72
|
+
</li>
|
|
73
|
+
))}
|
|
74
|
+
</ul>
|
|
75
|
+
</div>
|
|
67
76
|
<label
|
|
68
77
|
className="field-validation-acknowledge"
|
|
69
78
|
onClick={() => setAcknowledged((prev) => !prev)}
|
|
@@ -14,21 +14,67 @@
|
|
|
14
14
|
padding: 0;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// Scroll only the list; keep markers visible for 10+ (outside markers need horizontal room —
|
|
18
|
+
// overflow-x: hidden was clipping two-digit list numbers to "0", "1", "2").
|
|
19
|
+
.field-validation-list-scroll {
|
|
20
|
+
max-height: min(40vh, 280px);
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
overscroll-behavior: contain;
|
|
18
23
|
margin: 0 0 16px 0;
|
|
19
|
-
padding-
|
|
24
|
+
padding-right: 6px;
|
|
25
|
+
padding-left: 4px;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
|
|
28
|
+
// Match the SDK-wide scrollbar (same variables used in .builder-wrapper and Polotno panels)
|
|
29
|
+
scrollbar-width: thin;
|
|
30
|
+
scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
|
|
31
|
+
|
|
32
|
+
&::-webkit-scrollbar {
|
|
33
|
+
width: 10px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&::-webkit-scrollbar-track {
|
|
37
|
+
background: var(--scrollbar-track-color);
|
|
38
|
+
border-radius: 3px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&::-webkit-scrollbar-thumb {
|
|
42
|
+
background: var(--scrollbar-thumb-color);
|
|
43
|
+
border-radius: 3px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.field-validation-list {
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
list-style: none;
|
|
20
51
|
|
|
21
52
|
li {
|
|
53
|
+
display: flex;
|
|
54
|
+
gap: 6px;
|
|
55
|
+
align-items: flex-start;
|
|
22
56
|
font-size: 16px;
|
|
23
57
|
font-weight: 400;
|
|
24
58
|
color: var(--text-color);
|
|
25
59
|
line-height: 20px;
|
|
26
60
|
margin-bottom: 6px;
|
|
27
|
-
word-break: break-all;
|
|
28
61
|
font-family: var(--font-family);
|
|
29
62
|
}
|
|
30
63
|
}
|
|
31
64
|
|
|
65
|
+
.field-validation-list-index {
|
|
66
|
+
flex-shrink: 0;
|
|
67
|
+
min-width: 1.75rem;
|
|
68
|
+
text-align: right;
|
|
69
|
+
font-variant-numeric: tabular-nums;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.field-validation-list-text {
|
|
73
|
+
flex: 1;
|
|
74
|
+
min-width: 0;
|
|
75
|
+
word-break: break-all;
|
|
76
|
+
}
|
|
77
|
+
|
|
32
78
|
.field-validation-acknowledge {
|
|
33
79
|
display: flex;
|
|
34
80
|
align-items: flex-start;
|
|
@@ -430,10 +430,14 @@ const TopNavigation: React.FC<TopNavigationProps> = ({
|
|
|
430
430
|
}
|
|
431
431
|
};
|
|
432
432
|
|
|
433
|
-
const handleSave = async (
|
|
433
|
+
const handleSave = async (
|
|
434
|
+
hasFieldsWarnings: boolean = false,
|
|
435
|
+
fieldsWarningsAccepted: boolean = false
|
|
436
|
+
) => {
|
|
434
437
|
try {
|
|
435
438
|
const formData = new FormData();
|
|
436
|
-
formData.append('
|
|
439
|
+
formData.append('has_fields_warnings', String(hasFieldsWarnings));
|
|
440
|
+
formData.append('fields_warnings_accepted', String(fieldsWarningsAccepted));
|
|
437
441
|
const allFields = [
|
|
438
442
|
...defaultFields,
|
|
439
443
|
...customFields,
|
|
@@ -579,7 +583,7 @@ const TopNavigation: React.FC<TopNavigationProps> = ({
|
|
|
579
583
|
|
|
580
584
|
const handleContinueAnyway = (acknowledged: boolean) => {
|
|
581
585
|
setIsShowModel((prev) => ({ ...prev, loading: true }));
|
|
582
|
-
handleSave(acknowledged);
|
|
586
|
+
handleSave(true, acknowledged);
|
|
583
587
|
};
|
|
584
588
|
|
|
585
589
|
const handleChangeModel = (
|
package/src/utils/message.ts
CHANGED
|
@@ -147,6 +147,7 @@ export const MESSAGES = {
|
|
|
147
147
|
TITLE: "Invalid Fields",
|
|
148
148
|
HEADING: "The following fields are not recognized",
|
|
149
149
|
DESCRIPTION: "The following field(s) used in this template are not recognized by the system. You can save the template as is, but these fields will not populate with data. To resolve this, remove or replace them with valid field names.",
|
|
150
|
+
LIST_REGION_LABEL: "Unrecognized template fields",
|
|
150
151
|
ACKNOWLEDGE_LABEL: "I understand that saving now will preserve these invalid fields, but they will not be populated with data.",
|
|
151
152
|
CONTINUE_BUTTON: "Continue Saving",
|
|
152
153
|
CANCEL_BUTTON: "Cancel",
|
package/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = '2.1.6-beta.
|
|
1
|
+
export const SDK_VERSION = '2.1.6-beta.5';
|