@almadar/std 13.0.4 → 13.0.6

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.
@@ -43,6 +43,16 @@
43
43
  "category": "interaction",
44
44
  "linkedEntity": "SearchResult",
45
45
  "emits": [
46
+ {
47
+ "event": "SEARCH",
48
+ "payloadSchema": [
49
+ {
50
+ "name": "query",
51
+ "type": "string",
52
+ "required": true
53
+ }
54
+ ]
55
+ },
46
56
  {
47
57
  "event": "SearchResultLoaded",
48
58
  "description": "Fired when SearchResult collection finishes loading",
@@ -151,9 +161,9 @@
151
161
  "render-ui",
152
162
  "main",
153
163
  {
154
- "event": "@config.event",
155
164
  "placeholder": "@config.placeholder",
156
- "type": "search-input"
165
+ "type": "search-input",
166
+ "event": "@config.event"
157
167
  }
158
168
  ]
159
169
  ]
@@ -163,13 +173,20 @@
163
173
  "to": "loading",
164
174
  "event": "SEARCH",
165
175
  "effects": [
176
+ [
177
+ "emit",
178
+ "SEARCH",
179
+ {
180
+ "query": "@payload.query"
181
+ }
182
+ ],
166
183
  [
167
184
  "fetch",
168
185
  "SearchResult",
169
186
  {
170
187
  "emit": {
171
- "success": "SearchResultLoaded",
172
- "failure": "SearchResultLoadFailed"
188
+ "failure": "SearchResultLoadFailed",
189
+ "success": "SearchResultLoaded"
173
190
  }
174
191
  }
175
192
  ],
@@ -177,21 +194,21 @@
177
194
  "render-ui",
178
195
  "main",
179
196
  {
197
+ "align": "center",
180
198
  "children": [
181
199
  {
200
+ "placeholder": "@config.placeholder",
182
201
  "type": "search-input",
183
- "event": "@config.event",
184
- "placeholder": "@config.placeholder"
202
+ "event": "@config.event"
185
203
  },
186
204
  {
187
- "size": "sm",
188
- "type": "spinner"
205
+ "type": "spinner",
206
+ "size": "sm"
189
207
  }
190
208
  ],
191
- "type": "stack",
192
- "direction": "horizontal",
193
209
  "gap": "sm",
194
- "align": "center"
210
+ "type": "stack",
211
+ "direction": "horizontal"
195
212
  }
196
213
  ]
197
214
  ]
@@ -205,8 +222,8 @@
205
222
  "render-ui",
206
223
  "main",
207
224
  {
208
- "event": "@config.event",
209
225
  "placeholder": "@config.placeholder",
226
+ "event": "@config.event",
210
227
  "type": "search-input"
211
228
  }
212
229
  ]
@@ -223,20 +240,20 @@
223
240
  {
224
241
  "gap": "xs",
225
242
  "direction": "vertical",
226
- "type": "stack",
227
243
  "children": [
228
244
  {
229
- "event": "@config.event",
230
245
  "placeholder": "@config.placeholder",
246
+ "event": "@config.event",
231
247
  "type": "search-input"
232
248
  },
233
249
  {
234
- "content": "@payload.error",
235
- "type": "typography",
236
250
  "color": "error",
251
+ "type": "typography",
252
+ "content": "@payload.error",
237
253
  "variant": "caption"
238
254
  }
239
- ]
255
+ ],
256
+ "type": "stack"
240
257
  }
241
258
  ]
242
259
  ]
@@ -251,8 +268,8 @@
251
268
  "SearchResult",
252
269
  {
253
270
  "emit": {
254
- "success": "SearchResultLoaded",
255
- "failure": "SearchResultLoadFailed"
271
+ "failure": "SearchResultLoadFailed",
272
+ "success": "SearchResultLoaded"
256
273
  }
257
274
  }
258
275
  ],
@@ -260,21 +277,21 @@
260
277
  "render-ui",
261
278
  "main",
262
279
  {
280
+ "type": "stack",
281
+ "direction": "horizontal",
282
+ "align": "center",
283
+ "gap": "sm",
263
284
  "children": [
264
285
  {
265
- "placeholder": "@config.placeholder",
266
286
  "type": "search-input",
287
+ "placeholder": "@config.placeholder",
267
288
  "event": "@config.event"
268
289
  },
269
290
  {
270
291
  "type": "spinner",
271
292
  "size": "sm"
272
293
  }
273
- ],
274
- "type": "stack",
275
- "gap": "sm",
276
- "align": "center",
277
- "direction": "horizontal"
294
+ ]
278
295
  }
279
296
  ]
280
297
  ]
@@ -289,8 +306,8 @@
289
306
  "SearchResult",
290
307
  {
291
308
  "emit": {
292
- "success": "SearchResultLoaded",
293
- "failure": "SearchResultLoadFailed"
309
+ "failure": "SearchResultLoadFailed",
310
+ "success": "SearchResultLoaded"
294
311
  }
295
312
  }
296
313
  ],
@@ -310,9 +327,9 @@
310
327
  }
311
328
  ],
312
329
  "direction": "horizontal",
313
- "gap": "sm",
314
330
  "type": "stack",
315
- "align": "center"
331
+ "align": "center",
332
+ "gap": "sm"
316
333
  }
317
334
  ]
318
335
  ]
@@ -343,8 +360,8 @@
343
360
  "SearchResult",
344
361
  {
345
362
  "emit": {
346
- "success": "SearchResultLoaded",
347
- "failure": "SearchResultLoadFailed"
363
+ "failure": "SearchResultLoadFailed",
364
+ "success": "SearchResultLoaded"
348
365
  }
349
366
  }
350
367
  ],
@@ -352,21 +369,21 @@
352
369
  "render-ui",
353
370
  "main",
354
371
  {
372
+ "type": "stack",
373
+ "gap": "sm",
355
374
  "direction": "horizontal",
375
+ "align": "center",
356
376
  "children": [
357
377
  {
358
378
  "placeholder": "@config.placeholder",
359
- "event": "@config.event",
360
- "type": "search-input"
379
+ "type": "search-input",
380
+ "event": "@config.event"
361
381
  },
362
382
  {
363
383
  "type": "spinner",
364
384
  "size": "sm"
365
385
  }
366
- ],
367
- "gap": "sm",
368
- "align": "center",
369
- "type": "stack"
386
+ ]
370
387
  }
371
388
  ]
372
389
  ]
@@ -43,7 +43,13 @@
43
43
  },
44
44
  {
45
45
  "name": "status",
46
- "type": "string"
46
+ "type": "string",
47
+ "default": "active",
48
+ "values": [
49
+ "active",
50
+ "inactive",
51
+ "pending"
52
+ ]
47
53
  }
48
54
  ]
49
55
  },
@@ -53,8 +59,8 @@
53
59
  "name": "FilteredItemSearch",
54
60
  "linkedEntity": "FilteredListItem",
55
61
  "config": {
56
- "placeholder": "Search filtered items…",
57
- "event": "SEARCH"
62
+ "event": "SEARCH",
63
+ "placeholder": "Search filtered items…"
58
64
  }
59
65
  },
60
66
  {
@@ -65,13 +71,13 @@
65
71
  "filters": [
66
72
  {
67
73
  "filterType": "select",
68
- "field": "status",
69
- "label": "Status",
70
74
  "options": [
71
75
  "active",
72
76
  "inactive",
73
77
  "pending"
74
- ]
78
+ ],
79
+ "field": "status",
80
+ "label": "Status"
75
81
  }
76
82
  ],
77
83
  "event": "FILTER"
@@ -85,21 +91,47 @@
85
91
  "fields": [
86
92
  {
87
93
  "label": "Name",
88
- "variant": "h4",
89
- "name": "name"
94
+ "name": "name",
95
+ "variant": "h4"
90
96
  },
91
97
  {
92
- "label": "Description",
93
98
  "variant": "caption",
99
+ "label": "Description",
94
100
  "name": "description"
95
101
  },
96
102
  {
103
+ "name": "status",
97
104
  "label": "Status",
98
- "variant": "badge",
99
- "name": "status"
105
+ "variant": "badge"
100
106
  }
101
107
  ]
102
- }
108
+ },
109
+ "listens": [
110
+ {
111
+ "event": "SEARCH",
112
+ "triggers": "REFETCH",
113
+ "source": {
114
+ "kind": "trait",
115
+ "trait": "FilteredItemSearch"
116
+ }
117
+ },
118
+ {
119
+ "event": "FILTER",
120
+ "triggers": "REFETCH",
121
+ "source": {
122
+ "kind": "trait",
123
+ "trait": "FilteredItemFilter"
124
+ }
125
+ },
126
+ {
127
+ "event": "PAGE",
128
+ "triggers": "REFETCH",
129
+ "source": {
130
+ "kind": "trait",
131
+ "trait": "FilteredItemPagination"
132
+ }
133
+ }
134
+ ]
103
135
  },
104
136
  {
105
137
  "ref": "Pagination.traits.PagedItemPagination",
@@ -188,8 +220,8 @@
188
220
  "FilteredListItem",
189
221
  {
190
222
  "emit": {
191
- "success": "FilteredListItemLoaded",
192
- "failure": "FilteredListItemLoadFailed"
223
+ "failure": "FilteredListItemLoadFailed",
224
+ "success": "FilteredListItemLoaded"
193
225
  }
194
226
  }
195
227
  ],
@@ -198,13 +230,11 @@
198
230
  "main",
199
231
  {
200
232
  "gap": "md",
201
- "type": "stack",
202
- "direction": "vertical",
203
- "className": "max-w-5xl mx-auto w-full",
204
233
  "children": [
205
234
  {
206
- "gap": "sm",
235
+ "type": "stack",
207
236
  "align": "center",
237
+ "gap": "sm",
208
238
  "direction": "horizontal",
209
239
  "children": [
210
240
  {
@@ -213,27 +243,29 @@
213
243
  },
214
244
  {
215
245
  "type": "typography",
216
- "variant": "h2",
217
- "content": "Filtered List"
246
+ "content": "Filtered List",
247
+ "variant": "h2"
218
248
  }
219
- ],
220
- "type": "stack"
249
+ ]
221
250
  },
222
251
  {
223
252
  "type": "divider"
224
253
  },
225
254
  {
226
- "direction": "horizontal",
227
255
  "children": [
228
256
  "@trait.FilteredItemSearch",
229
257
  "@trait.FilteredItemFilter"
230
258
  ],
259
+ "direction": "horizontal",
231
260
  "gap": "sm",
232
261
  "type": "stack"
233
262
  },
234
263
  "@trait.FilteredItemBrowse",
235
264
  "@trait.FilteredItemPagination"
236
- ]
265
+ ],
266
+ "direction": "vertical",
267
+ "className": "max-w-5xl mx-auto w-full",
268
+ "type": "stack"
237
269
  }
238
270
  ]
239
271
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/std",
3
- "version": "13.0.4",
3
+ "version": "13.0.6",
4
4
  "description": "Standard library operators for Almadar (math, string, array, etc.)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",