@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.
package/README.md ADDED
@@ -0,0 +1,318 @@
1
+ # @simplysm/angular
2
+
3
+ Simplysm Angular 21 UI component library. Provides configuration, providers, directives, pipes, setup functions, hooks, layout components, form controls, navigation, data display, overlays, and visual components -- all designed for zoneless Angular with signal-based APIs.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @simplysm/angular
9
+ ```
10
+
11
+ ## API Overview
12
+
13
+ ### Commons & Configuration
14
+
15
+ | API | Type | Description |
16
+ |-----|------|-------------|
17
+ | `provideSdAngular` | function | Bootstrap function that registers all core providers, event plugins, error handler, and zoneless change detection |
18
+ | `TXT_CHANGE_IGNORE_CONFIRM` | const string | Confirmation message text for discarding unsaved changes |
19
+
20
+ -> See [docs/commons-and-configuration.md](./docs/commons-and-configuration.md) for details.
21
+
22
+ ### Providers / Services
23
+
24
+ | API | Type | Description |
25
+ |-----|------|-------------|
26
+ | `SdThemeProvider` | Injectable | Manages dark/light theme toggle via signal |
27
+ | `SdAngularConfigProvider` | Injectable | Holds client application name |
28
+ | `SdSystemLogProvider` | Injectable | Writes log messages to console and optional custom handler |
29
+ | `SdNavigateWindowProvider` | Injectable | Opens navigation links in new windows/tabs |
30
+ | `SdLocalStorageProvider` | Injectable | Typed localStorage wrapper scoped by client name |
31
+ | `SdSystemConfigProvider` | Injectable | Persists/retrieves system configuration (localStorage or custom backend) |
32
+ | `SdFileDialogProvider` | Injectable | Opens native file picker dialogs |
33
+ | `SdServiceClientFactoryProvider` | Injectable | Manages WebSocket service client connections |
34
+ | `SdAppStructureProvider` | Injectable (abstract) | Provides app menu/permission structure |
35
+ | `SdAppStructureUtils` | abstract class | Static utilities for menu/permission computation |
36
+ | `SdSharedDataProvider` | Injectable (abstract) | Real-time shared data with event-driven partial updates |
37
+ | `SdModalProvider` | Injectable | Programmatically creates and shows modal dialogs |
38
+ | `SdActivatedModalProvider` | Injectable | Injected inside a modal to access modal context |
39
+ | `SdToastProvider` | Injectable | Shows toast notifications with severity levels |
40
+ | `SdBusyProvider` | Injectable | Manages global busy/loading overlay |
41
+ | `SdPrintProvider` | Injectable | Prints components or generates PDF buffers |
42
+
43
+ -> See [docs/providers.md](./docs/providers.md) for details.
44
+
45
+ ### Event Plugins
46
+
47
+ | API | Type | Description |
48
+ |-----|------|-------------|
49
+ | `SdOptionEventPlugin` | EventManagerPlugin | Adds `.capture`, `.passive`, `.once` modifiers to native events |
50
+ | `SdResizeEventPlugin` | EventManagerPlugin | Provides `(sdResize)` event via ResizeObserver |
51
+ | `ISdResizeEvent` | interface | Payload for sdResize event |
52
+ | `SdIntersectionEventPlugin` | EventManagerPlugin | Provides `(sdIntersection)` event via IntersectionObserver |
53
+ | `ISdIntersectionEvent` | interface | Payload for sdIntersection event |
54
+ | `SdSaveCommandEventPlugin` | EventManagerPlugin | Provides `(sdSaveCommand)` event (Ctrl+S) |
55
+ | `SdRefreshCommandEventPlugin` | EventManagerPlugin | Provides `(sdRefreshCommand)` event (Ctrl+Alt+L) |
56
+ | `SdInsertCommandEventPlugin` | EventManagerPlugin | Provides `(sdInsertCommand)` event (Ctrl+Insert) |
57
+ | `SdGlobalErrorHandlerPlugin` | ErrorHandler | Global error handler that displays errors and logs them |
58
+
59
+ -> See [docs/event-plugins.md](./docs/event-plugins.md) for details.
60
+
61
+ ### Directives
62
+
63
+ | API | Type | Description |
64
+ |-----|------|-------------|
65
+ | `SdEventsDirective` | Directive | Exposes capture/passive/once event outputs for template binding |
66
+ | `SdRippleDirective` | Directive | Adds material-style ripple effect on pointer interaction |
67
+ | `SdShowEffectDirective` | Directive | Animates element reveal on intersection |
68
+ | `SdInvalidDirective` | Directive | Shows validation indicator with custom message |
69
+ | `SdTypedTemplateDirective` | Directive | Provides type-safe ng-template context guard |
70
+ | `SdItemOfTemplateDirective` | Directive | Provides typed iteration context for ng-template |
71
+ | `SdItemOfTemplateContext` | interface | Context type for SdItemOfTemplateDirective |
72
+ | `SdRouterLinkDirective` | Directive | Navigation directive with window/tab/outlet support |
73
+ | `SdCardDirective` | Directive | Applies card styling class |
74
+ | `SdPaneDirective` | Directive | Applies fill pane styling |
75
+
76
+ -> See [docs/directives.md](./docs/directives.md) for details.
77
+
78
+ ### Pipes
79
+
80
+ | API | Type | Description |
81
+ |-----|------|-------------|
82
+ | `FormatPipe` | Pipe | Formats DateTime, DateOnly, or string values using pattern |
83
+
84
+ -> See [docs/pipes.md](./docs/pipes.md) for details.
85
+
86
+ ### Setup Functions
87
+
88
+ | API | Type | Description |
89
+ |-----|------|-------------|
90
+ | `setupBgTheme` | function | Sets body background CSS variable based on theme |
91
+ | `setupRipple` | function | Adds ripple effect to host element |
92
+ | `setupRevealOnShow` | function | Animates element visibility on intersection |
93
+ | `setupInvalid` | function | Adds form validation indicator to host element |
94
+ | `setupModelHook` | function | Intercepts model signal set with async guard |
95
+ | `setupCanDeactivate` | function | Registers route/modal can-deactivate guard |
96
+
97
+ -> See [docs/setup-functions.md](./docs/setup-functions.md) for details.
98
+
99
+ ### Hooks & Utilities
100
+
101
+ | API | Type | Description |
102
+ |-----|------|-------------|
103
+ | `usePermsSignal` | function | Returns signal of permitted keys for given view codes |
104
+ | `useSdSystemConfigResource` | function | Creates a resource for reading/writing system config |
105
+ | `useCurrentPageCodeSignal` | function | Returns signal of current page code from activated route |
106
+ | `useFullPageCodeSignal` | function | Returns signal of full page code from router URL |
107
+ | `useViewTitleSignal` | function | Returns signal of current view title |
108
+ | `useViewTypeSignal` | function | Returns signal of view type (page/modal/control) |
109
+ | `TSdViewType` | type | `"page" \| "modal" \| "control"` |
110
+ | `useExpandingManager` | function | Manages tree expand/collapse state |
111
+ | `IExpandItemDef` | interface | Tree item definition with depth and parent |
112
+ | `useSelectionManager` | function | Manages item selection state (single/multi) |
113
+ | `useSortingManager` | function | Manages column sorting state |
114
+ | `ISortingDef` | interface | Sort definition with key and direction |
115
+ | `setSafeStyle` | function | Safely sets multiple CSS styles via Renderer2 |
116
+ | `TDirectiveInputSignals` | type | Extracts InputSignal value types from component |
117
+ | `TUndefToOptional` | type | Converts undefined-containing properties to optional |
118
+
119
+ -> See [docs/hooks-and-utilities.md](./docs/hooks-and-utilities.md) for details.
120
+
121
+ ### App Structure Types
122
+
123
+ | API | Type | Description |
124
+ |-----|------|-------------|
125
+ | `TSdAppStructureItem` | type | Union of group and leaf structure items |
126
+ | `ISdMenu` | interface | Menu tree node |
127
+ | `ISdFlatMenu` | interface | Flattened menu entry |
128
+ | `ISdPermission` | interface | Permission tree node |
129
+ | `ISdFlatPermission` | interface | Flattened permission entry |
130
+
131
+ -> See [docs/providers.md](./docs/providers.md) for details (under SdAppStructureProvider).
132
+
133
+ ### Layout Components
134
+
135
+ | API | Type | Description |
136
+ |-----|------|-------------|
137
+ | `SdDockContainerControl` | Component | Container for docked panels |
138
+ | `SdDockControl` | Component | Dockable panel (top/bottom/left/right) with optional resize |
139
+ | `SdPaneDirective` | Directive | Fill-area pane |
140
+ | `SdGapControl` | Component | Spacing element with preset or pixel sizes |
141
+ | `SdViewControl` | Component | View container for tab-like content switching |
142
+ | `SdViewItemControl` | Component | Individual view item, shown when value matches parent |
143
+ | `SdCardDirective` | Directive | Card styling |
144
+ | `SdKanbanBoardControl` | Component | Kanban board with drag-and-drop support |
145
+ | `SdKanbanLaneControl` | Component | Kanban lane (column) |
146
+ | `SdKanbanControl` | Component | Kanban card item |
147
+
148
+ -> See [docs/layout-components.md](./docs/layout-components.md) for details.
149
+
150
+ ### Form Components
151
+
152
+ | API | Type | Description |
153
+ |-----|------|-------------|
154
+ | `SdButtonControl` | Component | Themed button with ripple effect |
155
+ | `SdAnchorControl` | Component | Inline clickable anchor element |
156
+ | `SdAdditionalButtonControl` | Component | Content with adjacent action buttons |
157
+ | `SdModalSelectButtonControl` | Component | Button that opens a modal for selection |
158
+ | `SdTextfieldControl` | Component | Text/number/date/time input field |
159
+ | `SdTextareaControl` | Component | Multi-line text input |
160
+ | `SdNumpadControl` | Component | On-screen numeric keypad |
161
+ | `SdRangeControl` | Component | From-to range input pair |
162
+ | `SdDateRangePicker` | Component | Date range picker with period type selector |
163
+ | `SdCheckboxControl` | Component | Checkbox with optional radio mode |
164
+ | `SdSwitchControl` | Component | Toggle switch |
165
+ | `SdCheckboxGroupControl` | Component | Group container for checkbox items |
166
+ | `SdCheckboxGroupItemControl` | Component | Individual item in checkbox group |
167
+ | `SdSelectControl` | Component | Dropdown select (single/multi) |
168
+ | `SdSelectItemControl` | Component | Item inside SdSelectControl |
169
+ | `SdSelectButtonControl` | Component | Additional button slot inside SdSelectControl |
170
+ | `SdTiptapEditorControl` | Component | Rich text editor powered by Tiptap |
171
+ | `SdStatePresetControl` | Component | Save/load named state presets |
172
+ | `SdFormControl` | Component | Form wrapper with submit/validation |
173
+
174
+ -> See [docs/form-components.md](./docs/form-components.md) for details.
175
+
176
+ ### Navigation Components
177
+
178
+ | API | Type | Description |
179
+ |-----|------|-------------|
180
+ | `SdCollapseControl` | Component | Animated collapsible content |
181
+ | `SdCollapseIconControl` | Component | Rotating chevron icon for collapse state |
182
+ | `SdTabControl` | Component | Tab header container |
183
+ | `SdTabItemControl` | Component | Individual tab header item |
184
+ | `SdTabviewControl` | Component | Combined tab header + content view |
185
+ | `SdTabviewItemControl` | Component | Tab content panel |
186
+ | `SdPaginationControl` | Component | Page navigation with group support |
187
+ | `SdSidebarContainerControl` | Component | Layout container with sidebar toggle |
188
+ | `SdSidebarControl` | Component | Sidebar panel |
189
+ | `SdSidebarMenuControl` | Component | Menu renderer for sidebar |
190
+ | `ISdSidebarMenu` | interface | Sidebar menu item definition |
191
+ | `SdSidebarUserControl` | Component | User info section in sidebar |
192
+ | `ISidebarUserMenu` | interface | User menu definition |
193
+ | `SdTopbarContainerControl` | Component | Layout container for topbar |
194
+ | `SdTopbarControl` | Component | Top navigation bar |
195
+ | `SdTopbarMenuControl` | Component | Menu renderer for topbar with dropdowns |
196
+ | `ISdTopbarMenu` | interface | Topbar menu item definition |
197
+ | `SdTopbarUserControl` | Component | User dropdown in topbar |
198
+ | `ISdTopbarUserMenu` | interface | Topbar user menu definition |
199
+
200
+ -> See [docs/navigation-components.md](./docs/navigation-components.md) for details.
201
+
202
+ ### Data Display Components
203
+
204
+ | API | Type | Description |
205
+ |-----|------|-------------|
206
+ | `SdListControl` | Component | List container |
207
+ | `SdListItemControl` | Component | List item with accordion/flat layout |
208
+ | `SdSheetControl` | Component | Data grid with sorting, selection, expanding, pagination |
209
+ | `SdSheetColumnDirective` | Directive | Column definition for SdSheetControl |
210
+ | `SdSheetConfigModal` | Component | Sheet column configuration modal |
211
+ | `ISdSheetColumnDef` | interface | Column definition fields |
212
+ | `ISdSheetConfig` | interface | Sheet configuration (column widths, ordering, visibility) |
213
+ | `ISdSheetHeaderDef` | interface | Header cell definition |
214
+ | `ISdSheetItemKeydownEventParam` | interface | Keydown event parameter for sheet items |
215
+
216
+ -> See [docs/data-display-components.md](./docs/data-display-components.md) for details.
217
+
218
+ ### Overlay Components
219
+
220
+ | API | Type | Description |
221
+ |-----|------|-------------|
222
+ | `SdDropdownControl` | Component | Dropdown trigger container |
223
+ | `SdDropdownPopupControl` | Component | Dropdown popup content |
224
+ | `SdModalControl` | Component | Modal dialog with header, close, resize, drag |
225
+ | `SdPromptModalControl` | Component | Built-in prompt modal (text input + confirm/cancel) |
226
+ | `SdConfirmModalControl` | Component | Built-in confirm modal (confirm/cancel) |
227
+ | `ISdModal` | interface | Interface for modal content components |
228
+ | `ISdModalInfo` | interface | Modal creation info (title, type, inputs) |
229
+ | `ISdModalOptions` | interface | Modal display options |
230
+ | `SdToastControl` | Component | Individual toast notification |
231
+ | `SdToastContainerControl` | Component | Toast container (fixed position) |
232
+ | `ISdToast` | interface | Interface for custom toast content components |
233
+ | `ISdToastInput` | interface | Toast creation info |
234
+ | `TSdToastSeverity` | type | `"info" \| "success" \| "warning" \| "danger"` |
235
+ | `TSdToastTheme` | type | Toast theme including severity and color themes |
236
+ | `SdBusyContainerControl` | Component | Busy/loading overlay container |
237
+ | `TSdBusyType` | type | `"spinner" \| "bar" \| "cube"` |
238
+
239
+ -> See [docs/overlay-components.md](./docs/overlay-components.md) for details.
240
+
241
+ ### Visual Components
242
+
243
+ | API | Type | Description |
244
+ |-----|------|-------------|
245
+ | `SdLabelControl` | Component | Colored label/badge |
246
+ | `SdNoteControl` | Component | Note/callout block |
247
+ | `SdProgressControl` | Component | Progress bar with percentage display |
248
+ | `SdCalendarControl` | Component | Monthly calendar grid with item slots |
249
+ | `SdBarcodeControl` | Component | Barcode/QR code renderer (bwip-js) |
250
+ | `TBarcodeType` | type | Barcode type identifier |
251
+ | `SdEchartsControl` | Component | ECharts wrapper component |
252
+
253
+ -> See [docs/visual-components.md](./docs/visual-components.md) for details.
254
+
255
+ ### Shared Data Types
256
+
257
+ | API | Type | Description |
258
+ |-----|------|-------------|
259
+ | `ISharedDataBase` | interface | Base interface for shared data items |
260
+ | `ISharedDataInfo` | interface | Registration info for shared data |
261
+ | `SharedDataHandle` | interface | Handle for accessing shared data items signal |
262
+ | `SdSharedDataChangeEvent` | const | Event definition for shared data change notifications |
263
+ | `ISdSelectModal` | interface | Interface for select modal components |
264
+ | `ISelectModalOutputResult` | interface | Result from modal select |
265
+ | `TSdSelectModalInfo` | type | Modal info type excluding select-specific inputs |
266
+ | `TSelectModeValue` | type | `T \| T[] \| undefined` |
267
+ | `TSdTextfieldTypes` | type | Map of textfield type names to value types |
268
+ | `sdTextfieldTypes` | const | Array of all textfield type names |
269
+ | `ISdStatePreset` | interface | Named state preset |
270
+
271
+ -> See [docs/form-components.md](./docs/form-components.md) for details.
272
+
273
+ ## Usage Examples
274
+
275
+ ### Bootstrap Application
276
+
277
+ ```typescript
278
+ import { provideSdAngular } from "@simplysm/angular";
279
+
280
+ bootstrapApplication(AppComponent, {
281
+ providers: [
282
+ provideSdAngular({ clientName: "my-app" }),
283
+ provideRouter(routes),
284
+ ],
285
+ });
286
+ ```
287
+
288
+ ### Modal Dialog
289
+
290
+ ```typescript
291
+ import { SdModalProvider, SdConfirmModalControl } from "@simplysm/angular";
292
+
293
+ const modal = inject(SdModalProvider);
294
+
295
+ const confirmed = await modal.showAsync(
296
+ {
297
+ title: "Confirm Action",
298
+ type: SdConfirmModalControl,
299
+ inputs: { message: "Are you sure?" },
300
+ },
301
+ { useCloseByBackdrop: false },
302
+ );
303
+ ```
304
+
305
+ ### Toast Notification
306
+
307
+ ```typescript
308
+ import { SdToastProvider } from "@simplysm/angular";
309
+
310
+ const toast = inject(SdToastProvider);
311
+ toast.success("Operation completed successfully");
312
+ toast.danger("An error occurred");
313
+
314
+ // With progress
315
+ const progress = toast.info("Uploading...", true);
316
+ progress.set(50); // 50%
317
+ progress.set(100); // auto-dismiss after 1s
318
+ ```
@@ -0,0 +1,34 @@
1
+ # Commons & Configuration
2
+
3
+ ## `provideSdAngular`
4
+
5
+ Bootstrap function that registers all core providers, event plugins, the global error handler, and zoneless change detection. Call in `bootstrapApplication`.
6
+
7
+ ```typescript
8
+ function provideSdAngular(opt: { clientName: string }): EnvironmentProviders
9
+ ```
10
+
11
+ Registers:
12
+ - `SdAngularConfigProvider` with the given `clientName`
13
+ - `SdThemeProvider` with dark mode persistence via `SdLocalStorageProvider`
14
+ - All event manager plugins (`SdSaveCommandEventPlugin`, `SdRefreshCommandEventPlugin`, `SdInsertCommandEventPlugin`, `SdResizeEventPlugin`, `SdIntersectionEventPlugin`, `SdOptionEventPlugin`)
15
+ - `SdGlobalErrorHandlerPlugin` as `ErrorHandler`
16
+ - `provideZonelessChangeDetection()`
17
+ - Global unhandled rejection/error listeners
18
+ - Service Worker update polling (5-minute interval)
19
+ - Router navigation busy indicator
20
+
21
+ ## `TXT_CHANGE_IGNORE_CONFIRM`
22
+
23
+ Confirmation message text displayed when the user attempts to navigate away with unsaved changes.
24
+
25
+ ```typescript
26
+ const TXT_CHANGE_IGNORE_CONFIRM: string
27
+ ```
28
+
29
+ Value (Korean):
30
+ ```
31
+ 변경사항이 있습니다. 모든 변경사항을 무시하시겠습니까?
32
+ - 확인: 변경사항을 무시하고, 현재 요청한 작업을 수행
33
+ - 취소: 현재 요청한 작업을 취소하고, 변경사항 재검토
34
+ ```
@@ -0,0 +1,146 @@
1
+ # Data Display Components
2
+
3
+ ## `SdListControl`
4
+
5
+ List container component.
6
+
7
+ Selector: `sd-list`
8
+
9
+ | Input | Type | Description |
10
+ |-------|------|-------------|
11
+ | `inset` | `boolean` (booleanAttribute) | Transparent background (default: `false`) |
12
+
13
+ ## `SdListItemControl`
14
+
15
+ List item with accordion or flat layout. Supports collapsible child lists, ripple effect, selected state, tool template, and selected icon.
16
+
17
+ Selector: `sd-list-item`
18
+
19
+ | Input/Model | Type | Description |
20
+ |-------------|------|-------------|
21
+ | `layout` | `"accordion" \| "flat"` | Layout mode (default: `"accordion"`) |
22
+ | `open` (model) | `boolean` | Collapse open state (default: `false`) |
23
+ | `selected` | `boolean` (booleanAttribute) | Selected state (default: `false`) |
24
+ | `selectedIcon` | `string` | Optional icon SVG for selection indicator |
25
+ | `readonly` | `boolean` (booleanAttribute) | Read-only mode (default: `false`) |
26
+
27
+ Content children:
28
+ - `#toolTpl` template: Additional tool area rendered on the right side
29
+ - `<sd-list>` child: Nested list shown in collapse
30
+
31
+ ## `SdSheetControl`
32
+
33
+ Full-featured data grid with sorting, selection, tree expanding, pagination, column resizing, and configuration persistence.
34
+
35
+ Selector: `sd-sheet`
36
+
37
+ ### Inputs
38
+
39
+ | Input | Type | Description |
40
+ |-------|------|-------------|
41
+ | `key` | `string` | Config key for column settings persistence |
42
+ | `items` | `T[]` | Data items (default: `[]`) |
43
+ | `trackByFn` | `(item: T, index: number) => unknown` | Track-by function for rows |
44
+ | `selectMode` | `"single" \| "multi"` | Selection mode |
45
+ | `autoSelect` | `"click" \| "focus"` | Auto-select trigger |
46
+ | `getItemSelectableFn` | `(item: T) => boolean \| string` | Item selectable check (string = disabled reason) |
47
+ | `getChildrenFn` | `(item: T, index: number) => T[] \| undefined` | Children accessor for tree mode |
48
+ | `useAutoSort` | `boolean` (booleanAttribute) | Enable client-side sorting (default: `false`) |
49
+ | `visiblePageCount` | `number` | Visible page buttons (default: `10`) |
50
+ | `totalPageCount` | `number` | Total pages (server-side pagination, default: `0`) |
51
+ | `itemsPerPage` | `number` | Items per page (client-side pagination, default: `0` = no pagination) |
52
+ | `focusMode` | `"row" \| "cell"` | Focus navigation mode (default: `"cell"`) |
53
+ | `inset` | `boolean` (booleanAttribute) | Borderless inset style (default: `false`) |
54
+ | `contentStyle` | `string` | Inline style for the scroll container |
55
+ | `getItemCellClassFn` | `(item: T, colKey: string) => string` | Cell CSS class function |
56
+ | `getItemCellStyleFn` | `(item: T, colKey: string) => string` | Cell inline style function |
57
+ | `hideConfigBar` | `boolean` (booleanAttribute) | Hide config/pagination bar (default: `false`) |
58
+
59
+ ### Models
60
+
61
+ | Model | Type | Description |
62
+ |-------|------|-------------|
63
+ | `selectedItems` | `T[]` | Selected items (default: `[]`) |
64
+ | `expandedItems` | `T[]` | Expanded tree items (default: `[]`) |
65
+ | `sorts` | `ISortingDef[]` | Sort definitions (default: `[]`) |
66
+ | `currentPage` | `number` | Current page index, 0-based (default: `0`) |
67
+
68
+ ### Outputs
69
+
70
+ | Output | Type | Description |
71
+ |--------|------|-------------|
72
+ | `itemKeydown` | `ISdSheetItemKeydownEventParam<T>` | Row-level keydown event |
73
+ | `cellKeydown` | `ISdSheetItemKeydownEventParam<T>` | Cell-level keydown event |
74
+
75
+ ## `SdSheetColumnDirective`
76
+
77
+ Column definition for `SdSheetControl`. Defines header, width, and cell/summary templates.
78
+
79
+ Selector: `sd-sheet-column`
80
+
81
+ | Input | Type | Description |
82
+ |-------|------|-------------|
83
+ | `key` | `string` (required) | Unique column key |
84
+ | `header` | `string \| string[]` | Header text (multi-level headers via array, default: `""`) |
85
+ | `width` | `string` | Column width (CSS value) |
86
+ | `fixed` | `boolean` (booleanAttribute) | Fixed column (default: `false`) |
87
+ | `hidden` | `boolean` (booleanAttribute) | Hidden column (default: `false`) |
88
+ | `collapse` | `boolean` (booleanAttribute) | Collapsed column (default: `false`) |
89
+ | `disableSorting` | `boolean` (booleanAttribute) | Disable sorting for this column (default: `false`) |
90
+ | `disableResizing` | `boolean` (booleanAttribute) | Disable resizing for this column (default: `false`) |
91
+ | `ordering` | `number` | Column display order (default: `0`) |
92
+
93
+ Content children:
94
+ - `#cellTpl` template: Cell content template. Context: `{ $implicit: T, item: T, index: number, depth: number, edit: boolean }`
95
+ - `#summaryTpl` template: Summary (footer) template
96
+
97
+ ## `SdSheetConfigModal`
98
+
99
+ Modal for configuring sheet columns (visibility, order, width, fixed state). Implements `ISdModal<ISdSheetConfig>`.
100
+
101
+ Selector: `sd-sheet-config-modal`
102
+
103
+ | Input | Type | Description |
104
+ |-------|------|-------------|
105
+ | `columns` | `SdSheetColumnDirective[]` (required) | Column directives |
106
+ | `config` | `ISdSheetConfig` (required) | Current configuration |
107
+
108
+ ## Types
109
+
110
+ ### `ISdSheetColumnDef`
111
+
112
+ | Field | Type | Description |
113
+ |-------|------|-------------|
114
+ | `key` | `string` | Unique column key |
115
+ | `header` | `string \| string[]` | Header text |
116
+ | `width` | `string \| undefined` | Column width |
117
+ | `fixed` | `boolean` | Whether column is fixed |
118
+ | `hidden` | `boolean` | Whether column is hidden |
119
+ | `collapse` | `boolean` | Whether column is collapsed |
120
+ | `disableSorting` | `boolean` | Whether sorting is disabled |
121
+ | `disableResizing` | `boolean` | Whether resizing is disabled |
122
+ | `ordering` | `number` | Display order |
123
+
124
+ ### `ISdSheetConfig`
125
+
126
+ | Field | Type | Description |
127
+ |-------|------|-------------|
128
+ | `columnRecord` | `Record<string, { width?: string; hidden?: boolean; fixed?: boolean; ordering?: number }>` | Per-column overrides |
129
+
130
+ ### `ISdSheetHeaderDef`
131
+
132
+ | Field | Type | Description |
133
+ |-------|------|-------------|
134
+ | `text` | `string` | Header cell text |
135
+ | `colspan` | `number` | Column span |
136
+ | `rowspan` | `number` | Row span |
137
+ | `isLastRow` | `boolean` | Whether this is the last header row |
138
+ | `colDef` | `ISdSheetColumnDef \| undefined` | Associated column definition |
139
+
140
+ ### `ISdSheetItemKeydownEventParam`
141
+
142
+ | Field | Type | Description |
143
+ |-------|------|-------------|
144
+ | `item` | `T` | The data item |
145
+ | `key` | `string` | Optional column key (for cell keydown) |
146
+ | `event` | `KeyboardEvent` | The keyboard event |
@@ -0,0 +1,158 @@
1
+ # Directives
2
+
3
+ ## `SdEventsDirective`
4
+
5
+ Exposes capture, passive, once, and custom event outputs for template binding. Automatically selected when using supported event bindings.
6
+
7
+ Selector: `[click.capture]`, `[click.once]`, `[mousedown.capture]`, `[scroll.passive]`, `[sdResize]`, `[sdSaveCommand]`, etc.
8
+
9
+ Outputs:
10
+
11
+ | Output | Type | Description |
12
+ |--------|------|-------------|
13
+ | `click.capture` | `OutputEmitterRef<MouseEvent>` | Click in capture phase |
14
+ | `click.once` | `OutputEmitterRef<MouseEvent>` | Click once |
15
+ | `click.capture.once` | `OutputEmitterRef<MouseEvent>` | Click capture once |
16
+ | `mousedown.capture` | `OutputEmitterRef<MouseEvent>` | Mouse down capture |
17
+ | `mouseup.capture` | `OutputEmitterRef<MouseEvent>` | Mouse up capture |
18
+ | `mouseover.capture` | `OutputEmitterRef<MouseEvent>` | Mouse over capture |
19
+ | `mouseout.capture` | `OutputEmitterRef<MouseEvent>` | Mouse out capture |
20
+ | `keydown.capture` | `OutputEmitterRef<KeyboardEvent>` | Key down capture |
21
+ | `keyup.capture` | `OutputEmitterRef<KeyboardEvent>` | Key up capture |
22
+ | `focus.capture` | `OutputEmitterRef<FocusEvent>` | Focus capture |
23
+ | `blur.capture` | `OutputEmitterRef<FocusEvent>` | Blur capture |
24
+ | `invalid.capture` | `OutputEmitterRef<Event>` | Invalid capture |
25
+ | `scroll.capture` | `OutputEmitterRef<Event>` | Scroll capture |
26
+ | `scroll.passive` | `OutputEmitterRef<Event>` | Scroll passive |
27
+ | `scroll.capture.passive` | `OutputEmitterRef<Event>` | Scroll capture passive |
28
+ | `wheel.passive` | `OutputEmitterRef<WheelEvent>` | Wheel passive |
29
+ | `wheel.capture.passive` | `OutputEmitterRef<WheelEvent>` | Wheel capture passive |
30
+ | `touchstart.passive` | `OutputEmitterRef<TouchEvent>` | Touch start passive |
31
+ | `touchstart.capture.passive` | `OutputEmitterRef<TouchEvent>` | Touch start capture passive |
32
+ | `touchmove.passive` | `OutputEmitterRef<TouchEvent>` | Touch move passive |
33
+ | `touchmove.capture.passive` | `OutputEmitterRef<TouchEvent>` | Touch move capture passive |
34
+ | `touchend.passive` | `OutputEmitterRef<TouchEvent>` | Touch end passive |
35
+ | `dragover.capture` | `OutputEmitterRef<DragEvent>` | Drag over capture |
36
+ | `dragenter.capture` | `OutputEmitterRef<DragEvent>` | Drag enter capture |
37
+ | `dragleave.capture` | `OutputEmitterRef<DragEvent>` | Drag leave capture |
38
+ | `drop.capture` | `OutputEmitterRef<DragEvent>` | Drop capture |
39
+ | `transitionend.once` | `OutputEmitterRef<TransitionEvent>` | Transition end once |
40
+ | `animationend.once` | `OutputEmitterRef<AnimationEvent>` | Animation end once |
41
+ | `sdResize` | `OutputEmitterRef<ISdResizeEvent>` | Resize observer event |
42
+ | `sdRefreshCommand` | `OutputEmitterRef<KeyboardEvent>` | Ctrl+Alt+L command |
43
+ | `sdSaveCommand` | `OutputEmitterRef<KeyboardEvent>` | Ctrl+S command |
44
+ | `sdInsertCommand` | `OutputEmitterRef<KeyboardEvent>` | Ctrl+Insert command |
45
+
46
+ ## `SdRippleDirective`
47
+
48
+ Adds material-style ripple effect on pointer interaction.
49
+
50
+ Selector: `[sd-ripple]`
51
+
52
+ | Input | Type | Description |
53
+ |-------|------|-------------|
54
+ | `sd-ripple` (alias) | `boolean` (required, booleanAttribute) | Whether ripple is enabled |
55
+
56
+ ## `SdShowEffectDirective`
57
+
58
+ Animates element reveal when it enters the viewport via IntersectionObserver.
59
+
60
+ Selector: `[sd-show-effect]`
61
+
62
+ | Input | Type | Description |
63
+ |-------|------|-------------|
64
+ | `sd-show-effect` (alias) | `boolean` (required, booleanAttribute) | Whether effect is enabled |
65
+ | `sdShowEffectType` | `"l2r" \| "t2b"` | Animation direction (default: `"t2b"`) |
66
+
67
+ ## `SdInvalidDirective`
68
+
69
+ Shows a validation indicator with a custom message on the host element. Integrates with form validation.
70
+
71
+ Selector: `[sd-invalid]`
72
+
73
+ | Input | Type | Description |
74
+ |-------|------|-------------|
75
+ | `sd-invalid` (alias) | `string` (required) | Validation error message (empty string = valid) |
76
+
77
+ ## `SdTypedTemplateDirective`
78
+
79
+ Provides type-safe ng-template context guard for custom template contexts.
80
+
81
+ Selector: `ng-template[typed]`
82
+
83
+ | Input | Type | Description |
84
+ |-------|------|-------------|
85
+ | `typed` | `T` (required) | Context type token |
86
+
87
+ ```typescript
88
+ class SdTypedTemplateDirective<T> {
89
+ static ngTemplateContextGuard<TypeToken>(
90
+ _dir: SdTypedTemplateDirective<TypeToken>,
91
+ _ctx: unknown,
92
+ ): _ctx is TypeToken;
93
+ }
94
+ ```
95
+
96
+ ## `SdItemOfTemplateDirective`
97
+
98
+ Provides typed iteration context for ng-template. Used for passing item type information to template outlets.
99
+
100
+ Selector: `ng-template[itemOf]`
101
+
102
+ | Input | Type | Description |
103
+ |-------|------|-------------|
104
+ | `itemOf` | `TItem[]` (required) | Array of items for type inference |
105
+
106
+ ```typescript
107
+ class SdItemOfTemplateDirective<TItem> {
108
+ static ngTemplateContextGuard<TContextItem>(
109
+ _dir: SdItemOfTemplateDirective<TContextItem>,
110
+ _ctx: unknown,
111
+ ): _ctx is SdItemOfTemplateContext<TContextItem>;
112
+ }
113
+ ```
114
+
115
+ ### `SdItemOfTemplateContext`
116
+
117
+ | Field | Type | Description |
118
+ |-------|------|-------------|
119
+ | `$implicit` | `TItem` | The current item |
120
+ | `item` | `TItem` | The current item (named) |
121
+ | `index` | `number` | Item index |
122
+ | `depth` | `number` | Nesting depth |
123
+
124
+ ## `SdRouterLinkDirective`
125
+
126
+ Navigation directive supporting router navigation, window opening, and outlet navigation. Ctrl/Alt+click opens in new tab; Shift+click opens in new window.
127
+
128
+ Selector: `[sd-router-link]`
129
+
130
+ | Input | Type | Description |
131
+ |-------|------|-------------|
132
+ | `sd-router-link` (alias) | `object \| undefined` | Navigation option |
133
+
134
+ Option object fields:
135
+
136
+ | Field | Type | Description |
137
+ |-------|------|-------------|
138
+ | `link` | `string` | Target route path |
139
+ | `params` | `Record<string, string>` | Optional route parameters |
140
+ | `window` | `{ width?: number; height?: number }` | Optional window dimensions |
141
+ | `outletName` | `string` | Optional named outlet |
142
+ | `queryParams` | `Record<string, string>` | Optional query parameters |
143
+
144
+ ## `SdCardDirective`
145
+
146
+ Applies card styling (CSS class `card`) to the host element.
147
+
148
+ Selector: `sd-card`, `[sd-card]`
149
+
150
+ No inputs.
151
+
152
+ ## `SdPaneDirective`
153
+
154
+ Applies fill-area pane styling (CSS class `fill`, `display: block`) to the host element.
155
+
156
+ Selector: `sd-pane`, `[sd-pane]`
157
+
158
+ No inputs.