@vectoriox/iox-builder 9.11.1 → 9.11.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.
|
@@ -4421,6 +4421,8 @@ function sameSet(a, b) {
|
|
|
4421
4421
|
function designIdOf(node) {
|
|
4422
4422
|
return node.__previewClone ? (node.styleId ?? node.id) : node.id;
|
|
4423
4423
|
}
|
|
4424
|
+
/** How long after a press inside a Tabs the selection it causes is the click's, not a tree / crumb selection. */
|
|
4425
|
+
const PRESS_SELECTION_MS = 600;
|
|
4424
4426
|
/**
|
|
4425
4427
|
* The composites' runtimes ON THE CANVAS (CC2, CC4a) — the canvas is a live runtime, so an Accordion (and a Disclosure,
|
|
4426
4428
|
* CC2.1) opens and closes, and Tabs switch, on the canvas exactly as on the site: the SAME composite-core runtimes the
|
|
@@ -4465,7 +4467,11 @@ class CompositeCanvasService {
|
|
|
4465
4467
|
onChange: key => { if (!node.__previewClone && node.id)
|
|
4466
4468
|
this.designState?.setShownItem(node.id, key); },
|
|
4467
4469
|
}));
|
|
4468
|
-
|
|
4470
|
+
const entry = { node, runtime, selected: new Set(), pressedAt: 0, release: () => undefined };
|
|
4471
|
+
const press = () => { entry.pressedAt = Date.now(); };
|
|
4472
|
+
element.addEventListener('pointerdown', press, true);
|
|
4473
|
+
entry.release = () => element.removeEventListener('pointerdown', press, true);
|
|
4474
|
+
this.exclusive.set(node.id, entry);
|
|
4469
4475
|
const shown = this.designState?.shownItem(designIdOf(node));
|
|
4470
4476
|
if (shown)
|
|
4471
4477
|
runtime.activate(shown);
|
|
@@ -4486,7 +4492,9 @@ class CompositeCanvasService {
|
|
|
4486
4492
|
return;
|
|
4487
4493
|
this.attached.get(nodeId)?.runtime.destroy();
|
|
4488
4494
|
this.attached.delete(nodeId);
|
|
4489
|
-
this.exclusive.get(nodeId)
|
|
4495
|
+
const tabs = this.exclusive.get(nodeId);
|
|
4496
|
+
tabs?.runtime.destroy();
|
|
4497
|
+
tabs?.release();
|
|
4490
4498
|
this.exclusive.delete(nodeId);
|
|
4491
4499
|
}
|
|
4492
4500
|
/** The root's behaviour changed in its panel (Allow several open, Open by default; Activate on, Orientation). */
|
|
@@ -4523,7 +4531,7 @@ class CompositeCanvasService {
|
|
|
4523
4531
|
if (!state)
|
|
4524
4532
|
return;
|
|
4525
4533
|
const selected = state.snapshot.selectedTriggers;
|
|
4526
|
-
const fresh = [...selected].filter(id => !entry.selected.has(id));
|
|
4534
|
+
const fresh = Date.now() - entry.pressedAt < PRESS_SELECTION_MS ? [] : [...selected].filter(id => !entry.selected.has(id));
|
|
4527
4535
|
entry.selected = new Set(selected);
|
|
4528
4536
|
for (const id of fresh) {
|
|
4529
4537
|
const key = entry.runtime.keyAt(entry.runtime.root.querySelector(`.iox-node-${CSS.escape(id)}`));
|
|
@@ -5511,7 +5519,7 @@ class BuilderRepeaterComponent {
|
|
|
5511
5519
|
</ng-container>
|
|
5512
5520
|
</div>
|
|
5513
5521
|
</div>
|
|
5514
|
-
`, isInline: true, styles: [".repeater-wrapper{position:relative;box-sizing:border-box}.repeater-badge{display:flex;align-items:center;gap:.4rem;padding:4px 8px;font-size:11px;color:#cb9090;background:#cb909014;border:1px dashed rgba(203,144,144,.4);border-bottom:none;border-radius:4px 4px 0 0;-webkit-user-select:none;user-select:none}.repeater-wrapper.has-children>.repeater-badge{position:absolute;top:0;
|
|
5522
|
+
`, isInline: true, styles: [".repeater-wrapper{position:relative;box-sizing:border-box}.repeater-badge{display:flex;align-items:center;gap:.4rem;padding:4px 8px;font-size:11px;color:#cb9090;background:#cb909014;border:1px dashed rgba(203,144,144,.4);border-bottom:none;border-radius:4px 4px 0 0;-webkit-user-select:none;user-select:none}.repeater-wrapper.has-children>.repeater-badge{position:absolute;top:0;inset-inline-start:0;z-index:10;border-radius:0 0 4px;border:1px solid rgba(203,144,144,.5);opacity:0;pointer-events:none;transition:opacity .15s}.repeater-wrapper.has-children:hover>.repeater-badge{opacity:1}.repeater-badge i{font-size:13px}.repeater-badge-empty{opacity:.55}.repeater-badge-count{margin-left:auto;font-weight:600}.repeater-badge-loading i{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.repeater-root{box-sizing:border-box}.repeater-wrapper:not(.has-children) .repeater-root{border:1px dashed rgba(203,144,144,.4);border-top:none;border-radius:0 0 4px 4px;min-height:40px}.repeater-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;color:#64748b80;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none}.repeater-placeholder i{font-size:20px}.repeater-placeholder--source{border:1px dashed rgba(203,144,144,.5);border-radius:4px;text-align:center;color:#475569d9;font-size:13px;line-height:1.5}.repeater-placeholder--source strong{font-weight:600;color:#1e293be6}.repeater-item-template{min-width:0}.repeater-preview-child{opacity:.55;pointer-events:none;min-width:0}:host(.iox-role-accordion) .repeater-preview-child,:host(.iox-role-tabs-list) .repeater-preview-child,:host(.iox-role-tabs-panels) .repeater-preview-child{pointer-events:auto}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RenderDirective, selector: "[ioxRender]", inputs: ["ioxRender", "ioxDragSourceId", "ioxPhrasing"], outputs: ["onClick", "onMouseEnter", "onMouseLeave"] }, { kind: "directive", type: IoxDraggableDirective, selector: "[ioxDraggable]", inputs: ["ioxDragData", "ioxDragSourceId", "ioxDragDisabled"] }, { kind: "directive", type: IoxDropzoneDirective, selector: "[ioxDropzone]", inputs: ["ioxDropzoneId", "ioxDropzoneData", "ioxDropzonePostDrop"], outputs: ["ioxDrop"] }] }); }
|
|
5515
5523
|
}
|
|
5516
5524
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: BuilderRepeaterComponent, decorators: [{
|
|
5517
5525
|
type: Component,
|
|
@@ -5605,7 +5613,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
5605
5613
|
</ng-container>
|
|
5606
5614
|
</div>
|
|
5607
5615
|
</div>
|
|
5608
|
-
`, standalone: false, styles: [".repeater-wrapper{position:relative;box-sizing:border-box}.repeater-badge{display:flex;align-items:center;gap:.4rem;padding:4px 8px;font-size:11px;color:#cb9090;background:#cb909014;border:1px dashed rgba(203,144,144,.4);border-bottom:none;border-radius:4px 4px 0 0;-webkit-user-select:none;user-select:none}.repeater-wrapper.has-children>.repeater-badge{position:absolute;top:0;
|
|
5616
|
+
`, standalone: false, styles: [".repeater-wrapper{position:relative;box-sizing:border-box}.repeater-badge{display:flex;align-items:center;gap:.4rem;padding:4px 8px;font-size:11px;color:#cb9090;background:#cb909014;border:1px dashed rgba(203,144,144,.4);border-bottom:none;border-radius:4px 4px 0 0;-webkit-user-select:none;user-select:none}.repeater-wrapper.has-children>.repeater-badge{position:absolute;top:0;inset-inline-start:0;z-index:10;border-radius:0 0 4px;border:1px solid rgba(203,144,144,.5);opacity:0;pointer-events:none;transition:opacity .15s}.repeater-wrapper.has-children:hover>.repeater-badge{opacity:1}.repeater-badge i{font-size:13px}.repeater-badge-empty{opacity:.55}.repeater-badge-count{margin-left:auto;font-weight:600}.repeater-badge-loading i{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.repeater-root{box-sizing:border-box}.repeater-wrapper:not(.has-children) .repeater-root{border:1px dashed rgba(203,144,144,.4);border-top:none;border-radius:0 0 4px 4px;min-height:40px}.repeater-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;color:#64748b80;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none}.repeater-placeholder i{font-size:20px}.repeater-placeholder--source{border:1px dashed rgba(203,144,144,.5);border-radius:4px;text-align:center;color:#475569d9;font-size:13px;line-height:1.5}.repeater-placeholder--source strong{font-weight:600;color:#1e293be6}.repeater-item-template{min-width:0}.repeater-preview-child{opacity:.55;pointer-events:none;min-width:0}:host(.iox-role-accordion) .repeater-preview-child,:host(.iox-role-tabs-list) .repeater-preview-child,:host(.iox-role-tabs-panels) .repeater-preview-child{pointer-events:auto}\n"] }]
|
|
5609
5617
|
}], ctorParameters: () => [{ type: DragEngineService }, { type: OverlayService }, { type: BuilderDataSourceService }, { type: DataSourceRegistryService }, { type: PanelEventService }, { type: i0.ChangeDetectorRef }, { type: InteractionEngineService }, { type: undefined, decorators: [{
|
|
5610
5618
|
type: Optional
|
|
5611
5619
|
}, {
|