@rkosafo/cai.components 0.0.51 → 0.0.53

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.
@@ -59,7 +59,7 @@
59
59
  message.content += event.detail;
60
60
  }
61
61
 
62
- function sendImage({ detail }: any) {
62
+ function sendImage( detail : PreviewPageSrc) {
63
63
  const { file } = detail;
64
64
  filesToSend = [file, ...filesToSend];
65
65
  imageInput = {
@@ -682,6 +682,7 @@ export interface DatatableProps<T = any> extends TableProps {
682
682
  editor?: Snippet<[DatatableEditorFormProps]>;
683
683
  customFilter?: Snippet<[TableFilter]>;
684
684
  modalFooter?: Snippet;
685
+ showModalButtons?: boolean;
685
686
  }
686
687
  export interface DatatableEditorFormProps {
687
688
  recordId?: number | string | null;
@@ -81,6 +81,7 @@
81
81
  return { success: false, data: null, error: null } as any;
82
82
  },
83
83
  modalFooter,
84
+ showModalButtons = true,
84
85
  ...otherProps
85
86
  }: DatatableProps = $props();
86
87
 
@@ -507,12 +508,14 @@
507
508
  })}
508
509
 
509
510
  {#snippet footer()}
510
- {#if modalFooter}
511
- {@render modalFooter()}
512
- {:else if !viewing}
513
- <Button disabled={!isValid} loading={isLoading} type="submit" class="w-full" value="submit"
514
- >Submit</Button
515
- >
511
+ {#if showModalButtons}
512
+ {#if modalFooter}
513
+ {@render modalFooter()}
514
+ {:else if !viewing}
515
+ <Button disabled={!isValid} loading={isLoading} type="submit" class="w-full" value="submit"
516
+ >Submit</Button
517
+ >
518
+ {/if}
516
519
  {/if}
517
520
  {/snippet}
518
521
  </Drawer>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkosafo/cai.components",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",