@quazardous/qdadm 2.38.0 → 2.39.0

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.
@@ -174,6 +174,36 @@ export default `core:
174
174
  invalidCredentials: Invalid credentials
175
175
  configError: Configuration Error
176
176
  noAuthAdapter: No auth adapter configured
177
+ # Identity provider first (#4321)
178
+ sso: Sign in
179
+ providerHome: My account
180
+ localFallback: Alternative login
181
+ localSection: Alternative login
182
+ noSso: No sign-in flow configured for this button
183
+ # CardsDashboard (#4320)
184
+ cardsDashboard:
185
+ customise: Customise
186
+ done: Done
187
+ reset: Reset
188
+ resetDone: Default arrangement restored
189
+ hidden: Hidden cards
190
+ noneHidden: None
191
+ move: "Move {title}"
192
+ moved: "{title}: card {position} of {total}"
193
+ help: Arrow keys move the card, Home and End to the start or the end
194
+ dragCancelled: Move cancelled
195
+ pin: "Pin {title} at the top"
196
+ unpin: "Unpin {title}"
197
+ pinnedOne: "{title} pinned at the top"
198
+ unpinnedOne: "{title} unpinned"
199
+ hide: "Hide {title}"
200
+ hiddenOne: "{title} hidden"
201
+ restore: "Show {title}"
202
+ restoredOne: "{title} shown"
203
+ show: Show
204
+ trayView: Show hidden cards as
205
+ viewCards: Cards
206
+ viewCompact: Compact
177
207
  # NotificationPanel and NotificationBadge (#4171)
178
208
  notifications:
179
209
  title: Notifications
@@ -172,6 +172,36 @@ core:
172
172
  invalidCredentials: Invalid credentials
173
173
  configError: Configuration Error
174
174
  noAuthAdapter: No auth adapter configured
175
+ # Identity provider first (#4321)
176
+ sso: Sign in
177
+ providerHome: My account
178
+ localFallback: Alternative login
179
+ localSection: Alternative login
180
+ noSso: No sign-in flow configured for this button
181
+ # CardsDashboard (#4320)
182
+ cardsDashboard:
183
+ customise: Customise
184
+ done: Done
185
+ reset: Reset
186
+ resetDone: Default arrangement restored
187
+ hidden: Hidden cards
188
+ noneHidden: None
189
+ move: "Move {title}"
190
+ moved: "{title}: card {position} of {total}"
191
+ help: Arrow keys move the card, Home and End to the start or the end
192
+ dragCancelled: Move cancelled
193
+ pin: "Pin {title} at the top"
194
+ unpin: "Unpin {title}"
195
+ pinnedOne: "{title} pinned at the top"
196
+ unpinnedOne: "{title} unpinned"
197
+ hide: "Hide {title}"
198
+ hiddenOne: "{title} hidden"
199
+ restore: "Show {title}"
200
+ restoredOne: "{title} shown"
201
+ show: Show
202
+ trayView: Show hidden cards as
203
+ viewCards: Cards
204
+ viewCompact: Compact
175
205
  # NotificationPanel and NotificationBadge (#4171)
176
206
  notifications:
177
207
  title: Notifications
@@ -174,6 +174,36 @@ export default `core:
174
174
  invalidCredentials: Identifiants invalides
175
175
  configError: Erreur de configuration
176
176
  noAuthAdapter: Aucun adaptateur d'authentification configuré
177
+ # Identity provider first (#4321)
178
+ sso: Se connecter
179
+ providerHome: Mon compte
180
+ localFallback: Login alternatif
181
+ localSection: Login alternatif
182
+ noSso: Aucun parcours de connexion configuré pour ce bouton
183
+ # CardsDashboard (#4320)
184
+ cardsDashboard:
185
+ customise: Personnaliser
186
+ done: Terminé
187
+ reset: Réinitialiser
188
+ resetDone: Disposition par défaut rétablie
189
+ hidden: Cartes masquées
190
+ noneHidden: Aucune
191
+ move: "Déplacer {title}"
192
+ moved: "{title} : carte {position} sur {total}"
193
+ help: Les flèches déplacent la carte, Début et Fin vers le début ou la fin
194
+ dragCancelled: Déplacement annulé
195
+ pin: "Épingler {title} en haut"
196
+ unpin: "Désépingler {title}"
197
+ pinnedOne: "{title} épinglée en haut"
198
+ unpinnedOne: "{title} désépinglée"
199
+ hide: "Masquer {title}"
200
+ hiddenOne: "{title} masquée"
201
+ restore: "Afficher {title}"
202
+ restoredOne: "{title} affichée"
203
+ show: Afficher
204
+ trayView: Afficher les cartes masquées en
205
+ viewCards: Cartes
206
+ viewCompact: Compact
177
207
  # NotificationPanel and NotificationBadge (#4171)
178
208
  notifications:
179
209
  title: Notifications
@@ -172,6 +172,36 @@ core:
172
172
  invalidCredentials: Identifiants invalides
173
173
  configError: Erreur de configuration
174
174
  noAuthAdapter: Aucun adaptateur d'authentification configuré
175
+ # Identity provider first (#4321)
176
+ sso: Se connecter
177
+ providerHome: Mon compte
178
+ localFallback: Login alternatif
179
+ localSection: Login alternatif
180
+ noSso: Aucun parcours de connexion configuré pour ce bouton
181
+ # CardsDashboard (#4320)
182
+ cardsDashboard:
183
+ customise: Personnaliser
184
+ done: Terminé
185
+ reset: Réinitialiser
186
+ resetDone: Disposition par défaut rétablie
187
+ hidden: Cartes masquées
188
+ noneHidden: Aucune
189
+ move: "Déplacer {title}"
190
+ moved: "{title} : carte {position} sur {total}"
191
+ help: Les flèches déplacent la carte, Début et Fin vers le début ou la fin
192
+ dragCancelled: Déplacement annulé
193
+ pin: "Épingler {title} en haut"
194
+ unpin: "Désépingler {title}"
195
+ pinnedOne: "{title} épinglée en haut"
196
+ unpinnedOne: "{title} désépinglée"
197
+ hide: "Masquer {title}"
198
+ hiddenOne: "{title} masquée"
199
+ restore: "Afficher {title}"
200
+ restoredOne: "{title} affichée"
201
+ show: Afficher
202
+ trayView: Afficher les cartes masquées en
203
+ viewCards: Cartes
204
+ viewCompact: Compact
175
205
  # NotificationPanel and NotificationBadge (#4171)
176
206
  notifications:
177
207
  title: Notifications
package/src/index.ts CHANGED
@@ -381,6 +381,15 @@ export {
381
381
  type AppBannerStore,
382
382
  type UseAppBannerReturn,
383
383
  } from './composables/useAppBanner'
384
+ export {
385
+ useCardsArrangement,
386
+ reconcileArrangement,
387
+ defaultArrangement,
388
+ type CardDef,
389
+ type CardsArrangement,
390
+ type CardsGroups,
391
+ type UseCardsArrangementReturn,
392
+ } from './composables/useCardsArrangement'
384
393
  export {
385
394
  useUserImpersonator,
386
395
  type UseUserImpersonatorOptions,
@@ -476,6 +485,7 @@ export {
476
485
  type ZoneDetailInfo,
477
486
  type ZoneInspection,
478
487
  type ZoneRegistryOptions,
488
+ type BlockCard,
479
489
  // BlockConfig - already exported from kernel
480
490
  } from './zones/ZoneRegistry'
481
491
  export {
@@ -0,0 +1,189 @@
1
+ /**
2
+ * CardsDashboard (#4320): an auto grid of cards, an edit bar on each card in
3
+ * edit mode, the hidden cards' tray.
4
+ */
5
+
6
+ .qd-cards-dashboard {
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: 0.75rem;
10
+ }
11
+
12
+ .qd-cards-toolbar {
13
+ display: flex;
14
+ justify-content: flex-end;
15
+ gap: 0.5rem;
16
+ }
17
+
18
+ .qd-cards-grid {
19
+ container-type: inline-size;
20
+ display: grid;
21
+ grid-template-columns: repeat(auto-fill, minmax(min(var(--qd-card-min, 18rem), 100%), 1fr));
22
+ gap: 1rem;
23
+ }
24
+
25
+ .qd-cards-slot {
26
+ grid-column: span var(--qd-card-span, 1);
27
+ display: flex;
28
+ flex-direction: column;
29
+ min-width: 0;
30
+
31
+ > :not(.qd-cards-bar) {
32
+ flex: 1;
33
+ }
34
+ }
35
+
36
+ // Too narrow for a wide card: it takes one column like the others
37
+ @container (max-width: 40rem) {
38
+ .qd-cards-slot {
39
+ grid-column: auto;
40
+ }
41
+ }
42
+
43
+ .qd-cards-editing .qd-cards-slot {
44
+ outline: 1px dashed var(--p-content-border-color, #d1d5db);
45
+ outline-offset: 4px;
46
+ border-radius: var(--p-content-border-radius, 6px);
47
+ }
48
+
49
+ .qd-cards-editing .qd-cards-pinned {
50
+ outline-color: var(--p-primary-color);
51
+ }
52
+
53
+ .qd-cards-dragging {
54
+ opacity: 0.6;
55
+ outline: 2px solid var(--p-primary-color) !important;
56
+ }
57
+
58
+ .qd-cards-bar {
59
+ display: flex;
60
+ align-items: center;
61
+ gap: 0.25rem;
62
+ margin-bottom: 0.5rem;
63
+ font-size: 0.875rem;
64
+ color: var(--p-text-muted-color, #6b7280);
65
+ }
66
+
67
+ .qd-cards-title {
68
+ flex: 1;
69
+ min-width: 0;
70
+ overflow: hidden;
71
+ text-overflow: ellipsis;
72
+ white-space: nowrap;
73
+ }
74
+
75
+ .qd-cards-handle,
76
+ .qd-cards-action {
77
+ display: inline-flex;
78
+ align-items: center;
79
+ justify-content: center;
80
+ width: 2rem;
81
+ height: 2rem;
82
+ border: 1px solid transparent;
83
+ border-radius: var(--p-content-border-radius, 6px);
84
+ background: transparent;
85
+ color: inherit;
86
+ cursor: pointer;
87
+
88
+ &:hover {
89
+ background: var(--p-content-hover-background, rgba(0, 0, 0, 0.04));
90
+ color: var(--p-text-color);
91
+ }
92
+
93
+ &:focus-visible {
94
+ outline: 2px solid var(--p-primary-color);
95
+ outline-offset: 1px;
96
+ }
97
+ }
98
+
99
+ // The page must not scroll under a finger that drags
100
+ .qd-cards-handle {
101
+ cursor: grab;
102
+ touch-action: none;
103
+ }
104
+
105
+ .qd-cards-dragging .qd-cards-handle {
106
+ cursor: grabbing;
107
+ }
108
+
109
+ .qd-cards-on {
110
+ color: var(--p-primary-color);
111
+ }
112
+
113
+ .qd-cards-tray {
114
+ display: flex;
115
+ flex-direction: column;
116
+ gap: 0.75rem;
117
+ padding: 0.75rem;
118
+ border: 1px dashed var(--p-content-border-color, #d1d5db);
119
+ border-radius: var(--p-content-border-radius, 6px);
120
+ }
121
+
122
+ .qd-cards-tray-head {
123
+ display: flex;
124
+ flex-wrap: wrap;
125
+ align-items: center;
126
+ gap: 0.5rem;
127
+ }
128
+
129
+ .qd-cards-tray-label {
130
+ font-weight: 500;
131
+ font-size: 0.875rem;
132
+ }
133
+
134
+ .qd-cards-tray-empty {
135
+ font-size: 0.875rem;
136
+ color: var(--p-text-muted-color, #6b7280);
137
+ }
138
+
139
+ // Cards / Compact, a two-option switch
140
+ .qd-cards-tray-view {
141
+ display: inline-flex;
142
+ margin-left: auto;
143
+ border: 1px solid var(--p-content-border-color, #d1d5db);
144
+ border-radius: var(--p-content-border-radius, 6px);
145
+ overflow: hidden;
146
+ }
147
+
148
+ .qd-cards-tray-view-option {
149
+ padding: 0.25rem 0.625rem;
150
+ border: 0;
151
+ background: transparent;
152
+ color: var(--p-text-muted-color, #6b7280);
153
+ font: inherit;
154
+ font-size: 0.8125rem;
155
+ cursor: pointer;
156
+
157
+ &[aria-pressed='true'] {
158
+ background: var(--p-primary-color);
159
+ color: var(--p-primary-contrast-color, #fff);
160
+ }
161
+
162
+ &:focus-visible {
163
+ outline: 2px solid var(--p-primary-color);
164
+ outline-offset: -2px;
165
+ }
166
+ }
167
+
168
+ .qd-cards-chips {
169
+ display: flex;
170
+ flex-wrap: wrap;
171
+ gap: 0.5rem;
172
+ }
173
+
174
+ // A hidden card, whole: dimmed and inert, only its "Show" acts
175
+ .qd-cards-hidden .qd-cards-hidden-body {
176
+ flex: 1;
177
+ opacity: 0.45;
178
+ filter: grayscale(0.6);
179
+ pointer-events: none;
180
+ }
181
+
182
+ .qd-cards-sr {
183
+ position: absolute;
184
+ width: 1px;
185
+ height: 1px;
186
+ overflow: hidden;
187
+ clip: rect(0 0 0 0);
188
+ white-space: nowrap;
189
+ }
@@ -33,6 +33,7 @@
33
33
  @use './timeline';
34
34
  @use './payload';
35
35
  @use './yaml-editor';
36
+ @use './cards-dashboard';
36
37
  @use './email';
37
38
  @use './tasks';
38
39
  @use './dialogs';
@@ -81,6 +81,24 @@ export interface WrapperInfo {
81
81
  /**
82
82
  * Block configuration
83
83
  */
84
+ /**
85
+ * A block as a dashboard card (#4320): read by CardsDashboard, ignored by a
86
+ * classic Zone, so the same block works in both. The block's `id` is the
87
+ * card's key in the user's saved arrangement; every field here is optional.
88
+ */
89
+ export interface BlockCard {
90
+ /** Names the card in the hidden tray and in announcements (an i18n key works); default: the block's `title` prop, else its id */
91
+ title?: string
92
+ /** Always shown: the user cannot hide it */
93
+ required?: boolean
94
+ /** Stays at its default place: the user cannot move it */
95
+ fixed?: boolean
96
+ /** Pinned at the top by default; the user can unpin it */
97
+ pinned?: boolean
98
+ /** Columns it spans, 1 to 3 (default 1) */
99
+ span?: number
100
+ }
101
+
84
102
  export interface BlockConfig {
85
103
  /** Vue component to render */
86
104
  component: Component
@@ -102,6 +120,8 @@ export interface BlockConfig {
102
120
  wraps?: string | null
103
121
  /** Wrappers applied to this block */
104
122
  wrappers?: WrapperInfo[]
123
+ /** As a dashboard card (#4320) */
124
+ card?: BlockCard | null
105
125
  }
106
126
 
107
127
  /**
@@ -118,6 +138,7 @@ interface InternalBlock {
118
138
  after: string | null
119
139
  wraps: string | null
120
140
  wrappers?: WrapperInfo[]
141
+ card: BlockCard | null
121
142
  }
122
143
 
123
144
  /**
@@ -380,6 +401,7 @@ export class ZoneRegistry {
380
401
  before: blockConfig.before ?? null,
381
402
  after: blockConfig.after ?? null,
382
403
  wraps: blockConfig.wraps ?? null,
404
+ card: blockConfig.card ?? null,
383
405
  }
384
406
 
385
407
  // Update wrap graph for cycle detection (wrap operation only)
@@ -611,6 +633,7 @@ export class ZoneRegistry {
611
633
  before: block.before,
612
634
  after: block.after,
613
635
  wraps: block.wraps,
636
+ card: block.card,
614
637
  wrappers: allWrappers.map((w) => ({
615
638
  component: w.component,
616
639
  props: w.props,
@@ -638,12 +661,13 @@ export class ZoneRegistry {
638
661
  }
639
662
 
640
663
  // Clean up internal operation fields for external consumers
641
- const cleaned: BlockConfig[] = result.map(({ component, weight, props, id, wrappers }) => ({
664
+ const cleaned: BlockConfig[] = result.map(({ component, weight, props, id, wrappers, card }) => ({
642
665
  component,
643
666
  weight,
644
667
  props,
645
668
  id,
646
669
  ...(wrappers ? { wrappers } : {}),
670
+ ...(card ? { card } : {}),
647
671
  }))
648
672
 
649
673
  // Cache the result
@@ -11,6 +11,7 @@ export {
11
11
  type BlockOperation,
12
12
  type WrapperInfo,
13
13
  type BlockConfig,
14
+ type BlockCard,
14
15
  type ZoneConfig,
15
16
  type ZoneDefineOptions,
16
17
  type ZoneListInfo,