@itrocks/list 0.23.1 → 0.23.2
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/README.md +3 -4
- package/package.json +1 -1
- package/property-select.d.ts +1 -0
- package/property-select.js +13 -19
package/README.md
CHANGED
|
@@ -352,10 +352,9 @@ and retain their committed order throughout the drag. New accepted drops feed re
|
|
|
352
352
|
cancellations do not. Row-view changes and view disposal cancel transport. The desktop pane stays open, and capture is
|
|
353
353
|
owned by the selector's surviving source controller. The consumer imports no home implementation, SQL or hydration code.
|
|
354
354
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
restoration. Custom pane adapters may implement the same optional suspension argument without importing `home`.
|
|
355
|
+
When a source gesture is recognised, the consumer closes the pane if its rendered width fills its parent.
|
|
356
|
+
It stays closed after a drop, cancellation or rejection. A narrower desktop pane stays open.
|
|
357
|
+
Locating a selected column uses the same width check and closes a full-width pane before revealing the column.
|
|
359
358
|
|
|
360
359
|
`node test/browser-requests.mjs` checks request counts and real mouse gestures in Chromium with synthetic HTTP data.
|
|
361
360
|
It covers initial mount, click placeholders, hidden drag additions, values for 80 loaded rows before entry or drop,
|
package/package.json
CHANGED
package/property-select.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare class ListPropertySelect implements ConsumerPort {
|
|
|
51
51
|
private columnContent;
|
|
52
52
|
private add;
|
|
53
53
|
begin(intent: SelectionIntent, sample: PointerSample): void;
|
|
54
|
+
private closeFullWidthPane;
|
|
54
55
|
private columnSource;
|
|
55
56
|
cancel(id: string): void;
|
|
56
57
|
private displayedPaths;
|
package/property-select.js
CHANGED
|
@@ -143,18 +143,17 @@ export class ListPropertySelect {
|
|
|
143
143
|
throw new Error('A column operation is pending');
|
|
144
144
|
const path = normalisePath(intent.path);
|
|
145
145
|
const added = !this.paths().includes(path);
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
146
|
+
this.closeFullWidthPane();
|
|
147
|
+
if (added)
|
|
148
|
+
this.add(path, this.abort.signal, { effects: false, hidden: true });
|
|
149
|
+
const paths = this.paths();
|
|
150
|
+
const operation = this.options.addition.beginExternal(this.columnSource(path), sample, { adding: added, removal: true });
|
|
151
|
+
this.drag = { added, intent, operation, paths };
|
|
152
|
+
}
|
|
153
|
+
closeFullWidthPane() {
|
|
154
|
+
const aside = this.content.closest('aside');
|
|
155
|
+
if (aside && (aside.offsetWidth > 0) && (aside.offsetWidth >= aside.parentElement.clientWidth))
|
|
156
|
+
this.pane.close();
|
|
158
157
|
}
|
|
159
158
|
columnSource(path) {
|
|
160
159
|
const selector = this.view.selector;
|
|
@@ -202,7 +201,6 @@ export class ListPropertySelect {
|
|
|
202
201
|
const drag = this.drag;
|
|
203
202
|
drag.operation.cancel();
|
|
204
203
|
this.drag = undefined;
|
|
205
|
-
drag.restore();
|
|
206
204
|
this.view.selector.setConfiguration({ usedPaths: this.paths() });
|
|
207
205
|
}
|
|
208
206
|
displayedPaths() {
|
|
@@ -256,7 +254,6 @@ export class ListPropertySelect {
|
|
|
256
254
|
finally {
|
|
257
255
|
if (this.drag === drag)
|
|
258
256
|
this.drag = undefined;
|
|
259
|
-
drag.restore();
|
|
260
257
|
}
|
|
261
258
|
}
|
|
262
259
|
async mount() {
|
|
@@ -354,11 +351,8 @@ export class ListPropertySelect {
|
|
|
354
351
|
if (this.disposed)
|
|
355
352
|
throw new Error('List disposed');
|
|
356
353
|
if ((status !== 'removed') && this.paths().includes(path)) {
|
|
357
|
-
if (intent.action === 'add')
|
|
358
|
-
|
|
359
|
-
if (aside && (aside.offsetWidth > 0) && (aside.offsetWidth >= aside.parentElement.clientWidth))
|
|
360
|
-
this.pane.close();
|
|
361
|
-
}
|
|
354
|
+
if (intent.action === 'add')
|
|
355
|
+
this.closeFullWidthPane();
|
|
362
356
|
this.options.addition.reveal(path);
|
|
363
357
|
if (status === 'existing')
|
|
364
358
|
this.options.addition.highlight(path);
|