@visns-studio/visns-components 5.15.3 → 5.15.4
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
CHANGED
|
@@ -3660,13 +3660,23 @@ All existing GenericQuote functionality remains unchanged:
|
|
|
3660
3660
|
|
|
3661
3661
|
Proposal features are **opt-in** and activated only when `proposalConfig.enabled: true` is set.
|
|
3662
3662
|
|
|
3663
|
-
**Recent Improvements (v5.15.3):**
|
|
3663
|
+
**Recent Improvements (v5.15.3 & 2025 Updates):**
|
|
3664
3664
|
- **StandardModal Integration**: Replaced reactjs-popup with StandardModal for consistent modal behavior and better maintainability
|
|
3665
3665
|
- **HTML Content Rendering**: Terms and conditions now support rich HTML content from TinyMCE editors with proper parsing via `html-react-parser`
|
|
3666
3666
|
- **Typography Optimization**: Refined font sizing (14px desktop, 12px mobile) for better visual hierarchy and page consistency
|
|
3667
3667
|
- **Enhanced Styling**: Improved CSS for HTML elements including lists, paragraphs, and formatted text in terms sections
|
|
3668
3668
|
- **Complete Modal Consistency**: All modals throughout the library now use the same StandardModal component
|
|
3669
3669
|
|
|
3670
|
+
**Latest 2025 Enhancements:**
|
|
3671
|
+
- **Enhanced Content Editor Modal**: Increased modal dimensions (98% width, 95% height) for better TinyMCE integration
|
|
3672
|
+
- **Streamlined Section Management**: Removed unnecessary section type selector from Edit Proposal Content modal
|
|
3673
|
+
- **Maximized Editor Space**: TinyMCE editor height increased from 400px to 500px with improved container sizing
|
|
3674
|
+
- **Dynamic Template Integration**: Template section titles now properly populate from backend configuration instead of hardcoded values
|
|
3675
|
+
- **Improved Content Flow**: Fixed proposal content insertion ensuring custom content appears correctly in generated PDFs
|
|
3676
|
+
- **Professional PDF Layout**: Enhanced margin handling with 40px/50px margins for all sections (except cover page preservation)
|
|
3677
|
+
- **Branding Color System**: Automatic application of branding profile colors (H1=primary, H2=secondary, H3=accent)
|
|
3678
|
+
- **Robust PDF Generation**: Improved error handling and blank page prevention during proposal PDF creation
|
|
3679
|
+
|
|
3670
3680
|
**Advanced Usage Example:**
|
|
3671
3681
|
|
|
3672
3682
|
```jsx
|
package/package.json
CHANGED
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
91
91
|
},
|
|
92
92
|
"name": "@visns-studio/visns-components",
|
|
93
|
-
"version": "5.15.
|
|
93
|
+
"version": "5.15.4",
|
|
94
94
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
95
95
|
"main": "src/index.js",
|
|
96
96
|
"files": [
|
|
@@ -87,7 +87,6 @@ function GenericQuote({ logo, setting, urlParam, proposalConfig = null }) {
|
|
|
87
87
|
// Content editor state
|
|
88
88
|
const [showContentEditor, setShowContentEditor] = useState(false);
|
|
89
89
|
const [proposalContent, setProposalContent] = useState('');
|
|
90
|
-
const [contentSectionType, setContentSectionType] = useState('content');
|
|
91
90
|
|
|
92
91
|
// Modal state variables
|
|
93
92
|
const [modalShow, setModalShow] = useState(false);
|
|
@@ -1030,8 +1029,7 @@ function GenericQuote({ logo, setting, urlParam, proposalConfig = null }) {
|
|
|
1030
1029
|
`/ajax/quotes/${data.id}/proposal-content`,
|
|
1031
1030
|
'POST',
|
|
1032
1031
|
{
|
|
1033
|
-
content: proposalContent
|
|
1034
|
-
section_type: contentSectionType
|
|
1032
|
+
content: proposalContent
|
|
1035
1033
|
}
|
|
1036
1034
|
);
|
|
1037
1035
|
|
|
@@ -1570,22 +1568,6 @@ function GenericQuote({ logo, setting, urlParam, proposalConfig = null }) {
|
|
|
1570
1568
|
</button>
|
|
1571
1569
|
</div>
|
|
1572
1570
|
<div className={styles.contentEditorBody}>
|
|
1573
|
-
<div className={styles.editorSection}>
|
|
1574
|
-
<label className={styles.editorLabel}>
|
|
1575
|
-
<Settings size={16} />
|
|
1576
|
-
Section Type:
|
|
1577
|
-
<select
|
|
1578
|
-
value={contentSectionType}
|
|
1579
|
-
onChange={(e) => setContentSectionType(e.target.value)}
|
|
1580
|
-
className={styles.sectionTypeSelect}
|
|
1581
|
-
>
|
|
1582
|
-
<option value="content">Content Section</option>
|
|
1583
|
-
<option value="overview">Overview Section</option>
|
|
1584
|
-
<option value="solution">Solution Section</option>
|
|
1585
|
-
<option value="benefits">Benefits Section</option>
|
|
1586
|
-
</select>
|
|
1587
|
-
</label>
|
|
1588
|
-
</div>
|
|
1589
1571
|
<div className={styles.editorContainer}>
|
|
1590
1572
|
<Editor
|
|
1591
1573
|
apiKey="qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc"
|
|
@@ -1593,7 +1575,7 @@ function GenericQuote({ logo, setting, urlParam, proposalConfig = null }) {
|
|
|
1593
1575
|
onEditorChange={handleContentChange}
|
|
1594
1576
|
init={{
|
|
1595
1577
|
height: '100%',
|
|
1596
|
-
min_height:
|
|
1578
|
+
min_height: 500,
|
|
1597
1579
|
resize: false,
|
|
1598
1580
|
menubar: true,
|
|
1599
1581
|
plugins: [
|
|
@@ -246,10 +246,10 @@
|
|
|
246
246
|
background: white;
|
|
247
247
|
border-radius: 12px;
|
|
248
248
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
|
|
249
|
-
width:
|
|
250
|
-
max-width:
|
|
251
|
-
height:
|
|
252
|
-
max-height:
|
|
249
|
+
width: 98%;
|
|
250
|
+
max-width: 1600px;
|
|
251
|
+
height: 95vh;
|
|
252
|
+
max-height: 95vh;
|
|
253
253
|
display: flex;
|
|
254
254
|
flex-direction: column;
|
|
255
255
|
overflow: hidden;
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
|
|
314
314
|
.contentEditorBody {
|
|
315
315
|
flex: 1;
|
|
316
|
-
padding:
|
|
316
|
+
padding: 12px;
|
|
317
317
|
overflow: hidden;
|
|
318
318
|
background: var(--tertiary-color);
|
|
319
319
|
display: flex;
|
|
@@ -374,7 +374,8 @@
|
|
|
374
374
|
flex: 1; /* Take all remaining space */
|
|
375
375
|
display: flex;
|
|
376
376
|
flex-direction: column;
|
|
377
|
-
min-height:
|
|
377
|
+
min-height: 500px; /* Ensure minimum height for editor */
|
|
378
|
+
height: 100%; /* Fill available height */
|
|
378
379
|
|
|
379
380
|
/* TinyMCE overrides */
|
|
380
381
|
:global(.tox-tinymce) {
|