@visns-studio/visns-components 3.8.2 → 3.8.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.
@@ -246,6 +246,11 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
246
246
 
247
247
  // Modify Validation for Label and Description based on Type
248
248
  if (field.type === 'plaintext') {
249
+ // For other types, label is required
250
+ if (!field.label || field.label === '') {
251
+ errors.push('Please enter a label for the field.');
252
+ }
253
+
249
254
  // For plaintext or plaintextheading, description is required
250
255
  if (!field.description || field.description === '') {
251
256
  errors.push('Please enter a description for the field.');
@@ -900,7 +905,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
900
905
  }}
901
906
  />
902
907
  <span className="fi__span prefocus">
903
- Description
908
+ Description *
904
909
  </span>
905
910
  </label>
906
911
  </div>
@@ -230,10 +230,10 @@ function GenericIndex({ layout = 'full', setting, userProfile }) {
230
230
  }
231
231
  }, [config, renderTable]);
232
232
 
233
- const renderContent = useCallback(
234
- () => (
235
- <>
236
- {subnav?.length > 0 && (
233
+ const renderContent = useCallback(() => {
234
+ if (subnav?.length > 0) {
235
+ return (
236
+ <div className="grid__subrow">
237
237
  <div
238
238
  className={`grid__${
239
239
  layout === 'full' ? 'subnav' : 'full'
@@ -246,18 +246,17 @@ function GenericIndex({ layout = 'full', setting, userProfile }) {
246
246
  type={layout}
247
247
  />
248
248
  </div>
249
- )}
250
- <div
251
- className={`grid__${
252
- subnav?.length > 0 ? 'subcontent' : 'full'
253
- }`}
254
- >
255
- {renderContentBasedOnType()}
249
+ <div className="grid__subcontent">
250
+ {renderContentBasedOnType()}
251
+ </div>
256
252
  </div>
257
- </>
258
- ),
259
- [layout, subnav, setSubnav, setConfig, renderTable]
260
- );
253
+ );
254
+ } else {
255
+ return (
256
+ <div className="grid__full">{renderContentBasedOnType()}</div>
257
+ );
258
+ }
259
+ }, [layout, subnav, setSubnav, setConfig, renderTable]);
261
260
 
262
261
  return (
263
262
  <>
@@ -273,8 +272,9 @@ function GenericIndex({ layout = 'full', setting, userProfile }) {
273
272
  </div>
274
273
  </div>
275
274
  </div>
276
- {renderContent()}
277
275
  </div>
276
+
277
+ <div className="grid">{renderContent()}</div>
278
278
  <Outlet />
279
279
  {setting.functions?.checkboxUpdate && (
280
280
  <div className="polActions">
package/package.json CHANGED
@@ -54,7 +54,7 @@
54
54
  "react-dom": "^17.0.1"
55
55
  },
56
56
  "name": "@visns-studio/visns-components",
57
- "version": "3.8.2",
57
+ "version": "3.8.4",
58
58
  "description": "Various packages to assist in the development of our Custom Applications.",
59
59
  "main": "index.js",
60
60
  "scripts": {