@almadar/std 13.0.8 → 13.1.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.
- package/behaviors/registry/core/atoms/std-browse.orb +59 -77
- package/behaviors/registry/core/atoms/std-filter.orb +39 -214
- package/behaviors/registry/core/atoms/std-pagination.orb +55 -189
- package/behaviors/registry/core/atoms/std-search.orb +14 -305
- package/behaviors/registry/core/molecules/std-filtered-list.orb +37 -38
- package/dist/behaviors/registry/core/atoms/std-browse.orb +59 -77
- package/dist/behaviors/registry/core/atoms/std-filter.orb +39 -214
- package/dist/behaviors/registry/core/atoms/std-pagination.orb +55 -189
- package/dist/behaviors/registry/core/atoms/std-search.orb +14 -305
- package/dist/behaviors/registry/core/molecules/std-filtered-list.orb +37 -38
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "std-search",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"description": "std-search as a Function — single primitive: search-input",
|
|
4
|
+
"description": "std-search as a Function — single primitive: search-input. The atom's\nown SearchResult entity is the UI-state container — SEARCH persists\n@payload.searchTerm (matching the SearchInput component's emit shape)\ninto @entity.searchTerm. Cross-trait listeners route the same payload\nfield to data atoms (Browse REFETCH_QUERY).",
|
|
5
5
|
"orbitals": [
|
|
6
6
|
{
|
|
7
7
|
"name": "SearchResultOrbital",
|
|
@@ -11,28 +11,11 @@
|
|
|
11
11
|
"fields": [
|
|
12
12
|
{
|
|
13
13
|
"name": "id",
|
|
14
|
-
"type": "string"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"name": "name",
|
|
18
|
-
"type": "string"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"name": "description",
|
|
22
|
-
"type": "string"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "status",
|
|
26
14
|
"type": "string",
|
|
27
|
-
"
|
|
28
|
-
"values": [
|
|
29
|
-
"active",
|
|
30
|
-
"inactive",
|
|
31
|
-
"pending"
|
|
32
|
-
]
|
|
15
|
+
"required": true
|
|
33
16
|
},
|
|
34
17
|
{
|
|
35
|
-
"name": "
|
|
18
|
+
"name": "searchTerm",
|
|
36
19
|
"type": "string"
|
|
37
20
|
}
|
|
38
21
|
]
|
|
@@ -47,37 +30,11 @@
|
|
|
47
30
|
"event": "SEARCH",
|
|
48
31
|
"payloadSchema": [
|
|
49
32
|
{
|
|
50
|
-
"name": "
|
|
33
|
+
"name": "searchTerm",
|
|
51
34
|
"type": "string",
|
|
52
35
|
"required": true
|
|
53
36
|
}
|
|
54
37
|
]
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"event": "SearchResultLoaded",
|
|
58
|
-
"description": "Fired when SearchResult collection finishes loading",
|
|
59
|
-
"scope": "internal",
|
|
60
|
-
"payloadSchema": [
|
|
61
|
-
{
|
|
62
|
-
"name": "data",
|
|
63
|
-
"type": "[SearchResult]"
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"event": "SearchResultLoadFailed",
|
|
69
|
-
"description": "Fired when SearchResult collection fails to load",
|
|
70
|
-
"scope": "internal",
|
|
71
|
-
"payloadSchema": [
|
|
72
|
-
{
|
|
73
|
-
"name": "error",
|
|
74
|
-
"type": "string"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"name": "code",
|
|
78
|
-
"type": "string"
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
38
|
}
|
|
82
39
|
],
|
|
83
40
|
"stateMachine": {
|
|
@@ -85,15 +42,6 @@
|
|
|
85
42
|
{
|
|
86
43
|
"name": "idle",
|
|
87
44
|
"isInitial": true
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"name": "loading"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"name": "searching"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"name": "error"
|
|
97
45
|
}
|
|
98
46
|
],
|
|
99
47
|
"events": [
|
|
@@ -106,39 +54,11 @@
|
|
|
106
54
|
"name": "Search",
|
|
107
55
|
"payloadSchema": [
|
|
108
56
|
{
|
|
109
|
-
"name": "
|
|
57
|
+
"name": "searchTerm",
|
|
110
58
|
"type": "string",
|
|
111
59
|
"required": true
|
|
112
60
|
}
|
|
113
61
|
]
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"key": "SearchResultLoaded",
|
|
117
|
-
"name": "SearchResult loaded",
|
|
118
|
-
"payloadSchema": [
|
|
119
|
-
{
|
|
120
|
-
"name": "data",
|
|
121
|
-
"type": "[SearchResult]"
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"key": "SearchResultLoadFailed",
|
|
127
|
-
"name": "SearchResult load failed",
|
|
128
|
-
"payloadSchema": [
|
|
129
|
-
{
|
|
130
|
-
"name": "error",
|
|
131
|
-
"type": "string"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"name": "code",
|
|
135
|
-
"type": "string"
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"key": "CLEAR",
|
|
141
|
-
"name": "Clear"
|
|
142
62
|
}
|
|
143
63
|
],
|
|
144
64
|
"transitions": [
|
|
@@ -147,245 +67,34 @@
|
|
|
147
67
|
"to": "idle",
|
|
148
68
|
"event": "INIT",
|
|
149
69
|
"effects": [
|
|
150
|
-
[
|
|
151
|
-
"fetch",
|
|
152
|
-
"SearchResult",
|
|
153
|
-
{
|
|
154
|
-
"emit": {
|
|
155
|
-
"success": "SearchResultLoaded",
|
|
156
|
-
"failure": "SearchResultLoadFailed"
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
70
|
[
|
|
161
71
|
"render-ui",
|
|
162
72
|
"main",
|
|
163
73
|
{
|
|
164
|
-
"
|
|
74
|
+
"type": "search-input",
|
|
165
75
|
"placeholder": "@config.placeholder",
|
|
166
|
-
"
|
|
76
|
+
"event": "@config.event"
|
|
167
77
|
}
|
|
168
78
|
]
|
|
169
79
|
]
|
|
170
80
|
},
|
|
171
81
|
{
|
|
172
82
|
"from": "idle",
|
|
173
|
-
"to": "loading",
|
|
174
|
-
"event": "SEARCH",
|
|
175
|
-
"effects": [
|
|
176
|
-
[
|
|
177
|
-
"fetch",
|
|
178
|
-
"SearchResult",
|
|
179
|
-
{
|
|
180
|
-
"emit": {
|
|
181
|
-
"success": "SearchResultLoaded",
|
|
182
|
-
"failure": "SearchResultLoadFailed"
|
|
183
|
-
},
|
|
184
|
-
"filter": [
|
|
185
|
-
"str/includes",
|
|
186
|
-
[
|
|
187
|
-
"object/get",
|
|
188
|
-
"@entity",
|
|
189
|
-
"name"
|
|
190
|
-
],
|
|
191
|
-
"@payload.query"
|
|
192
|
-
]
|
|
193
|
-
}
|
|
194
|
-
],
|
|
195
|
-
[
|
|
196
|
-
"render-ui",
|
|
197
|
-
"main",
|
|
198
|
-
{
|
|
199
|
-
"align": "center",
|
|
200
|
-
"gap": "sm",
|
|
201
|
-
"direction": "horizontal",
|
|
202
|
-
"type": "stack",
|
|
203
|
-
"children": [
|
|
204
|
-
{
|
|
205
|
-
"placeholder": "@config.placeholder",
|
|
206
|
-
"type": "search-input",
|
|
207
|
-
"event": "@config.event"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"size": "sm",
|
|
211
|
-
"type": "spinner"
|
|
212
|
-
}
|
|
213
|
-
]
|
|
214
|
-
}
|
|
215
|
-
]
|
|
216
|
-
]
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
"from": "loading",
|
|
220
|
-
"to": "searching",
|
|
221
|
-
"event": "SearchResultLoaded",
|
|
222
|
-
"effects": [
|
|
223
|
-
[
|
|
224
|
-
"render-ui",
|
|
225
|
-
"main",
|
|
226
|
-
{
|
|
227
|
-
"placeholder": "@config.placeholder",
|
|
228
|
-
"event": "@config.event",
|
|
229
|
-
"type": "search-input"
|
|
230
|
-
}
|
|
231
|
-
]
|
|
232
|
-
]
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"from": "loading",
|
|
236
|
-
"to": "error",
|
|
237
|
-
"event": "SearchResultLoadFailed",
|
|
238
|
-
"effects": [
|
|
239
|
-
[
|
|
240
|
-
"render-ui",
|
|
241
|
-
"main",
|
|
242
|
-
{
|
|
243
|
-
"children": [
|
|
244
|
-
{
|
|
245
|
-
"event": "@config.event",
|
|
246
|
-
"type": "search-input",
|
|
247
|
-
"placeholder": "@config.placeholder"
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"color": "error",
|
|
251
|
-
"content": "@payload.error",
|
|
252
|
-
"type": "typography",
|
|
253
|
-
"variant": "caption"
|
|
254
|
-
}
|
|
255
|
-
],
|
|
256
|
-
"direction": "vertical",
|
|
257
|
-
"type": "stack",
|
|
258
|
-
"gap": "xs"
|
|
259
|
-
}
|
|
260
|
-
]
|
|
261
|
-
]
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"from": "loading",
|
|
265
|
-
"to": "loading",
|
|
266
|
-
"event": "SEARCH",
|
|
267
|
-
"effects": [
|
|
268
|
-
[
|
|
269
|
-
"fetch",
|
|
270
|
-
"SearchResult",
|
|
271
|
-
{
|
|
272
|
-
"emit": {
|
|
273
|
-
"failure": "SearchResultLoadFailed",
|
|
274
|
-
"success": "SearchResultLoaded"
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
],
|
|
278
|
-
[
|
|
279
|
-
"render-ui",
|
|
280
|
-
"main",
|
|
281
|
-
{
|
|
282
|
-
"direction": "horizontal",
|
|
283
|
-
"gap": "sm",
|
|
284
|
-
"align": "center",
|
|
285
|
-
"children": [
|
|
286
|
-
{
|
|
287
|
-
"placeholder": "@config.placeholder",
|
|
288
|
-
"type": "search-input",
|
|
289
|
-
"event": "@config.event"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"size": "sm",
|
|
293
|
-
"type": "spinner"
|
|
294
|
-
}
|
|
295
|
-
],
|
|
296
|
-
"type": "stack"
|
|
297
|
-
}
|
|
298
|
-
]
|
|
299
|
-
]
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"from": "searching",
|
|
303
|
-
"to": "loading",
|
|
304
|
-
"event": "SEARCH",
|
|
305
|
-
"effects": [
|
|
306
|
-
[
|
|
307
|
-
"fetch",
|
|
308
|
-
"SearchResult",
|
|
309
|
-
{
|
|
310
|
-
"emit": {
|
|
311
|
-
"failure": "SearchResultLoadFailed",
|
|
312
|
-
"success": "SearchResultLoaded"
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
],
|
|
316
|
-
[
|
|
317
|
-
"render-ui",
|
|
318
|
-
"main",
|
|
319
|
-
{
|
|
320
|
-
"children": [
|
|
321
|
-
{
|
|
322
|
-
"event": "@config.event",
|
|
323
|
-
"placeholder": "@config.placeholder",
|
|
324
|
-
"type": "search-input"
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"size": "sm",
|
|
328
|
-
"type": "spinner"
|
|
329
|
-
}
|
|
330
|
-
],
|
|
331
|
-
"type": "stack",
|
|
332
|
-
"direction": "horizontal",
|
|
333
|
-
"gap": "sm",
|
|
334
|
-
"align": "center"
|
|
335
|
-
}
|
|
336
|
-
]
|
|
337
|
-
]
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
"from": "searching",
|
|
341
83
|
"to": "idle",
|
|
342
|
-
"event": "CLEAR",
|
|
343
|
-
"effects": [
|
|
344
|
-
[
|
|
345
|
-
"render-ui",
|
|
346
|
-
"main",
|
|
347
|
-
{
|
|
348
|
-
"placeholder": "@config.placeholder",
|
|
349
|
-
"event": "@config.event",
|
|
350
|
-
"type": "search-input"
|
|
351
|
-
}
|
|
352
|
-
]
|
|
353
|
-
]
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
"from": "error",
|
|
357
|
-
"to": "loading",
|
|
358
84
|
"event": "SEARCH",
|
|
359
85
|
"effects": [
|
|
360
86
|
[
|
|
361
|
-
"
|
|
362
|
-
"
|
|
363
|
-
|
|
364
|
-
"emit": {
|
|
365
|
-
"success": "SearchResultLoaded",
|
|
366
|
-
"failure": "SearchResultLoadFailed"
|
|
367
|
-
}
|
|
368
|
-
}
|
|
87
|
+
"set",
|
|
88
|
+
"@entity.searchTerm",
|
|
89
|
+
"@payload.searchTerm"
|
|
369
90
|
],
|
|
370
91
|
[
|
|
371
92
|
"render-ui",
|
|
372
93
|
"main",
|
|
373
94
|
{
|
|
374
|
-
"
|
|
375
|
-
"type": "
|
|
376
|
-
"
|
|
377
|
-
"align": "center",
|
|
378
|
-
"children": [
|
|
379
|
-
{
|
|
380
|
-
"placeholder": "@config.placeholder",
|
|
381
|
-
"type": "search-input",
|
|
382
|
-
"event": "@config.event"
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
"size": "sm",
|
|
386
|
-
"type": "spinner"
|
|
387
|
-
}
|
|
388
|
-
]
|
|
95
|
+
"event": "@config.event",
|
|
96
|
+
"type": "search-input",
|
|
97
|
+
"placeholder": "@config.placeholder"
|
|
389
98
|
}
|
|
390
99
|
]
|
|
391
100
|
]
|
|
@@ -402,7 +111,7 @@
|
|
|
402
111
|
"default": "SEARCH"
|
|
403
112
|
}
|
|
404
113
|
},
|
|
405
|
-
"scope": "
|
|
114
|
+
"scope": "instance"
|
|
406
115
|
}
|
|
407
116
|
],
|
|
408
117
|
"pages": [
|
|
@@ -57,30 +57,28 @@
|
|
|
57
57
|
{
|
|
58
58
|
"ref": "Search.traits.SearchResultSearch",
|
|
59
59
|
"name": "FilteredItemSearch",
|
|
60
|
-
"linkedEntity": "FilteredListItem",
|
|
61
60
|
"config": {
|
|
62
|
-
"
|
|
63
|
-
"
|
|
61
|
+
"placeholder": "Search filtered items…",
|
|
62
|
+
"event": "SEARCH"
|
|
64
63
|
}
|
|
65
64
|
},
|
|
66
65
|
{
|
|
67
66
|
"ref": "Filter.traits.FilterTargetFilter",
|
|
68
67
|
"name": "FilteredItemFilter",
|
|
69
|
-
"linkedEntity": "FilteredListItem",
|
|
70
68
|
"config": {
|
|
71
|
-
"event": "FILTER",
|
|
72
69
|
"filters": [
|
|
73
70
|
{
|
|
71
|
+
"filterType": "select",
|
|
74
72
|
"field": "status",
|
|
75
73
|
"options": [
|
|
76
74
|
"active",
|
|
77
75
|
"inactive",
|
|
78
76
|
"pending"
|
|
79
77
|
],
|
|
80
|
-
"label": "Status"
|
|
81
|
-
"filterType": "select"
|
|
78
|
+
"label": "Status"
|
|
82
79
|
}
|
|
83
|
-
]
|
|
80
|
+
],
|
|
81
|
+
"event": "FILTER"
|
|
84
82
|
}
|
|
85
83
|
},
|
|
86
84
|
{
|
|
@@ -90,19 +88,19 @@
|
|
|
90
88
|
"config": {
|
|
91
89
|
"fields": [
|
|
92
90
|
{
|
|
91
|
+
"name": "name",
|
|
93
92
|
"label": "Name",
|
|
94
|
-
"variant": "h4"
|
|
95
|
-
"name": "name"
|
|
93
|
+
"variant": "h4"
|
|
96
94
|
},
|
|
97
95
|
{
|
|
98
|
-
"variant": "caption",
|
|
99
96
|
"name": "description",
|
|
100
|
-
"label": "Description"
|
|
97
|
+
"label": "Description",
|
|
98
|
+
"variant": "caption"
|
|
101
99
|
},
|
|
102
100
|
{
|
|
101
|
+
"name": "status",
|
|
103
102
|
"label": "Status",
|
|
104
|
-
"variant": "badge"
|
|
105
|
-
"name": "status"
|
|
103
|
+
"variant": "badge"
|
|
106
104
|
}
|
|
107
105
|
]
|
|
108
106
|
},
|
|
@@ -122,25 +120,26 @@
|
|
|
122
120
|
"kind": "trait",
|
|
123
121
|
"trait": "FilteredItemFilter"
|
|
124
122
|
}
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"event": "PAGE",
|
|
128
|
-
"triggers": "REFETCH_PAGE",
|
|
129
|
-
"source": {
|
|
130
|
-
"kind": "trait",
|
|
131
|
-
"trait": "FilteredItemPagination"
|
|
132
|
-
}
|
|
133
123
|
}
|
|
134
124
|
]
|
|
135
125
|
},
|
|
136
126
|
{
|
|
137
127
|
"ref": "Pagination.traits.PagedItemPagination",
|
|
138
128
|
"name": "FilteredItemPagination",
|
|
139
|
-
"linkedEntity": "FilteredListItem",
|
|
140
129
|
"config": {
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
}
|
|
130
|
+
"event": "PAGE",
|
|
131
|
+
"pageSize": 10.0
|
|
132
|
+
},
|
|
133
|
+
"listens": [
|
|
134
|
+
{
|
|
135
|
+
"event": "BrowseItemLoaded",
|
|
136
|
+
"triggers": "ITEMS_LOADED",
|
|
137
|
+
"source": {
|
|
138
|
+
"kind": "trait",
|
|
139
|
+
"trait": "FilteredItemBrowse"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
]
|
|
144
143
|
},
|
|
145
144
|
{
|
|
146
145
|
"name": "FilteredListLayout",
|
|
@@ -229,20 +228,22 @@
|
|
|
229
228
|
"render-ui",
|
|
230
229
|
"main",
|
|
231
230
|
{
|
|
231
|
+
"gap": "md",
|
|
232
|
+
"className": "max-w-5xl mx-auto w-full",
|
|
232
233
|
"children": [
|
|
233
234
|
{
|
|
234
235
|
"direction": "horizontal",
|
|
235
|
-
"gap": "sm",
|
|
236
236
|
"align": "center",
|
|
237
|
+
"gap": "sm",
|
|
237
238
|
"children": [
|
|
238
239
|
{
|
|
239
|
-
"
|
|
240
|
-
"
|
|
240
|
+
"type": "icon",
|
|
241
|
+
"name": "list"
|
|
241
242
|
},
|
|
242
243
|
{
|
|
243
|
-
"
|
|
244
|
+
"type": "typography",
|
|
244
245
|
"content": "Filtered List",
|
|
245
|
-
"
|
|
246
|
+
"variant": "h2"
|
|
246
247
|
}
|
|
247
248
|
],
|
|
248
249
|
"type": "stack"
|
|
@@ -251,21 +252,19 @@
|
|
|
251
252
|
"type": "divider"
|
|
252
253
|
},
|
|
253
254
|
{
|
|
254
|
-
"type": "stack",
|
|
255
|
-
"gap": "sm",
|
|
256
255
|
"direction": "horizontal",
|
|
257
256
|
"children": [
|
|
258
257
|
"@trait.FilteredItemSearch",
|
|
259
258
|
"@trait.FilteredItemFilter"
|
|
260
|
-
]
|
|
259
|
+
],
|
|
260
|
+
"gap": "sm",
|
|
261
|
+
"type": "stack"
|
|
261
262
|
},
|
|
262
263
|
"@trait.FilteredItemBrowse",
|
|
263
264
|
"@trait.FilteredItemPagination"
|
|
264
265
|
],
|
|
265
|
-
"
|
|
266
|
-
"
|
|
267
|
-
"gap": "md",
|
|
268
|
-
"direction": "vertical"
|
|
266
|
+
"direction": "vertical",
|
|
267
|
+
"type": "stack"
|
|
269
268
|
}
|
|
270
269
|
]
|
|
271
270
|
]
|