@memberjunction/ng-ui-components 6.2.0-edge.2 → 6.2.0-edge.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,362 @@
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, Output, ViewChild, forwardRef, inject, } from '@angular/core';
2
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import { OverlayModule } from '@angular/cdk/overlay';
4
+ import { DEFAULT_ICON_STYLE, ICON_RESULT_LIMIT, IconNameOf, MatchIcons, NormalizeIconClass, } from './font-awesome-icons';
5
+ import { IconCatalogueService } from './icon-catalogue.service';
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@angular/cdk/overlay";
8
+ const _c0 = ["search"];
9
+ const _c1 = ["browse"];
10
+ const _forTrack0 = ($index, $item) => $item.Name;
11
+ function MjIconPickerComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
12
+ i0.ɵɵelement(0, "i");
13
+ } if (rf & 2) {
14
+ const ctx_r0 = i0.ɵɵnextContext();
15
+ i0.ɵɵclassMap(ctx_r0.Preview);
16
+ } }
17
+ function MjIconPickerComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
18
+ i0.ɵɵelement(0, "i", 6);
19
+ } }
20
+ function MjIconPickerComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
21
+ const _r2 = i0.ɵɵgetCurrentView();
22
+ i0.ɵɵelementStart(0, "button", 12);
23
+ i0.ɵɵlistener("click", function MjIconPickerComponent_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.Clear()); });
24
+ i0.ɵɵelement(1, "i", 13);
25
+ i0.ɵɵelementEnd();
26
+ } if (rf & 2) {
27
+ const ctx_r0 = i0.ɵɵnextContext();
28
+ i0.ɵɵproperty("disabled", ctx_r0.Disabled);
29
+ } }
30
+ function MjIconPickerComponent_ng_template_10_Conditional_3_Template(rf, ctx) { if (rf & 1) {
31
+ i0.ɵɵelementStart(0, "p", 16);
32
+ i0.ɵɵtext(1, "Reading the icons this page can draw\u2026");
33
+ i0.ɵɵelementEnd();
34
+ } }
35
+ function MjIconPickerComponent_ng_template_10_Conditional_4_Template(rf, ctx) { if (rf & 1) {
36
+ i0.ɵɵelementStart(0, "p", 16);
37
+ i0.ɵɵtext(1);
38
+ i0.ɵɵelementEnd();
39
+ } if (rf & 2) {
40
+ const ctx_r0 = i0.ɵɵnextContext(2);
41
+ i0.ɵɵadvance();
42
+ i0.ɵɵtextInterpolate1("No icon matches \u201C", ctx_r0.Search, "\u201D.");
43
+ } }
44
+ function MjIconPickerComponent_ng_template_10_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
45
+ const _r4 = i0.ɵɵgetCurrentView();
46
+ i0.ɵɵelementStart(0, "button", 21);
47
+ i0.ɵɵlistener("click", function MjIconPickerComponent_ng_template_10_Conditional_5_For_2_Template_button_click_0_listener() { const icon_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.Choose(icon_r5)); });
48
+ i0.ɵɵelement(1, "i", 22);
49
+ i0.ɵɵelementEnd();
50
+ } if (rf & 2) {
51
+ const icon_r5 = ctx.$implicit;
52
+ const ctx_r0 = i0.ɵɵnextContext(3);
53
+ i0.ɵɵclassProp("is-on", ctx_r0.IsSelected(icon_r5));
54
+ i0.ɵɵproperty("title", icon_r5.Name);
55
+ i0.ɵɵattribute("aria-label", icon_r5.Name)("aria-pressed", ctx_r0.IsSelected(icon_r5));
56
+ i0.ɵɵadvance();
57
+ i0.ɵɵclassMap(ctx_r0.ClassFor(icon_r5));
58
+ } }
59
+ function MjIconPickerComponent_ng_template_10_Conditional_5_Template(rf, ctx) { if (rf & 1) {
60
+ i0.ɵɵelementStart(0, "div", 17);
61
+ i0.ɵɵrepeaterCreate(1, MjIconPickerComponent_ng_template_10_Conditional_5_For_2_Template, 2, 7, "button", 20, _forTrack0);
62
+ i0.ɵɵelementEnd();
63
+ } if (rf & 2) {
64
+ const ctx_r0 = i0.ɵɵnextContext(2);
65
+ i0.ɵɵadvance();
66
+ i0.ɵɵrepeater(ctx_r0.Results);
67
+ } }
68
+ function MjIconPickerComponent_ng_template_10_Conditional_8_Template(rf, ctx) { if (rf & 1) {
69
+ i0.ɵɵelementStart(0, "p", 19);
70
+ i0.ɵɵtext(1, " The icon stylesheet could not be read, so this is a short list. Any other name can still be typed. ");
71
+ i0.ɵɵelementEnd();
72
+ } }
73
+ function MjIconPickerComponent_ng_template_10_Template(rf, ctx) { if (rf & 1) {
74
+ const _r3 = i0.ɵɵgetCurrentView();
75
+ i0.ɵɵelementStart(0, "div", 14)(1, "input", 15, 2);
76
+ i0.ɵɵlistener("input", function MjIconPickerComponent_ng_template_10_Template_input_input_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.Search = $event.target.value); });
77
+ i0.ɵɵelementEnd();
78
+ i0.ɵɵconditionalCreate(3, MjIconPickerComponent_ng_template_10_Conditional_3_Template, 2, 0, "p", 16)(4, MjIconPickerComponent_ng_template_10_Conditional_4_Template, 2, 1, "p", 16)(5, MjIconPickerComponent_ng_template_10_Conditional_5_Template, 3, 0, "div", 17);
79
+ i0.ɵɵelementStart(6, "p", 18);
80
+ i0.ɵɵtext(7);
81
+ i0.ɵɵelementEnd();
82
+ i0.ɵɵconditionalCreate(8, MjIconPickerComponent_ng_template_10_Conditional_8_Template, 2, 0, "p", 19);
83
+ i0.ɵɵelementEnd();
84
+ } if (rf & 2) {
85
+ const ctx_r0 = i0.ɵɵnextContext();
86
+ i0.ɵɵadvance();
87
+ i0.ɵɵproperty("value", ctx_r0.Search);
88
+ i0.ɵɵadvance(2);
89
+ i0.ɵɵconditional(ctx_r0.IsLoading ? 3 : ctx_r0.Results.length === 0 ? 4 : 5);
90
+ i0.ɵɵadvance(4);
91
+ i0.ɵɵtextInterpolate(ctx_r0.CapNote);
92
+ i0.ɵɵadvance();
93
+ i0.ɵɵconditional(ctx_r0.IsFallbackCatalogue ? 8 : -1);
94
+ } }
95
+ /**
96
+ * mj-icon-picker — choose a Font Awesome icon by looking at it.
97
+ *
98
+ * Typing a class name is not something to ask of a user: the name has to be remembered
99
+ * exactly, and Font Awesome needs a style class beside it — `fa-chart-column` on its own
100
+ * renders nothing at all, which looks like a bug rather than a missing word. This searches
101
+ * the icons the page has actually loaded and writes a complete class string.
102
+ *
103
+ * The text box stays, because a user who knows the name is faster typing it, and because a
104
+ * value from elsewhere must remain editable. What it emits is normalized either way.
105
+ *
106
+ * The grid opens in an overlay rather than inside the field. Anchored in the field it sat
107
+ * in whatever scrolling box the host had, widened that box and left the surrounding panel
108
+ * scrolling sideways — a picker must not resize the form it is part of.
109
+ *
110
+ * @example
111
+ * ```html
112
+ * <mj-icon-picker [(ngModel)]="Icon" Placeholder="Search icons"></mj-icon-picker>
113
+ * ```
114
+ */
115
+ export class MjIconPickerComponent {
116
+ /** The icon class string, e.g. `fa-solid fa-chart-column`. */
117
+ set Value(value) {
118
+ this._value = value ?? '';
119
+ this.Text = this._value;
120
+ }
121
+ get Value() { return this._value; }
122
+ ValueChange = new EventEmitter();
123
+ Placeholder = 'Search icons, or type a class';
124
+ /** Accessible name for the text box, when no visible label sits beside it. */
125
+ AriaLabel = 'Icon';
126
+ /** Disables both the box and the browse button. */
127
+ Disabled = false;
128
+ /** The style given to a name typed by hand, when it names none itself. */
129
+ Style = DEFAULT_ICON_STYLE;
130
+ _value = '';
131
+ host = inject((ElementRef));
132
+ cdr = inject(ChangeDetectorRef);
133
+ catalogue = inject(IconCatalogueService);
134
+ searchBox;
135
+ browseButton;
136
+ /** What is in the text box, which may not yet be a complete class string. */
137
+ Text = '';
138
+ /** Whether the icon grid is open. */
139
+ IsOpen = false;
140
+ /** Width the overlay opens at, so the grid is usable beside a narrow field. */
141
+ static GRID_WIDTH = 320;
142
+ GridWidth = MjIconPickerComponent.GRID_WIDTH;
143
+ /** Below the field, or above it when there is no room. */
144
+ Positions = [
145
+ { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 4 },
146
+ { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -4 },
147
+ ];
148
+ /** What the user typed into the grid's own search box. */
149
+ get Search() { return this.search; }
150
+ /**
151
+ * Setting it marks the view, because this component is OnPush and the search may be
152
+ * set by a host as well as by the box — a value that does not repaint the grid is
153
+ * worse than no search at all.
154
+ */
155
+ set Search(value) {
156
+ this.search = value ?? '';
157
+ this.cdr.markForCheck();
158
+ }
159
+ search = '';
160
+ /** The icon drawn in the preview, or '' when nothing is set. */
161
+ get Preview() {
162
+ return NormalizeIconClass(this.Text, this.Style);
163
+ }
164
+ /** The current icon's bare name, for the grid's selected state. */
165
+ get SelectedName() {
166
+ return IconNameOf(this.Preview);
167
+ }
168
+ /** The icons to show, narrowed by the grid's search box: at most {@link ICON_RESULT_LIMIT}. */
169
+ get Results() {
170
+ return this.matches().slice(0, ICON_RESULT_LIMIT);
171
+ }
172
+ /** How many icons match the search, including the ones past the grid's limit. */
173
+ get MatchCount() {
174
+ return this.matches().length;
175
+ }
176
+ /** True when more icons match than the grid draws, so the user is told to narrow the search. */
177
+ get IsCapped() {
178
+ return this.MatchCount > ICON_RESULT_LIMIT;
179
+ }
180
+ /** "Showing N of M icons…" while the grid is cut short; empty otherwise. */
181
+ get CapNote() {
182
+ if (this.IsLoading || !this.IsCapped)
183
+ return '';
184
+ return `Showing ${this.Results.length} of ${this.MatchCount} icons. Type to narrow the list.`;
185
+ }
186
+ matchMemo = null;
187
+ /** Every icon matching the search, worked out once per catalogue and search. */
188
+ matches() {
189
+ const icons = this.Icons;
190
+ if (this.matchMemo?.Icons !== icons || this.matchMemo.Search !== this.search) {
191
+ this.matchMemo = { Icons: icons, Search: this.search, Matches: MatchIcons(icons, this.search) };
192
+ }
193
+ return this.matchMemo.Matches;
194
+ }
195
+ /** Whether a grid cell is the current icon, under its own name or one of its aliases. */
196
+ IsSelected(icon) {
197
+ const name = this.SelectedName;
198
+ return !!name && (icon.Name === name || (icon.Aliases ?? []).includes(name));
199
+ }
200
+ /** Every icon on offer, each with the style that actually draws it. */
201
+ get Icons() {
202
+ return this.catalogue.Icons();
203
+ }
204
+ /** True when the page could not be read and the short list is standing in. */
205
+ get IsFallbackCatalogue() {
206
+ return this.catalogue.IsFallback();
207
+ }
208
+ /** True while the icon fonts are being fetched so their glyphs can be measured. */
209
+ IsLoading = false;
210
+ get ownerDocument() {
211
+ return this.host.nativeElement.ownerDocument ?? document;
212
+ }
213
+ /** The complete class string for one grid cell. */
214
+ ClassFor(icon) {
215
+ return `${icon.Style} fa-${icon.Name}`;
216
+ }
217
+ Toggle() {
218
+ if (this.Disabled)
219
+ return;
220
+ this.IsOpen = !this.IsOpen;
221
+ if (this.IsOpen) {
222
+ this.Search = '';
223
+ void this.loadCatalogue();
224
+ // After the grid exists, so there is something to focus.
225
+ setTimeout(() => this.searchBox?.nativeElement.focus(), 0);
226
+ }
227
+ this.cdr.markForCheck();
228
+ }
229
+ /**
230
+ * Read the catalogue, showing a wait while the icon fonts arrive.
231
+ *
232
+ * They have to be fetched before their glyphs can be measured, and a browser fetches
233
+ * a web font only when the page uses it — so on an app that draws solid icons the
234
+ * other styles are not there yet. Rendering the grid before they land would show it
235
+ * missing every brands and regular icon, then fill them in, which reads as a bug.
236
+ */
237
+ async loadCatalogue() {
238
+ if (this.Icons.length > 0)
239
+ return;
240
+ this.IsLoading = true;
241
+ this.cdr.markForCheck();
242
+ try {
243
+ await this.catalogue.Load(this.ownerDocument);
244
+ }
245
+ finally {
246
+ this.IsLoading = false;
247
+ this.cdr.markForCheck();
248
+ }
249
+ }
250
+ /** Closes the grid and puts focus back on the browse button. */
251
+ Close() {
252
+ if (!this.IsOpen)
253
+ return;
254
+ this.IsOpen = false;
255
+ this.cdr.markForCheck();
256
+ this.browseButton?.nativeElement.focus();
257
+ }
258
+ /** Typed text is normalized on the way out, so a bare name still renders. */
259
+ OnTextChanged(raw) {
260
+ this.Text = raw;
261
+ this.commit(NormalizeIconClass(raw, this.Style));
262
+ this.cdr.markForCheck();
263
+ }
264
+ /** Writes the icon in the style that draws it, not in whatever the field defaulted to. */
265
+ Choose(icon) {
266
+ const value = this.ClassFor(icon);
267
+ this.Text = value;
268
+ this.commit(value);
269
+ this.onTouched();
270
+ this.Close();
271
+ }
272
+ /** Clears the icon. A panel with none is a normal thing to want. */
273
+ Clear() {
274
+ this.Text = '';
275
+ this.commit('');
276
+ }
277
+ commit(value) {
278
+ if (value === this._value)
279
+ return;
280
+ this._value = value;
281
+ this.ValueChange.emit(value);
282
+ this.onChange(value);
283
+ this.cdr.markForCheck();
284
+ }
285
+ // ---- ControlValueAccessor ----
286
+ onChange = () => undefined;
287
+ onTouched = () => undefined;
288
+ writeValue(value) {
289
+ this._value = value ?? '';
290
+ this.Text = this._value;
291
+ this.cdr.markForCheck();
292
+ }
293
+ registerOnChange(fn) { this.onChange = fn; }
294
+ registerOnTouched(fn) { this.onTouched = fn; }
295
+ setDisabledState(disabled) {
296
+ this.Disabled = disabled;
297
+ this.cdr.markForCheck();
298
+ }
299
+ OnBlur() { this.onTouched(); }
300
+ static ɵfac = function MjIconPickerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MjIconPickerComponent)(); };
301
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MjIconPickerComponent, selectors: [["mj-icon-picker"]], viewQuery: function MjIconPickerComponent_Query(rf, ctx) { if (rf & 1) {
302
+ i0.ɵɵviewQuery(_c0, 5)(_c1, 5);
303
+ } if (rf & 2) {
304
+ let _t;
305
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.searchBox = _t.first);
306
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.browseButton = _t.first);
307
+ } }, inputs: { Value: "Value", Placeholder: "Placeholder", AriaLabel: "AriaLabel", Disabled: "Disabled", Style: "Style" }, outputs: { ValueChange: "ValueChange" }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MjIconPickerComponent), multi: true }])], decls: 11, vars: 15, consts: [["origin", "cdkOverlayOrigin"], ["browse", ""], ["search", ""], ["cdkOverlayOrigin", "", 1, "mj-iconpick"], ["aria-hidden", "true", 1, "mj-iconpick-preview"], [3, "class"], [1, "fa-regular", "fa-square"], ["type", "text", 1, "mj-iconpick-input", 3, "input", "blur", "placeholder", "disabled", "value"], ["type", "button", "aria-label", "Clear the icon", "title", "Clear the icon", 1, "mj-iconpick-clear", 3, "disabled"], ["type", "button", "aria-haspopup", "dialog", "aria-label", "Browse icons", "title", "Browse icons", 1, "mj-iconpick-browse", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-icons"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "mj-iconpick-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHasBackdrop"], ["type", "button", "aria-label", "Clear the icon", "title", "Clear the icon", 1, "mj-iconpick-clear", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-xmark"], ["role", "dialog", "aria-label", "Choose an icon", 1, "mj-iconpick-pop"], ["type", "text", "placeholder", "Search icons", "aria-label", "Search icons", 1, "mj-iconpick-search", 3, "input", "value"], [1, "mj-iconpick-empty"], [1, "mj-iconpick-grid"], ["role", "status", 1, "mj-iconpick-note", "mj-iconpick-status"], [1, "mj-iconpick-note"], ["type", "button", 1, "mj-iconpick-cell", 3, "is-on", "title"], ["type", "button", 1, "mj-iconpick-cell", 3, "click", "title"], ["aria-hidden", "true"]], template: function MjIconPickerComponent_Template(rf, ctx) { if (rf & 1) {
308
+ i0.ɵɵelementStart(0, "div", 3, 0)(2, "span", 4);
309
+ i0.ɵɵconditionalCreate(3, MjIconPickerComponent_Conditional_3_Template, 1, 2, "i", 5)(4, MjIconPickerComponent_Conditional_4_Template, 1, 0, "i", 6);
310
+ i0.ɵɵelementEnd();
311
+ i0.ɵɵelementStart(5, "input", 7);
312
+ i0.ɵɵlistener("input", function MjIconPickerComponent_Template_input_input_5_listener($event) { return ctx.OnTextChanged($event.target.value); })("blur", function MjIconPickerComponent_Template_input_blur_5_listener() { return ctx.OnBlur(); });
313
+ i0.ɵɵelementEnd();
314
+ i0.ɵɵconditionalCreate(6, MjIconPickerComponent_Conditional_6_Template, 2, 1, "button", 8);
315
+ i0.ɵɵelementStart(7, "button", 9, 1);
316
+ i0.ɵɵlistener("click", function MjIconPickerComponent_Template_button_click_7_listener() { return ctx.Toggle(); });
317
+ i0.ɵɵelement(9, "i", 10);
318
+ i0.ɵɵelementEnd()();
319
+ i0.ɵɵtemplate(10, MjIconPickerComponent_ng_template_10_Template, 9, 4, "ng-template", 11);
320
+ i0.ɵɵlistener("backdropClick", function MjIconPickerComponent_Template_ng_template_backdropClick_10_listener() { return ctx.Close(); })("detach", function MjIconPickerComponent_Template_ng_template_detach_10_listener() { return ctx.Close(); });
321
+ } if (rf & 2) {
322
+ const origin_r6 = i0.ɵɵreference(1);
323
+ i0.ɵɵadvance(2);
324
+ i0.ɵɵclassProp("is-empty", !ctx.Preview);
325
+ i0.ɵɵadvance();
326
+ i0.ɵɵconditional(ctx.Preview ? 3 : 4);
327
+ i0.ɵɵadvance(2);
328
+ i0.ɵɵproperty("placeholder", ctx.Placeholder)("disabled", ctx.Disabled)("value", ctx.Text);
329
+ i0.ɵɵattribute("aria-label", ctx.AriaLabel);
330
+ i0.ɵɵadvance();
331
+ i0.ɵɵconditional(ctx.Text ? 6 : -1);
332
+ i0.ɵɵadvance();
333
+ i0.ɵɵproperty("disabled", ctx.Disabled);
334
+ i0.ɵɵattribute("aria-expanded", ctx.IsOpen);
335
+ i0.ɵɵadvance(3);
336
+ i0.ɵɵproperty("cdkConnectedOverlayOrigin", origin_r6)("cdkConnectedOverlayOpen", ctx.IsOpen)("cdkConnectedOverlayPositions", ctx.Positions)("cdkConnectedOverlayWidth", ctx.GridWidth)("cdkConnectedOverlayHasBackdrop", true);
337
+ } }, dependencies: [OverlayModule, i1.CdkConnectedOverlay, i1.CdkOverlayOrigin], styles: ["[_nghost-%COMP%] {\n display: block;\n}\n\n.mj-iconpick[_ngcontent-%COMP%] {\n display: flex;\n gap: var(--mj-space-1);\n align-items: center;\n min-width: 0;\n padding: 0 var(--mj-space-1) 0 var(--mj-space-2);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n}\n\n.mj-iconpick[_ngcontent-%COMP%]:focus-within {\n border-color: var(--mj-border-focus);\n}\n\n.mj-iconpick-preview[_ngcontent-%COMP%] {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n width: 1.5rem;\n color: var(--mj-text-primary);\n}\n\n.mj-iconpick-preview.is-empty[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n}\n\n.mj-iconpick-input[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-width: 0;\n padding: var(--mj-space-2) 0;\n border: 0;\n background: transparent;\n color: var(--mj-text-primary);\n font: inherit;\n}\n\n.mj-iconpick-input[_ngcontent-%COMP%]:focus {\n outline: none;\n}\n\n.mj-iconpick-clear[_ngcontent-%COMP%], \n.mj-iconpick-browse[_ngcontent-%COMP%] {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n width: 1.75rem;\n height: 1.75rem;\n padding: 0;\n border: 0;\n border-radius: var(--mj-radius-sm);\n background: transparent;\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n\n.mj-iconpick-clear[_ngcontent-%COMP%]:hover, \n.mj-iconpick-browse[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.mj-iconpick-clear[_ngcontent-%COMP%]:disabled, \n.mj-iconpick-browse[_ngcontent-%COMP%]:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n\n\n.mj-iconpick-pop[_ngcontent-%COMP%] {\n box-sizing: border-box;\n padding: var(--mj-space-2);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n box-shadow: var(--mj-shadow-lg);\n}\n\n.mj-iconpick-search[_ngcontent-%COMP%] {\n width: 100%;\n box-sizing: border-box;\n padding: var(--mj-space-2);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font: inherit;\n}\n\n.mj-iconpick-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr));\n gap: var(--mj-space-1);\n max-height: 240px;\n margin-top: var(--mj-space-2);\n overflow-y: auto;\n}\n\n.mj-iconpick-cell[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n aspect-ratio: 1;\n padding: 0;\n border: 1px solid transparent;\n border-radius: var(--mj-radius-sm);\n background: transparent;\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n\n.mj-iconpick-cell[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.mj-iconpick-cell.is-on[_ngcontent-%COMP%] {\n border-color: var(--mj-border-focus);\n background: var(--mj-bg-surface-active);\n color: var(--mj-text-primary);\n}\n\n.mj-iconpick-empty[_ngcontent-%COMP%], \n.mj-iconpick-note[_ngcontent-%COMP%] {\n margin: var(--mj-space-2) 0 0;\n color: var(--mj-text-muted);\n font-size: var(--mj-text-xs);\n}\n\n\n.mj-iconpick-status[_ngcontent-%COMP%]:empty { margin: 0; }"], changeDetection: 0 });
338
+ }
339
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjIconPickerComponent, [{
340
+ type: Component,
341
+ args: [{ standalone: true, selector: 'mj-icon-picker', changeDetection: ChangeDetectionStrategy.OnPush, imports: [OverlayModule], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MjIconPickerComponent), multi: true }], template: "<div class=\"mj-iconpick\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\n <span class=\"mj-iconpick-preview\" [class.is-empty]=\"!Preview\" aria-hidden=\"true\">\n @if (Preview) {\n <i [class]=\"Preview\"></i>\n } @else {\n <i class=\"fa-regular fa-square\"></i>\n }\n </span>\n\n <input class=\"mj-iconpick-input\"\n type=\"text\"\n [attr.aria-label]=\"AriaLabel\"\n [placeholder]=\"Placeholder\"\n [disabled]=\"Disabled\"\n [value]=\"Text\"\n (input)=\"OnTextChanged($any($event.target).value)\"\n (blur)=\"OnBlur()\">\n\n @if (Text) {\n <button type=\"button\" class=\"mj-iconpick-clear\"\n [disabled]=\"Disabled\"\n aria-label=\"Clear the icon\"\n title=\"Clear the icon\"\n (click)=\"Clear()\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n }\n\n <button #browse type=\"button\" class=\"mj-iconpick-browse\"\n [disabled]=\"Disabled\"\n [attr.aria-expanded]=\"IsOpen\"\n aria-haspopup=\"dialog\"\n aria-label=\"Browse icons\"\n title=\"Browse icons\"\n (click)=\"Toggle()\">\n <i class=\"fa-solid fa-icons\" aria-hidden=\"true\"></i>\n </button>\n</div>\n\n<!--\n In an overlay rather than inside the field. Anchored in the field it sat in whatever\n scrolling box the host had, widened that box, and left the surrounding panel scrolling\n sideways \u2014 a picker must not resize the form it is part of.\n-->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"IsOpen\"\n [cdkConnectedOverlayPositions]=\"Positions\"\n [cdkConnectedOverlayWidth]=\"GridWidth\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"mj-iconpick-backdrop\"\n (backdropClick)=\"Close()\"\n (detach)=\"Close()\">\n <div class=\"mj-iconpick-pop\" role=\"dialog\" aria-label=\"Choose an icon\">\n <input #search\n class=\"mj-iconpick-search\"\n type=\"text\"\n placeholder=\"Search icons\"\n aria-label=\"Search icons\"\n [value]=\"Search\"\n (input)=\"Search = $any($event.target).value\">\n\n @if (IsLoading) {\n <p class=\"mj-iconpick-empty\">Reading the icons this page can draw&hellip;</p>\n } @else if (Results.length === 0) {\n <p class=\"mj-iconpick-empty\">No icon matches &ldquo;{{ Search }}&rdquo;.</p>\n } @else {\n <div class=\"mj-iconpick-grid\">\n @for (icon of Results; track icon.Name) {\n <button type=\"button\"\n class=\"mj-iconpick-cell\"\n [class.is-on]=\"IsSelected(icon)\"\n [title]=\"icon.Name\"\n [attr.aria-label]=\"icon.Name\"\n [attr.aria-pressed]=\"IsSelected(icon)\"\n (click)=\"Choose(icon)\">\n <i [class]=\"ClassFor(icon)\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n }\n\n <!-- The grid draws a limited number of icons, so a longer match list says how many\n there are and that typing narrows it. The live region stays in place and only its\n text changes, so a screen reader announces each change. -->\n <p class=\"mj-iconpick-note mj-iconpick-status\" role=\"status\">{{ CapNote }}</p>\n\n <!-- The short fallback list is why a name the user expects can be absent, so it is said. -->\n @if (IsFallbackCatalogue) {\n <p class=\"mj-iconpick-note\">\n The icon stylesheet could not be read, so this is a short list. Any other name can\n still be typed.\n </p>\n }\n </div>\n</ng-template>\n", styles: [":host {\n display: block;\n}\n\n.mj-iconpick {\n display: flex;\n gap: var(--mj-space-1);\n align-items: center;\n min-width: 0;\n padding: 0 var(--mj-space-1) 0 var(--mj-space-2);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n}\n\n.mj-iconpick:focus-within {\n border-color: var(--mj-border-focus);\n}\n\n.mj-iconpick-preview {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n width: 1.5rem;\n color: var(--mj-text-primary);\n}\n\n.mj-iconpick-preview.is-empty {\n color: var(--mj-text-muted);\n}\n\n.mj-iconpick-input {\n flex: 1 1 auto;\n min-width: 0;\n padding: var(--mj-space-2) 0;\n border: 0;\n background: transparent;\n color: var(--mj-text-primary);\n font: inherit;\n}\n\n.mj-iconpick-input:focus {\n outline: none;\n}\n\n.mj-iconpick-clear,\n.mj-iconpick-browse {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n width: 1.75rem;\n height: 1.75rem;\n padding: 0;\n border: 0;\n border-radius: var(--mj-radius-sm);\n background: transparent;\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n\n.mj-iconpick-clear:hover,\n.mj-iconpick-browse:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.mj-iconpick-clear:disabled,\n.mj-iconpick-browse:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n/* Sized by the overlay, which places it outside the host's scrolling box \u2014 so nothing\n here may set a width or a position. */\n.mj-iconpick-pop {\n box-sizing: border-box;\n padding: var(--mj-space-2);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n box-shadow: var(--mj-shadow-lg);\n}\n\n.mj-iconpick-search {\n width: 100%;\n box-sizing: border-box;\n padding: var(--mj-space-2);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font: inherit;\n}\n\n.mj-iconpick-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr));\n gap: var(--mj-space-1);\n max-height: 240px;\n margin-top: var(--mj-space-2);\n overflow-y: auto;\n}\n\n.mj-iconpick-cell {\n display: flex;\n align-items: center;\n justify-content: center;\n aspect-ratio: 1;\n padding: 0;\n border: 1px solid transparent;\n border-radius: var(--mj-radius-sm);\n background: transparent;\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n\n.mj-iconpick-cell:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.mj-iconpick-cell.is-on {\n border-color: var(--mj-border-focus);\n background: var(--mj-bg-surface-active);\n color: var(--mj-text-primary);\n}\n\n.mj-iconpick-empty,\n.mj-iconpick-note {\n margin: var(--mj-space-2) 0 0;\n color: var(--mj-text-muted);\n font-size: var(--mj-text-xs);\n}\n\n/* The status line stays in the page for screen readers; empty, it takes no space. */\n.mj-iconpick-status:empty { margin: 0; }\n"] }]
342
+ }], null, { Value: [{
343
+ type: Input
344
+ }], ValueChange: [{
345
+ type: Output
346
+ }], Placeholder: [{
347
+ type: Input
348
+ }], AriaLabel: [{
349
+ type: Input
350
+ }], Disabled: [{
351
+ type: Input
352
+ }], Style: [{
353
+ type: Input
354
+ }], searchBox: [{
355
+ type: ViewChild,
356
+ args: ['search']
357
+ }], browseButton: [{
358
+ type: ViewChild,
359
+ args: ['browse']
360
+ }] }); })();
361
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjIconPickerComponent, { className: "MjIconPickerComponent", filePath: "lib/icon-picker/icon-picker.component.ts", lineNumber: 54 }); })();
362
+ //# sourceMappingURL=icon-picker.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-picker.component.js","sourceRoot":"","sources":["../../../src/lib/icon-picker/icon-picker.component.ts","../../../src/lib/icon-picker/icon-picker.component.html"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,EACL,MAAM,EACN,SAAS,EACT,UAAU,EACV,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAwB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAqB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EACH,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,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AO;YAEP,gCAOyB;YAAlB,AADA,uGAAS,sCAAwC,IAAC,kFAC1C,YAAQ,IAAC;YAPxB,iBAOyB;YAEzB,0FAAY;YAUZ,oCAM2B;YAAnB,kGAAS,YAAQ,IAAC;YACxB,wBAAoD;YAExD,AADE,iBAAS,EACL;YAON,yFASqB;YAAnB,AADA,wHAAiB,WAAO,IAAC,6FACf,WAAO,IAAC;;;YApDgB,eAA2B;YAA3B,wCAA2B;YAC3D,cAIC;YAJD,qCAIC;YAMI,eAA2B;YAE3B,AADA,AADA,6CAA2B,0BACN,mBACP;;YAIrB,cAQC;YARD,mCAQC;YAGO,cAAqB;YAArB,uCAAqB;;YAiB7B,eAAoC;YAIpC,AADA,AADA,AADA,AADA,qDAAoC,uCACF,+CACQ,2CACJ,wCACC;4BDF3B,aAAa;;iFAKd,qBAAqB;cATjC,SAAS;6BACM,IAAI,YACN,gBAAgB,mBACT,uBAAuB,CAAC,MAAM,WACtC,CAAC,aAAa,CAAC,aACb,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,sBAAsB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;kBAM7G,KAAK;;kBAOL,MAAM;;kBAEN,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAOL,SAAS;mBAAC,QAAQ;;kBAClB,SAAS;mBAAC,QAAQ;;kFA5BV,qBAAqB","sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n forwardRef,\n inject,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { OverlayModule, ConnectedPosition } from '@angular/cdk/overlay';\nimport {\n DEFAULT_ICON_STYLE,\n ICON_RESULT_LIMIT,\n IconNameOf,\n MatchIcons,\n NormalizeIconClass,\n type FontAwesomeIcon,\n} from './font-awesome-icons';\nimport { IconCatalogueService } from './icon-catalogue.service';\n\n/**\n * mj-icon-picker — choose a Font Awesome icon by looking at it.\n *\n * Typing a class name is not something to ask of a user: the name has to be remembered\n * exactly, and Font Awesome needs a style class beside it — `fa-chart-column` on its own\n * renders nothing at all, which looks like a bug rather than a missing word. This searches\n * the icons the page has actually loaded and writes a complete class string.\n *\n * The text box stays, because a user who knows the name is faster typing it, and because a\n * value from elsewhere must remain editable. What it emits is normalized either way.\n *\n * The grid opens in an overlay rather than inside the field. Anchored in the field it sat\n * in whatever scrolling box the host had, widened that box and left the surrounding panel\n * scrolling sideways — a picker must not resize the form it is part of.\n *\n * @example\n * ```html\n * <mj-icon-picker [(ngModel)]=\"Icon\" Placeholder=\"Search icons\"></mj-icon-picker>\n * ```\n */\n@Component({\n standalone: true,\n selector: 'mj-icon-picker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [OverlayModule],\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MjIconPickerComponent), multi: true }],\n templateUrl: './icon-picker.component.html',\n styleUrls: ['./icon-picker.component.css'],\n})\nexport class MjIconPickerComponent implements ControlValueAccessor {\n /** The icon class string, e.g. `fa-solid fa-chart-column`. */\n @Input()\n set Value(value: string) {\n this._value = value ?? '';\n this.Text = this._value;\n }\n get Value(): string { return this._value; }\n\n @Output() ValueChange = new EventEmitter<string>();\n\n @Input() Placeholder = 'Search icons, or type a class';\n\n /** Accessible name for the text box, when no visible label sits beside it. */\n @Input() AriaLabel = 'Icon';\n\n /** Disables both the box and the browse button. */\n @Input() Disabled = false;\n\n /** The style given to a name typed by hand, when it names none itself. */\n @Input() Style = DEFAULT_ICON_STYLE;\n\n private _value = '';\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly catalogue = inject(IconCatalogueService);\n\n @ViewChild('search') private searchBox?: ElementRef<HTMLInputElement>;\n @ViewChild('browse') private browseButton?: ElementRef<HTMLButtonElement>;\n\n /** What is in the text box, which may not yet be a complete class string. */\n public Text = '';\n\n /** Whether the icon grid is open. */\n public IsOpen = false;\n\n /** Width the overlay opens at, so the grid is usable beside a narrow field. */\n public static readonly GRID_WIDTH = 320;\n\n public readonly GridWidth = MjIconPickerComponent.GRID_WIDTH;\n\n /** Below the field, or above it when there is no room. */\n public readonly Positions: ConnectedPosition[] = [\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 4 },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -4 },\n ];\n\n /** What the user typed into the grid's own search box. */\n public get Search(): string { return this.search; }\n\n /**\n * Setting it marks the view, because this component is OnPush and the search may be\n * set by a host as well as by the box — a value that does not repaint the grid is\n * worse than no search at all.\n */\n public set Search(value: string) {\n this.search = value ?? '';\n this.cdr.markForCheck();\n }\n\n private search = '';\n\n /** The icon drawn in the preview, or '' when nothing is set. */\n public get Preview(): string {\n return NormalizeIconClass(this.Text, this.Style);\n }\n\n /** The current icon's bare name, for the grid's selected state. */\n public get SelectedName(): string {\n return IconNameOf(this.Preview);\n }\n\n /** The icons to show, narrowed by the grid's search box: at most {@link ICON_RESULT_LIMIT}. */\n public get Results(): FontAwesomeIcon[] {\n return this.matches().slice(0, ICON_RESULT_LIMIT);\n }\n\n /** How many icons match the search, including the ones past the grid's limit. */\n public get MatchCount(): number {\n return this.matches().length;\n }\n\n /** True when more icons match than the grid draws, so the user is told to narrow the search. */\n public get IsCapped(): boolean {\n return this.MatchCount > ICON_RESULT_LIMIT;\n }\n\n /** \"Showing N of M icons…\" while the grid is cut short; empty otherwise. */\n public get CapNote(): string {\n if (this.IsLoading || !this.IsCapped) return '';\n return `Showing ${this.Results.length} of ${this.MatchCount} icons. Type to narrow the list.`;\n }\n\n private matchMemo: { Icons: readonly FontAwesomeIcon[]; Search: string; Matches: FontAwesomeIcon[] } | null = null;\n\n /** Every icon matching the search, worked out once per catalogue and search. */\n private matches(): FontAwesomeIcon[] {\n const icons = this.Icons;\n if (this.matchMemo?.Icons !== icons || this.matchMemo.Search !== this.search) {\n this.matchMemo = { Icons: icons, Search: this.search, Matches: MatchIcons(icons, this.search) };\n }\n return this.matchMemo.Matches;\n }\n\n /** Whether a grid cell is the current icon, under its own name or one of its aliases. */\n public IsSelected(icon: FontAwesomeIcon): boolean {\n const name = this.SelectedName;\n return !!name && (icon.Name === name || (icon.Aliases ?? []).includes(name));\n }\n\n /** Every icon on offer, each with the style that actually draws it. */\n public get Icons(): readonly FontAwesomeIcon[] {\n return this.catalogue.Icons();\n }\n\n /** True when the page could not be read and the short list is standing in. */\n public get IsFallbackCatalogue(): boolean {\n return this.catalogue.IsFallback();\n }\n\n /** True while the icon fonts are being fetched so their glyphs can be measured. */\n public IsLoading = false;\n\n private get ownerDocument(): Document {\n return this.host.nativeElement.ownerDocument ?? document;\n }\n\n /** The complete class string for one grid cell. */\n public ClassFor(icon: FontAwesomeIcon): string {\n return `${icon.Style} fa-${icon.Name}`;\n }\n\n public Toggle(): void {\n if (this.Disabled) return;\n this.IsOpen = !this.IsOpen;\n if (this.IsOpen) {\n this.Search = '';\n void this.loadCatalogue();\n // After the grid exists, so there is something to focus.\n setTimeout(() => this.searchBox?.nativeElement.focus(), 0);\n }\n this.cdr.markForCheck();\n }\n\n /**\n * Read the catalogue, showing a wait while the icon fonts arrive.\n *\n * They have to be fetched before their glyphs can be measured, and a browser fetches\n * a web font only when the page uses it — so on an app that draws solid icons the\n * other styles are not there yet. Rendering the grid before they land would show it\n * missing every brands and regular icon, then fill them in, which reads as a bug.\n */\n private async loadCatalogue(): Promise<void> {\n if (this.Icons.length > 0) return;\n this.IsLoading = true;\n this.cdr.markForCheck();\n try {\n await this.catalogue.Load(this.ownerDocument);\n } finally {\n this.IsLoading = false;\n this.cdr.markForCheck();\n }\n }\n\n /** Closes the grid and puts focus back on the browse button. */\n public Close(): void {\n if (!this.IsOpen) return;\n this.IsOpen = false;\n this.cdr.markForCheck();\n this.browseButton?.nativeElement.focus();\n }\n\n /** Typed text is normalized on the way out, so a bare name still renders. */\n public OnTextChanged(raw: string): void {\n this.Text = raw;\n this.commit(NormalizeIconClass(raw, this.Style));\n this.cdr.markForCheck();\n }\n\n /** Writes the icon in the style that draws it, not in whatever the field defaulted to. */\n public Choose(icon: FontAwesomeIcon): void {\n const value = this.ClassFor(icon);\n this.Text = value;\n this.commit(value);\n this.onTouched();\n this.Close();\n }\n\n /** Clears the icon. A panel with none is a normal thing to want. */\n public Clear(): void {\n this.Text = '';\n this.commit('');\n }\n\n private commit(value: string): void {\n if (value === this._value) return;\n this._value = value;\n this.ValueChange.emit(value);\n this.onChange(value);\n this.cdr.markForCheck();\n }\n\n // ---- ControlValueAccessor ----\n\n private onChange: (value: string) => void = () => undefined;\n private onTouched: () => void = () => undefined;\n\n public writeValue(value: string | null): void {\n this._value = value ?? '';\n this.Text = this._value;\n this.cdr.markForCheck();\n }\n\n public registerOnChange(fn: (value: string) => void): void { this.onChange = fn; }\n public registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n public setDisabledState(disabled: boolean): void {\n this.Disabled = disabled;\n this.cdr.markForCheck();\n }\n\n public OnBlur(): void { this.onTouched(); }\n}\n","<div class=\"mj-iconpick\" cdkOverlayOrigin #origin=\"cdkOverlayOrigin\">\n <span class=\"mj-iconpick-preview\" [class.is-empty]=\"!Preview\" aria-hidden=\"true\">\n @if (Preview) {\n <i [class]=\"Preview\"></i>\n } @else {\n <i class=\"fa-regular fa-square\"></i>\n }\n </span>\n\n <input class=\"mj-iconpick-input\"\n type=\"text\"\n [attr.aria-label]=\"AriaLabel\"\n [placeholder]=\"Placeholder\"\n [disabled]=\"Disabled\"\n [value]=\"Text\"\n (input)=\"OnTextChanged($any($event.target).value)\"\n (blur)=\"OnBlur()\">\n\n @if (Text) {\n <button type=\"button\" class=\"mj-iconpick-clear\"\n [disabled]=\"Disabled\"\n aria-label=\"Clear the icon\"\n title=\"Clear the icon\"\n (click)=\"Clear()\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n }\n\n <button #browse type=\"button\" class=\"mj-iconpick-browse\"\n [disabled]=\"Disabled\"\n [attr.aria-expanded]=\"IsOpen\"\n aria-haspopup=\"dialog\"\n aria-label=\"Browse icons\"\n title=\"Browse icons\"\n (click)=\"Toggle()\">\n <i class=\"fa-solid fa-icons\" aria-hidden=\"true\"></i>\n </button>\n</div>\n\n<!--\n In an overlay rather than inside the field. Anchored in the field it sat in whatever\n scrolling box the host had, widened that box, and left the surrounding panel scrolling\n sideways — a picker must not resize the form it is part of.\n-->\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"IsOpen\"\n [cdkConnectedOverlayPositions]=\"Positions\"\n [cdkConnectedOverlayWidth]=\"GridWidth\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"mj-iconpick-backdrop\"\n (backdropClick)=\"Close()\"\n (detach)=\"Close()\">\n <div class=\"mj-iconpick-pop\" role=\"dialog\" aria-label=\"Choose an icon\">\n <input #search\n class=\"mj-iconpick-search\"\n type=\"text\"\n placeholder=\"Search icons\"\n aria-label=\"Search icons\"\n [value]=\"Search\"\n (input)=\"Search = $any($event.target).value\">\n\n @if (IsLoading) {\n <p class=\"mj-iconpick-empty\">Reading the icons this page can draw&hellip;</p>\n } @else if (Results.length === 0) {\n <p class=\"mj-iconpick-empty\">No icon matches &ldquo;{{ Search }}&rdquo;.</p>\n } @else {\n <div class=\"mj-iconpick-grid\">\n @for (icon of Results; track icon.Name) {\n <button type=\"button\"\n class=\"mj-iconpick-cell\"\n [class.is-on]=\"IsSelected(icon)\"\n [title]=\"icon.Name\"\n [attr.aria-label]=\"icon.Name\"\n [attr.aria-pressed]=\"IsSelected(icon)\"\n (click)=\"Choose(icon)\">\n <i [class]=\"ClassFor(icon)\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n }\n\n <!-- The grid draws a limited number of icons, so a longer match list says how many\n there are and that typing narrows it. The live region stays in place and only its\n text changes, so a screen reader announces each change. -->\n <p class=\"mj-iconpick-note mj-iconpick-status\" role=\"status\">{{ CapNote }}</p>\n\n <!-- The short fallback list is why a name the user expects can be absent, so it is said. -->\n @if (IsFallbackCatalogue) {\n <p class=\"mj-iconpick-note\">\n The icon stylesheet could not be read, so this is a short list. Any other name can\n still be typed.\n </p>\n }\n </div>\n</ng-template>\n"]}
@@ -19,6 +19,9 @@ export * from './lib/window/window.component';
19
19
  export * from './lib/slide-panel/slide-panel.component';
20
20
  export * from './lib/bottom-sheet/bottom-sheet.component';
21
21
  export * from './lib/combobox/combobox.component';
22
+ export * from './lib/icon-picker/icon-picker.component';
23
+ export * from './lib/icon-picker/font-awesome-icons';
24
+ export * from './lib/icon-picker/icon-catalogue.service';
22
25
  export * from './lib/page-header/page-header.component';
23
26
  export * from './lib/page-layout/page-layout.component';
24
27
  export * from './lib/page-body/page-body.component';
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAGA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,C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+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uDAAuD,CAAC;AACtE,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC"}
@@ -21,6 +21,9 @@ export * from './lib/window/window.component';
21
21
  export * from './lib/slide-panel/slide-panel.component';
22
22
  export * from './lib/bottom-sheet/bottom-sheet.component';
23
23
  export * from './lib/combobox/combobox.component';
24
+ export * from './lib/icon-picker/icon-picker.component';
25
+ export * from './lib/icon-picker/font-awesome-icons';
26
+ export * from './lib/icon-picker/icon-catalogue.service';
24
27
  export * from './lib/page-header/page-header.component';
25
28
  export * from './lib/page-layout/page-layout.component';
26
29
  export * from './lib/page-body/page-body.component';
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"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AC;AACtE,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC","sourcesContent":["// @memberjunction/ng-ui-components\n// Reusable standalone Angular UI components for MemberJunction\n\nexport * from './lib/a11y/named-control.base';\nexport * from './lib/a11y/unnamed-control-guard';\nexport * from './lib/button/button.directive';\nexport * from './lib/clickable/clickable.directive';\nexport * from './lib/dialog/dialog.component';\nexport * from './lib/dialog/dialog.service';\nexport * from './lib/confirm-dialog/confirm-dialog.component';\nexport * from './lib/confirm-dialog/confirm-dialog.service';\nexport * from './lib/dropdown/dropdown.component';\nexport * from './lib/switch/switch.component';\nexport * from './lib/numeric-input/numeric-input.component';\nexport * from './lib/progress-bar/progress-bar.component';\nexport * from './lib/calendar/calendar-utils';\nexport * from './lib/datepicker/datepicker.component';\nexport * from './lib/splitter/splitter.component';\nexport * from './lib/accordion/accordion.component';\nexport * from './lib/alert/alert.component';\nexport * from './lib/window/window.component';\nexport * from './lib/slide-panel/slide-panel.component';\nexport * from './lib/bottom-sheet/bottom-sheet.component';\nexport * from './lib/combobox/combobox.component';\nexport * from './lib/page-header/page-header.component';\nexport * from './lib/page-layout/page-layout.component';\nexport * from './lib/page-body/page-body.component';\nexport * from './lib/stat-badge/stat-badge.component';\nexport * from './lib/refresh-button/refresh-button.component';\nexport * from './lib/filter-popover/filter-popover.component';\nexport * from './lib/page-search/page-search.component';\nexport * from './lib/filter-chip/filter-chip.component';\nexport * from './lib/filter-field/filter-field.component';\nexport * from './lib/filter-panel/filter-panel.component';\nexport * from './lib/tab-nav/tab-nav.component';\nexport * from './lib/tabs/tab-list.directive';\nexport * from './lib/tabs/tab-chrome-guard';\nexport * from './lib/workspace-tabs/workspace-tabs.types';\nexport * from './lib/workspace-tabs/workspace-tab-store';\nexport * from './lib/workspace-tabs/workspace-tab-strip.component';\nexport * from './lib/workspace-tabs/workspace-card.component';\nexport * from './lib/workspace-tabs/workspace-tip.directive';\nexport * from './lib/view-toggle/view-toggle.component';\nexport * from './lib/left-nav/left-nav.component';\nexport * from './lib/left-nav/left-nav-content.component';\nexport * from './lib/page-header-interior/page-header-interior.component';\nexport * from './lib/page-body-interior/page-body-interior.component';\nexport * from './lib/empty-state/empty-state.component';\nexport * from './lib/card-grid/card-grid.component';\n"]}
1
+ {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,+DAA+D;AAE/D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uDAAuD,CAAC;AACtE,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC","sourcesContent":["// @memberjunction/ng-ui-components\n// Reusable standalone Angular UI components for MemberJunction\n\nexport * from './lib/a11y/named-control.base';\nexport * from './lib/a11y/unnamed-control-guard';\nexport * from './lib/button/button.directive';\nexport * from './lib/clickable/clickable.directive';\nexport * from './lib/dialog/dialog.component';\nexport * from './lib/dialog/dialog.service';\nexport * from './lib/confirm-dialog/confirm-dialog.component';\nexport * from './lib/confirm-dialog/confirm-dialog.service';\nexport * from './lib/dropdown/dropdown.component';\nexport * from './lib/switch/switch.component';\nexport * from './lib/numeric-input/numeric-input.component';\nexport * from './lib/progress-bar/progress-bar.component';\nexport * from './lib/calendar/calendar-utils';\nexport * from './lib/datepicker/datepicker.component';\nexport * from './lib/splitter/splitter.component';\nexport * from './lib/accordion/accordion.component';\nexport * from './lib/alert/alert.component';\nexport * from './lib/window/window.component';\nexport * from './lib/slide-panel/slide-panel.component';\nexport * from './lib/bottom-sheet/bottom-sheet.component';\nexport * from './lib/combobox/combobox.component';\nexport * from './lib/icon-picker/icon-picker.component';\nexport * from './lib/icon-picker/font-awesome-icons';\nexport * from './lib/icon-picker/icon-catalogue.service';\nexport * from './lib/page-header/page-header.component';\nexport * from './lib/page-layout/page-layout.component';\nexport * from './lib/page-body/page-body.component';\nexport * from './lib/stat-badge/stat-badge.component';\nexport * from './lib/refresh-button/refresh-button.component';\nexport * from './lib/filter-popover/filter-popover.component';\nexport * from './lib/page-search/page-search.component';\nexport * from './lib/filter-chip/filter-chip.component';\nexport * from './lib/filter-field/filter-field.component';\nexport * from './lib/filter-panel/filter-panel.component';\nexport * from './lib/tab-nav/tab-nav.component';\nexport * from './lib/tabs/tab-list.directive';\nexport * from './lib/tabs/tab-chrome-guard';\nexport * from './lib/workspace-tabs/workspace-tabs.types';\nexport * from './lib/workspace-tabs/workspace-tab-store';\nexport * from './lib/workspace-tabs/workspace-tab-strip.component';\nexport * from './lib/workspace-tabs/workspace-card.component';\nexport * from './lib/workspace-tabs/workspace-tip.directive';\nexport * from './lib/view-toggle/view-toggle.component';\nexport * from './lib/left-nav/left-nav.component';\nexport * from './lib/left-nav/left-nav-content.component';\nexport * from './lib/page-header-interior/page-header-interior.component';\nexport * from './lib/page-body-interior/page-body-interior.component';\nexport * from './lib/empty-state/empty-state.component';\nexport * from './lib/card-grid/card-grid.component';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-ui-components",
3
- "version": "6.2.0-edge.2",
3
+ "version": "6.2.0-edge.3",
4
4
  "description": "MemberJunction: Angular UI Components - reusable standalone components replacing Kendo UI dependencies.",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -16,7 +16,7 @@
16
16
  "devDependencies": {
17
17
  "@angular/compiler": "21.2.22",
18
18
  "@angular/compiler-cli": "21.2.22",
19
- "@memberjunction/ng-test-utils": "6.2.0-edge.2",
19
+ "@memberjunction/ng-test-utils": "6.2.0-edge.3",
20
20
  "vitest": "^4.0.18"
21
21
  },
22
22
  "peerDependencies": {