@visns-studio/visns-components 5.11.6 → 5.11.7

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/package.json CHANGED
@@ -87,7 +87,7 @@
87
87
  "react-dom": "^17.0.0 || ^18.0.0"
88
88
  },
89
89
  "name": "@visns-studio/visns-components",
90
- "version": "5.11.6",
90
+ "version": "5.11.7",
91
91
  "description": "Various packages to assist in the development of our Custom Applications.",
92
92
  "main": "src/index.js",
93
93
  "files": [
@@ -201,6 +201,43 @@
201
201
  }
202
202
  }
203
203
 
204
+ /* Compact HTML content styling for proposal preview */
205
+ .proposalPreview h1,
206
+ .proposalPreview h2,
207
+ .proposalPreview h3,
208
+ .proposalPreview h4,
209
+ .proposalPreview h5,
210
+ .proposalPreview h6 {
211
+ font-size: 0.95rem !important;
212
+ line-height: 1.2 !important;
213
+ margin: 0 0 0.5rem 0 !important;
214
+ font-weight: 600;
215
+ color: #374151 !important;
216
+ }
217
+
218
+ .proposalPreview p {
219
+ font-size: 0.875rem !important;
220
+ line-height: 1.4 !important;
221
+ margin: 0 0 0.5rem 0 !important;
222
+ color: #374151 !important;
223
+ }
224
+
225
+ .proposalPreview ul,
226
+ .proposalPreview ol {
227
+ font-size: 0.875rem !important;
228
+ line-height: 1.4 !important;
229
+ margin: 0 0 0.5rem 1rem !important;
230
+ padding: 0;
231
+ color: #374151 !important;
232
+ }
233
+
234
+ .proposalPreview li {
235
+ margin: 0 !important;
236
+ padding: 0 !important;
237
+ font-size: 0.875rem !important;
238
+ line-height: 1.4 !important;
239
+ }
240
+
204
241
  .grid {
205
242
  width: 100%;
206
243
  display: flex;
@@ -218,6 +218,43 @@
218
218
  color: #374151;
219
219
  }
220
220
 
221
+ /* Compact HTML content styling for proposal previews */
222
+ .proposal-preview-prose h1,
223
+ .proposal-preview-prose h2,
224
+ .proposal-preview-prose h3,
225
+ .proposal-preview-prose h4,
226
+ .proposal-preview-prose h5,
227
+ .proposal-preview-prose h6 {
228
+ font-size: 0.95rem !important;
229
+ line-height: 1.2 !important;
230
+ margin: 0 0 0.5rem 0 !important;
231
+ font-weight: 600;
232
+ color: #374151 !important;
233
+ }
234
+
235
+ .proposal-preview-prose p {
236
+ font-size: 0.875rem !important;
237
+ line-height: 1.4 !important;
238
+ margin: 0 0 0.5rem 0 !important;
239
+ color: #374151 !important;
240
+ }
241
+
242
+ .proposal-preview-prose ul,
243
+ .proposal-preview-prose ol {
244
+ font-size: 0.875rem !important;
245
+ line-height: 1.4 !important;
246
+ margin: 0 0 0.5rem 1rem !important;
247
+ padding: 0;
248
+ color: #374151 !important;
249
+ }
250
+
251
+ .proposal-preview-prose li {
252
+ margin: 0 !important;
253
+ padding: 0 !important;
254
+ font-size: 0.875rem !important;
255
+ line-height: 1.4 !important;
256
+ }
257
+
221
258
  .proposal-preview-section {
222
259
  border-bottom: 1px solid #f3f4f6;
223
260
  padding-bottom: 1.5rem;
@@ -242,6 +279,43 @@
242
279
  line-height: 1.6;
243
280
  }
244
281
 
282
+ /* Compact HTML content styling for individual section content */
283
+ .proposal-preview-section-content h1,
284
+ .proposal-preview-section-content h2,
285
+ .proposal-preview-section-content h3,
286
+ .proposal-preview-section-content h4,
287
+ .proposal-preview-section-content h5,
288
+ .proposal-preview-section-content h6 {
289
+ font-size: 0.95rem !important;
290
+ line-height: 1.2 !important;
291
+ margin: 0 0 0.5rem 0 !important;
292
+ font-weight: 600;
293
+ color: #4b5563 !important;
294
+ }
295
+
296
+ .proposal-preview-section-content p {
297
+ font-size: 0.875rem !important;
298
+ line-height: 1.4 !important;
299
+ margin: 0 0 0.5rem 0 !important;
300
+ color: #4b5563 !important;
301
+ }
302
+
303
+ .proposal-preview-section-content ul,
304
+ .proposal-preview-section-content ol {
305
+ font-size: 0.875rem !important;
306
+ line-height: 1.4 !important;
307
+ margin: 0 0 0.5rem 1rem !important;
308
+ padding: 0;
309
+ color: #4b5563 !important;
310
+ }
311
+
312
+ .proposal-preview-section-content li {
313
+ margin: 0 !important;
314
+ padding: 0 !important;
315
+ font-size: 0.875rem !important;
316
+ line-height: 1.4 !important;
317
+ }
318
+
245
319
  .proposal-preview-empty {
246
320
  text-align: center;
247
321
  padding: 3rem 1rem;
@@ -100,7 +100,13 @@ const ProposalTemplatePreview = ({
100
100
 
101
101
  const data = await response.json();
102
102
  if (data.success) {
103
- setPreviewData(data.data);
103
+ // Ensure variables_used exists, fallback to client-side extraction
104
+ const responseData = {
105
+ ...data.data,
106
+ variables_used: data.data.variables_used || extractVariablesFromSections(data.data.sections || [])
107
+ };
108
+
109
+ setPreviewData(responseData);
104
110
  } else {
105
111
  throw new Error(data.message || 'Failed to load preview');
106
112
  }
@@ -145,20 +145,37 @@
145
145
  .section-content-preview h1,
146
146
  .section-content-preview h2,
147
147
  .section-content-preview h3,
148
- .section-content-preview h4 {
149
- margin: 0 0 0.25rem 0;
150
- font-size: 0.875rem;
148
+ .section-content-preview h4,
149
+ .section-content-preview h5,
150
+ .section-content-preview h6 {
151
+ font-size: 0.8rem !important;
152
+ line-height: 1.1 !important;
153
+ margin: 0 0 0.125rem 0 !important;
151
154
  font-weight: 600;
155
+ color: #475569 !important;
152
156
  }
153
157
 
154
158
  .section-content-preview p {
155
- margin: 0 0 0.25rem 0;
159
+ font-size: 0.75rem !important;
160
+ line-height: 1.2 !important;
161
+ margin: 0 0 0.125rem 0 !important;
162
+ color: #475569 !important;
156
163
  }
157
164
 
158
165
  .section-content-preview ul,
159
166
  .section-content-preview ol {
160
- margin: 0 0 0.25rem 1rem;
167
+ font-size: 0.75rem !important;
168
+ line-height: 1.2 !important;
169
+ margin: 0 0 0.125rem 1rem !important;
161
170
  padding: 0;
171
+ color: #475569 !important;
172
+ }
173
+
174
+ .section-content-preview li {
175
+ margin: 0 !important;
176
+ padding: 0 !important;
177
+ font-size: 0.75rem !important;
178
+ line-height: 1.2 !important;
162
179
  }
163
180
 
164
181
  .section-no-content {
@@ -247,23 +247,78 @@
247
247
  color: #374151;
248
248
  }
249
249
 
250
+ /* Compact HTML content styling for section editor preview */
250
251
  .section-editor-preview .prose h1,
251
252
  .section-editor-preview .prose h2,
252
253
  .section-editor-preview .prose h3,
253
- .section-editor-preview .prose h4 {
254
- color: #1f2937;
255
- margin-top: 0;
256
- margin-bottom: 0.5rem;
254
+ .section-editor-preview .prose h4,
255
+ .section-editor-preview .prose h5,
256
+ .section-editor-preview .prose h6 {
257
+ font-size: 0.95rem !important;
258
+ line-height: 1.2 !important;
259
+ margin: 0 0 0.5rem 0 !important;
260
+ font-weight: 600;
261
+ color: #1f2937 !important;
257
262
  }
258
263
 
259
264
  .section-editor-preview .prose p {
260
- margin-bottom: 0.75rem;
265
+ font-size: 0.875rem !important;
266
+ line-height: 1.4 !important;
267
+ margin: 0 0 0.5rem 0 !important;
268
+ color: #374151 !important;
261
269
  }
262
270
 
263
271
  .section-editor-preview .prose ul,
264
272
  .section-editor-preview .prose ol {
265
- margin-bottom: 0.75rem;
266
- padding-left: 1.5rem;
273
+ font-size: 0.875rem !important;
274
+ line-height: 1.4 !important;
275
+ margin: 0 0 0.5rem 1rem !important;
276
+ padding: 0;
277
+ color: #374151 !important;
278
+ }
279
+
280
+ .section-editor-preview .prose li {
281
+ margin: 0 !important;
282
+ padding: 0 !important;
283
+ font-size: 0.875rem !important;
284
+ line-height: 1.4 !important;
285
+ }
286
+
287
+ /* Also apply to direct preview content without prose class */
288
+ .section-editor-preview h1,
289
+ .section-editor-preview h2,
290
+ .section-editor-preview h3,
291
+ .section-editor-preview h4,
292
+ .section-editor-preview h5,
293
+ .section-editor-preview h6 {
294
+ font-size: 0.95rem !important;
295
+ line-height: 1.2 !important;
296
+ margin: 0 0 0.5rem 0 !important;
297
+ font-weight: 600;
298
+ color: #1f2937 !important;
299
+ }
300
+
301
+ .section-editor-preview p {
302
+ font-size: 0.875rem !important;
303
+ line-height: 1.4 !important;
304
+ margin: 0 0 0.5rem 0 !important;
305
+ color: #374151 !important;
306
+ }
307
+
308
+ .section-editor-preview ul,
309
+ .section-editor-preview ol {
310
+ font-size: 0.875rem !important;
311
+ line-height: 1.4 !important;
312
+ margin: 0 0 0.5rem 1rem !important;
313
+ padding: 0;
314
+ color: #374151 !important;
315
+ }
316
+
317
+ .section-editor-preview li {
318
+ margin: 0 !important;
319
+ padding: 0 !important;
320
+ font-size: 0.875rem !important;
321
+ line-height: 1.4 !important;
267
322
  }
268
323
 
269
324
  .section-editor-styling-panel {