@solidstarters/solid-core-ui 1.1.29 → 1.1.31

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.
Files changed (85) hide show
  1. package/dist/components/auth/AuthLayout.d.ts.map +1 -1
  2. package/dist/components/auth/AuthLayout.js +2 -1
  3. package/dist/components/auth/AuthLayout.js.map +1 -1
  4. package/dist/components/auth/SolidLogin.js +2 -2
  5. package/dist/components/auth/SolidLogin.js.map +1 -1
  6. package/dist/components/auth/SolidRegister.d.ts.map +1 -1
  7. package/dist/components/auth/SolidRegister.js +2 -2
  8. package/dist/components/auth/SolidRegister.js.map +1 -1
  9. package/dist/components/core/common/FilterComponent.d.ts.map +1 -1
  10. package/dist/components/core/common/FilterComponent.js +1 -1
  11. package/dist/components/core/common/FilterComponent.js.map +1 -1
  12. package/dist/components/core/common/SolidConfigureLayoutElement.js +1 -1
  13. package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -1
  14. package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
  15. package/dist/components/core/form/SolidFormView.js +11 -4
  16. package/dist/components/core/form/SolidFormView.js.map +1 -1
  17. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  18. package/dist/components/core/list/SolidListView.js +43 -40
  19. package/dist/components/core/list/SolidListView.js.map +1 -1
  20. package/dist/components/core/model/CreateModel.d.ts.map +1 -1
  21. package/dist/components/core/model/CreateModel.js +1 -1
  22. package/dist/components/core/model/CreateModel.js.map +1 -1
  23. package/dist/components/core/model/FieldMetaData.js +1 -1
  24. package/dist/components/core/model/FieldMetaData.js.map +1 -1
  25. package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
  26. package/dist/components/core/model/FieldMetaDataForm.js +5 -5
  27. package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
  28. package/dist/components/core/model/FieldSelector.js +1 -1
  29. package/dist/components/core/model/FieldSelector.js.map +1 -1
  30. package/dist/components/core/model/ModelMetaData.d.ts.map +1 -1
  31. package/dist/components/core/model/ModelMetaData.js +30 -30
  32. package/dist/components/core/model/ModelMetaData.js.map +1 -1
  33. package/dist/components/core/module/CreateModule.d.ts.map +1 -1
  34. package/dist/components/core/module/CreateModule.js +23 -22
  35. package/dist/components/core/module/CreateModule.js.map +1 -1
  36. package/dist/components/core/users/CreateUser.d.ts.map +1 -1
  37. package/dist/components/core/users/CreateUser.js +13 -14
  38. package/dist/components/core/users/CreateUser.js.map +1 -1
  39. package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
  40. package/dist/components/layout/user-profile-menu.js +1 -1
  41. package/dist/components/layout/user-profile-menu.js.map +1 -1
  42. package/dist/resources/fonts/SF-Pro-Display-Black.otf +0 -0
  43. package/dist/resources/fonts/SF-Pro-Display-Bold.otf +0 -0
  44. package/dist/resources/fonts/SF-Pro-Display-Heavy.otf +0 -0
  45. package/dist/resources/fonts/SF-Pro-Display-Light.otf +0 -0
  46. package/dist/resources/fonts/SF-Pro-Display-Medium.otf +0 -0
  47. package/dist/resources/fonts/SF-Pro-Display-Regular.otf +0 -0
  48. package/dist/resources/fonts/SF-Pro-Display-Semibold.otf +0 -0
  49. package/dist/resources/fonts/SF-Pro-Display-Thin.otf +0 -0
  50. package/dist/resources/fonts/SF-Pro-Display-Ultralight.otf +0 -0
  51. package/dist/resources/globals.css +227 -11
  52. package/dist/resources/solid-primereact.css +2983 -0
  53. package/dist/resources/stylesheets/_main.scss +3 -1
  54. package/dist/resources/themes/solid-dark-purple/theme.css +6082 -0
  55. package/dist/resources/themes/solid-light-purple/theme.css +6124 -0
  56. package/package.json +1 -1
  57. package/src/components/auth/AuthLayout.tsx +11 -2
  58. package/src/components/auth/SolidLogin.tsx +2 -2
  59. package/src/components/auth/SolidRegister.tsx +42 -36
  60. package/src/components/core/common/FilterComponent.tsx +3 -2
  61. package/src/components/core/common/SolidConfigureLayoutElement.tsx +1 -1
  62. package/src/components/core/form/SolidFormView.tsx +26 -7
  63. package/src/components/core/list/SolidListView.tsx +14 -0
  64. package/src/components/core/model/CreateModel.tsx +2 -0
  65. package/src/components/core/model/FieldMetaData.tsx +3 -3
  66. package/src/components/core/model/FieldMetaDataForm.tsx +14 -17
  67. package/src/components/core/model/FieldSelector.tsx +1 -1
  68. package/src/components/core/model/ModelMetaData.tsx +158 -158
  69. package/src/components/core/module/CreateModule.tsx +178 -173
  70. package/src/components/core/users/CreateUser.tsx +123 -120
  71. package/src/components/layout/user-profile-menu.tsx +6 -5
  72. package/src/resources/fonts/SF-Pro-Display-Black.otf +0 -0
  73. package/src/resources/fonts/SF-Pro-Display-Bold.otf +0 -0
  74. package/src/resources/fonts/SF-Pro-Display-Heavy.otf +0 -0
  75. package/src/resources/fonts/SF-Pro-Display-Light.otf +0 -0
  76. package/src/resources/fonts/SF-Pro-Display-Medium.otf +0 -0
  77. package/src/resources/fonts/SF-Pro-Display-Regular.otf +0 -0
  78. package/src/resources/fonts/SF-Pro-Display-Semibold.otf +0 -0
  79. package/src/resources/fonts/SF-Pro-Display-Thin.otf +0 -0
  80. package/src/resources/fonts/SF-Pro-Display-Ultralight.otf +0 -0
  81. package/src/resources/globals.css +227 -11
  82. package/src/resources/solid-primereact.css +2983 -0
  83. package/src/resources/stylesheets/_main.scss +3 -1
  84. package/src/resources/themes/solid-dark-purple/theme.css +6082 -0
  85. package/src/resources/themes/solid-light-purple/theme.css +6124 -0
@@ -11,6 +11,7 @@ import { Divider } from "primereact/divider";
11
11
  import { InputText } from "primereact/inputtext";
12
12
  import { InputTextarea } from "primereact/inputtextarea";
13
13
  import { Message } from "primereact/message";
14
+ import { Panel } from "primereact/panel";
14
15
  import { Toast } from "primereact/toast";
15
16
  import { classNames } from "primereact/utils";
16
17
  import qs from "qs";
@@ -270,10 +271,10 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
270
271
  {/* <div className="form-wrapper-subtitle">Name</div> */}
271
272
  <div className="">
272
273
  <div className="grid formgrid">
273
- <div className="field col-6">
274
- <p className="form-wrapper-heading text-base">Basic Info</p>
275
- <div className="grid formgrid">
276
- <div className="field col-12 flex flex-column gap-2">
274
+ <div className="field col-6 pr-3">
275
+ {/* <p className="form-wrapper-heading text-base">Basic Info</p> */}
276
+ <Panel header={"Basic Info"} className="solid-column-panel">
277
+ <div className="flex flex-column gap-2 mt-3">
277
278
  <label htmlFor="type" className="form-field-label">
278
279
  Module
279
280
  </label>
@@ -296,7 +297,7 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
296
297
  )}
297
298
  </div>
298
299
 
299
- <div className="field col-12 flex flex-column gap-1 mt-4">
300
+ <div className="flex flex-column gap-2 mt-4">
300
301
  <label htmlFor="dataSource" className="form-field-label">
301
302
  Data Source
302
303
  </label>
@@ -315,7 +316,7 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
315
316
  additionalAction={(e: any) => formik.setFieldValue("dataSourceType", e.target.value.type)}
316
317
  formErrors={formErrors}
317
318
  />
318
- {formik.values.dataSourceType && <p className="form-field-label">Your datasource will connect to a {formik.values.dataSourceType} database</p>}
319
+ {formik.values.dataSourceType && <p className="form-field-label text-sm">Your datasource will connect to a {formik.values.dataSourceType} database</p>}
319
320
  {(isFormFieldValid(formik, "dataSource") || (formErrors["dataSource"])) && (
320
321
  <Message severity="error" text={formik?.errors?.dataSource?.toString()} />
321
322
  )}
@@ -355,10 +356,10 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
355
356
  <Message severity="error" text={formik?.errors?.dataSourceType?.toString()} />
356
357
  )}
357
358
  </div>*/}
358
- </div>
359
- <Divider />
360
- <p className="form-wrapper-heading text-base">Configurations</p>
361
- <div className="grid formgrid">
359
+ </Panel>
360
+ {/* <Divider /> */}
361
+ {/* <p className="form-wrapper-heading text-base">Configurations</p> */}
362
+ <Panel header={"Configurations"} className="solid-column-panel mt-5">
362
363
  {/* {params.id === 'new' &&
363
364
 
364
365
  <div className="field col-6">
@@ -382,28 +383,27 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
382
383
  />
383
384
  )}
384
385
  </div>} */}
385
- <div className="field col-6">
386
- <div className="flex align-items-center gap-2">
387
- <Checkbox
388
- name="enableSoftDelete"
389
- onChange={(e) => {
390
- formik.setFieldValue("enableSoftDelete", e.checked);
391
- }}
392
- disabled={params.id !== 'new'}
393
- checked={formik.values.enableSoftDelete}
394
- ></Checkbox>
395
- <label htmlFor="enableSoftDelete" className="form-field-label">
396
- Enable Soft Delete
397
- </label>
398
- </div>
399
- {params.id !== 'new' && <p className="form-field-label">Soft-delete can only be set during initial creation to maintain data integrity</p>}
400
- {(isFormFieldValid(formik, "enableSoftDelete") || (formErrors["enableSoftDelete"])) && (
401
- <Message
402
- severity="error"
403
- text={formik?.errors?.enableSoftDelete?.toString()}
404
- />
405
- )}
386
+ <div className="flex align-items-center gap-2 mt-3">
387
+ <Checkbox
388
+ name="enableSoftDelete"
389
+ onChange={(e) => {
390
+ formik.setFieldValue("enableSoftDelete", e.checked);
391
+ }}
392
+ disabled={params.id !== 'new'}
393
+ checked={formik.values.enableSoftDelete}
394
+ ></Checkbox>
395
+ <label htmlFor="enableSoftDelete" className="form-field-label">
396
+ Enable Soft Delete
397
+ </label>
406
398
  </div>
399
+ {params.id !== 'new' && <p className="form-field-label mt-1 text-sm">Soft-delete can only be set during initial creation to maintain data integrity</p>}
400
+ {(isFormFieldValid(formik, "enableSoftDelete") || (formErrors["enableSoftDelete"])) && (
401
+ <Message
402
+ severity="error"
403
+ text={formik?.errors?.enableSoftDelete?.toString()}
404
+ className="mt-2"
405
+ />
406
+ )}
407
407
  {/* <div className="field col-6">
408
408
  <div className="flex align-items-center gap-2 mt-3">
409
409
  <Checkbox
@@ -503,139 +503,139 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
503
503
  }
504
504
  </div>*/}
505
505
 
506
- </div>
506
+ </Panel>
507
507
 
508
508
  </div>
509
- <div className="field col-6">
509
+ <div className="field col-6 pl-3">
510
510
 
511
- <p className="form-wrapper-heading text-base">Basic Settings</p>
512
- <div className="grid formgrid">
513
- <div className="field col-12 flex flex-column gap-2">
514
- <label htmlFor="displayName" className="form-field-label">
515
- Display Name
516
- </label>
517
- <InputText
518
- type="text"
519
- id="displayName"
520
- name="displayName"
521
- onChange={(e) => {
511
+ {/* <p className="form-wrapper-heading text-base">Basic Settings</p> */}
512
+ <Panel header={"Basic Settings"} className="solid-column-panel">
513
+ <div className="flex flex-column gap-2 mt-3">
514
+ <label htmlFor="displayName" className="form-field-label">
515
+ Display Name
516
+ </label>
517
+ <InputText
518
+ type="text"
519
+ id="displayName"
520
+ name="displayName"
521
+ onChange={(e) => {
522
522
 
523
- formik.handleChange(e);
524
- const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(e.target.value);
525
- if (params.id === 'new') {
526
- formik.setFieldValue("singularName", toCamelCase);
527
- formik.setFieldValue("pluralName", toPluralCamelCase);
528
- }
529
- if (showTableName == true) {
523
+ formik.handleChange(e);
524
+ const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(e.target.value);
530
525
  if (params.id === 'new') {
531
- formik.setFieldValue("tableName", toSnakeCase);
526
+ formik.setFieldValue("singularName", toCamelCase);
527
+ formik.setFieldValue("pluralName", toPluralCamelCase);
528
+ }
529
+ if (showTableName == true) {
530
+ if (params.id === 'new') {
531
+ formik.setFieldValue("tableName", toSnakeCase);
532
+ }
532
533
  }
533
- }
534
534
 
535
535
 
536
- }}
537
- value={formik.values.displayName}
538
- className={classNames("", {
539
- "p-invalid": isFormFieldValid(formik, "displayName") || formErrors["displayName"],
540
- })}
541
-
542
- />
536
+ }}
537
+ value={formik.values.displayName}
538
+ className={classNames("", {
539
+ "p-invalid": isFormFieldValid(formik, "displayName") || formErrors["displayName"],
540
+ })}
543
541
 
544
- {(isFormFieldValid(formik, "displayName") || (formErrors["displayName"])) && (
545
- <Message
546
- severity="error"
547
- text={formik?.errors?.displayName?.toString()}
548
542
  />
549
- )}
550
- </div>
551
- <div className="field col-12 flex flex-column gap-1 mt-4">
552
- <label htmlFor="singularName" className="form-field-label">
553
- Singular Name
554
- </label>
555
- <InputText
556
- disabled={true}
557
- type="text"
558
- id="singularName"
559
- name="singularName"
560
- onChange={formik.handleChange}
561
- value={formik.values.singularName}
562
- className={classNames("", {
563
- "p-invalid": isFormFieldValid(formik, "singularName") || formErrors["singularName"],
564
- })}
565
- />
566
- {(isFormFieldValid(formik, "singularName") || (formErrors["singularName"])) && (
567
- <Message
568
- severity="error"
569
- text={formik?.errors?.singularName?.toString()}
570
- />
571
- )}
572
- </div>
573
- <div className="field col-12 flex flex-column gap-1 mt-4">
574
- <label htmlFor="pluralName" className="form-field-label">
575
- Plural Name
576
- </label>
577
- <InputText
578
- disabled={true}
579
- type="text"
580
- id="pluralName"
581
- name="pluralName"
582
- onChange={formik.handleChange}
583
- value={formik.values.pluralName}
584
- className={classNames("", {
585
- "p-invalid": isFormFieldValid(formik, "pluralName") || formErrors["pluralName"],
586
- })}
587
- />
588
- {(isFormFieldValid(formik, "pluralName") || (formErrors["pluralName"])) && (
589
- <Message severity="error" text={formik?.errors?.pluralName?.toString()} />
590
- )}
591
- </div>
592
543
 
593
- <div className="field col-12 mt-4">
594
- <div className="flex align-items-center gap-2">
595
- <Checkbox onChange={e => {
596
- setShowTableName(e.checked);
597
- if (e.checked === true) {
598
- const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(formik.values.displayName);
599
- if (params.id === 'new') {
600
- formik.setFieldValue("tableName", toSnakeCase);
601
- }
602
- }
603
-
604
- }} checked={showTableName} disabled={params.id !== 'new'}></Checkbox>
605
- <label htmlFor="ingredient1" className="form-field-label">
606
- Set table name
607
- </label>
544
+ {(isFormFieldValid(formik, "displayName") || (formErrors["displayName"])) && (
545
+ <Message
546
+ severity="error"
547
+ text={formik?.errors?.displayName?.toString()}
548
+ />
549
+ )}
608
550
  </div>
609
- </div>
610
- {showTableName &&
611
- <div className="field col-12 flex flex-column gap-1 mt-4">
612
- <label htmlFor="tableName" className="form-field-label">
613
- Table Name
551
+ <div className="flex flex-column gap-1 mt-4">
552
+ <label htmlFor="singularName" className="form-field-label">
553
+ Singular Name
614
554
  </label>
615
555
  <InputText
616
- disabled={params.id !== 'new'}
556
+ disabled={true}
617
557
  type="text"
618
- id="tableName"
619
- name="tableName"
558
+ id="singularName"
559
+ name="singularName"
620
560
  onChange={formik.handleChange}
621
- value={formik.values.tableName}
561
+ value={formik.values.singularName}
622
562
  className={classNames("", {
623
- "p-invalid": isFormFieldValid(formik, "tableName") || formErrors["tableName"],
563
+ "p-invalid": isFormFieldValid(formik, "singularName") || formErrors["singularName"],
624
564
  })}
625
565
  />
626
- {(isFormFieldValid(formik, "tableName") || (formErrors["tableName"])) && (
566
+ {(isFormFieldValid(formik, "singularName") || (formErrors["singularName"])) && (
627
567
  <Message
628
568
  severity="error"
629
- text={formik?.errors?.tableName?.toString()}
569
+ text={formik?.errors?.singularName?.toString()}
630
570
  />
631
571
  )}
632
572
  </div>
633
- }
634
- <div className="field col-12 flex flex-column gap-1 mt-4">
635
- <label htmlFor="description" className="form-field-label">
636
- Description
637
- </label>
638
- {/* <InputText
573
+ <div className="flex flex-column gap-1 mt-4">
574
+ <label htmlFor="pluralName" className="form-field-label">
575
+ Plural Name
576
+ </label>
577
+ <InputText
578
+ disabled={true}
579
+ type="text"
580
+ id="pluralName"
581
+ name="pluralName"
582
+ onChange={formik.handleChange}
583
+ value={formik.values.pluralName}
584
+ className={classNames("", {
585
+ "p-invalid": isFormFieldValid(formik, "pluralName") || formErrors["pluralName"],
586
+ })}
587
+ />
588
+ {(isFormFieldValid(formik, "pluralName") || (formErrors["pluralName"])) && (
589
+ <Message severity="error" text={formik?.errors?.pluralName?.toString()} />
590
+ )}
591
+ </div>
592
+
593
+ <div className="mt-4">
594
+ <div className="flex align-items-center gap-2">
595
+ <Checkbox onChange={e => {
596
+ setShowTableName(e.checked);
597
+ if (e.checked === true) {
598
+ const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(formik.values.displayName);
599
+ if (params.id === 'new') {
600
+ formik.setFieldValue("tableName", toSnakeCase);
601
+ }
602
+ }
603
+
604
+ }} checked={showTableName} disabled={params.id !== 'new'}></Checkbox>
605
+ <label htmlFor="ingredient1" className="form-field-label">
606
+ Set table name
607
+ </label>
608
+ </div>
609
+ </div>
610
+ {showTableName &&
611
+ <div className="flex flex-column gap-1 mt-4">
612
+ <label htmlFor="tableName" className="form-field-label">
613
+ Table Name
614
+ </label>
615
+ <InputText
616
+ disabled={params.id !== 'new'}
617
+ type="text"
618
+ id="tableName"
619
+ name="tableName"
620
+ onChange={formik.handleChange}
621
+ value={formik.values.tableName}
622
+ className={classNames("", {
623
+ "p-invalid": isFormFieldValid(formik, "tableName") || formErrors["tableName"],
624
+ })}
625
+ />
626
+ {(isFormFieldValid(formik, "tableName") || (formErrors["tableName"])) && (
627
+ <Message
628
+ severity="error"
629
+ text={formik?.errors?.tableName?.toString()}
630
+ />
631
+ )}
632
+ </div>
633
+ }
634
+ <div className="flex flex-column gap-1 mt-4">
635
+ <label htmlFor="description" className="form-field-label">
636
+ Description
637
+ </label>
638
+ {/* <InputText
639
639
  type="text"
640
640
  id="description"
641
641
  name="description"
@@ -645,25 +645,25 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
645
645
  "p-invalid": isFormFieldValid(formik, "description"),
646
646
  })}
647
647
  /> */}
648
- <InputTextarea
649
- id="description"
650
- name="description"
651
- onChange={formik.handleChange}
652
- value={formik.values.description}
653
- className={classNames("", {
654
- "p-invalid": isFormFieldValid(formik, "description") || formErrors["description"],
655
- })}
656
- rows={5}
657
- cols={30}
658
- />
659
- {(isFormFieldValid(formik, "description") || (formErrors["description"])) && (
660
- <Message
661
- severity="error"
662
- text={formik?.errors?.description?.toString()}
648
+ <InputTextarea
649
+ id="description"
650
+ name="description"
651
+ onChange={formik.handleChange}
652
+ value={formik.values.description}
653
+ className={classNames("", {
654
+ "p-invalid": isFormFieldValid(formik, "description") || formErrors["description"],
655
+ })}
656
+ rows={5}
657
+ cols={30}
663
658
  />
664
- )}
665
- </div>
666
- </div>
659
+ {(isFormFieldValid(formik, "description") || (formErrors["description"])) && (
660
+ <Message
661
+ severity="error"
662
+ text={formik?.errors?.description?.toString()}
663
+ />
664
+ )}
665
+ </div>
666
+ </Panel>
667
667
  </div>
668
668
 
669
669
  {/* <div className="md:col-6 sm:col-12">