@scion/components 22.1.0 → 22.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +75 -5
- package/common/package.json +4 -0
- package/design/_theming.scss +25 -10
- package/design/components/_scion-component-dark-tokens.scss +153 -0
- package/design/components/_scion-component-light-tokens.scss +153 -0
- package/design/icons/_scion-icon-font.scss +50 -0
- package/design/themes/_scion-dark-theme.scss +2 -7
- package/design/themes/_scion-light-theme.scss +3 -8
- package/fesm2022/scion-components-common.mjs +251 -0
- package/fesm2022/scion-components-common.mjs.map +1 -0
- package/fesm2022/scion-components-dimension.mjs +7 -6
- package/fesm2022/scion-components-dimension.mjs.map +1 -1
- package/fesm2022/scion-components-icon.mjs +380 -0
- package/fesm2022/scion-components-icon.mjs.map +1 -0
- package/fesm2022/scion-components-menu.mjs +3271 -0
- package/fesm2022/scion-components-menu.mjs.map +1 -0
- package/fesm2022/scion-components-sashbox.mjs +21 -21
- package/fesm2022/scion-components-sashbox.mjs.map +1 -1
- package/fesm2022/scion-components-splitter.mjs +16 -13
- package/fesm2022/scion-components-splitter.mjs.map +1 -1
- package/fesm2022/scion-components-table.mjs +2265 -0
- package/fesm2022/scion-components-table.mjs.map +1 -0
- package/fesm2022/scion-components-text.mjs +322 -0
- package/fesm2022/scion-components-text.mjs.map +1 -0
- package/fesm2022/scion-components-throbber.mjs +15 -15
- package/fesm2022/scion-components-throbber.mjs.map +1 -1
- package/fesm2022/scion-components-viewport.mjs +142 -125
- package/fesm2022/scion-components-viewport.mjs.map +1 -1
- package/icon/package.json +4 -0
- package/menu/package.json +4 -0
- package/package.json +22 -2
- package/table/package.json +4 -0
- package/text/package.json +4 -0
- package/types/scion-components-common.d.ts +185 -0
- package/types/scion-components-icon.d.ts +146 -0
- package/types/scion-components-menu.d.ts +1922 -0
- package/types/scion-components-sashbox.d.ts +4 -2
- package/types/scion-components-splitter.d.ts +4 -3
- package/types/scion-components-table.d.ts +577 -0
- package/types/scion-components-text.d.ts +131 -0
- package/types/scion-components-viewport.d.ts +32 -39
- package/viewport/scrollbar/_scrollbar.scss +4 -4
- package/design/components/_scion-component-tokens.scss +0 -48
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inputBinding, input, Component, inject, InjectionToken, Injector, runInInjectionContext, Injectable, viewChild, signal, effect, untracked, computed, Directive, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { SciComponentOutletDirective, coerceSignal } from '@scion/components/common';
|
|
4
|
+
import { fromMutation$ } from '@scion/toolkit/observable';
|
|
5
|
+
import { of, concatWith, map } from 'rxjs';
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright (c) 2018-2026 Swiss Federal Railways
|
|
9
|
+
*
|
|
10
|
+
* This program and the accompanying materials are made
|
|
11
|
+
* available under the terms of the Eclipse Public License 2.0
|
|
12
|
+
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Provides Material icons for non-scion icons.
|
|
18
|
+
*/
|
|
19
|
+
const materialIconProvider = (ligature) => {
|
|
20
|
+
if (ligature.startsWith('scion.')) {
|
|
21
|
+
return undefined; // delegate to next provider
|
|
22
|
+
}
|
|
23
|
+
return { component: MaterialIconComponent, bindings: [inputBinding('ligature', () => ligature)] };
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Renders a Material icon based on its ligature.
|
|
27
|
+
*
|
|
28
|
+
* This component requires a Material icon font to be included in the HTML.
|
|
29
|
+
*
|
|
30
|
+
* Supported fonts:
|
|
31
|
+
* - https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded
|
|
32
|
+
* - https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined
|
|
33
|
+
* - https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp
|
|
34
|
+
* - https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Round|Material+Icons+Sharp
|
|
35
|
+
*/
|
|
36
|
+
class MaterialIconComponent {
|
|
37
|
+
/**
|
|
38
|
+
* Specifies the ligature of the Material icon.
|
|
39
|
+
*/
|
|
40
|
+
ligature = input.required(/* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "ligature" }] : /* istanbul ignore next */ []));
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MaterialIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: MaterialIconComponent, isStandalone: true, selector: "sci-material-icon", inputs: { ligature: { classPropertyName: "ligature", publicName: "ligature", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: '{{ligature()}}', isInline: true, styles: [":host{font-family:Material Symbols Rounded,Material Symbols Outlined,Material Symbols Sharp,Material Icons,Material Icons Outlined,Material Icons Round,Material Icons Sharp;font-weight:400;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:\"liga\";-webkit-font-smoothing:antialiased}\n"] });
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MaterialIconComponent, decorators: [{
|
|
46
|
+
type: Component,
|
|
47
|
+
args: [{ selector: 'sci-material-icon', template: '{{ligature()}}', styles: [":host{font-family:Material Symbols Rounded,Material Symbols Outlined,Material Symbols Sharp,Material Icons,Material Icons Outlined,Material Icons Round,Material Icons Sharp;font-weight:400;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:\"liga\";-webkit-font-smoothing:antialiased}\n"] }]
|
|
48
|
+
}], propDecorators: { ligature: [{ type: i0.Input, args: [{ isSignal: true, alias: "ligature", required: true }] }] } });
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
* Copyright (c) 2018-2026 Swiss Federal Railways
|
|
52
|
+
*
|
|
53
|
+
* This program and the accompanying materials are made
|
|
54
|
+
* available under the terms of the Eclipse Public License 2.0
|
|
55
|
+
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
56
|
+
*
|
|
57
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* Provides icons used in SCION libraries.
|
|
61
|
+
*
|
|
62
|
+
* Register this provider as the last icon provider, enabling replacement of built-in SCION icons.
|
|
63
|
+
*/
|
|
64
|
+
const scionIconProvider = (icon) => {
|
|
65
|
+
const ligature = icon.startsWith('scion.') ? icon.substring('scion.'.length) : undefined;
|
|
66
|
+
if (ligature) {
|
|
67
|
+
return { component: SciIconFontGlyphComponent, bindings: [inputBinding('ligature', () => ligature)] };
|
|
68
|
+
}
|
|
69
|
+
return undefined;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Renders the icon for a ligature of the SCION icon font.
|
|
73
|
+
*
|
|
74
|
+
* This component requires the SCION icon font 'scion-icons' to be included in the HTML.
|
|
75
|
+
*/
|
|
76
|
+
class SciIconFontGlyphComponent {
|
|
77
|
+
/**
|
|
78
|
+
* Specifies the ligature of the icon.
|
|
79
|
+
*/
|
|
80
|
+
ligature = input.required(/* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "ligature" }] : /* istanbul ignore next */ []));
|
|
82
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SciIconFontGlyphComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
83
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SciIconFontGlyphComponent, isStandalone: true, selector: "sci-icon-font-glyph", inputs: { ligature: { classPropertyName: "ligature", publicName: "ligature", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: '{{ligature()}}', isInline: true, styles: [":host{font-family:scion-icons;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;letter-spacing:0;font-feature-settings:\"liga\";font-variant-ligatures:discretionary-ligatures;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}\n"] });
|
|
84
|
+
}
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SciIconFontGlyphComponent, decorators: [{
|
|
86
|
+
type: Component,
|
|
87
|
+
args: [{ selector: 'sci-icon-font-glyph', template: '{{ligature()}}', styles: [":host{font-family:scion-icons;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;letter-spacing:0;font-feature-settings:\"liga\";font-variant-ligatures:discretionary-ligatures;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}\n"] }]
|
|
88
|
+
}], propDecorators: { ligature: [{ type: i0.Input, args: [{ isSignal: true, alias: "ligature", required: true }] }] } });
|
|
89
|
+
|
|
90
|
+
/*
|
|
91
|
+
* Copyright (c) 2018-2026 Swiss Federal Railways
|
|
92
|
+
*
|
|
93
|
+
* This program and the accompanying materials are made
|
|
94
|
+
* available under the terms of the Eclipse Public License 2.0
|
|
95
|
+
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
96
|
+
*
|
|
97
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
98
|
+
*/
|
|
99
|
+
/**
|
|
100
|
+
* Provides icons based on registered icon providers.
|
|
101
|
+
*/
|
|
102
|
+
class IconProviders {
|
|
103
|
+
_iconProviders = [
|
|
104
|
+
// Provide app-specific icons.
|
|
105
|
+
...inject(SCI_ICON_PROVIDER, { optional: true }) ?? [],
|
|
106
|
+
// Provide built-in icons.
|
|
107
|
+
scionIconProvider,
|
|
108
|
+
// Provide material icons.
|
|
109
|
+
materialIconProvider,
|
|
110
|
+
];
|
|
111
|
+
_injector = inject(Injector);
|
|
112
|
+
/**
|
|
113
|
+
* Provides the icon descriptor for the given icon based on icon providers registered under the {@link SCI_ICON_PROVIDER} DI token.
|
|
114
|
+
*
|
|
115
|
+
* Icon providers are called in registration order. If a provider does not provide the icon, the next provider is called, and so on.
|
|
116
|
+
*/
|
|
117
|
+
provide(icon) {
|
|
118
|
+
if (!icon) {
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
if (!this._iconProviders.length) {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
for (const iconProvider of this._iconProviders) {
|
|
125
|
+
const componentOrDescriptor = runInInjectionContext(this._injector, () => iconProvider(icon));
|
|
126
|
+
if (componentOrDescriptor) {
|
|
127
|
+
return typeof componentOrDescriptor === 'function' ? { component: componentOrDescriptor } : componentOrDescriptor;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: IconProviders, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
133
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: IconProviders, providedIn: 'root' });
|
|
134
|
+
}
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: IconProviders, decorators: [{
|
|
136
|
+
type: Injectable,
|
|
137
|
+
args: [{ providedIn: 'root' }]
|
|
138
|
+
}] });
|
|
139
|
+
/**
|
|
140
|
+
* Multi-DI token for injecting icon providers.
|
|
141
|
+
*
|
|
142
|
+
* @see provideIconProvider
|
|
143
|
+
* @see SciIconProviderFn
|
|
144
|
+
*/
|
|
145
|
+
const SCI_ICON_PROVIDER = new InjectionToken('SCI_ICON_PROVIDER');
|
|
146
|
+
|
|
147
|
+
/*
|
|
148
|
+
* Copyright (c) 2018-2026 Swiss Federal Railways
|
|
149
|
+
*
|
|
150
|
+
* This program and the accompanying materials are made
|
|
151
|
+
* available under the terms of the Eclipse Public License 2.0
|
|
152
|
+
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
153
|
+
*
|
|
154
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
155
|
+
*/
|
|
156
|
+
/**
|
|
157
|
+
* Renders an icon based on registered icon providers.
|
|
158
|
+
*
|
|
159
|
+
* Set the icon name as the slotted content of the `<sci-icon>` component.
|
|
160
|
+
*
|
|
161
|
+
* Example:
|
|
162
|
+
* ```html
|
|
163
|
+
* <sci-icon>home</sci-icon>
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* An icon provider can be registered using {@link provideIconProvider}.
|
|
167
|
+
*
|
|
168
|
+
* Providers are called in registration order. If a provider does not provide the icon, the next provider is called, and so on.
|
|
169
|
+
* If no provider provides the icon, defaults to a Material icon provider, interpreting the icon as a Material icon font ligature.
|
|
170
|
+
* Refer to https://fonts.google.com/icons for available Material icons and instructions on including the Material icon font.
|
|
171
|
+
*
|
|
172
|
+
* By default, the icon size is `1em`. To change the size, set the font-size on the `<sci-icon>` element or use the `--sci-icon-size` CSS variable.
|
|
173
|
+
*
|
|
174
|
+
* ```scss
|
|
175
|
+
* sci-icon {
|
|
176
|
+
* --sci-icon-size: 16px;
|
|
177
|
+
* }
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
180
|
+
* @see provideIconProvider
|
|
181
|
+
*
|
|
182
|
+
* TODO [Angular 23] Consider changing encapsulation to `IsolatedShadowDom` when stable. See branch: issue/icon-shadow-dom.
|
|
183
|
+
*/
|
|
184
|
+
class SciIconComponent {
|
|
185
|
+
_slottedContent = viewChild.required('slotted_content', /* @ts-ignore */
|
|
186
|
+
...(ngDevMode ? [{ debugName: "_slottedContent" }] : /* istanbul ignore next */ []));
|
|
187
|
+
icon = this.computeIcon();
|
|
188
|
+
/**
|
|
189
|
+
* Reads the icon from slotted content and passes it to registered icon providers for resolution.
|
|
190
|
+
*/
|
|
191
|
+
computeIcon() {
|
|
192
|
+
const icon = signal(undefined, /* @ts-ignore */
|
|
193
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
194
|
+
const iconProviders = inject(IconProviders);
|
|
195
|
+
effect(onCleanup => {
|
|
196
|
+
const slottedContent = this._slottedContent();
|
|
197
|
+
untracked(() => {
|
|
198
|
+
// Instantiate template to "read" slotted content.
|
|
199
|
+
const view = slottedContent.createEmbeddedView(undefined);
|
|
200
|
+
onCleanup(() => view.destroy());
|
|
201
|
+
// Return if empty, i.e., no icon to render.
|
|
202
|
+
if (!view.rootNodes.length) {
|
|
203
|
+
icon.set(undefined);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
// Ensure only text is provided as slotted content.
|
|
207
|
+
if (view.rootNodes.length > 1 || view.rootNodes[0].nodeType !== Node.TEXT_NODE) {
|
|
208
|
+
throw Error('[InvalidInputError] Only text (ligature) is allowed in slotted content of <sci-icon>.');
|
|
209
|
+
}
|
|
210
|
+
// Watch slotted content.
|
|
211
|
+
const textNode = view.rootNodes[0];
|
|
212
|
+
const subscription = of(textNode.textContent)
|
|
213
|
+
.pipe(concatWith(fromMutation$(textNode, { characterData: true }).pipe(map(() => textNode.textContent))), map(slottedContent => iconProviders.provide(slottedContent.trim() || undefined)), augmentIconDescriptor())
|
|
214
|
+
.subscribe(iconDescriptor => icon.set(iconDescriptor));
|
|
215
|
+
onCleanup(() => subscription.unsubscribe());
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
return icon;
|
|
219
|
+
}
|
|
220
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SciIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
221
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: SciIconComponent, isStandalone: true, selector: "sci-icon", viewQueries: [{ propertyName: "_slottedContent", first: true, predicate: ["slotted_content"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *sciComponentOutlet=\"icon()\"/>\n\n<!--Template to capture slotted content. -->\n<ng-template #slotted_content>\n <ng-content/>\n</ng-template>\n", styles: [":host{display:inline-grid;place-content:center;-webkit-user-select:none;user-select:none;height:var(--sci-icon-size, 1em);width:var(--sci-icon-size, 1em);overflow:hidden}\n"], dependencies: [{ kind: "directive", type: SciComponentOutletDirective, selector: "ng-template[sciComponentOutlet]", inputs: ["sciComponentOutlet"] }] });
|
|
222
|
+
}
|
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SciIconComponent, decorators: [{
|
|
224
|
+
type: Component,
|
|
225
|
+
args: [{ selector: 'sci-icon', imports: [
|
|
226
|
+
SciComponentOutletDirective,
|
|
227
|
+
], template: "<ng-container *sciComponentOutlet=\"icon()\"/>\n\n<!--Template to capture slotted content. -->\n<ng-template #slotted_content>\n <ng-content/>\n</ng-template>\n", styles: [":host{display:inline-grid;place-content:center;-webkit-user-select:none;user-select:none;height:var(--sci-icon-size, 1em);width:var(--sci-icon-size, 1em);overflow:hidden}\n"] }]
|
|
228
|
+
}], propDecorators: { _slottedContent: [{ type: i0.ViewChild, args: ['slotted_content', { isSignal: true }] }] } });
|
|
229
|
+
/**
|
|
230
|
+
* Augments the icon descriptor:
|
|
231
|
+
*
|
|
232
|
+
* - Prevents the browser from translating the icon.
|
|
233
|
+
* - Sets the icon's font size to 'var(--sci-icon-size, 1em)', required to inherit the location's font size for icons with a fixed font size.
|
|
234
|
+
* For example, Material sets a fixed font size of 24px.
|
|
235
|
+
*/
|
|
236
|
+
function augmentIconDescriptor() {
|
|
237
|
+
return map((icon) => icon && {
|
|
238
|
+
...icon,
|
|
239
|
+
attributes: computed(() => ({
|
|
240
|
+
...coerceSignal(icon.attributes)?.(),
|
|
241
|
+
translate: 'no',
|
|
242
|
+
})),
|
|
243
|
+
directives: [
|
|
244
|
+
...icon.directives ?? [],
|
|
245
|
+
IconFontSizeDirective,
|
|
246
|
+
],
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Sets the font size to 'var(--sci-icon-size, 1em)', required to inherit the location's font size for icons with a fixed font size.
|
|
251
|
+
* For example, Material sets a fixed font size of 24px.
|
|
252
|
+
*/
|
|
253
|
+
class IconFontSizeDirective {
|
|
254
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: IconFontSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
255
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: IconFontSizeDirective, isStandalone: true, host: { properties: { "style.font-size": "'var(--sci-icon-size, 1em)'" } }, ngImport: i0 });
|
|
256
|
+
}
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: IconFontSizeDirective, decorators: [{
|
|
258
|
+
type: Directive,
|
|
259
|
+
args: [{ host: { '[style.font-size]': `'var(--sci-icon-size, 1em)'` } }]
|
|
260
|
+
}] });
|
|
261
|
+
|
|
262
|
+
/*
|
|
263
|
+
* Copyright (c) 2018-2026 Swiss Federal Railways
|
|
264
|
+
*
|
|
265
|
+
* This program and the accompanying materials are made
|
|
266
|
+
* available under the terms of the Eclipse Public License 2.0
|
|
267
|
+
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
268
|
+
*
|
|
269
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
270
|
+
*/
|
|
271
|
+
/**
|
|
272
|
+
* Enables contribution or replacement of icons used in SCION.
|
|
273
|
+
*
|
|
274
|
+
* An icon provider is a function that returns a component for an icon. The component renders the icon.
|
|
275
|
+
*
|
|
276
|
+
* Multiple icon providers can be registered. Providers are called in registration order. If a provider does not provide the icon,
|
|
277
|
+
* the next provider is called, and so on.
|
|
278
|
+
*
|
|
279
|
+
* Defaults to a Material icon provider, interpreting the icon as a Material icon ligature.
|
|
280
|
+
*
|
|
281
|
+
* Refer to https://fonts.google.com/icons for available Material icons and https://developers.google.com/fonts/docs/material_symbols#use_in_web
|
|
282
|
+
* for instructions on including the Material icon font.
|
|
283
|
+
*
|
|
284
|
+
* @example - Importing the Material icon font in `styles.scss`
|
|
285
|
+
* ```scss
|
|
286
|
+
* @import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..24,400,0&display=block');
|
|
287
|
+
* ```
|
|
288
|
+
*
|
|
289
|
+
* SCION uses the following built-in icons:
|
|
290
|
+
* - scion.add : Add an item
|
|
291
|
+
* - scion.add_large : Add an item (large)
|
|
292
|
+
* - scion.bin : Bin symbol
|
|
293
|
+
* - scion.checkmark : Indicates a selected option
|
|
294
|
+
* - scion.chevron_down : Chevron down symbol
|
|
295
|
+
* - scion.chevron_left : Chevron left symbol
|
|
296
|
+
* - scion.chevron_right : Chevron right symbol
|
|
297
|
+
* - scion.chevron_up : Chevron up symbol
|
|
298
|
+
* - scion.clear : Clear items
|
|
299
|
+
* - scion.close : Close a popover
|
|
300
|
+
* - scion.collapse_all : Collapse all items
|
|
301
|
+
* - scion.copy : Copy an item
|
|
302
|
+
* - scion.delete : Delete an item
|
|
303
|
+
* - scion.dirty : Indicates unsaved data
|
|
304
|
+
* - scion.drag_handle : Drag or move an item
|
|
305
|
+
* - scion.duplicate : Duplicate an item
|
|
306
|
+
* - scion.edit : Edit an item
|
|
307
|
+
* - scion.emdash : Em dash symbol
|
|
308
|
+
* - scion.envelope : Envelope symbol
|
|
309
|
+
* - scion.envelope_closed : Indicates a closed envelope
|
|
310
|
+
* - scion.envelope_opened : Indicates an opened envelope
|
|
311
|
+
* - scion.expand_all : Expand an item
|
|
312
|
+
* - scion.external_link : Open link in a new tab
|
|
313
|
+
* - scion.filter : Set or change a filter
|
|
314
|
+
* - scion.find : Find an item
|
|
315
|
+
* - scion.folder : Directory symbol
|
|
316
|
+
* - scion.help : Indicates help, support, or documentation
|
|
317
|
+
* - scion.hide : Hide a panel
|
|
318
|
+
* - scion.magnifier : Magnifier symbol
|
|
319
|
+
* - scion.minimize : Minimize a panel
|
|
320
|
+
* - scion.minus : Minus sign
|
|
321
|
+
* - scion.modified : Indicates modified data
|
|
322
|
+
* - scion.more_horizontal : Show a popover to the left or right
|
|
323
|
+
* - scion.more_vertical : Show a popover above or below
|
|
324
|
+
* - scion.new : Create an item
|
|
325
|
+
* - scion.new_large : Create an item (large)
|
|
326
|
+
* - scion.paste : Paste from clipboard
|
|
327
|
+
* - scion.pen : Pen symbol
|
|
328
|
+
* - scion.pin : Pin an item
|
|
329
|
+
* - scion.pinned : Indicates a pinned item
|
|
330
|
+
* - scion.placeholder_frame : Placeholder symbol
|
|
331
|
+
* - scion.placeholder_image : Placeholder symbol for an image
|
|
332
|
+
* - scion.plus : Plus sign
|
|
333
|
+
* - scion.plus_large : Plus sign (large)
|
|
334
|
+
* - scion.remove : Remove an item (x)
|
|
335
|
+
* - scion.remove_minus : Remove an item (-)
|
|
336
|
+
* - scion.reset : Reset a form
|
|
337
|
+
* - scion.search : Search for an item
|
|
338
|
+
* - scion.sort_ascending : Sort items in ascending order (A-Z, 0-9)
|
|
339
|
+
* - scion.sort_by : Change sort order
|
|
340
|
+
* - scion.sort_descending : Sort items in descending order (Z-A, 9-0)
|
|
341
|
+
* - scion.user : User symbol
|
|
342
|
+
*
|
|
343
|
+
* To not replace built-in icons, the icon provider can return `undefined` for icons starting with the `scion.` prefix.
|
|
344
|
+
*
|
|
345
|
+
* The function can call `inject` to get any required dependencies.
|
|
346
|
+
*
|
|
347
|
+
* @see SciIconProviderFn
|
|
348
|
+
* @see SciIconComponent
|
|
349
|
+
*/
|
|
350
|
+
function provideIconProvider(iconProviderFn) {
|
|
351
|
+
return makeEnvironmentProviders(iconProviderFn ? [
|
|
352
|
+
{
|
|
353
|
+
provide: SCI_ICON_PROVIDER,
|
|
354
|
+
useValue: iconProviderFn,
|
|
355
|
+
multi: true,
|
|
356
|
+
},
|
|
357
|
+
] : []);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/*
|
|
361
|
+
* Copyright (c) 2018-2026 Swiss Federal Railways
|
|
362
|
+
*
|
|
363
|
+
* This program and the accompanying materials are made
|
|
364
|
+
* available under the terms of the Eclipse Public License 2.0
|
|
365
|
+
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
366
|
+
*
|
|
367
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
368
|
+
*/
|
|
369
|
+
/*
|
|
370
|
+
* Secondary entrypoint: '@scion/components/icon'
|
|
371
|
+
*
|
|
372
|
+
* @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md
|
|
373
|
+
*/
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Generated bundle index. Do not edit.
|
|
377
|
+
*/
|
|
378
|
+
|
|
379
|
+
export { SciIconComponent, provideIconProvider };
|
|
380
|
+
//# sourceMappingURL=scion-components-icon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scion-components-icon.mjs","sources":["../../../../projects/scion/components/icon/src/material-icon-provider.ts","../../../../projects/scion/components/icon/src/scion-icon-provider.ts","../../../../projects/scion/components/icon/src/icon-providers.ts","../../../../projects/scion/components/icon/src/icon.component.ts","../../../../projects/scion/components/icon/src/icon.component.html","../../../../projects/scion/components/icon/src/icon.provider.ts","../../../../projects/scion/components/icon/src/public_api.ts","../../../../projects/scion/components/icon/src/scion-components-icon.ts"],"sourcesContent":["/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Component, input, inputBinding} from '@angular/core';\nimport {SciIconProviderFn} from './icon.provider';\nimport {SciComponentDescriptor} from '@scion/components/common';\n\n/**\n * Provides Material icons for non-scion icons.\n */\nexport const materialIconProvider: SciIconProviderFn = (ligature: string): SciComponentDescriptor | undefined => {\n if (ligature.startsWith('scion.')) {\n return undefined; // delegate to next provider\n }\n\n return {component: MaterialIconComponent, bindings: [inputBinding('ligature', () => ligature)]};\n};\n\n/**\n * Renders a Material icon based on its ligature.\n *\n * This component requires a Material icon font to be included in the HTML.\n *\n * Supported fonts:\n * - https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded\n * - https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined\n * - https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp\n * - https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Round|Material+Icons+Sharp\n */\n@Component({\n selector: 'sci-material-icon',\n template: '{{ligature()}}',\n styles: `\n :host {\n font-family: 'Material Symbols Rounded', 'Material Symbols Outlined', 'Material Symbols Sharp', 'Material Icons', 'Material Icons Outlined', 'Material Icons Round', 'Material Icons Sharp';\n font-weight: normal;\n font-style: normal;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased;\n }\n `,\n})\nexport class MaterialIconComponent {\n /**\n * Specifies the ligature of the Material icon.\n */\n public readonly ligature = input.required<string>();\n}\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Component, input, inputBinding} from '@angular/core';\nimport {SciIconProviderFn} from './icon.provider';\nimport {SciComponentDescriptor} from '@scion/components/common';\n\n/**\n * Provides icons used in SCION libraries.\n *\n * Register this provider as the last icon provider, enabling replacement of built-in SCION icons.\n */\nexport const scionIconProvider: SciIconProviderFn = (icon: string): SciComponentDescriptor | undefined => {\n const ligature = icon.startsWith('scion.') ? icon.substring('scion.'.length) : undefined;\n if (ligature) {\n return {component: SciIconFontGlyphComponent, bindings: [inputBinding('ligature', () => ligature)]};\n }\n return undefined;\n};\n\n/**\n * Renders the icon for a ligature of the SCION icon font.\n *\n * This component requires the SCION icon font 'scion-icons' to be included in the HTML.\n */\n@Component({\n selector: 'sci-icon-font-glyph',\n template: '{{ligature()}}',\n styles: `\n :host {\n font-family: 'scion-icons';\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Enable Ligatures */\n letter-spacing: 0;\n font-feature-settings: \"liga\";\n font-variant-ligatures: discretionary-ligatures;\n\n /* Better Font Rendering */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n `,\n})\nexport class SciIconFontGlyphComponent {\n\n /**\n * Specifies the ligature of the icon.\n */\n public readonly ligature = input.required<string>();\n}\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {inject, Injectable, InjectionToken, Injector, runInInjectionContext} from '@angular/core';\nimport {materialIconProvider} from './material-icon-provider';\nimport {scionIconProvider} from './scion-icon-provider';\nimport {SciIconProviderFn} from './icon.provider';\nimport {SciComponentDescriptor} from '@scion/components/common';\n\n/**\n * Provides icons based on registered icon providers.\n */\n@Injectable({providedIn: 'root'})\nexport class IconProviders {\n\n private readonly _iconProviders: SciIconProviderFn[] = [\n // Provide app-specific icons.\n ...inject(SCI_ICON_PROVIDER, {optional: true}) ?? [],\n // Provide built-in icons.\n scionIconProvider,\n // Provide material icons.\n materialIconProvider,\n ];\n private readonly _injector = inject(Injector);\n\n /**\n * Provides the icon descriptor for the given icon based on icon providers registered under the {@link SCI_ICON_PROVIDER} DI token.\n *\n * Icon providers are called in registration order. If a provider does not provide the icon, the next provider is called, and so on.\n */\n public provide(icon: string | undefined): SciComponentDescriptor | undefined {\n if (!icon) {\n return undefined;\n }\n\n if (!this._iconProviders.length) {\n return undefined;\n }\n\n for (const iconProvider of this._iconProviders) {\n const componentOrDescriptor = runInInjectionContext(this._injector, () => iconProvider(icon));\n if (componentOrDescriptor) {\n return typeof componentOrDescriptor === 'function' ? {component: componentOrDescriptor} : componentOrDescriptor;\n }\n }\n return undefined;\n }\n}\n\n/**\n * Multi-DI token for injecting icon providers.\n *\n * @see provideIconProvider\n * @see SciIconProviderFn\n */\nexport const SCI_ICON_PROVIDER = new InjectionToken<SciIconProviderFn[]>('SCI_ICON_PROVIDER');\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Component, computed, Directive, effect, inject, signal, Signal, TemplateRef, untracked, viewChild} from '@angular/core';\nimport {coerceSignal, SciComponentDescriptor, SciComponentOutletDirective} from '@scion/components/common';\nimport {IconProviders} from './icon-providers';\nimport {fromMutation$} from '@scion/toolkit/observable';\nimport {concatWith, map, MonoTypeOperatorFunction, of} from 'rxjs';\n\n/**\n * Renders an icon based on registered icon providers.\n *\n * Set the icon name as the slotted content of the `<sci-icon>` component.\n *\n * Example:\n * ```html\n * <sci-icon>home</sci-icon>\n * ```\n *\n * An icon provider can be registered using {@link provideIconProvider}.\n *\n * Providers are called in registration order. If a provider does not provide the icon, the next provider is called, and so on.\n * If no provider provides the icon, defaults to a Material icon provider, interpreting the icon as a Material icon font ligature.\n * Refer to https://fonts.google.com/icons for available Material icons and instructions on including the Material icon font.\n *\n * By default, the icon size is `1em`. To change the size, set the font-size on the `<sci-icon>` element or use the `--sci-icon-size` CSS variable.\n *\n * ```scss\n * sci-icon {\n * --sci-icon-size: 16px;\n * }\n * ```\n *\n * @see provideIconProvider\n *\n * TODO [Angular 23] Consider changing encapsulation to `IsolatedShadowDom` when stable. See branch: issue/icon-shadow-dom.\n */\n@Component({\n selector: 'sci-icon',\n templateUrl: './icon.component.html',\n styleUrl: './icon.component.scss',\n imports: [\n SciComponentOutletDirective,\n ],\n})\nexport class SciIconComponent {\n\n private readonly _slottedContent = viewChild.required<TemplateRef<void>>('slotted_content');\n\n protected readonly icon = this.computeIcon();\n\n /**\n * Reads the icon from slotted content and passes it to registered icon providers for resolution.\n */\n private computeIcon(): Signal<SciComponentDescriptor | undefined> {\n const icon = signal<SciComponentDescriptor | undefined>(undefined);\n const iconProviders = inject(IconProviders);\n\n effect(onCleanup => {\n const slottedContent = this._slottedContent();\n\n untracked(() => {\n // Instantiate template to \"read\" slotted content.\n const view = slottedContent.createEmbeddedView(undefined);\n onCleanup(() => view.destroy());\n\n // Return if empty, i.e., no icon to render.\n if (!view.rootNodes.length) {\n icon.set(undefined);\n return;\n }\n\n // Ensure only text is provided as slotted content.\n if (view.rootNodes.length > 1 || (view.rootNodes[0] as Element).nodeType !== Node.TEXT_NODE) {\n throw Error('[InvalidInputError] Only text (ligature) is allowed in slotted content of <sci-icon>.');\n }\n\n // Watch slotted content.\n const textNode = view.rootNodes[0] as Text;\n const subscription = of(textNode.textContent)\n .pipe(\n concatWith(fromMutation$(textNode, {characterData: true}).pipe(map(() => textNode.textContent))),\n map(slottedContent => iconProviders.provide(slottedContent.trim() || undefined)),\n augmentIconDescriptor(),\n )\n .subscribe(iconDescriptor => icon.set(iconDescriptor));\n\n onCleanup(() => subscription.unsubscribe());\n });\n });\n\n return icon;\n }\n}\n\n/**\n * Augments the icon descriptor:\n *\n * - Prevents the browser from translating the icon.\n * - Sets the icon's font size to 'var(--sci-icon-size, 1em)', required to inherit the location's font size for icons with a fixed font size.\n * For example, Material sets a fixed font size of 24px.\n */\nfunction augmentIconDescriptor(): MonoTypeOperatorFunction<SciComponentDescriptor | undefined> {\n return map((icon: SciComponentDescriptor | undefined) => icon && {\n ...icon,\n attributes: computed(() => ({\n ...coerceSignal(icon.attributes)?.(),\n translate: 'no',\n })),\n directives: [\n ...icon.directives ?? [],\n IconFontSizeDirective,\n ],\n } satisfies SciComponentDescriptor);\n}\n\n/**\n * Sets the font size to 'var(--sci-icon-size, 1em)', required to inherit the location's font size for icons with a fixed font size.\n * For example, Material sets a fixed font size of 24px.\n */\n@Directive({host: {'[style.font-size]': `'var(--sci-icon-size, 1em)'`}})\nclass IconFontSizeDirective {\n}\n","<ng-container *sciComponentOutlet=\"icon()\"/>\n\n<!--Template to capture slotted content. -->\n<ng-template #slotted_content>\n <ng-content/>\n</ng-template>\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\nimport {SCI_ICON_PROVIDER} from './icon-providers';\nimport {ComponentType} from '@angular/cdk/portal';\nimport {SciComponentDescriptor} from '@scion/components/common';\n\n/**\n * Enables contribution or replacement of icons used in SCION.\n *\n * An icon provider is a function that returns a component for an icon. The component renders the icon.\n *\n * Multiple icon providers can be registered. Providers are called in registration order. If a provider does not provide the icon,\n * the next provider is called, and so on.\n *\n * Defaults to a Material icon provider, interpreting the icon as a Material icon ligature.\n *\n * Refer to https://fonts.google.com/icons for available Material icons and https://developers.google.com/fonts/docs/material_symbols#use_in_web\n * for instructions on including the Material icon font.\n *\n * @example - Importing the Material icon font in `styles.scss`\n * ```scss\n * @import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..24,400,0&display=block');\n * ```\n *\n * SCION uses the following built-in icons:\n * - scion.add : Add an item\n * - scion.add_large : Add an item (large)\n * - scion.bin : Bin symbol\n * - scion.checkmark : Indicates a selected option\n * - scion.chevron_down : Chevron down symbol\n * - scion.chevron_left : Chevron left symbol\n * - scion.chevron_right : Chevron right symbol\n * - scion.chevron_up : Chevron up symbol\n * - scion.clear : Clear items\n * - scion.close : Close a popover\n * - scion.collapse_all : Collapse all items\n * - scion.copy : Copy an item\n * - scion.delete : Delete an item\n * - scion.dirty : Indicates unsaved data\n * - scion.drag_handle : Drag or move an item\n * - scion.duplicate : Duplicate an item\n * - scion.edit : Edit an item\n * - scion.emdash : Em dash symbol\n * - scion.envelope : Envelope symbol\n * - scion.envelope_closed : Indicates a closed envelope\n * - scion.envelope_opened : Indicates an opened envelope\n * - scion.expand_all : Expand an item\n * - scion.external_link : Open link in a new tab\n * - scion.filter : Set or change a filter\n * - scion.find : Find an item\n * - scion.folder : Directory symbol\n * - scion.help : Indicates help, support, or documentation\n * - scion.hide : Hide a panel\n * - scion.magnifier : Magnifier symbol\n * - scion.minimize : Minimize a panel\n * - scion.minus : Minus sign\n * - scion.modified : Indicates modified data\n * - scion.more_horizontal : Show a popover to the left or right\n * - scion.more_vertical : Show a popover above or below\n * - scion.new : Create an item\n * - scion.new_large : Create an item (large)\n * - scion.paste : Paste from clipboard\n * - scion.pen : Pen symbol\n * - scion.pin : Pin an item\n * - scion.pinned : Indicates a pinned item\n * - scion.placeholder_frame : Placeholder symbol\n * - scion.placeholder_image : Placeholder symbol for an image\n * - scion.plus : Plus sign\n * - scion.plus_large : Plus sign (large)\n * - scion.remove : Remove an item (x)\n * - scion.remove_minus : Remove an item (-)\n * - scion.reset : Reset a form\n * - scion.search : Search for an item\n * - scion.sort_ascending : Sort items in ascending order (A-Z, 0-9)\n * - scion.sort_by : Change sort order\n * - scion.sort_descending : Sort items in descending order (Z-A, 9-0)\n * - scion.user : User symbol\n *\n * To not replace built-in icons, the icon provider can return `undefined` for icons starting with the `scion.` prefix.\n *\n * The function can call `inject` to get any required dependencies.\n *\n * @see SciIconProviderFn\n * @see SciIconComponent\n */\nexport function provideIconProvider(iconProviderFn: SciIconProviderFn | undefined): EnvironmentProviders {\n return makeEnvironmentProviders(iconProviderFn ? [\n {\n provide: SCI_ICON_PROVIDER,\n useValue: iconProviderFn,\n multi: true,\n },\n ] : []);\n}\n\n/**\n * Signature of a function to provide icons.\n *\n * An icon provider is a function that returns the component for an icon. The component renders the icon.\n *\n * Alternatively, the icon provider can return a descriptor, allowing for additional configuration such as inputs.\n * Inputs are available as input properties in the component. The component can use the inputs to render the icon.\n *\n * Icon keys used by SCION start with the `scion.` prefix. To not replace built-in icons, the icon provider can\n * return `undefined` for icons starting with the `scion.` prefix.\n *\n * An icon provider can be registered via {@link provideIconProvider} function.\n *\n * The function can call `inject` to get any required dependencies.\n *\n * @param icon - The key of the icon for which to provide the icon component.\n * @returns ComponentType or {@link SciComponentDescriptor} to render the icon, or `undefined` if not provided by the icon provider.\n */\nexport type SciIconProviderFn = (icon: string) => ComponentType<unknown> | SciComponentDescriptor | undefined;\n","/*\n * Copyright (c) 2018-2026 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\n/*\n * Secondary entrypoint: '@scion/components/icon'\n *\n * @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md\n */\nexport {SciIconComponent} from './icon.component';\nexport {provideIconProvider, type SciIconProviderFn} from './icon.provider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;AAQG;AAMH;;AAEG;AACI,MAAM,oBAAoB,GAAsB,CAAC,QAAgB,KAAwC;AAC9G,IAAA,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QACjC,OAAO,SAAS,CAAC;IACnB;AAEA,IAAA,OAAO,EAAC,SAAS,EAAE,qBAAqB,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,QAAQ,CAAC,CAAC,EAAC;AACjG,CAAC;AAED;;;;;;;;;;AAU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