@magmonium/one 0.4.85 → 0.4.87
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/fesm2022/{magmonium-one-base-dropdown-9iIR64ME.mjs → magmonium-one-base-dropdown-2hgXcmhE.mjs} +4 -4
- package/fesm2022/{magmonium-one-base-dropdown-9iIR64ME.mjs.map → magmonium-one-base-dropdown-2hgXcmhE.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-button-DO7FTwuF.mjs → magmonium-one-button-C5dk4R_m.mjs} +9 -3
- package/fesm2022/magmonium-one-button-C5dk4R_m.mjs.map +1 -0
- package/fesm2022/{magmonium-one-directives-DM6J1Hvs.mjs → magmonium-one-directives-hJ7wkmQn.mjs} +2 -2
- package/fesm2022/{magmonium-one-directives-DM6J1Hvs.mjs.map → magmonium-one-directives-hJ7wkmQn.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-group-BsqCB8D2.mjs → magmonium-one-group-bRamdzPO.mjs} +3 -3
- package/fesm2022/{magmonium-one-group-BsqCB8D2.mjs.map → magmonium-one-group-bRamdzPO.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-header-CgOV_m7w.mjs → magmonium-one-header-BZzD8uTJ.mjs} +2 -2
- package/fesm2022/{magmonium-one-header-CgOV_m7w.mjs.map → magmonium-one-header-BZzD8uTJ.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-image-editor-B6eCXP9A.mjs → magmonium-one-image-editor-BLqlV2ki.mjs} +4 -4
- package/fesm2022/{magmonium-one-image-editor-B6eCXP9A.mjs.map → magmonium-one-image-editor-BLqlV2ki.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-menu-CsoiLhVg.mjs → magmonium-one-menu-CJjjxFfu.mjs} +5 -5
- package/fesm2022/{magmonium-one-menu-CsoiLhVg.mjs.map → magmonium-one-menu-CJjjxFfu.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-multi-range-RSLLKzLu.mjs → magmonium-one-multi-range-DL_JlKVL.mjs} +2 -2
- package/fesm2022/{magmonium-one-multi-range-RSLLKzLu.mjs.map → magmonium-one-multi-range-DL_JlKVL.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-password-CJBa8k1l.mjs → magmonium-one-password-CvgWZkAX.mjs} +2 -2
- package/fesm2022/{magmonium-one-password-CJBa8k1l.mjs.map → magmonium-one-password-CvgWZkAX.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-range-CqOSrC0Y.mjs → magmonium-one-range-DlQfnl9p.mjs} +2 -2
- package/fesm2022/{magmonium-one-range-CqOSrC0Y.mjs.map → magmonium-one-range-DlQfnl9p.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-selector-CeqlecBa.mjs → magmonium-one-selector-BK48N5us.mjs} +4 -1
- package/fesm2022/{magmonium-one-selector-CeqlecBa.mjs.map → magmonium-one-selector-BK48N5us.mjs.map} +1 -1
- package/fesm2022/magmonium-one.mjs +79 -22
- package/fesm2022/magmonium-one.mjs.map +1 -1
- package/package.json +1 -1
- package/types/magmonium-one.d.ts +57 -22
- package/fesm2022/magmonium-one-button-DO7FTwuF.mjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as TranslatePipe, l as TranslateService } from "./magmonium-one-size-converter-BqkALIWA.mjs";
|
|
2
|
-
import { t as SelectorDirective } from "./magmonium-one-selector-
|
|
2
|
+
import { t as SelectorDirective } from "./magmonium-one-selector-BK48N5us.mjs";
|
|
3
3
|
import { t as LabelComponent } from "./magmonium-one-label-Dkis_mGP.mjs";
|
|
4
|
-
import { t as ButtonComponent } from "./magmonium-one-button-
|
|
4
|
+
import { t as ButtonComponent } from "./magmonium-one-button-C5dk4R_m.mjs";
|
|
5
5
|
import { t as assetOptions } from "./magmonium-one-options-asset-BNd1hbLw.mjs";
|
|
6
|
-
import "./magmonium-one-directives-
|
|
6
|
+
import "./magmonium-one-directives-hJ7wkmQn.mjs";
|
|
7
7
|
import { t as BaseInputComponent } from "./magmonium-one-base-input-B92NOmxz.mjs";
|
|
8
8
|
import { t as TextOutputComponent } from "./magmonium-one-text-output-E6pe3IOL.mjs";
|
|
9
9
|
import { t as TextInputComponent } from "./magmonium-one-text-vDPAhn74.mjs";
|
|
@@ -603,4 +603,4 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
603
603
|
});
|
|
604
604
|
export { DROPDOWN_IMPORTS as n, DROPDOWN_TEMPLATE as r, BaseDropdownComponent as t };
|
|
605
605
|
|
|
606
|
-
//# sourceMappingURL=magmonium-one-base-dropdown-
|
|
606
|
+
//# sourceMappingURL=magmonium-one-base-dropdown-2hgXcmhE.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"magmonium-one-base-dropdown-9iIR64ME.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/input/ui/dropdown/dropdown-box.ts","../../../../libs/one/src/lib/shared/ui/input/ui/dropdown/base-dropdown.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { TranslatePipe } from '../../../../pipe/translate';\nimport { DropdownOption, DropdownValue } from '../../model/input';\n\n@Component({\n selector: 'm-dropdown-box',\n imports: [TranslatePipe],\n template: `\n <ul class=\"dropdown-box\" role=\"listbox\">\n @for (option of options(); track option.value; let i = $index) {\n @let selectedState = isSelected(option.value);\n <li\n class=\"dropdown-box__option\"\n [class.dropdown-box__option--selected]=\"selectedState\"\n [class.dropdown-box__option--disabled]=\"option.disabled\"\n [class.dropdown-box__option--active]=\"i === activeIndex()\"\n [style.--m-dropdown-option-depth]=\"option.depth\"\n role=\"option\"\n [attr.aria-selected]=\"selectedState\"\n [attr.data-value]=\"option.value\"\n (click)=\"selectOption(option)\"\n (keydown.enter)=\"selectOption(option)\"\n tabindex=\"0\"\n >\n <!-- A group header is a row, never a choice: no box to tick. -->\n @if (multiple() && !option.disabled) {\n <input\n type=\"checkbox\"\n class=\"dropdown-box__checkbox\"\n [checked]=\"selectedState\"\n tabindex=\"-1\"\n (click)=\"$event.preventDefault()\"\n />\n }\n @if (option.noTranslate) {\n {{ option.label }}\n } @else {\n {{ option.label | translate }}\n }\n </li>\n } @empty {\n <li class=\"dropdown-box__empty\">\n {{ 'no-results-found' | translate }}\n </li>\n }\n </ul>\n `,\n styleUrl: './dropdown-box.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DropdownBoxComponent {\n readonly options = input<DropdownOption<DropdownValue>[]>([]);\n /** The values ticked, as a list whichever Field drew the panel. */\n readonly selected = input<readonly DropdownValue[]>([]);\n readonly multiple = input<boolean>(false);\n readonly activeIndex = input<number>(-1);\n readonly action = output<DropdownOption<DropdownValue>>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // Keep the keyboard-active option in view as ↑/↓ walk a scrolled list.\n constructor() {\n effect(() => {\n const index = this.activeIndex();\n if (index < 0) return;\n this.host.nativeElement\n .querySelectorAll('.dropdown-box__option')\n [index]?.scrollIntoView?.({ block: 'nearest' });\n });\n }\n\n protected readonly isSelected = (value: DropdownValue): boolean =>\n this.selected().includes(value);\n\n // Only emit a selection event for enabled options.\n protected readonly selectOption = (\n option: DropdownOption<DropdownValue>\n ): void => {\n if (option.disabled) return;\n this.action.emit(option);\n };\n}\n","import {\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n inputBinding,\n linkedSignal,\n model,\n outputBinding,\n Signal,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ValidationError, WithOptionalFieldTree } from '@angular/forms/signals';\nimport { LabelComponent } from '../label';\nimport { TextOutputComponent } from '../../../text-output';\nimport { BaseInputComponent } from '../../lib/base-input';\nimport { Button } from '../../../button/type/button';\nimport { ButtonComponent } from '../../../button/ui/button';\nimport { TranslateService } from '../../../../services';\nimport { SelectorConfig, SelectorDirective } from '../../../../directives';\nimport { Direction } from '../../../../directives/selector/selector-type';\nimport { DropdownBoxComponent } from './dropdown-box';\nimport {\n DropdownInput,\n DropdownOption,\n DropdownValue,\n TextInput,\n} from '../../model/input';\nimport { TextInputComponent } from '../text/text';\nimport { assetOptions } from '../../lib/options-asset';\n\n/** The trigger both option Fields draw: a searchable text input and a chevron. */\nexport const DROPDOWN_TEMPLATE = `\n @if (config(); as dropdown) {\n @if (dropdown.label) {\n <m-label\n [for]=\"dropdown.name ?? ''\"\n [placeholder]=\"dropdown.label\"\n [params]=\"dropdown.params\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n />\n }\n <div\n class=\"trigger-wrap\"\n #wrapper\n [mSelector]=\"selectorConfig()\"\n [disabled]=\"disabled() || readonly() || !!config()?.readonly\"\n (opened)=\"onOpened()\"\n (closed)=\"onClosed()\"\n (focusin)=\"isFocused.set(true)\"\n (focusout)=\"isFocused.set(false)\"\n >\n <m-text-input\n [config]=\"triggerInputConfig()\"\n [value]=\"displayValue()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [hideErrors]=\"true\"\n [(touched)]=\"touched\"\n [focused]=\"focused()\"\n (valueChange)=\"onInput($event)\"\n (click)=\"preventToggleWhenOpen($event)\"\n (keydown.space)=\"$event.stopPropagation()\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.arrowdown)=\"onArrow($event, 1)\"\n (keydown.arrowup)=\"onArrow($event, -1)\"\n (keydown.tab)=\"$event.stopPropagation()\"\n />\n <m-button [disabled]=\"disabled()\" [config]=\"chevron()\" />\n </div>\n @if (showErrors()) {\n @for (error of errors(); track $index) {\n <m-text-output\n variant=\"footer\"\n color=\"error\"\n [label]=\"error.message\"\n />\n }\n }\n }\n`;\n\nexport const DROPDOWN_IMPORTS = [\n LabelComponent,\n TextOutputComponent,\n TextInputComponent,\n ButtonComponent,\n SelectorDirective,\n];\n\n/**\n * Everything a Dropdown and a Multiselect share: the options, the search, the\n * keyboard walk and the panel. What differs is only what the Field holds — one\n * value or a list — so a subclass says which values are selected and what a\n * pick does to them.\n */\n@Directive()\nexport abstract class BaseDropdownComponent extends BaseInputComponent<DropdownInput> {\n public override config = input<Partial<DropdownInput> | undefined>();\n public override required = input<boolean>(false);\n public override disabled = input<boolean>(false);\n public override invalid = input<boolean>(false);\n public override touched = model<boolean>(false);\n public override focused = input<boolean>(false);\n public override errors = input<readonly WithOptionalFieldTree<ValidationError>[]>(\n []\n );\n public override showErrors = computed(() => this.touched() && this.invalid());\n\n readonly options = input<\n DropdownOption<DropdownValue>[] | Signal<DropdownOption<DropdownValue>[]>\n >();\n readonly dir = input<Direction>();\n readonly toggle = model(false);\n readonly searchTerm = signal('');\n readonly isFocused = signal(false);\n readonly chevron = computed(\n () =>\n <Button>{\n icon: this.toggle() ? 'chevron-up' : 'chevron-down',\n one: true,\n variant: 'ghost',\n // In-Field control, never the form's submit — without this the Button\n // reads as the submit control and greys out while the form is invalid.\n type: 'button',\n // Chevron tracks the trigger's border like the text input's own icon:\n // red while the Field shows errors, focus tint while focused, border at rest.\n color: this.showErrors()\n ? 'error'\n : this.isFocused()\n ? 'focus'\n : 'border',\n // The trigger input is the Field's tab stop; the chevron only repeats\n // what clicking that input already does, so Tab walks past it.\n tabindex: -1,\n }\n );\n\n /** The values the Field holds now, as a list whichever kind it is. */\n protected abstract readonly selectedValues: Signal<readonly DropdownValue[]>;\n /** Whether the panel ticks rows and stays open across picks. */\n protected abstract readonly multiple: boolean;\n /** What picking `option` does to the Field's value. */\n protected abstract selectOption(option: DropdownOption<DropdownValue>): void;\n\n protected readonly triggerInputConfig = computed(() => {\n const dropdown = this.config() as DropdownInput | undefined;\n return <Partial<TextInput>>{\n name: dropdown?.name,\n icon: dropdown?.icon,\n one: dropdown?.one,\n placeholder: this.placeholderText(),\n readonly: this.readonly() || !!dropdown?.readonly,\n };\n });\n\n protected readonly dropdownOptions = computed(\n (): DropdownOption<DropdownValue>[] => {\n const runtimeOptions = this.options();\n const source =\n runtimeOptions ?? (this.config() as DropdownInput | undefined)?.options;\n if (typeof source === 'function') return source();\n if (source?.length) return source;\n return this.assetOptions();\n }\n );\n\n private readonly translateService = inject(TranslateService);\n\n protected readonly assetOptions = assetOptions(\n () => (this.config() as DropdownInput | undefined)?.optionsAsset\n );\n\n /** An option's text: authored as it stands, a key translated. */\n private readonly optionLabel = (\n option?: DropdownOption<DropdownValue>\n ): string => {\n if (!option?.label) return '';\n return option.noTranslate\n ? option.label\n : this.translateService.translate(option.label);\n };\n\n protected readonly filteredOptions = computed(\n (): DropdownOption<DropdownValue>[] => {\n const search = this.searchTerm().toLowerCase();\n if (!search) return this.dropdownOptions();\n return this.dropdownOptions().filter((o) => {\n const label = this.optionLabel(o).toLowerCase();\n return (\n label.includes(search) ||\n String(o.value).toLowerCase().includes(search)\n );\n });\n }\n );\n\n /** The option ↑/↓ point at while the panel is open; -1 is none. Reset as the search narrows the list. */\n protected readonly activeIndex = linkedSignal<\n DropdownOption<DropdownValue>[],\n number\n >({\n source: this.filteredOptions,\n computation: (options) =>\n this.searchTerm() ? this.nextEnabled(options, -1, 1) : -1,\n });\n\n /** The enabled option `step` rows past `from`, wrapping; `from` itself when none. */\n private readonly nextEnabled = (\n options: DropdownOption<DropdownValue>[],\n from: number,\n step: 1 | -1\n ): number => {\n for (let i = 1; i <= options.length; i++) {\n const index =\n (((from + step * i) % options.length) + options.length) %\n options.length;\n if (!options[index].disabled) return index;\n }\n return from;\n };\n\n /** One pick reads as its option's label, several as a count. */\n private readonly selectionLabel = computed((): string => {\n const values = this.selectedValues();\n if (values.length === 0) return '';\n if (values.length === 1) {\n return this.optionLabel(\n this.dropdownOptions().find((o) => o.value === values[0])\n );\n }\n const translation = this.translateService.translate(\n `selected?count=${values.length}`\n );\n return translation.includes('selected')\n ? `${values.length} Selected`\n : translation;\n });\n\n protected readonly displayValue = computed((): string =>\n this.toggle() ? this.searchTerm() : this.selectionLabel()\n );\n\n protected readonly placeholderText = computed((): string => {\n if (this.toggle()) {\n const label = this.selectionLabel();\n if (label) return label;\n }\n const placeholder = (this.config() as DropdownInput | undefined)\n ?.placeholder;\n return placeholder ? this.translateService.translate(placeholder) : '';\n });\n\n private readonly wrapperRef =\n viewChild<ElementRef<HTMLDivElement>>('wrapper');\n\n protected readonly selectorConfig = computed<\n SelectorConfig<DropdownBoxComponent>\n >(() => ({\n component: DropdownBoxComponent,\n base: 'm-dropdown-input',\n matchTriggerWidth: true,\n toggle: true,\n dir: this.dir(),\n bindings: [\n inputBinding('options', this.filteredOptions),\n inputBinding('selected', this.selectedValues),\n inputBinding('multiple', () => this.multiple),\n inputBinding('activeIndex', this.activeIndex),\n outputBinding<DropdownOption<DropdownValue>>('action', (option) =>\n this.selectOption(option)\n ),\n ],\n }));\n\n /** Shuts the panel after a pick, the way a click on the trigger would. */\n protected readonly closePanel = (): void => {\n this.toggle.set(false);\n this.searchTerm.set('');\n setTimeout(() => this.wrapperRef()?.nativeElement.click(), 0);\n };\n\n protected readonly onOpened = (): void => {\n this.toggle.set(true);\n this.searchTerm.set('');\n const current = this.selectedValues()[0];\n this.activeIndex.set(\n this.filteredOptions().findIndex((o) => o.value === current)\n );\n };\n\n // Focus stays in the trigger input (it is the search box), so ↑/↓ move the\n // active option rather than DOM focus. Closed, ArrowDown bubbles on to\n // SelectorDirective, which opens the panel.\n protected readonly onArrow = (event: Event, step: 1 | -1): void => {\n if (!this.toggle()) return;\n event.preventDefault();\n this.activeIndex.update((index) =>\n this.nextEnabled(this.filteredOptions(), index, step)\n );\n };\n\n // Enter never reaches SelectorDirective (it would toggle the panel); open,\n // it picks the active option.\n protected readonly onEnter = (event: Event): void => {\n event.stopPropagation();\n if (!this.toggle()) return;\n event.preventDefault();\n const option = this.filteredOptions()[this.activeIndex()];\n if (option && !option.disabled) this.selectOption(option);\n };\n\n protected readonly onClosed = (): void => {\n this.toggle.set(false);\n this.searchTerm.set('');\n };\n\n protected readonly onInput = (value: string): void => {\n this.searchTerm.set(value);\n };\n\n protected readonly preventToggleWhenOpen = (event: Event): void => {\n if (this.toggle() || this.readonly() || this.config()?.readonly) {\n event.stopPropagation();\n }\n };\n}\n"],"mappings":";;;;;;;;;;;AA0DA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YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"magmonium-one-base-dropdown-2hgXcmhE.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/input/ui/dropdown/dropdown-box.ts","../../../../libs/one/src/lib/shared/ui/input/ui/dropdown/base-dropdown.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { TranslatePipe } from '../../../../pipe/translate';\nimport { DropdownOption, DropdownValue } from '../../model/input';\n\n@Component({\n selector: 'm-dropdown-box',\n imports: [TranslatePipe],\n template: `\n <ul class=\"dropdown-box\" role=\"listbox\">\n @for (option of options(); track option.value; let i = $index) {\n @let selectedState = isSelected(option.value);\n <li\n class=\"dropdown-box__option\"\n [class.dropdown-box__option--selected]=\"selectedState\"\n [class.dropdown-box__option--disabled]=\"option.disabled\"\n [class.dropdown-box__option--active]=\"i === activeIndex()\"\n [style.--m-dropdown-option-depth]=\"option.depth\"\n role=\"option\"\n [attr.aria-selected]=\"selectedState\"\n [attr.data-value]=\"option.value\"\n (click)=\"selectOption(option)\"\n (keydown.enter)=\"selectOption(option)\"\n tabindex=\"0\"\n >\n <!-- A group header is a row, never a choice: no box to tick. -->\n @if (multiple() && !option.disabled) {\n <input\n type=\"checkbox\"\n class=\"dropdown-box__checkbox\"\n [checked]=\"selectedState\"\n tabindex=\"-1\"\n (click)=\"$event.preventDefault()\"\n />\n }\n @if (option.noTranslate) {\n {{ option.label }}\n } @else {\n {{ option.label | translate }}\n }\n </li>\n } @empty {\n <li class=\"dropdown-box__empty\">\n {{ 'no-results-found' | translate }}\n </li>\n }\n </ul>\n `,\n styleUrl: './dropdown-box.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DropdownBoxComponent {\n readonly options = input<DropdownOption<DropdownValue>[]>([]);\n /** The values ticked, as a list whichever Field drew the panel. */\n readonly selected = input<readonly DropdownValue[]>([]);\n readonly multiple = input<boolean>(false);\n readonly activeIndex = input<number>(-1);\n readonly action = output<DropdownOption<DropdownValue>>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // Keep the keyboard-active option in view as ↑/↓ walk a scrolled list.\n constructor() {\n effect(() => {\n const index = this.activeIndex();\n if (index < 0) return;\n this.host.nativeElement\n .querySelectorAll('.dropdown-box__option')\n [index]?.scrollIntoView?.({ block: 'nearest' });\n });\n }\n\n protected readonly isSelected = (value: DropdownValue): boolean =>\n this.selected().includes(value);\n\n // Only emit a selection event for enabled options.\n protected readonly selectOption = (\n option: DropdownOption<DropdownValue>\n ): void => {\n if (option.disabled) return;\n this.action.emit(option);\n };\n}\n","import {\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n inputBinding,\n linkedSignal,\n model,\n outputBinding,\n Signal,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ValidationError, WithOptionalFieldTree } from '@angular/forms/signals';\nimport { LabelComponent } from '../label';\nimport { TextOutputComponent } from '../../../text-output';\nimport { BaseInputComponent } from '../../lib/base-input';\nimport { Button } from '../../../button/type/button';\nimport { ButtonComponent } from '../../../button/ui/button';\nimport { TranslateService } from '../../../../services';\nimport { SelectorConfig, SelectorDirective } from '../../../../directives';\nimport { Direction } from '../../../../directives/selector/selector-type';\nimport { DropdownBoxComponent } from './dropdown-box';\nimport {\n DropdownInput,\n DropdownOption,\n DropdownValue,\n TextInput,\n} from '../../model/input';\nimport { TextInputComponent } from '../text/text';\nimport { assetOptions } from '../../lib/options-asset';\n\n/** The trigger both option Fields draw: a searchable text input and a chevron. */\nexport const DROPDOWN_TEMPLATE = `\n @if (config(); as dropdown) {\n @if (dropdown.label) {\n <m-label\n [for]=\"dropdown.name ?? ''\"\n [placeholder]=\"dropdown.label\"\n [params]=\"dropdown.params\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n />\n }\n <div\n class=\"trigger-wrap\"\n #wrapper\n [mSelector]=\"selectorConfig()\"\n [disabled]=\"disabled() || readonly() || !!config()?.readonly\"\n (opened)=\"onOpened()\"\n (closed)=\"onClosed()\"\n (focusin)=\"isFocused.set(true)\"\n (focusout)=\"isFocused.set(false)\"\n >\n <m-text-input\n [config]=\"triggerInputConfig()\"\n [value]=\"displayValue()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [hideErrors]=\"true\"\n [(touched)]=\"touched\"\n [focused]=\"focused()\"\n (valueChange)=\"onInput($event)\"\n (click)=\"preventToggleWhenOpen($event)\"\n (keydown.space)=\"$event.stopPropagation()\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.arrowdown)=\"onArrow($event, 1)\"\n (keydown.arrowup)=\"onArrow($event, -1)\"\n (keydown.tab)=\"$event.stopPropagation()\"\n />\n <m-button [disabled]=\"disabled()\" [config]=\"chevron()\" />\n </div>\n @if (showErrors()) {\n @for (error of errors(); track $index) {\n <m-text-output\n variant=\"footer\"\n color=\"error\"\n [label]=\"error.message\"\n />\n }\n }\n }\n`;\n\nexport const DROPDOWN_IMPORTS = [\n LabelComponent,\n TextOutputComponent,\n TextInputComponent,\n ButtonComponent,\n SelectorDirective,\n];\n\n/**\n * Everything a Dropdown and a Multiselect share: the options, the search, the\n * keyboard walk and the panel. What differs is only what the Field holds — one\n * value or a list — so a subclass says which values are selected and what a\n * pick does to them.\n */\n@Directive()\nexport abstract class BaseDropdownComponent extends BaseInputComponent<DropdownInput> {\n public override config = input<Partial<DropdownInput> | undefined>();\n public override required = input<boolean>(false);\n public override disabled = input<boolean>(false);\n public override invalid = input<boolean>(false);\n public override touched = model<boolean>(false);\n public override focused = input<boolean>(false);\n public override errors = input<readonly WithOptionalFieldTree<ValidationError>[]>(\n []\n );\n public override showErrors = computed(() => this.touched() && this.invalid());\n\n readonly options = input<\n DropdownOption<DropdownValue>[] | Signal<DropdownOption<DropdownValue>[]>\n >();\n readonly dir = input<Direction>();\n readonly toggle = model(false);\n readonly searchTerm = signal('');\n readonly isFocused = signal(false);\n readonly chevron = computed(\n () =>\n <Button>{\n icon: this.toggle() ? 'chevron-up' : 'chevron-down',\n one: true,\n variant: 'ghost',\n // In-Field control, never the form's submit — without this the Button\n // reads as the submit control and greys out while the form is invalid.\n type: 'button',\n // Chevron tracks the trigger's border like the text input's own icon:\n // red while the Field shows errors, focus tint while focused, border at rest.\n color: this.showErrors()\n ? 'error'\n : this.isFocused()\n ? 'focus'\n : 'border',\n // The trigger input is the Field's tab stop; the chevron only repeats\n // what clicking that input already does, so Tab walks past it.\n tabindex: -1,\n }\n );\n\n /** The values the Field holds now, as a list whichever kind it is. */\n protected abstract readonly selectedValues: Signal<readonly DropdownValue[]>;\n /** Whether the panel ticks rows and stays open across picks. */\n protected abstract readonly multiple: boolean;\n /** What picking `option` does to the Field's value. */\n protected abstract selectOption(option: DropdownOption<DropdownValue>): void;\n\n protected readonly triggerInputConfig = computed(() => {\n const dropdown = this.config() as DropdownInput | undefined;\n return <Partial<TextInput>>{\n name: dropdown?.name,\n icon: dropdown?.icon,\n one: dropdown?.one,\n placeholder: this.placeholderText(),\n readonly: this.readonly() || !!dropdown?.readonly,\n };\n });\n\n protected readonly dropdownOptions = computed(\n (): DropdownOption<DropdownValue>[] => {\n const runtimeOptions = this.options();\n const source =\n runtimeOptions ?? (this.config() as DropdownInput | undefined)?.options;\n if (typeof source === 'function') return source();\n if (source?.length) return source;\n return this.assetOptions();\n }\n );\n\n private readonly translateService = inject(TranslateService);\n\n protected readonly assetOptions = assetOptions(\n () => (this.config() as DropdownInput | undefined)?.optionsAsset\n );\n\n /** An option's text: authored as it stands, a key translated. */\n private readonly optionLabel = (\n option?: DropdownOption<DropdownValue>\n ): string => {\n if (!option?.label) return '';\n return option.noTranslate\n ? option.label\n : this.translateService.translate(option.label);\n };\n\n protected readonly filteredOptions = computed(\n (): DropdownOption<DropdownValue>[] => {\n const search = this.searchTerm().toLowerCase();\n if (!search) return this.dropdownOptions();\n return this.dropdownOptions().filter((o) => {\n const label = this.optionLabel(o).toLowerCase();\n return (\n label.includes(search) ||\n String(o.value).toLowerCase().includes(search)\n );\n });\n }\n );\n\n /** The option ↑/↓ point at while the panel is open; -1 is none. Reset as the search narrows the list. */\n protected readonly activeIndex = linkedSignal<\n DropdownOption<DropdownValue>[],\n number\n >({\n source: this.filteredOptions,\n computation: (options) =>\n this.searchTerm() ? this.nextEnabled(options, -1, 1) : -1,\n });\n\n /** The enabled option `step` rows past `from`, wrapping; `from` itself when none. */\n private readonly nextEnabled = (\n options: DropdownOption<DropdownValue>[],\n from: number,\n step: 1 | -1\n ): number => {\n for (let i = 1; i <= options.length; i++) {\n const index =\n (((from + step * i) % options.length) + options.length) %\n options.length;\n if (!options[index].disabled) return index;\n }\n return from;\n };\n\n /** One pick reads as its option's label, several as a count. */\n private readonly selectionLabel = computed((): string => {\n const values = this.selectedValues();\n if (values.length === 0) return '';\n if (values.length === 1) {\n return this.optionLabel(\n this.dropdownOptions().find((o) => o.value === values[0])\n );\n }\n const translation = this.translateService.translate(\n `selected?count=${values.length}`\n );\n return translation.includes('selected')\n ? `${values.length} Selected`\n : translation;\n });\n\n protected readonly displayValue = computed((): string =>\n this.toggle() ? this.searchTerm() : this.selectionLabel()\n );\n\n protected readonly placeholderText = computed((): string => {\n if (this.toggle()) {\n const label = this.selectionLabel();\n if (label) return label;\n }\n const placeholder = (this.config() as DropdownInput | undefined)\n ?.placeholder;\n return placeholder ? this.translateService.translate(placeholder) : '';\n });\n\n private readonly wrapperRef =\n viewChild<ElementRef<HTMLDivElement>>('wrapper');\n\n protected readonly selectorConfig = computed<\n SelectorConfig<DropdownBoxComponent>\n >(() => ({\n component: DropdownBoxComponent,\n base: 'm-dropdown-input',\n matchTriggerWidth: true,\n toggle: true,\n dir: this.dir(),\n bindings: [\n inputBinding('options', this.filteredOptions),\n inputBinding('selected', this.selectedValues),\n inputBinding('multiple', () => this.multiple),\n inputBinding('activeIndex', this.activeIndex),\n outputBinding<DropdownOption<DropdownValue>>('action', (option) =>\n this.selectOption(option)\n ),\n ],\n }));\n\n /** Shuts the panel after a pick, the way a click on the trigger would. */\n protected readonly closePanel = (): void => {\n this.toggle.set(false);\n this.searchTerm.set('');\n setTimeout(() => this.wrapperRef()?.nativeElement.click(), 0);\n };\n\n protected readonly onOpened = (): void => {\n this.toggle.set(true);\n this.searchTerm.set('');\n const current = this.selectedValues()[0];\n this.activeIndex.set(\n this.filteredOptions().findIndex((o) => o.value === current)\n );\n };\n\n // Focus stays in the trigger input (it is the search box), so ↑/↓ move the\n // active option rather than DOM focus. Closed, ArrowDown bubbles on to\n // SelectorDirective, which opens the panel.\n protected readonly onArrow = (event: Event, step: 1 | -1): void => {\n if (!this.toggle()) return;\n event.preventDefault();\n this.activeIndex.update((index) =>\n this.nextEnabled(this.filteredOptions(), index, step)\n );\n };\n\n // Enter never reaches SelectorDirective (it would toggle the panel); open,\n // it picks the active option.\n protected readonly onEnter = (event: Event): void => {\n event.stopPropagation();\n if (!this.toggle()) return;\n event.preventDefault();\n const option = this.filteredOptions()[this.activeIndex()];\n if (option && !option.disabled) this.selectOption(option);\n };\n\n protected readonly onClosed = (): void => {\n this.toggle.set(false);\n this.searchTerm.set('');\n };\n\n protected readonly onInput = (value: string): void => {\n this.searchTerm.set(value);\n };\n\n protected readonly preventToggleWhenOpen = (event: Event): void => {\n if (this.toggle() || this.readonly() || this.config()?.readonly) {\n event.stopPropagation();\n }\n };\n}\n"],"mappings":";;;;;;;;;;;AA0DA,IAAa,uBAAb,MAAa,qBAAoB;CACtB,UAAU,MAAuC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAEpD,WAAW,MAAgC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC9C,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,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AA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,eAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,KAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,cAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -6,7 +6,7 @@ import { n as toAttrNumber, r as ConfigComponent, t as toAttrBool } from "./magm
|
|
|
6
6
|
import { t as MRefDirective } from "./magmonium-one-m-ref-DLIAzywu.mjs";
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
import { ChangeDetectionStrategy, Component, InjectionToken, ViewEncapsulation, computed, effect, forwardRef, inject, input, model, output, signal, viewChild } from "@angular/core";
|
|
9
|
-
import { RouterModule } from "@angular/router";
|
|
9
|
+
import { RouterLink, RouterModule } from "@angular/router";
|
|
10
10
|
import { IMAGE_LOADER, NgOptimizedImage, NgTemplateOutlet } from "@angular/common";
|
|
11
11
|
const getBadgeClasses = (config) => {
|
|
12
12
|
if (!config) return "badge";
|
|
@@ -222,6 +222,7 @@ function deriveGroupClass(group) {
|
|
|
222
222
|
if (group?.primary) classList.push("is-primary");
|
|
223
223
|
return classList.join(" ");
|
|
224
224
|
}
|
|
225
|
+
const ACTION_BUTTON_HOST = new InjectionToken("ACTION_BUTTON_HOST");
|
|
225
226
|
var ImgComponent = class ImgComponent {
|
|
226
227
|
#httpService = inject(HttpService);
|
|
227
228
|
src = input(...ngDevMode ? [void 0, { debugName: "src" }] : /* istanbul ignore next */ []);
|
|
@@ -661,6 +662,11 @@ var ButtonComponent = class ButtonComponent extends ReactiveElementComponent {
|
|
|
661
662
|
element = this.button;
|
|
662
663
|
className = computed(() => deriveButtonClass(this.config()), ...ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []);
|
|
663
664
|
navRef = inject(NAV_STORE_REF, { optional: true });
|
|
665
|
+
resolvesConfigAsset = !inject(ACTION_BUTTON_HOST, { optional: true });
|
|
666
|
+
routerLinkRef = inject(RouterLink, {
|
|
667
|
+
self: true,
|
|
668
|
+
optional: true
|
|
669
|
+
});
|
|
664
670
|
sectionForm = inject(SECTION_FORM_CONTEXT, { optional: true });
|
|
665
671
|
isFormSubmit = computed(() => {
|
|
666
672
|
if (!this.sectionForm || this.isDesignMode) return false;
|
|
@@ -1284,6 +1290,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1284
1290
|
}]
|
|
1285
1291
|
}
|
|
1286
1292
|
});
|
|
1287
|
-
export {
|
|
1293
|
+
export { deriveGroupClass as a, enumValue as c, formatBadgeCount as d, shouldShowBadge as f, ACTION_BUTTON_HOST as i, ReactiveElementComponent as l, SECTION_FORM_CONTEXT as n, actionName as o, ImgComponent as r, isButtonName as s, ButtonComponent as t, BadgeComponent as u };
|
|
1288
1294
|
|
|
1289
|
-
//# sourceMappingURL=magmonium-one-button-
|
|
1295
|
+
//# sourceMappingURL=magmonium-one-button-C5dk4R_m.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"magmonium-one-button-C5dk4R_m.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/badge/lib/badge.ts","../../../../libs/one/src/lib/shared/ui/badge/ui/badge.ts","../../../../libs/one/src/lib/shared/lib/components/reactive-element.ts","../../../../libs/one/src/lib/shared/functions/object/enum-value.ts","../../../../libs/one/src/lib/shared/ui/button/lib/function/button.ts","../../../../libs/one/src/lib/shared/ui/button/lib/function/group.ts","../../../../libs/one/src/lib/shared/ui/button/lib/action-host.token.ts","../../../../libs/one/src/lib/shared/ui/img/img.ts","../../../../libs/one/src/lib/shared/ui/form/lib/section-form-context.token.ts","../../../../libs/one/src/lib/shared/ui/button/ui/button.ts","../../../../libs/one/src/lib/shared/ui/button/ui/button.html"],"sourcesContent":["import { Badge } from '../type/badge';\n\nexport const getBadgeClasses = (config: Badge | undefined): string => {\n if (!config) return 'badge';\n\n const classes = ['badge'];\n\n if (config.variant) {\n classes.push(`badge--${config.variant}`);\n }\n\n if (config.position && config.position !== 'static') {\n classes.push(`badge--${config.position}`);\n }\n\n if (config.animation && config.animation !== 'none') {\n classes.push(`badge--${config.animation}`);\n }\n\n return classes.join(' ');\n};\n\nexport const formatBadgeCount = (\n count: number | undefined,\n maxCount = 99\n): string => {\n if (count === undefined || count <= 0) return '';\n if (count > maxCount) return `${maxCount}+`;\n return count.toString();\n};\n\nexport const shouldShowBadge = (count: number | undefined): boolean =>\n count !== undefined && count > 0;\n\nexport const formatCount = formatBadgeCount;\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n model,\n} from '@angular/core';\nimport { ConfigComponent } from '../../../lib/components/config-component';\nimport { Badge } from '../type';\nimport { getBadgeClasses } from '../lib';\nimport { IconComponent } from '../../icon/ui/icon';\n\n@Component({\n selector: 'm-badge',\n imports: [IconComponent],\n template: `\n <span [class]=\"classes()\">\n @if (iconConfig(); as icon) {\n <m-icon [config]=\"icon\" />\n }\n <ng-content />\n @if (config()?.ping) {\n <span class=\"badge__ping\"></span>\n }\n </span>\n `,\n styleUrls: ['./badge.sass'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BadgeComponent extends ConfigComponent<Badge> {\n override readonly subFolder = 'badges';\n override config = model<Partial<Badge>>();\n\n protected readonly classes = computed(() => getBadgeClasses(this.config()));\n\n protected readonly iconConfig = computed(() => {\n const iconName = this.config()?.icon;\n if (!iconName) return undefined;\n const variant = this.config()?.variant;\n\n let color = '';\n if (variant === 'saas') {\n color = 'mm';\n } else if (variant === 'minimal') {\n color = 'textSecondary';\n } else {\n color = this.pallet()?.contrastColor || '';\n }\n\n return {\n name: iconName,\n color,\n };\n });\n}\n","import { effect, ElementRef, signal } from '@angular/core';\nimport { ConfigComponent } from './config-component';\nimport { Config } from '../../type/config/config-type';\n\n/**\n * Base class that provides reactive classList functionality for components with viewChild elements.\n * Extends ConfigComponent to inherit config management and color service functionality.\n */\nexport abstract class ReactiveElementComponent<\n T extends Config,\n> extends ConfigComponent<T> {\n /**\n * Abstract property that child classes must implement to specify which element to observe.\n * Should return the viewChild ElementRef that contains the DOM element to observe.\n */\n protected abstract element(): ElementRef | undefined;\n\n /**\n * Reactive signal containing the current classList of the observed element.\n * Updates automatically when the DOM element's classes change.\n */\n protected readonly classList = signal<string[]>([]);\n\n /**\n * MutationObserver instance for observing class changes.\n * Automatically managed by the component lifecycle.\n */\n private observer: MutationObserver | null = null;\n\n constructor() {\n super();\n\n // Set up reactive classList observation\n effect(() => {\n const el = this.element()?.nativeElement;\n\n // Cleanup previous observer\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n\n if (!el) {\n this.classList.set([]);\n return;\n }\n\n // Set initial classList\n this.classList.set(Array.from(el.classList));\n\n // Set up MutationObserver for reactivity\n this.observer = new MutationObserver(() => {\n this.classList.set(Array.from(el.classList));\n });\n\n this.observer.observe(el, {\n attributes: true,\n attributeFilter: ['class'],\n });\n });\n }\n\n /**\n * Check if the element has a specific CSS class.\n * @param className - The class name to check for\n * @returns True if the element has the class, false otherwise\n */\n protected hasClass(className: string): boolean {\n return this.classList().includes(className);\n }\n\n /**\n * Toggle a CSS class on the element.\n * @param className - The class name to toggle\n * @param force - Optional boolean to force add (true) or remove (false)\n */\n protected toggleClass(className: string, force?: boolean): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n if (force !== undefined) {\n el.classList.toggle(className, force);\n } else {\n el.classList.toggle(className);\n }\n }\n\n /**\n * Add one or more CSS classes to the element.\n * @param classNames - The class names to add\n */\n protected addClass(...classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.add(...classNames);\n }\n\n /**\n * Remove one or more CSS classes from the element.\n * @param classNames - The class names to remove\n */\n protected removeClass(...classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.remove(...classNames);\n }\n\n /**\n * Replace one CSS class with another.\n * @param oldClass - The class to remove\n * @param newClass - The class to add\n */\n protected replaceClass(oldClass: string, newClass: string): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.replace(oldClass, newClass);\n }\n\n /**\n * Set the complete classList, replacing all existing classes.\n * @param classNames - The new class names to set\n */\n protected setClassList(classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.className = classNames.join(' ');\n }\n}\n","/**\n * `value` as a member of `values` — a string enum's object — or `undefined`\n * when the enum does not hold it.\n *\n * The reader a generated Screen narrows a plain string through wherever it\n * lands on a value its SortEnum or action enum types: a typed-in literal, a\n * constant, an input, another Control's payload. A call and not an `as` cast,\n * for the reason the Field readers are one — the read lands in a template,\n * whose parser has no TS type assertion (NG5002) — and checked rather than\n * asserted, so a string the enum never held arrives as `undefined` instead of\n * as a lie (m-one-ui ADR 0203).\n */\nexport function enumValue<T extends string>(\n value: unknown,\n values: Record<string, T>\n): T | undefined {\n return typeof value === 'string' &&\n (Object.values(values) as string[]).includes(value)\n ? (value as T)\n : undefined;\n}\n","import { enumValue } from '../../../../functions/object/enum-value';\nimport { Button } from '../../type/button';\n\nexport function deriveButtonClass(button?: Button): string {\n if (!button) {\n return '';\n }\n const classList: string[] = [];\n if (button.icon || button.imgSrc) {\n if (!button.label || button.iconOnly) {\n classList.push('only-icon');\n }\n classList.push(button.isRightIcon ? 'with-right-icon' : 'with-left-icon');\n }\n if (button.variant === 'primary') {\n classList.push('primary');\n }\n if (button.variant === 'ghost') {\n classList.push('ghost');\n }\n if (button.variant === 'tab') {\n classList.push('tab');\n }\n if (button.fullWidth) {\n classList.push('full-width');\n }\n if (button.stacked) {\n classList.push('stacked');\n }\n if (button.badge) {\n classList.push('has-badge');\n }\n if (button.nonClickable) {\n classList.push('read-only');\n }\n return classList.join(' ');\n}\n\nexport function isButtonName(name: string, button?: Button): boolean {\n if (!button) {\n return false;\n }\n return button.name === name || button.label === name;\n}\n\n/**\n * The pressed Button's name, read as the enum a generated Screen keeps its\n * action bar's names in — or `undefined` for a press no name of it answers.\n *\n * The reader a SectionAction's `clicked` is written through wherever the value\n * lands on an enum-typed StateProperty or ScreenVariable. A call and not an\n * `as` cast, for the reason the Field readers are one: the read lands in a\n * template, whose parser has no TS type assertion (NG5002). Checked against\n * the enum's values rather than asserted, so a Button merged in from an asset\n * the enum never saw arrives as `undefined` instead of as a lie\n * (m-one-ui ADR 0203).\n */\nexport function actionName<Name extends string>(\n button: Button | undefined,\n names: Record<string, Name>\n): Name | undefined {\n return enumValue(button?.name, names);\n}\n","import { ButtonGroup } from '../../type/button';\n\nexport function deriveGroupClass(group?: Partial<ButtonGroup>): string {\n if (!group) {\n return '';\n }\n const classList: string[] = [];\n classList.push(group?.vertical ? 'vertical' : 'horizontal');\n\n // Handle center for backward compatibility\n if (group?.center) {\n classList.push('center');\n }\n\n // Handle new align property (takes precedence over center)\n if (group?.align) {\n classList.push(`align-${group.align}`);\n }\n\n if (group?.primary) {\n classList.push('is-primary');\n }\n\n return classList.join(' ');\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Published by `<m-action>` for the `<m-button>`s written inside it.\n *\n * A Button there is a description of a segment, never drawn itself: the bar\n * has no `ng-content`, reads each Button's resolved config off its instance and\n * draws its own `<button>` from it — which is what keeps the toggle, the\n * squeeze and the routed light working off one list. An `@if` around one\n * still takes it in and out of that list, because the bar's query follows the\n * Buttons that exist.\n *\n * The flag stops such a Button resolving a `buttons/<name>.yml` of its own:\n * the bar already resolves what an unlabelled Button is missing, and a named\n * segment that only ever rides on its tag would otherwise request a file that\n * was never written.\n */\nexport const ACTION_BUTTON_HOST = new InjectionToken<true>(\n 'ACTION_BUTTON_HOST'\n);\n","import {\n Component,\n ChangeDetectionStrategy,\n inject,\n input,\n signal,\n effect,\n computed,\n} from '@angular/core';\nimport { NgOptimizedImage, IMAGE_LOADER, ImageLoaderConfig } from '@angular/common';\nimport { HttpService } from '../../services/http';\n\n@Component({\n selector: 'm-img',\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgOptimizedImage],\n host: {\n // The box is the container's: 100% wide and tall unless a caller names\n // width/height figures, which land as inline px on this element.\n '[style.width.px]': 'boxWidth()',\n '[style.height.px]': 'boxHeight()',\n },\n providers: [\n {\n provide: IMAGE_LOADER,\n useValue: (config: ImageLoaderConfig) => {\n const src = config.src;\n if (src.includes('iiif.archive.org')) {\n const match = src.match(/(\\/full\\/)([^/]+)(\\/0\\/)/);\n if (match && config.width) {\n return src.replace(/(\\/full\\/)[^/]+(\\/0\\/)/, `$1${config.width},$2`);\n }\n }\n return src;\n },\n },\n ],\n template: `\n <div\n class=\"m-img\"\n [class.m-img--loaded]=\"status() === 'loaded'\"\n [class.m-img--error]=\"showFallback()\"\n [class.m-img--fill]=\"fill()\"\n [class.m-img--priority]=\"priority()\"\n [class.m-img--sized]=\"isSized()\"\n >\n @if (showFallback()) {\n <div class=\"m-img__fallback\" role=\"img\" [attr.aria-label]=\"alt()\">\n <svg viewBox=\"0 0 320 240\" fill=\"none\" preserveAspectRatio=\"xMidYMid slice\">\n <circle cx=\"112\" cy=\"92\" r=\"22\" fill=\"currentColor\" />\n <path d=\"M40 200l72-72 56 56 40-40 72 72z\" fill=\"currentColor\" />\n </svg>\n </div>\n } @else if (isDataUri()) {\n <img\n class=\"m-img__img\"\n [src]=\"effectiveSrc()!\"\n [alt]=\"alt()\"\n (load)=\"onLoad()\"\n (error)=\"onError()\"\n [width]=\"widthAttr()\"\n [height]=\"heightAttr()\"\n referrerpolicy=\"no-referrer\"\n />\n } @else {\n <img\n class=\"m-img__img\"\n [ngSrc]=\"effectiveSrc()!\"\n [alt]=\"alt()\"\n [priority]=\"priority()\"\n (load)=\"onLoad()\"\n (error)=\"onError()\"\n [fill]=\"fill()\"\n [width]=\"widthAttr()\"\n [height]=\"heightAttr()\"\n [ngSrcset]=\"autoNgSrcset()!\"\n [sizes]=\"sizes() || undefined\"\n decoding=\"async\"\n referrerpolicy=\"no-referrer\"\n />\n }\n @if (status() === 'loading' && !priority()) {\n <div class=\"m-img__skeleton\"></div>\n }\n </div>\n `,\n styleUrl: './img.sass',\n})\nexport class ImgComponent {\n readonly #httpService = inject(HttpService);\n\n readonly src = input<string | null | undefined>();\n readonly data = input<string | null | undefined>();\n readonly dataType = input<string>('image/jpeg');\n readonly alt = input.required<string>();\n readonly priority = input<boolean>(false);\n readonly fill = input<boolean>(true);\n // Unset rather than defaulted: `1200 × 1800` is the reservation\n // NgOptimizedImage needs, and a picture drawn 1200px wide because nobody\n // named a width is not the same thing. `attrWidth`/`attrHeight` carry that\n // default onto the tag; these two say whether anyone actually asked.\n readonly width = input<number | undefined>(undefined);\n readonly height = input<number | undefined>(undefined);\n readonly remote = input<string | undefined>();\n readonly ngSrcset = input<string | undefined>();\n readonly sizes = input<string | undefined>();\n\n readonly attrWidth = computed(() => this.width() ?? 1200);\n readonly attrHeight = computed(() => this.height() ?? 1800);\n\n // On the tag only when the picture is not filling its box — a filling\n // picture is sized by its box, the others carry the reservation figures.\n readonly widthAttr = computed(() => (this.fill() ? undefined : this.attrWidth()));\n readonly heightAttr = computed(() => (this.fill() ? undefined : this.attrHeight()));\n\n // Null unless the picture is drawn at a size it was told: a filling picture\n // takes its size from the box around it, and an unnamed figure leaves the\n // stylesheet's `width: 100%` in charge.\n readonly boxWidth = computed(() =>\n this.fill() ? null : (this.width() ?? null)\n );\n readonly boxHeight = computed(() =>\n this.fill() ? null : (this.height() ?? null)\n );\n\n // Both figures named means a box of exactly that shape, which the picture\n // has to cover rather than letter-box inside.\n readonly isSized = computed(\n () => this.boxWidth() !== null && this.boxHeight() !== null\n );\n\n readonly autoNgSrcset = computed(() => {\n const custom = this.ngSrcset();\n if (custom !== undefined) return custom;\n\n const src = this.effectiveSrc();\n if (src && src.includes('iiif.archive.org')) {\n return this.fill() ? '480w, 768w, 960w, 1200w, 1920w, 2048w' : '1x, 2x';\n }\n\n return undefined;\n });\n\n // --- State ---\n // One signal rather than a loaded/error pair: the three states are\n // exclusive, and two booleans could say both or neither.\n readonly status = signal<'loading' | 'loaded' | 'error'>('loading');\n\n readonly effectiveSrc = computed(() => {\n const d = this.data();\n if (d) return `data:${this.dataType()};base64,${d}`;\n const src = this.src();\n const remote = this.remote();\n if (\n src &&\n remote &&\n !src.startsWith('http') &&\n !src.startsWith('data:') &&\n !src.startsWith('blob:')\n ) {\n return this.#httpService.buildWcAssetUrl(remote, src);\n }\n return src;\n });\n\n // The one stand-in this component draws, for every case that has no picture\n // to show: a load that failed, a url nobody set, and design mode, where a\n // picture is placed on the canvas long before it points anywhere.\n readonly showFallback = computed(\n () => this.status() === 'error' || !this.effectiveSrc()\n );\n\n readonly isDataUri = computed(() => {\n const s = this.effectiveSrc();\n return !!s && (s.startsWith('data:') || s.startsWith('blob:'));\n });\n\n constructor() {\n effect(() => {\n // A source change starts the wait over.\n const source = this.effectiveSrc();\n this.status.set(source ? 'loading' : 'error');\n });\n }\n\n onLoad() {\n this.status.set('loaded');\n }\n\n onError() {\n this.status.set('error');\n }\n}\n","import { InjectionToken, Signal } from '@angular/core';\nimport { FieldTree } from '@angular/forms/signals';\nimport { FieldPatterns } from './field-patterns';\n\n/**\n * Published by `<m-section-form>` for projected `<m-section-form-item>`s.\n * Each item looks up `form()[name]` and binds `FormField` so its value writes\n * to that key — not via a `name` input on the inner TextInputComponent.\n *\n * The form context carries form state and field registration for projected\n * items. Sizing is inherited through the section/form host CSS variables.\n *\n * Projected Buttons read it when their `isSubmit` flag is true. That Button\n * locks on `blocked` and fires `submit` on click rather than relying on a\n * native `type=\"submit\"` — content projection can put it inside an app\n * wrapper, where the native path no longer reaches the `<form>` ancestor.\n */\nexport interface SectionFormContext {\n readonly form: Signal<FieldTree<Record<string, unknown>> | null>;\n /**\n * Announces a key, and whether the Field on that key is required. The flag is\n * what turns `required` written on a tag into a validator on the FieldTree —\n * without it the attribute only reaches the native input, which a `novalidate`\n * form ignores, so nothing would ever be invalid (ADR 0010).\n *\n * `value` is the Field's own value, written on its tag: what the key starts\n * on when the form's `data` holds nothing for it.\n */\n readonly registerField: (\n name: string,\n required?: boolean,\n patterns?: FieldPatterns,\n value?: unknown\n ) => void;\n /**\n * An item has mounted its control. Content projection gives the form no\n * render hook of its own, so this is what tells it the DOM is finally\n * complete enough to pick the field that takes the caret.\n */\n readonly fieldMounted: () => void;\n /**\n * An item has started loading its control's chunk. Every control arrives\n * through a dynamic import, and the chunks resolve in whatever order the\n * loader finishes them — so a `password` below an `otp` can put its input in\n * the DOM first. The form waits for the count to fall back to zero before it\n * reads document order for the caret.\n */\n readonly fieldPending: () => void;\n /** That load ended — mounted, superseded, or failed. Always paired with `fieldPending`. */\n readonly fieldSettled: () => void;\n /** Drops a destroyed item's rules, so a removed Field stops blocking. */\n readonly releaseField: (name: string) => void;\n /** Invalid or disabled — every submit control is locked while true. */\n readonly blocked: Signal<boolean>;\n /** Emits the form's `submit` output with the whole merged data. No-op while blocked. */\n readonly submit: () => void;\n /**\n * Bumped every time the form writes values the User did not type — a `data`\n * restamp, a `reset()` after submit. A projected item observing its own\n * field's value signal cannot tell those moves from a keystroke, so the\n * form says so: a move under an unchanged version is the User's, and the\n * only move a Field's `dataChange` announces (libs/one ADR 0032).\n */\n readonly dataVersion: Signal<number>;\n}\n\nexport const SECTION_FORM_CONTEXT = new InjectionToken<SectionFormContext>(\n 'SECTION_FORM_CONTEXT'\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { RouterLink, RouterModule } from '@angular/router';\nimport { IconComponent } from '../../icon';\nimport { BadgeComponent } from '../../badge';\nimport { ReactiveElementComponent } from '../../../lib/components/reactive-element';\nimport { TranslatePipe } from '../../../pipe/translate';\nimport { Button } from '../type/button';\nimport { ACTION_BUTTON_HOST, deriveButtonClass } from '../lib';\nimport { formatBadgeCount } from '../../badge';\nimport {\n toAttrBool,\n toAttrNumber,\n} from '../../../functions/config/attribute-value';\nimport { MRefDirective } from '../../../directives/m-ref/m-ref';\nimport { NAV_STORE_REF } from '../../../config/tokens';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ImgComponent } from '../../img/img';\n\nimport { resolvePallet } from '../../../lib/theme';\nimport { ThemeColor } from '@magmonium/cli';\nimport { SECTION_FORM_CONTEXT } from '../../form/lib/section-form-context.token';\n\n@Component({\n selector: 'm-button,m-one-button',\n templateUrl: './button.html',\n imports: [\n forwardRef(() => TranslatePipe),\n forwardRef(() => IconComponent),\n forwardRef(() => BadgeComponent),\n RouterModule,\n MRefDirective,\n forwardRef(() => NgTemplateOutlet),\n forwardRef(() => ImgComponent),\n ],\n styleUrls: ['./button.sass'],\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent extends ReactiveElementComponent<Button> {\n override config = model<Partial<Button>>();\n color = input<string | keyof ThemeColor | undefined>();\n labelClass = input<string | undefined>();\n fullWidth = input<boolean | string | undefined>();\n // NavRef — a NavId. The store reads the NavKind off that node to decide\n // route vs panel, so the Button never picks a link kind (ADR 0014).\n nav = input<string | undefined>();\n navParams = input<Record<string, string | number> | undefined>();\n href = input<string | undefined>();\n disabled = input<boolean | undefined>();\n variant = input<'primary' | 'ghost' | 'secondary' | 'tab' | undefined>();\n override name = input<string | undefined>();\n override baseUrl = input<string | undefined>();\n override one = input<boolean | undefined>();\n override remote = input<string | undefined>();\n override subFolder = 'buttons';\n // The rest of what a `buttons/<name>.yml` carries, so a one-off Button needs\n // no file (ADR 0010). `badge` is absent on purpose — it is an object, and an\n // object literal in markup is a lint error, so a badged Button still names\n // an asset or takes a bound config.\n label = input<string | undefined>();\n noTranslate = input<boolean | string | undefined>();\n // A Record, so it never rides as a literal attribute (ADR 0010) — it arrives\n // bound, from the page member holding every dynamic message value.\n params = input<Record<string, string> | undefined>();\n // When true, render a non-native element (div) instead of a <button>.\n // Use this when consumers explicitly need to avoid native <button> tags.\n noNative = input<boolean | string | undefined>();\n icon = input<string | undefined>();\n isRightIcon = input<boolean | string | undefined>();\n iconOnly = input<boolean | string | undefined>();\n stacked = input<boolean | string | undefined>();\n imgSrc = input<string | undefined>();\n nonClickable = input<boolean | string | undefined>();\n inverted = input<boolean | string | undefined>();\n isSubmit = input<boolean | string | undefined>();\n tabindex = input<number | string | undefined>();\n readonly clicked = output<Button | undefined>();\n button = viewChild<ElementRef>('button');\n protected element = this.button;\n protected readonly className = computed(() =>\n deriveButtonClass(this.config())\n );\n private readonly navRef = inject(NAV_STORE_REF, { optional: true });\n\n // Inside an `m-action` this Button is a segment the bar draws, never drawn\n // itself, so it leaves resolving a `buttons/<name>.yml` to the bar\n // (action-host.token.ts).\n protected override readonly resolvesConfigAsset = !inject(\n ACTION_BUTTON_HOST,\n { optional: true }\n );\n\n // A RouterLink written on this Button's own tag. Read by an `m-action` that\n // draws the Button as a link of its own: the tag is never in the DOM there,\n // so the directive on it can only say where the link goes, never follow it.\n readonly routerLinkRef = inject(RouterLink, { self: true, optional: true });\n\n // Present only for a Button projected into an `m-section-form`. Absent\n // everywhere else, so every Button outside one behaves exactly as before.\n private readonly sectionForm = inject(SECTION_FORM_CONTEXT, {\n optional: true,\n });\n\n // Only an explicitly marked Button inside a Section Form submits it. A\n // navigating Button is excluded: its click already goes somewhere, and\n // submitting on the way out would save a form the User was leaving.\n // A form on a visual editor's Canvas is a picture of a form, and its empty\n // fields make it invalid from the first render — a submit that locked on\n // that would show the designer a greyed-out Button they never configured.\n protected readonly isFormSubmit = computed(() => {\n if (!this.sectionForm || this.isDesignMode) return false;\n const config = this.config();\n if (config?.nav || config?.href) return false;\n return config?.isSubmit === true;\n });\n\n // The form's own lock, on top of whatever the config already disables: an\n // invalid or disabled form has nothing to submit, so its submit control says\n // so rather than swallowing the click.\n protected readonly isDisabled = computed(\n () =>\n this.config()?.disabled === true ||\n (this.isFormSubmit() && !!this.sectionForm?.blocked())\n );\n // A NavRef pointing at a Murl node reads as selected when it is the open\n // panel. Compared by NavId — there is no link string left to normalise.\n private readonly isMurlActive = computed(() => {\n const nav = this.config()?.nav;\n if (!nav) return false;\n if (!this.navRef?.murl()?.length) return false;\n return this.navRef.id() === nav;\n });\n private readonly isPrimary = computed(() =>\n this.variant() === 'primary' ||\n this.config()?.variant === 'primary' ||\n this.hasClass('primary')\n );\n private readonly colorInput = computed(() =>\n this.color() || this.config()?.color || 'mm'\n );\n private readonly buttonColor = computed(() => {\n const color = this.colorInput();\n const isPrimary = this.isPrimary();\n if (isPrimary && color === 'inverseText') {\n return resolvePallet('mm', this.themeStore.color()).color;\n }\n const pallet = resolvePallet(color, this.themeStore.color());\n return isPrimary ? pallet.contrastColor : pallet.color;\n });\n\n constructor() {\n super();\n effect(() => {\n const isPrimary = this.isPrimary();\n const colorInput = this.colorInput();\n const el = this.elementRef.nativeElement;\n if (isPrimary && colorInput === 'inverseText') {\n el.style.setProperty('--m-button-color-contrast', this.buttonColor());\n el.style.setProperty('--m-one-button-color-contrast', this.buttonColor());\n }\n });\n }\n\n protected readonly buttonIcon = computed(() => {\n const name = this.config()?.icon;\n if (!name) {\n return undefined;\n }\n return {\n name: this.config()?.icon,\n color: this.buttonColor(),\n baseUrl: this.baseUrl(),\n remote: this.remote() ?? this.config()?.remote,\n };\n });\n private overrideProperty = computed<Partial<Button>>(() => {\n const button = {} as Partial<Button>;\n // The rest of what a `buttons/<name>.yml` carries, so a one-off Button\n // needs no file (ADR 0010). An omitted attribute is skipped rather than\n // written as undefined — writing it would blank whatever the asset set.\n const put = (key: keyof Button, value: unknown): void => {\n if (value !== undefined) (button as Record<string, unknown>)[key] = value;\n };\n put('label', this.label());\n put('icon', this.icon());\n put('imgSrc', this.imgSrc());\n put('tabindex', toAttrNumber(this.tabindex()));\n put('noTranslate', toAttrBool(this.noTranslate()));\n put('params', this.params());\n put('isRightIcon', toAttrBool(this.isRightIcon()));\n put('iconOnly', toAttrBool(this.iconOnly()));\n put('stacked', toAttrBool(this.stacked()));\n put('nonClickable', toAttrBool(this.nonClickable()));\n put('inverted', toAttrBool(this.inverted()));\n put('isSubmit', toAttrBool(this.isSubmit()));\n\n if (this.color()) {\n button['color'] = this.color();\n }\n if (this.labelClass()) {\n button['labelClass'] = this.labelClass();\n }\n if (typeof this.fullWidth() !== 'undefined') {\n button['fullWidth'] = toAttrBool(this.fullWidth());\n }\n if (this.nav()) {\n button['nav'] = this.nav();\n }\n if (this.navParams()) {\n button['navParams'] = this.navParams();\n }\n if (this.href()) {\n button['href'] = this.href();\n }\n if (typeof this.disabled() !== 'undefined') {\n button['disabled'] = this.disabled();\n }\n if (this.variant()) {\n button['variant'] = this.variant();\n }\n\n // Force primary and clear ghost if the color is 'inverse' or 'inverseText', unless explicitly ghost or secondary\n const finalColor = button.color || this.config()?.color;\n const isExplicitGhost =\n button.variant === 'ghost' || this.config()?.variant === 'ghost';\n const isExplicitSecondary =\n button.variant === 'secondary' ||\n (this.config()?.variant as string) === 'secondary';\n if (\n (finalColor === 'inverse' || finalColor === 'inverseText') &&\n !isExplicitGhost &&\n !isExplicitSecondary\n ) {\n button['color'] = 'inverseText';\n button['variant'] = 'primary';\n } else if (finalColor === 'inverse') {\n button['color'] = 'inverseText';\n }\n\n if (this.config()?.nav || this.nav()) {\n button['variant'] = this.isMurlActive() ? undefined : 'ghost';\n }\n\n return button;\n });\n\n protected override resolveComponentOverrides(): Partial<Button> {\n return this.overrideProperty();\n }\n\n public onClick() {\n if (this.isFormSubmit()) {\n // Called rather than left to a native `type=\"submit\"`: the `<form>` is\n // only an ancestor while nothing re-projects this Button out of it.\n this.sectionForm?.submit();\n }\n this.clicked.emit(this.config());\n }\n\n protected readonly formatBadgeCount = (count: number, max = 99): string =>\n formatBadgeCount(count, max);\n\n}\n","@if (config(); as config) {\n <!-- One branch for every in-app target: `mRef` names a NavId and the store\n reads the NavKind off that node to decide route vs panel (ADR 0014). -->\n @if (config.nav) {\n @if (!noNative()) {\n <button\n type=\"button\"\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [disabled]=\"config.disabled\"\n [mRef]=\"config.nav\"\n [mRefParams]=\"config.navParams\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n mRefLinkActive=\"tab\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </button>\n } @else {\n <div\n role=\"button\"\n [attr.tabindex]=\"config.tabindex ?? 0\"\n class=\"non-native {{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n [attr.aria-disabled]=\"config.disabled ? 'true' : 'false'\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </div>\n }\n } @else if (config.href) {\n <a\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [href]=\"config.href\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </a>\n } @else {\n @if (!noNative()) {\n <button\n type=\"button\"\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </button>\n } @else {\n <div\n role=\"button\"\n [attr.tabindex]=\"config.tabindex ?? 0\"\n class=\"non-native {{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : 'false'\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </div>\n }\n }\n}\n\n<ng-template #buttonContent let-button=\"button\">\n @if (button.imgSrc) {\n <div class=\"button-icon button-icon--img\">\n <m-img [src]=\"button.imgSrc\" [remote]=\"button.remote\" [alt]=\"button.label || button.name || ''\" />\n @if (button.badge && button.badge.count) {\n <m-badge\n [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'absolute' }\"\n >{{ formatBadgeCount(button.badge.count) }}</m-badge\n >\n }\n </div>\n } @else if (buttonIcon(); as icon) {\n <div class=\"button-icon\">\n @if (isFromOne()) {\n <m-one-icon [config]=\"icon\" />\n } @else {\n <m-icon [config]=\"icon\" />\n }\n @if (button.badge && button.badge.count) {\n <m-badge\n [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'absolute' }\"\n >{{ formatBadgeCount(button.badge.count) }}</m-badge\n >\n }\n </div>\n }\n @if (button.label && !button.iconOnly) {\n <span class=\"button-label {{ button.labelClass || '' }}\">\n {{ button.noTranslate ? button.label : (button.label | translate: button.params) }}\n </span>\n }\n @if (!buttonIcon() && button.badge && button.badge.count) {\n <m-badge [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'static' }\">{{\n formatBadgeCount(button.badge.count)\n }}</m-badge>\n }\n</ng-template>\n"],"mappings":";;;;;;;;;;AAEA,MAAa,mBAAmB,WAAqC;CACnE,IAAI,CAAC,QAAQ,OAAO;CAEpB,MAAM,UAAU,CAAC,OAAO;CAExB,IAAI,OAAO,SACT,QAAQ,KAAK,UAAU,OAAO,SAAS;CAGzC,IAAI,OAAO,YAAY,OAAO,aAAa,UACzC,QAAQ,KAAK,UAAU,OAAO,UAAU;CAG1C,IAAI,OAAO,aAAa,OAAO,cAAc,QAC3C,QAAQ,KAAK,UAAU,OAAO,WAAW;CAG3C,OAAO,QAAQ,KAAK,GAAG;AACzB;AAEA,MAAa,oBACX,OACA,WAAW,OACD;CACV,IAAI,UAAU,UAAa,SAAS,GAAG,OAAO;CAC9C,IAAI,QAAQ,UAAU,OAAO,GAAG,SAAQ;CACxC,OAAO,MAAM,SAAQ;AACvB;AAEA,MAAa,mBAAmB,UAC9B,UAAU,UAAa,QAAQ;ACJjC,IAAa,iBAAb,MAAa,uBAAuB,gBAAsB;CACtC,YAAY;CACrB,SAAS,MAAuB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAEtB,UAAU,eAAe,gBAAgB,KAAK,OAAM,CAAE,GAAE,GAAA,YAAA,CAAA,E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AAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAQ,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
package/fesm2022/{magmonium-one-directives-DM6J1Hvs.mjs → magmonium-one-directives-hJ7wkmQn.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { U as IS_DESIGN_MODE, a as resolveSpacing } from "./magmonium-one-size-converter-BqkALIWA.mjs";
|
|
2
|
-
import "./magmonium-one-selector-
|
|
2
|
+
import "./magmonium-one-selector-BK48N5us.mjs";
|
|
3
3
|
import "./magmonium-one-m-ref-DLIAzywu.mjs";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import { Directive, ElementRef, HostListener, InjectionToken, Input, Renderer2, afterRenderEffect, booleanAttribute, computed, effect, inject, input, model, output, signal } from "@angular/core";
|
|
@@ -1282,4 +1282,4 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1282
1282
|
});
|
|
1283
1283
|
export { ToolTipDirective as a, DragListItemDirective as c, MarginDirective as d, PaddingDirective as f, PositionDirective as i, DragListDirective as l, stringToColor as n, FileUploadDirective as o, SPACING_INWARD as p, HighlightDirective as r, AutosizeDirective as s, MHeroColorDirective as t, DraggableDirective as u };
|
|
1284
1284
|
|
|
1285
|
-
//# sourceMappingURL=magmonium-one-directives-
|
|
1285
|
+
//# sourceMappingURL=magmonium-one-directives-hJ7wkmQn.mjs.map
|