cabloy 5.1.100 → 5.1.101
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/.cabloy-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.1.
|
|
1
|
+
5.1.101
|
package/.gitignore
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -347,15 +347,16 @@ Representative files in the Cabloy Basic frontend:
|
|
|
347
347
|
- `getUploadPolicy(...)` stays in the model
|
|
348
348
|
- the query is created as formal state instead of a one-off click helper
|
|
349
349
|
- `disableSuspenseOnInit: true` skips the automatic init-time `query.suspense()` kick while preserving the query as formal state
|
|
350
|
-
-
|
|
351
|
-
-
|
|
350
|
+
- upload policy still uses normal async freshness semantics here because the model method does not set `staleTime: Infinity`
|
|
351
|
+
- render establishes and derives `acceptAttr`, `multiple`, and `pending` from that query-backed state
|
|
352
|
+
- interaction reuses that same state
|
|
352
353
|
- interaction may still `await query.suspense()` on the already-created query if an edge timing window requires it
|
|
353
354
|
|
|
354
355
|
Why this is a good fit:
|
|
355
356
|
|
|
356
357
|
- upload policy is a real query-backed state
|
|
357
|
-
- it is
|
|
358
|
-
-
|
|
358
|
+
- it is stable enough that every first consumer does not need to auto-kick one eager init-time refresh semantic
|
|
359
|
+
- it should still keep normal async freshness behavior rather than being frozen through `staleTime: Infinity`
|
|
359
360
|
- the strict-ready moment is the interaction boundary, not every initial render consumer
|
|
360
361
|
|
|
361
362
|
Taken together, Example A and Example B show the most important design contrast on this page:
|
package/package.json
CHANGED
|
@@ -101,11 +101,27 @@ export class TableCellFile extends BeanBase implements ITableCellRender {
|
|
|
101
101
|
) {
|
|
102
102
|
const fieldTitle = renderContext.$celScope.property?.title ?? renderContext.$celScope.name;
|
|
103
103
|
const placeholder = this.scope.locale.DownloadFile();
|
|
104
|
+
const selectBackgroundColor = 'var(--color-base-100)';
|
|
105
|
+
const selectColor = 'var(--color-base-content)';
|
|
106
|
+
const optionStyle = {
|
|
107
|
+
backgroundColor: selectBackgroundColor,
|
|
108
|
+
color: selectColor,
|
|
109
|
+
};
|
|
110
|
+
const placeholderOptionStyle = {
|
|
111
|
+
backgroundColor: selectBackgroundColor,
|
|
112
|
+
color: `color-mix(in oklch, ${selectColor} 60%, transparent)`,
|
|
113
|
+
};
|
|
114
|
+
const selectStyle = {
|
|
115
|
+
colorScheme: this.$theme.dark ? 'dark' : 'light',
|
|
116
|
+
backgroundColor: selectBackgroundColor,
|
|
117
|
+
color: selectColor,
|
|
118
|
+
};
|
|
104
119
|
return (
|
|
105
120
|
<span class="relative inline-flex min-w-0 max-w-full items-center">
|
|
106
121
|
<span class="inline-flex min-w-0 max-w-full items-center">{contentNode}</span>
|
|
107
122
|
<select
|
|
108
123
|
class="absolute inset-0 h-full w-full cursor-pointer opacity-0"
|
|
124
|
+
style={selectStyle}
|
|
109
125
|
aria-label={fieldTitle}
|
|
110
126
|
title={placeholder}
|
|
111
127
|
onClick={event => {
|
|
@@ -125,9 +141,16 @@ export class TableCellFile extends BeanBase implements ITableCellRender {
|
|
|
125
141
|
this._openDownloadUrl(selectedItem.downloadUrl);
|
|
126
142
|
}}
|
|
127
143
|
>
|
|
128
|
-
<option value=""
|
|
144
|
+
<option value="" style={placeholderOptionStyle}>
|
|
145
|
+
{placeholder}
|
|
146
|
+
</option>
|
|
129
147
|
{items.map(item => (
|
|
130
|
-
<option
|
|
148
|
+
<option
|
|
149
|
+
key={item.key}
|
|
150
|
+
value={item.key}
|
|
151
|
+
disabled={!item.downloadUrl}
|
|
152
|
+
style={optionStyle}
|
|
153
|
+
>
|
|
131
154
|
{item.label}
|
|
132
155
|
</option>
|
|
133
156
|
))}
|