@ngstarter-ui/components 22.2.3 → 22.2.5

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.
Files changed (96) hide show
  1. package/ai/component-registry.json +97 -8
  2. package/content-editor/BLOCK_FORMAT.md +182 -0
  3. package/data-view/API.md +262 -0
  4. package/fesm2022/ngstarter-ui-components-button.mjs +2 -2
  5. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs +35 -0
  7. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs.map +1 -0
  8. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-Jbf8h2yz.mjs → ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs} +3 -4
  9. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-Jbf8h2yz.mjs.map → ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs.map} +1 -1
  10. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-BizHRPdC.mjs → ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs} +4 -4
  11. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-BizHRPdC.mjs.map → ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs.map} +1 -1
  12. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-BzoaJvai.mjs → ngstarter-ui-components-content-editor-embed-block-9EHRGpW_.mjs} +2 -2
  13. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-BzoaJvai.mjs.map → ngstarter-ui-components-content-editor-embed-block-9EHRGpW_.mjs.map} +1 -1
  14. package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-C4p-S0Do.mjs → ngstarter-ui-components-content-editor-gallery-block-CBuzrmSH.mjs} +16 -39
  15. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-CBuzrmSH.mjs.map +1 -0
  16. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Cdq_Dcv2.mjs → ngstarter-ui-components-content-editor-grid-block-Sy67i4mg.mjs} +5 -6
  17. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Cdq_Dcv2.mjs.map → ngstarter-ui-components-content-editor-grid-block-Sy67i4mg.mjs.map} +1 -1
  18. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-CDSt4rXe.mjs → ngstarter-ui-components-content-editor-heading-block.component-CnDuIpxQ.mjs} +8 -5
  19. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnDuIpxQ.mjs.map +1 -0
  20. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-CqbgVnDh.mjs +113 -0
  21. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-CqbgVnDh.mjs.map +1 -0
  22. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-CdQ30RjA.mjs → ngstarter-ui-components-content-editor-list-block.component-CHJr_pFf.mjs} +4 -4
  23. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-CdQ30RjA.mjs.map → ngstarter-ui-components-content-editor-list-block.component-CHJr_pFf.mjs.map} +1 -1
  24. package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-CbZY0keH.mjs → ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs} +4 -4
  25. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs.map +1 -0
  26. package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs} +2089 -1521
  27. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs.map +1 -0
  28. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-Dd0pQquG.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-CqU1XJTo.mjs} +4 -4
  29. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-Dd0pQquG.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-CqU1XJTo.mjs.map} +1 -1
  30. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-CUxKoeb_.mjs → ngstarter-ui-components-content-editor-quote-block.component-fAUfABVY.mjs} +4 -4
  31. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-CUxKoeb_.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-fAUfABVY.mjs.map} +1 -1
  32. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-BTExrXy8.mjs → ngstarter-ui-components-content-editor-table-block.component-CqbnMNug.mjs} +4 -4
  33. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-BTExrXy8.mjs.map → ngstarter-ui-components-content-editor-table-block.component-CqbnMNug.mjs.map} +1 -1
  34. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-B46YeMGQ.mjs → ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs} +3 -4
  35. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-B46YeMGQ.mjs.map → ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs.map} +1 -1
  36. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +19 -0
  37. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +1 -0
  38. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs +134 -0
  39. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs.map +1 -0
  40. package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
  41. package/fesm2022/ngstarter-ui-components-core.mjs +46 -1
  42. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
  43. package/fesm2022/ngstarter-ui-components-data-view.mjs +1011 -90
  44. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
  45. package/fesm2022/ngstarter-ui-components-datepicker.mjs +45 -19
  46. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
  47. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +1 -1
  48. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
  49. package/fesm2022/ngstarter-ui-components-form-builder.mjs +1 -1
  50. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  51. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +58 -1
  52. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  53. package/fesm2022/ngstarter-ui-components-image-designer.mjs +1 -1
  54. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
  55. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +1 -1
  56. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
  57. package/fesm2022/ngstarter-ui-components-menu.mjs +17 -4
  58. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
  59. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +1 -1
  60. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  61. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +1 -1
  62. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  63. package/fesm2022/ngstarter-ui-components-phone-input.mjs +1 -1
  64. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
  65. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1 -1
  66. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
  67. package/fesm2022/ngstarter-ui-components-sort.mjs +9 -2
  68. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
  69. package/fesm2022/ngstarter-ui-components-table.mjs +10 -0
  70. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
  71. package/package.json +1 -1
  72. package/styles/_common.scss +2 -1
  73. package/styles/_tokens.scss +32 -1
  74. package/styles/themes/default.scss +1 -1
  75. package/types/ngstarter-ui-components-content-editor.d.ts +211 -11
  76. package/types/ngstarter-ui-components-core.d.ts +4 -1
  77. package/types/ngstarter-ui-components-data-view.d.ts +204 -11
  78. package/types/ngstarter-ui-components-datepicker.d.ts +3 -1
  79. package/types/ngstarter-ui-components-headless-editor.d.ts +6 -1
  80. package/types/ngstarter-ui-components-menu.d.ts +5 -1
  81. package/types/ngstarter-ui-components-sort.d.ts +1 -0
  82. package/types/ngstarter-ui-components-table.d.ts +2 -0
  83. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DlUkhwCu.mjs +0 -54
  84. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-DlUkhwCu.mjs.map +0 -1
  85. package/fesm2022/ngstarter-ui-components-content-editor-block-base-C46lyMrp.mjs +0 -47
  86. package/fesm2022/ngstarter-ui-components-content-editor-block-base-C46lyMrp.mjs.map +0 -1
  87. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-C4p-S0Do.mjs.map +0 -1
  88. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CDSt4rXe.mjs.map +0 -1
  89. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-LfKZapgv.mjs +0 -169
  90. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-LfKZapgv.mjs.map +0 -1
  91. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-CbZY0keH.mjs.map +0 -1
  92. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs.map +0 -1
  93. package/fesm2022/ngstarter-ui-components-content-editor-upload-block-base-DKqojf--.mjs +0 -29
  94. package/fesm2022/ngstarter-ui-components-content-editor-upload-block-base-DKqojf--.mjs.map +0 -1
  95. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-hBR5AauH.mjs +0 -201
  96. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-hBR5AauH.mjs.map +0 -1
@@ -0,0 +1,262 @@
1
+ # DataView workflows API
2
+
3
+ Import from `@ngstarter-ui/components/data-view`. `DataView` is the operational,
4
+ virtualized data grid. Use `Table` for template-defined read-only tables.
5
+
6
+ ```ts
7
+ import { DataView, DataViewColumnDef, provideDataView } from '@ngstarter-ui/components/data-view';
8
+
9
+ interface RecordRow { id: number; name: string; amount: number; created: string; enabled: boolean; status: string; }
10
+
11
+ const columns: DataViewColumnDef[] = [
12
+ { field: 'id', name: 'ID', width: 80, pinned: true, sortable: true },
13
+ { field: 'name', name: 'Name', filter: { type: 'text' } },
14
+ { field: 'amount', name: 'Amount', filter: { type: 'number' } },
15
+ { field: 'created', name: 'Created', filter: { type: 'date' } },
16
+ { field: 'enabled', name: 'Enabled', filter: { type: 'boolean' } },
17
+ { field: 'status', name: 'Status', filter: { type: 'enum', options: [
18
+ { value: 'active', label: 'Active' }, { value: 'pending', label: 'Pending' }
19
+ ] } }
20
+ ];
21
+ const getRowId = (row: RecordRow) => row.id;
22
+
23
+ // Optional environment defaults; all instance inputs still override them.
24
+ export const appConfig = { providers: [provideDataView({ pageSize: 20, withSavedViews: true })] };
25
+ ```
26
+
27
+ ```html
28
+ <ngs-data-view #grid="ngsDataView" [data]="records" [columnDefs]="columns"
29
+ [getRowId]="getRowId" withSelection withPagination withColumnSettings withSavedViews
30
+ selectionScope="page" [(search)]="search" [(columnFilters)]="filters"
31
+ [(savedViews)]="views" viewStorageKey="orders:current-user:views"
32
+ ariaLabel="Orders" (stateChanged)="onState($event)"
33
+ (selectionStateChanged)="onSelection($event)" (rowActivated)="openRecord($event)"/>
34
+ ```
35
+
36
+ ## Stable row selection
37
+
38
+ `getRowId: (row: T) => string | number` is optional for local/reference-based
39
+ selection and required to preserve identity when records are replaced. IDs must
40
+ be unique and stable within the dataset. Number `1` and string `"1"` are distinct.
41
+
42
+ `selectionScope` defaults to `filtered`:
43
+
44
+ | Scope | Client | Server |
45
+ | --- | --- | --- |
46
+ | `page` | Current filtered/sorted page (all filtered rows without pagination) | Loaded page |
47
+ | `filtered` | All results matching quick search and column filters | All matching records, including unloaded rows, when `getRowId` is supplied |
48
+ | `all` | Entire input dataset, including rows hidden by filters | Entire server dataset; query fields are empty |
49
+
50
+ `api.selectAll(scope?)` can override the configured scope for that operation.
51
+ Single selection selects at most one record. Without `getRowId`, server selection
52
+ falls back to the loaded page and reports `scope: 'page'`.
53
+
54
+ ```ts
55
+ interface DataViewSelectionState<T = unknown> {
56
+ scope: 'page' | 'filtered' | 'all';
57
+ allMatching: boolean;
58
+ rowIds: (string | number)[];
59
+ excludedRowIds: (string | number)[];
60
+ rows: T[];
61
+ search: string;
62
+ columnFilters: DataViewFilterModel;
63
+ }
64
+ ```
65
+
66
+ `selectionChanged` remains a `T[]` event containing known selected records. It is
67
+ not the complete list for a server-wide selection. Use `selectionStateChanged`
68
+ or `api.getSelection()` for that descriptor. When `allMatching` is true, interpret
69
+ selection as **the query minus excluded IDs**, not as `rowIds`. `rows` and `rowIds`
70
+ contain known selected records only. After immutable refresh, these record objects
71
+ are updated to their current versions. Deleted client records are removed;
72
+ server records remain selected across pages. A query change clears a server
73
+ `filtered` all-matching selection; `all` selection survives query changes.
74
+ Checkbox events use source `checkbox`, single-row click uses `row`, and keyboard
75
+ selection uses `keyboard`. `api.unselectAll()` clears explicit and all-matching
76
+ selection.
77
+
78
+ ## Typed column filters
79
+
80
+ `columnFilters` is a two-way model keyed by field path. Filters combine with AND;
81
+ quick search is an additional condition. Column `filter` enables its header
82
+ button and declares the UI type; enum options preserve string/number values.
83
+ Text comparisons are case-insensitive; enum comparisons preserve value types;
84
+ boolean values must be actual booleans; missing/empty numeric values never match.
85
+
86
+ ```ts
87
+ type DataViewColumnFilter =
88
+ | { type: 'text'; operator: 'contains' | 'equals' | 'startsWith' | 'endsWith' | 'notContains'; value: string }
89
+ | { type: 'number'; operator: 'equals' | 'notEquals' | 'greaterThan' | 'lessThan' | 'between'; value?: number; to?: number }
90
+ | { type: 'date'; from?: string; to?: string }
91
+ | { type: 'enum'; values: (string | number)[] }
92
+ | { type: 'boolean'; value: boolean };
93
+ type DataViewFilterModel = Record<string, DataViewColumnFilter>;
94
+ ```
95
+
96
+ Number `between` and date ranges are inclusive; either bound may be omitted.
97
+ Dates use `YYYY-MM-DD`, interpreted as calendar days. ISO timestamp values use
98
+ their date portion; `Date` values use their local calendar day. The date filter
99
+ uses NgStarter DateRangeInput/DateRangePicker, not native date inputs.
100
+ `DateRangeInput` now exposes `[(range)]="dateRange"` with `DateRange<D> | null`
101
+ for both typed values and picker updates.
102
+
103
+ ```ts
104
+ grid.api.setColumnFilter('amount', { type: 'number', operator: 'between', value: 100, to: 500 });
105
+ grid.api.setColumnFilter('created', { type: 'date', from: '2026-10-01', to: '2026-10-14' });
106
+ grid.api.setColumnFilter('status', { type: 'enum', values: ['active'] });
107
+ grid.api.setColumnFilter('enabled', { type: 'boolean', value: false });
108
+ grid.api.setColumnFilter('status', null); // remove one
109
+ grid.api.clearFilters(); // clear column filters AND quick search
110
+ ```
111
+
112
+ Empty text/enum/range conditions are removed. Invalid dates, non-finite numbers,
113
+ reversed ranges, unknown fields and configured type mismatches are rejected.
114
+ Changing filters/search resets the page and vertical scroll. Client page indexes
115
+ are also clamped when records shrink. Active chips can remove a single condition
116
+ or clear the query, even when no records match.
117
+
118
+ Public pure helpers `matchesDataViewFilter`, `normalizeDataViewFilter`,
119
+ `normalizeDataViewFilters`, `dataViewDateKey`, and `dataViewFilterLabel` share the
120
+ contract with adapters. Production servers must implement the same semantics.
121
+
122
+ ## Server requests, cancellation and errors
123
+
124
+ ```ts
125
+ interface DataViewGetRowsParams {
126
+ startRow: number; // inclusive
127
+ endRow: number; // exclusive
128
+ page: number; // zero-based
129
+ pageSize: number;
130
+ sortModel: { colId: string; sort: 'asc' | 'desc' | '' }[];
131
+ filterModel: string; // quick search, retained for existing adapters
132
+ columnFilters: DataViewFilterModel;
133
+ signal: AbortSignal;
134
+ successCallback(rows: any[], lastRow?: number): void;
135
+ failCallback(error?: unknown): void;
136
+ }
137
+ interface DataViewDatasource {
138
+ getItems(params: DataViewGetRowsParams): void | (() => void) | { unsubscribe(): void };
139
+ }
140
+ ```
141
+
142
+ `lastRow` is the **total number of matching records**, not the last index. Supply
143
+ it for accurate server pagination. Newer queries/datasources and destruction abort
144
+ `signal`, call pending cleanup/unsubscribe, and reject stale callbacks. Quick
145
+ search is debounced by 300ms; column conditions and pagination are immediate.
146
+ Synchronous adapter exceptions use the same failure path.
147
+
148
+ ```ts
149
+ const datasource: DataViewDatasource = {
150
+ getItems(params) {
151
+ fetch('/api/orders/query', {
152
+ method: 'POST', signal: params.signal,
153
+ headers: { 'Content-Type': 'application/json' },
154
+ body: JSON.stringify({ page: params.page, pageSize: params.pageSize,
155
+ search: params.filterModel, filters: params.columnFilters, sort: params.sortModel })
156
+ }).then(response => {
157
+ if (!response.ok) throw new Error('Could not load orders');
158
+ return response.json();
159
+ }).then(result => params.successCallback(result.rows, result.total))
160
+ .catch(error => { if (!params.signal.aborted) params.failCallback(error); });
161
+ }
162
+ };
163
+ ```
164
+
165
+ `error()` holds the visible message; `loadError` emits the original error.
166
+ `loadStatus()` is `idle | loading | refreshing | ready | error`.
167
+ `refreshing()` is true during background requests after an initial response.
168
+ Previously loaded rows remain visible with an updating status; the initial load
169
+ uses a blocking loader. The error alert includes Retry, which calls `refresh()`.
170
+ `loadEnd` / `refreshEnd` signal completion of successful **or failed** cycles;
171
+ check `error()` when completion alone is insufficient. `api.search(value)` updates
172
+ the same model as `[search]` and triggers a server request in server mode.
173
+
174
+ ## State and named views
175
+
176
+ ```ts
177
+ interface DataViewViewState {
178
+ version: 1;
179
+ columns: DataViewState[]; // array order is column order
180
+ sort: { active: string; direction: 'asc' | 'desc' | '' };
181
+ search: string;
182
+ columnFilters: DataViewFilterModel;
183
+ pageSize: number;
184
+ }
185
+ interface DataViewState {
186
+ field: string; visible?: boolean; width?: string | number;
187
+ pinned?: boolean; pinAlign?: 'start' | 'end';
188
+ }
189
+ interface DataViewSavedView { id: string; name: string; state: DataViewViewState; }
190
+ ```
191
+
192
+ `stateChanged` emits a serializable state when columns/query/page size change.
193
+ `sortState` is a two-way `{ active, direction }` model. `sortChange` remains the
194
+ user sorting event. `columnFilters`, `search`, and `savedViews` expose their normal
195
+ model change outputs. `getSnapshot()` / `applyState()` remain column-only APIs and
196
+ now restore order and visibility as well as width/pinning.
197
+
198
+ ```ts
199
+ const state = grid.api.getState();
200
+ grid.api.setState(state);
201
+ const view = grid.api.saveView('Review queue');
202
+ grid.api.applyView(view.id);
203
+ grid.api.saveView('Review queue', view.id); // update current state
204
+ // or rename without replacing its state:
205
+ grid.api.renameView(view.id, 'Priority queue');
206
+ grid.api.deleteView(view.id);
207
+ grid.api.applyView(null); // reset to initial instance state
208
+ ```
209
+
210
+ Names must contain 1–100 characters and be unique ignoring case.
211
+ `withSavedViews` enables the selector and save/update/rename/delete/reset menu.
212
+ An unsaved-change indicator compares the current query with the chosen view.
213
+ `activeViewId()` exposes the selection; `viewApplied` emits the applied view or
214
+ null for the default. Applying a view starts at page zero. Deleting the active
215
+ view resets to default. State restoration validates the version/types, removes
216
+ stale fields, appends new columns, clears sorting for removed fields, and rejects
217
+ views that hide every column. Pure helpers `normalizeDataViewState` and
218
+ `normalizeDataViewSavedViews` are also public.
219
+
220
+ Persistence is opt-in through a unique `viewStorageKey`. The default storage is
221
+ localStorage; use a key scoped to the user and dataset. No key means no storage
222
+ access. For another synchronous storage adapter:
223
+
224
+ ```ts
225
+ provideDataView({
226
+ viewStorage: {
227
+ getItem: key => myStorage.read(key),
228
+ setItem: (key, value) => myStorage.write(key, value)
229
+ }
230
+ });
231
+ ```
232
+
233
+ Storage failures and malformed payloads are exposed through `viewStorageError()`
234
+ and a visible alert when saved views UI is enabled. Named views and the active ID
235
+ are persisted; unsaved edits and row selection are not. Consumers can instead
236
+ bind `[(savedViews)]` and persist its change event themselves.
237
+
238
+ ## Keyboard and accessibility
239
+
240
+ The root uses a labelled `grid`, logical row/column counts, row indexes, selected
241
+ states and an active descendant. Pinned cell fragments belong to one logical
242
+ row through `aria-owns`; virtualized rows report their global position. Provide
243
+ `ariaLabel` for the dataset. Icon actions and selection checkboxes have labels.
244
+
245
+ | Key while grid is focused | Action |
246
+ | --- | --- |
247
+ | Arrows | Move active cell; scroll virtual rows/center columns into view |
248
+ | Home / End | First/last cell in current row |
249
+ | Ctrl/Command + Home / End | First/last row and cell in the loaded/client page |
250
+ | Page Up / Page Down | Move by one viewport |
251
+ | Space | Toggle current row selection |
252
+ | Shift + Space or Shift + Up/Down | Extend selection from the selection anchor |
253
+ | Ctrl/Command + A | Select configured scope |
254
+ | Escape | Clear selection |
255
+ | Enter | Emit `rowActivated` for the active record |
256
+
257
+ Inputs, buttons, custom interactive renderers and overlays retain their own
258
+ keyboard behavior. Tab reaches sorting headers and resize separators. Enter /
259
+ Space sorts a header. Resize handles support Left/Right (10px), Shift + Left/Right
260
+ (1px), Home (minimum), End (maximum, default 2000px). User resize constraints are
261
+ respected. Actual screen-reader support should also be evaluated in consumer
262
+ applications with their custom renderers.
@@ -35,7 +35,7 @@ class Button {
35
35
  }
36
36
  }
37
37
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Button, deps: [], target: i0.ɵɵFactoryTarget.Component });
38
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: Button, isStandalone: true, selector: "\n button[ngsButton], button[ngsIconButton],\n a[ngsButton], a[ngsIconButton]\n ", inputs: { ngsButton: { classPropertyName: "ngsButton", publicName: "ngsButton", isSignal: true, isRequired: false, transformFunction: null }, ngsIconButton: { classPropertyName: "ngsIconButton", publicName: "ngsIconButton", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disabledInteractive: { classPropertyName: "disabledInteractive", publicName: "disabledInteractive", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null }, reverse: { classPropertyName: "reverse", publicName: "reverse", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, hideTextOnMobile: { classPropertyName: "hideTextOnMobile", publicName: "hideTextOnMobile", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "_haltDisabledEvents($event)" }, properties: { "attr.disabled": "((disabled() || loading()) && !disabledInteractive()) || null", "class.ngs-button-disabled": "disabled() || loading()", "class.ngs-button-loading": "loading()", "class.ngs-button-primary": "ngsButton() === \"filled\"", "class.ngs-button-outlined": "ngsButton() === \"outlined\"", "class.ngs-button-text": "(ngsButton() === \"text\" || ngsButton() === \"\") && ngsIconButton() !== undefined", "class.ngs-button-tonal": "ngsButton() === \"tonal\"", "class.ngs-icon-button": "ngsIconButton() !== undefined", "class.is-reverse": "reverse()", "class.hide-text-on-mobile": "hideTextOnMobile()", "class.is-full-width": "fullWidth()", "attr.aria-disabled": "(disabled() || loading()).toString()", "attr.tabindex": "(disabled() || loading()) && disabledInteractive() ? 0 : null" }, classAttribute: "ngs-button" }, exportAs: ["ngsButton"], ngImport: i0, template: "<span class=\"ripple\" ngsRipple></span>\n<span class=\"icon\">\n <ng-content select=\"ngs-icon\"/>\n</span>\n<span class=\"content\"><ng-content/></span>\n@if (loading()) {\n <svg class=\"ngs-button-loading-spinner\" viewBox=\"0 0 50 50\">\n <circle class=\"path\" cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke-width=\"5\"></circle>\n </svg>\n}\n<!--<div class=\"badge\"><ng-content select=\"ngs-badge\"/></div>-->\n", styles: [":host{--ngs-button-padding: 0 var(--ngs-button-padding-x, calc(var(--spacing, .25rem) * 4));--ngs-button-border-radius: var(--ngs-button-radius, var(--ngs-radius-lg));--ngs-button-bg: transparent;--ngs-button-color: var(--ngs-color-on-surface);--ngs-button-hover-bg: var(--ngs-button-bg);--ngs-button-content-gap: var(--ngs-control-gap, calc(var(--spacing, .25rem) * 2));position:relative;flex:none;width:max-content;box-sizing:border-box;-webkit-tap-highlight-color:transparent;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;cursor:pointer;border:none;background:var(--ngs-button-bg);color:var(--ngs-button-color);text-decoration:none;outline:none;font-size:var(--ngs-button-font-size, var(--ngs-font-size-sm));font-weight:var(--ngs-button-font-weight, 500);padding:var(--ngs-button-padding);height:var(--ngs-button-height);border-radius:var(--ngs-button-border-radius);transition:background-color .2s cubic-bezier(0,0,.2,1),box-shadow .2s cubic-bezier(0,0,.2,1);gap:var(--ngs-button-content-gap)}@supports (color: color-mix(in lab,red,red)){:host{--ngs-button-hover-bg: color-mix(in srgb, var(--ngs-button-bg), var(--ngs-button-color) 8%)}}:host.is-full-width{width:100%}@media(width<640px){:host.hide-text-on-mobile .content{display:none}:host.hide-text-on-mobile .icon{left:auto;right:auto}:host.hide-text-on-mobile{min-width:var(--ngs-button-height);padding:0}}:host .ripple{position:absolute;inset:0;border-radius:inherit}:host .icon:empty{display:none}:host .icon{line-height:0;position:relative;left:-3px}:host.ngs-icon-button .icon{position:static;left:auto;right:auto}:host .content{line-height:0}:host .content:empty{display:none}:host .ngs-button-loading-spinner{display:none;width:18px;height:18px;margin-left:8px;animation:rotate 2s linear infinite}:host .ngs-button-loading-spinner .path{stroke:currentColor;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}:host.ngs-button-loading .ngs-button-loading-spinner{display:block}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}:host:hover{background:var(--ngs-button-hover-bg)}:host:focus-visible{box-shadow:0 0 0 3px var(--ngs-state-focus-ring)}:host.is-reverse .icon{left:auto;right:-5px}:host.is-reverse{flex-direction:row-reverse}:host.ngs-button-primary{--ngs-button-bg: var(--ngs-button-filled-bg, var(--ngs-color-primary));--ngs-button-color: var(--ngs-button-filled-color, var(--ngs-color-on-primary))}:host.ngs-button-tonal{--ngs-button-bg: var(--ngs-button-tonal-bg, var(--ngs-color-secondary-container));--ngs-button-color: var(--ngs-button-tonal-color, var(--ngs-color-on-secondary-container))}:host.ngs-button-outlined{border:1px solid var(--ngs-button-outlined-border, var(--ngs-color-muted));--ngs-button-color: var(--ngs-button-outlined-color, var(--ngs-color-on-secondary-container))}:host.ngs-icon-button{--ngs-button-padding: 0;--ngs-button-border-radius: 50%;min-width:var(--ngs-button-height);width:var(--ngs-button-height)}:host.ngs-icon-button.ngs-button-loading .icon{display:none}:host.ngs-color-primary{--ngs-button-color: var(--ngs-color-primary)}:host.ngs-color-primary.ngs-button-primary{--ngs-button-bg: var(--ngs-color-primary);--ngs-button-color: var(--ngs-color-on-primary)}:host.ngs-color-primary.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-primary-container);--ngs-button-color: var(--ngs-color-on-primary-container)}:host.ngs-color-accent{--ngs-button-color: var(--ngs-color-secondary)}:host.ngs-color-accent.ngs-button-primary{--ngs-button-bg: var(--ngs-color-secondary);--ngs-button-color: var(--ngs-color-on-secondary)}:host.ngs-color-accent.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-secondary-container);--ngs-button-color: var(--ngs-color-on-secondary-container)}:host.ngs-color-warn{--ngs-button-color: var(--ngs-color-danger)}:host.ngs-color-warn.ngs-button-primary{--ngs-button-bg: var(--ngs-color-danger);--ngs-button-color: var(--ngs-color-on-danger)}:host.ngs-color-warn.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-danger-container);--ngs-button-color: var(--ngs-color-on-danger-container)}:host.ngs-button-disabled{cursor:default;--ngs-button-bg: var(--ngs-state-disabled-bg) !important;--ngs-button-color: var(--ngs-state-disabled-color) !important;--ngs-button-hover-bg: var(--ngs-state-disabled-bg) !important}:host.ngs-button-disabled.ngs-button-text,:host.ngs-button-disabled.ngs-button-outlined{--ngs-button-bg: transparent !important;--ngs-button-hover-bg: transparent !important;--ngs-button-color: var(--ngs-state-disabled-color) !important}:host.ngs-button-disabled.ngs-button-outlined{border-color:var(--ngs-state-disabled-border)!important}:host.ngs-button-disabled:hover{background:var(--ngs-button-hover-bg)}:host.ngs-button-disabled[disabled]{pointer-events:none}:host:not([disabled]).ngs-button-disabled{pointer-events:auto;cursor:default}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: Ripple, selector: "[ngsRipple]", inputs: ["ngsRippleColor", "ngsRippleUnbounded", "ngsRippleCentered", "ngsRippleRadius", "ngsRippleAnimation", "ngsRippleDisabled", "ngsRippleTrigger"], outputs: ["ngsRippleCenteredChange", "ngsRippleDisabledChange", "ngsRippleTriggerChange"], exportAs: ["ngsRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
38
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: Button, isStandalone: true, selector: "\n button[ngsButton], button[ngsIconButton],\n a[ngsButton], a[ngsIconButton]\n ", inputs: { ngsButton: { classPropertyName: "ngsButton", publicName: "ngsButton", isSignal: true, isRequired: false, transformFunction: null }, ngsIconButton: { classPropertyName: "ngsIconButton", publicName: "ngsIconButton", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disabledInteractive: { classPropertyName: "disabledInteractive", publicName: "disabledInteractive", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null }, reverse: { classPropertyName: "reverse", publicName: "reverse", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, hideTextOnMobile: { classPropertyName: "hideTextOnMobile", publicName: "hideTextOnMobile", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "_haltDisabledEvents($event)" }, properties: { "attr.disabled": "((disabled() || loading()) && !disabledInteractive()) || null", "class.ngs-button-disabled": "disabled() || loading()", "class.ngs-button-loading": "loading()", "class.ngs-button-primary": "ngsButton() === \"filled\"", "class.ngs-button-outlined": "ngsButton() === \"outlined\"", "class.ngs-button-text": "(ngsButton() === \"text\" || ngsButton() === \"\") && ngsIconButton() !== undefined", "class.ngs-button-tonal": "ngsButton() === \"tonal\"", "class.ngs-icon-button": "ngsIconButton() !== undefined", "class.is-reverse": "reverse()", "class.hide-text-on-mobile": "hideTextOnMobile()", "class.is-full-width": "fullWidth()", "attr.aria-disabled": "(disabled() || loading()).toString()", "attr.tabindex": "(disabled() || loading()) && disabledInteractive() ? 0 : null" }, classAttribute: "ngs-button" }, exportAs: ["ngsButton"], ngImport: i0, template: "<span class=\"ripple\" ngsRipple></span>\n<span class=\"icon\">\n <ng-content select=\"ngs-icon\"/>\n</span>\n<span class=\"content\"><ng-content/></span>\n@if (loading()) {\n <svg class=\"ngs-button-loading-spinner\" viewBox=\"0 0 50 50\">\n <circle class=\"path\" cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke-width=\"5\"></circle>\n </svg>\n}\n<!--<div class=\"badge\"><ng-content select=\"ngs-badge\"/></div>-->\n", styles: [":host{--ngs-button-padding: 0 var(--ngs-button-padding-x, calc(var(--spacing, .25rem) * 4));--ngs-button-border-radius: var(--ngs-button-radius, var(--ngs-radius-lg));--ngs-button-bg: transparent;--ngs-button-color: var(--ngs-color-on-surface);--ngs-button-hover-bg: var(--ngs-button-bg);--ngs-button-content-gap: var(--ngs-control-gap, calc(var(--spacing, .25rem) * 2));position:relative;flex:none;width:max-content;box-sizing:border-box;-webkit-tap-highlight-color:transparent;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;cursor:pointer;border:none;background:var(--ngs-button-bg);color:var(--ngs-button-color);text-decoration:none;outline:none;font-size:var(--ngs-button-font-size, var(--ngs-font-size-sm));font-weight:var(--ngs-button-font-weight, 500);padding:var(--ngs-button-padding);height:var(--ngs-button-height);border-radius:var(--ngs-button-border-radius);transition:background-color .2s cubic-bezier(0,0,.2,1),box-shadow .2s cubic-bezier(0,0,.2,1);gap:var(--ngs-button-content-gap)}@supports (color: color-mix(in lab,red,red)){:host{--ngs-button-hover-bg: color-mix(in srgb, var(--ngs-button-bg), var(--ngs-button-color) 8%)}}:host.is-full-width{width:100%}@media(width<640px){:host.hide-text-on-mobile .content{display:none}:host.hide-text-on-mobile .icon{left:auto;right:auto}:host.hide-text-on-mobile{min-width:var(--ngs-button-height);padding:0}}:host .ripple{position:absolute;inset:0;border-radius:inherit}:host .icon:empty{display:none}:host .icon{line-height:0;position:relative;left:-3px}:host.ngs-icon-button .icon{position:static;left:auto;right:auto}:host .content{line-height:0}:host .content:empty{display:none}:host .ngs-button-loading-spinner{display:none;width:18px;height:18px;margin-left:8px;animation:rotate 2s linear infinite}:host .ngs-button-loading-spinner .path{stroke:currentColor;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}:host.ngs-button-loading .ngs-button-loading-spinner{display:block}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}:host:hover{background:var(--ngs-button-hover-bg)}:host:focus-visible{box-shadow:0 0 0 3px var(--ngs-state-focus-ring)}:host.is-reverse .icon{left:auto;right:-5px}:host.is-reverse{flex-direction:row-reverse}:host.ngs-button-primary{--ngs-button-bg: var(--ngs-button-filled-bg, var(--ngs-color-primary));--ngs-button-color: var(--ngs-button-filled-color, var(--ngs-color-on-primary))}:host.ngs-button-tonal{--ngs-button-bg: var(--ngs-button-tonal-bg, var(--ngs-color-secondary-container));--ngs-button-color: var(--ngs-button-tonal-color, var(--ngs-color-on-secondary-container))}:host.ngs-button-outlined{border:1px solid var(--ngs-button-outlined-border, var(--ngs-color-muted));--ngs-button-color: var(--ngs-button-outlined-color, var(--ngs-color-on-surface))}:host.ngs-icon-button{--ngs-button-padding: 0;--ngs-button-border-radius: 50%;min-width:var(--ngs-button-height);width:var(--ngs-button-height)}:host.ngs-icon-button.ngs-button-loading .icon{display:none}:host.ngs-color-primary{--ngs-button-color: var(--ngs-color-primary)}:host.ngs-color-primary.ngs-button-primary{--ngs-button-bg: var(--ngs-color-primary);--ngs-button-color: var(--ngs-color-on-primary)}:host.ngs-color-primary.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-primary-container);--ngs-button-color: var(--ngs-color-on-primary-container)}:host.ngs-color-accent{--ngs-button-color: var(--ngs-color-secondary)}:host.ngs-color-accent.ngs-button-primary{--ngs-button-bg: var(--ngs-color-secondary);--ngs-button-color: var(--ngs-color-on-secondary)}:host.ngs-color-accent.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-secondary-container);--ngs-button-color: var(--ngs-color-on-secondary-container)}:host.ngs-color-warn{--ngs-button-color: var(--ngs-color-danger)}:host.ngs-color-warn.ngs-button-primary{--ngs-button-bg: var(--ngs-color-danger);--ngs-button-color: var(--ngs-color-on-danger)}:host.ngs-color-warn.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-danger-container);--ngs-button-color: var(--ngs-color-on-danger-container)}:host.ngs-button-disabled{cursor:default;--ngs-button-bg: var(--ngs-state-disabled-bg) !important;--ngs-button-color: var(--ngs-state-disabled-color) !important;--ngs-button-hover-bg: var(--ngs-state-disabled-bg) !important}:host.ngs-button-disabled.ngs-button-text,:host.ngs-button-disabled.ngs-button-outlined{--ngs-button-bg: transparent !important;--ngs-button-hover-bg: transparent !important;--ngs-button-color: var(--ngs-state-disabled-color) !important}:host.ngs-button-disabled.ngs-button-outlined{border-color:var(--ngs-state-disabled-border)!important}:host.ngs-button-disabled:hover{background:var(--ngs-button-hover-bg)}:host.ngs-button-disabled[disabled]{pointer-events:none}:host:not([disabled]).ngs-button-disabled{pointer-events:auto;cursor:default}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: Ripple, selector: "[ngsRipple]", inputs: ["ngsRippleColor", "ngsRippleUnbounded", "ngsRippleCentered", "ngsRippleRadius", "ngsRippleAnimation", "ngsRippleDisabled", "ngsRippleTrigger"], outputs: ["ngsRippleCenteredChange", "ngsRippleDisabledChange", "ngsRippleTriggerChange"], exportAs: ["ngsRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
39
39
  }
40
40
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Button, decorators: [{
41
41
  type: Component,
@@ -60,7 +60,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
60
60
  '[attr.aria-disabled]': '(disabled() || loading()).toString()',
61
61
  '(click)': '_haltDisabledEvents($event)',
62
62
  '[attr.tabindex]': '(disabled() || loading()) && disabledInteractive() ? 0 : null',
63
- }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"ripple\" ngsRipple></span>\n<span class=\"icon\">\n <ng-content select=\"ngs-icon\"/>\n</span>\n<span class=\"content\"><ng-content/></span>\n@if (loading()) {\n <svg class=\"ngs-button-loading-spinner\" viewBox=\"0 0 50 50\">\n <circle class=\"path\" cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke-width=\"5\"></circle>\n </svg>\n}\n<!--<div class=\"badge\"><ng-content select=\"ngs-badge\"/></div>-->\n", styles: [":host{--ngs-button-padding: 0 var(--ngs-button-padding-x, calc(var(--spacing, .25rem) * 4));--ngs-button-border-radius: var(--ngs-button-radius, var(--ngs-radius-lg));--ngs-button-bg: transparent;--ngs-button-color: var(--ngs-color-on-surface);--ngs-button-hover-bg: var(--ngs-button-bg);--ngs-button-content-gap: var(--ngs-control-gap, calc(var(--spacing, .25rem) * 2));position:relative;flex:none;width:max-content;box-sizing:border-box;-webkit-tap-highlight-color:transparent;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;cursor:pointer;border:none;background:var(--ngs-button-bg);color:var(--ngs-button-color);text-decoration:none;outline:none;font-size:var(--ngs-button-font-size, var(--ngs-font-size-sm));font-weight:var(--ngs-button-font-weight, 500);padding:var(--ngs-button-padding);height:var(--ngs-button-height);border-radius:var(--ngs-button-border-radius);transition:background-color .2s cubic-bezier(0,0,.2,1),box-shadow .2s cubic-bezier(0,0,.2,1);gap:var(--ngs-button-content-gap)}@supports (color: color-mix(in lab,red,red)){:host{--ngs-button-hover-bg: color-mix(in srgb, var(--ngs-button-bg), var(--ngs-button-color) 8%)}}:host.is-full-width{width:100%}@media(width<640px){:host.hide-text-on-mobile .content{display:none}:host.hide-text-on-mobile .icon{left:auto;right:auto}:host.hide-text-on-mobile{min-width:var(--ngs-button-height);padding:0}}:host .ripple{position:absolute;inset:0;border-radius:inherit}:host .icon:empty{display:none}:host .icon{line-height:0;position:relative;left:-3px}:host.ngs-icon-button .icon{position:static;left:auto;right:auto}:host .content{line-height:0}:host .content:empty{display:none}:host .ngs-button-loading-spinner{display:none;width:18px;height:18px;margin-left:8px;animation:rotate 2s linear infinite}:host .ngs-button-loading-spinner .path{stroke:currentColor;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}:host.ngs-button-loading .ngs-button-loading-spinner{display:block}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}:host:hover{background:var(--ngs-button-hover-bg)}:host:focus-visible{box-shadow:0 0 0 3px var(--ngs-state-focus-ring)}:host.is-reverse .icon{left:auto;right:-5px}:host.is-reverse{flex-direction:row-reverse}:host.ngs-button-primary{--ngs-button-bg: var(--ngs-button-filled-bg, var(--ngs-color-primary));--ngs-button-color: var(--ngs-button-filled-color, var(--ngs-color-on-primary))}:host.ngs-button-tonal{--ngs-button-bg: var(--ngs-button-tonal-bg, var(--ngs-color-secondary-container));--ngs-button-color: var(--ngs-button-tonal-color, var(--ngs-color-on-secondary-container))}:host.ngs-button-outlined{border:1px solid var(--ngs-button-outlined-border, var(--ngs-color-muted));--ngs-button-color: var(--ngs-button-outlined-color, var(--ngs-color-on-secondary-container))}:host.ngs-icon-button{--ngs-button-padding: 0;--ngs-button-border-radius: 50%;min-width:var(--ngs-button-height);width:var(--ngs-button-height)}:host.ngs-icon-button.ngs-button-loading .icon{display:none}:host.ngs-color-primary{--ngs-button-color: var(--ngs-color-primary)}:host.ngs-color-primary.ngs-button-primary{--ngs-button-bg: var(--ngs-color-primary);--ngs-button-color: var(--ngs-color-on-primary)}:host.ngs-color-primary.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-primary-container);--ngs-button-color: var(--ngs-color-on-primary-container)}:host.ngs-color-accent{--ngs-button-color: var(--ngs-color-secondary)}:host.ngs-color-accent.ngs-button-primary{--ngs-button-bg: var(--ngs-color-secondary);--ngs-button-color: var(--ngs-color-on-secondary)}:host.ngs-color-accent.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-secondary-container);--ngs-button-color: var(--ngs-color-on-secondary-container)}:host.ngs-color-warn{--ngs-button-color: var(--ngs-color-danger)}:host.ngs-color-warn.ngs-button-primary{--ngs-button-bg: var(--ngs-color-danger);--ngs-button-color: var(--ngs-color-on-danger)}:host.ngs-color-warn.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-danger-container);--ngs-button-color: var(--ngs-color-on-danger-container)}:host.ngs-button-disabled{cursor:default;--ngs-button-bg: var(--ngs-state-disabled-bg) !important;--ngs-button-color: var(--ngs-state-disabled-color) !important;--ngs-button-hover-bg: var(--ngs-state-disabled-bg) !important}:host.ngs-button-disabled.ngs-button-text,:host.ngs-button-disabled.ngs-button-outlined{--ngs-button-bg: transparent !important;--ngs-button-hover-bg: transparent !important;--ngs-button-color: var(--ngs-state-disabled-color) !important}:host.ngs-button-disabled.ngs-button-outlined{border-color:var(--ngs-state-disabled-border)!important}:host.ngs-button-disabled:hover{background:var(--ngs-button-hover-bg)}:host.ngs-button-disabled[disabled]{pointer-events:none}:host:not([disabled]).ngs-button-disabled{pointer-events:auto;cursor:default}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
63
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"ripple\" ngsRipple></span>\n<span class=\"icon\">\n <ng-content select=\"ngs-icon\"/>\n</span>\n<span class=\"content\"><ng-content/></span>\n@if (loading()) {\n <svg class=\"ngs-button-loading-spinner\" viewBox=\"0 0 50 50\">\n <circle class=\"path\" cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke-width=\"5\"></circle>\n </svg>\n}\n<!--<div class=\"badge\"><ng-content select=\"ngs-badge\"/></div>-->\n", styles: [":host{--ngs-button-padding: 0 var(--ngs-button-padding-x, calc(var(--spacing, .25rem) * 4));--ngs-button-border-radius: var(--ngs-button-radius, var(--ngs-radius-lg));--ngs-button-bg: transparent;--ngs-button-color: var(--ngs-color-on-surface);--ngs-button-hover-bg: var(--ngs-button-bg);--ngs-button-content-gap: var(--ngs-control-gap, calc(var(--spacing, .25rem) * 2));position:relative;flex:none;width:max-content;box-sizing:border-box;-webkit-tap-highlight-color:transparent;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;cursor:pointer;border:none;background:var(--ngs-button-bg);color:var(--ngs-button-color);text-decoration:none;outline:none;font-size:var(--ngs-button-font-size, var(--ngs-font-size-sm));font-weight:var(--ngs-button-font-weight, 500);padding:var(--ngs-button-padding);height:var(--ngs-button-height);border-radius:var(--ngs-button-border-radius);transition:background-color .2s cubic-bezier(0,0,.2,1),box-shadow .2s cubic-bezier(0,0,.2,1);gap:var(--ngs-button-content-gap)}@supports (color: color-mix(in lab,red,red)){:host{--ngs-button-hover-bg: color-mix(in srgb, var(--ngs-button-bg), var(--ngs-button-color) 8%)}}:host.is-full-width{width:100%}@media(width<640px){:host.hide-text-on-mobile .content{display:none}:host.hide-text-on-mobile .icon{left:auto;right:auto}:host.hide-text-on-mobile{min-width:var(--ngs-button-height);padding:0}}:host .ripple{position:absolute;inset:0;border-radius:inherit}:host .icon:empty{display:none}:host .icon{line-height:0;position:relative;left:-3px}:host.ngs-icon-button .icon{position:static;left:auto;right:auto}:host .content{line-height:0}:host .content:empty{display:none}:host .ngs-button-loading-spinner{display:none;width:18px;height:18px;margin-left:8px;animation:rotate 2s linear infinite}:host .ngs-button-loading-spinner .path{stroke:currentColor;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}:host.ngs-button-loading .ngs-button-loading-spinner{display:block}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}:host:hover{background:var(--ngs-button-hover-bg)}:host:focus-visible{box-shadow:0 0 0 3px var(--ngs-state-focus-ring)}:host.is-reverse .icon{left:auto;right:-5px}:host.is-reverse{flex-direction:row-reverse}:host.ngs-button-primary{--ngs-button-bg: var(--ngs-button-filled-bg, var(--ngs-color-primary));--ngs-button-color: var(--ngs-button-filled-color, var(--ngs-color-on-primary))}:host.ngs-button-tonal{--ngs-button-bg: var(--ngs-button-tonal-bg, var(--ngs-color-secondary-container));--ngs-button-color: var(--ngs-button-tonal-color, var(--ngs-color-on-secondary-container))}:host.ngs-button-outlined{border:1px solid var(--ngs-button-outlined-border, var(--ngs-color-muted));--ngs-button-color: var(--ngs-button-outlined-color, var(--ngs-color-on-surface))}:host.ngs-icon-button{--ngs-button-padding: 0;--ngs-button-border-radius: 50%;min-width:var(--ngs-button-height);width:var(--ngs-button-height)}:host.ngs-icon-button.ngs-button-loading .icon{display:none}:host.ngs-color-primary{--ngs-button-color: var(--ngs-color-primary)}:host.ngs-color-primary.ngs-button-primary{--ngs-button-bg: var(--ngs-color-primary);--ngs-button-color: var(--ngs-color-on-primary)}:host.ngs-color-primary.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-primary-container);--ngs-button-color: var(--ngs-color-on-primary-container)}:host.ngs-color-accent{--ngs-button-color: var(--ngs-color-secondary)}:host.ngs-color-accent.ngs-button-primary{--ngs-button-bg: var(--ngs-color-secondary);--ngs-button-color: var(--ngs-color-on-secondary)}:host.ngs-color-accent.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-secondary-container);--ngs-button-color: var(--ngs-color-on-secondary-container)}:host.ngs-color-warn{--ngs-button-color: var(--ngs-color-danger)}:host.ngs-color-warn.ngs-button-primary{--ngs-button-bg: var(--ngs-color-danger);--ngs-button-color: var(--ngs-color-on-danger)}:host.ngs-color-warn.ngs-button-tonal{--ngs-button-bg: var(--ngs-color-danger-container);--ngs-button-color: var(--ngs-color-on-danger-container)}:host.ngs-button-disabled{cursor:default;--ngs-button-bg: var(--ngs-state-disabled-bg) !important;--ngs-button-color: var(--ngs-state-disabled-color) !important;--ngs-button-hover-bg: var(--ngs-state-disabled-bg) !important}:host.ngs-button-disabled.ngs-button-text,:host.ngs-button-disabled.ngs-button-outlined{--ngs-button-bg: transparent !important;--ngs-button-hover-bg: transparent !important;--ngs-button-color: var(--ngs-state-disabled-color) !important}:host.ngs-button-disabled.ngs-button-outlined{border-color:var(--ngs-state-disabled-border)!important}:host.ngs-button-disabled:hover{background:var(--ngs-button-hover-bg)}:host.ngs-button-disabled[disabled]{pointer-events:none}:host:not([disabled]).ngs-button-disabled{pointer-events:auto;cursor:default}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
64
64
  }], ctorParameters: () => [], propDecorators: { ngsButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsButton", required: false }] }], ngsIconButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsIconButton", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], disabledInteractive: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledInteractive", required: false }] }], disableRipple: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRipple", required: false }] }], reverse: [{ type: i0.Input, args: [{ isSignal: true, alias: "reverse", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], hideTextOnMobile: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideTextOnMobile", required: false }] }] } });
65
65
 
66
66
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-button.mjs","sources":["../../../projects/components/button/src/button/button.ts","../../../projects/components/button/src/button/button.html","../../../projects/components/button/ngstarter-ui-components-button.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n input,\n} from '@angular/core';\nimport { Ripple } from '@ngstarter-ui/components/core';\n\nexport type ButtonVariant = 'filled' | 'outlined' | 'text' | 'tonal' | '';\n\n@Component({\n selector: `\n button[ngsButton], button[ngsIconButton],\n a[ngsButton], a[ngsIconButton]\n `,\n exportAs: 'ngsButton',\n imports: [\n Ripple\n ],\n templateUrl: './button.html',\n styleUrl: './button.scss',\n host: {\n 'class': 'ngs-button',\n '[attr.disabled]': '((disabled() || loading()) && !disabledInteractive()) || null',\n '[class.ngs-button-disabled]': 'disabled() || loading()',\n '[class.ngs-button-loading]': 'loading()',\n '[class.ngs-button-primary]': 'ngsButton() === \"filled\"',\n '[class.ngs-button-outlined]': 'ngsButton() === \"outlined\"',\n '[class.ngs-button-text]': '(ngsButton() === \"text\" || ngsButton() === \"\") && ngsIconButton() !== undefined',\n '[class.ngs-button-tonal]': 'ngsButton() === \"tonal\"',\n '[class.ngs-icon-button]': 'ngsIconButton() !== undefined',\n '[class.is-reverse]': 'reverse()',\n '[class.hide-text-on-mobile]': 'hideTextOnMobile()',\n '[class.is-full-width]': 'fullWidth()',\n '[attr.aria-disabled]': '(disabled() || loading()).toString()',\n '(click)': '_haltDisabledEvents($event)',\n '[attr.tabindex]': '(disabled() || loading()) && disabledInteractive() ? 0 : null',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Button {\n readonly elementRef = inject(ElementRef);\n readonly _ripple = inject(Ripple, { optional: true });\n\n readonly ngsButton = input<ButtonVariant>('text');\n readonly ngsIconButton = input(undefined, { transform: booleanAttribute });\n readonly loading = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly disabledInteractive = input(false, { transform: booleanAttribute });\n readonly disableRipple = input(false, { transform: booleanAttribute });\n readonly reverse = input(false, { transform: booleanAttribute });\n readonly fullWidth = input(false, { transform: booleanAttribute });\n readonly hideTextOnMobile = input(false, { transform: booleanAttribute });\n\n constructor() {\n effect(() => {\n if (this._ripple) {\n this._ripple.disabled.set(this.disabled() || this.loading() || this.disableRipple());\n this._ripple.trigger.set(this.elementRef.nativeElement);\n this._ripple.centered.set(this.isIconButton);\n }\n });\n }\n\n /** Whether the button is an icon button. */\n get isIconButton(): boolean {\n return this.ngsIconButton() !== undefined;\n }\n\n _haltDisabledEvents(event: Event) {\n if (this.disabled() || this.loading()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n}\n","<span class=\"ripple\" ngsRipple></span>\n<span class=\"icon\">\n <ng-content select=\"ngs-icon\"/>\n</span>\n<span class=\"content\"><ng-content/></span>\n@if (loading()) {\n <svg class=\"ngs-button-loading-spinner\" viewBox=\"0 0 50 50\">\n <circle class=\"path\" cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke-width=\"5\"></circle>\n </svg>\n}\n<!--<div class=\"badge\"><ng-content select=\"ngs-badge\"/></div>-->\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MA2Ca,MAAM,CAAA;AACR,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAC/B,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE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A,oBAAA,EAAA,mBAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,yBAAA,EAAA,yBAAA,EAAA,wBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAuBG,MAAM,EAAA,UAAA,EAAA,CAAA;kBA9BlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA;;;AAGT,EAAA,CAAA,EAAA,QAAA,EACS,WAAW,EAAA,OAAA,EACZ;wBACP;qBACD,EAAA,IAAA,EAGK;AACJ,wBAAA,OAAO,EAAE,YAAY;AACrB,wBAAA,iBAAiB,EAAE,+DAA+D;AAClF,wBAAA,6BAA6B,EAAE,yBAAyB;AACxD,wBAAA,4BAA4B,EAAE,WAAW;AACzC,wBAAA,4BAA4B,EAAE,0BAA0B;AACxD,wBAAA,6BAA6B,EAAE,4BAA4B;AAC3D,wBAAA,yBAAyB,EAAE,iFAAiF;AAC5G,wBAAA,0BAA0B,EAAE,yBAAyB;AACrD,wBAAA,yBAAyB,EAAE,+BAA+B;AAC1D,wBAAA,oBAAoB,EAAE,WAAW;AACjC,wBAAA,6BAA6B,EAAE,oBAAoB;AACnD,wBAAA,uBAAuB,EAAE,aAAa;AACtC,wBAAA,sBAAsB,EAAE,sCAAsC;AAC9D,wBAAA,SAAS,EAAE,6BAA6B;AACxC,wBAAA,iBAAiB,EAAE,+DAA+D;qBACnF,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6aAAA,EAAA,MAAA,EAAA,CAAA,08JAAA,CAAA,EAAA;;;AEzCjD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-button.mjs","sources":["../../../projects/components/button/src/button/button.ts","../../../projects/components/button/src/button/button.html","../../../projects/components/button/ngstarter-ui-components-button.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n input,\n} from '@angular/core';\nimport { Ripple } from '@ngstarter-ui/components/core';\n\nexport type ButtonVariant = 'filled' | 'outlined' | 'text' | 'tonal' | '';\n\n@Component({\n selector: `\n button[ngsButton], button[ngsIconButton],\n a[ngsButton], a[ngsIconButton]\n `,\n exportAs: 'ngsButton',\n imports: [\n Ripple\n ],\n templateUrl: './button.html',\n styleUrl: './button.scss',\n host: {\n 'class': 'ngs-button',\n '[attr.disabled]': '((disabled() || loading()) && !disabledInteractive()) || null',\n '[class.ngs-button-disabled]': 'disabled() || loading()',\n '[class.ngs-button-loading]': 'loading()',\n '[class.ngs-button-primary]': 'ngsButton() === \"filled\"',\n '[class.ngs-button-outlined]': 'ngsButton() === \"outlined\"',\n '[class.ngs-button-text]': '(ngsButton() === \"text\" || ngsButton() === \"\") && ngsIconButton() !== undefined',\n '[class.ngs-button-tonal]': 'ngsButton() === \"tonal\"',\n '[class.ngs-icon-button]': 'ngsIconButton() !== undefined',\n '[class.is-reverse]': 'reverse()',\n '[class.hide-text-on-mobile]': 'hideTextOnMobile()',\n '[class.is-full-width]': 'fullWidth()',\n '[attr.aria-disabled]': '(disabled() || loading()).toString()',\n '(click)': '_haltDisabledEvents($event)',\n '[attr.tabindex]': '(disabled() || loading()) && disabledInteractive() ? 0 : null',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Button {\n readonly elementRef = inject(ElementRef);\n readonly _ripple = inject(Ripple, { optional: true });\n\n readonly ngsButton = input<ButtonVariant>('text');\n readonly ngsIconButton = input(undefined, { transform: booleanAttribute });\n readonly loading = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly disabledInteractive = input(false, { transform: booleanAttribute });\n readonly disableRipple = input(false, { transform: booleanAttribute });\n readonly reverse = input(false, { transform: booleanAttribute });\n readonly fullWidth = input(false, { transform: booleanAttribute });\n readonly hideTextOnMobile = input(false, { transform: booleanAttribute });\n\n constructor() {\n effect(() => {\n if (this._ripple) {\n this._ripple.disabled.set(this.disabled() || this.loading() || this.disableRipple());\n this._ripple.trigger.set(this.elementRef.nativeElement);\n this._ripple.centered.set(this.isIconButton);\n }\n });\n }\n\n /** Whether the button is an icon button. */\n get isIconButton(): boolean {\n return this.ngsIconButton() !== undefined;\n }\n\n _haltDisabledEvents(event: Event) {\n if (this.disabled() || this.loading()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n}\n","<span class=\"ripple\" ngsRipple></span>\n<span class=\"icon\">\n <ng-content select=\"ngs-icon\"/>\n</span>\n<span class=\"content\"><ng-content/></span>\n@if (loading()) {\n <svg class=\"ngs-button-loading-spinner\" viewBox=\"0 0 50 50\">\n <circle class=\"path\" cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke-width=\"5\"></circle>\n </svg>\n}\n<!--<div class=\"badge\"><ng-content select=\"ngs-badge\"/></div>-->\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MA2Ca,MAAM,CAAA;AACR,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAC/B,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAE5C,SAAS,GAAG,KAAK,CAAgB,MAAM;kFAAC;IACxC,aAAa,GAAG,KAAK,CAAC,SAAS,qFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACjE,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACvD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,mBAAmB,GAAG,KAAK,CAAC,KAAK,2FAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACnE,aAAa,GAAG,KAAK,CAAC,KAAK,qFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAC7D,OAAO,GAA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BAAA,6BAA6B,EAAE,yBAAyB;AACxD,wBAAA,4BAA4B,EAAE,WAAW;AACzC,wBAAA,4BAA4B,EAAE,0BAA0B;AACxD,wBAAA,6BAA6B,EAAE,4BAA4B;AAC3D,wBAAA,yBAAyB,EAAE,iFAAiF;AAC5G,wBAAA,0BAA0B,EAAE,yBAAyB;AACrD,wBAAA,yBAAyB,EAAE,+BAA+B;AAC1D,wBAAA,oBAAoB,EAAE,WAAW;AACjC,wBAAA,6BAA6B,EAAE,oBAAoB;AACnD,wBAAA,uBAAuB,EAAE,aAAa;AACtC,wBAAA,sBAAsB,EAAE,sCAAsC;AAC9D,wBAAA,SAAS,EAAE,6BAA6B;AACxC,wBAAA,iBAAiB,EAAE,+DAA+D;qBACnF,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6aAAA,EAAA,MAAA,EAAA,CAAA,87JAAA,CAAA,EAAA;;;AEzCjD;;AAEG;;;;"}
@@ -0,0 +1,35 @@
1
+ import * as i0 from '@angular/core';
2
+ import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { UploadArea, UploadTriggerDirective } from '@ngstarter-ui/components/upload';
4
+ import { Button } from '@ngstarter-ui/components/button';
5
+ import { Icon } from '@ngstarter-ui/components/icon';
6
+ import { FormField, Label } from '@ngstarter-ui/components/form-field';
7
+ import { Input } from '@ngstarter-ui/components/input';
8
+ import { f as ContentEditorUploadBlockBase, h as contentEditorFileSize, i as contentEditorResourceUrl } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs';
9
+ import { C as ContentEditorUploadStatus } from './ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs';
10
+
11
+ class ContentEditorAttachmentBlock extends ContentEditorUploadBlockBase {
12
+ sizeLabel = computed(() => contentEditorFileSize(this.content().size), /* @ts-ignore */
13
+ ...(ngDevMode ? [{ debugName: "sizeLabel" }] : /* istanbul ignore next */ []));
14
+ href = computed(() => contentEditorResourceUrl(this.content().url), /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
16
+ changeName(event) { this.save({ ...this.latestContent(), name: event.target.value }); }
17
+ async upload(event) {
18
+ const file = event.files[0];
19
+ if (!file)
20
+ return;
21
+ await this.uploadFiles('attachment', { files: [file], apply: results => {
22
+ const { url, file } = results[0];
23
+ this.save({ url, name: file.name, size: file.size, mimeType: file.type });
24
+ } });
25
+ }
26
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorAttachmentBlock, deps: null, target: i0.ɵɵFactoryTarget.Component });
27
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorAttachmentBlock, isStandalone: true, selector: "ngs-content-editor-attachment-block", usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col gap-3\">\n @if (href()) {\n <div class=\"flex items-center gap-3\">\n <ngs-icon name=\"fluent:document-24-regular\"/>\n <div class=\"min-w-0 flex-1\"><div class=\"truncate\">{{content().name}}</div><div class=\"text-xs\">{{sizeLabel()}} \u00B7 {{content().mimeType}}</div></div>\n <a ngsButton [href]=\"href()\" [attr.download]=\"content().name\" target=\"_blank\" rel=\"noopener noreferrer\">Download</a>\n </div>\n <ngs-form-field><ngs-label>File name</ngs-label><input ngsInput [value]=\"content().name\" (input)=\"changeName($event)\"></ngs-form-field>\n }\n <ngs-content-editor-upload-status [task]=\"uploadTask\"/>\n @if (!uploading()) {\n <ngs-upload-area ngsUploadTrigger [multiple]=\"false\" (fileSelected)=\"upload($event)\">\n {{href() ? 'Click or drop a file to replace it' : 'Click or drop a file to attach it'}}\n </ngs-upload-area>\n }\n</div>\n", dependencies: [{ kind: "component", type: ContentEditorUploadStatus, selector: "ngs-content-editor-upload-status", inputs: ["task"] }, { kind: "component", type: UploadArea, selector: "ngs-upload-area", inputs: ["accept", "allowHover", "multiple"], outputs: ["fileSelected"], exportAs: ["ngsUploadArea"] }, { kind: "directive", type: UploadTriggerDirective, selector: "[ngsUploadTrigger]", inputs: ["accept", "multiple"], outputs: ["fileSelected"], exportAs: ["ngsUploadTrigger"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["labelMode", "subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorAttachmentBlock, decorators: [{
30
+ type: Component,
31
+ args: [{ selector: 'ngs-content-editor-attachment-block', imports: [ContentEditorUploadStatus, UploadArea, UploadTriggerDirective, Button, Icon, FormField, Label, Input], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col gap-3\">\n @if (href()) {\n <div class=\"flex items-center gap-3\">\n <ngs-icon name=\"fluent:document-24-regular\"/>\n <div class=\"min-w-0 flex-1\"><div class=\"truncate\">{{content().name}}</div><div class=\"text-xs\">{{sizeLabel()}} \u00B7 {{content().mimeType}}</div></div>\n <a ngsButton [href]=\"href()\" [attr.download]=\"content().name\" target=\"_blank\" rel=\"noopener noreferrer\">Download</a>\n </div>\n <ngs-form-field><ngs-label>File name</ngs-label><input ngsInput [value]=\"content().name\" (input)=\"changeName($event)\"></ngs-form-field>\n }\n <ngs-content-editor-upload-status [task]=\"uploadTask\"/>\n @if (!uploading()) {\n <ngs-upload-area ngsUploadTrigger [multiple]=\"false\" (fileSelected)=\"upload($event)\">\n {{href() ? 'Click or drop a file to replace it' : 'Click or drop a file to attach it'}}\n </ngs-upload-area>\n }\n</div>\n" }]
32
+ }] });
33
+
34
+ export { ContentEditorAttachmentBlock };
35
+ //# sourceMappingURL=ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs","sources":["../../../projects/components/content-editor/src/_builder/attachment-block/attachment-block.ts","../../../projects/components/content-editor/src/_builder/attachment-block/attachment-block.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed } from '@angular/core';\nimport { UploadArea, UploadTriggerDirective, UploadFileSelectedEvent } from '@ngstarter-ui/components/upload';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { Icon } from '@ngstarter-ui/components/icon';\nimport { FormField, Label } from '@ngstarter-ui/components/form-field';\nimport { Input } from '@ngstarter-ui/components/input';\nimport { ContentEditorUploadBlockBase } from '../upload-block-base';\nimport { ContentEditorAttachmentContent } from '../../types';\nimport { ContentEditorUploadStatus } from '../upload-status/upload-status';\nimport { contentEditorFileSize, contentEditorResourceUrl } from '../../upload';\n\n@Component({\n selector: 'ngs-content-editor-attachment-block',\n imports: [ContentEditorUploadStatus, UploadArea, UploadTriggerDirective, Button, Icon, FormField, Label, Input],\n templateUrl: './attachment-block.html', changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ContentEditorAttachmentBlock extends ContentEditorUploadBlockBase<ContentEditorAttachmentContent> {\n readonly sizeLabel = computed(() => contentEditorFileSize(this.content().size));\n readonly href = computed(() => contentEditorResourceUrl(this.content().url));\n changeName(event: Event): void { this.save({ ...this.latestContent(), name: (event.target as HTMLInputElement).value }); }\n async upload(event: UploadFileSelectedEvent): Promise<void> {\n const file = event.files[0];\n if (!file) return;\n await this.uploadFiles('attachment', { files: [file], apply: results => {\n const { url, file } = results[0];\n this.save({ url, name: file.name, size: file.size, mimeType: file.type });\n } });\n }\n}\n","<div class=\"flex flex-col gap-3\">\n @if (href()) {\n <div class=\"flex items-center gap-3\">\n <ngs-icon name=\"fluent:document-24-regular\"/>\n <div class=\"min-w-0 flex-1\"><div class=\"truncate\">{{content().name}}</div><div class=\"text-xs\">{{sizeLabel()}} · {{content().mimeType}}</div></div>\n <a ngsButton [href]=\"href()\" [attr.download]=\"content().name\" target=\"_blank\" rel=\"noopener noreferrer\">Download</a>\n </div>\n <ngs-form-field><ngs-label>File name</ngs-label><input ngsInput [value]=\"content().name\" (input)=\"changeName($event)\"></ngs-form-field>\n }\n <ngs-content-editor-upload-status [task]=\"uploadTask\"/>\n @if (!uploading()) {\n <ngs-upload-area ngsUploadTrigger [multiple]=\"false\" (fileSelected)=\"upload($event)\">\n {{href() ? 'Click or drop a file to replace it' : 'Click or drop a file to attach it'}}\n </ngs-upload-area>\n }\n</div>\n"],"names":[],"mappings":";;;;;;;;;;AAgBM,MAAO,4BAA6B,SAAQ,4BAA4D,CAAA;AACnG,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,qBAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC;kFAAC;AACtE,IAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,wBAAwB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC;6EAAC;IAC5E,UAAU,CAAC,KAAY,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAG,KAAK,CAAC,MAA2B,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACzH,MAAM,MAAM,CAAC,KAA8B,EAAA;QACzC,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3B,QAAA,IAAI,CAAC,IAAI;YAAE;AACX,QAAA,MAAM,IAAI,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AAM,0SAAE,IAAI,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,SAAS,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,wBAAA,EAAA,oBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,KAAK,sDAAE,KAAK,EAAA,QAAA,EAAA,qCAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,aAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAGnG,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBALxC,SAAS;+BACE,qCAAqC,EAAA,OAAA,EACtC,CAAC,yBAAyB,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,EAAA,eAAA,EACtD,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,i6BAAA,EAAA;;;;;"}
@@ -4,8 +4,7 @@ import { Alert, AlertIconDirective, AlertActionDirective } from '@ngstarter-ui/c
4
4
  import { Icon } from '@ngstarter-ui/components/icon';
5
5
  import { Button } from '@ngstarter-ui/components/button';
6
6
  import { Menu, MenuItem, MenuTrigger } from '@ngstarter-ui/components/menu';
7
- import { C as ContentEditorBlockBase } from './ngstarter-ui-components-content-editor-block-base-C46lyMrp.mjs';
8
- import { d as ContentEditorContentEditableDirective } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs';
7
+ import { g as ContentEditorBlockBase, d as ContentEditorContentEditableDirective } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs';
9
8
 
10
9
  class ContentEditorCalloutBlock extends ContentEditorBlockBase {
11
10
  variants = ['note', 'tip', 'warning', 'danger'];
@@ -16,7 +15,7 @@ class ContentEditorCalloutBlock extends ContentEditorBlockBase {
16
15
  changeVariant(variant) { this.save(this.content(), { ...this.settings(), variant }); }
17
16
  changeText(content) { this.save(content); }
18
17
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorCalloutBlock, deps: null, target: i0.ɵɵFactoryTarget.Component });
19
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorCalloutBlock, isStandalone: true, selector: "ngs-content-editor-callout-block", usesInheritance: true, ngImport: i0, template: "<ngs-alert [variant]=\"appearance()\" [class.settings-open]=\"settingsTrigger.menuOpen()\">\n <ng-template ngsAlertIcon><ngs-icon [name]=\"icon()\"/></ng-template>\n <div class=\"min-w-0 break-words outline-none\" [ngsContentEditorContentEditable]=\"content()\" [props]=\"props()\"\n (propsChanged)=\"store.updateBlock(id(), {props: $event})\" (contentChanged)=\"changeText($event)\" data-empty-placeholder=\"Write a note\u2026\"></div>\n <button ngsIconButton ngsAlertAction [ngsMenuTriggerFor]=\"variantMenu\" #settingsTrigger=\"ngsMenuTrigger\"\n aria-label=\"Callout style\"><ngs-icon name=\"fluent:more-horizontal-24-regular\"/></button>\n</ngs-alert>\n<ngs-menu #variantMenu>\n @for (variant of variants; track variant) { <button ngs-menu-item (click)=\"changeVariant(variant)\">{{variant}}</button> }\n</ngs-menu>\n", styles: [":host{display:block;min-width:0}:host ngs-alert ::ng-deep>.content{flex:1;min-width:0}:host ngs-alert button[ngsAlertAction]{--ngs-button-height: calc(var(--spacing, .25rem) * 8);--ngs-button-color: inherit;opacity:0;pointer-events:none}:host ngs-alert:hover button[ngsAlertAction],:host ngs-alert:focus-within button[ngsAlertAction],:host ngs-alert.settings-open button[ngsAlertAction]{opacity:1;pointer-events:auto}@media(hover:none){:host ngs-alert button[ngsAlertAction]{opacity:1;pointer-events:auto}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Alert, selector: "ngs-alert", inputs: ["autoClose", "bordered", "variant"], outputs: ["closed"], exportAs: ["ngsAlert"] }, { kind: "directive", type: AlertIconDirective, selector: "[ngsAlertIcon]", exportAs: ["ngsAlertIcon"] }, { kind: "directive", type: AlertActionDirective, selector: "[ngsAlertAction]", exportAs: ["ngsAlertAction"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "directive", type: ContentEditorContentEditableDirective, selector: "[ngsContentEditorContentEditable]", inputs: ["ngsContentEditorContentEditable", "settings", "props", "singleLine"], outputs: ["contentChanged", "propsChanged", "pressedEnter", "initialized"], exportAs: ["ngsContentEditorContentEditable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
18
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorCalloutBlock, isStandalone: true, selector: "ngs-content-editor-callout-block", usesInheritance: true, ngImport: i0, template: "<ngs-alert [variant]=\"appearance()\" [class.settings-open]=\"settingsTrigger.menuOpen()\">\n <ng-template ngsAlertIcon><ngs-icon [name]=\"icon()\"/></ng-template>\n <div class=\"min-w-0 break-words outline-none\" [ngsContentEditorContentEditable]=\"content()\" [props]=\"props()\"\n (propsChanged)=\"store.updateBlock(id(), {props: $event})\" (contentChanged)=\"changeText($event)\" data-empty-placeholder=\"Write a note\u2026\"></div>\n <button ngsIconButton ngsAlertAction [ngsMenuTriggerFor]=\"variantMenu\" #settingsTrigger=\"ngsMenuTrigger\"\n aria-label=\"Callout style\"><ngs-icon name=\"fluent:more-horizontal-24-regular\"/></button>\n</ngs-alert>\n<ngs-menu #variantMenu>\n @for (variant of variants; track variant) { <button ngs-menu-item (click)=\"changeVariant(variant)\">{{variant}}</button> }\n</ngs-menu>\n", styles: [":host{display:block;min-width:0}:host ngs-alert ::ng-deep>.content{flex:1;min-width:0}:host ngs-alert button[ngsAlertAction]{--ngs-button-height: calc(var(--spacing, .25rem) * 8);--ngs-button-color: inherit;opacity:0;pointer-events:none}:host ngs-alert:hover button[ngsAlertAction],:host ngs-alert:focus-within button[ngsAlertAction],:host ngs-alert.settings-open button[ngsAlertAction]{opacity:1;pointer-events:auto}@media(hover:none){:host ngs-alert button[ngsAlertAction]{opacity:1;pointer-events:auto}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Alert, selector: "ngs-alert", inputs: ["autoClose", "bordered", "variant"], outputs: ["closed"], exportAs: ["ngsAlert"] }, { kind: "directive", type: AlertIconDirective, selector: "[ngsAlertIcon]", exportAs: ["ngsAlertIcon"] }, { kind: "directive", type: AlertActionDirective, selector: "[ngsAlertAction]", exportAs: ["ngsAlertAction"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["themeSource", "role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "directive", type: ContentEditorContentEditableDirective, selector: "[ngsContentEditorContentEditable]", inputs: ["ngsContentEditorContentEditable", "settings", "props", "singleLine"], outputs: ["contentChanged", "propsChanged", "pressedEnter", "initialized"], exportAs: ["ngsContentEditorContentEditable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
20
19
  }
21
20
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorCalloutBlock, decorators: [{
22
21
  type: Component,
@@ -24,4 +23,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
24
23
  }] });
25
24
 
26
25
  export { ContentEditorCalloutBlock };
27
- //# sourceMappingURL=ngstarter-ui-components-content-editor-callout-block-Jbf8h2yz.mjs.map
26
+ //# sourceMappingURL=ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-content-editor-callout-block-Jbf8h2yz.mjs","sources":["../../../projects/components/content-editor/src/_builder/callout-block/callout-block.ts","../../../projects/components/content-editor/src/_builder/callout-block/callout-block.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed } from '@angular/core';\nimport { Alert, AlertIconDirective, AlertActionDirective } from '@ngstarter-ui/components/alert';\nimport { Icon } from '@ngstarter-ui/components/icon';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { Menu, MenuItem, MenuTrigger } from '@ngstarter-ui/components/menu';\nimport { ContentEditorBlockBase } from '../block-base';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentEditorCalloutSettings, ContentEditorCalloutVariant, ContentEditorText } from '../../types';\n\n@Component({\n selector: 'ngs-content-editor-callout-block',\n imports: [Alert, AlertIconDirective, AlertActionDirective, Icon, Button, Menu, MenuItem, MenuTrigger, ContentEditorContentEditableDirective],\n templateUrl: './callout-block.html', styleUrl: './callout-block.scss', changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ContentEditorCalloutBlock extends ContentEditorBlockBase<ContentEditorText, ContentEditorCalloutSettings> {\n readonly variants: ContentEditorCalloutVariant[] = ['note', 'tip', 'warning', 'danger'];\n readonly appearance = computed(() => ({ note: 'informative', tip: 'positive', warning: 'notice', danger: 'negative' })[this.settings().variant] ?? 'informative');\n readonly icon = computed(() => ({ note: 'fluent:info-24-regular', tip: 'fluent:lightbulb-24-regular', warning: 'fluent:warning-24-regular', danger: 'fluent:error-circle-24-regular' })[this.settings().variant] ?? 'fluent:info-24-regular');\n changeVariant(variant: ContentEditorCalloutVariant): void { this.save(this.content(), { ...this.settings(), variant }); }\n changeText(content: ContentEditorText): void { this.save(content); }\n}\n","<ngs-alert [variant]=\"appearance()\" [class.settings-open]=\"settingsTrigger.menuOpen()\">\n <ng-template ngsAlertIcon><ngs-icon [name]=\"icon()\"/></ng-template>\n <div class=\"min-w-0 break-words outline-none\" [ngsContentEditorContentEditable]=\"content()\" [props]=\"props()\"\n (propsChanged)=\"store.updateBlock(id(), {props: $event})\" (contentChanged)=\"changeText($event)\" data-empty-placeholder=\"Write a note…\"></div>\n <button ngsIconButton ngsAlertAction [ngsMenuTriggerFor]=\"variantMenu\" #settingsTrigger=\"ngsMenuTrigger\"\n aria-label=\"Callout style\"><ngs-icon name=\"fluent:more-horizontal-24-regular\"/></button>\n</ngs-alert>\n<ngs-menu #variantMenu>\n @for (variant of variants; track variant) { <button ngs-menu-item (click)=\"changeVariant(variant)\">{{variant}}</button> }\n</ngs-menu>\n"],"names":[],"mappings":";;;;;;;;;AAcM,MAAO,yBAA0B,SAAQ,sBAAuE,CAAA;IAC3G,QAAQ,GAAkC,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC9E,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,aAAa;mFAAC;AACxJ,IAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,GAAG,EAAE,6BAA6B,EAAE,OAAO,EAAE,2BAA2B,EAAE,MAAM,EAAE,gCAAgC,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,wBAAwB;6EAAC;IAC7O,aAAa,CAAC,OAAoC,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IACxH,UAAU,CAAC,OAA0B,EAAA,EAAU,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;uGALxD,yBAAyB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAA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AAA,EAAA,WAAA,EAAA,IAAA,EAAE,WAAW,qQAAE,qCAAqC,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,CAAA,iCAAA,EAAA,UAAA,EAAA,OAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,cAAA,EAAA,cAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,iCAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAGhI,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBALrC,SAAS;+BACE,kCAAkC,EAAA,OAAA,EACnC,CAAC,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qCAAqC,CAAC,EAAA,eAAA,EACpD,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,k0BAAA,EAAA,MAAA,EAAA,CAAA,ikBAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs","sources":["../../../projects/components/content-editor/src/_builder/callout-block/callout-block.ts","../../../projects/components/content-editor/src/_builder/callout-block/callout-block.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed } from '@angular/core';\nimport { Alert, AlertIconDirective, AlertActionDirective } from '@ngstarter-ui/components/alert';\nimport { Icon } from '@ngstarter-ui/components/icon';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { Menu, MenuItem, MenuTrigger } from '@ngstarter-ui/components/menu';\nimport { ContentEditorBlockBase } from '../block-base';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentEditorCalloutSettings, ContentEditorCalloutVariant, ContentEditorText } from '../../types';\n\n@Component({\n selector: 'ngs-content-editor-callout-block',\n imports: [Alert, AlertIconDirective, AlertActionDirective, Icon, Button, Menu, MenuItem, MenuTrigger, ContentEditorContentEditableDirective],\n templateUrl: './callout-block.html', styleUrl: './callout-block.scss', changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ContentEditorCalloutBlock extends ContentEditorBlockBase<ContentEditorText, ContentEditorCalloutSettings> {\n readonly variants: ContentEditorCalloutVariant[] = ['note', 'tip', 'warning', 'danger'];\n readonly appearance = computed(() => ({ note: 'informative', tip: 'positive', warning: 'notice', danger: 'negative' })[this.settings().variant] ?? 'informative');\n readonly icon = computed(() => ({ note: 'fluent:info-24-regular', tip: 'fluent:lightbulb-24-regular', warning: 'fluent:warning-24-regular', danger: 'fluent:error-circle-24-regular' })[this.settings().variant] ?? 'fluent:info-24-regular');\n changeVariant(variant: ContentEditorCalloutVariant): void { this.save(this.content(), { ...this.settings(), variant }); }\n changeText(content: ContentEditorText): void { this.save(content); }\n}\n","<ngs-alert [variant]=\"appearance()\" [class.settings-open]=\"settingsTrigger.menuOpen()\">\n <ng-template ngsAlertIcon><ngs-icon [name]=\"icon()\"/></ng-template>\n <div class=\"min-w-0 break-words outline-none\" [ngsContentEditorContentEditable]=\"content()\" [props]=\"props()\"\n (propsChanged)=\"store.updateBlock(id(), {props: $event})\" (contentChanged)=\"changeText($event)\" data-empty-placeholder=\"Write a note…\"></div>\n <button ngsIconButton ngsAlertAction [ngsMenuTriggerFor]=\"variantMenu\" #settingsTrigger=\"ngsMenuTrigger\"\n aria-label=\"Callout style\"><ngs-icon name=\"fluent:more-horizontal-24-regular\"/></button>\n</ngs-alert>\n<ngs-menu #variantMenu>\n @for (variant of variants; track variant) { <button ngs-menu-item (click)=\"changeVariant(variant)\">{{variant}}</button> }\n</ngs-menu>\n"],"names":[],"mappings":";;;;;;;;AAcM,MAAO,yBAA0B,SAAQ,sBAAuE,CAAA;IAC3G,QAAQ,GAAkC,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC9E,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,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E,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qCAAqC,CAAC,EAAA,eAAA,EACpD,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,k0BAAA,EAAA,MAAA,EAAA,CAAA,ikBAAA,CAAA,EAAA;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { createNgsHeadlessEditorText } from '@ngstarter-ui/components/headless-editor';
2
- import { C as ContentBuilderStore, a as CONTENT_BUILDER, b as contentEditorText, e as CONTENT_EDITOR_BLOCK } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CK4ssnlk.mjs';
2
+ import { C as ContentBuilderStore, a as CONTENT_BUILDER, b as contentEditorText, e as CONTENT_EDITOR_BLOCK } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs';
3
3
  import * as i0 from '@angular/core';
4
4
  import { inject, DestroyRef, viewChild, input, signal, effect, untracked, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -194,7 +194,7 @@ class CodeBlockComponent {
194
194
  useExisting: forwardRef(() => CodeBlockComponent),
195
195
  multi: true
196
196
  }
197
- ], viewQueries: [{ propertyName: "_contentRef", first: true, predicate: ["contentRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"bg-surface-container rounded-xl\">\n <div class=\"border-b border-b-default h-12 header\">\n <button ngsButton [ngsMenuTriggerFor]=\"languageListMenu\" class=\"-ms-2\">{{ _language().name }}</button>\n </div>\n <div class=\"content\">\n <div class=\"content-code\" #contentRef></div>\n </div>\n</div>\n\n<ngs-menu #languageListMenu=\"ngsMenu\">\n @for (languageItem of _languageList(); track $index) {\n <button ngs-menu-item (click)=\"selectLanguage(languageItem)\"\n class=\"[&.is-active]:!bg-secondary-fixed\"\n [class.is-active]=\"languageItem.language === _language().language\">{{ languageItem.name }}</button>\n }\n</ngs-menu>\n", styles: [":host{display:block;margin:calc(var(--spacing, .25rem) * 3) 0}:host .header{display:flex;align-items:center;padding:0 calc(var(--spacing, .25rem) * 4)}:host .language-trigger{font-size:var(--text-sm);cursor:pointer}:host .content{outline:none;font-size:var(--text-sm);padding:calc(var(--spacing, .25rem) * 2);min-width:0}:host .content .content-code{min-width:0}:host .content .content-code ::ng-deep .cm-editor{border-radius:var(--ngs-radius-lg)}:host .content .content-code ::ng-deep .cm-scroller{border-radius:var(--ngs-radius-lg);overflow-x:auto}:host .content .content-code ::ng-deep .cm-content,:host .content .content-code ::ng-deep .cm-gutter{min-height:160px}:host-context(.block.is-active) .content:empty:before,:host-context(.block.is-focused) .content:empty:before{content:attr(data-empty-placeholder);color:var(--ngs-color-neutral-500)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Menu, selector: "ngs-menu", inputs: ["role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
197
+ ], viewQueries: [{ propertyName: "_contentRef", first: true, predicate: ["contentRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"bg-surface-container rounded-xl\">\n <div class=\"border-b border-b-default h-12 header\">\n <button ngsButton [ngsMenuTriggerFor]=\"languageListMenu\" class=\"-ms-2\">{{ _language().name }}</button>\n </div>\n <div class=\"content\">\n <div class=\"content-code\" #contentRef></div>\n </div>\n</div>\n\n<ngs-menu #languageListMenu=\"ngsMenu\">\n @for (languageItem of _languageList(); track $index) {\n <button ngs-menu-item (click)=\"selectLanguage(languageItem)\"\n class=\"[&.is-active]:!bg-secondary-fixed\"\n [class.is-active]=\"languageItem.language === _language().language\">{{ languageItem.name }}</button>\n }\n</ngs-menu>\n", styles: [":host{display:block;margin:calc(var(--spacing, .25rem) * 3) 0}:host .header{display:flex;align-items:center;padding:0 calc(var(--spacing, .25rem) * 4)}:host .language-trigger{font-size:var(--text-sm);cursor:pointer}:host .content{outline:none;font-size:var(--text-sm);padding:calc(var(--spacing, .25rem) * 2);min-width:0}:host .content .content-code{min-width:0}:host .content .content-code ::ng-deep .cm-editor{border-radius:var(--ngs-radius-lg)}:host .content .content-code ::ng-deep .cm-scroller{border-radius:var(--ngs-radius-lg);overflow-x:auto}:host .content .content-code ::ng-deep .cm-content,:host .content .content-code ::ng-deep .cm-gutter{min-height:160px}:host-context(.block.is-active) .content:empty:before,:host-context(.block.is-focused) .content:empty:before{content:attr(data-empty-placeholder);color:var(--ngs-content-editor-placeholder-color, var(--ngs-color-on-surface-variant))}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Menu, selector: "ngs-menu", inputs: ["themeSource", "role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
198
198
  }
199
199
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CodeBlockComponent, decorators: [{
200
200
  type: Component,
@@ -211,8 +211,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
211
211
  }
212
212
  ], host: {
213
213
  'class': 'ngs-code-block',
214
- }, template: "<div class=\"bg-surface-container rounded-xl\">\n <div class=\"border-b border-b-default h-12 header\">\n <button ngsButton [ngsMenuTriggerFor]=\"languageListMenu\" class=\"-ms-2\">{{ _language().name }}</button>\n </div>\n <div class=\"content\">\n <div class=\"content-code\" #contentRef></div>\n </div>\n</div>\n\n<ngs-menu #languageListMenu=\"ngsMenu\">\n @for (languageItem of _languageList(); track $index) {\n <button ngs-menu-item (click)=\"selectLanguage(languageItem)\"\n class=\"[&.is-active]:!bg-secondary-fixed\"\n [class.is-active]=\"languageItem.language === _language().language\">{{ languageItem.name }}</button>\n }\n</ngs-menu>\n", styles: [":host{display:block;margin:calc(var(--spacing, .25rem) * 3) 0}:host .header{display:flex;align-items:center;padding:0 calc(var(--spacing, .25rem) * 4)}:host .language-trigger{font-size:var(--text-sm);cursor:pointer}:host .content{outline:none;font-size:var(--text-sm);padding:calc(var(--spacing, .25rem) * 2);min-width:0}:host .content .content-code{min-width:0}:host .content .content-code ::ng-deep .cm-editor{border-radius:var(--ngs-radius-lg)}:host .content .content-code ::ng-deep .cm-scroller{border-radius:var(--ngs-radius-lg);overflow-x:auto}:host .content .content-code ::ng-deep .cm-content,:host .content .content-code ::ng-deep .cm-gutter{min-height:160px}:host-context(.block.is-active) .content:empty:before,:host-context(.block.is-focused) .content:empty:before{content:attr(data-empty-placeholder);color:var(--ngs-color-neutral-500)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
214
+ }, template: "<div class=\"bg-surface-container rounded-xl\">\n <div class=\"border-b border-b-default h-12 header\">\n <button ngsButton [ngsMenuTriggerFor]=\"languageListMenu\" class=\"-ms-2\">{{ _language().name }}</button>\n </div>\n <div class=\"content\">\n <div class=\"content-code\" #contentRef></div>\n </div>\n</div>\n\n<ngs-menu #languageListMenu=\"ngsMenu\">\n @for (languageItem of _languageList(); track $index) {\n <button ngs-menu-item (click)=\"selectLanguage(languageItem)\"\n class=\"[&.is-active]:!bg-secondary-fixed\"\n [class.is-active]=\"languageItem.language === _language().language\">{{ languageItem.name }}</button>\n }\n</ngs-menu>\n", styles: [":host{display:block;margin:calc(var(--spacing, .25rem) * 3) 0}:host .header{display:flex;align-items:center;padding:0 calc(var(--spacing, .25rem) * 4)}:host .language-trigger{font-size:var(--text-sm);cursor:pointer}:host .content{outline:none;font-size:var(--text-sm);padding:calc(var(--spacing, .25rem) * 2);min-width:0}:host .content .content-code{min-width:0}:host .content .content-code ::ng-deep .cm-editor{border-radius:var(--ngs-radius-lg)}:host .content .content-code ::ng-deep .cm-scroller{border-radius:var(--ngs-radius-lg);overflow-x:auto}:host .content .content-code ::ng-deep .cm-content,:host .content .content-code ::ng-deep .cm-gutter{min-height:160px}:host-context(.block.is-active) .content:empty:before,:host-context(.block.is-focused) .content:empty:before{content:attr(data-empty-placeholder);color:var(--ngs-content-editor-placeholder-color, var(--ngs-color-on-surface-variant))}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
215
215
  }], ctorParameters: () => [], propDecorators: { _contentRef: [{ type: i0.ViewChild, args: ['contentRef', { isSignal: true }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: true }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }] } });
216
216
 
217
217
  export { CodeBlockComponent };
218
- //# sourceMappingURL=ngstarter-ui-components-content-editor-code-block.component-BizHRPdC.mjs.map
218
+ //# sourceMappingURL=ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs.map