@solidstarters/solid-core-ui 1.1.71 → 1.1.72

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 (33) hide show
  1. package/dist/components/auth/AuthLayout.js +3 -3
  2. package/dist/components/auth/AuthLayout.js.map +1 -1
  3. package/dist/components/auth/AuthLayout.tsx +3 -3
  4. package/dist/components/auth/SolidLogin.js +5 -5
  5. package/dist/components/auth/SolidLogin.js.map +1 -1
  6. package/dist/components/auth/SolidLogin.tsx +6 -6
  7. package/dist/components/auth/SolidRegister.js +4 -4
  8. package/dist/components/auth/SolidRegister.js.map +1 -1
  9. package/dist/components/auth/SolidRegister.tsx +5 -5
  10. package/dist/components/common/GeneralSettings.d.ts.map +1 -1
  11. package/dist/components/common/GeneralSettings.js +48 -48
  12. package/dist/components/common/GeneralSettings.js.map +1 -1
  13. package/dist/components/common/GeneralSettings.tsx +293 -285
  14. package/dist/components/core/users/CreateUser.d.ts.map +1 -1
  15. package/dist/components/core/users/CreateUser.js +16 -16
  16. package/dist/components/core/users/CreateUser.js.map +1 -1
  17. package/dist/components/core/users/CreateUser.tsx +173 -171
  18. package/dist/helpers/registry.js +2 -1
  19. package/dist/helpers/registry.js.map +1 -1
  20. package/dist/helpers/registry.ts +2 -1
  21. package/dist/redux/api/solidSettingsApi.d.ts +2 -1
  22. package/dist/redux/api/solidSettingsApi.d.ts.map +1 -1
  23. package/dist/redux/api/solidSettingsApi.js +11 -1
  24. package/dist/redux/api/solidSettingsApi.js.map +1 -1
  25. package/dist/redux/api/solidSettingsApi.tsx +8 -0
  26. package/package.json +1 -1
  27. package/src/components/auth/AuthLayout.tsx +3 -3
  28. package/src/components/auth/SolidLogin.tsx +6 -6
  29. package/src/components/auth/SolidRegister.tsx +5 -5
  30. package/src/components/common/GeneralSettings.tsx +293 -285
  31. package/src/components/core/users/CreateUser.tsx +173 -171
  32. package/src/helpers/registry.ts +2 -1
  33. package/src/redux/api/solidSettingsApi.tsx +8 -0
@@ -239,193 +239,195 @@ const CreateUser = ({ data, params }: any) => {
239
239
  return (
240
240
  <div className="solid-form-wrapper">
241
241
  <Toast ref={toast} />
242
- <form onSubmit={formik.handleSubmit}>
243
- <div className="solid-form-header">
244
- {params.id === "new" ? (
245
- <>
246
- <div className="flex align-items-center gap-3">
247
- <BackButton />
248
- <div className="form-wrapper-title">Create User</div>
249
- </div>
250
- <div className="gap-3 flex">
251
- {formik.dirty &&
252
- <Button label="Save" size="small" type="submit" />
253
- }
254
- <CancelButton />
255
- </div>
256
- </>
257
- ) : (
258
- <>
259
- <div className="flex align-items-center gap-3">
260
- <BackButton />
261
- <div className="form-wrapper-title">Update User</div>
262
- </div>
263
- <div>
242
+ <div className="solid-form-section" >
243
+ <form onSubmit={formik.handleSubmit}>
244
+ <div className="solid-form-header">
245
+ {params.id === "new" ? (
246
+ <>
247
+ <div className="flex align-items-center gap-3">
248
+ <BackButton />
249
+ <div className="form-wrapper-title">Create User</div>
250
+ </div>
264
251
  <div className="gap-3 flex">
265
252
  {formik.dirty &&
266
253
  <Button label="Save" size="small" type="submit" />
267
254
  }
268
- {data &&
269
- <Button outlined label="Delete" size="small" severity="danger" type="button" onClick={() => deleteUser(data.id)} />
270
- }
271
255
  <CancelButton />
272
256
  </div>
273
- </div>
274
- </>
275
- )}
276
- </div>
277
- <SolidFormHeader />
278
- {/* <div className="solid-form-stepper">
257
+ </>
258
+ ) : (
259
+ <>
260
+ <div className="flex align-items-center gap-3">
261
+ <BackButton />
262
+ <div className="form-wrapper-title">Update User</div>
263
+ </div>
264
+ <div>
265
+ <div className="gap-3 flex">
266
+ {formik.dirty &&
267
+ <Button label="Save" size="small" type="submit" />
268
+ }
269
+ {data &&
270
+ <Button outlined label="Delete" size="small" severity="danger" type="button" onClick={() => deleteUser(data.id)} />
271
+ }
272
+ <CancelButton />
273
+ </div>
274
+ </div>
275
+ </>
276
+ )}
277
+ </div>
278
+ <SolidFormHeader />
279
+ {/* <div className="solid-form-stepper">
279
280
  <SolidFormStepper />
280
281
  </div> */}
281
- <div className="p-4 solid-form-content">
282
- <div className="grid">
283
- <div className="col-8 mx-auto">
284
- {/* <p className="form-wrapper-heading text-base">Basic Info</p> */}
285
- <Panel header="Basic Info" className="solid-column-panel">
286
- <div className="grid formgrid mt-3">
287
- <div className="field col-6 flex flex-column gap-2">
288
- <label htmlFor="fullName" className="form-field-label">
289
- Full Name
290
- </label>
291
- <InputText
292
- type="text"
293
- id="fullName"
294
- name="fullName"
295
- autoComplete={"off"}
296
- onChange={formik.handleChange}
297
- value={formik.values.fullName}
298
- className={classNames("", {
299
- "p-invalid": formik.touched.fullName && formik.errors.fullName,
300
- })}
301
- />
302
- {isFormFieldValid(formik, "fullName") && (
303
- <Message
304
- severity="error"
305
- text={formik?.errors?.fullName?.toString()}
282
+ <div className="p-4 solid-form-content">
283
+ <div className="grid">
284
+ <div className="col-8 mx-auto">
285
+ {/* <p className="form-wrapper-heading text-base">Basic Info</p> */}
286
+ <Panel header="Basic Info" className="solid-column-panel">
287
+ <div className="grid formgrid mt-3">
288
+ <div className="field col-6 flex flex-column gap-2">
289
+ <label htmlFor="fullName" className="form-field-label">
290
+ Full Name
291
+ </label>
292
+ <InputText
293
+ type="text"
294
+ id="fullName"
295
+ name="fullName"
296
+ autoComplete={"off"}
297
+ onChange={formik.handleChange}
298
+ value={formik.values.fullName}
299
+ className={classNames("", {
300
+ "p-invalid": formik.touched.fullName && formik.errors.fullName,
301
+ })}
306
302
  />
307
- )}
308
- </div>
309
- <div className="field col-6 flex flex-column gap-2">
310
- <label htmlFor="username" className="form-field-label">
311
- Username
312
- </label>
313
- <InputText
314
- type="text"
315
- id="username"
316
- name="username"
317
- autoComplete={"off"}
318
- disabled={data ? true : false}
319
- onChange={formik.handleChange}
320
- value={formik.values.username}
321
- className={classNames("", {
322
- "p-invalid": formik.touched.username && formik.errors.username,
323
- })}
324
- />
325
- {isFormFieldValid(formik, "username") && (
326
- <Message
327
- severity="error"
328
- text={formik?.errors?.username?.toString()}
329
- />
330
- )}
331
- </div>
332
- <div className="field col-6 flex flex-column gap-1 mt-4">
333
- <label htmlFor="email" className="form-field-label">
334
- Email
335
- </label>
336
- <InputText
337
- type="text"
338
- id="email"
339
- name="email"
340
- autoComplete={"off"}
341
- disabled={data ? true : false}
342
- onChange={formik.handleChange}
343
- value={formik.values.email}
344
- className={classNames("", {
345
- "p-invalid": formik.touched.email && formik.errors.email,
346
- })}
347
- />
348
- {isFormFieldValid(formik, "email") && (
349
- <Message
350
- severity="error"
351
- text={formik?.errors?.email?.toString()}
303
+ {isFormFieldValid(formik, "fullName") && (
304
+ <Message
305
+ severity="error"
306
+ text={formik?.errors?.fullName?.toString()}
307
+ />
308
+ )}
309
+ </div>
310
+ <div className="field col-6 flex flex-column gap-2">
311
+ <label htmlFor="username" className="form-field-label">
312
+ Username
313
+ </label>
314
+ <InputText
315
+ type="text"
316
+ id="username"
317
+ name="username"
318
+ autoComplete={"off"}
319
+ disabled={data ? true : false}
320
+ onChange={formik.handleChange}
321
+ value={formik.values.username}
322
+ className={classNames("", {
323
+ "p-invalid": formik.touched.username && formik.errors.username,
324
+ })}
352
325
  />
353
- )}
354
- </div>
355
- <div className="field col-6 flex flex-column gap-1 mt-4">
356
- <label htmlFor="mobile" className="form-field-label">
357
- Mobile
358
- </label>
359
- <InputText
360
- type="text"
361
- id="mobile"
362
- name="mobile"
363
- autoComplete={"off"}
364
- onChange={formik.handleChange}
365
- value={formik.values.mobile}
366
- className={classNames("", {
367
- "p-invalid": formik.touched.mobile && formik.errors.mobile,
368
- })}
369
- />
370
- {isFormFieldValid(formik, "mobile ") && (
371
- <Message
372
- severity="error"
373
- text={formik?.errors?.mobile?.toString()}
326
+ {isFormFieldValid(formik, "username") && (
327
+ <Message
328
+ severity="error"
329
+ text={formik?.errors?.username?.toString()}
330
+ />
331
+ )}
332
+ </div>
333
+ <div className="field col-6 flex flex-column gap-1 mt-4">
334
+ <label htmlFor="email" className="form-field-label">
335
+ Email
336
+ </label>
337
+ <InputText
338
+ type="text"
339
+ id="email"
340
+ name="email"
341
+ autoComplete={"off"}
342
+ disabled={data ? true : false}
343
+ onChange={formik.handleChange}
344
+ value={formik.values.email}
345
+ className={classNames("", {
346
+ "p-invalid": formik.touched.email && formik.errors.email,
347
+ })}
374
348
  />
375
- )}
376
- </div>
377
- <div className="field col-6 flex flex-column gap-2 my-4">
378
- <label htmlFor="Password" className="form-field-label">
379
- Password
380
- </label>
381
- <Password
382
- id="password"
383
- autoComplete="off"
384
- aria-autocomplete="none"
385
- value={formik.values.password}
386
- onChange={(e) => {
387
- formik.setFieldValue("password", e.target.value);
388
- }}
389
- toggleMask
390
- className={classNames("", {
391
- "p-invalid": isFormFieldValid(formik, "name"),
392
- })}
393
-
394
- inputClassName="w-full"
395
- feedback={false}
396
- />
397
- {isFormFieldValid(formik, "password") && (
398
- <Message
399
- severity="error"
400
- text={formik?.errors?.password?.toString()}
349
+ {isFormFieldValid(formik, "email") && (
350
+ <Message
351
+ severity="error"
352
+ text={formik?.errors?.email?.toString()}
353
+ />
354
+ )}
355
+ </div>
356
+ <div className="field col-6 flex flex-column gap-1 mt-4">
357
+ <label htmlFor="mobile" className="form-field-label">
358
+ Mobile
359
+ </label>
360
+ <InputText
361
+ type="text"
362
+ id="mobile"
363
+ name="mobile"
364
+ autoComplete={"off"}
365
+ onChange={formik.handleChange}
366
+ value={formik.values.mobile}
367
+ className={classNames("", {
368
+ "p-invalid": formik.touched.mobile && formik.errors.mobile,
369
+ })}
401
370
  />
402
- )}
403
- </div>
404
-
405
- </div>
406
- </Panel>
407
-
408
- {/* <Divider /> */}
409
- {/* <p className="form-wrapper-heading text-base" style={{ fontSize: 16 }}>Roles</p> */}
410
-
411
- <Panel toggleable header="Roles" className="solid-column-panel mt-5">
412
- <div className="formgrid grid mt-4">
413
- {rolesData?.data?.records && rolesData?.data?.records.map((role: any, i: number) => (
414
- <div key={role.name} className={`field col-6 flex gap-2 ${i >= 2 ? 'mt-3' : ''}`}>
415
- <Checkbox
416
- inputId={role.name}
417
- checked={selectedRoles.includes(role.name)}
418
- onChange={() => handleCheckboxChange(role.name)}
371
+ {isFormFieldValid(formik, "mobile ") && (
372
+ <Message
373
+ severity="error"
374
+ text={formik?.errors?.mobile?.toString()}
375
+ />
376
+ )}
377
+ </div>
378
+ <div className="field col-6 flex flex-column gap-2 my-4">
379
+ <label htmlFor="Password" className="form-field-label">
380
+ Password
381
+ </label>
382
+ <Password
383
+ id="password"
384
+ autoComplete="off"
385
+ aria-autocomplete="none"
386
+ value={formik.values.password}
387
+ onChange={(e) => {
388
+ formik.setFieldValue("password", e.target.value);
389
+ }}
390
+ toggleMask
391
+ className={classNames("", {
392
+ "p-invalid": isFormFieldValid(formik, "name"),
393
+ })}
394
+
395
+ inputClassName="w-full"
396
+ feedback={false}
419
397
  />
420
- <label htmlFor={role.name}> {role.name}</label>
398
+ {isFormFieldValid(formik, "password") && (
399
+ <Message
400
+ severity="error"
401
+ text={formik?.errors?.password?.toString()}
402
+ />
403
+ )}
421
404
  </div>
422
- ))}
423
- </div>
424
- </Panel>
405
+
406
+ </div>
407
+ </Panel>
408
+
409
+ {/* <Divider /> */}
410
+ {/* <p className="form-wrapper-heading text-base" style={{ fontSize: 16 }}>Roles</p> */}
411
+
412
+ <Panel toggleable header="Roles" className="solid-column-panel mt-5">
413
+ <div className="formgrid grid mt-4">
414
+ {rolesData?.data?.records && rolesData?.data?.records.map((role: any, i: number) => (
415
+ <div key={role.name} className={`field col-6 flex gap-2 ${i >= 2 ? 'mt-3' : ''}`}>
416
+ <Checkbox
417
+ inputId={role.name}
418
+ checked={selectedRoles.includes(role.name)}
419
+ onChange={() => handleCheckboxChange(role.name)}
420
+ />
421
+ <label htmlFor={role.name}> {role.name}</label>
422
+ </div>
423
+ ))}
424
+ </div>
425
+ </Panel>
426
+ </div>
425
427
  </div>
426
428
  </div>
427
- </div>
428
- </form>
429
+ </form>
430
+ </div>
429
431
  </div>
430
432
  );
431
433
  };
@@ -33,7 +33,7 @@ import { DefaultRelationManyToOneListWidget } from "@/components/core/list/colum
33
33
  import { DefaultRelationOneToManyListWidget } from "@/components/core/list/columns/relations/SolidRelationOneToManyColumn";
34
34
  import { SolidRelationAvatarWidget } from "@/components/core/list/widgets/SolidRelationAvatarWidget";
35
35
  import { SolidRelationFieldAvatarFormWidget } from "@/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget";
36
- import { DefaultSelectionDynamicFormViewWidget } from "@/components/core/form/fields/SolidSelectionDynamicField";
36
+ import { DefaultSelectionDynamicFormEditWidget, DefaultSelectionDynamicFormViewWidget } from "@/components/core/form/fields/SolidSelectionDynamicField";
37
37
 
38
38
  type ExtensionRegistry = {
39
39
  components: Record<string, React.ComponentType<any>>;
@@ -119,6 +119,7 @@ registerExtensionComponent("DefaultRelationManyToOneFormEditWidget", DefaultRela
119
119
  registerExtensionComponent("DefaultRelationManyToManyAutoCompleteFormEditWidget", DefaultRelationManyToManyAutoCompleteFormEditWidget, []);
120
120
  registerExtensionComponent("DefaultRelationManyToManyCheckBoxFormEditWidget", DefaultRelationManyToManyCheckBoxFormEditWidget, []);
121
121
  registerExtensionComponent("SolidSelectionStaticRadioFormEditWidget", SolidSelectionStaticRadioFormEditWidget, []);
122
+ registerExtensionComponent("DefaultSelectionDynamicFormEditWidget", DefaultSelectionDynamicFormEditWidget, []);
122
123
 
123
124
  // Formview Edit Custom widgets
124
125
 
@@ -32,6 +32,13 @@ export const solidSettingsApi = createApi({
32
32
  body: data,
33
33
  }),
34
34
  }),
35
+ bulkUpdateSolidSettings: builder.mutation({
36
+ query: ({ data }) => ({
37
+ url: `/setting/bulk-update`,
38
+ method: 'POST',
39
+ body: data,
40
+ }),
41
+ }),
35
42
  })
36
43
  });
37
44
 
@@ -44,4 +51,5 @@ export const {
44
51
  useLazyGetSolidSettingsQuery,
45
52
  useLazyGetSolidSettingsByIdQuery,
46
53
  useUpdateSolidSettingsMutation,
54
+ useBulkUpdateSolidSettingsMutation
47
55
  } = solidSettingsApi;