firstly 0.1.3 → 0.2.1

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 (121) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/esm/auth/Entities.js +2 -2
  3. package/esm/auth/server/AuthController.server.js +32 -12
  4. package/esm/auth/static/assets/Page-BRNWcY5Z.js +1 -0
  5. package/esm/auth/static/assets/Page-CFcEsGK8.d.ts +2 -0
  6. package/esm/auth/static/assets/Page-CFcEsGK8.js +7 -0
  7. package/esm/auth/static/assets/Page-tLVs5slF.js +1 -0
  8. package/esm/auth/static/assets/index-D38rqu4x.d.ts +201 -0
  9. package/esm/auth/static/assets/index-D38rqu4x.js +2 -0
  10. package/esm/auth/static/index.html +1 -1
  11. package/esm/bin/cmd.js +3 -3
  12. package/esm/carbone/CarboneController.d.ts +35 -0
  13. package/esm/carbone/CarboneController.js +155 -0
  14. package/esm/carbone/Roles_Carbon.d.ts +8 -0
  15. package/esm/carbone/Roles_Carbon.js +8 -0
  16. package/esm/carbone/carboneEntities.d.ts +21 -0
  17. package/esm/carbone/carboneEntities.js +83 -0
  18. package/esm/carbone/index.d.ts +29 -0
  19. package/esm/carbone/index.js +68 -0
  20. package/esm/carbone/server/CarboneServer.d.ts +19 -0
  21. package/esm/carbone/server/CarboneServer.js +38 -0
  22. package/esm/carbone/server/index.d.ts +7 -0
  23. package/esm/carbone/server/index.js +23 -0
  24. package/esm/changeLog/changeLogEntities.js +1 -1
  25. package/esm/cron/Cron.js +1 -1
  26. package/esm/feedback/FeedbackController.d.ts +6 -2
  27. package/esm/feedback/FeedbackController.js +145 -143
  28. package/esm/feedback/server/index.d.ts +2 -2
  29. package/esm/feedback/server/index.js +3 -3
  30. package/esm/feedback/types.d.ts +5 -0
  31. package/esm/feedback/ui/DialogIssue.svelte +5 -5
  32. package/esm/feedback/ui/DialogIssues.svelte +5 -5
  33. package/esm/feedback/ui/DialogMilestones.svelte +1 -1
  34. package/esm/internals/BaseEnum.d.ts +1 -0
  35. package/esm/internals/FF_Fields.d.ts +6 -4
  36. package/esm/internals/FF_Fields.js +27 -64
  37. package/esm/internals/cellsBuildor.d.ts +2 -1
  38. package/esm/internals/index.d.ts +7 -8
  39. package/esm/internals/storeItem.d.ts +1 -0
  40. package/esm/mail/Mail.js +1 -1
  41. package/esm/mail/server/index.d.ts +8 -2
  42. package/esm/mail/server/index.js +35 -7
  43. package/esm/server/index.d.ts +1 -1
  44. package/esm/svelte/FF_Cell.svelte +3 -5
  45. package/esm/svelte/FF_Cell.svelte.d.ts +13 -4
  46. package/esm/svelte/FF_Cell_Caption.svelte.d.ts +10 -3
  47. package/esm/svelte/FF_Cell_Display.svelte.d.ts +10 -3
  48. package/esm/svelte/FF_Cell_Edit.svelte.d.ts +11 -4
  49. package/esm/svelte/FF_Cell_Error.svelte.d.ts +10 -3
  50. package/esm/svelte/FF_Cell_Hint.svelte.d.ts +10 -3
  51. package/esm/svelte/FF_Form.svelte +4 -5
  52. package/esm/svelte/FF_Form.svelte.d.ts +10 -3
  53. package/esm/svelte/FF_Grid.svelte +2 -2
  54. package/esm/svelte/FF_Grid.svelte.d.ts +10 -3
  55. package/esm/svelte/FF_Layout.svelte +3 -3
  56. package/esm/svelte/FF_Layout.svelte.d.ts +10 -3
  57. package/esm/svelte/dialog/DialogManagement.svelte +2 -5
  58. package/esm/svelte/dialog/DialogPrimitive.svelte +1 -2
  59. package/esm/svelte/dialog/dialog.js +2 -2
  60. package/esm/svelte/ff_Config.svelte.js +2 -2
  61. package/esm/svelte/index.d.ts +2 -7
  62. package/esm/svelte/index.js +2 -7
  63. package/esm/ui/Button.svelte +40 -23
  64. package/esm/ui/Button.svelte.d.ts +10 -34
  65. package/esm/ui/Clipboardable.svelte +13 -17
  66. package/esm/ui/Clipboardable.svelte.d.ts +9 -33
  67. package/esm/ui/Field.svelte +38 -8
  68. package/esm/ui/FieldGroup.svelte.d.ts +1 -1
  69. package/esm/ui/Grid.svelte +11 -82
  70. package/esm/ui/Grid.svelte.d.ts +0 -1
  71. package/esm/ui/Grid2.svelte +25 -86
  72. package/esm/ui/Grid2.svelte.d.ts +1 -2
  73. package/esm/ui/GridPaginate.svelte +1 -1
  74. package/esm/ui/GridPaginate2.svelte +2 -2
  75. package/esm/ui/Icon.svelte +2 -18
  76. package/esm/ui/Icon.svelte.d.ts +0 -2
  77. package/esm/ui/LibIcon.js +2 -2
  78. package/esm/ui/Loading.svelte +1 -1
  79. package/esm/ui/Tooltip.svelte +3 -2
  80. package/esm/ui/dialog/DialogManagement.svelte +14 -5
  81. package/esm/ui/dialog/DialogPrimitive.svelte +4 -4
  82. package/esm/ui/dialog/FormEditAction.svelte +4 -4
  83. package/esm/ui/dialog/dialog.d.ts +5 -2
  84. package/esm/ui/dialog/dialog.js +2 -2
  85. package/esm/ui/index.d.ts +1 -0
  86. package/esm/ui/index.js +1 -0
  87. package/esm/ui/internals/FieldContainer.svelte +25 -14
  88. package/esm/ui/internals/FieldContainer.svelte.d.ts +9 -30
  89. package/esm/ui/internals/Input.svelte.d.ts +1 -1
  90. package/esm/ui/internals/Textarea.svelte +2 -5
  91. package/esm/ui/internals/select/MultiSelectMelt.svelte +6 -4
  92. package/esm/ui/internals/select/Select2.svelte +88 -0
  93. package/esm/ui/internals/select/Select2.svelte.d.ts +12 -0
  94. package/esm/ui/internals/select/SelectMelt.svelte +5 -5
  95. package/esm/ui/internals/select/SelectRadio.svelte +1 -1
  96. package/esm/ui/link/Link.svelte +1 -1
  97. package/esm/ui/link/LinkPlus.svelte +9 -5
  98. package/esm/ui/link/LinkPlus.svelte.d.ts +5 -19
  99. package/esm/virtual/Customer.js +2 -3
  100. package/esm/virtual/UIEntity.js +10 -6
  101. package/package.json +16 -9
  102. package/esm/auth/static/assets/Page-9Ytj29NS.js +0 -1
  103. package/esm/auth/static/assets/Page-C1pM-UDt.d.ts +0 -2
  104. package/esm/auth/static/assets/Page-C1pM-UDt.js +0 -20
  105. package/esm/auth/static/assets/Page-CPz6KCw_.js +0 -1
  106. package/esm/auth/static/assets/index-AoBb9Ds5.d.ts +0 -232
  107. package/esm/auth/static/assets/index-AoBb9Ds5.js +0 -2
  108. package/esm/svelte/FF_Display.svelte +0 -51
  109. package/esm/svelte/FF_Display.svelte.d.ts +0 -22
  110. package/esm/svelte/FF_Edit.svelte +0 -104
  111. package/esm/svelte/FF_Edit.svelte.d.ts +0 -25
  112. package/esm/svelte/FF_Error.svelte +0 -23
  113. package/esm/svelte/FF_Error.svelte.d.ts +0 -22
  114. package/esm/svelte/FF_Field.svelte +0 -62
  115. package/esm/svelte/FF_Field.svelte.d.ts +0 -22
  116. package/esm/svelte/FF_Hint.svelte +0 -21
  117. package/esm/svelte/FF_Hint.svelte.d.ts +0 -22
  118. package/esm/svelte/FF_Label.svelte +0 -23
  119. package/esm/svelte/FF_Label.svelte.d.ts +0 -22
  120. /package/esm/auth/static/assets/{Page-CPz6KCw_.d.ts → Page-BRNWcY5Z.d.ts} +0 -0
  121. /package/esm/auth/static/assets/{Page-9Ytj29NS.d.ts → Page-tLVs5slF.d.ts} +0 -0
@@ -16,7 +16,7 @@
16
16
  import Clipboardable from './Clipboardable.svelte'
17
17
  import GridLoading from './GridLoading.svelte'
18
18
  import Icon from './Icon.svelte'
19
- import { align, getAligns } from './index.js'
19
+ import { align, baseTable, getAligns } from './index.js'
20
20
  import {
21
21
  LibIcon_Add,
22
22
  LibIcon_Settings,
@@ -36,11 +36,11 @@
36
36
  export let loadingRows = 5
37
37
 
38
38
  export let classes = {
39
- table: 'table-pin-rows table-pin-cols',
39
+ // table: 'table-pin-rows table-pin-cols',
40
+ table: '',
40
41
  }
41
42
  export let orderBy: EntityOrderBy<T> | undefined = undefined
42
43
  export let orderByCols: (keyof T)[] | true | undefined = undefined
43
- export let settingsLeft = false
44
44
 
45
45
  export let dicoNoResult = 'Aucun résultat !'
46
46
 
@@ -84,58 +84,15 @@
84
84
  const cellsToTake = (cells: Cell<T>[]) => {
85
85
  return cells.filter((c) => c.modeView !== 'hide')
86
86
  }
87
-
88
- const classForRounding = (i: number) => {
89
- if (settingsLeft && (withEdit || withDelete || withAdd)) {
90
- if (i === 0) {
91
- return ''
92
- } else if (i === cells.length - 1) {
93
- return 'rounded-tr-lg'
94
- }
95
- }
96
-
97
- if (!settingsLeft && (withEdit || withDelete || withAdd)) {
98
- if (i === 0) {
99
- return 'rounded-tl-lg'
100
- } else if (i === cells.length - 1) {
101
- return ''
102
- }
103
- }
104
-
105
- if (i === 0) {
106
- return 'rounded-tl-lg'
107
- } else if (i === cells.length - 1) {
108
- return 'rounded-tr-lg'
109
- }
110
- }
111
87
  </script>
112
88
 
113
89
  <div class="overflow-x-auto">
114
- <table class="table {classes.table} bg-base-200">
90
+ <table class="table {classes.table} {baseTable}">
115
91
  <thead>
116
92
  <tr>
117
- {#if settingsLeft && (withEdit || withDelete || withAdd)}
118
- <th class="rounded-tl-lg">
119
- <div class="flex justify-start">
120
- {#if !withAdd}
121
- <Icon data={LibIcon_Settings}></Icon>
122
- {:else}
123
- <Button
124
- permission={store.getRepo().metadata.options.permissionApiInsert}
125
- disabled={!store.getRepo().metadata.apiInsertAllowed()}
126
- class="btn btn-square btn-ghost btn-xs"
127
- on:click={() => dispatch('add', {})}
128
- >
129
- <Icon data={LibIcon_Add} />
130
- </Button>
131
- {/if}
132
- </div>
133
- </th>
134
- {/if}
135
-
136
93
  {#each cellsToTake(cells) as b, i}
137
94
  {@const al = align(b.field, b.kind === 'slot')}
138
- <th class="{al} {classForRounding(i)}">
95
+ <th class={al}>
139
96
  {#if b.headerSlot}
140
97
  <slot name="header" field={b.field} />
141
98
  {:else}
@@ -158,15 +115,15 @@
158
115
  </th>
159
116
  {/each}
160
117
 
161
- {#if !settingsLeft && (withEdit || withDelete || withAdd)}
162
- <th class="rounded-tr-lg">
118
+ {#if withEdit || withDelete || withAdd}
119
+ <th class="">
163
120
  <div class="flex justify-end">
164
121
  {#if withAdd}
165
122
  <Button
166
123
  permission={store.getRepo().metadata.options.permissionApiInsert}
167
124
  disabled={!store.getRepo().metadata.apiInsertAllowed()}
168
125
  class="btn btn-square btn-ghost btn-xs"
169
- on:click={() => dispatch('add', {})}
126
+ onclick={() => dispatch('add', {})}
170
127
  >
171
128
  <Icon data={LibIcon_Add} />
172
129
  </Button>
@@ -185,34 +142,6 @@
185
142
  {:else}
186
143
  {#each $store.items as row}
187
144
  <tr on:click={() => dispatch('rowclick', row)} class="hover:bg-base-content/20">
188
- <!-- BECARFULL THIS CODE IS DUPLICATED -->
189
- {#if settingsLeft && (withEdit || withDelete)}
190
- <td class="text-left">
191
- <div class="flex justify-start gap-2">
192
- {#if withEdit}
193
- <Button
194
- permission={store.getRepo().metadata.options.permissionApiUpdate}
195
- disabled={!store.getRepo().metadata.apiUpdateAllowed()}
196
- class="btn btn-square btn-ghost btn-xs"
197
- on:click={() => dispatch('edit', row)}
198
- >
199
- <Icon data={LibIcon_Edit} />
200
- </Button>
201
- {/if}
202
- {#if withDelete}
203
- <Button
204
- permission={store.getRepo().metadata.options.permissionApiDelete}
205
- disabled={!store.getRepo().metadata.apiDeleteAllowed()}
206
- class="btn btn-square btn-ghost btn-xs"
207
- on:click={() => dispatch('delete', row)}
208
- >
209
- <Icon data={LibIcon_Delete} />
210
- </Button>
211
- {/if}
212
- </div>
213
- </td>
214
- {/if}
215
-
216
145
  {#each cellsToTake(cells) as b}
217
146
  {@const metaType = getFieldMetaType(b.field)}
218
147
  <td class={align(b.field, b.kind === 'slot')}>
@@ -287,7 +216,7 @@
287
216
  </td>
288
217
  {/each}
289
218
 
290
- {#if !settingsLeft && (withEdit || withDelete)}
219
+ {#if withEdit || withDelete}
291
220
  <td class="text-right">
292
221
  <div class="flex justify-end gap-2">
293
222
  {#if withEdit}
@@ -295,7 +224,7 @@
295
224
  permission={store.getRepo().metadata.options.permissionApiUpdate}
296
225
  disabled={!store.getRepo().metadata.apiUpdateAllowed()}
297
226
  class="btn btn-square btn-ghost btn-xs"
298
- on:click={() => dispatch('edit', row)}
227
+ onclick={() => dispatch('edit', row)}
299
228
  >
300
229
  <Icon data={LibIcon_Edit} />
301
230
  </Button>
@@ -305,7 +234,7 @@
305
234
  permission={store.getRepo().metadata.options.permissionApiDelete}
306
235
  disabled={!store.getRepo().metadata.apiDeleteAllowed()}
307
236
  class="btn btn-square btn-ghost btn-xs"
308
- on:click={() => dispatch('delete', row)}
237
+ onclick={() => dispatch('delete', row)}
309
238
  >
310
239
  <Icon data={LibIcon_Delete} />
311
240
  </Button>
@@ -14,7 +14,6 @@ declare class __sveltets_Render<T extends Record<any, any>> {
14
14
  } | undefined;
15
15
  orderBy?: EntityOrderBy<T> | undefined;
16
16
  orderByCols?: true | (keyof T)[] | undefined;
17
- settingsLeft?: boolean;
18
17
  dicoNoResult?: string;
19
18
  };
20
19
  events(): {
@@ -18,7 +18,7 @@
18
18
  import Clipboardable from './Clipboardable.svelte'
19
19
  import GridLoading from './GridLoading.svelte'
20
20
  import Icon from './Icon.svelte'
21
- import { align, getAligns } from './index.js'
21
+ import { align, baseTable, getAligns } from './index.js'
22
22
  import {
23
23
  LibIcon_Add,
24
24
  LibIcon_Settings,
@@ -38,11 +38,11 @@
38
38
  export let loadingRows = 5
39
39
 
40
40
  export let classes = {
41
- table: 'table-pin-rows table-pin-cols',
41
+ // table: 'table-pin-rows table-pin-cols',
42
+ table: '',
42
43
  }
43
44
  export let orderBy: EntityOrderBy<T> | undefined = undefined
44
45
  export let orderByCols: (keyof T)[] | true | undefined = undefined
45
- export let settingsLeft = false
46
46
 
47
47
  export let dicoNoResult = 'Aucun résultat !'
48
48
 
@@ -86,58 +86,15 @@
86
86
  const cellsToTake = (cells: Cell<T>[]) => {
87
87
  return cells.filter((c) => c.modeView !== 'hide')
88
88
  }
89
-
90
- const classForRounding = (i: number) => {
91
- if (settingsLeft && (withEdit || withDelete || withAdd)) {
92
- if (i === 0) {
93
- return ''
94
- } else if (i === cells.length - 1) {
95
- return 'rounded-tr-lg'
96
- }
97
- }
98
-
99
- if (!settingsLeft && (withEdit || withDelete || withAdd)) {
100
- if (i === 0) {
101
- return 'rounded-tl-lg'
102
- } else if (i === cells.length - 1) {
103
- return ''
104
- }
105
- }
106
-
107
- if (i === 0) {
108
- return 'rounded-tl-lg'
109
- } else if (i === cells.length - 1) {
110
- return 'rounded-tr-lg'
111
- }
112
- }
113
89
  </script>
114
90
 
115
91
  <div class="overflow-x-auto">
116
- <table class="table {classes.table} bg-base-200">
117
- <thead>
118
- <tr>
119
- {#if settingsLeft && (withEdit || withDelete || withAdd)}
120
- <th class="rounded-tl-lg">
121
- <div class="flex justify-start">
122
- {#if !withAdd}
123
- <Icon data={LibIcon_Settings}></Icon>
124
- {:else}
125
- <Button
126
- permission={r.metadata.options.permissionApiInsert}
127
- disabled={!r.metadata.apiInsertAllowed()}
128
- class="btn btn-square btn-ghost btn-xs"
129
- on:click={() => dispatch('add', {})}
130
- >
131
- <Icon data={LibIcon_Add} />
132
- </Button>
133
- {/if}
134
- </div>
135
- </th>
136
- {/if}
137
-
92
+ <table class="table {classes.table} {baseTable}">
93
+ <thead class="">
94
+ <tr class="">
138
95
  {#each cellsToTake(cells) as b, i}
139
96
  {@const al = align(b.field, b.kind === 'slot')}
140
- <th class="{al} {classForRounding(i)}">
97
+ <th class={al}>
141
98
  {#if b.headerSlot}
142
99
  <slot name="header" field={b.field} />
143
100
  {:else}
@@ -160,15 +117,15 @@
160
117
  </th>
161
118
  {/each}
162
119
 
163
- {#if !settingsLeft && (withEdit || withDelete || withAdd)}
164
- <th class="rounded-tr-lg">
120
+ {#if withEdit || withDelete || withAdd}
121
+ <th class="">
165
122
  <div class="flex justify-end">
166
123
  {#if withAdd}
167
124
  <Button
168
125
  permission={r.metadata.options.permissionApiInsert}
169
126
  disabled={!r.metadata.apiInsertAllowed()}
170
127
  class="btn btn-square btn-ghost btn-xs"
171
- on:click={() => dispatch('add', {})}
128
+ onclick={() => dispatch('add', {})}
172
129
  >
173
130
  <Icon data={LibIcon_Add} />
174
131
  </Button>
@@ -180,40 +137,12 @@
180
137
  {/if}
181
138
  </tr>
182
139
  </thead>
183
- <tbody>
140
+ <tbody class="">
184
141
  {#if r.loading.init && r.metadata.apiReadAllowed}
185
142
  <GridLoading columns={getAligns(cells, withEdit || withDelete)} {loadingRows} />
186
143
  {:else}
187
144
  {#each r.items ?? [] as row}
188
145
  <tr onclick={() => dispatch('rowclick', row)} class="hover:bg-base-content/20">
189
- <!-- BECARFULL THIS CODE IS DUPLICATED -->
190
- {#if settingsLeft && (withEdit || withDelete)}
191
- <td class="text-left">
192
- <div class="flex justify-start gap-2">
193
- {#if withEdit}
194
- <Button
195
- permission={r.metadata.options.permissionApiUpdate}
196
- disabled={!r.metadata.apiUpdateAllowed()}
197
- class="btn btn-square btn-ghost btn-xs"
198
- on:click={() => dispatch('edit', row)}
199
- >
200
- <Icon data={LibIcon_Edit} />
201
- </Button>
202
- {/if}
203
- {#if withDelete}
204
- <Button
205
- permission={r.metadata.options.permissionApiDelete}
206
- disabled={!r.metadata.apiDeleteAllowed()}
207
- class="btn btn-square btn-ghost btn-xs"
208
- on:click={() => dispatch('delete', row)}
209
- >
210
- <Icon data={LibIcon_Delete} />
211
- </Button>
212
- {/if}
213
- </div>
214
- </td>
215
- {/if}
216
-
217
146
  {#each cellsToTake(cells) as b}
218
147
  {@const metaType = getFieldMetaType(b.field)}
219
148
  <td class={align(b.field, b.kind === 'slot')}>
@@ -229,6 +158,16 @@
229
158
  on:refresh
230
159
  ></svelte:component>
231
160
  </div>
161
+ {:else if b.componentS5}
162
+ {@const Comp = b.componentS5}
163
+ <!-- NOT TESTED YET! -->
164
+ <div class={b.class}>
165
+ <Comp
166
+ {...b.props}
167
+ {...b.rowToProps ? b.rowToProps(row) : {}}
168
+ onrefresh={() => dispatch('refresh')}
169
+ />
170
+ </div>
232
171
  {:else}
233
172
  <pre>Col: {b.col}</pre>
234
173
  <pre class="bg-error">Component prop needed !</pre>
@@ -282,7 +221,7 @@
282
221
  </td>
283
222
  {/each}
284
223
 
285
- {#if !settingsLeft && (withEdit || withDelete)}
224
+ {#if withEdit || withDelete}
286
225
  <td class="text-right">
287
226
  <div class="flex justify-end gap-2">
288
227
  {#if withEdit}
@@ -290,7 +229,7 @@
290
229
  permission={r.metadata.options.permissionApiUpdate}
291
230
  disabled={!r.metadata.apiUpdateAllowed()}
292
231
  class="btn btn-square btn-ghost btn-xs"
293
- on:click={() => dispatch('edit', row)}
232
+ onclick={() => dispatch('edit', row)}
294
233
  >
295
234
  <Icon data={LibIcon_Edit} />
296
235
  </Button>
@@ -300,7 +239,7 @@
300
239
  permission={r.metadata.options.permissionApiDelete}
301
240
  disabled={!r.metadata.apiDeleteAllowed()}
302
241
  class="btn btn-square btn-ghost btn-xs"
303
- on:click={() => dispatch('delete', row)}
242
+ onclick={() => dispatch('delete', row)}
304
243
  >
305
244
  <Icon data={LibIcon_Delete} />
306
245
  </Button>
@@ -345,7 +284,7 @@
345
284
  >
346
285
  <Button
347
286
  class={r.loading.more ? 'btn-disabled' : 'btn-primary'}
348
- on:click={() => {
287
+ onclick={() => {
349
288
  r.queryMore()
350
289
  }}>Plus</Button
351
290
  >
@@ -14,11 +14,10 @@ declare class __sveltets_Render<T extends Record<any, any>> {
14
14
  } | undefined;
15
15
  orderBy?: EntityOrderBy<T> | undefined;
16
16
  orderByCols?: true | (keyof T)[] | undefined;
17
- settingsLeft?: boolean;
18
17
  dicoNoResult?: string;
19
18
  };
20
19
  events(): {
21
- refresh: any;
20
+ refresh: CustomEvent<any>;
22
21
  add: CustomEvent<any>;
23
22
  rowclick: CustomEvent<any>;
24
23
  edit: CustomEvent<any>;
@@ -30,7 +30,7 @@
30
30
  <FieldContainer {label} forId="paginate" classes={{ label: 'justify-end' }}>
31
31
  <div class="flex w-36 items-center justify-end">
32
32
  {#if totalCount === undefined}
33
- <Loading class="ml-6 mr-2 h-3 w-1/6"></Loading>
33
+ <Loading class="mr-2 ml-6 h-3 w-1/6"></Loading>
34
34
  <Loading class="mx-2 h-4 w-1/2"></Loading>
35
35
  <Loading class="mx-2 h-3 w-1/6"></Loading>
36
36
  {:else if !needPaginate}
@@ -13,11 +13,11 @@
13
13
  <FieldContainer {label} forId="paginate" classes={{ label: 'justify-end' }}>
14
14
  <div class="flex w-14 items-center justify-end">
15
15
  {#if totalCount === undefined}
16
- <Loading class="ml-6 mr-2 h-3 w-1/6"></Loading>
16
+ <Loading class="mr-2 ml-6 h-3 w-1/6"></Loading>
17
17
  <Loading class="mx-2 h-4 w-1/2"></Loading>
18
18
  <Loading class="mx-2 h-3 w-1/6"></Loading>
19
19
  {:else}
20
- <span class="justify-end px-2 font-bold text-primary">
20
+ <span class="mb-2 justify-end px-2 text-lg font-bold text-primary">
21
21
  {totalCount}
22
22
  </span>
23
23
  {/if}
@@ -69,14 +69,7 @@
69
69
 
70
70
  {#if BROWSER || ssr}
71
71
  {#if svg || $$slots.default}
72
- <span
73
- class={getInfoProps(className)}
74
- style={getInfoProps(style)}
75
- style:width
76
- style:height
77
- {role}
78
- on:click
79
- >
72
+ <span class={getInfoProps(className)} style={getInfoProps(style)} style:width style:height {role}>
80
73
  <slot>
81
74
  {@html svg ?? ''}
82
75
  </slot>
@@ -89,7 +82,6 @@
89
82
  class={getInfoProps(className)}
90
83
  style={getInfoProps(style)}
91
84
  {role}
92
- on:click
93
85
  >
94
86
  {#each Array.isArray(path) ? path : [path] as d, i}
95
87
  <path
@@ -102,15 +94,7 @@
102
94
  </svg>
103
95
  {/if}
104
96
  {:else}
105
- <svg
106
- {width}
107
- {height}
108
- {viewBox}
109
- class={getInfoProps(className)}
110
- style={getInfoProps(style)}
111
- {role}
112
- on:click
113
- >
97
+ <svg {width} {height} {viewBox} class={getInfoProps(className)} style={getInfoProps(style)} {role}>
114
98
  <path
115
99
  d={LibIcon_Empty}
116
100
  fill="currentColor"
@@ -45,8 +45,6 @@ declare const Icon: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithC
45
45
  }, {
46
46
  default: {};
47
47
  }>, {
48
- click: MouseEvent;
49
- } & {
50
48
  [evt: string]: CustomEvent<any>;
51
49
  }, {
52
50
  default: {};
package/esm/ui/LibIcon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Lib Icons
2
2
  // https://icones.js.org/ and https://pictogrammers.com/library/mdi/
3
- import { mdiAccountTie, mdiAccountTieWoman, mdiCancel, mdiCheck, mdiCheckAll, mdiChevronDown, mdiChevronLeft, mdiChevronRight, mdiChevronUp, mdiCloseCircleOutline, mdiCogOutline, mdiContentSaveEdit, mdiDelete, mdiEye, mdiEyeOff, mdiLoading, mdiMagnify, mdiPencil, mdiPlusBoxMultiple, mdiPlusCircle, mdiSend, mdiSort, mdiSortReverseVariant, mdiSortVariant, } from '@mdi/js';
3
+ import { mdiAccountTie, mdiAccountTieWoman, mdiCancel, mdiCheck, mdiCheckAll, mdiChevronDown, mdiChevronLeft, mdiChevronRight, mdiChevronUp, mdiCloseCircleOutline, mdiCogOutline, mdiContentSaveEdit, mdiDelete, mdiEye, mdiEyeOff, mdiLoading, mdiMagnify, mdiPencil, mdiPlus, mdiPlusBoxMultiple, mdiSend, mdiSort, mdiSortReverseVariant, mdiSortVariant, } from '@mdi/js';
4
4
  export const LibIcon_Empty = ``;
5
5
  export const LibIcon_Forbidden = mdiCancel;
6
6
  export const LibIcon_ChevronDown = mdiChevronDown;
@@ -10,7 +10,7 @@ export const LibIcon_ChevronRight = mdiChevronRight;
10
10
  export const LibIcon_Search = mdiMagnify;
11
11
  export const LibIcon_Check = mdiCheck;
12
12
  export const LibIcon_MultiCheck = mdiCheckAll;
13
- export const LibIcon_Add = mdiPlusCircle;
13
+ export const LibIcon_Add = mdiPlus;
14
14
  export const LibIcon_Eye = mdiEye;
15
15
  export const LibIcon_EyeOff = mdiEyeOff;
16
16
  export const LibIcon_MultiAdd = mdiPlusBoxMultiple;
@@ -8,7 +8,7 @@
8
8
  <!-- To fix one capa & cadb are on the same css -->
9
9
  <div
10
10
  class={tw(
11
- 'skeleton flex h-4 w-full items-center justify-center rounded-lg bg-base-content/20',
11
+ 'flex h-4 skeleton items-center justify-center rounded-lg bg-base-content/20',
12
12
  extraClass,
13
13
  )}
14
14
  >
@@ -22,17 +22,18 @@
22
22
  })
23
23
  </script>
24
24
 
25
- <button type="button" class="trigger" {...$trigger} aria-label="Add">
25
+ <button type="button" class="trigger" {...$trigger} use:trigger aria-label="Add">
26
26
  <slot />
27
27
  </button>
28
28
  <!-- {hideTooltip} -->
29
29
  {#if $open && !hideTooltip && (text || $$slots.tooltip)}
30
30
  <div
31
31
  {...$content}
32
+ use:content
32
33
  transition:fade={{ duration: 100 }}
33
34
  class="z-30 rounded-lg bg-base-300 ring-1 ring-black"
34
35
  >
35
- <div {...$arrow}></div>
36
+ <div {...$arrow} use:arrow></div>
36
37
  <div class="px-4 py-1">
37
38
  {#if $$slots.tooltip}
38
39
  <slot name="tooltip" />
@@ -16,7 +16,7 @@
16
16
  >
17
17
  {@html toShow.children}
18
18
  <svelte:fragment slot="actions">
19
- <Button class="text-white" on:click={() => dialog.close(toShow.id, { success: true })}
19
+ <Button class="btn-primary" onclick={() => dialog.close(toShow.id, { success: true })}
20
20
  >Confirmer</Button
21
21
  >
22
22
  </svelte:fragment>
@@ -29,10 +29,7 @@
29
29
  >
30
30
  {@html toShow.children}
31
31
  <svelte:fragment slot="actions">
32
- <Button
33
- class="btn-outline btn-error"
34
- on:click={() => dialog.close(toShow.id, { success: true })}
35
- >
32
+ <Button class="btn-error" onclick={() => dialog.close(toShow.id, { success: true })}>
36
33
  Confirmer
37
34
  </Button>
38
35
  </svelte:fragment>
@@ -51,6 +48,18 @@
51
48
  {/if}
52
49
  </svelte:component>
53
50
  </DialogPrimitive>
51
+ {:else if toShow.componentS5}
52
+ <DialogPrimitive
53
+ detail={toShow.detail}
54
+ open
55
+ on:change={() => dialog.close(toShow.id, { success: false })}
56
+ >
57
+ <svelte:component this={toShow.componentS5} {...toShow.props} dialogId={toShow.id}>
58
+ {#if toShow.children}
59
+ {@html toShow.children}
60
+ {/if}
61
+ </svelte:component>
62
+ </DialogPrimitive>
54
63
  {:else if toShow.component}
55
64
  <DialogPrimitive
56
65
  detail={toShow.detail}
@@ -35,7 +35,7 @@
35
35
  <div
36
36
  {...$portalled}
37
37
  use:$portalled.action
38
- class="fixed top-0 z-50 flex h-full w-full items-center justify-center"
38
+ class="fixed top-0 z-40 flex h-full w-full items-center justify-center"
39
39
  >
40
40
  {#if $localOpen}
41
41
  <div
@@ -57,7 +57,7 @@
57
57
  {...$content}
58
58
  use:$content.action
59
59
  >
60
- <div class="left-0 top-0 mb-4 w-full">
60
+ <div class="top-0 left-0 mb-4 w-full">
61
61
  <h2 {...$localTitle} use:$localTitle.action class="m-0 text-lg font-medium">
62
62
  <div class="flex items-center justify-between gap-4">
63
63
  <LinkPlus item={detail}></LinkPlus>
@@ -65,8 +65,8 @@
65
65
  {...$close}
66
66
  use:$close.action
67
67
  aria-label="close"
68
- class="btn btn-circle btn-outline btn-lg
69
- h-max min-h-0 w-max border-none"
68
+ class="btn btn-circle h-max min-h-0
69
+ w-max border-none btn-outline btn-lg"
70
70
  >
71
71
  <Icon data={LibIcon_Cross}></Icon>
72
72
  </button>
@@ -26,8 +26,8 @@
26
26
  {#if wDelete}
27
27
  <Button
28
28
  type="button"
29
- on:click={dispatchDelete}
30
- class="btn-outline btn-error mr-4 text-white"
29
+ onclick={dispatchDelete}
30
+ class="mr-4 btn-error"
31
31
  isLoading={$store.loading}
32
32
  >
33
33
  <Icon data={LibIcon_Delete} />
@@ -41,7 +41,7 @@
41
41
  </div>
42
42
  </div>
43
43
 
44
- <Button class="text-white" {...$$restProps} isLoading={$store.loading}>
44
+ <Button class="btn-primary" {...$$restProps} isLoading={$store.loading}>
45
45
  <Icon data={LibIcon_Check} />
46
46
  <p>Sauvegarder</p>
47
47
  </Button>
@@ -54,7 +54,7 @@
54
54
  {/if}
55
55
  </div>
56
56
 
57
- <Button class="text-white" {...$$restProps} isLoading={$store.loading}>
57
+ <Button class="btn-primary" {...$$restProps} isLoading={$store.loading}>
58
58
  <Icon data={LibIcon_Add} />
59
59
  <p>{textCreate}</p>
60
60
  </Button>
@@ -1,6 +1,8 @@
1
- import type { SvelteComponent } from 'svelte';
1
+ import type { Component, SvelteComponent } from 'svelte';
2
2
  import { type Repository } from 'remult';
3
- import { type BaseItemLight, type CellsInput, type StoreItem } from '../../internals';
3
+ import type { BaseItemLight } from '../../internals/BaseEnum';
4
+ import type { CellsInput } from '../../internals/cellsBuildor';
5
+ import type { StoreItem } from '../../internals/storeItem';
4
6
  import type { FF_Repo } from '../../svelte';
5
7
  export type DialogClasses = {
6
8
  /**
@@ -18,6 +20,7 @@ export type DialogMetaData<entityType = any> = {
18
20
  defaults?: Partial<entityType>;
19
21
  classes?: DialogClasses;
20
22
  component?: new (...args: any[]) => SvelteComponent;
23
+ componentS5?: Component;
21
24
  props?: any;
22
25
  children?: any;
23
26
  reThrow?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { writable } from 'svelte/store';
2
2
  import {} from 'remult';
3
- import { LibIcon_Add, LibIcon_Delete, LibIcon_Edit, LibIcon_Search, } from '../../internals';
3
+ import { LibIcon_Add, LibIcon_Delete, LibIcon_Edit, LibIcon_Search } from '../LibIcon';
4
4
  const createDialogManagement = () => {
5
5
  const { subscribe, update } = writable([]);
6
6
  // internal...
@@ -18,7 +18,7 @@ const createDialogManagement = () => {
18
18
  confirm: (topic, text, icon) => {
19
19
  const detail = {
20
20
  detail: {
21
- caption: 'Confirmez',
21
+ caption: 'A Confirmer',
22
22
  icon: { data: icon },
23
23
  },
24
24
  children: `
package/esm/ui/index.d.ts CHANGED
@@ -3,3 +3,4 @@ import type { Cell } from '../internals';
3
3
  export type Align = 'text-left' | 'text-center' | 'text-right';
4
4
  export declare const align: (f?: FieldMetadata, isSlot?: boolean) => Align;
5
5
  export declare const getAligns: (cells: Cell<any>[], withAction: boolean) => Align[];
6
+ export declare const baseTable = "overflow-x-auto rounded-box bg-base-300/60";
package/esm/ui/index.js CHANGED
@@ -17,3 +17,4 @@ export const getAligns = (cells, withAction) => {
17
17
  }
18
18
  return cols;
19
19
  };
20
+ export const baseTable = 'overflow-x-auto rounded-box bg-base-300/60';