@qiqb/message-domain 0.0.0-stage → 0.1.3

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 (57) hide show
  1. package/README.md +213 -2
  2. package/build/components/DefaultMessageReminderRenderer.d.ts +10 -0
  3. package/build/components/DefaultMessageReminderRenderer.js +29 -0
  4. package/build/components/MessageNavigation.d.ts +7 -0
  5. package/build/components/MessageNavigation.js +192 -0
  6. package/build/components/MessageReminderDisplay.d.ts +21 -0
  7. package/build/components/MessageReminderDisplay.js +353 -0
  8. package/build/components/MessageWorkspace.d.ts +14 -0
  9. package/build/components/MessageWorkspace.js +26 -0
  10. package/build/components/message-navigation.less +89 -0
  11. package/build/components/message-reminder-display.less +367 -0
  12. package/build/components/message-workspace.less +150 -0
  13. package/build/index.d.ts +20 -0
  14. package/build/index.js +17 -0
  15. package/build/pages/inbox/InboxPage.d.ts +2 -0
  16. package/build/pages/inbox/InboxPage.js +257 -0
  17. package/build/pages/inbox/inbox.less +293 -0
  18. package/build/pages/subscription/PersonalSubscriptionPage.d.ts +1 -0
  19. package/build/pages/subscription/PersonalSubscriptionPage.js +6 -0
  20. package/build/pages/subscription/RoleSubscriptionPage.d.ts +1 -0
  21. package/build/pages/subscription/RoleSubscriptionPage.js +5 -0
  22. package/build/pages/subscription/SubscriptionForm.d.ts +16 -0
  23. package/build/pages/subscription/SubscriptionForm.js +111 -0
  24. package/build/pages/subscription/SubscriptionPage.d.ts +5 -0
  25. package/build/pages/subscription/SubscriptionPage.js +273 -0
  26. package/build/pages/subscription/subscription-form.less +341 -0
  27. package/build/pages/subscription/subscription.less +250 -0
  28. package/build/pages/topic/TopicPage.d.ts +1 -0
  29. package/build/pages/topic/TopicPage.js +275 -0
  30. package/build/routes.cjs +38 -0
  31. package/build/routes.d.cts +22 -0
  32. package/build/routes.d.ts +22 -0
  33. package/build/routes.js +34 -0
  34. package/build/runtime/MessageReminderLayout.d.ts +14 -0
  35. package/build/runtime/MessageReminderLayout.js +25 -0
  36. package/build/runtime/MessageReminders.d.ts +16 -0
  37. package/build/runtime/MessageReminders.js +364 -0
  38. package/build/runtime/index.d.ts +77 -0
  39. package/build/runtime/index.js +103 -0
  40. package/build/runtime/message-reminder-layout.less +40 -0
  41. package/build/runtime/messageRealtime.d.ts +15 -0
  42. package/build/runtime/messageRealtime.js +99 -0
  43. package/build/runtime/reminderEvents.d.ts +18 -0
  44. package/build/runtime/reminderEvents.js +53 -0
  45. package/build/runtime/reminderOwnership.d.ts +35 -0
  46. package/build/runtime/reminderOwnership.js +135 -0
  47. package/build/runtime/reminderPresentation.d.ts +34 -0
  48. package/build/runtime/reminderPresentation.js +57 -0
  49. package/build/runtime/reminderQuery.d.ts +18 -0
  50. package/build/runtime/reminderQuery.js +33 -0
  51. package/build/runtime/reminderQueue.d.ts +25 -0
  52. package/build/runtime/reminderQueue.js +88 -0
  53. package/build/services/MessageController.d.ts +108 -0
  54. package/build/services/MessageController.js +42 -0
  55. package/build/types/index.d.ts +12 -0
  56. package/build/types/index.js +1 -0
  57. package/package.json +95 -4
@@ -0,0 +1,341 @@
1
+ // 抽屉使用 Portal;所有规则以专用根类限定,避免影响宿主或其他业务抽屉。
2
+ .qiqb-subscription-drawer {
3
+ .ant-drawer-content {
4
+ color: var(--message-text);
5
+ background: var(--message-surface);
6
+ }
7
+
8
+ .ant-drawer-header {
9
+ padding: 28px 28px 24px;
10
+ border-bottom: 1px solid var(--message-border);
11
+ }
12
+
13
+ .ant-drawer-header-title {
14
+ align-items: flex-start;
15
+ }
16
+ .ant-drawer-close {
17
+ margin-top: 3px;
18
+ color: var(--message-muted);
19
+ }
20
+ .ant-drawer-body {
21
+ padding: 0 28px;
22
+ }
23
+
24
+ // Drawer 的 footer 独立于 body 滚动,始终保留保存和取消入口。
25
+ .ant-drawer-footer {
26
+ padding: 18px 28px;
27
+ background: var(--message-surface);
28
+ border-top: 1px solid var(--message-border);
29
+ }
30
+
31
+ &__heading {
32
+ h2 {
33
+ margin: 9px 0 6px;
34
+ color: var(--message-text);
35
+ font-size: 24px;
36
+ font-weight: 650;
37
+ line-height: 1.35;
38
+ }
39
+ p {
40
+ margin: 0;
41
+ color: var(--message-muted);
42
+ font-size: 13px;
43
+ font-weight: 400;
44
+ line-height: 1.6;
45
+ }
46
+ }
47
+
48
+ &__eyebrow {
49
+ display: flex;
50
+ align-items: center;
51
+ gap: 7px;
52
+ color: var(--message-primary);
53
+ font-size: 12px;
54
+ font-weight: 500;
55
+ }
56
+
57
+ &__section {
58
+ padding: 26px 0;
59
+ border-bottom: 1px solid var(--message-border);
60
+
61
+ &--last {
62
+ padding-bottom: 30px;
63
+ border-bottom: 0;
64
+ }
65
+ .ant-form-item {
66
+ margin-bottom: 19px;
67
+ }
68
+ .ant-form-item-label > label {
69
+ color: var(--message-text);
70
+ font-weight: 500;
71
+ }
72
+ .ant-form-item-extra {
73
+ padding-top: 7px;
74
+ color: var(--message-muted);
75
+ font-size: 12px;
76
+ line-height: 1.6;
77
+ }
78
+ }
79
+
80
+ &__section-heading {
81
+ display: flex;
82
+ align-items: flex-start;
83
+ gap: 12px;
84
+ margin-bottom: 23px;
85
+
86
+ > div {
87
+ flex: 1;
88
+ }
89
+ h3 {
90
+ margin: 0 0 5px;
91
+ color: var(--message-text);
92
+ font-size: 15px;
93
+ font-weight: 650;
94
+ line-height: 1.4;
95
+ }
96
+ p {
97
+ margin: 0;
98
+ color: var(--message-muted);
99
+ font-size: 12px;
100
+ line-height: 1.6;
101
+ }
102
+ > .ant-tag {
103
+ margin-right: 0;
104
+ color: var(--message-muted);
105
+ background: var(--message-fill);
106
+ border-color: var(--message-border);
107
+ }
108
+ }
109
+
110
+ &__step {
111
+ display: inline-flex;
112
+ justify-content: center;
113
+ align-items: center;
114
+ flex: 0 0 29px;
115
+ height: 29px;
116
+ color: var(--message-primary);
117
+ background: var(--message-primary-bg);
118
+ border-radius: 8px;
119
+ font-size: 11px;
120
+ font-weight: 650;
121
+ font-variant-numeric: tabular-nums;
122
+ }
123
+
124
+ &__topic-info {
125
+ display: flex;
126
+ align-items: flex-start;
127
+ gap: 11px;
128
+ margin: -7px 0 21px;
129
+ padding: 12px 14px;
130
+ background: var(--message-fill);
131
+ border: 1px solid var(--message-border);
132
+ border-radius: 8px;
133
+ overflow-wrap: anywhere;
134
+
135
+ > .anticon {
136
+ margin-top: 3px;
137
+ color: var(--message-muted);
138
+ }
139
+ strong {
140
+ display: inline-block;
141
+ margin-right: 12px;
142
+ color: var(--message-text);
143
+ font-size: 12px;
144
+ font-weight: 600;
145
+ }
146
+ span {
147
+ color: var(--message-muted);
148
+ font-size: 11px;
149
+ }
150
+ p {
151
+ margin: 6px 0 0;
152
+ color: var(--message-muted);
153
+ font-size: 12px;
154
+ line-height: 1.6;
155
+ }
156
+ }
157
+
158
+ &__personal-note {
159
+ display: flex;
160
+ align-items: center;
161
+ gap: 8px;
162
+ color: var(--message-muted);
163
+ font-size: 12px;
164
+ }
165
+
166
+ &__all-messages {
167
+ display: flex;
168
+ gap: 12px;
169
+ padding: 17px;
170
+ margin-bottom: 14px;
171
+ background: var(--message-primary-bg);
172
+ border-radius: 10px;
173
+
174
+ > .anticon {
175
+ margin-top: 2px;
176
+ color: var(--message-primary);
177
+ font-size: 20px;
178
+ }
179
+ strong {
180
+ color: var(--message-text);
181
+ font-size: 13px;
182
+ font-weight: 600;
183
+ }
184
+ p {
185
+ margin: 5px 0 0;
186
+ color: var(--message-muted);
187
+ font-size: 12px;
188
+ line-height: 1.6;
189
+ }
190
+ }
191
+
192
+ &__condition {
193
+ padding: 15px 16px 0;
194
+ margin-bottom: 12px;
195
+ background: var(--message-fill);
196
+ border: 1px solid var(--message-border);
197
+ border-radius: 10px;
198
+
199
+ > .ant-form-item {
200
+ margin-bottom: 17px;
201
+ }
202
+ }
203
+
204
+ &__condition-heading {
205
+ display: flex;
206
+ align-items: center;
207
+ justify-content: space-between;
208
+ margin-bottom: 14px;
209
+
210
+ strong {
211
+ color: var(--message-muted);
212
+ font-size: 11px;
213
+ font-weight: 600;
214
+ }
215
+ }
216
+
217
+ &__condition-fields {
218
+ display: grid;
219
+ grid-template-columns: minmax(0, 1fr) 150px;
220
+ gap: 12px;
221
+ .ant-form-item {
222
+ min-width: 0;
223
+ margin-bottom: 14px;
224
+ }
225
+ }
226
+
227
+ &__add-condition {
228
+ height: 38px;
229
+ border-color: var(--message-border);
230
+ color: var(--message-primary);
231
+ background: transparent;
232
+ }
233
+ &__hint {
234
+ margin: 10px 0 0;
235
+ color: var(--message-muted);
236
+ font-size: 12px;
237
+ line-height: 1.6;
238
+ }
239
+
240
+ &__delivery,
241
+ &__status {
242
+ display: flex;
243
+ align-items: center;
244
+ gap: 12px;
245
+
246
+ > div {
247
+ flex: 1;
248
+ }
249
+ strong {
250
+ color: var(--message-text);
251
+ font-size: 13px;
252
+ font-weight: 600;
253
+ }
254
+ p {
255
+ margin: 5px 0 0;
256
+ color: var(--message-muted);
257
+ font-size: 12px;
258
+ line-height: 1.6;
259
+ }
260
+ }
261
+
262
+ &__delivery {
263
+ padding: 15px;
264
+ border: 1px solid var(--message-border);
265
+ border-radius: 10px;
266
+ }
267
+
268
+ &__delivery-icon {
269
+ display: inline-flex;
270
+ align-items: center;
271
+ justify-content: center;
272
+ width: 36px;
273
+ height: 36px;
274
+ color: var(--message-primary);
275
+ background: var(--message-primary-bg);
276
+ border-radius: 9px;
277
+ font-size: 17px;
278
+ }
279
+
280
+ &__channel-tag {
281
+ margin-right: 0;
282
+ color: var(--message-primary);
283
+ background: var(--message-primary-bg);
284
+ border-color: transparent;
285
+ }
286
+ &__status {
287
+ padding: 21px 0 18px;
288
+ }
289
+ &__history-note {
290
+ display: flex;
291
+ gap: 7px;
292
+ color: var(--message-muted);
293
+ font-size: 12px;
294
+ line-height: 1.6;
295
+ }
296
+ &__history-note > .anticon {
297
+ margin-top: 3px;
298
+ }
299
+
300
+ &__footer {
301
+ display: flex;
302
+ align-items: center;
303
+ justify-content: space-between;
304
+ gap: 12px;
305
+ > span {
306
+ color: var(--message-muted);
307
+ font-size: 12px;
308
+ }
309
+ }
310
+
311
+ &__actions {
312
+ display: flex;
313
+ gap: 10px;
314
+ }
315
+ }
316
+
317
+ // 窄屏时抽屉铺满宽度;条件字段分行,避免标签和值输入区域被挤压。
318
+ @media (max-width: 640px) {
319
+ .qiqb-subscription-drawer {
320
+ .ant-drawer-header {
321
+ padding: 23px 18px 20px;
322
+ }
323
+ .ant-drawer-body {
324
+ padding: 0 18px;
325
+ }
326
+ .ant-drawer-footer {
327
+ padding: 15px 18px;
328
+ }
329
+ &__condition-fields {
330
+ grid-template-columns: minmax(0, 1fr);
331
+ gap: 0;
332
+ }
333
+ &__footer > span {
334
+ max-width: 110px;
335
+ line-height: 1.5;
336
+ }
337
+ &__actions {
338
+ gap: 8px;
339
+ }
340
+ }
341
+ }
@@ -0,0 +1,250 @@
1
+ // 所有选择器限定消息工作区,避免影响宿主及其他领域组件。
2
+ .qiqb-message {
3
+ .qiqb-message-subscription-alert {
4
+ margin-bottom: 20px;
5
+ }
6
+
7
+ .qiqb-message-subscription-toolbar {
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: space-between;
11
+ gap: 16px;
12
+ margin-bottom: 24px;
13
+ }
14
+
15
+ .qiqb-message-subscription-filters {
16
+ display: flex;
17
+ align-items: center;
18
+ flex-wrap: wrap;
19
+ gap: 12px;
20
+
21
+ .ant-segmented {
22
+ background: var(--message-fill);
23
+ }
24
+ }
25
+
26
+ .qiqb-message-subscription-select {
27
+ min-width: 180px;
28
+ max-width: 260px;
29
+ }
30
+
31
+ .qiqb-message-subscription-summary {
32
+ display: flex;
33
+ align-items: center;
34
+ flex-shrink: 0;
35
+ gap: 10px;
36
+ color: var(--message-muted);
37
+ font-size: 13px;
38
+ }
39
+
40
+ .qiqb-message-subscription-grid {
41
+ display: grid;
42
+ grid-template-columns: repeat(2, minmax(0, 1fr));
43
+ gap: 20px;
44
+ }
45
+
46
+ .qiqb-message-subscription-card {
47
+ display: flex;
48
+ flex-direction: column;
49
+ min-width: 0;
50
+ padding: 24px;
51
+ background: var(--message-surface);
52
+ border: 1px solid var(--message-border);
53
+ border-radius: var(--message-radius);
54
+ transition: border-color 180ms ease, box-shadow 180ms ease;
55
+
56
+ &:hover {
57
+ border-color: var(--message-primary);
58
+ box-shadow: 0 5px 20px var(--message-primary-bg);
59
+ }
60
+ }
61
+
62
+ .qiqb-message-subscription-card-header {
63
+ display: flex;
64
+ align-items: flex-start;
65
+ gap: 12px;
66
+ }
67
+
68
+ .qiqb-message-subscription-topic-icon {
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ flex-shrink: 0;
73
+ width: 40px;
74
+ height: 40px;
75
+ color: var(--message-primary);
76
+ background: var(--message-primary-bg);
77
+ border-radius: 12px;
78
+ font-size: 19px;
79
+ }
80
+
81
+ .qiqb-message-subscription-heading {
82
+ flex: 1;
83
+ min-width: 0;
84
+
85
+ h3 {
86
+ margin: 0 0 5px;
87
+ color: var(--message-text);
88
+ font-size: 16px;
89
+ font-weight: 600;
90
+ line-height: 1.5;
91
+ overflow-wrap: anywhere;
92
+ }
93
+ }
94
+
95
+ .qiqb-message-subscription-topic {
96
+ color: var(--message-muted);
97
+ font-size: 13px;
98
+ overflow-wrap: anywhere;
99
+ }
100
+
101
+ .qiqb-message-subscription-state {
102
+ display: flex;
103
+ align-items: center;
104
+ flex-shrink: 0;
105
+ gap: 9px;
106
+ padding-top: 3px;
107
+ }
108
+
109
+ .qiqb-message-subscription-status {
110
+ display: inline-flex;
111
+ align-items: center;
112
+ gap: 5px;
113
+ color: var(--message-muted);
114
+ font-size: 12px;
115
+ white-space: nowrap;
116
+
117
+ &::before {
118
+ width: 5px;
119
+ height: 5px;
120
+ background: currentColor;
121
+ border-radius: 50%;
122
+ content: '';
123
+ }
124
+
125
+ &.is-enabled {
126
+ color: var(--message-success);
127
+ }
128
+ }
129
+
130
+ .qiqb-message-subscription-role {
131
+ display: flex;
132
+ align-items: center;
133
+ gap: 7px;
134
+ margin-top: 18px;
135
+ color: var(--message-muted);
136
+ font-size: 13px;
137
+ overflow-wrap: anywhere;
138
+ }
139
+
140
+ .qiqb-message-subscription-conditions {
141
+ flex: 1;
142
+ padding: 22px 0;
143
+ }
144
+
145
+ .qiqb-message-subscription-condition-label {
146
+ margin-bottom: 10px;
147
+ color: var(--message-muted);
148
+ font-size: 12px;
149
+ }
150
+
151
+ .qiqb-message-subscription-chips {
152
+ display: flex;
153
+ flex-wrap: wrap;
154
+ gap: 7px;
155
+ }
156
+
157
+ .qiqb-message-subscription-chip {
158
+ display: inline-block;
159
+ max-width: 100%;
160
+ padding: 5px 10px;
161
+ overflow: hidden;
162
+ color: var(--message-text);
163
+ background: var(--message-fill);
164
+ border: 1px solid var(--message-border);
165
+ border-radius: 7px;
166
+ font-size: 12px;
167
+ line-height: 1.5;
168
+ text-overflow: ellipsis;
169
+ white-space: nowrap;
170
+ }
171
+
172
+ .qiqb-message-subscription-all {
173
+ color: var(--message-text);
174
+ font-size: 14px;
175
+ }
176
+
177
+ .qiqb-message-subscription-card-footer {
178
+ display: flex;
179
+ align-items: center;
180
+ justify-content: space-between;
181
+ gap: 12px;
182
+ padding-top: 16px;
183
+ border-top: 1px solid var(--message-border);
184
+ }
185
+
186
+ .qiqb-message-subscription-channels {
187
+ display: flex;
188
+ align-items: center;
189
+ gap: 7px;
190
+ min-width: 0;
191
+ color: var(--message-muted);
192
+ font-size: 12px;
193
+ overflow-wrap: anywhere;
194
+ }
195
+
196
+ .qiqb-message-subscription-pagination {
197
+ display: flex;
198
+ justify-content: flex-end;
199
+ margin-top: 28px;
200
+ }
201
+
202
+ .qiqb-message-subscription-empty {
203
+ padding: 58px 24px;
204
+ background: var(--message-surface);
205
+ border: 1px dashed var(--message-border);
206
+ border-radius: var(--message-radius);
207
+ }
208
+
209
+ @media (min-width: 1440px) {
210
+ .qiqb-message-subscription-grid {
211
+ grid-template-columns: repeat(3, minmax(0, 1fr));
212
+ }
213
+ }
214
+
215
+ @media (max-width: 900px) {
216
+ .qiqb-message-subscription-toolbar {
217
+ align-items: flex-start;
218
+ flex-direction: column;
219
+ }
220
+
221
+ .qiqb-message-subscription-summary {
222
+ align-self: flex-end;
223
+ }
224
+
225
+ .qiqb-message-subscription-grid {
226
+ grid-template-columns: minmax(0, 1fr);
227
+ }
228
+ }
229
+
230
+ @media (max-width: 480px) {
231
+ .qiqb-message-subscription-card {
232
+ padding: 18px;
233
+ }
234
+
235
+ .qiqb-message-subscription-state {
236
+ align-items: flex-end;
237
+ flex-direction: column;
238
+ }
239
+
240
+ .qiqb-message-subscription-card-footer {
241
+ align-items: flex-start;
242
+ flex-direction: column;
243
+ }
244
+
245
+ .qiqb-message-subscription-select {
246
+ width: 100%;
247
+ max-width: none;
248
+ }
249
+ }
250
+ }
@@ -0,0 +1 @@
1
+ export default function TopicPage(): import("react").JSX.Element;