@simplysm/angular 14.0.89 → 14.0.91
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-sidebar-user.d.ts","sourceRoot":"","sources":["../../../src/layout/sidebar/sd-sidebar-user.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"sd-sidebar-user.d.ts","sourceRoot":"","sources":["../../../src/layout/sidebar/sd-sidebar-user.ts"],"names":[],"mappings":";AAaA,qBA0Da,aAAa;IACxB,QAAQ,qEAA8B;IAEtC,QAAQ,kDAAiB;IAEzB,qBAAqB,IAAI,IAAI;yCALlB,aAAa;2CAAb,aAAa;CAQzB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;KACrC,EAAE,CAAC;CACL"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, input, signal, ViewEncapsulation } from "@angular/core";
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input, signal, ViewEncapsulation, } from "@angular/core";
|
|
2
2
|
import { SdCollapseIcon } from "../../controls/collapse/sd-collapse-icon";
|
|
3
3
|
import { SdCollapse } from "../../controls/collapse/sd-collapse";
|
|
4
4
|
import { SdRipple } from "../../core/ripple/sd-ripple";
|
|
@@ -60,40 +60,36 @@ export class SdSidebarUser {
|
|
|
60
60
|
let tmp_0_0;
|
|
61
61
|
i0.ɵɵadvance(2);
|
|
62
62
|
i0.ɵɵconditional((tmp_0_0 = ctx.userMenu()) ? 2 : -1, tmp_0_0);
|
|
63
|
-
} }, dependencies: [SdCollapseIcon,
|
|
64
|
-
SdCollapse,
|
|
65
|
-
SdRipple,
|
|
66
|
-
SdList,
|
|
67
|
-
SdListItem], styles: ["sd-sidebar-user {\n display: block;\n}\nsd-sidebar-user > ._menu-button {\n display: block;\n cursor: pointer;\n user-select: none;\n padding: var(--gap-default);\n}\nsd-sidebar-user > ._menu-button:hover {\n background: var(--trans-lighter);\n}\nsd-sidebar-user > sd-collapse > ._content > sd-list {\n background: var(--trans-lightest);\n padding: var(--gap-xs) 0;\n}"], encapsulation: 2, changeDetection: 0 });
|
|
63
|
+
} }, dependencies: [SdCollapseIcon, SdCollapse, SdRipple, SdList, SdListItem], styles: ["sd-sidebar-user {\n display: block;\n}\nsd-sidebar-user > ._menu-button {\n display: block;\n cursor: pointer;\n user-select: none;\n padding: var(--gap-default);\n}\nsd-sidebar-user > ._menu-button:hover {\n background: var(--trans-lighter);\n}\nsd-sidebar-user > sd-collapse > ._content > sd-list {\n background: var(--trans-lightest);\n padding: var(--gap-xs) 0;\n}"], encapsulation: 2, changeDetection: 0 });
|
|
68
64
|
}
|
|
69
65
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdSidebarUser, [{
|
|
70
66
|
type: Component,
|
|
71
|
-
args: [{ selector: "sd-sidebar-user", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{{ _userMenu.title }}
|
|
84
|
-
<sd-collapse-icon [open]="menuOpen()" style="float: right;" [openRotate]="180" />
|
|
85
|
-
</div>
|
|
86
|
-
|
|
87
|
-
<sd-collapse [open]="menuOpen()">
|
|
88
|
-
<sd-list [inset]="true">
|
|
89
|
-
@for (menu of _userMenu.menus; track menu.title) {
|
|
90
|
-
<sd-list-item (click)="menu.onClick()">
|
|
91
|
-
{{ menu.title }}
|
|
92
|
-
</sd-list-item>
|
|
93
|
-
}
|
|
94
|
-
</sd-list>
|
|
95
|
-
</sd-collapse>
|
|
96
|
-
}
|
|
67
|
+
args: [{ selector: "sd-sidebar-user", changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [SdCollapseIcon, SdCollapse, SdRipple, SdList, SdListItem], template: `
|
|
68
|
+
<div class="p-lg">
|
|
69
|
+
<ng-content />
|
|
70
|
+
</div>
|
|
71
|
+
@if (userMenu(); as _userMenu) {
|
|
72
|
+
<div
|
|
73
|
+
class="_menu-button"
|
|
74
|
+
tabindex="0"
|
|
75
|
+
(click)="onMenuOpenButtonClick()"
|
|
76
|
+
(keydown.enter)="onMenuOpenButtonClick()"
|
|
77
|
+
[sdRipple]="true"
|
|
78
|
+
>
|
|
79
|
+
{{ _userMenu.title }}
|
|
80
|
+
<sd-collapse-icon [open]="menuOpen()" style="float: right;" [openRotate]="180" />
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<sd-collapse [open]="menuOpen()">
|
|
84
|
+
<sd-list [inset]="true">
|
|
85
|
+
@for (menu of _userMenu.menus; track menu.title) {
|
|
86
|
+
<sd-list-item (click)="menu.onClick()">
|
|
87
|
+
{{ menu.title }}
|
|
88
|
+
</sd-list-item>
|
|
89
|
+
}
|
|
90
|
+
</sd-list>
|
|
91
|
+
</sd-collapse>
|
|
92
|
+
}
|
|
97
93
|
`, styles: ["sd-sidebar-user {\n display: block;\n}\nsd-sidebar-user > ._menu-button {\n display: block;\n cursor: pointer;\n user-select: none;\n padding: var(--gap-default);\n}\nsd-sidebar-user > ._menu-button:hover {\n background: var(--trans-lighter);\n}\nsd-sidebar-user > sd-collapse > ._content > sd-list {\n background: var(--trans-lightest);\n padding: var(--gap-xs) 0;\n}"] }]
|
|
98
94
|
}], null, { userMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "userMenu", required: false }] }] }); })();
|
|
99
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSidebarUser, { className: "SdSidebarUser", filePath: "packages/angular/src/layout/sidebar/sd-sidebar-user.ts", lineNumber:
|
|
95
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSidebarUser, { className: "SdSidebarUser", filePath: "packages/angular/src/layout/sidebar/sd-sidebar-user.ts", lineNumber: 72 }); })();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysm/angular",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.91",
|
|
4
4
|
"description": "심플리즘 패키지 - Angular",
|
|
5
5
|
"author": "심플리즘",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"jspdf": "^4.2.1",
|
|
51
51
|
"rxjs": "^7.8.2",
|
|
52
52
|
"tabbable": "^6.4.0",
|
|
53
|
-
"@simplysm/core-browser": "14.0.
|
|
54
|
-
"@simplysm/core-common": "14.0.
|
|
55
|
-
"@simplysm/service-
|
|
56
|
-
"@simplysm/service-
|
|
53
|
+
"@simplysm/core-browser": "14.0.91",
|
|
54
|
+
"@simplysm/core-common": "14.0.91",
|
|
55
|
+
"@simplysm/service-common": "14.0.91",
|
|
56
|
+
"@simplysm/service-client": "14.0.91"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@angular/compiler": "^21.2.15",
|
|
@@ -1,82 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
],
|
|
20
|
-
template: `
|
|
21
|
-
<div class="p-lg">
|
|
22
|
-
<ng-content />
|
|
23
|
-
</div>
|
|
24
|
-
@if (userMenu(); as _userMenu) {
|
|
25
|
-
<div
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
input,
|
|
5
|
+
signal,
|
|
6
|
+
ViewEncapsulation,
|
|
7
|
+
} from "@angular/core";
|
|
8
|
+
import { SdCollapseIcon } from "../../controls/collapse/sd-collapse-icon";
|
|
9
|
+
import { SdCollapse } from "../../controls/collapse/sd-collapse";
|
|
10
|
+
import { SdRipple } from "../../core/ripple/sd-ripple";
|
|
11
|
+
import { SdList } from "../../controls/list/sd-list";
|
|
12
|
+
import { SdListItem } from "../../controls/list/sd-list-item";
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
selector: "sd-sidebar-user",
|
|
16
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
|
+
encapsulation: ViewEncapsulation.None,
|
|
18
|
+
standalone: true,
|
|
19
|
+
imports: [SdCollapseIcon, SdCollapse, SdRipple, SdList, SdListItem],
|
|
20
|
+
template: `
|
|
21
|
+
<div class="p-lg">
|
|
22
|
+
<ng-content />
|
|
23
|
+
</div>
|
|
24
|
+
@if (userMenu(); as _userMenu) {
|
|
25
|
+
<div
|
|
26
|
+
class="_menu-button"
|
|
27
|
+
tabindex="0"
|
|
28
|
+
(click)="onMenuOpenButtonClick()"
|
|
29
|
+
(keydown.enter)="onMenuOpenButtonClick()"
|
|
30
|
+
[sdRipple]="true"
|
|
31
|
+
>
|
|
32
|
+
{{ _userMenu.title }}
|
|
33
|
+
<sd-collapse-icon [open]="menuOpen()" style="float: right;" [openRotate]="180" />
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<sd-collapse [open]="menuOpen()">
|
|
37
|
+
<sd-list [inset]="true">
|
|
38
|
+
@for (menu of _userMenu.menus; track menu.title) {
|
|
39
|
+
<sd-list-item (click)="menu.onClick()">
|
|
40
|
+
{{ menu.title }}
|
|
41
|
+
</sd-list-item>
|
|
42
|
+
}
|
|
43
|
+
</sd-list>
|
|
44
|
+
</sd-collapse>
|
|
45
|
+
}
|
|
46
|
+
`,
|
|
47
|
+
styles: [
|
|
48
|
+
/* language=SCSS */ `
|
|
49
|
+
sd-sidebar-user {
|
|
50
|
+
display: block;
|
|
51
|
+
|
|
52
|
+
> ._menu-button {
|
|
53
|
+
display: block;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
user-select: none;
|
|
56
|
+
|
|
57
|
+
padding: var(--gap-default);
|
|
58
|
+
|
|
59
|
+
&:hover {
|
|
60
|
+
background: var(--trans-lighter);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
> sd-collapse > ._content > sd-list {
|
|
65
|
+
background: var(--trans-lightest);
|
|
66
|
+
padding: var(--gap-xs) 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`,
|
|
70
|
+
],
|
|
71
|
+
})
|
|
72
|
+
export class SdSidebarUser {
|
|
73
|
+
userMenu = input<SdSidebarUserMenu>();
|
|
74
|
+
|
|
75
|
+
menuOpen = signal(false);
|
|
76
|
+
|
|
77
|
+
onMenuOpenButtonClick(): void {
|
|
78
|
+
this.menuOpen.update((v) => !v);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface SdSidebarUserMenu {
|
|
83
|
+
title: string;
|
|
84
|
+
menus: {
|
|
85
|
+
title: string;
|
|
86
|
+
onClick: () => Promise<void> | void;
|
|
87
|
+
}[];
|
|
88
|
+
}
|