@supersoniks/concorde 3.2.5 → 3.2.8

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 (150) hide show
  1. package/README.md +163 -0
  2. package/build-infos.json +1 -1
  3. package/concorde-core.bundle.js +131 -124
  4. package/concorde-core.es.js +808 -716
  5. package/dist/concorde-core.bundle.js +131 -124
  6. package/dist/concorde-core.es.js +808 -716
  7. package/docs/assets/index-C0K6xugr.css +1 -0
  8. package/docs/assets/index-Dgl1lJQo.js +4861 -0
  9. package/docs/css/docs.css +0 -0
  10. package/docs/fonts/ClashGrotesk-Bold.eot +0 -0
  11. package/docs/fonts/ClashGrotesk-Bold.ttf +0 -0
  12. package/docs/fonts/ClashGrotesk-Bold.woff +0 -0
  13. package/docs/fonts/ClashGrotesk-Bold.woff2 +0 -0
  14. package/docs/fonts/ClashGrotesk-Extralight.eot +0 -0
  15. package/docs/fonts/ClashGrotesk-Extralight.ttf +0 -0
  16. package/docs/fonts/ClashGrotesk-Extralight.woff +0 -0
  17. package/docs/fonts/ClashGrotesk-Extralight.woff2 +0 -0
  18. package/docs/fonts/ClashGrotesk-Light.eot +0 -0
  19. package/docs/fonts/ClashGrotesk-Light.ttf +0 -0
  20. package/docs/fonts/ClashGrotesk-Light.woff +0 -0
  21. package/docs/fonts/ClashGrotesk-Light.woff2 +0 -0
  22. package/docs/fonts/ClashGrotesk-Medium.eot +0 -0
  23. package/docs/fonts/ClashGrotesk-Medium.ttf +0 -0
  24. package/docs/fonts/ClashGrotesk-Medium.woff +0 -0
  25. package/docs/fonts/ClashGrotesk-Medium.woff2 +0 -0
  26. package/docs/fonts/ClashGrotesk-Regular.eot +0 -0
  27. package/docs/fonts/ClashGrotesk-Regular.ttf +0 -0
  28. package/docs/fonts/ClashGrotesk-Regular.woff +0 -0
  29. package/docs/fonts/ClashGrotesk-Regular.woff2 +0 -0
  30. package/docs/fonts/ClashGrotesk-Semibold.eot +0 -0
  31. package/docs/fonts/ClashGrotesk-Semibold.ttf +0 -0
  32. package/docs/fonts/ClashGrotesk-Semibold.woff +0 -0
  33. package/docs/fonts/ClashGrotesk-Semibold.woff2 +0 -0
  34. package/docs/fonts/ClashGrotesk-Variable.eot +0 -0
  35. package/docs/fonts/ClashGrotesk-Variable.ttf +0 -0
  36. package/docs/fonts/ClashGrotesk-Variable.woff +0 -0
  37. package/docs/fonts/ClashGrotesk-Variable.woff2 +0 -0
  38. package/docs/img/concorde-icon.svg +5 -0
  39. package/docs/img/concorde-logo.svg +1 -0
  40. package/docs/img/concorde.png +0 -0
  41. package/docs/img/concorde_def.png +0 -0
  42. package/docs/img/concorde_seuil.png.webp +0 -0
  43. package/docs/img/concorde_seuil_invert.png +0 -0
  44. package/docs/img/paul_metrand.jpg +0 -0
  45. package/docs/img/paul_metrand_xs.jpg +0 -0
  46. package/docs/index.html +93 -0
  47. package/docs/src/core/components/functional/date/date.md +290 -0
  48. package/docs/src/core/components/functional/fetch/fetch.md +117 -0
  49. package/docs/src/core/components/functional/if/if.md +16 -0
  50. package/docs/src/core/components/functional/list/list.md +199 -0
  51. package/docs/src/core/components/functional/mix/mix.md +41 -0
  52. package/docs/src/core/components/functional/queue/queue.md +87 -0
  53. package/docs/src/core/components/functional/router/router.md +129 -0
  54. package/docs/src/core/components/functional/sdui/default-library.json +108 -0
  55. package/docs/src/core/components/functional/sdui/example.json +99 -0
  56. package/docs/src/core/components/functional/sdui/sdui.md +356 -0
  57. package/docs/src/core/components/functional/states/states.md +87 -0
  58. package/docs/src/core/components/functional/submit/submit.md +83 -0
  59. package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
  60. package/docs/src/core/components/functional/value/value.md +35 -0
  61. package/docs/src/core/components/ui/alert/alert.md +121 -0
  62. package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
  63. package/docs/src/core/components/ui/badge/badge.md +127 -0
  64. package/docs/src/core/components/ui/button/button.md +182 -0
  65. package/docs/src/core/components/ui/captcha/captcha.md +24 -0
  66. package/docs/src/core/components/ui/card/card.md +97 -0
  67. package/docs/src/core/components/ui/divider/divider.md +35 -0
  68. package/docs/src/core/components/ui/form/checkbox/checkbox.md +104 -0
  69. package/docs/src/core/components/ui/form/fieldset/fieldset.md +129 -0
  70. package/docs/src/core/components/ui/form/form-actions/form-actions.md +77 -0
  71. package/docs/src/core/components/ui/form/form-layout/form-layout.md +44 -0
  72. package/docs/src/core/components/ui/form/input/input.md +167 -0
  73. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +131 -0
  74. package/docs/src/core/components/ui/form/radio/radio.md +84 -0
  75. package/docs/src/core/components/ui/form/select/select.md +97 -0
  76. package/docs/src/core/components/ui/form/switch/switch.md +84 -0
  77. package/docs/src/core/components/ui/form/textarea/textarea.md +65 -0
  78. package/docs/src/core/components/ui/group/group.md +75 -0
  79. package/docs/src/core/components/ui/icon/icon.md +125 -0
  80. package/docs/src/core/components/ui/icon/icons.json +1 -0
  81. package/docs/src/core/components/ui/image/image.md +107 -0
  82. package/docs/src/core/components/ui/link/link.md +43 -0
  83. package/docs/src/core/components/ui/loader/loader.md +67 -0
  84. package/docs/src/core/components/ui/menu/menu.md +288 -0
  85. package/docs/src/core/components/ui/modal/modal.md +123 -0
  86. package/docs/src/core/components/ui/pop/pop.md +96 -0
  87. package/docs/src/core/components/ui/progress/progress.md +63 -0
  88. package/docs/src/core/components/ui/table/table.md +455 -0
  89. package/docs/src/core/components/ui/tooltip/tooltip.md +82 -0
  90. package/docs/src/docs/_core-concept/overview.md +57 -0
  91. package/docs/src/docs/_core-concept/subscriber.md +76 -0
  92. package/docs/src/docs/_getting-started/concorde-outside.md +143 -0
  93. package/docs/src/docs/_getting-started/create-a-component.md +137 -0
  94. package/docs/src/docs/_getting-started/my-first-subscriber.md +174 -0
  95. package/docs/src/docs/_getting-started/pubsub.md +150 -0
  96. package/docs/src/docs/_getting-started/start.md +39 -0
  97. package/docs/src/docs/_getting-started/theming.md +91 -0
  98. package/docs/src/docs/search/docs-search.json +3917 -0
  99. package/docs/src/tag-list.json +1 -0
  100. package/docs/src/tsconfig-model.json +23 -0
  101. package/docs/src/tsconfig.json +918 -0
  102. package/docs/svg/regular/plane.svg +1 -0
  103. package/docs/svg/solid/plane.svg +1 -0
  104. package/mcp-server/COMPARISON-MCP.md +176 -0
  105. package/mcp-server/README-MCP-NODEJS.md +284 -0
  106. package/mcp-server/README-MCP.md +114 -0
  107. package/mcp-server/README.md +127 -0
  108. package/mcp-server/TECHNICAL-DOCS.md +269 -0
  109. package/mcp-server/concorde-mcp-server.js +859 -0
  110. package/mcp-server/concorde-mcp-server.py +801 -0
  111. package/mcp-server/cursor-mcp-config-advanced.json +68 -0
  112. package/mcp-server/cursor-mcp-config-nodejs.json +74 -0
  113. package/mcp-server/cursor-mcp-config.json +11 -0
  114. package/mcp-server/install-mcp-nodejs.sh +104 -0
  115. package/mcp-server/install-mcp.sh +62 -0
  116. package/mcp-server/package-lock.json +147 -0
  117. package/mcp-server/package-mcp.json +40 -0
  118. package/mcp-server/package.json +40 -0
  119. package/mcp-server/test-mcp.js +107 -0
  120. package/mcp-server/test-mcp.py +73 -0
  121. package/package.json +2 -1
  122. package/php/get-challenge.php +34 -0
  123. package/php/some-service.php +42 -0
  124. package/src/core/components/functional/fetch/fetch.md +6 -0
  125. package/src/core/components/functional/queue/queue.demo.ts +0 -0
  126. package/src/core/components/functional/sdui/sdui.ts +47 -22
  127. package/src/core/components/ui/form/checkbox/checkbox.ts +6 -0
  128. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +9 -1
  129. package/src/core/components/ui/form/radio/radio.ts +11 -1
  130. package/src/core/components/ui/icon/icons.ts +0 -0
  131. package/src/core/components/ui/menu/menu.md +0 -0
  132. package/src/core/components/ui/modal/modal-close.ts +0 -0
  133. package/src/core/components/ui/modal/modal.ts +0 -0
  134. package/src/core/components/ui/toast/toast-item.ts +68 -2
  135. package/src/core/components/ui/toast/toast.md +166 -0
  136. package/src/core/components/ui/toast/toast.ts +1 -1
  137. package/src/core/components/ui/tooltip/tooltip.ts +67 -2
  138. package/src/core/decorators/Subscriber.ts +0 -0
  139. package/src/core/mixins/Fetcher.ts +40 -4
  140. package/src/core/utils/HTML.ts +2 -0
  141. package/src/core/utils/PublisherProxy.ts +0 -0
  142. package/src/core/utils/api.ts +7 -0
  143. package/src/decorators.ts +0 -0
  144. package/src/docs/navigation/navigation.ts +1 -1
  145. package/src/docs/search/docs-search.json +135 -0
  146. package/src/docs.ts +0 -0
  147. package/src/tsconfig-model.json +0 -0
  148. package/src/tsconfig.json +0 -0
  149. package/src/tsconfig.tsbuildinfo +0 -0
  150. package/templates-test.html +0 -0
@@ -0,0 +1,166 @@
1
+ # Toast
2
+
3
+ ## Utilisation de base
4
+
5
+ <sonic-code>
6
+ <template>
7
+ <sonic-button onclick="window.SonicToast.add({ text: 'Message de notification simple' })">
8
+ Afficher un toast
9
+ </sonic-button>
10
+ </template>
11
+ </sonic-code>
12
+
13
+ ## Statut
14
+
15
+ Les statuts disponibles sont : `success`, `error`, `warning`, `info` ou vide (par défaut).
16
+
17
+ <sonic-code>
18
+ <template>
19
+ <div class="flex flex-wrap gap-2">
20
+ <sonic-button onclick="window.SonicToast.add({ text: 'Message par défaut', status: '' })">
21
+ Default
22
+ </sonic-button>
23
+ <sonic-button onclick="window.SonicToast.add({ text: 'Opération réussie !', status: 'success' })">
24
+ Success
25
+ </sonic-button>
26
+ <sonic-button onclick="window.SonicToast.add({ text: 'Une erreur est survenue', status: 'error' })">
27
+ Error
28
+ </sonic-button>
29
+ <sonic-button onclick="window.SonicToast.add({ text: 'Attention à ce point', status: 'warning' })">
30
+ Warning
31
+ </sonic-button>
32
+ <sonic-button onclick="window.SonicToast.add({ text: 'Information importante', status: 'info' })">
33
+ Info
34
+ </sonic-button>
35
+ </div>
36
+ </template>
37
+ </sonic-code>
38
+
39
+ ## Avec titre
40
+
41
+ <sonic-code>
42
+ <template>
43
+ <div class="flex flex-wrap gap-2">
44
+ <sonic-button onclick="window.SonicToast.add({ title: 'Succès', text: 'Votre demande a été traitée avec succès.', status: 'success' })">
45
+ Toast avec titre
46
+ </sonic-button>
47
+ <sonic-button onclick="window.SonicToast.add({ title: 'Test', text: 'Une erreur est survenue lors du traitement.', status: 'error' })">
48
+ Toast d'erreur avec titre
49
+ </sonic-button>
50
+ </div>
51
+ </template>
52
+ </sonic-code>
53
+
54
+ ## Avec contenu HTML
55
+
56
+ Le contenu du toast peut contenir du HTML.
57
+
58
+ <sonic-code>
59
+ <template>
60
+ <sonic-button onclick="window.SonicToast.add({ text: 'Message avec <strong>HTML</strong> et un <a href=&quot;#&quot;>lien cliquable</a>', status: 'info' })">
61
+ Toast avec HTML
62
+ </sonic-button>
63
+ </template>
64
+ </sonic-code>
65
+
66
+
67
+ ## Persistance
68
+
69
+ Par défaut, les toasts disparaissent automatiquement. Avec `preserve: true`, le toast reste affiché jusqu'à ce qu'il soit fermé manuellement.
70
+
71
+ <sonic-code>
72
+ <template>
73
+ <sonic-button onclick="window.SonicToast.add({ text: 'Ce toast ne disparaîtra pas automatiquement', status: 'info', preserve: true })">
74
+ Toast persistant
75
+ </sonic-button>
76
+ </template>
77
+ </sonic-code>
78
+
79
+ ## Masquer définitivement
80
+
81
+ Avec `dismissForever: true` et un `id`, le toast peut être masqué définitivement. Une fois fermé, il ne réapparaîtra plus même après rechargement de la page.
82
+
83
+ <sonic-code>
84
+ <template>
85
+ <sonic-button onclick="window.SonicToast.add({ id: 'unique-toast-id', text: 'Ce toast peut être masqué définitivement', status: 'info', dismissForever: true })">
86
+ Toast avec dismiss forever
87
+ </sonic-button>
88
+ </template>
89
+ </sonic-code>
90
+
91
+ ## Fantôme
92
+
93
+ Avec `ghost: true`, le toast devient semi-transparent et non-interactif.
94
+
95
+ <sonic-code>
96
+ <template>
97
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast fantôme (semi-transparent)', status: 'info', ghost: true })">
98
+ Toast ghost
99
+ </sonic-button>
100
+ </template>
101
+ </sonic-code>
102
+
103
+
104
+ ## Méthodes de suppression
105
+
106
+ ### Tout supprimer
107
+
108
+ Supprime tous les toasts sauf ceux marqués comme `ghost`.
109
+
110
+ <sonic-code>
111
+ <template>
112
+ <div class="flex flex-wrap gap-2">
113
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast 1', status: 'info' })">Ajouter toast 1</sonic-button>
114
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast 2', status: 'success' })">Ajouter toast 2</sonic-button>
115
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast 3', status: 'warning' })">Ajouter toast 3</sonic-button>
116
+ <sonic-button onclick="window.SonicToast.removeAll()">Supprimer tous</sonic-button>
117
+ </div>
118
+ </template>
119
+ </sonic-code>
120
+
121
+ ### Supprimer par statut
122
+
123
+ Supprime tous les toasts d'un statut spécifique.
124
+
125
+ <sonic-code>
126
+ <template>
127
+ <div class="flex flex-wrap gap-2">
128
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast success', status: 'success' })">Success</sonic-button>
129
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast error', status: 'error' })">Error</sonic-button>
130
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast warning', status: 'warning' })">Warning</sonic-button>
131
+ <sonic-button onclick="window.SonicToast.removeItemsByStatus('success')">Supprimer success</sonic-button>
132
+ <sonic-button onclick="window.SonicToast.removeItemsByStatus('error')">Supprimer error</sonic-button>
133
+ </div>
134
+ </template>
135
+ </sonic-code>
136
+
137
+ ### Supprimer les éléments temporaires
138
+
139
+ Supprime tous les toasts qui ne sont pas marqués comme `preserve`.
140
+
141
+ <sonic-code>
142
+ <template>
143
+ <div class="flex flex-wrap gap-2">
144
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast temporaire', status: 'info' })">Temporaire</sonic-button>
145
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast persistant', status: 'success', preserve: true })">Persistant</sonic-button>
146
+ <sonic-button onclick="window.SonicToast.removeTemporaryItems()">Supprimer temporaires</sonic-button>
147
+ </div>
148
+ </template>
149
+ </sonic-code>
150
+
151
+ ## Exemple complet
152
+
153
+ <sonic-code>
154
+ <template>
155
+ <sonic-button onclick="window.SonicToast.add({
156
+ id: 'welcome-toast',
157
+ title: 'Bienvenue',
158
+ text: 'Bienvenue sur notre plateforme ! Vous pouvez commencer à explorer les fonctionnalités.',
159
+ status: 'success',
160
+ dismissForever: true
161
+ })">
162
+ Toast complet
163
+ </sonic-button>
164
+ </template>
165
+ </sonic-code>
166
+
@@ -56,7 +56,7 @@ export class SonicToast extends LitElement {
56
56
  SonicToast.handleExistingToastDelegation();
57
57
  if (!this.toasts) return nothing;
58
58
 
59
- return html`<div aria-live="polite" style=${styleMap(styles)}>
59
+ return html`<div style=${styleMap(styles)}>
60
60
  ${repeat(
61
61
  this.toasts,
62
62
  (item) => item.id,
@@ -36,9 +36,8 @@ export class Tooltip extends LitElement {
36
36
  will-change: opacity, transform;
37
37
  }
38
38
 
39
- /* désactive au focus-within cause persistance du tooltip au clic */
40
- /* :host(:focus-within) .tooltip:before, */
41
39
  :host(:focus-visible) .tooltip:before,
40
+ :host(.keyboard-focus) .tooltip:before,
42
41
  .tooltip:hover:before {
43
42
  opacity: 1;
44
43
  scale: 1;
@@ -132,12 +131,78 @@ export class Tooltip extends LitElement {
132
131
  @property({ type: Boolean }) disabled = false;
133
132
  @property({ type: Boolean }) focusable = false;
134
133
 
134
+ private lastKeyWasTab = false;
135
+ private boundHandleKeyDown: (e: KeyboardEvent) => void;
136
+ private boundHandleMouseDown: () => void;
137
+
138
+ constructor() {
139
+ super();
140
+ this.boundHandleKeyDown = this.handleKeyDown.bind(this);
141
+ this.boundHandleMouseDown = this.handleMouseDown.bind(this);
142
+ }
143
+
144
+ private handleKeyDown = (e: KeyboardEvent) => {
145
+ // Détecter si Tab ou Shift+Tab a été pressé
146
+ if (e.key === "Tab") {
147
+ this.lastKeyWasTab = true;
148
+ }
149
+ };
150
+
151
+ private handleMouseDown = () => {
152
+ // Réinitialiser le flag si la souris est utilisée
153
+ this.lastKeyWasTab = false;
154
+ // Retirer la classe si elle existe (au cas où)
155
+ this.classList.remove("keyboard-focus");
156
+ };
157
+
158
+ private handleFocusIn = () => {
159
+ // Ajouter la classe seulement si le focus est venu du clavier (Tab)
160
+ if (this.lastKeyWasTab) {
161
+ this.classList.add("keyboard-focus");
162
+ }
163
+ this.lastKeyWasTab = false;
164
+ };
165
+
166
+ private handleFocusOut = () => {
167
+ this.classList.remove("keyboard-focus");
168
+ this.lastKeyWasTab = false;
169
+ };
170
+
171
+ connectedCallback() {
172
+ super.connectedCallback();
173
+ this.addEventListener("focusin", this.handleFocusIn);
174
+ this.addEventListener("focusout", this.handleFocusOut);
175
+ // Écouter les événements au niveau du document avec capture pour détecter Tab
176
+ document.addEventListener("keydown", this.boundHandleKeyDown, true);
177
+ document.addEventListener("mousedown", this.boundHandleMouseDown, true);
178
+ }
179
+
180
+ disconnectedCallback() {
181
+ super.disconnectedCallback();
182
+ this.removeEventListener("focusin", this.handleFocusIn);
183
+ this.removeEventListener("focusout", this.handleFocusOut);
184
+ document.removeEventListener("keydown", this.boundHandleKeyDown, true);
185
+ document.removeEventListener("mousedown", this.boundHandleMouseDown, true);
186
+ }
187
+
135
188
  protected willUpdate(_changedProperties: PropertyValues): void {
136
189
  if (_changedProperties.has("disabled")) {
137
190
  const wasDisabledBefore = _changedProperties.get("disabled") === true;
138
191
  if (this.disabled) {
139
192
  this.setAttribute("tabindex", "-1");
193
+ this.classList.remove("keyboard-focus");
140
194
  } else if (!this.disabled && wasDisabledBefore) {
195
+ if (this.focusable) {
196
+ this.setAttribute("tabindex", "0");
197
+ } else {
198
+ this.removeAttribute("tabindex");
199
+ }
200
+ }
201
+ }
202
+ if (_changedProperties.has("focusable")) {
203
+ if (this.focusable && !this.disabled) {
204
+ this.setAttribute("tabindex", "0");
205
+ } else if (!this.focusable && !this.disabled) {
141
206
  this.removeAttribute("tabindex");
142
207
  }
143
208
  }
File without changes
@@ -121,6 +121,33 @@ const Fetcher = <
121
121
  @property({ type: Number }) refetchEveryMs = 0;
122
122
  refetchTimeOutId?: ReturnType<typeof setTimeout>;
123
123
 
124
+ /**
125
+ * _isFetching est une propriété sensée privée qui permet de savoir si un fetch est en cours
126
+ * Elle ne peut pas etre veritablement privée actuellement en raison d'une limitation contextuelle a traiter
127
+ */
128
+ _isFetching = false;
129
+
130
+ /**
131
+ * _mustRefetch est une propriété sensée privée qui permet de savoir si un fetch est en cours
132
+ * Elle ne peut pas etre veritablement privée actuellement en raison d'une limitation contextuelle a traiter
133
+ */
134
+ _mustRefetch = false;
135
+ handleStartFetching(): "fetching" | "okToFetch" {
136
+ if (this._isFetching) {
137
+ this._mustRefetch = true;
138
+ return "fetching";
139
+ }
140
+ this._isFetching = true;
141
+ return "okToFetch";
142
+ }
143
+
144
+ handleEndFetching() {
145
+ this._isFetching = false;
146
+ if (this._mustRefetch) {
147
+ this._mustRefetch = false;
148
+ this._fetchData();
149
+ }
150
+ }
124
151
  /**
125
152
  *
126
153
  * C'est ici que les données sont chargées via l'utilitaire API
@@ -156,10 +183,19 @@ const Fetcher = <
156
183
  });
157
184
  }
158
185
 
159
- let data = await this.api.get<PropsType>(
160
- this.endPoint || this.dataProvider || "",
161
- headerData
162
- );
186
+ const fetchStatus = this.handleStartFetching();
187
+ if (fetchStatus === "fetching") {
188
+ return;
189
+ }
190
+ let data = null;
191
+ try {
192
+ data = await this.api.get<PropsType>(
193
+ this.endPoint || this.dataProvider || "",
194
+ headerData
195
+ );
196
+ } catch (_error) {}
197
+
198
+ this.handleEndFetching();
163
199
 
164
200
  this.fetchedData = data;
165
201
  if (this.api.lastResult && !this.api.lastResult.ok) {
@@ -105,6 +105,7 @@ class HTML {
105
105
  ) as RequestCredentials) || undefined;
106
106
  const cache = (node as Element).getAttribute("cache") as RequestCache;
107
107
  const blockUntilDone = (node as Element).hasAttribute("blockUntilDone");
108
+ const keepAlive = (node as Element).hasAttribute("keepAlive");
108
109
  return {
109
110
  serviceURL,
110
111
  token,
@@ -116,6 +117,7 @@ class HTML {
116
117
  credentials,
117
118
  cache,
118
119
  blockUntilDone,
120
+ keepAlive,
119
121
  };
120
122
  }
121
123
 
File without changes
@@ -17,6 +17,7 @@ export type APIConfiguration = {
17
17
  addHTTPResponse?: boolean;
18
18
  credentials?: RequestCredentials;
19
19
  cache?: RequestCache;
20
+ keepAlive?: boolean;
20
21
  };
21
22
  export type CallState = "loading" | "done" | "error" | undefined;
22
23
  export type ResultTypeInterface = CoreJSType & {
@@ -128,6 +129,7 @@ class API {
128
129
  lastResult?: Response;
129
130
  isServiceSimulated = false;
130
131
  blockUntilDone = false;
132
+ keepAlive = false;
131
133
  constructor(config: APIConfiguration) {
132
134
  this.serviceURL = config.serviceURL;
133
135
  this.blockUntilDone = config.blockUntilDone || false;
@@ -143,6 +145,7 @@ class API {
143
145
  this.addHTTPResponse = config.addHTTPResponse || false;
144
146
  this.credentials = config.credentials;
145
147
  this.cache = config.cache || "default";
148
+ this.keepAlive = config.keepAlive || false;
146
149
  }
147
150
  async handleResult(
148
151
  fetchResult: Response,
@@ -235,6 +238,7 @@ class API {
235
238
  {
236
239
  headers: headers,
237
240
  credentials: this.credentials,
241
+ keepalive: this.keepAlive,
238
242
  }
239
243
  );
240
244
 
@@ -384,6 +388,7 @@ class API {
384
388
  headers: headers,
385
389
  credentials: this.credentials,
386
390
  cache: this.cache,
391
+ keepalive: this.keepAlive,
387
392
  });
388
393
  const handledResult = await this.handleResult(result, lastCall);
389
394
  resolve(handledResult);
@@ -455,6 +460,7 @@ class API {
455
460
  credentials: this.credentials,
456
461
  method: method,
457
462
  body: JSON.stringify(data),
463
+ keepalive: this.keepAlive,
458
464
  });
459
465
  return (await this.handleResult(result, lastCall)) as T &
460
466
  ResultTypeInterface;
@@ -486,6 +492,7 @@ class API {
486
492
  credentials: this.credentials,
487
493
  method: method,
488
494
  body: formData,
495
+ keepalive: this.keepAlive,
489
496
  });
490
497
  return (await this.handleResult(result, lastCall)) as T &
491
498
  ResultTypeInterface;
package/src/decorators.ts CHANGED
File without changes
@@ -127,7 +127,7 @@ export class DocsNavigation extends LitElement {
127
127
  href: "#core/components/ui/form/textarea/textarea.md/textarea",
128
128
  },
129
129
  { label: "Theme", href: "#" },
130
- { label: "Toast", href: "#" },
130
+ { label: "Toast", href: "#core/components/ui/toast/toast.md/toast" },
131
131
  {
132
132
  label: "Tooltip",
133
133
  href: "#core/components/ui/tooltip/tooltip.md/tooltip",
@@ -2279,6 +2279,141 @@
2279
2279
  }
2280
2280
  }
2281
2281
  },
2282
+ {
2283
+ "search": "Toast",
2284
+ "files": {
2285
+ "core/components/ui/toast/toast.md": {
2286
+ "title": "Toast",
2287
+ "hashes": {
2288
+ "toast": {
2289
+ "count": 1,
2290
+ "title": "",
2291
+ "type": "page"
2292
+ }
2293
+ }
2294
+ }
2295
+ }
2296
+ },
2297
+ {
2298
+ "search": "Les statuts disponibles sont : success, error, warning, info ou vide (par défaut).\n",
2299
+ "files": {
2300
+ "core/components/ui/toast/toast.md": {
2301
+ "title": "Toast",
2302
+ "hashes": {
2303
+ "statut": {
2304
+ "count": 1,
2305
+ "title": "Statut",
2306
+ "type": "paragraph"
2307
+ }
2308
+ }
2309
+ }
2310
+ }
2311
+ },
2312
+ {
2313
+ "search": "Le contenu du toast peut contenir du HTML.\n",
2314
+ "files": {
2315
+ "core/components/ui/toast/toast.md": {
2316
+ "title": "Toast",
2317
+ "hashes": {
2318
+ "avec-contenu-html": {
2319
+ "count": 1,
2320
+ "title": "Avec contenu HTML",
2321
+ "type": "paragraph"
2322
+ }
2323
+ }
2324
+ }
2325
+ }
2326
+ },
2327
+ {
2328
+ "search": "Par défaut, les toasts disparaissent automatiquement. Avec preserve: true, le toast reste affiché jusqu&#39;à ce qu&#39;il soit fermé manuellement.\n",
2329
+ "files": {
2330
+ "core/components/ui/toast/toast.md": {
2331
+ "title": "Toast",
2332
+ "hashes": {
2333
+ "persistance": {
2334
+ "count": 1,
2335
+ "title": "Persistance",
2336
+ "type": "paragraph"
2337
+ }
2338
+ }
2339
+ }
2340
+ }
2341
+ },
2342
+ {
2343
+ "search": "Avec dismissForever: true et un id, le toast peut être masqué définitivement. Une fois fermé, il ne réapparaîtra plus même après rechargement de la page.\n",
2344
+ "files": {
2345
+ "core/components/ui/toast/toast.md": {
2346
+ "title": "Toast",
2347
+ "hashes": {
2348
+ "masquer-définitivement": {
2349
+ "count": 1,
2350
+ "title": "Masquer définitivement",
2351
+ "type": "paragraph"
2352
+ }
2353
+ }
2354
+ }
2355
+ }
2356
+ },
2357
+ {
2358
+ "search": "Avec ghost: true, le toast devient semi-transparent et non-interactif.\n",
2359
+ "files": {
2360
+ "core/components/ui/toast/toast.md": {
2361
+ "title": "Toast",
2362
+ "hashes": {
2363
+ "fantôme": {
2364
+ "count": 1,
2365
+ "title": "Fantôme",
2366
+ "type": "paragraph"
2367
+ }
2368
+ }
2369
+ }
2370
+ }
2371
+ },
2372
+ {
2373
+ "search": "Supprime tous les toasts sauf ceux marqués comme ghost.\n",
2374
+ "files": {
2375
+ "core/components/ui/toast/toast.md": {
2376
+ "title": "Toast",
2377
+ "hashes": {
2378
+ "tout-supprimer": {
2379
+ "count": 1,
2380
+ "title": "Tout supprimer",
2381
+ "type": "paragraph"
2382
+ }
2383
+ }
2384
+ }
2385
+ }
2386
+ },
2387
+ {
2388
+ "search": "Supprime tous les toasts d&#39;un statut spécifique.\n",
2389
+ "files": {
2390
+ "core/components/ui/toast/toast.md": {
2391
+ "title": "Toast",
2392
+ "hashes": {
2393
+ "supprimer-par-statut": {
2394
+ "count": 1,
2395
+ "title": "Supprimer par statut",
2396
+ "type": "paragraph"
2397
+ }
2398
+ }
2399
+ }
2400
+ }
2401
+ },
2402
+ {
2403
+ "search": "Supprime tous les toasts qui ne sont pas marqués comme preserve.\n",
2404
+ "files": {
2405
+ "core/components/ui/toast/toast.md": {
2406
+ "title": "Toast",
2407
+ "hashes": {
2408
+ "supprimer-les-éléments-temporaires": {
2409
+ "count": 1,
2410
+ "title": "Supprimer les éléments temporaires",
2411
+ "type": "paragraph"
2412
+ }
2413
+ }
2414
+ }
2415
+ }
2416
+ },
2282
2417
  {
2283
2418
  "search": "Tooltip",
2284
2419
  "files": {
package/src/docs.ts CHANGED
File without changes
File without changes
package/src/tsconfig.json CHANGED
File without changes
File without changes
File without changes