@flyos/design-system 3.0.0 → 3.1.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.
|
@@ -47,7 +47,7 @@ import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
|
47
47
|
// tools/publish-library.ps1 at bump time, and asserted by the spec beside this file.
|
|
48
48
|
// Used only for the diagnostic message; the duplicate-instance detection itself is
|
|
49
49
|
// version-agnostic, so a stale literal misnames a fork rather than hiding one.
|
|
50
|
-
const FLY_DS_VERSION = '3.
|
|
50
|
+
const FLY_DS_VERSION = '3.1.0';
|
|
51
51
|
const FLY_DS_REGISTRY_KEY = '__FLY_DS_INSTANCES__';
|
|
52
52
|
/**
|
|
53
53
|
* Records this design-system instance on the shared `scope` and returns the
|
|
@@ -1323,6 +1323,15 @@ const DS_BASELINE_LOCALES = {
|
|
|
1323
1323
|
'app_unavailable.unreachable.title': 'App unavailable',
|
|
1324
1324
|
'app_unavailable.unreachable.message': "{{app}} can't be reached right now. Nothing was changed — please try again in a moment.",
|
|
1325
1325
|
'common.action.cancel': 'Cancel',
|
|
1326
|
+
'common.action.close': 'Close',
|
|
1327
|
+
'common.abort': 'Abort',
|
|
1328
|
+
'common.ignore': 'Ignore',
|
|
1329
|
+
'common.retry': 'Retry',
|
|
1330
|
+
'common.loading': 'Loading…',
|
|
1331
|
+
'common.remove': 'Remove',
|
|
1332
|
+
'common.yes': 'Yes',
|
|
1333
|
+
'common.no': 'No',
|
|
1334
|
+
'common.ok': 'OK',
|
|
1326
1335
|
'common.label.apply': 'Apply',
|
|
1327
1336
|
'common.label.formatting_toolbar': 'Formatting toolbar',
|
|
1328
1337
|
'common.label.https': 'https://…',
|
|
@@ -1423,7 +1432,7 @@ const DS_BASELINE_LOCALES = {
|
|
|
1423
1432
|
'search.placeholder': 'Search…',
|
|
1424
1433
|
'search.clear': 'Clear search',
|
|
1425
1434
|
'search.open': 'Search',
|
|
1426
|
-
'search.filters':
|
|
1435
|
+
'search.filters': 'Filters',
|
|
1427
1436
|
// skeleton (fly-skeleton)
|
|
1428
1437
|
'skeleton.loading': 'Loading…',
|
|
1429
1438
|
// typeahead (fly-typeahead)
|
|
@@ -1697,6 +1706,15 @@ const DS_BASELINE_LOCALES = {
|
|
|
1697
1706
|
'app_unavailable.unreachable.title': 'التطبيق غير متاح',
|
|
1698
1707
|
'app_unavailable.unreachable.message': 'تعذّر الوصول إلى {{app}} حاليًا. لم يتم تغيير أي شيء — يرجى المحاولة بعد قليل.',
|
|
1699
1708
|
'common.action.cancel': 'إلغاء',
|
|
1709
|
+
'common.action.close': 'إغلاق',
|
|
1710
|
+
'common.abort': 'إلغاء العملية',
|
|
1711
|
+
'common.ignore': 'تجاهل',
|
|
1712
|
+
'common.retry': 'إعادة المحاولة',
|
|
1713
|
+
'common.loading': 'جارٍ التحميل…',
|
|
1714
|
+
'common.remove': 'إزالة',
|
|
1715
|
+
'common.yes': 'نعم',
|
|
1716
|
+
'common.no': 'لا',
|
|
1717
|
+
'common.ok': 'موافق',
|
|
1700
1718
|
'common.label.apply': 'تطبيق',
|
|
1701
1719
|
'common.label.formatting_toolbar': 'شريط أدوات التنسيق',
|
|
1702
1720
|
'common.label.https': 'https://…',
|
|
@@ -1796,7 +1814,7 @@ const DS_BASELINE_LOCALES = {
|
|
|
1796
1814
|
'search.placeholder': 'بحث…',
|
|
1797
1815
|
'search.clear': 'مسح البحث',
|
|
1798
1816
|
'search.open': 'بحث',
|
|
1799
|
-
'search.filters':
|
|
1817
|
+
'search.filters': 'عوامل التصفية',
|
|
1800
1818
|
// skeleton (fly-skeleton)
|
|
1801
1819
|
'skeleton.loading': 'جارٍ التحميل…',
|
|
1802
1820
|
// typeahead (fly-typeahead)
|
|
@@ -2070,6 +2088,15 @@ const DS_BASELINE_LOCALES = {
|
|
|
2070
2088
|
'app_unavailable.unreachable.title': 'Application indisponible',
|
|
2071
2089
|
'app_unavailable.unreachable.message': '{{app}} est injoignable pour le moment. Rien n’a été modifié — veuillez réessayer dans un instant.',
|
|
2072
2090
|
'common.action.cancel': 'Annuler',
|
|
2091
|
+
'common.action.close': 'Fermer',
|
|
2092
|
+
'common.abort': 'Abandonner',
|
|
2093
|
+
'common.ignore': 'Ignorer',
|
|
2094
|
+
'common.retry': 'Réessayer',
|
|
2095
|
+
'common.loading': 'Chargement…',
|
|
2096
|
+
'common.remove': 'Supprimer',
|
|
2097
|
+
'common.yes': 'Oui',
|
|
2098
|
+
'common.no': 'Non',
|
|
2099
|
+
'common.ok': 'OK',
|
|
2073
2100
|
'common.label.apply': 'Appliquer',
|
|
2074
2101
|
'common.label.formatting_toolbar': "Barre d'outils de mise en forme",
|
|
2075
2102
|
'common.label.https': 'https://…',
|
|
@@ -2169,7 +2196,7 @@ const DS_BASELINE_LOCALES = {
|
|
|
2169
2196
|
'search.placeholder': 'Rechercher…',
|
|
2170
2197
|
'search.clear': 'Effacer la recherche',
|
|
2171
2198
|
'search.open': 'Rechercher',
|
|
2172
|
-
'search.filters':
|
|
2199
|
+
'search.filters': 'Filtres',
|
|
2173
2200
|
// skeleton (fly-skeleton)
|
|
2174
2201
|
'skeleton.loading': 'Chargement…',
|
|
2175
2202
|
// typeahead (fly-typeahead)
|
|
@@ -2387,14 +2414,14 @@ const DS_BASELINE_LOCALES = {
|
|
|
2387
2414
|
'chat_composer.label.mention_suggestions': 'Suggestions de mention',
|
|
2388
2415
|
// app-surface component library (fly-card / -data-table / -pagination /
|
|
2389
2416
|
// -filter-panel / forms / overlays). Absorbed with the kit from Circles.
|
|
2390
|
-
'ui.action.addMoreOptions':
|
|
2417
|
+
'ui.action.addMoreOptions': "Plus d'options",
|
|
2391
2418
|
'ui.action.cancel': 'Annuler',
|
|
2392
2419
|
'ui.action.clear': 'Effacer',
|
|
2393
2420
|
'ui.action.clearFilters': 'Effacer les filtres',
|
|
2394
2421
|
'ui.action.close': 'Fermer',
|
|
2395
2422
|
'ui.action.confirm': 'Confirmer',
|
|
2396
2423
|
'ui.action.dismiss': 'Ignorer',
|
|
2397
|
-
'ui.action.fewerOptions':
|
|
2424
|
+
'ui.action.fewerOptions': "Moins d'options",
|
|
2398
2425
|
'ui.action.open': 'Ouvrir',
|
|
2399
2426
|
'ui.action.retry': 'Réessayer',
|
|
2400
2427
|
'ui.action.save': 'Enregistrer',
|
|
@@ -2403,7 +2430,7 @@ const DS_BASELINE_LOCALES = {
|
|
|
2403
2430
|
'ui.confirm.typeToConfirm': 'Saisissez {{text}} pour confirmer',
|
|
2404
2431
|
'ui.filters.title': 'Filtres',
|
|
2405
2432
|
'ui.form.autoSaving': 'Enregistrement automatique',
|
|
2406
|
-
'ui.nav.breadcrumbs':
|
|
2433
|
+
'ui.nav.breadcrumbs': "Fil d'Ariane",
|
|
2407
2434
|
'ui.nav.home': 'Accueil',
|
|
2408
2435
|
'ui.nav.modules': 'Modules',
|
|
2409
2436
|
'ui.nav.selectModule': 'Choisir un module',
|
|
@@ -2443,6 +2470,15 @@ const DS_BASELINE_LOCALES = {
|
|
|
2443
2470
|
'app_unavailable.unreachable.title': 'ایپ دستیاب نہیں',
|
|
2444
2471
|
'app_unavailable.unreachable.message': '{{app}} تک ابھی رسائی ممکن نہیں۔ کچھ تبدیل نہیں ہوا — براہِ کرم تھوڑی دیر بعد کوشش کریں۔',
|
|
2445
2472
|
'common.action.cancel': 'منسوخ کریں',
|
|
2473
|
+
'common.action.close': 'بند کریں',
|
|
2474
|
+
'common.abort': 'منسوخ کریں',
|
|
2475
|
+
'common.ignore': 'نظرانداز کریں',
|
|
2476
|
+
'common.retry': 'دوبارہ کوشش کریں',
|
|
2477
|
+
'common.loading': 'لوڈ ہو رہا ہے…',
|
|
2478
|
+
'common.remove': 'ہٹائیں',
|
|
2479
|
+
'common.yes': 'ہاں',
|
|
2480
|
+
'common.no': 'نہیں',
|
|
2481
|
+
'common.ok': 'ٹھیک ہے',
|
|
2446
2482
|
'common.label.apply': 'لاگو کریں',
|
|
2447
2483
|
'common.label.formatting_toolbar': 'فارمیٹنگ ٹول بار',
|
|
2448
2484
|
'common.label.https': 'https://…',
|
|
@@ -2541,7 +2577,7 @@ const DS_BASELINE_LOCALES = {
|
|
|
2541
2577
|
'search.placeholder': 'تلاش کریں…',
|
|
2542
2578
|
'search.clear': 'تلاش صاف کریں',
|
|
2543
2579
|
'search.open': 'تلاش کریں',
|
|
2544
|
-
'search.filters':
|
|
2580
|
+
'search.filters': 'فلٹرز',
|
|
2545
2581
|
// skeleton (fly-skeleton)
|
|
2546
2582
|
'skeleton.loading': 'لوڈ ہو رہا ہے…',
|
|
2547
2583
|
// typeahead (fly-typeahead)
|
|
@@ -15855,7 +15891,9 @@ function actionFingerprint(action) {
|
|
|
15855
15891
|
paramsFingerprint(menu.titleParams),
|
|
15856
15892
|
menu.value,
|
|
15857
15893
|
menu.defaultValue,
|
|
15858
|
-
|
|
15894
|
+
// `label ?? null` so a RENAMED tenant row (campaign, area) repaints; null keeps a
|
|
15895
|
+
// key-only option's fingerprint byte-identical to what it was before the field existed.
|
|
15896
|
+
menu.options.map((o) => [o.value, o.labelKey, paramsFingerprint(o.labelParams), o.label ?? null]),
|
|
15859
15897
|
!!menu.onSelect,
|
|
15860
15898
|
]
|
|
15861
15899
|
: null,
|
|
@@ -15945,6 +15983,9 @@ function projectMenu(action, handlers) {
|
|
|
15945
15983
|
value: o.value,
|
|
15946
15984
|
labelKey: o.labelKey,
|
|
15947
15985
|
...(o.labelParams === undefined ? {} : { labelParams: o.labelParams }),
|
|
15986
|
+
// Conditional, like every other optional field here: an explicit `label: undefined` is
|
|
15987
|
+
// `in`-visible on the object and would make "absent" and "present but empty" compare equal.
|
|
15988
|
+
...(o.label === undefined ? {} : { label: o.label }),
|
|
15948
15989
|
})),
|
|
15949
15990
|
value: menu.value,
|
|
15950
15991
|
defaultValue: menu.defaultValue,
|
|
@@ -16845,7 +16886,13 @@ class FlyMagicActionsComponent {
|
|
|
16845
16886
|
if (!menu)
|
|
16846
16887
|
return this.resolvedLabel(action);
|
|
16847
16888
|
const current = menu.options.find((o) => o.value === menu.value);
|
|
16848
|
-
|
|
16889
|
+
// Same precedence as the rows — otherwise the trigger would announce a translated
|
|
16890
|
+
// placeholder while the open menu shows the tenant's actual name.
|
|
16891
|
+
const value = current
|
|
16892
|
+
? current.label?.trim()
|
|
16893
|
+
? current.label
|
|
16894
|
+
: this.i18n.t(current.labelKey, current.labelParams)
|
|
16895
|
+
: menu.value;
|
|
16849
16896
|
return this.i18n.t('magic_actions.radio_menu.trigger_label', {
|
|
16850
16897
|
label: this.resolvedLabel(action),
|
|
16851
16898
|
value,
|
|
@@ -16895,7 +16942,10 @@ class FlyMagicActionsComponent {
|
|
|
16895
16942
|
return [];
|
|
16896
16943
|
const items = menu.options.map((option) => ({
|
|
16897
16944
|
id: option.value,
|
|
16898
|
-
|
|
16945
|
+
// Tenant data wins over the key: `label` is a campaign/area name read from the publisher's
|
|
16946
|
+
// own rows, which no locale bundle can contain. Falls back to the key when absent OR when
|
|
16947
|
+
// the data-derived text is empty, so a blank row can never render as a nameless option.
|
|
16948
|
+
label: option.label?.trim() ? option.label : this.i18n.t(option.labelKey, option.labelParams),
|
|
16899
16949
|
// `selected` is what makes this a real radio menu rather than a list with
|
|
16900
16950
|
// a tick: `fly-context-menu` renders a selected row as
|
|
16901
16951
|
// `role="menuitemradio"` + `aria-checked`, with the check indicator and
|
|
@@ -16982,13 +17032,13 @@ class FlyMagicActionsComponent {
|
|
|
16982
17032
|
this.isOverflowing.set(!!el && el.scrollWidth - el.clientWidth > 1);
|
|
16983
17033
|
}
|
|
16984
17034
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: FlyMagicActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16985
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: FlyMagicActionsComponent, isStandalone: true, selector: "fly-magic-actions", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: true, transformFunction: null }, primary: { classPropertyName: "primary", publicName: "primary", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.dir": "i18n.direction()" } }, viewQueries: [{ propertyName: "rowRef", first: true, predicate: ["row"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\r\n Icon-only buttons carry the accessible name via [attr.aria-label] \u2014 the SVG\r\n glyph itself is aria-hidden (decorative, skill \u00A7accessibility rule 5). `kind:\r\n 'text'` actions rely on their own visible text instead. Disabled rows stay\r\n `aria-disabled` (never native `disabled`) so they remain focusable/hoverable \u2014\r\n a disabled action's whole point is to explain ITSELF via the auto-suffixed\r\n tooltip, which native `disabled` would suppress.\r\n\r\n The glyph is composed from ALLOWLISTED nodes bound as real attributes, never\r\n from `[innerHTML]`: `iconPath` is publisher-supplied, and an `<svg>` fragment\r\n is not a closed world (`<foreignObject>` is an HTML integration point, `<a\r\n xlink:href=\"javascript:\u2026\">` is live under the very click this button invites).\r\n `magic-actions-icon.ts` carries the full rationale; the shape below is its\r\n consequence \u2014 an attribute binding cannot introduce an element or a handler,\r\n so there is nothing left to sanitize.\r\n\r\n That block is authored ONCE, as `#actionButton`, and stamped by every place a\r\n contributed action is painted (group items and `primary`). It used to be\r\n inline in the group loop, which was fine while this component rendered groups\r\n only; with `primary` here too, a second copy would mean the next edit to the\r\n SECURITY-CRITICAL binding shape has to be made twice and can be made once.\r\n-->\r\n<ng-template #actionButton let-projected>\r\n <!--\r\n `let-projected` is `any` \u2014 Angular infers nothing for an `ngTemplateOutlet`\r\n context, and there is no built-in way to declare one. `asAction` is an\r\n identity function whose only job is to give this block a TYPED local, so\r\n every read below (`.kind`, `.disabled`, `.menu`) is checked by the template\r\n compiler instead of silently resolving to `undefined` on a typo. Without it\r\n the one place a `MagicBarActionView` is actually painted would be the one\r\n place its shape is not verified.\r\n -->\r\n @let action = asAction(projected);\r\n @if (action.kind === 'text') {\r\n <button\r\n type=\"button\"\r\n class=\"fma-btn fma-btn--text\"\r\n [attr.data-tone]=\"toneAttr(action)\"\r\n [attr.aria-disabled]=\"action.disabled ? 'true' : null\"\r\n [attr.aria-pressed]=\"pressedAttr(action)\"\r\n [flyTooltip]=\"tooltipFor(action)\"\r\n [flyTooltipDelay]=\"450\"\r\n (click)=\"activate(action, $event)\"\r\n >{{ resolvedLabel(action) }}</button>\r\n } @else {\r\n <button\r\n type=\"button\"\r\n class=\"fma-btn\"\r\n [class.fma-btn--badge]=\"hasBadge(action)\"\r\n [attr.data-tone]=\"toneAttr(action)\"\r\n [attr.aria-disabled]=\"action.disabled ? 'true' : null\"\r\n [attr.aria-pressed]=\"pressedAttr(action)\"\r\n [attr.aria-haspopup]=\"action.menu ? 'menu' : null\"\r\n [attr.aria-expanded]=\"action.menu ? (openMenuActionId() === action.id ? 'true' : 'false') : null\"\r\n [attr.aria-label]=\"action.menu ? triggerAriaLabel(action) : resolvedLabel(action)\"\r\n [flyTooltip]=\"tooltipFor(action)\"\r\n [flyTooltipDelay]=\"450\"\r\n (click)=\"activate(action, $event)\"\r\n >\r\n <svg\r\n class=\"fma-btn__icon\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"1.8\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n >\r\n @for (node of iconNodes(action); track $index) {\r\n @switch (node.tag) {\r\n @case ('path') {\r\n <svg:path\r\n [attr.d]=\"node.attrs['d']\"\r\n [attr.fill-rule]=\"node.attrs['fill-rule']\"\r\n [attr.clip-rule]=\"node.attrs['clip-rule']\"\r\n />\r\n }\r\n @case ('circle') {\r\n <svg:circle\r\n [attr.cx]=\"node.attrs['cx']\"\r\n [attr.cy]=\"node.attrs['cy']\"\r\n [attr.r]=\"node.attrs['r']\"\r\n />\r\n }\r\n @case ('rect') {\r\n <svg:rect\r\n [attr.x]=\"node.attrs['x']\"\r\n [attr.y]=\"node.attrs['y']\"\r\n [attr.width]=\"node.attrs['width']\"\r\n [attr.height]=\"node.attrs['height']\"\r\n [attr.rx]=\"node.attrs['rx']\"\r\n [attr.ry]=\"node.attrs['ry']\"\r\n />\r\n }\r\n @case ('ellipse') {\r\n <svg:ellipse\r\n [attr.cx]=\"node.attrs['cx']\"\r\n [attr.cy]=\"node.attrs['cy']\"\r\n [attr.rx]=\"node.attrs['rx']\"\r\n [attr.ry]=\"node.attrs['ry']\"\r\n />\r\n }\r\n @case ('line') {\r\n <svg:line\r\n [attr.x1]=\"node.attrs['x1']\"\r\n [attr.y1]=\"node.attrs['y1']\"\r\n [attr.x2]=\"node.attrs['x2']\"\r\n [attr.y2]=\"node.attrs['y2']\"\r\n />\r\n }\r\n @case ('polyline') {\r\n <svg:polyline [attr.points]=\"node.attrs['points']\" />\r\n }\r\n @case ('polygon') {\r\n <svg:polygon [attr.points]=\"node.attrs['points']\" />\r\n }\r\n }\r\n }\r\n </svg>\r\n @if (hasBadge(action)) {\r\n <span class=\"fma-btn__badge\" aria-hidden=\"true\"></span>\r\n }\r\n </button>\r\n }\r\n</ng-template>\r\n\r\n<!--\r\n `.fma` is the SCROLLING row and holds the contributed groups only. The accent\r\n CTA is a SIBLING of it, outside the fade mask and outside the scroll container,\r\n because it is the row's anchor \u2014 a call to action that dissolves into a\r\n gradient, or that you have to scroll sideways to reach, inverts the affordance.\r\n It is also what makes `isOverflowing` measurable at all: see the component.\r\n-->\r\n@if (groups().length) {\r\n <div #row class=\"fma\" [class.fma--overflow]=\"isOverflowing()\">\r\n @for (group of groups(); track group.id) {\r\n <div\r\n class=\"fma-group\"\r\n [class.fma-group--framed]=\"group.framed\"\r\n role=\"group\"\r\n [attr.aria-label]=\"i18n.t(group.labelKey)\"\r\n >\r\n @for (action of group.items; track action.id) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"actionButton\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n />\r\n }\r\n </div>\r\n @if (group.framed) {\r\n <span class=\"fma-sep\" aria-hidden=\"true\"></span>\r\n }\r\n }\r\n </div>\r\n}\r\n\r\n<!--\r\n The accent CTA. The disc is a WRAPPER, not a modifier on the button, and that\r\n is load-bearing rather than cosmetic: `.fma-btn`'s hover/press feedback is an\r\n `animation` (`iconWiggle` / `iconBounce`), and an animation that touches\r\n `transform` beats a declared `transform` \u2014 so a hover lift authored on the\r\n button itself would simply never render. The wrapper owns the disc, the lift\r\n and the shadow; the button stays transparent and keeps the DS's own toolbar\r\n feedback. It re-points `--chrome-ink` rather than styling `.fma-btn` through a\r\n descendant selector so the glyph colour inherits the way custom properties do.\r\n-->\r\n@if (primary(); as p) {\r\n <span class=\"fma-primary\" [class.fma-primary--disabled]=\"p.disabled\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"actionButton\"\r\n [ngTemplateOutletContext]=\"{ $implicit: p }\"\r\n />\r\n </span>\r\n}\r\n\r\n<!--\r\n ONE radio menu, hoisted out of the group loops (S1-review F9). Only one is open\r\n at a time (`openMenuActionId`), so a single instance is enough \u2014 and rendering\r\n it beside its button would insert a non-`.fma-btn` element into the group,\r\n silently shifting every later button's `:nth-child` index and with it the\r\n `toolbarPopIn` stagger delay the `.fma-btn` rule assigns. Keeping every\r\n staggered parent's children homogeneous is what makes that rule's comment true.\r\n It portals itself to <body>, so its position is unaffected by where it is\r\n declared.\r\n-->\r\n@if (openAction(); as open) {\r\n <fly-context-menu\r\n [anchor]=\"menuAnchorEl()\"\r\n [sections]=\"menuSections(open)\"\r\n (action)=\"onMenuAction(open, $event)\"\r\n (closed)=\"closeMenu()\"\r\n />\r\n}\r\n", styles: [":host{display:flex;align-items:center;gap:8px;min-inline-size:0}.fma{display:flex;align-items:center;gap:8px;flex:0 1 auto;min-inline-size:0;overflow:hidden;flex-wrap:nowrap}.fma--overflow{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%)}.fma--overflow::-webkit-scrollbar{display:none}:host([dir=rtl]) .fma--overflow{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%)}.fma-group{display:flex;align-items:center;gap:8px;flex:none}.fma-group--framed{gap:2px}.fma-sep{flex:0 0 auto;inline-size:1px;block-size:18px;background:var(--w14)}.fma-btn{position:relative;flex:0 0 auto;inline-size:30px;block-size:30px;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:var(--chrome-ink);cursor:pointer;padding:0;animation:toolbarPopIn .3s var(--nova-ease-structural) both}.fma-btn:nth-child(1){animation-delay:0ms}.fma-btn:nth-child(2){animation-delay:40ms}.fma-btn:nth-child(3){animation-delay:80ms}.fma-btn:nth-child(4){animation-delay:.12s}.fma-btn:nth-child(5){animation-delay:.16s}.fma-btn:nth-child(6){animation-delay:.2s}.fma-btn:nth-child(7){animation-delay:.24s}.fma-btn:nth-child(8){animation-delay:.28s}.fma-btn:nth-child(9){animation-delay:.32s}.fma-btn:nth-child(10){animation-delay:.36s}.fma-btn:nth-child(11){animation-delay:.4s}.fma-btn:nth-child(12){animation-delay:.44s}.fma-btn:nth-child(n+13){animation-delay:.44s}.fma-btn:not([aria-disabled=true]):hover{background:var(--w1);color:var(--chrome-ink-hover);animation:iconWiggle .5s ease}.fma-btn:not([aria-disabled=true]):active{animation:iconBounce .38s var(--nova-ease-overshoot)}.fma-btn:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:inherit}.fma-btn[data-tone=danger]{color:var(--sys-red)}.fma-btn[data-tone=danger]:not([aria-disabled=true]):hover{background:color-mix(in oklab,var(--sys-red) 18%,transparent);color:var(--sys-red)}.fma-btn[data-tone=success]{color:var(--sys-green)}.fma-btn[data-tone=success]:not([aria-disabled=true]):hover{background:color-mix(in oklab,var(--sys-green) 18%,transparent);color:var(--sys-green)}.fma-btn[aria-pressed=true]{background:var(--tint-sel);color:var(--chrome-ink-hover)}.fma-btn[aria-pressed=true][data-tone=success]{background:color-mix(in oklab,var(--sys-green) 22%,transparent);color:var(--sys-green)}.fma-btn[aria-disabled=true]{opacity:.38;filter:saturate(.6);animation:none;cursor:default}.fma-btn__icon{inline-size:16px;block-size:16px;pointer-events:none}.fma-btn__badge{position:absolute;inset-block-start:3px;inset-inline-end:3px;inline-size:7px;block-size:7px;border-radius:50%;background:var(--accent);pointer-events:none}.fma-primary{--chrome-ink: var(--on-accent);--chrome-ink-hover: var(--on-accent);flex:none;display:grid;place-items:center;inline-size:30px;block-size:30px;border-radius:50%;background:var(--accent);transition:box-shadow var(--nova-duration-hover) var(--nova-ease-micro),transform var(--nova-duration-hover) var(--nova-ease-micro)}.fma-primary:hover{box-shadow:0 8px 20px var(--tint-sel);transform:translateY(-1px)}.fma-primary--disabled{opacity:.38;filter:saturate(.6)}.fma-primary--disabled:hover{box-shadow:none;transform:none}.fma-btn--text{inline-size:auto;block-size:30px;border-radius:99px;padding-inline:12px;font-family:inherit;font-size:12.5px;font-weight:600;line-height:1;white-space:nowrap}@media(pointer:coarse){.fma-btn{inline-size:44px;block-size:44px}.fma-btn--text{inline-size:auto;min-inline-size:44px}.fma-primary{inline-size:44px;block-size:44px}}\n"], dependencies: [{ kind: "component", type: ContextMenuComponent, selector: "fly-context-menu", inputs: ["x", "y", "anchor", "align", "placement", "sections", "boundary"], outputs: ["action", "closed"] }, { kind: "directive", type: FlyTooltipDirective, selector: "[flyTooltip], [data-tooltip]", inputs: ["flyTooltip", "flyTooltipPlacement", "flyTooltipDisabled", "flyTooltipDelay"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17035
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: FlyMagicActionsComponent, isStandalone: true, selector: "fly-magic-actions", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: true, transformFunction: null }, primary: { classPropertyName: "primary", publicName: "primary", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.dir": "i18n.direction()" } }, viewQueries: [{ propertyName: "rowRef", first: true, predicate: ["row"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n Icon-only buttons carry the accessible name via [attr.aria-label] \u2014 the SVG\n glyph itself is aria-hidden (decorative, skill \u00A7accessibility rule 5). `kind:\n 'text'` actions rely on their own visible text instead. Disabled rows stay\n `aria-disabled` (never native `disabled`) so they remain focusable/hoverable \u2014\n a disabled action's whole point is to explain ITSELF via the auto-suffixed\n tooltip, which native `disabled` would suppress.\n\n The glyph is composed from ALLOWLISTED nodes bound as real attributes, never\n from `[innerHTML]`: `iconPath` is publisher-supplied, and an `<svg>` fragment\n is not a closed world (`<foreignObject>` is an HTML integration point, `<a\n xlink:href=\"javascript:\u2026\">` is live under the very click this button invites).\n `magic-actions-icon.ts` carries the full rationale; the shape below is its\n consequence \u2014 an attribute binding cannot introduce an element or a handler,\n so there is nothing left to sanitize.\n\n That block is authored ONCE, as `#actionButton`, and stamped by every place a\n contributed action is painted (group items and `primary`). It used to be\n inline in the group loop, which was fine while this component rendered groups\n only; with `primary` here too, a second copy would mean the next edit to the\n SECURITY-CRITICAL binding shape has to be made twice and can be made once.\n-->\n<!--\n `data-action` carries the publisher's action `id` verbatim \u2014 the one stable, LOCALE-INDEPENDENT\n handle on a rendered action. Every other identifying attribute here is translated\n (`aria-label`, the tooltip), so an e2e suite that targeted them had to assert in one language,\n and one that targeted a bespoke button lost its hook entirely when the action moved into the\n bar. That is not hypothetical: PPM's project-closure suite could not adopt the contract for\n exactly this reason. It is an ATTRIBUTE, not a class, so it never participates in styling, and\n `id` is already unique across the whole contribution (the projection enforces it), so it is\n unique in the DOM too.\n-->\n<ng-template #actionButton let-projected>\n <!--\n `let-projected` is `any` \u2014 Angular infers nothing for an `ngTemplateOutlet`\n context, and there is no built-in way to declare one. `asAction` is an\n identity function whose only job is to give this block a TYPED local, so\n every read below (`.kind`, `.disabled`, `.menu`) is checked by the template\n compiler instead of silently resolving to `undefined` on a typo. Without it\n the one place a `MagicBarActionView` is actually painted would be the one\n place its shape is not verified.\n -->\n @let action = asAction(projected);\n @if (action.kind === 'text') {\n <button\n type=\"button\"\n class=\"fma-btn fma-btn--text\"\n [attr.data-action]=\"action.id\"\n [attr.data-tone]=\"toneAttr(action)\"\n [attr.aria-disabled]=\"action.disabled ? 'true' : null\"\n [attr.aria-pressed]=\"pressedAttr(action)\"\n [flyTooltip]=\"tooltipFor(action)\"\n [flyTooltipDelay]=\"450\"\n (click)=\"activate(action, $event)\"\n >{{ resolvedLabel(action) }}</button>\n } @else {\n <button\n type=\"button\"\n class=\"fma-btn\"\n [class.fma-btn--badge]=\"hasBadge(action)\"\n [attr.data-action]=\"action.id\"\n [attr.data-tone]=\"toneAttr(action)\"\n [attr.aria-disabled]=\"action.disabled ? 'true' : null\"\n [attr.aria-pressed]=\"pressedAttr(action)\"\n [attr.aria-haspopup]=\"action.menu ? 'menu' : null\"\n [attr.aria-expanded]=\"action.menu ? (openMenuActionId() === action.id ? 'true' : 'false') : null\"\n [attr.aria-label]=\"action.menu ? triggerAriaLabel(action) : resolvedLabel(action)\"\n [flyTooltip]=\"tooltipFor(action)\"\n [flyTooltipDelay]=\"450\"\n (click)=\"activate(action, $event)\"\n >\n <svg\n class=\"fma-btn__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @for (node of iconNodes(action); track $index) {\n @switch (node.tag) {\n @case ('path') {\n <svg:path\n [attr.d]=\"node.attrs['d']\"\n [attr.fill-rule]=\"node.attrs['fill-rule']\"\n [attr.clip-rule]=\"node.attrs['clip-rule']\"\n />\n }\n @case ('circle') {\n <svg:circle\n [attr.cx]=\"node.attrs['cx']\"\n [attr.cy]=\"node.attrs['cy']\"\n [attr.r]=\"node.attrs['r']\"\n />\n }\n @case ('rect') {\n <svg:rect\n [attr.x]=\"node.attrs['x']\"\n [attr.y]=\"node.attrs['y']\"\n [attr.width]=\"node.attrs['width']\"\n [attr.height]=\"node.attrs['height']\"\n [attr.rx]=\"node.attrs['rx']\"\n [attr.ry]=\"node.attrs['ry']\"\n />\n }\n @case ('ellipse') {\n <svg:ellipse\n [attr.cx]=\"node.attrs['cx']\"\n [attr.cy]=\"node.attrs['cy']\"\n [attr.rx]=\"node.attrs['rx']\"\n [attr.ry]=\"node.attrs['ry']\"\n />\n }\n @case ('line') {\n <svg:line\n [attr.x1]=\"node.attrs['x1']\"\n [attr.y1]=\"node.attrs['y1']\"\n [attr.x2]=\"node.attrs['x2']\"\n [attr.y2]=\"node.attrs['y2']\"\n />\n }\n @case ('polyline') {\n <svg:polyline [attr.points]=\"node.attrs['points']\" />\n }\n @case ('polygon') {\n <svg:polygon [attr.points]=\"node.attrs['points']\" />\n }\n }\n }\n </svg>\n @if (hasBadge(action)) {\n <span class=\"fma-btn__badge\" aria-hidden=\"true\"></span>\n }\n </button>\n }\n</ng-template>\n\n<!--\n `.fma` is the SCROLLING row and holds the contributed groups only. The accent\n CTA is a SIBLING of it, outside the fade mask and outside the scroll container,\n because it is the row's anchor \u2014 a call to action that dissolves into a\n gradient, or that you have to scroll sideways to reach, inverts the affordance.\n It is also what makes `isOverflowing` measurable at all: see the component.\n-->\n@if (groups().length) {\n <div #row class=\"fma\" [class.fma--overflow]=\"isOverflowing()\">\n @for (group of groups(); track group.id) {\n <div\n class=\"fma-group\"\n [class.fma-group--framed]=\"group.framed\"\n role=\"group\"\n [attr.aria-label]=\"i18n.t(group.labelKey)\"\n >\n @for (action of group.items; track action.id) {\n <ng-container\n [ngTemplateOutlet]=\"actionButton\"\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\n />\n }\n </div>\n @if (group.framed) {\n <span class=\"fma-sep\" aria-hidden=\"true\"></span>\n }\n }\n </div>\n}\n\n<!--\n The accent CTA. The disc is a WRAPPER, not a modifier on the button, and that\n is load-bearing rather than cosmetic: `.fma-btn`'s hover/press feedback is an\n `animation` (`iconWiggle` / `iconBounce`), and an animation that touches\n `transform` beats a declared `transform` \u2014 so a hover lift authored on the\n button itself would simply never render. The wrapper owns the disc, the lift\n and the shadow; the button stays transparent and keeps the DS's own toolbar\n feedback. It re-points `--chrome-ink` rather than styling `.fma-btn` through a\n descendant selector so the glyph colour inherits the way custom properties do.\n-->\n@if (primary(); as p) {\n <span class=\"fma-primary\" [class.fma-primary--disabled]=\"p.disabled\">\n <ng-container\n [ngTemplateOutlet]=\"actionButton\"\n [ngTemplateOutletContext]=\"{ $implicit: p }\"\n />\n </span>\n}\n\n<!--\n ONE radio menu, hoisted out of the group loops (S1-review F9). Only one is open\n at a time (`openMenuActionId`), so a single instance is enough \u2014 and rendering\n it beside its button would insert a non-`.fma-btn` element into the group,\n silently shifting every later button's `:nth-child` index and with it the\n `toolbarPopIn` stagger delay the `.fma-btn` rule assigns. Keeping every\n staggered parent's children homogeneous is what makes that rule's comment true.\n It portals itself to <body>, so its position is unaffected by where it is\n declared.\n-->\n@if (openAction(); as open) {\n <fly-context-menu\n [anchor]=\"menuAnchorEl()\"\n [sections]=\"menuSections(open)\"\n (action)=\"onMenuAction(open, $event)\"\n (closed)=\"closeMenu()\"\n />\n}\n", styles: [":host{display:flex;align-items:center;gap:8px;min-inline-size:0}.fma{display:flex;align-items:center;gap:8px;flex:0 1 auto;min-inline-size:0;overflow:hidden;flex-wrap:nowrap}.fma--overflow{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%)}.fma--overflow::-webkit-scrollbar{display:none}:host([dir=rtl]) .fma--overflow{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%)}.fma-group{display:flex;align-items:center;gap:8px;flex:none}.fma-group--framed{gap:2px}.fma-sep{flex:0 0 auto;inline-size:1px;block-size:18px;background:var(--w14)}.fma-btn{position:relative;flex:0 0 auto;inline-size:30px;block-size:30px;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:var(--chrome-ink);cursor:pointer;padding:0;animation:toolbarPopIn .3s var(--nova-ease-structural) both}.fma-btn:nth-child(1){animation-delay:0ms}.fma-btn:nth-child(2){animation-delay:40ms}.fma-btn:nth-child(3){animation-delay:80ms}.fma-btn:nth-child(4){animation-delay:.12s}.fma-btn:nth-child(5){animation-delay:.16s}.fma-btn:nth-child(6){animation-delay:.2s}.fma-btn:nth-child(7){animation-delay:.24s}.fma-btn:nth-child(8){animation-delay:.28s}.fma-btn:nth-child(9){animation-delay:.32s}.fma-btn:nth-child(10){animation-delay:.36s}.fma-btn:nth-child(11){animation-delay:.4s}.fma-btn:nth-child(12){animation-delay:.44s}.fma-btn:nth-child(n+13){animation-delay:.44s}.fma-btn:not([aria-disabled=true]):hover{background:var(--w1);color:var(--chrome-ink-hover);animation:iconWiggle .5s ease}.fma-btn:not([aria-disabled=true]):active{animation:iconBounce .38s var(--nova-ease-overshoot)}.fma-btn:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:inherit}.fma-btn[data-tone=danger]{color:var(--sys-red)}.fma-btn[data-tone=danger]:not([aria-disabled=true]):hover{background:color-mix(in oklab,var(--sys-red) 18%,transparent);color:var(--sys-red)}.fma-btn[data-tone=success]{color:var(--sys-green)}.fma-btn[data-tone=success]:not([aria-disabled=true]):hover{background:color-mix(in oklab,var(--sys-green) 18%,transparent);color:var(--sys-green)}.fma-btn[aria-pressed=true]{background:var(--tint-sel);color:var(--chrome-ink-hover)}.fma-btn[aria-pressed=true][data-tone=success]{background:color-mix(in oklab,var(--sys-green) 22%,transparent);color:var(--sys-green)}.fma-btn[aria-disabled=true]{opacity:.38;filter:saturate(.6);animation:none;cursor:default}.fma-btn__icon{inline-size:16px;block-size:16px;pointer-events:none}.fma-btn__badge{position:absolute;inset-block-start:3px;inset-inline-end:3px;inline-size:7px;block-size:7px;border-radius:50%;background:var(--accent);pointer-events:none}.fma-primary{--chrome-ink: var(--on-accent);--chrome-ink-hover: var(--on-accent);flex:none;display:grid;place-items:center;inline-size:30px;block-size:30px;border-radius:50%;background:var(--accent);transition:box-shadow var(--nova-duration-hover) var(--nova-ease-micro),transform var(--nova-duration-hover) var(--nova-ease-micro)}.fma-primary:hover{box-shadow:0 8px 20px var(--tint-sel);transform:translateY(-1px)}.fma-primary--disabled{opacity:.38;filter:saturate(.6)}.fma-primary--disabled:hover{box-shadow:none;transform:none}.fma-btn--text{inline-size:auto;block-size:30px;border-radius:99px;padding-inline:12px;font-family:inherit;font-size:12.5px;font-weight:600;line-height:1;white-space:nowrap}@media(pointer:coarse){.fma-btn{inline-size:44px;block-size:44px}.fma-btn--text{inline-size:auto;min-inline-size:44px}.fma-primary{inline-size:44px;block-size:44px}}\n"], dependencies: [{ kind: "component", type: ContextMenuComponent, selector: "fly-context-menu", inputs: ["x", "y", "anchor", "align", "placement", "sections", "boundary"], outputs: ["action", "closed"] }, { kind: "directive", type: FlyTooltipDirective, selector: "[flyTooltip], [data-tooltip]", inputs: ["flyTooltip", "flyTooltipPlacement", "flyTooltipDisabled", "flyTooltipDelay"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16986
17036
|
}
|
|
16987
17037
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: FlyMagicActionsComponent, decorators: [{
|
|
16988
17038
|
type: Component,
|
|
16989
17039
|
args: [{ selector: 'fly-magic-actions', standalone: true, imports: [ContextMenuComponent, FlyTooltipDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
16990
17040
|
'[attr.dir]': 'i18n.direction()',
|
|
16991
|
-
}, template: "<!--\r\n Icon-only buttons carry the accessible name via [attr.aria-label] \u2014 the SVG\r\n glyph itself is aria-hidden (decorative, skill \u00A7accessibility rule 5). `kind:\r\n 'text'` actions rely on their own visible text instead. Disabled rows stay\r\n `aria-disabled` (never native `disabled`) so they remain focusable/hoverable \u2014\r\n a disabled action's whole point is to explain ITSELF via the auto-suffixed\r\n tooltip, which native `disabled` would suppress.\r\n\r\n The glyph is composed from ALLOWLISTED nodes bound as real attributes, never\r\n from `[innerHTML]`: `iconPath` is publisher-supplied, and an `<svg>` fragment\r\n is not a closed world (`<foreignObject>` is an HTML integration point, `<a\r\n xlink:href=\"javascript:\u2026\">` is live under the very click this button invites).\r\n `magic-actions-icon.ts` carries the full rationale; the shape below is its\r\n consequence \u2014 an attribute binding cannot introduce an element or a handler,\r\n so there is nothing left to sanitize.\r\n\r\n That block is authored ONCE, as `#actionButton`, and stamped by every place a\r\n contributed action is painted (group items and `primary`). It used to be\r\n inline in the group loop, which was fine while this component rendered groups\r\n only; with `primary` here too, a second copy would mean the next edit to the\r\n SECURITY-CRITICAL binding shape has to be made twice and can be made once.\r\n-->\r\n<ng-template #actionButton let-projected>\r\n <!--\r\n `let-projected` is `any` \u2014 Angular infers nothing for an `ngTemplateOutlet`\r\n context, and there is no built-in way to declare one. `asAction` is an\r\n identity function whose only job is to give this block a TYPED local, so\r\n every read below (`.kind`, `.disabled`, `.menu`) is checked by the template\r\n compiler instead of silently resolving to `undefined` on a typo. Without it\r\n the one place a `MagicBarActionView` is actually painted would be the one\r\n place its shape is not verified.\r\n -->\r\n @let action = asAction(projected);\r\n @if (action.kind === 'text') {\r\n <button\r\n type=\"button\"\r\n class=\"fma-btn fma-btn--text\"\r\n [attr.data-tone]=\"toneAttr(action)\"\r\n [attr.aria-disabled]=\"action.disabled ? 'true' : null\"\r\n [attr.aria-pressed]=\"pressedAttr(action)\"\r\n [flyTooltip]=\"tooltipFor(action)\"\r\n [flyTooltipDelay]=\"450\"\r\n (click)=\"activate(action, $event)\"\r\n >{{ resolvedLabel(action) }}</button>\r\n } @else {\r\n <button\r\n type=\"button\"\r\n class=\"fma-btn\"\r\n [class.fma-btn--badge]=\"hasBadge(action)\"\r\n [attr.data-tone]=\"toneAttr(action)\"\r\n [attr.aria-disabled]=\"action.disabled ? 'true' : null\"\r\n [attr.aria-pressed]=\"pressedAttr(action)\"\r\n [attr.aria-haspopup]=\"action.menu ? 'menu' : null\"\r\n [attr.aria-expanded]=\"action.menu ? (openMenuActionId() === action.id ? 'true' : 'false') : null\"\r\n [attr.aria-label]=\"action.menu ? triggerAriaLabel(action) : resolvedLabel(action)\"\r\n [flyTooltip]=\"tooltipFor(action)\"\r\n [flyTooltipDelay]=\"450\"\r\n (click)=\"activate(action, $event)\"\r\n >\r\n <svg\r\n class=\"fma-btn__icon\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"1.8\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n >\r\n @for (node of iconNodes(action); track $index) {\r\n @switch (node.tag) {\r\n @case ('path') {\r\n <svg:path\r\n [attr.d]=\"node.attrs['d']\"\r\n [attr.fill-rule]=\"node.attrs['fill-rule']\"\r\n [attr.clip-rule]=\"node.attrs['clip-rule']\"\r\n />\r\n }\r\n @case ('circle') {\r\n <svg:circle\r\n [attr.cx]=\"node.attrs['cx']\"\r\n [attr.cy]=\"node.attrs['cy']\"\r\n [attr.r]=\"node.attrs['r']\"\r\n />\r\n }\r\n @case ('rect') {\r\n <svg:rect\r\n [attr.x]=\"node.attrs['x']\"\r\n [attr.y]=\"node.attrs['y']\"\r\n [attr.width]=\"node.attrs['width']\"\r\n [attr.height]=\"node.attrs['height']\"\r\n [attr.rx]=\"node.attrs['rx']\"\r\n [attr.ry]=\"node.attrs['ry']\"\r\n />\r\n }\r\n @case ('ellipse') {\r\n <svg:ellipse\r\n [attr.cx]=\"node.attrs['cx']\"\r\n [attr.cy]=\"node.attrs['cy']\"\r\n [attr.rx]=\"node.attrs['rx']\"\r\n [attr.ry]=\"node.attrs['ry']\"\r\n />\r\n }\r\n @case ('line') {\r\n <svg:line\r\n [attr.x1]=\"node.attrs['x1']\"\r\n [attr.y1]=\"node.attrs['y1']\"\r\n [attr.x2]=\"node.attrs['x2']\"\r\n [attr.y2]=\"node.attrs['y2']\"\r\n />\r\n }\r\n @case ('polyline') {\r\n <svg:polyline [attr.points]=\"node.attrs['points']\" />\r\n }\r\n @case ('polygon') {\r\n <svg:polygon [attr.points]=\"node.attrs['points']\" />\r\n }\r\n }\r\n }\r\n </svg>\r\n @if (hasBadge(action)) {\r\n <span class=\"fma-btn__badge\" aria-hidden=\"true\"></span>\r\n }\r\n </button>\r\n }\r\n</ng-template>\r\n\r\n<!--\r\n `.fma` is the SCROLLING row and holds the contributed groups only. The accent\r\n CTA is a SIBLING of it, outside the fade mask and outside the scroll container,\r\n because it is the row's anchor \u2014 a call to action that dissolves into a\r\n gradient, or that you have to scroll sideways to reach, inverts the affordance.\r\n It is also what makes `isOverflowing` measurable at all: see the component.\r\n-->\r\n@if (groups().length) {\r\n <div #row class=\"fma\" [class.fma--overflow]=\"isOverflowing()\">\r\n @for (group of groups(); track group.id) {\r\n <div\r\n class=\"fma-group\"\r\n [class.fma-group--framed]=\"group.framed\"\r\n role=\"group\"\r\n [attr.aria-label]=\"i18n.t(group.labelKey)\"\r\n >\r\n @for (action of group.items; track action.id) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"actionButton\"\r\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\r\n />\r\n }\r\n </div>\r\n @if (group.framed) {\r\n <span class=\"fma-sep\" aria-hidden=\"true\"></span>\r\n }\r\n }\r\n </div>\r\n}\r\n\r\n<!--\r\n The accent CTA. The disc is a WRAPPER, not a modifier on the button, and that\r\n is load-bearing rather than cosmetic: `.fma-btn`'s hover/press feedback is an\r\n `animation` (`iconWiggle` / `iconBounce`), and an animation that touches\r\n `transform` beats a declared `transform` \u2014 so a hover lift authored on the\r\n button itself would simply never render. The wrapper owns the disc, the lift\r\n and the shadow; the button stays transparent and keeps the DS's own toolbar\r\n feedback. It re-points `--chrome-ink` rather than styling `.fma-btn` through a\r\n descendant selector so the glyph colour inherits the way custom properties do.\r\n-->\r\n@if (primary(); as p) {\r\n <span class=\"fma-primary\" [class.fma-primary--disabled]=\"p.disabled\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"actionButton\"\r\n [ngTemplateOutletContext]=\"{ $implicit: p }\"\r\n />\r\n </span>\r\n}\r\n\r\n<!--\r\n ONE radio menu, hoisted out of the group loops (S1-review F9). Only one is open\r\n at a time (`openMenuActionId`), so a single instance is enough \u2014 and rendering\r\n it beside its button would insert a non-`.fma-btn` element into the group,\r\n silently shifting every later button's `:nth-child` index and with it the\r\n `toolbarPopIn` stagger delay the `.fma-btn` rule assigns. Keeping every\r\n staggered parent's children homogeneous is what makes that rule's comment true.\r\n It portals itself to <body>, so its position is unaffected by where it is\r\n declared.\r\n-->\r\n@if (openAction(); as open) {\r\n <fly-context-menu\r\n [anchor]=\"menuAnchorEl()\"\r\n [sections]=\"menuSections(open)\"\r\n (action)=\"onMenuAction(open, $event)\"\r\n (closed)=\"closeMenu()\"\r\n />\r\n}\r\n", styles: [":host{display:flex;align-items:center;gap:8px;min-inline-size:0}.fma{display:flex;align-items:center;gap:8px;flex:0 1 auto;min-inline-size:0;overflow:hidden;flex-wrap:nowrap}.fma--overflow{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%)}.fma--overflow::-webkit-scrollbar{display:none}:host([dir=rtl]) .fma--overflow{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%)}.fma-group{display:flex;align-items:center;gap:8px;flex:none}.fma-group--framed{gap:2px}.fma-sep{flex:0 0 auto;inline-size:1px;block-size:18px;background:var(--w14)}.fma-btn{position:relative;flex:0 0 auto;inline-size:30px;block-size:30px;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:var(--chrome-ink);cursor:pointer;padding:0;animation:toolbarPopIn .3s var(--nova-ease-structural) both}.fma-btn:nth-child(1){animation-delay:0ms}.fma-btn:nth-child(2){animation-delay:40ms}.fma-btn:nth-child(3){animation-delay:80ms}.fma-btn:nth-child(4){animation-delay:.12s}.fma-btn:nth-child(5){animation-delay:.16s}.fma-btn:nth-child(6){animation-delay:.2s}.fma-btn:nth-child(7){animation-delay:.24s}.fma-btn:nth-child(8){animation-delay:.28s}.fma-btn:nth-child(9){animation-delay:.32s}.fma-btn:nth-child(10){animation-delay:.36s}.fma-btn:nth-child(11){animation-delay:.4s}.fma-btn:nth-child(12){animation-delay:.44s}.fma-btn:nth-child(n+13){animation-delay:.44s}.fma-btn:not([aria-disabled=true]):hover{background:var(--w1);color:var(--chrome-ink-hover);animation:iconWiggle .5s ease}.fma-btn:not([aria-disabled=true]):active{animation:iconBounce .38s var(--nova-ease-overshoot)}.fma-btn:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:inherit}.fma-btn[data-tone=danger]{color:var(--sys-red)}.fma-btn[data-tone=danger]:not([aria-disabled=true]):hover{background:color-mix(in oklab,var(--sys-red) 18%,transparent);color:var(--sys-red)}.fma-btn[data-tone=success]{color:var(--sys-green)}.fma-btn[data-tone=success]:not([aria-disabled=true]):hover{background:color-mix(in oklab,var(--sys-green) 18%,transparent);color:var(--sys-green)}.fma-btn[aria-pressed=true]{background:var(--tint-sel);color:var(--chrome-ink-hover)}.fma-btn[aria-pressed=true][data-tone=success]{background:color-mix(in oklab,var(--sys-green) 22%,transparent);color:var(--sys-green)}.fma-btn[aria-disabled=true]{opacity:.38;filter:saturate(.6);animation:none;cursor:default}.fma-btn__icon{inline-size:16px;block-size:16px;pointer-events:none}.fma-btn__badge{position:absolute;inset-block-start:3px;inset-inline-end:3px;inline-size:7px;block-size:7px;border-radius:50%;background:var(--accent);pointer-events:none}.fma-primary{--chrome-ink: var(--on-accent);--chrome-ink-hover: var(--on-accent);flex:none;display:grid;place-items:center;inline-size:30px;block-size:30px;border-radius:50%;background:var(--accent);transition:box-shadow var(--nova-duration-hover) var(--nova-ease-micro),transform var(--nova-duration-hover) var(--nova-ease-micro)}.fma-primary:hover{box-shadow:0 8px 20px var(--tint-sel);transform:translateY(-1px)}.fma-primary--disabled{opacity:.38;filter:saturate(.6)}.fma-primary--disabled:hover{box-shadow:none;transform:none}.fma-btn--text{inline-size:auto;block-size:30px;border-radius:99px;padding-inline:12px;font-family:inherit;font-size:12.5px;font-weight:600;line-height:1;white-space:nowrap}@media(pointer:coarse){.fma-btn{inline-size:44px;block-size:44px}.fma-btn--text{inline-size:auto;min-inline-size:44px}.fma-primary{inline-size:44px;block-size:44px}}\n"] }]
|
|
17041
|
+
}, template: "<!--\n Icon-only buttons carry the accessible name via [attr.aria-label] \u2014 the SVG\n glyph itself is aria-hidden (decorative, skill \u00A7accessibility rule 5). `kind:\n 'text'` actions rely on their own visible text instead. Disabled rows stay\n `aria-disabled` (never native `disabled`) so they remain focusable/hoverable \u2014\n a disabled action's whole point is to explain ITSELF via the auto-suffixed\n tooltip, which native `disabled` would suppress.\n\n The glyph is composed from ALLOWLISTED nodes bound as real attributes, never\n from `[innerHTML]`: `iconPath` is publisher-supplied, and an `<svg>` fragment\n is not a closed world (`<foreignObject>` is an HTML integration point, `<a\n xlink:href=\"javascript:\u2026\">` is live under the very click this button invites).\n `magic-actions-icon.ts` carries the full rationale; the shape below is its\n consequence \u2014 an attribute binding cannot introduce an element or a handler,\n so there is nothing left to sanitize.\n\n That block is authored ONCE, as `#actionButton`, and stamped by every place a\n contributed action is painted (group items and `primary`). It used to be\n inline in the group loop, which was fine while this component rendered groups\n only; with `primary` here too, a second copy would mean the next edit to the\n SECURITY-CRITICAL binding shape has to be made twice and can be made once.\n-->\n<!--\n `data-action` carries the publisher's action `id` verbatim \u2014 the one stable, LOCALE-INDEPENDENT\n handle on a rendered action. Every other identifying attribute here is translated\n (`aria-label`, the tooltip), so an e2e suite that targeted them had to assert in one language,\n and one that targeted a bespoke button lost its hook entirely when the action moved into the\n bar. That is not hypothetical: PPM's project-closure suite could not adopt the contract for\n exactly this reason. It is an ATTRIBUTE, not a class, so it never participates in styling, and\n `id` is already unique across the whole contribution (the projection enforces it), so it is\n unique in the DOM too.\n-->\n<ng-template #actionButton let-projected>\n <!--\n `let-projected` is `any` \u2014 Angular infers nothing for an `ngTemplateOutlet`\n context, and there is no built-in way to declare one. `asAction` is an\n identity function whose only job is to give this block a TYPED local, so\n every read below (`.kind`, `.disabled`, `.menu`) is checked by the template\n compiler instead of silently resolving to `undefined` on a typo. Without it\n the one place a `MagicBarActionView` is actually painted would be the one\n place its shape is not verified.\n -->\n @let action = asAction(projected);\n @if (action.kind === 'text') {\n <button\n type=\"button\"\n class=\"fma-btn fma-btn--text\"\n [attr.data-action]=\"action.id\"\n [attr.data-tone]=\"toneAttr(action)\"\n [attr.aria-disabled]=\"action.disabled ? 'true' : null\"\n [attr.aria-pressed]=\"pressedAttr(action)\"\n [flyTooltip]=\"tooltipFor(action)\"\n [flyTooltipDelay]=\"450\"\n (click)=\"activate(action, $event)\"\n >{{ resolvedLabel(action) }}</button>\n } @else {\n <button\n type=\"button\"\n class=\"fma-btn\"\n [class.fma-btn--badge]=\"hasBadge(action)\"\n [attr.data-action]=\"action.id\"\n [attr.data-tone]=\"toneAttr(action)\"\n [attr.aria-disabled]=\"action.disabled ? 'true' : null\"\n [attr.aria-pressed]=\"pressedAttr(action)\"\n [attr.aria-haspopup]=\"action.menu ? 'menu' : null\"\n [attr.aria-expanded]=\"action.menu ? (openMenuActionId() === action.id ? 'true' : 'false') : null\"\n [attr.aria-label]=\"action.menu ? triggerAriaLabel(action) : resolvedLabel(action)\"\n [flyTooltip]=\"tooltipFor(action)\"\n [flyTooltipDelay]=\"450\"\n (click)=\"activate(action, $event)\"\n >\n <svg\n class=\"fma-btn__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @for (node of iconNodes(action); track $index) {\n @switch (node.tag) {\n @case ('path') {\n <svg:path\n [attr.d]=\"node.attrs['d']\"\n [attr.fill-rule]=\"node.attrs['fill-rule']\"\n [attr.clip-rule]=\"node.attrs['clip-rule']\"\n />\n }\n @case ('circle') {\n <svg:circle\n [attr.cx]=\"node.attrs['cx']\"\n [attr.cy]=\"node.attrs['cy']\"\n [attr.r]=\"node.attrs['r']\"\n />\n }\n @case ('rect') {\n <svg:rect\n [attr.x]=\"node.attrs['x']\"\n [attr.y]=\"node.attrs['y']\"\n [attr.width]=\"node.attrs['width']\"\n [attr.height]=\"node.attrs['height']\"\n [attr.rx]=\"node.attrs['rx']\"\n [attr.ry]=\"node.attrs['ry']\"\n />\n }\n @case ('ellipse') {\n <svg:ellipse\n [attr.cx]=\"node.attrs['cx']\"\n [attr.cy]=\"node.attrs['cy']\"\n [attr.rx]=\"node.attrs['rx']\"\n [attr.ry]=\"node.attrs['ry']\"\n />\n }\n @case ('line') {\n <svg:line\n [attr.x1]=\"node.attrs['x1']\"\n [attr.y1]=\"node.attrs['y1']\"\n [attr.x2]=\"node.attrs['x2']\"\n [attr.y2]=\"node.attrs['y2']\"\n />\n }\n @case ('polyline') {\n <svg:polyline [attr.points]=\"node.attrs['points']\" />\n }\n @case ('polygon') {\n <svg:polygon [attr.points]=\"node.attrs['points']\" />\n }\n }\n }\n </svg>\n @if (hasBadge(action)) {\n <span class=\"fma-btn__badge\" aria-hidden=\"true\"></span>\n }\n </button>\n }\n</ng-template>\n\n<!--\n `.fma` is the SCROLLING row and holds the contributed groups only. The accent\n CTA is a SIBLING of it, outside the fade mask and outside the scroll container,\n because it is the row's anchor \u2014 a call to action that dissolves into a\n gradient, or that you have to scroll sideways to reach, inverts the affordance.\n It is also what makes `isOverflowing` measurable at all: see the component.\n-->\n@if (groups().length) {\n <div #row class=\"fma\" [class.fma--overflow]=\"isOverflowing()\">\n @for (group of groups(); track group.id) {\n <div\n class=\"fma-group\"\n [class.fma-group--framed]=\"group.framed\"\n role=\"group\"\n [attr.aria-label]=\"i18n.t(group.labelKey)\"\n >\n @for (action of group.items; track action.id) {\n <ng-container\n [ngTemplateOutlet]=\"actionButton\"\n [ngTemplateOutletContext]=\"{ $implicit: action }\"\n />\n }\n </div>\n @if (group.framed) {\n <span class=\"fma-sep\" aria-hidden=\"true\"></span>\n }\n }\n </div>\n}\n\n<!--\n The accent CTA. The disc is a WRAPPER, not a modifier on the button, and that\n is load-bearing rather than cosmetic: `.fma-btn`'s hover/press feedback is an\n `animation` (`iconWiggle` / `iconBounce`), and an animation that touches\n `transform` beats a declared `transform` \u2014 so a hover lift authored on the\n button itself would simply never render. The wrapper owns the disc, the lift\n and the shadow; the button stays transparent and keeps the DS's own toolbar\n feedback. It re-points `--chrome-ink` rather than styling `.fma-btn` through a\n descendant selector so the glyph colour inherits the way custom properties do.\n-->\n@if (primary(); as p) {\n <span class=\"fma-primary\" [class.fma-primary--disabled]=\"p.disabled\">\n <ng-container\n [ngTemplateOutlet]=\"actionButton\"\n [ngTemplateOutletContext]=\"{ $implicit: p }\"\n />\n </span>\n}\n\n<!--\n ONE radio menu, hoisted out of the group loops (S1-review F9). Only one is open\n at a time (`openMenuActionId`), so a single instance is enough \u2014 and rendering\n it beside its button would insert a non-`.fma-btn` element into the group,\n silently shifting every later button's `:nth-child` index and with it the\n `toolbarPopIn` stagger delay the `.fma-btn` rule assigns. Keeping every\n staggered parent's children homogeneous is what makes that rule's comment true.\n It portals itself to <body>, so its position is unaffected by where it is\n declared.\n-->\n@if (openAction(); as open) {\n <fly-context-menu\n [anchor]=\"menuAnchorEl()\"\n [sections]=\"menuSections(open)\"\n (action)=\"onMenuAction(open, $event)\"\n (closed)=\"closeMenu()\"\n />\n}\n", styles: [":host{display:flex;align-items:center;gap:8px;min-inline-size:0}.fma{display:flex;align-items:center;gap:8px;flex:0 1 auto;min-inline-size:0;overflow:hidden;flex-wrap:nowrap}.fma--overflow{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent 100%)}.fma--overflow::-webkit-scrollbar{display:none}:host([dir=rtl]) .fma--overflow{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent 100%)}.fma-group{display:flex;align-items:center;gap:8px;flex:none}.fma-group--framed{gap:2px}.fma-sep{flex:0 0 auto;inline-size:1px;block-size:18px;background:var(--w14)}.fma-btn{position:relative;flex:0 0 auto;inline-size:30px;block-size:30px;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:var(--chrome-ink);cursor:pointer;padding:0;animation:toolbarPopIn .3s var(--nova-ease-structural) both}.fma-btn:nth-child(1){animation-delay:0ms}.fma-btn:nth-child(2){animation-delay:40ms}.fma-btn:nth-child(3){animation-delay:80ms}.fma-btn:nth-child(4){animation-delay:.12s}.fma-btn:nth-child(5){animation-delay:.16s}.fma-btn:nth-child(6){animation-delay:.2s}.fma-btn:nth-child(7){animation-delay:.24s}.fma-btn:nth-child(8){animation-delay:.28s}.fma-btn:nth-child(9){animation-delay:.32s}.fma-btn:nth-child(10){animation-delay:.36s}.fma-btn:nth-child(11){animation-delay:.4s}.fma-btn:nth-child(12){animation-delay:.44s}.fma-btn:nth-child(n+13){animation-delay:.44s}.fma-btn:not([aria-disabled=true]):hover{background:var(--w1);color:var(--chrome-ink-hover);animation:iconWiggle .5s ease}.fma-btn:not([aria-disabled=true]):active{animation:iconBounce .38s var(--nova-ease-overshoot)}.fma-btn:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:inherit}.fma-btn[data-tone=danger]{color:var(--sys-red)}.fma-btn[data-tone=danger]:not([aria-disabled=true]):hover{background:color-mix(in oklab,var(--sys-red) 18%,transparent);color:var(--sys-red)}.fma-btn[data-tone=success]{color:var(--sys-green)}.fma-btn[data-tone=success]:not([aria-disabled=true]):hover{background:color-mix(in oklab,var(--sys-green) 18%,transparent);color:var(--sys-green)}.fma-btn[aria-pressed=true]{background:var(--tint-sel);color:var(--chrome-ink-hover)}.fma-btn[aria-pressed=true][data-tone=success]{background:color-mix(in oklab,var(--sys-green) 22%,transparent);color:var(--sys-green)}.fma-btn[aria-disabled=true]{opacity:.38;filter:saturate(.6);animation:none;cursor:default}.fma-btn__icon{inline-size:16px;block-size:16px;pointer-events:none}.fma-btn__badge{position:absolute;inset-block-start:3px;inset-inline-end:3px;inline-size:7px;block-size:7px;border-radius:50%;background:var(--accent);pointer-events:none}.fma-primary{--chrome-ink: var(--on-accent);--chrome-ink-hover: var(--on-accent);flex:none;display:grid;place-items:center;inline-size:30px;block-size:30px;border-radius:50%;background:var(--accent);transition:box-shadow var(--nova-duration-hover) var(--nova-ease-micro),transform var(--nova-duration-hover) var(--nova-ease-micro)}.fma-primary:hover{box-shadow:0 8px 20px var(--tint-sel);transform:translateY(-1px)}.fma-primary--disabled{opacity:.38;filter:saturate(.6)}.fma-primary--disabled:hover{box-shadow:none;transform:none}.fma-btn--text{inline-size:auto;block-size:30px;border-radius:99px;padding-inline:12px;font-family:inherit;font-size:12.5px;font-weight:600;line-height:1;white-space:nowrap}@media(pointer:coarse){.fma-btn{inline-size:44px;block-size:44px}.fma-btn--text{inline-size:auto;min-inline-size:44px}.fma-primary{inline-size:44px;block-size:44px}}\n"] }]
|
|
16992
17042
|
}], ctorParameters: () => [], propDecorators: { groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: true }] }], primary: [{ type: i0.Input, args: [{ isSignal: true, alias: "primary", required: false }] }], rowRef: [{ type: i0.ViewChild, args: ['row', { isSignal: true }] }] } });
|
|
16993
17043
|
|
|
16994
17044
|
/**
|