@simplysm/angular 14.0.4 → 14.0.6

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.
@@ -0,0 +1,140 @@
1
+ # Layout Components
2
+
3
+ ## `SdDockContainerControl`
4
+
5
+ Container for docked panels. Calculates padding based on child dock sizes and positions.
6
+
7
+ Selector: `sd-dock-container`
8
+
9
+ | Input | Type | Description |
10
+ |-------|------|-------------|
11
+ | `contentClass` | `string` | CSS class for the content wrapper |
12
+
13
+ ## `SdDockControl`
14
+
15
+ Dockable panel that attaches to a side of `SdDockContainerControl`. Supports optional user-resizing with config persistence.
16
+
17
+ Selector: `sd-dock`
18
+
19
+ | Input | Type | Description |
20
+ |-------|------|-------------|
21
+ | `key` | `string` | Config key for size persistence |
22
+ | `position` | `"top" \| "bottom" \| "right" \| "left"` | Dock position (default: `"top"`) |
23
+ | `resizable` | `boolean` (booleanAttribute) | Enable drag-to-resize (default: `false`) |
24
+
25
+ ## `SdPaneDirective`
26
+
27
+ Applies fill-area pane styling to the host element. Sets CSS class `fill` and `display: block`.
28
+
29
+ Selector: `sd-pane`, `[sd-pane]`
30
+
31
+ No inputs.
32
+
33
+ ## `SdGapControl`
34
+
35
+ Spacing element that renders as a gap with preset or pixel-based dimensions.
36
+
37
+ Selector: `sd-gap`
38
+
39
+ | Input | Type | Description |
40
+ |-------|------|-------------|
41
+ | `height` | `"xxs" \| "xs" \| "sm" \| "default" \| "lg" \| "xl" \| "xxl"` | Preset height |
42
+ | `heightPx` | `number` | Height in pixels |
43
+ | `width` | `"xxs" \| "xs" \| "sm" \| "default" \| "lg" \| "xl" \| "xxl"` | Preset width |
44
+ | `widthPx` | `number` | Width in pixels |
45
+ | `widthEm` | `number` | Width in em units |
46
+
47
+ ## `SdViewControl`
48
+
49
+ View container for tab-like content switching. Shows the child `SdViewItemControl` whose value matches.
50
+
51
+ Selector: `sd-view`
52
+
53
+ | Input | Type | Description |
54
+ |-------|------|-------------|
55
+ | `value` | `any` | Currently active view value |
56
+ | `fill` | `boolean` (booleanAttribute) | Whether to fill parent height (default: `false`) |
57
+
58
+ ## `SdViewItemControl`
59
+
60
+ Individual view item, shown when its value matches the parent `SdViewControl` value.
61
+
62
+ Selector: `sd-view-item`
63
+
64
+ | Input | Type | Description |
65
+ |-------|------|-------------|
66
+ | `value` | `any` | Value to match against parent |
67
+
68
+ ## `SdCardDirective`
69
+
70
+ Applies card styling (CSS class `card`).
71
+
72
+ Selector: `sd-card`, `[sd-card]`
73
+
74
+ No inputs.
75
+
76
+ ## `SdKanbanBoardControl`
77
+
78
+ Kanban board container with drag-and-drop support. Manages drag state and emits drop events.
79
+
80
+ Selector: `sd-kanban-board`
81
+
82
+ | Input/Model | Type | Description |
83
+ |-------------|------|-------------|
84
+ | `selectedValues` (model) | `T[]` | Currently selected kanban values (default: `[]`) |
85
+
86
+ | Output | Type | Description |
87
+ |--------|------|-------------|
88
+ | `drop` | `ISdKanbanBoardDropInfo<L, T>` | Emitted when a kanban card is dropped |
89
+
90
+ ### `ISdKanbanBoardDropInfo`
91
+
92
+ | Field | Type | Description |
93
+ |-------|------|-------------|
94
+ | `sourceKanbanValue` | `T` | Value of the dragged card |
95
+ | `targetLaneValue` | `L` | Value of the target lane |
96
+ | `targetKanbanValue` | `T` | Value of the target card (drop position) |
97
+
98
+ ### `ISdKanbanDragRef`
99
+
100
+ | Field | Type | Description |
101
+ |-------|------|-------------|
102
+ | `value()` | `T \| undefined` | Value of the dragged card |
103
+ | `heightOnDrag()` | `number` | Height of the card being dragged |
104
+
105
+ ### `ISdKanbanDropTarget`
106
+
107
+ | Field | Type | Description |
108
+ |-------|------|-------------|
109
+ | `targetLaneValue()` | `L \| undefined` | Value of the target lane |
110
+ | `targetKanbanValue?()` | `T \| undefined` | Value of the target card position |
111
+
112
+ ## `SdKanbanLaneControl`
113
+
114
+ Kanban lane (column). Contains kanban cards and supports drag-drop targeting, collapse, and select-all.
115
+
116
+ Selector: `sd-kanban-lane`
117
+
118
+ | Input/Model | Type | Description |
119
+ |-------------|------|-------------|
120
+ | `busy` | `boolean` (booleanAttribute) | Show busy indicator (default: `false`) |
121
+ | `useCollapse` | `boolean` (booleanAttribute) | Enable collapse toggle (default: `false`) |
122
+ | `collapse` (model) | `boolean` | Collapse state (default: `false`) |
123
+ | `value` | `L` | Lane value identifier |
124
+
125
+ Content children:
126
+ - `#toolTpl` template: Tool bar content
127
+ - `#titleTpl` template: Title content
128
+
129
+ ## `SdKanbanControl`
130
+
131
+ Kanban card item within a lane. Supports dragging and selection.
132
+
133
+ Selector: `sd-kanban`
134
+
135
+ | Input | Type | Description |
136
+ |-------|------|-------------|
137
+ | `value` | `T` | Card value identifier |
138
+ | `selectable` | `boolean` (booleanAttribute) | Enable shift-click selection (default: `false`) |
139
+ | `draggable` | `boolean` (booleanAttribute) | Enable drag-and-drop (default: `false`) |
140
+ | `contentClass` | `string` | CSS class for the card content |
@@ -0,0 +1,200 @@
1
+ # Navigation Components
2
+
3
+ ## `SdCollapseControl`
4
+
5
+ Animated collapsible content using negative margin-top transition.
6
+
7
+ Selector: `sd-collapse`
8
+
9
+ | Input | Type | Description |
10
+ |-------|------|-------------|
11
+ | `open` | `boolean` (booleanAttribute) | Whether content is visible (default: `false`) |
12
+
13
+ ## `SdCollapseIconControl`
14
+
15
+ Rotating chevron icon that indicates collapse/expand state.
16
+
17
+ Selector: `sd-collapse-icon`
18
+
19
+ | Input | Type | Description |
20
+ |-------|------|-------------|
21
+ | `open` | `boolean` (booleanAttribute) | Whether in open state (default: `false`) |
22
+ | `openRotate` | `number` (numberAttribute) | Rotation angle in degrees when open (default: `90`) |
23
+
24
+ ## `SdTabControl`
25
+
26
+ Tab header container. Manages the active tab value.
27
+
28
+ Selector: `sd-tab`
29
+
30
+ | Input/Model | Type | Description |
31
+ |-------------|------|-------------|
32
+ | `value` (model) | `any` | Currently active tab value |
33
+
34
+ ## `SdTabItemControl`
35
+
36
+ Individual tab header item inside `SdTabControl`.
37
+
38
+ Selector: `sd-tab-item`
39
+
40
+ | Input | Type | Description |
41
+ |-------|------|-------------|
42
+ | `value` | `any` | Tab value (matched against parent's value) |
43
+
44
+ ## `SdTabviewControl`
45
+
46
+ Combined tab header and content view. Automatically renders tab headers from `SdTabviewItemControl` children.
47
+
48
+ Selector: `sd-tabview`
49
+
50
+ | Input/Model | Type | Description |
51
+ |-------------|------|-------------|
52
+ | `value` (model) | `T` | Currently active tabview value |
53
+
54
+ ## `SdTabviewItemControl`
55
+
56
+ Tab content panel inside `SdTabviewControl`. Shown when its value matches the parent's value.
57
+
58
+ Selector: `sd-tabview-item`
59
+
60
+ | Input | Type | Description |
61
+ |-------|------|-------------|
62
+ | `value` | `T` (required) | Panel value |
63
+ | `header` | `string` | Tab header text (falls back to value if not set) |
64
+
65
+ ## `SdPaginationControl`
66
+
67
+ Page navigation with first/prev-group/next-group/last buttons.
68
+
69
+ Selector: `sd-pagination`
70
+
71
+ | Input/Model | Type | Description |
72
+ |-------------|------|-------------|
73
+ | `currentPage` (model) | `number` | Current page index, 0-based (default: `0`) |
74
+ | `totalPageCount` | `number` (numberAttribute) | Total number of pages (default: `0`) |
75
+ | `visiblePageCount` | `number` (numberAttribute) | Pages shown per group (default: `10`) |
76
+
77
+ Public methods:
78
+
79
+ ```typescript
80
+ goToPage(page: number): void;
81
+ goToNextGroup(): void;
82
+ goToPrevGroup(): void;
83
+ goToFirst(): void;
84
+ goToLast(): void;
85
+ ```
86
+
87
+ ## `SdSidebarContainerControl`
88
+
89
+ Layout container with sidebar toggle support. Handles backdrop click and auto-close on navigation.
90
+
91
+ Selector: `sd-sidebar-container`
92
+
93
+ Public properties:
94
+
95
+ | Property | Type | Description |
96
+ |----------|------|-------------|
97
+ | `toggle` | `WritableSignal<boolean>` | Sidebar toggle state |
98
+
99
+ ## `SdSidebarControl`
100
+
101
+ Sidebar panel that slides in/out. Positioned absolutely on the left side. Responsive: slides from left on mobile.
102
+
103
+ Selector: `sd-sidebar`
104
+
105
+ No inputs. Toggle state is derived from parent `SdSidebarContainerControl`.
106
+
107
+ ## `SdSidebarMenuControl`
108
+
109
+ Menu renderer for sidebar. Displays hierarchical menus with router links. Supports accordion and flat layouts.
110
+
111
+ Selector: `sd-sidebar-menu`
112
+
113
+ | Input | Type | Description |
114
+ |-------|------|-------------|
115
+ | `menus` | `ISdSidebarMenu[]` | Menu items (default: `[]`) |
116
+ | `layout` | `"accordion" \| "flat"` | Root layout mode (auto-selected based on menu count) |
117
+ | `getMenuIsSelectedFn` | `(menu: ISdSidebarMenu) => boolean` | Custom selection check function |
118
+
119
+ ### `ISdSidebarMenu`
120
+
121
+ | Field | Type | Description |
122
+ |-------|------|-------------|
123
+ | `title` | `string` | Display title |
124
+ | `codeChain` | `string[]` | Code path chain for route generation |
125
+ | `url` | `string` | Optional external URL (opens in new tab) |
126
+ | `icon` | `string` | Optional icon SVG |
127
+ | `children` | `ISdSidebarMenu[]` | Optional child menus |
128
+
129
+ ## `SdSidebarUserControl`
130
+
131
+ User info section in the sidebar with expandable user menu.
132
+
133
+ Selector: `sd-sidebar-user`
134
+
135
+ | Input | Type | Description |
136
+ |-------|------|-------------|
137
+ | `userMenu` | `ISidebarUserMenu` | User menu configuration |
138
+
139
+ ### `ISidebarUserMenu`
140
+
141
+ | Field | Type | Description |
142
+ |-------|------|-------------|
143
+ | `title` | `string` | Menu header title |
144
+ | `menus` | `{ title: string; onClick: () => void }[]` | Menu items |
145
+
146
+ ## `SdTopbarContainerControl`
147
+
148
+ Layout container for the top navigation bar. Renders as a flex column filling height.
149
+
150
+ Selector: `sd-topbar-container`
151
+
152
+ No inputs.
153
+
154
+ ## `SdTopbarControl`
155
+
156
+ Top navigation bar. Includes optional sidebar toggle button.
157
+
158
+ Selector: `sd-topbar`
159
+
160
+ | Input | Type | Description |
161
+ |-------|------|-------------|
162
+ | `sidebarContainer` | `SdSidebarContainerControl` | Optional explicit sidebar container reference |
163
+
164
+ ## `SdTopbarMenuControl`
165
+
166
+ Menu renderer for topbar using dropdown menus. Displays hierarchical menus with router links.
167
+
168
+ Selector: `sd-topbar-menu`
169
+
170
+ | Input | Type | Description |
171
+ |-------|------|-------------|
172
+ | `menus` | `ISdTopbarMenu[]` | Menu items (default: `[]`) |
173
+ | `getMenuIsSelectedFn` | `(menu: ISdTopbarMenu) => boolean` | Custom selection check function |
174
+
175
+ ### `ISdTopbarMenu`
176
+
177
+ | Field | Type | Description |
178
+ |-------|------|-------------|
179
+ | `title` | `string` | Display title |
180
+ | `codeChain` | `string[]` | Code path chain for route generation |
181
+ | `url` | `string` | Optional external URL (opens in new tab) |
182
+ | `icon` | `string` | Optional icon SVG |
183
+ | `children` | `ISdTopbarMenu[]` | Optional child menus |
184
+
185
+ ## `SdTopbarUserControl`
186
+
187
+ User dropdown in topbar. Displays user content as trigger and menu items in dropdown.
188
+
189
+ Selector: `sd-topbar-user`
190
+
191
+ | Input | Type | Description |
192
+ |-------|------|-------------|
193
+ | `menus` | `ISdTopbarUserMenu[]` (required) | User menu items |
194
+
195
+ ### `ISdTopbarUserMenu`
196
+
197
+ | Field | Type | Description |
198
+ |-------|------|-------------|
199
+ | `title` | `string` | Menu item title |
200
+ | `onClick` | `() => void` | Click handler |
@@ -0,0 +1,193 @@
1
+ # Overlay Components
2
+
3
+ ## `SdDropdownControl`
4
+
5
+ Dropdown trigger container. Opens a popup on click/Enter. Handles positioning and backdrop on mobile.
6
+
7
+ Selector: `sd-dropdown`
8
+
9
+ | Input/Model | Type | Description |
10
+ |-------------|------|-------------|
11
+ | `open` (model) | `boolean` | Dropdown open state (default: `false`) |
12
+ | `disabled` | `boolean` (booleanAttribute) | Disabled state (default: `false`) |
13
+
14
+ ## `SdDropdownPopupControl`
15
+
16
+ Dropdown popup content panel. Positioned fixed relative to the trigger. Handles resize and keyboard navigation.
17
+
18
+ Selector: `sd-dropdown-popup`
19
+
20
+ No public inputs. Used as a content child of `SdDropdownControl`.
21
+
22
+ ## `SdModalControl`
23
+
24
+ Modal dialog component with header, close button, backdrop, resize handles, and drag-to-move support. Created programmatically by `SdModalProvider`.
25
+
26
+ Selector: `sd-modal`
27
+
28
+ | Input/Model | Type | Description |
29
+ |-------------|------|-------------|
30
+ | `open` (model) | `boolean` | Open state (default: `false`) |
31
+ | `key` | `string` | Config key for position/size persistence |
32
+ | `title` | `string` | Modal title (default: `""`) |
33
+ | `hideHeader` | `boolean` | Hide header bar (default: `false`) |
34
+ | `hideCloseButton` | `boolean` | Hide close button (default: `false`) |
35
+ | `useCloseByBackdrop` | `boolean` | Close on backdrop click (default: `true`) |
36
+ | `useCloseByEscapeKey` | `boolean` | Close on Escape key (default: `true`) |
37
+ | `float` | `boolean` | Float mode (default: `false`) |
38
+ | `fill` | `boolean` | Fill mode (default: `false`) |
39
+ | `resizable` | `boolean` | Enable resize handles (default: `false`) |
40
+ | `movable` | `boolean` | Enable header drag-to-move (default: `false`) |
41
+ | `position` | `"bottom-right" \| "top-right"` | Position preset |
42
+ | `minHeightPx` | `number` | Minimum height in pixels |
43
+ | `minWidthPx` | `number` | Minimum width in pixels |
44
+ | `heightPx` | `number` | Initial height in pixels |
45
+ | `widthPx` | `number` | Initial width in pixels |
46
+ | `headerStyle` | `string` | Custom header inline style |
47
+ | `noFirstControlFocusing` | `boolean` | Skip auto-focusing first control (default: `false`) |
48
+ | `actionTplRef` | `TemplateRef<any>` | Optional action template for header |
49
+
50
+ | Output | Type | Description |
51
+ |--------|------|-------------|
52
+ | `closeRequest` | `void` | Emitted when backdrop click, Escape, or close button triggers close |
53
+
54
+ ## `SdPromptModalControl`
55
+
56
+ Built-in prompt modal. Displays a message and text input. Implements `ISdModal<string>`.
57
+
58
+ Selector: `sd-prompt-modal`
59
+
60
+ | Input | Type | Description |
61
+ |-------|------|-------------|
62
+ | `message` | `string` (required) | Prompt message text |
63
+
64
+ | Output | Type | Description |
65
+ |--------|------|-------------|
66
+ | `close` | `string \| undefined` | Emits input value on confirm, undefined on cancel |
67
+
68
+ ## `SdConfirmModalControl`
69
+
70
+ Built-in confirm modal. Displays a message with confirm/cancel buttons. Implements `ISdModal<boolean>`.
71
+
72
+ Selector: `sd-confirm-modal`
73
+
74
+ | Input | Type | Description |
75
+ |-------|------|-------------|
76
+ | `message` | `string` (required) | Confirmation message text |
77
+
78
+ | Output | Type | Description |
79
+ |--------|------|-------------|
80
+ | `close` | `boolean \| undefined` | Emits `true` on confirm, `undefined` on cancel |
81
+
82
+ ## `SdToastControl`
83
+
84
+ Individual toast notification component. Supports themes, progress bar, and ARIA roles.
85
+
86
+ Selector: `sd-toast`
87
+
88
+ | Input/Model | Type | Description |
89
+ |-------------|------|-------------|
90
+ | `open` (model) | `boolean` | Open state with transition (default: `false`) |
91
+ | `useProgress` | `boolean` (booleanAttribute) | Show progress bar (default: `false`) |
92
+ | `theme` | `TSdToastTheme` | Toast theme (default: `"info"`) |
93
+ | `progress` (model) | `number` | Progress percentage 0-100 (default: `0`) |
94
+ | `message` (model) | `string \| undefined` | Toast message text |
95
+
96
+ ## `SdToastContainerControl`
97
+
98
+ Fixed-position container for toast notifications.
99
+
100
+ Selector: `sd-toast-container`
101
+
102
+ | Input | Type | Description |
103
+ |-------|------|-------------|
104
+ | `overlap` | `boolean` (booleanAttribute) | Overlap mode (single toast, bottom-left positioned, default: `false`) |
105
+
106
+ ## `SdBusyContainerControl`
107
+
108
+ Busy/loading overlay container. Shows a loading indicator over its content.
109
+
110
+ Selector: `sd-busy-container`
111
+
112
+ | Input | Type | Description |
113
+ |-------|------|-------------|
114
+ | `busy` | `boolean` (booleanAttribute) | Whether to show busy overlay (default: `false`) |
115
+ | `message` | `string \| undefined` | Loading message text |
116
+ | `type` | `TSdBusyType \| undefined` | Indicator type (falls back to `SdBusyProvider.type()`) |
117
+ | `progressPercent` | `number \| undefined` | Optional progress percentage |
118
+
119
+ ### `TSdBusyType`
120
+
121
+ ```typescript
122
+ type TSdBusyType = "spinner" | "bar" | "cube";
123
+ ```
124
+
125
+ ## Toast Types
126
+
127
+ ### `TSdToastSeverity`
128
+
129
+ ```typescript
130
+ type TSdToastSeverity = "info" | "success" | "warning" | "danger";
131
+ ```
132
+
133
+ ### `TSdToastTheme`
134
+
135
+ ```typescript
136
+ type TSdToastTheme = "primary" | "secondary" | TSdToastSeverity | "gray" | "blue-gray";
137
+ ```
138
+
139
+ ### `ISdToast`
140
+
141
+ Interface for custom toast content components.
142
+
143
+ | Field | Type | Description |
144
+ |-------|------|-------------|
145
+ | `close` | `OutputEmitterRef<O \| undefined>` | Output to emit close result |
146
+
147
+ ### `ISdToastInput`
148
+
149
+ | Field | Type | Description |
150
+ |-------|------|-------------|
151
+ | `type` | `Type<T>` | Component type |
152
+ | `inputs` | `Omit<TDirectiveInputSignals<T>, "close">` | Component inputs |
153
+
154
+ ## Modal Types
155
+
156
+ ### `ISdModal`
157
+
158
+ Interface for modal content components.
159
+
160
+ | Field | Type | Description |
161
+ |-------|------|-------------|
162
+ | `initialized` | `Signal<boolean>` | Whether content is initialized |
163
+ | `close` | `OutputEmitterRef<O \| undefined>` | Output to emit close result |
164
+ | `actionTplRef` | `TemplateRef<any>` | Optional action template for modal header |
165
+
166
+ ### `ISdModalInfo`
167
+
168
+ | Field | Type | Description |
169
+ |-------|------|-------------|
170
+ | `title` | `string` | Modal title |
171
+ | `type` | `Type<T>` | Component type |
172
+ | `inputs` | `Omit<TDirectiveInputSignals<T>, "initialized" \| "close" \| "actionTplRef">` | Component inputs |
173
+
174
+ ### `ISdModalOptions`
175
+
176
+ | Field | Type | Description |
177
+ |-------|------|-------------|
178
+ | `key` | `string` | Config persistence key |
179
+ | `hideHeader` | `boolean` | Hide header |
180
+ | `hideCloseButton` | `boolean` | Hide close button |
181
+ | `useCloseByBackdrop` | `boolean` | Close on backdrop click |
182
+ | `useCloseByEscapeKey` | `boolean` | Close on Escape |
183
+ | `float` | `boolean` | Float mode |
184
+ | `fill` | `boolean` | Fill mode |
185
+ | `resizable` | `boolean` | Enable resizing |
186
+ | `movable` | `boolean` | Enable moving |
187
+ | `position` | `"bottom-right" \| "top-right"` | Position preset |
188
+ | `minHeightPx` | `number` | Minimum height |
189
+ | `minWidthPx` | `number` | Minimum width |
190
+ | `heightPx` | `number` | Initial height |
191
+ | `widthPx` | `number` | Initial width |
192
+ | `headerStyle` | `string` | Header inline style |
193
+ | `noFirstControlFocusing` | `boolean` | Skip auto-focus |
package/docs/pipes.md ADDED
@@ -0,0 +1,25 @@
1
+ # Pipes
2
+
3
+ ## `FormatPipe`
4
+
5
+ Formats `DateTime`, `DateOnly`, or string values using a format pattern.
6
+
7
+ Pipe name: `format`
8
+
9
+ ```typescript
10
+ @Pipe({ standalone: true, name: "format" })
11
+ class FormatPipe implements PipeTransform {
12
+ transform(value: string | DateTime | DateOnly | undefined, format: string): string;
13
+ }
14
+ ```
15
+
16
+ Behavior:
17
+ - `null`/`undefined` returns `""`
18
+ - `DateTime`/`DateOnly` instances call `value.toFormatString(format)`
19
+ - Strings: the format pattern uses `X` as placeholders for characters. Multiple patterns can be separated by `|` and the one matching the value's length is used.
20
+
21
+ Usage:
22
+ ```html
23
+ {{ dateValue | format: "yyyy-MM-dd" }}
24
+ {{ phoneNumber | format: "XXX-XXXX-XXXX|XX-XXX-XXXX" }}
25
+ ```