@forgeroute/ui 0.4.22 → 0.4.24
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/fesm2022/forgeroute-ui.mjs +178 -28
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui.d.ts +74 -7
|
@@ -371,7 +371,7 @@ var SearchInputComponent = class SearchInputComponent {
|
|
|
371
371
|
</div>
|
|
372
372
|
`,
|
|
373
373
|
isInline: true,
|
|
374
|
-
styles: [":host{display:block;flex:0 1 325px;min-width:0}.search-bar{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:10px;color:#94a3b8;pointer-events:none}.search-input{width:100%;padding:9px 10px 9px 34px;border:1px solid #e2e8f0;border-radius:8px;font-size:.875rem;background:#fff;color:#1e293b;outline:none;min-width:0;font-family:inherit;transition:border-color .15s,box-shadow .15s}.search-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.search-input::placeholder{color:#94a3b8}.search-input-loading{padding-right:34px}.search-input-loading::-webkit-search-cancel-button{display:none}.search-spinner{position:absolute;right:10px;top:50%;margin-top:-8px;width:16px;height:16px;pointer-events:none}.search-spinner-ring{display:block;width:16px;height:16px;box-sizing:border-box;border:2px solid #e2e8f0;border-top-color:#64748b;border-radius:50%;animation:search-spin .6s linear infinite}.search-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@keyframes search-spin{to{transform:rotate(360deg)}}@media(pointer:coarse),(max-width:480px){.search-input{min-height:44px}}@media(max-width:1024px){:host{flex:0 1 280px}}@media(max-width:768px){:host{flex:0 1 240px}}@media(max-width:640px){:host{flex:1 1 auto}.search-input{font-size:16px}}\n"],
|
|
374
|
+
styles: [":host{display:block;flex:0 1 var(--ui-search-width, 325px);min-width:0}.search-bar{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:10px;color:#94a3b8;pointer-events:none}.search-input{width:100%;padding:9px 10px 9px 34px;border:1px solid #e2e8f0;border-radius:8px;font-size:.875rem;background:#fff;color:#1e293b;outline:none;min-width:0;font-family:inherit;transition:border-color .15s,box-shadow .15s}.search-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.search-input::placeholder{color:#94a3b8}.search-input-loading{padding-right:34px}.search-input-loading::-webkit-search-cancel-button{display:none}.search-spinner{position:absolute;right:10px;top:50%;margin-top:-8px;width:16px;height:16px;pointer-events:none}.search-spinner-ring{display:block;width:16px;height:16px;box-sizing:border-box;border:2px solid #e2e8f0;border-top-color:#64748b;border-radius:50%;animation:search-spin .6s linear infinite}.search-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@keyframes search-spin{to{transform:rotate(360deg)}}@media(pointer:coarse),(max-width:480px){.search-input{min-height:44px}}@media(max-width:1024px){:host{flex:0 1 280px}}@media(max-width:768px){:host{flex:0 1 240px}}@media(max-width:640px){:host{flex:1 1 auto}.search-input{font-size:16px}}\n"],
|
|
375
375
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
376
376
|
});
|
|
377
377
|
}
|
|
@@ -424,7 +424,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
424
424
|
}
|
|
425
425
|
</div>
|
|
426
426
|
`,
|
|
427
|
-
styles: [":host{display:block;flex:0 1 325px;min-width:0}.search-bar{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:10px;color:#94a3b8;pointer-events:none}.search-input{width:100%;padding:9px 10px 9px 34px;border:1px solid #e2e8f0;border-radius:8px;font-size:.875rem;background:#fff;color:#1e293b;outline:none;min-width:0;font-family:inherit;transition:border-color .15s,box-shadow .15s}.search-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.search-input::placeholder{color:#94a3b8}.search-input-loading{padding-right:34px}.search-input-loading::-webkit-search-cancel-button{display:none}.search-spinner{position:absolute;right:10px;top:50%;margin-top:-8px;width:16px;height:16px;pointer-events:none}.search-spinner-ring{display:block;width:16px;height:16px;box-sizing:border-box;border:2px solid #e2e8f0;border-top-color:#64748b;border-radius:50%;animation:search-spin .6s linear infinite}.search-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@keyframes search-spin{to{transform:rotate(360deg)}}@media(pointer:coarse),(max-width:480px){.search-input{min-height:44px}}@media(max-width:1024px){:host{flex:0 1 280px}}@media(max-width:768px){:host{flex:0 1 240px}}@media(max-width:640px){:host{flex:1 1 auto}.search-input{font-size:16px}}\n"]
|
|
427
|
+
styles: [":host{display:block;flex:0 1 var(--ui-search-width, 325px);min-width:0}.search-bar{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:10px;color:#94a3b8;pointer-events:none}.search-input{width:100%;padding:9px 10px 9px 34px;border:1px solid #e2e8f0;border-radius:8px;font-size:.875rem;background:#fff;color:#1e293b;outline:none;min-width:0;font-family:inherit;transition:border-color .15s,box-shadow .15s}.search-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.search-input::placeholder{color:#94a3b8}.search-input-loading{padding-right:34px}.search-input-loading::-webkit-search-cancel-button{display:none}.search-spinner{position:absolute;right:10px;top:50%;margin-top:-8px;width:16px;height:16px;pointer-events:none}.search-spinner-ring{display:block;width:16px;height:16px;box-sizing:border-box;border:2px solid #e2e8f0;border-top-color:#64748b;border-radius:50%;animation:search-spin .6s linear infinite}.search-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@keyframes search-spin{to{transform:rotate(360deg)}}@media(pointer:coarse),(max-width:480px){.search-input{min-height:44px}}@media(max-width:1024px){:host{flex:0 1 280px}}@media(max-width:768px){:host{flex:0 1 240px}}@media(max-width:640px){:host{flex:1 1 auto}.search-input{font-size:16px}}\n"]
|
|
428
428
|
}]
|
|
429
429
|
}],
|
|
430
430
|
ctorParameters: () => [],
|
|
@@ -4497,6 +4497,7 @@ const EXTRA_ICONS = {
|
|
|
4497
4497
|
"refund": "M3 10h10a8 8 0 0 1 8 8v2 M3 10l6 6 M3 10l6-6",
|
|
4498
4498
|
"link": "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71 M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
|
|
4499
4499
|
"chart": "M18 20V10 M12 20V4 M6 20v-6",
|
|
4500
|
+
"clipboard": "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z",
|
|
4500
4501
|
"save": "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z M17 21v-8H7v8 M7 3v5h8",
|
|
4501
4502
|
"bank": "M3 21h18 M3 10h18 M5 6l7-3 7 3 M4 10v11 M20 10v11 M8 14v3 M12 14v3 M16 14v3"
|
|
4502
4503
|
};
|
|
@@ -5762,7 +5763,7 @@ var TableToolbarComponent = class TableToolbarComponent {
|
|
|
5762
5763
|
this.saveNameModalOpen = signal(false, ...ngDevMode ? [{ debugName: "saveNameModalOpen" }] : /* istanbul ignore next */ []);
|
|
5763
5764
|
this._saveViewName = "";
|
|
5764
5765
|
this._pendingCols = signal([], ...ngDevMode ? [{ debugName: "_pendingCols" }] : /* istanbul ignore next */ []);
|
|
5765
|
-
this._allowedButtons = computed(() => this.readOnly() ? this.tableButtons().filter((b) => b.type === "export") : this.tableButtons(), ...ngDevMode ? [{ debugName: "_allowedButtons" }] : /* istanbul ignore next */ []);
|
|
5766
|
+
this._allowedButtons = computed(() => this.readOnly() ? this.tableButtons().filter((b) => b.type === "export" || b.allowReadOnly && b.type !== "import") : this.tableButtons(), ...ngDevMode ? [{ debugName: "_allowedButtons" }] : /* istanbul ignore next */ []);
|
|
5766
5767
|
this.standaloneButtons = computed(() => this._allowedButtons().filter((b) => (b.variant === "primary" || b.variant === "secondary") && !b.hidden).sort((a, b) => {
|
|
5767
5768
|
if (a.variant === b.variant) return 0;
|
|
5768
5769
|
return a.variant === "primary" ? -1 : 1;
|
|
@@ -10351,7 +10352,7 @@ var DataTableComponent = class DataTableComponent {
|
|
|
10351
10352
|
}, ...ngDevMode ? [{ debugName: "_exportParams" }] : /* istanbul ignore next */ []);
|
|
10352
10353
|
this._effectiveButtons = computed(() => {
|
|
10353
10354
|
const canEdit = this._canEdit();
|
|
10354
|
-
const buttons = canEdit ? this.tableButtons() :
|
|
10355
|
+
const buttons = canEdit ? this.tableButtons() : this.tableButtons().filter((b) => b.allowReadOnly);
|
|
10355
10356
|
const cfg = this.importExportConfig();
|
|
10356
10357
|
if (!cfg) return buttons;
|
|
10357
10358
|
return [
|
|
@@ -28184,6 +28185,9 @@ var PanelInfoListComponent = class PanelInfoListComponent {
|
|
|
28184
28185
|
@if (item.editAction) {
|
|
28185
28186
|
<ui-icon class="pil-edit-btn" name="edit" [size]="14" [tooltip]="item.editTooltip ?? 'Edit'" (iconClick)="item.editAction!()" />
|
|
28186
28187
|
}
|
|
28188
|
+
@if (item.deleteAction) {
|
|
28189
|
+
<ui-icon class="pil-edit-btn" name="delete" variant="danger" [size]="14" [tooltip]="item.deleteTooltip ?? 'Delete'" (iconClick)="item.deleteAction!()" />
|
|
28190
|
+
}
|
|
28187
28191
|
</span>
|
|
28188
28192
|
</div>
|
|
28189
28193
|
}
|
|
@@ -28326,6 +28330,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
28326
28330
|
@if (item.editAction) {
|
|
28327
28331
|
<ui-icon class="pil-edit-btn" name="edit" [size]="14" [tooltip]="item.editTooltip ?? 'Edit'" (iconClick)="item.editAction!()" />
|
|
28328
28332
|
}
|
|
28333
|
+
@if (item.deleteAction) {
|
|
28334
|
+
<ui-icon class="pil-edit-btn" name="delete" variant="danger" [size]="14" [tooltip]="item.deleteTooltip ?? 'Delete'" (iconClick)="item.deleteAction!()" />
|
|
28335
|
+
}
|
|
28329
28336
|
</span>
|
|
28330
28337
|
</div>
|
|
28331
28338
|
}
|
|
@@ -35375,6 +35382,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
35375
35382
|
}]
|
|
35376
35383
|
}] }
|
|
35377
35384
|
});
|
|
35385
|
+
const MOVE_PREFIX = "ub-move:";
|
|
35386
|
+
const MOVE_ICON = "M4 12h12m0 0l-4-4m4 4l-4 4M20 5v14";
|
|
35378
35387
|
let nextBoardId = 0;
|
|
35379
35388
|
const DOT_COLORS = {
|
|
35380
35389
|
blue: "#3b82f6",
|
|
@@ -35413,6 +35422,7 @@ var BoardComponent = class BoardComponent {
|
|
|
35413
35422
|
this.itemKey = input.required(...ngDevMode ? [{ debugName: "itemKey" }] : /* istanbul ignore next */ []);
|
|
35414
35423
|
this.itemLabel = input.required(...ngDevMode ? [{ debugName: "itemLabel" }] : /* istanbul ignore next */ []);
|
|
35415
35424
|
this.cardActions = input([], ...ngDevMode ? [{ debugName: "cardActions" }] : /* istanbul ignore next */ []);
|
|
35425
|
+
this.moveMenu = input(true, ...ngDevMode ? [{ debugName: "moveMenu" }] : /* istanbul ignore next */ []);
|
|
35416
35426
|
this.loading = input(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
|
|
35417
35427
|
this.error = input(null, ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
35418
35428
|
this.readOnly = input(false, ...ngDevMode ? [{ debugName: "readOnly" }] : /* istanbul ignore next */ []);
|
|
@@ -35454,6 +35464,27 @@ var BoardComponent = class BoardComponent {
|
|
|
35454
35464
|
this.drag = null;
|
|
35455
35465
|
this.skeletonColumns = computed(() => Array.from({ length: Math.max(this.columns().length, 4) }, (_, i) => i), ...ngDevMode ? [{ debugName: "skeletonColumns" }] : /* istanbul ignore next */ []);
|
|
35456
35466
|
this.canDrag = computed(() => !this.readOnly() && !this.moveDisabled(), ...ngDevMode ? [{ debugName: "canDrag" }] : /* istanbul ignore next */ []);
|
|
35467
|
+
this.menuActions = computed(() => {
|
|
35468
|
+
const out = /* @__PURE__ */ new Map();
|
|
35469
|
+
const own = this.cardActions();
|
|
35470
|
+
if (!this.moveMenu() || !this.canDrag()) return out;
|
|
35471
|
+
const cols = this.cols();
|
|
35472
|
+
const shared = /* @__PURE__ */ new Map();
|
|
35473
|
+
for (const from of cols) for (const item of from.items) {
|
|
35474
|
+
let list = this.canMove() ? void 0 : shared.get(from.key);
|
|
35475
|
+
if (!list) {
|
|
35476
|
+
const moves = cols.filter((to) => this.accepts(item, from.key, to)).map((to) => ({
|
|
35477
|
+
type: MOVE_PREFIX + to.key,
|
|
35478
|
+
label: `Move to ${to.label}`,
|
|
35479
|
+
icon: MOVE_ICON
|
|
35480
|
+
}));
|
|
35481
|
+
list = moves.length ? [...own, ...moves] : own;
|
|
35482
|
+
if (!this.canMove()) shared.set(from.key, list);
|
|
35483
|
+
}
|
|
35484
|
+
out.set(this.itemKey()(item), list);
|
|
35485
|
+
}
|
|
35486
|
+
return out;
|
|
35487
|
+
}, ...ngDevMode ? [{ debugName: "menuActions" }] : /* istanbul ignore next */ []);
|
|
35457
35488
|
effect(() => {
|
|
35458
35489
|
if (this.loading()) {
|
|
35459
35490
|
this.drawn.set({});
|
|
@@ -35518,13 +35549,32 @@ var BoardComponent = class BoardComponent {
|
|
|
35518
35549
|
for (let i = cols.findIndex((c) => c.key === col.key) + step; i >= 0 && i < cols.length; i += step) if (this.accepts(item, col.key, cols[i])) {
|
|
35519
35550
|
this.move(item, col.key, cols[i].key);
|
|
35520
35551
|
this.announcement.set(`${this.itemLabel()(item)} moved to ${cols[i].label}`);
|
|
35521
|
-
|
|
35522
|
-
|
|
35523
|
-
|
|
35524
|
-
|
|
35552
|
+
this.focusCard(item);
|
|
35553
|
+
return;
|
|
35554
|
+
}
|
|
35555
|
+
}
|
|
35556
|
+
onMenuAction(type, item) {
|
|
35557
|
+
if (!type.startsWith(MOVE_PREFIX)) {
|
|
35558
|
+
this.cardAction.emit({
|
|
35559
|
+
type,
|
|
35560
|
+
item
|
|
35525
35561
|
});
|
|
35526
35562
|
return;
|
|
35527
35563
|
}
|
|
35564
|
+
const key = this.itemKey()(item);
|
|
35565
|
+
const from = this.cols().find((c) => c.items.some((i) => this.itemKey()(i) === key));
|
|
35566
|
+
const to = this.cols().find((c) => c.key === type.slice(8));
|
|
35567
|
+
if (!from || !to || !this.accepts(item, from.key, to)) return;
|
|
35568
|
+
this.move(item, from.key, to.key);
|
|
35569
|
+
this.announcement.set(`${this.itemLabel()(item)} moved to ${to.label}`);
|
|
35570
|
+
this.focusCard(item);
|
|
35571
|
+
}
|
|
35572
|
+
focusCard(item) {
|
|
35573
|
+
const key = this.itemKey()(item);
|
|
35574
|
+
setTimeout(() => {
|
|
35575
|
+
const cards = this.host.nativeElement.querySelectorAll(".ub-card");
|
|
35576
|
+
Array.from(cards).find((c) => c.dataset["boardKey"] === key)?.focus();
|
|
35577
|
+
});
|
|
35528
35578
|
}
|
|
35529
35579
|
accepts(item, from, to) {
|
|
35530
35580
|
if (from === to.key || to.dropDisabled || this.moveDisabled() || this.readOnly()) return false;
|
|
@@ -35605,6 +35655,13 @@ var BoardComponent = class BoardComponent {
|
|
|
35605
35655
|
isRequired: false,
|
|
35606
35656
|
transformFunction: null
|
|
35607
35657
|
},
|
|
35658
|
+
moveMenu: {
|
|
35659
|
+
classPropertyName: "moveMenu",
|
|
35660
|
+
publicName: "moveMenu",
|
|
35661
|
+
isSignal: true,
|
|
35662
|
+
isRequired: false,
|
|
35663
|
+
transformFunction: null
|
|
35664
|
+
},
|
|
35608
35665
|
loading: {
|
|
35609
35666
|
classPropertyName: "loading",
|
|
35610
35667
|
publicName: "loading",
|
|
@@ -35707,10 +35764,11 @@ var BoardComponent = class BoardComponent {
|
|
|
35707
35764
|
template: `
|
|
35708
35765
|
<!-- The card's "⋮" menu. Place it in the card's top row: <ng-container [ngTemplateOutlet]="menu" [ngTemplateOutletContext]="{ $implicit: item }" /> -->
|
|
35709
35766
|
<ng-template #menuTpl let-item>
|
|
35710
|
-
@
|
|
35767
|
+
@let actions = menuActions().get(itemKey()(item)) ?? cardActions();
|
|
35768
|
+
@if (actions.length) {
|
|
35711
35769
|
<div class="ub-card__top-right" (click)="$event.stopPropagation()" (keydown)="$event.stopPropagation()">
|
|
35712
|
-
<ui-more-menu [actions]="
|
|
35713
|
-
(actionClick)="
|
|
35770
|
+
<ui-more-menu [actions]="actions" [ariaLabel]="'Actions for ' + itemLabel()(item)"
|
|
35771
|
+
(actionClick)="onMenuAction($event, item)" />
|
|
35714
35772
|
</div>
|
|
35715
35773
|
}
|
|
35716
35774
|
</ng-template>
|
|
@@ -35869,10 +35927,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
35869
35927
|
template: `
|
|
35870
35928
|
<!-- The card's "⋮" menu. Place it in the card's top row: <ng-container [ngTemplateOutlet]="menu" [ngTemplateOutletContext]="{ $implicit: item }" /> -->
|
|
35871
35929
|
<ng-template #menuTpl let-item>
|
|
35872
|
-
@
|
|
35930
|
+
@let actions = menuActions().get(itemKey()(item)) ?? cardActions();
|
|
35931
|
+
@if (actions.length) {
|
|
35873
35932
|
<div class="ub-card__top-right" (click)="$event.stopPropagation()" (keydown)="$event.stopPropagation()">
|
|
35874
|
-
<ui-more-menu [actions]="
|
|
35875
|
-
(actionClick)="
|
|
35933
|
+
<ui-more-menu [actions]="actions" [ariaLabel]="'Actions for ' + itemLabel()(item)"
|
|
35934
|
+
(actionClick)="onMenuAction($event, item)" />
|
|
35876
35935
|
</div>
|
|
35877
35936
|
}
|
|
35878
35937
|
</ng-template>
|
|
@@ -35992,6 +36051,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
35992
36051
|
required: false
|
|
35993
36052
|
}]
|
|
35994
36053
|
}],
|
|
36054
|
+
moveMenu: [{
|
|
36055
|
+
type: i0.Input,
|
|
36056
|
+
args: [{
|
|
36057
|
+
isSignal: true,
|
|
36058
|
+
alias: "moveMenu",
|
|
36059
|
+
required: false
|
|
36060
|
+
}]
|
|
36061
|
+
}],
|
|
35995
36062
|
loading: [{
|
|
35996
36063
|
type: i0.Input,
|
|
35997
36064
|
args: [{
|
|
@@ -37502,7 +37569,17 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
37502
37569
|
}]
|
|
37503
37570
|
}
|
|
37504
37571
|
});
|
|
37505
|
-
const CSS_LENGTH = /^(?:0
|
|
37572
|
+
const CSS_LENGTH = /^(?:0|(?:\d+\.?\d*|\.\d+)(?:px|rem|em|%|vh|vw|ch)|(?:calc|var)\([^;{}]*\))$/i;
|
|
37573
|
+
const BREAKPOINT_PX = {
|
|
37574
|
+
sm: 640,
|
|
37575
|
+
md: 900,
|
|
37576
|
+
lg: 1200
|
|
37577
|
+
};
|
|
37578
|
+
function lengthOr(v, fallback) {
|
|
37579
|
+
const t = String(v ?? "").trim();
|
|
37580
|
+
if (!t || !CSS_LENGTH.test(t)) return fallback;
|
|
37581
|
+
return t === "0" ? "0px" : t;
|
|
37582
|
+
}
|
|
37506
37583
|
function px(v, fallback) {
|
|
37507
37584
|
if (v === null || v === void 0 || v === "") return fallback;
|
|
37508
37585
|
const n = Number(v);
|
|
@@ -37518,24 +37595,55 @@ var SidebarLayoutComponent = class SidebarLayoutComponent {
|
|
|
37518
37595
|
this.stickyOffset = input(32, ...ngDevMode ? [{ debugName: "stickyOffset" }] : /* istanbul ignore next */ []);
|
|
37519
37596
|
this.collapseAt = input("md", ...ngDevMode ? [{ debugName: "collapseAt" }] : /* istanbul ignore next */ []);
|
|
37520
37597
|
this.sideFirstWhenCollapsed = input(true, ...ngDevMode ? [{ debugName: "sideFirstWhenCollapsed" }] : /* istanbul ignore next */ []);
|
|
37598
|
+
this.sideFirstInDom = input(false, ...ngDevMode ? [{ debugName: "sideFirstInDom" }] : /* istanbul ignore next */ []);
|
|
37599
|
+
this.sideBleed = input("4px", ...ngDevMode ? [{ debugName: "sideBleed" }] : /* istanbul ignore next */ []);
|
|
37600
|
+
this.collapsed = signal(false, ...ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []);
|
|
37521
37601
|
this.position = computed(() => this.sidePosition() === "start" ? "start" : "end", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
37522
|
-
this.
|
|
37523
|
-
const
|
|
37524
|
-
return
|
|
37525
|
-
}, ...ngDevMode ? [{ debugName: "
|
|
37526
|
-
this.
|
|
37602
|
+
this.collapseKey = computed(() => {
|
|
37603
|
+
const c = this.collapseAt();
|
|
37604
|
+
return c === "never" || c === "sm" || c === "lg" ? c : "md";
|
|
37605
|
+
}, ...ngDevMode ? [{ debugName: "collapseKey" }] : /* istanbul ignore next */ []);
|
|
37606
|
+
this.domSideFirst = computed(() => this.sideFirstInDom() && this.sideFirstWhenCollapsed() && this.collapsed(), ...ngDevMode ? [{ debugName: "domSideFirst" }] : /* istanbul ignore next */ []);
|
|
37607
|
+
this.domOrder = computed(() => this.domSideFirst() ? "side-first" : "main-first", ...ngDevMode ? [{ debugName: "domOrder" }] : /* istanbul ignore next */ []);
|
|
37608
|
+
this.sideCss = computed(() => lengthOr(this.sideWidth(), "320px"), ...ngDevMode ? [{ debugName: "sideCss" }] : /* istanbul ignore next */ []);
|
|
37609
|
+
this.bleedCss = computed(() => lengthOr(this.sideBleed(), "4px"), ...ngDevMode ? [{ debugName: "bleedCss" }] : /* istanbul ignore next */ []);
|
|
37610
|
+
this.gapCss = computed(() => {
|
|
37611
|
+
const g = resolveLayoutGap(this.gap(), "md");
|
|
37612
|
+
if (g.startsWith("-")) return "16px";
|
|
37613
|
+
return g === "0" ? "0px" : g;
|
|
37614
|
+
}, ...ngDevMode ? [{ debugName: "gapCss" }] : /* istanbul ignore next */ []);
|
|
37527
37615
|
this.topCss = computed(() => `${px(this.stickyTop(), 16)}px`, ...ngDevMode ? [{ debugName: "topCss" }] : /* istanbul ignore next */ []);
|
|
37528
37616
|
this.offCss = computed(() => `${px(this.stickyOffset(), 32)}px`, ...ngDevMode ? [{ debugName: "offCss" }] : /* istanbul ignore next */ []);
|
|
37529
37617
|
this.rootClass = computed(() => {
|
|
37530
|
-
const
|
|
37531
|
-
const collapse =
|
|
37618
|
+
const key = this.collapseKey();
|
|
37619
|
+
const collapse = key === "never" ? "" : `sl-c-${key}`;
|
|
37620
|
+
const domFirst = this.domSideFirst();
|
|
37532
37621
|
return [
|
|
37533
37622
|
this.position() === "start" ? "sl-start" : "",
|
|
37534
37623
|
this.stickySide() ? "sl-sticky" : "",
|
|
37535
37624
|
collapse,
|
|
37536
|
-
collapse && this.sideFirstWhenCollapsed() ? "sl-first" : ""
|
|
37625
|
+
collapse && this.sideFirstWhenCollapsed() && !domFirst ? "sl-first" : "",
|
|
37626
|
+
domFirst ? "sl-dom-first" : ""
|
|
37537
37627
|
].filter(Boolean).join(" ");
|
|
37538
37628
|
}, ...ngDevMode ? [{ debugName: "rootClass" }] : /* istanbul ignore next */ []);
|
|
37629
|
+
effect((onCleanup) => {
|
|
37630
|
+
const key = this.collapseKey();
|
|
37631
|
+
if (!this.sideFirstInDom() || key === "never" || typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
37632
|
+
this.collapsed.set(false);
|
|
37633
|
+
return;
|
|
37634
|
+
}
|
|
37635
|
+
const mql = window.matchMedia(`(max-width: ${BREAKPOINT_PX[key]}px)`);
|
|
37636
|
+
this.collapsed.set(mql.matches);
|
|
37637
|
+
const onChange = (e) => this.collapsed.set(e.matches);
|
|
37638
|
+
if (typeof mql.addEventListener === "function") {
|
|
37639
|
+
mql.addEventListener("change", onChange);
|
|
37640
|
+
onCleanup(() => mql.removeEventListener("change", onChange));
|
|
37641
|
+
} else {
|
|
37642
|
+
const legacy = mql;
|
|
37643
|
+
legacy.addListener(onChange);
|
|
37644
|
+
onCleanup(() => legacy.removeListener(onChange));
|
|
37645
|
+
}
|
|
37646
|
+
});
|
|
37539
37647
|
}
|
|
37540
37648
|
static {
|
|
37541
37649
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -37549,7 +37657,7 @@ var SidebarLayoutComponent = class SidebarLayoutComponent {
|
|
|
37549
37657
|
}
|
|
37550
37658
|
static {
|
|
37551
37659
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
37552
|
-
minVersion: "17.
|
|
37660
|
+
minVersion: "17.0.0",
|
|
37553
37661
|
version: "22.2.2",
|
|
37554
37662
|
type: SidebarLayoutComponent,
|
|
37555
37663
|
isStandalone: true,
|
|
@@ -37610,13 +37718,37 @@ var SidebarLayoutComponent = class SidebarLayoutComponent {
|
|
|
37610
37718
|
isSignal: true,
|
|
37611
37719
|
isRequired: false,
|
|
37612
37720
|
transformFunction: null
|
|
37721
|
+
},
|
|
37722
|
+
sideFirstInDom: {
|
|
37723
|
+
classPropertyName: "sideFirstInDom",
|
|
37724
|
+
publicName: "sideFirstInDom",
|
|
37725
|
+
isSignal: true,
|
|
37726
|
+
isRequired: false,
|
|
37727
|
+
transformFunction: null
|
|
37728
|
+
},
|
|
37729
|
+
sideBleed: {
|
|
37730
|
+
classPropertyName: "sideBleed",
|
|
37731
|
+
publicName: "sideBleed",
|
|
37732
|
+
isSignal: true,
|
|
37733
|
+
isRequired: false,
|
|
37734
|
+
transformFunction: null
|
|
37613
37735
|
}
|
|
37614
37736
|
},
|
|
37615
37737
|
host: { properties: { "attr.data-side-position": "position()" } },
|
|
37616
37738
|
ngImport: i0,
|
|
37617
|
-
template: `<div class="sl" [class]="rootClass()" [style.--sl-side-w]="sideCss()" [style.--sl-gap]="gapCss()" [style.--sl-top]="topCss()" [style.--sl-off]="offCss()" [style.row-gap]="gapCss()"><div class="sl-main"><ng-content select="[layout-main]" /></div><div class="sl-side"><ng-content select="[layout-side]" /></div></
|
|
37739
|
+
template: `<div class="sl" [class]="rootClass()" [attr.data-dom-order]="domOrder()" [style.--sl-side-w]="sideCss()" [style.--sl-gap]="gapCss()" [style.--sl-top]="topCss()" [style.--sl-off]="offCss()" [style.--sl-bleed]="bleedCss()" [style.row-gap]="gapCss()">@if (domSideFirst()) {<ng-container [ngTemplateOutlet]="sideTpl" /><ng-container [ngTemplateOutlet]="mainTpl" />} @else {<ng-container [ngTemplateOutlet]="mainTpl" /><ng-container [ngTemplateOutlet]="sideTpl" />}</div><ng-template #mainTpl><div class="sl-main"><ng-content select="[layout-main]" /></div></ng-template><ng-template #sideTpl><div class="sl-side"><ng-content select="[layout-side]" /></div></ng-template>`,
|
|
37618
37740
|
isInline: true,
|
|
37619
|
-
styles: [":host{display:block}.sl{display:grid;grid-template-columns:minmax(0,1fr) auto}.sl-main{grid-column:1;grid-row:1;min-width:0}.sl-side{grid-column:2;grid-row:1;box-sizing:border-box;width:var(--sl-side-w, 320px);
|
|
37741
|
+
styles: [":host{display:block}.sl{display:grid;grid-template-columns:minmax(0,1fr) auto;--sl-mis: var(--sl-gap, 16px);--sl-mie: 0px}.sl-main{grid-column:1;grid-row:1;min-width:0}.sl-side{grid-column:2;grid-row:1;box-sizing:border-box;width:var(--sl-side-w, 320px);min-width:0;margin-inline-start:var(--sl-mis);margin-inline-end:var(--sl-mie)}.sl-side:empty{display:none}.sl.sl-start{grid-template-columns:auto minmax(0,1fr);--sl-mis: 0px;--sl-mie: var(--sl-gap, 16px)}.sl.sl-start .sl-main{grid-column:2}.sl.sl-start .sl-side{grid-column:1}.sl.sl-sticky{--sl-bin: min(var(--sl-bleed, 4px), var(--sl-gap, 16px));--sl-mis: calc(var(--sl-gap, 16px) - var(--sl-bin));--sl-mie: calc(-1 * var(--sl-bleed, 4px));--sl-pis: var(--sl-bin);--sl-pie: var(--sl-bleed, 4px)}.sl.sl-sticky.sl-start{--sl-mis: calc(-1 * var(--sl-bleed, 4px));--sl-mie: calc(var(--sl-gap, 16px) - var(--sl-bin));--sl-pis: var(--sl-bleed, 4px);--sl-pie: var(--sl-bin)}.sl.sl-sticky .sl-side{position:-webkit-sticky;position:sticky;top:calc(var(--sl-top, 16px) - var(--sl-bleed, 4px));align-self:start;width:calc(var(--sl-side-w, 320px) + var(--sl-bleed, 4px) + var(--sl-bin));padding-block:var(--sl-bleed, 4px);padding-inline-start:var(--sl-pis);padding-inline-end:var(--sl-pie);margin-block-start:calc(-1 * var(--sl-bleed, 4px));margin-block-end:calc(-1 * var(--sl-bleed, 4px));max-height:calc(100vh - (var(--sl-top, 16px) + var(--sl-off, 32px)) + 2 * var(--sl-bleed, 4px));max-height:calc(100dvh - (var(--sl-top, 16px) + var(--sl-off, 32px)) + 2 * var(--sl-bleed, 4px));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}@media(max-width:640px){.sl.sl-c-sm{grid-template-columns:minmax(0,1fr)}.sl.sl-c-sm .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-sm .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-sm.sl-first .sl-side{order:-1}}@media(max-width:900px){.sl.sl-c-md{grid-template-columns:minmax(0,1fr)}.sl.sl-c-md .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-md .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-md.sl-first .sl-side{order:-1}}@media(max-width:1200px){.sl.sl-c-lg{grid-template-columns:minmax(0,1fr)}.sl.sl-c-lg .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-lg .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-lg.sl-first .sl-side{order:-1}}\n"],
|
|
37742
|
+
dependencies: [{
|
|
37743
|
+
kind: "directive",
|
|
37744
|
+
type: NgTemplateOutlet,
|
|
37745
|
+
selector: "[ngTemplateOutlet]",
|
|
37746
|
+
inputs: [
|
|
37747
|
+
"ngTemplateOutletContext",
|
|
37748
|
+
"ngTemplateOutlet",
|
|
37749
|
+
"ngTemplateOutletInjector"
|
|
37750
|
+
]
|
|
37751
|
+
}],
|
|
37620
37752
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
37621
37753
|
});
|
|
37622
37754
|
}
|
|
@@ -37632,11 +37764,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
37632
37764
|
selector: "ui-sidebar-layout",
|
|
37633
37765
|
standalone: true,
|
|
37634
37766
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
37767
|
+
imports: [NgTemplateOutlet],
|
|
37635
37768
|
host: { "[attr.data-side-position]": "position()" },
|
|
37636
|
-
template: `<div class="sl" [class]="rootClass()" [style.--sl-side-w]="sideCss()" [style.--sl-gap]="gapCss()" [style.--sl-top]="topCss()" [style.--sl-off]="offCss()" [style.row-gap]="gapCss()"><div class="sl-main"><ng-content select="[layout-main]" /></div><div class="sl-side"><ng-content select="[layout-side]" /></div></
|
|
37637
|
-
styles: [":host{display:block}.sl{display:grid;grid-template-columns:minmax(0,1fr) auto}.sl-main{grid-column:1;grid-row:1;min-width:0}.sl-side{grid-column:2;grid-row:1;box-sizing:border-box;width:var(--sl-side-w, 320px);
|
|
37769
|
+
template: `<div class="sl" [class]="rootClass()" [attr.data-dom-order]="domOrder()" [style.--sl-side-w]="sideCss()" [style.--sl-gap]="gapCss()" [style.--sl-top]="topCss()" [style.--sl-off]="offCss()" [style.--sl-bleed]="bleedCss()" [style.row-gap]="gapCss()">@if (domSideFirst()) {<ng-container [ngTemplateOutlet]="sideTpl" /><ng-container [ngTemplateOutlet]="mainTpl" />} @else {<ng-container [ngTemplateOutlet]="mainTpl" /><ng-container [ngTemplateOutlet]="sideTpl" />}</div><ng-template #mainTpl><div class="sl-main"><ng-content select="[layout-main]" /></div></ng-template><ng-template #sideTpl><div class="sl-side"><ng-content select="[layout-side]" /></div></ng-template>`,
|
|
37770
|
+
styles: [":host{display:block}.sl{display:grid;grid-template-columns:minmax(0,1fr) auto;--sl-mis: var(--sl-gap, 16px);--sl-mie: 0px}.sl-main{grid-column:1;grid-row:1;min-width:0}.sl-side{grid-column:2;grid-row:1;box-sizing:border-box;width:var(--sl-side-w, 320px);min-width:0;margin-inline-start:var(--sl-mis);margin-inline-end:var(--sl-mie)}.sl-side:empty{display:none}.sl.sl-start{grid-template-columns:auto minmax(0,1fr);--sl-mis: 0px;--sl-mie: var(--sl-gap, 16px)}.sl.sl-start .sl-main{grid-column:2}.sl.sl-start .sl-side{grid-column:1}.sl.sl-sticky{--sl-bin: min(var(--sl-bleed, 4px), var(--sl-gap, 16px));--sl-mis: calc(var(--sl-gap, 16px) - var(--sl-bin));--sl-mie: calc(-1 * var(--sl-bleed, 4px));--sl-pis: var(--sl-bin);--sl-pie: var(--sl-bleed, 4px)}.sl.sl-sticky.sl-start{--sl-mis: calc(-1 * var(--sl-bleed, 4px));--sl-mie: calc(var(--sl-gap, 16px) - var(--sl-bin));--sl-pis: var(--sl-bleed, 4px);--sl-pie: var(--sl-bin)}.sl.sl-sticky .sl-side{position:-webkit-sticky;position:sticky;top:calc(var(--sl-top, 16px) - var(--sl-bleed, 4px));align-self:start;width:calc(var(--sl-side-w, 320px) + var(--sl-bleed, 4px) + var(--sl-bin));padding-block:var(--sl-bleed, 4px);padding-inline-start:var(--sl-pis);padding-inline-end:var(--sl-pie);margin-block-start:calc(-1 * var(--sl-bleed, 4px));margin-block-end:calc(-1 * var(--sl-bleed, 4px));max-height:calc(100vh - (var(--sl-top, 16px) + var(--sl-off, 32px)) + 2 * var(--sl-bleed, 4px));max-height:calc(100dvh - (var(--sl-top, 16px) + var(--sl-off, 32px)) + 2 * var(--sl-bleed, 4px));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}@media(max-width:640px){.sl.sl-c-sm{grid-template-columns:minmax(0,1fr)}.sl.sl-c-sm .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-sm .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-sm.sl-first .sl-side{order:-1}}@media(max-width:900px){.sl.sl-c-md{grid-template-columns:minmax(0,1fr)}.sl.sl-c-md .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-md .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-md.sl-first .sl-side{order:-1}}@media(max-width:1200px){.sl.sl-c-lg{grid-template-columns:minmax(0,1fr)}.sl.sl-c-lg .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-lg .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-lg.sl-first .sl-side{order:-1}}\n"]
|
|
37638
37771
|
}]
|
|
37639
37772
|
}],
|
|
37773
|
+
ctorParameters: () => [],
|
|
37640
37774
|
propDecorators: {
|
|
37641
37775
|
sideWidth: [{
|
|
37642
37776
|
type: i0.Input,
|
|
@@ -37701,6 +37835,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
37701
37835
|
alias: "sideFirstWhenCollapsed",
|
|
37702
37836
|
required: false
|
|
37703
37837
|
}]
|
|
37838
|
+
}],
|
|
37839
|
+
sideFirstInDom: [{
|
|
37840
|
+
type: i0.Input,
|
|
37841
|
+
args: [{
|
|
37842
|
+
isSignal: true,
|
|
37843
|
+
alias: "sideFirstInDom",
|
|
37844
|
+
required: false
|
|
37845
|
+
}]
|
|
37846
|
+
}],
|
|
37847
|
+
sideBleed: [{
|
|
37848
|
+
type: i0.Input,
|
|
37849
|
+
args: [{
|
|
37850
|
+
isSignal: true,
|
|
37851
|
+
alias: "sideBleed",
|
|
37852
|
+
required: false
|
|
37853
|
+
}]
|
|
37704
37854
|
}]
|
|
37705
37855
|
}
|
|
37706
37856
|
});
|