@magmonium/one 0.4.30 → 0.4.31
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/assets/docs/en/app-release.md +0 -11
- package/assets/i18n/en.json +2 -0
- package/fesm2022/magmonium-one-attribute-value-CLBOZcme.mjs +255 -0
- package/fesm2022/magmonium-one-attribute-value-CLBOZcme.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-checkbox-D7NYJdU3.mjs +77 -0
- package/fesm2022/magmonium-one-base-checkbox-D7NYJdU3.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-dropdown-CEDsqaPz.mjs +604 -0
- package/fesm2022/magmonium-one-base-dropdown-CEDsqaPz.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-input-BOaD-WIi.mjs +183 -0
- package/fesm2022/magmonium-one-base-input-BOaD-WIi.mjs.map +1 -0
- package/fesm2022/magmonium-one-base-text-D6p6_vsb.mjs +94 -0
- package/fesm2022/magmonium-one-base-text-D6p6_vsb.mjs.map +1 -0
- package/fesm2022/magmonium-one-button-rVNnp6G8.mjs +1281 -0
- package/fesm2022/magmonium-one-button-rVNnp6G8.mjs.map +1 -0
- package/fesm2022/magmonium-one-checkbox-rj4XHxb3.mjs +365 -0
- package/fesm2022/magmonium-one-checkbox-rj4XHxb3.mjs.map +1 -0
- package/fesm2022/magmonium-one-color-utl-CirPzUFk.mjs +449 -0
- package/fesm2022/magmonium-one-color-utl-CirPzUFk.mjs.map +1 -0
- package/fesm2022/magmonium-one-directives-DOBENX_K.mjs +1285 -0
- package/fesm2022/magmonium-one-directives-DOBENX_K.mjs.map +1 -0
- package/fesm2022/magmonium-one-file.service-Bo06pU3_.mjs +65 -0
- package/fesm2022/magmonium-one-file.service-Bo06pU3_.mjs.map +1 -0
- package/fesm2022/magmonium-one-group-Cue4x6tD.mjs +428 -0
- package/fesm2022/magmonium-one-group-Cue4x6tD.mjs.map +1 -0
- package/fesm2022/magmonium-one-header-DPVnaEOV.mjs +380 -0
- package/fesm2022/magmonium-one-header-DPVnaEOV.mjs.map +1 -0
- package/fesm2022/magmonium-one-icon-Dso-9RMN.mjs +833 -0
- package/fesm2022/magmonium-one-icon-Dso-9RMN.mjs.map +1 -0
- package/fesm2022/magmonium-one-image-editor-C7AtzEf6.mjs +438 -0
- package/fesm2022/magmonium-one-image-editor-C7AtzEf6.mjs.map +1 -0
- package/fesm2022/magmonium-one-image-frame-BTSaUSAi.mjs +116 -0
- package/fesm2022/magmonium-one-image-frame-BTSaUSAi.mjs.map +1 -0
- package/fesm2022/magmonium-one-input-DqHPorA1.mjs +39 -0
- package/fesm2022/magmonium-one-input-DqHPorA1.mjs.map +1 -0
- package/fesm2022/magmonium-one-label-B30Q4Vut.mjs +574 -0
- package/fesm2022/magmonium-one-label-B30Q4Vut.mjs.map +1 -0
- package/fesm2022/magmonium-one-m-ref-Dt0DCm8X.mjs +147 -0
- package/fesm2022/magmonium-one-m-ref-Dt0DCm8X.mjs.map +1 -0
- package/fesm2022/magmonium-one-menu-BBOnOK4M.mjs +887 -0
- package/fesm2022/magmonium-one-menu-BBOnOK4M.mjs.map +1 -0
- package/fesm2022/magmonium-one-multi-range-DCOwngql.mjs +458 -0
- package/fesm2022/magmonium-one-multi-range-DCOwngql.mjs.map +1 -0
- package/fesm2022/magmonium-one-options-asset-D8Gg1yNl.mjs +97 -0
- package/fesm2022/magmonium-one-options-asset-D8Gg1yNl.mjs.map +1 -0
- package/fesm2022/magmonium-one-otp-DLF7Pq94.mjs +261 -0
- package/fesm2022/magmonium-one-otp-DLF7Pq94.mjs.map +1 -0
- package/fesm2022/magmonium-one-password-BSOU4RI0.mjs +217 -0
- package/fesm2022/magmonium-one-password-BSOU4RI0.mjs.map +1 -0
- package/fesm2022/magmonium-one-radio-CYnWLXPZ.mjs +111 -0
- package/fesm2022/magmonium-one-radio-CYnWLXPZ.mjs.map +1 -0
- package/fesm2022/magmonium-one-range-CmmZAr57.mjs +216 -0
- package/fesm2022/magmonium-one-range-CmmZAr57.mjs.map +1 -0
- package/fesm2022/magmonium-one-rolldown-runtime-DpJrqANO.mjs +11 -0
- package/fesm2022/magmonium-one-selector-DDnBYNLr.mjs +1065 -0
- package/fesm2022/magmonium-one-selector-DDnBYNLr.mjs.map +1 -0
- package/fesm2022/magmonium-one-size-converter-B-UubQQ0.mjs +1057 -0
- package/fesm2022/magmonium-one-size-converter-B-UubQQ0.mjs.map +1 -0
- package/fesm2022/magmonium-one-text-FXb-RyBh.mjs +406 -0
- package/fesm2022/magmonium-one-text-FXb-RyBh.mjs.map +1 -0
- package/fesm2022/magmonium-one-text-output-D2XQWyL0.mjs +296 -0
- package/fesm2022/magmonium-one-text-output-D2XQWyL0.mjs.map +1 -0
- package/fesm2022/magmonium-one-theme-a7GlFbzE.mjs +1 -0
- package/fesm2022/magmonium-one-toggle-C0eTrtkt.mjs +231 -0
- package/fesm2022/magmonium-one-toggle-C0eTrtkt.mjs.map +1 -0
- package/fesm2022/magmonium-one.mjs +49231 -2
- package/fesm2022/magmonium-one.mjs.map +1 -1
- package/package.json +8 -8
- package/types/magmonium-one.d.ts +13801 -9516
- package/fesm2022/magmonium-one-image-editor-QPOy7XQt.mjs +0 -290
- package/fesm2022/magmonium-one-image-editor-QPOy7XQt.mjs.map +0 -1
- package/fesm2022/magmonium-one-magmonium-one-BTi-rHpF.mjs +0 -41583
- package/fesm2022/magmonium-one-magmonium-one-BTi-rHpF.mjs.map +0 -1
- package/fesm2022/magmonium-one-otp-BcNCgGpz.mjs +0 -201
- package/fesm2022/magmonium-one-otp-BcNCgGpz.mjs.map +0 -1
- package/fesm2022/magmonium-one-password-BDcSzmV_.mjs +0 -105
- package/fesm2022/magmonium-one-password-BDcSzmV_.mjs.map +0 -1
- package/fesm2022/magmonium-one-toggle-bLWTwEHE.mjs +0 -62
- package/fesm2022/magmonium-one-toggle-bLWTwEHE.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"magmonium-one-menu-BBOnOK4M.mjs","names":["catchError"],"sources":["../../../../libs/one/src/lib/shared/ui/menu/ui/menu/menu.ts","../../../../libs/one/src/lib/shared/ui/menu/ui/menu/menu.html","../../../../libs/one/src/lib/shared/ui/menu/ui/context-menu-box/context-menu-box.ts","../../../../libs/one/src/lib/shared/ui/menu/ui/context-menu-box/context-menu-box.html","../../../../libs/one/src/lib/shared/ui/menu/ui/context-menu/context-menu.ts"],"sourcesContent":["import {\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n output,\n signal,\n untracked,\n} from '@angular/core';\nimport { rxResource } from '@angular/core/rxjs-interop';\nimport { of } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\nimport { Assets } from '../../../../enum/assets/assets';\nimport { HttpService } from '../../../../services/http';\nimport { TranslatePipe } from '../../../../pipe/translate';\n\nimport { IconComponent } from '../../../icon';\nimport { MenuItem } from '../../type';\nimport { NAV_STORE_REF } from '../../../../config/tokens';\n\n@Component({\n selector: 'm-menu',\n\n imports: [TranslatePipe, IconComponent],\n templateUrl: './menu.html',\n styleUrl: './menu.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(keydown.arrowdown)': 'moveFocus($event, 1)',\n '(keydown.arrowup)': 'moveFocus($event, -1)',\n },\n})\nexport class MenuComponent {\n readonly #navRef = inject(NAV_STORE_REF, { optional: true });\n\n // --- Inputs ---\n config = input<MenuItem[][] | undefined>();\n file = input<string | undefined>();\n root = input<string | undefined>();\n url = input<string | undefined>();\n extra = input<MenuItem[] | undefined>();\n hide = input<string[] | undefined>();\n hideLink = input<boolean>(false);\n isAdmin = input<boolean>(false);\n /** Focus the first item once rendered — a popover menu opened from a trigger. */\n autoFocus = input<boolean>(false);\n readonly action = output<MenuItem>();\n\n visibilityRule = input<(key: string, data?: unknown) => boolean>();\n disableRule = input<(key: string, data?: unknown) => boolean>();\n extraData = input<unknown>();\n\n // --- Internals ---\n #httpService = inject(HttpService);\n #tree = signal<string[]>([]);\n #treeMap = signal<Record<string, MenuItem>>({});\n #host = inject<ElementRef<HTMLElement>>(ElementRef);\n // Whether the next settled render should focus the first item: `autoFocus`\n // decides the first one, a drill or back decides after (its rows replace\n // the focused one, which would drop focus to the body).\n #focusPending?: boolean;\n\n protected back = signal<MenuItem | undefined>(undefined);\n protected slideDirection = signal<'forward' | 'backward' | 'none'>('none');\n\n #asyncOptions = rxResource({\n params: computed(() => this.back()?.file ?? this.file()),\n stream: ({ params: file }) => {\n if (!file) {\n return of(undefined);\n }\n return this.#httpService\n .asset<MenuItem[][]>(['menus', file], Assets.JSON)\n .pipe(catchError(() => of(undefined)));\n },\n });\n\n protected options = computed<MenuItem[][]>(() => {\n const back = this.back();\n const async = this.#asyncOptions.value();\n const config = this.config();\n const hide = this.hide();\n const extra = this.extra();\n const isAdmin = this.isAdmin();\n const vRule = this.visibilityRule();\n const data = this.extraData();\n\n // Filtering recurses so a parent is judged by what survives under it: a row\n // whose every child was hidden would open an empty box, which reads as a\n // broken menu rather than an unavailable one. A `file` parent is exempt —\n // its options are fetched on drill and there is nothing here to count.\n const filterGroups = (groups: MenuItem[][]): MenuItem[][] =>\n groups\n .map((group) =>\n group.filter((item) => {\n if (!isAdmin && item.adminOnly) return false;\n if (hide?.length && hide.includes(item.id)) return false;\n if (vRule && !vRule(item.visibilityKey ?? item.id, data)) {\n return false;\n }\n if (item.options) return filterGroups(item.options).length > 0;\n return true;\n })\n )\n .filter((group) => group.length > 0);\n\n const source = back\n ? (back.options ?? async ?? [])\n : (async ?? config ?? []);\n\n const result = filterGroups(source);\n\n return extra?.length && !back ? [...result, extra] : result;\n });\n\n protected isLoading = computed(() => this.#asyncOptions.isLoading());\n\n constructor() {\n afterRenderEffect(() => {\n this.options();\n if (this.isLoading()) return;\n const pending = this.#focusPending ?? untracked(this.autoFocus);\n this.#focusPending = false;\n if (pending) {\n this.#host.nativeElement\n .querySelector<HTMLElement>('.menu-item:not(.is-disabled)')\n ?.focus();\n }\n });\n }\n\n // ↑/↓ walk the focusable rows (back row included), wrapping; Enter on a\n // row is its own `selectItem`.\n moveFocus(event: Event, step: 1 | -1): void {\n const rows = Array.from(\n this.#host.nativeElement.querySelectorAll<HTMLElement>(\n '.back-btn, .menu-item:not(.is-disabled)'\n )\n );\n if (!rows.length) return;\n event.preventDefault();\n const current = rows.indexOf(document.activeElement as HTMLElement);\n const next =\n current < 0\n ? step > 0\n ? 0\n : rows.length - 1\n : (current + step + rows.length) % rows.length;\n rows[next].focus();\n }\n\n // --- Handlers ---\n selectItem(item: MenuItem): void {\n const dRule = this.disableRule();\n if (item.disabled || (dRule && dRule(item.disableKey ?? item.id))) {\n return;\n }\n\n if (item.options || item.file) {\n this.slideDirection.set('forward');\n this.#treeMap.update((map) => ({ ...map, [item.id]: item }));\n this.#tree.update((t) => [...t, item.id]);\n this.back.set(item);\n this.#focusPending = this.#hasFocus();\n return;\n }\n\n // A row naming a Nav goes there itself — the NavKind on that node decides\n // whether it routes or opens a panel, the answer `[mRef]` gives (CONTEXT.md\n // NavRef). Still emitted, so whatever holds the menu closes it.\n if (item.nav)\n this.#navRef?.setSelected(\n item.nav,\n undefined,\n item.keepPanel ? { keepPanel: true } : undefined\n );\n this.action.emit(item);\n }\n\n goBack(): void {\n this.slideDirection.set('backward');\n this.#focusPending = this.#hasFocus();\n const currentTree = this.#tree();\n if (currentTree.length <= 1) {\n this.#tree.set([]);\n this.back.set(undefined);\n return;\n }\n\n const newTree = currentTree.slice(0, -1);\n this.#tree.set(newTree);\n const parentId = newTree[newTree.length - 1];\n this.back.set(this.#treeMap()[parentId]);\n }\n\n #hasFocus(): boolean {\n return this.#host.nativeElement.contains(document.activeElement);\n }\n\n isSelected(item: MenuItem): boolean {\n // A NavRef knows what it points at, so selection is an id comparison —\n // no path normalising, and it works for panels as well as pages.\n if (item.nav) {\n return this.#navRef?.id() === item.nav;\n }\n\n const currentUrl = this.url();\n const rootPath = this.root();\n if (!currentUrl || !item.link) {\n return item.selected ?? false;\n }\n const fullLink = rootPath ? `${rootPath}/${item.link}` : item.link;\n return currentUrl === fullLink || currentUrl.startsWith(fullLink + '/');\n }\n\n isItemDisabled(item: MenuItem): boolean {\n const dRule = this.disableRule();\n return !!(\n item.disabled ||\n (dRule && dRule(item.disableKey ?? item.id, this.extraData()))\n );\n }\n}\n","<div class=\"menu-container\" [attr.data-slide]=\"slideDirection()\">\n @if (back()) {\n <div\n class=\"back-btn\"\n tabindex=\"0\"\n role=\"button\"\n (click)=\"goBack()\"\n (keydown.enter)=\"goBack()\"\n (keydown.space)=\"goBack()\"\n >\n <div class=\"back-icon\">\n <m-icon [name]=\"'chevron-left'\" color=\"currentColor\" />\n </div>\n <span class=\"back-text\">{{ back()!.label | translate }}</span>\n </div>\n }\n\n <div class=\"menu-content\">\n @if (isLoading()) {\n <div class=\"menu-loading\">\n <div class=\"spinner\"></div>\n </div>\n } @else {\n <div class=\"menu-groups\">\n @for (group of options(); track $index; let last = $last) {\n <div class=\"menu-group\" [class.has-separator]=\"!last\">\n @for (item of group; track item.id) {\n @if (!item.hidden) {\n <div\n class=\"menu-item\"\n [attr.data-testid]=\"item.id + '-btn'\"\n [class.is-selected]=\"isSelected(item)\"\n [class.is-disabled]=\"isItemDisabled(item)\"\n [attr.aria-disabled]=\"isItemDisabled(item) || null\"\n tabindex=\"0\"\n role=\"button\"\n (click)=\"selectItem(item)\"\n (keydown.enter)=\"selectItem(item)\"\n (keydown.space)=\"selectItem(item)\"\n >\n @if (item.icon) {\n <div class=\"item-icon\">\n <m-icon [name]=\"item.icon\" color=\"currentColor\" />\n </div>\n }\n <span class=\"item-text\">{{ item.label | translate }}</span>\n @if (item.options || item.file) {\n <div class=\"item-arrow\">\n <m-icon [name]=\"'chevron-right'\" color=\"currentColor\" />\n </div>\n }\n </div>\n }\n }\n </div>\n }\n </div>\n }\n </div>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n input,\n output,\n} from '@angular/core';\nimport { MenuComponent } from '../menu/menu';\nimport { MenuItem } from '../../type';\n\n@Component({\n selector: 'm-context-menu-box',\n imports: [MenuComponent],\n templateUrl: './context-menu-box.html',\n styleUrl: './context-menu-box.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ContextMenuBoxComponent {\n readonly options = input<MenuItem[][]>([]);\n readonly hide = input<string[] | undefined>();\n readonly file = input<string | undefined>();\n readonly width = input<string>('250px');\n readonly height = input<string>('auto');\n readonly isAdmin = input<boolean>(false);\n readonly action = output<MenuItem>();\n\n readonly visibilityRule = input<(key: string, data?: unknown) => boolean>();\n readonly disableRule = input<(key: string, data?: unknown) => boolean>();\n readonly extraData = input<unknown>();\n\n protected readonly emitAction = (item: MenuItem): void => {\n this.action.emit(item);\n };\n}\n","<div class=\"m-context-menu-box\" [style.width]=\"width()\" [style.max-height]=\"height()\">\n <m-menu\n [config]=\"options()\"\n [hide]=\"hide()\"\n [file]=\"file()\"\n [isAdmin]=\"isAdmin()\"\n [autoFocus]=\"true\"\n [visibilityRule]=\"visibilityRule()\"\n [disableRule]=\"disableRule()\"\n [extraData]=\"extraData()\"\n (action)=\"emitAction($event)\"\n />\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n inputBinding,\n model,\n output,\n outputBinding,\n viewChild,\n} from '@angular/core';\nimport { ConfigComponent } from '../../../../lib/components/config-component';\nimport { SelectorDirective } from '../../../../directives/selector/selector';\nimport type { SelectorConfig } from '../../../../directives/selector/selector-type';\nimport { Icon } from '../../../icon';\nimport { ButtonComponent } from '../../../button/ui/button';\nimport { ContextMenu, MenuItem } from '../../type';\nimport { ContextMenuBoxComponent } from '../context-menu-box/context-menu-box';\n\n@Component({\n selector: 'm-context-menu, m-one-context-menu',\n imports: [ButtonComponent, SelectorDirective],\n template: `\n <m-one-button\n [config]=\"triggerButtonConfig()\"\n [mSelector]=\"selectorConfig()\"\n (opened)=\"toggle.set(true)\"\n (closed)=\"toggle.set(false)\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ContextMenuComponent extends ConfigComponent<ContextMenu> {\n toggle = model<boolean>();\n override remote = input<string | undefined>();\n exclude = input<string[]>();\n readonly visibilityRule = input<(key: string, data?: unknown) => boolean>();\n readonly disableRule = input<(key: string, data?: unknown) => boolean>();\n readonly extraData = input<unknown>();\n readonly inverted = input<boolean | undefined>();\n // A bound list rides the tag, not the config bag: a YAML file cannot hold\n // rows a store computes. `MenuItem[]` is accepted because root groups are an\n // authoring shape — data is one flat group — and normalized on read.\n readonly options = input<MenuItem[] | MenuItem[][] | undefined>();\n readonly action = output<MenuItem>();\n protected override readonly subFolder = 'menu';\n private readonly selectorDir = viewChild(SelectorDirective);\n protected readonly contextMenuConfig = computed(\n () => (this.config() ?? {}) as ContextMenu\n );\n private readonly iconConfig = computed<Partial<Icon>>(() => {\n const toggle = this.toggle();\n const { closeIcon, icon } = this.contextMenuConfig();\n if (toggle) {\n return { name: 'x', ...closeIcon };\n }\n return { name: 'ellipsis-vertical', ...icon };\n });\n protected readonly triggerButtonConfig = computed(() => ({\n variant: 'ghost' as const,\n iconOnly: true as const,\n icon: this.iconConfig().name,\n label: 'actions',\n inverted: this.inverted() ?? this.contextMenuConfig().inverted,\n }));\n // `exclude` is not applied here: a menu nests, and a filter run once over the\n // root groups cannot reach an item a layer down, nor one a `file` parent has\n // not fetched yet. It is handed to the menu as `hide` instead, which the menu\n // re-applies at whatever depth is on screen.\n private readonly contextMenuOptions = computed<MenuItem[][]>(() => {\n const supplied = this.options();\n if (supplied) {\n // The input overrides the config bag the way `inverted` already does.\n return Array.isArray(supplied[0])\n ? (supplied as MenuItem[][])\n : [supplied as MenuItem[]];\n }\n return this.contextMenuConfig().options ?? [];\n });\n protected readonly selectorConfig = computed<\n SelectorConfig<ContextMenuBoxComponent> | undefined\n >(() => {\n // The overlay-bearing primitives' DesignMode rule (ADR 0003): a Canvas\n // owns the click — the ControlLayer selects, never the menu — so the\n // directive is handed nothing to open. An undefined config is the whole\n // suppression, the directive having no `base` to open on.\n if (this.isDesignMode) return undefined;\n return {\n component: ContextMenuBoxComponent,\n base: 'm-context-menu',\n width: this.contextMenuConfig().width ?? '250px',\n height: this.contextMenuConfig().height ?? 'auto',\n align: this.contextMenuConfig().align,\n toggle: true,\n bindings: [\n inputBinding('options', this.contextMenuOptions),\n inputBinding('hide', this.exclude),\n inputBinding('visibilityRule', this.visibilityRule),\n inputBinding('disableRule', this.disableRule),\n inputBinding('extraData', this.extraData),\n outputBinding('action', (event: MenuItem) => {\n this.action.emit(event);\n this.selectorDir()?.close();\n }),\n ],\n };\n });\n}\n"],"mappings":";;;;;;;;;;AAmCA,IAAa,gBAAb,MAAa,cAAa;CACf,UAAU,OAAO,eAAe,EAAE,UAAU,KAAI,CAAE;CAG3D,SAAS,MAAiC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAC1C,OAAO,MAA2B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAClC,OAAO,MAA2B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAClC,MAAM,MAA2B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,MAAA,CAAA,+BAAA,CAAA,CAAA;CACjC,QAAQ,MAA+B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,OAAO,MAA6B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACpC,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,UAAU,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAE/B,YAAY,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACxB,SAAS,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AA;GAAA,MAAA,CAAA,QAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,iBAAiB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { t as __exportAll } from "./magmonium-one-rolldown-runtime-DpJrqANO.mjs";
|
|
2
|
+
import { t as LabelComponent } from "./magmonium-one-label-B30Q4Vut.mjs";
|
|
3
|
+
import { p as DraggableDirective } from "./magmonium-one-directives-DOBENX_K.mjs";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { ChangeDetectionStrategy, Component, ElementRef, HostListener, computed, effect, inject, input, linkedSignal, model, signal, viewChild } from "@angular/core";
|
|
6
|
+
var BaseArrayInputComponent = class BaseArrayInputComponent {
|
|
7
|
+
value = model([], ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
8
|
+
focused = input(false, ...ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []);
|
|
9
|
+
errors = input([], ...ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []);
|
|
10
|
+
config = input(...ngDevMode ? [void 0, { debugName: "config" }] : /* istanbul ignore next */ []);
|
|
11
|
+
required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
12
|
+
disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
13
|
+
invalid = input(false, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
14
|
+
touched = model(false, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
|
|
15
|
+
elementRef = inject(ElementRef);
|
|
16
|
+
showErrors = computed(() => this.touched() && this.invalid(), ...ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []);
|
|
17
|
+
setValue = (value) => {
|
|
18
|
+
this.value.set(value);
|
|
19
|
+
this.touched.set(true);
|
|
20
|
+
};
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
22
|
+
minVersion: "12.0.0",
|
|
23
|
+
version: "22.2.1",
|
|
24
|
+
ngImport: i0,
|
|
25
|
+
type: BaseArrayInputComponent,
|
|
26
|
+
deps: [],
|
|
27
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
28
|
+
});
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
30
|
+
minVersion: "17.1.0",
|
|
31
|
+
version: "22.2.1",
|
|
32
|
+
type: BaseArrayInputComponent,
|
|
33
|
+
isStandalone: true,
|
|
34
|
+
selector: "m-base-array-input",
|
|
35
|
+
inputs: {
|
|
36
|
+
value: {
|
|
37
|
+
classPropertyName: "value",
|
|
38
|
+
publicName: "value",
|
|
39
|
+
isSignal: true,
|
|
40
|
+
isRequired: false,
|
|
41
|
+
transformFunction: null
|
|
42
|
+
},
|
|
43
|
+
focused: {
|
|
44
|
+
classPropertyName: "focused",
|
|
45
|
+
publicName: "focused",
|
|
46
|
+
isSignal: true,
|
|
47
|
+
isRequired: false,
|
|
48
|
+
transformFunction: null
|
|
49
|
+
},
|
|
50
|
+
errors: {
|
|
51
|
+
classPropertyName: "errors",
|
|
52
|
+
publicName: "errors",
|
|
53
|
+
isSignal: true,
|
|
54
|
+
isRequired: false,
|
|
55
|
+
transformFunction: null
|
|
56
|
+
},
|
|
57
|
+
config: {
|
|
58
|
+
classPropertyName: "config",
|
|
59
|
+
publicName: "config",
|
|
60
|
+
isSignal: true,
|
|
61
|
+
isRequired: false,
|
|
62
|
+
transformFunction: null
|
|
63
|
+
},
|
|
64
|
+
required: {
|
|
65
|
+
classPropertyName: "required",
|
|
66
|
+
publicName: "required",
|
|
67
|
+
isSignal: true,
|
|
68
|
+
isRequired: false,
|
|
69
|
+
transformFunction: null
|
|
70
|
+
},
|
|
71
|
+
disabled: {
|
|
72
|
+
classPropertyName: "disabled",
|
|
73
|
+
publicName: "disabled",
|
|
74
|
+
isSignal: true,
|
|
75
|
+
isRequired: false,
|
|
76
|
+
transformFunction: null
|
|
77
|
+
},
|
|
78
|
+
invalid: {
|
|
79
|
+
classPropertyName: "invalid",
|
|
80
|
+
publicName: "invalid",
|
|
81
|
+
isSignal: true,
|
|
82
|
+
isRequired: false,
|
|
83
|
+
transformFunction: null
|
|
84
|
+
},
|
|
85
|
+
touched: {
|
|
86
|
+
classPropertyName: "touched",
|
|
87
|
+
publicName: "touched",
|
|
88
|
+
isSignal: true,
|
|
89
|
+
isRequired: false,
|
|
90
|
+
transformFunction: null
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
outputs: {
|
|
94
|
+
value: "valueChange",
|
|
95
|
+
touched: "touchedChange"
|
|
96
|
+
},
|
|
97
|
+
ngImport: i0,
|
|
98
|
+
template: ``,
|
|
99
|
+
isInline: true,
|
|
100
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
104
|
+
minVersion: "12.0.0",
|
|
105
|
+
version: "22.2.1",
|
|
106
|
+
ngImport: i0,
|
|
107
|
+
type: BaseArrayInputComponent,
|
|
108
|
+
decorators: [{
|
|
109
|
+
type: Component,
|
|
110
|
+
args: [{
|
|
111
|
+
selector: "m-base-array-input",
|
|
112
|
+
template: ``,
|
|
113
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
114
|
+
}]
|
|
115
|
+
}],
|
|
116
|
+
propDecorators: {
|
|
117
|
+
value: [{
|
|
118
|
+
type: i0.Input,
|
|
119
|
+
args: [{
|
|
120
|
+
isSignal: true,
|
|
121
|
+
alias: "value",
|
|
122
|
+
required: false
|
|
123
|
+
}]
|
|
124
|
+
}, {
|
|
125
|
+
type: i0.Output,
|
|
126
|
+
args: ["valueChange"]
|
|
127
|
+
}],
|
|
128
|
+
focused: [{
|
|
129
|
+
type: i0.Input,
|
|
130
|
+
args: [{
|
|
131
|
+
isSignal: true,
|
|
132
|
+
alias: "focused",
|
|
133
|
+
required: false
|
|
134
|
+
}]
|
|
135
|
+
}],
|
|
136
|
+
errors: [{
|
|
137
|
+
type: i0.Input,
|
|
138
|
+
args: [{
|
|
139
|
+
isSignal: true,
|
|
140
|
+
alias: "errors",
|
|
141
|
+
required: false
|
|
142
|
+
}]
|
|
143
|
+
}],
|
|
144
|
+
config: [{
|
|
145
|
+
type: i0.Input,
|
|
146
|
+
args: [{
|
|
147
|
+
isSignal: true,
|
|
148
|
+
alias: "config",
|
|
149
|
+
required: false
|
|
150
|
+
}]
|
|
151
|
+
}],
|
|
152
|
+
required: [{
|
|
153
|
+
type: i0.Input,
|
|
154
|
+
args: [{
|
|
155
|
+
isSignal: true,
|
|
156
|
+
alias: "required",
|
|
157
|
+
required: false
|
|
158
|
+
}]
|
|
159
|
+
}],
|
|
160
|
+
disabled: [{
|
|
161
|
+
type: i0.Input,
|
|
162
|
+
args: [{
|
|
163
|
+
isSignal: true,
|
|
164
|
+
alias: "disabled",
|
|
165
|
+
required: false
|
|
166
|
+
}]
|
|
167
|
+
}],
|
|
168
|
+
invalid: [{
|
|
169
|
+
type: i0.Input,
|
|
170
|
+
args: [{
|
|
171
|
+
isSignal: true,
|
|
172
|
+
alias: "invalid",
|
|
173
|
+
required: false
|
|
174
|
+
}]
|
|
175
|
+
}],
|
|
176
|
+
touched: [{
|
|
177
|
+
type: i0.Input,
|
|
178
|
+
args: [{
|
|
179
|
+
isSignal: true,
|
|
180
|
+
alias: "touched",
|
|
181
|
+
required: false
|
|
182
|
+
}]
|
|
183
|
+
}, {
|
|
184
|
+
type: i0.Output,
|
|
185
|
+
args: ["touchedChange"]
|
|
186
|
+
}]
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
var multi_range_exports = /* @__PURE__ */ __exportAll({ MultiRangeInputComponent: () => MultiRangeInputComponent });
|
|
190
|
+
var MultiRangeInputComponent = class MultiRangeInputComponent extends BaseArrayInputComponent {
|
|
191
|
+
_track = viewChild("track", ...ngDevMode ? [{ debugName: "_track" }] : /* istanbul ignore next */ []);
|
|
192
|
+
_trackWidth = signal(0, ...ngDevMode ? [{ debugName: "_trackWidth" }] : /* istanbul ignore next */ []);
|
|
193
|
+
_TRACK_HALF_H = 3;
|
|
194
|
+
_measure = effect((onCleanup) => {
|
|
195
|
+
const track = this._track();
|
|
196
|
+
if (!track) return;
|
|
197
|
+
const el = track.nativeElement;
|
|
198
|
+
this._trackWidth.set(el.getBoundingClientRect().width);
|
|
199
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
200
|
+
const observer = new ResizeObserver(([entry]) => this._trackWidth.set(entry.contentRect.width));
|
|
201
|
+
observer.observe(el);
|
|
202
|
+
onCleanup(() => observer.disconnect());
|
|
203
|
+
}, ...ngDevMode ? [{ debugName: "_measure" }] : /* istanbul ignore next */ []);
|
|
204
|
+
minThumb = linkedSignal({
|
|
205
|
+
...ngDevMode ? { debugName: "minThumb" } : /* istanbul ignore next */ {},
|
|
206
|
+
source: () => ({
|
|
207
|
+
val: this.value()[0],
|
|
208
|
+
tw: this._trackWidth(),
|
|
209
|
+
cfg: this.config()
|
|
210
|
+
}),
|
|
211
|
+
computation: ({ val, tw, cfg }) => {
|
|
212
|
+
const c = cfg;
|
|
213
|
+
const min = c?.min ?? 0;
|
|
214
|
+
const max = c?.max ?? 100;
|
|
215
|
+
return {
|
|
216
|
+
direction: "x",
|
|
217
|
+
position: {
|
|
218
|
+
x: tw > 0 ? tw * ((val ?? min) - min) / (max - min) : 0,
|
|
219
|
+
y: this._TRACK_HALF_H
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
maxThumb = linkedSignal({
|
|
225
|
+
...ngDevMode ? { debugName: "maxThumb" } : /* istanbul ignore next */ {},
|
|
226
|
+
source: () => ({
|
|
227
|
+
val: this.value()[1],
|
|
228
|
+
tw: this._trackWidth(),
|
|
229
|
+
cfg: this.config()
|
|
230
|
+
}),
|
|
231
|
+
computation: ({ val, tw, cfg }) => {
|
|
232
|
+
const c = cfg;
|
|
233
|
+
const min = c?.min ?? 0;
|
|
234
|
+
const max = c?.max ?? 100;
|
|
235
|
+
return {
|
|
236
|
+
direction: "x",
|
|
237
|
+
position: {
|
|
238
|
+
x: tw > 0 ? tw * ((val ?? max) - min) / (max - min) : tw,
|
|
239
|
+
y: this._TRACK_HALF_H
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
fillWidth = computed(() => Math.max(0, (this.maxThumb().position.x ?? 0) - (this.minThumb().position.x ?? 0)), ...ngDevMode ? [{ debugName: "fillWidth" }] : /* istanbul ignore next */ []);
|
|
245
|
+
_displayMin = computed(() => {
|
|
246
|
+
const c = this.config();
|
|
247
|
+
const min = c?.min ?? 0;
|
|
248
|
+
const max = c?.max ?? 100;
|
|
249
|
+
const tw = this._trackWidth();
|
|
250
|
+
if (tw === 0) return this.value()[0] ?? min;
|
|
251
|
+
return Math.round(min + (max - min) * (this.minThumb().position.x ?? 0) / tw);
|
|
252
|
+
}, ...ngDevMode ? [{ debugName: "_displayMin" }] : /* istanbul ignore next */ []);
|
|
253
|
+
_displayMax = computed(() => {
|
|
254
|
+
const c = this.config();
|
|
255
|
+
const min = c?.min ?? 0;
|
|
256
|
+
const max = c?.max ?? 100;
|
|
257
|
+
const tw = this._trackWidth();
|
|
258
|
+
if (tw === 0) return this.value()[1] ?? max;
|
|
259
|
+
return Math.round(min + (max - min) * (this.maxThumb().position.x ?? 0) / tw);
|
|
260
|
+
}, ...ngDevMode ? [{ debugName: "_displayMax" }] : /* istanbul ignore next */ []);
|
|
261
|
+
constructor() {
|
|
262
|
+
super();
|
|
263
|
+
effect(() => {
|
|
264
|
+
const pos = this.minThumb().position;
|
|
265
|
+
const c = this.config();
|
|
266
|
+
const min = c?.min ?? 0;
|
|
267
|
+
const max = c?.max ?? 100;
|
|
268
|
+
const tw = this._trackWidth();
|
|
269
|
+
if (tw === 0) return;
|
|
270
|
+
const expectedX = tw * ((this.value()[0] ?? min) - min) / (max - min);
|
|
271
|
+
if (pos.x !== expectedX) {
|
|
272
|
+
const newMin = Math.round(min + (max - min) * (pos.x ?? 0) / tw);
|
|
273
|
+
const currentMax = this.value()[1] ?? max;
|
|
274
|
+
this.setValue([newMin, currentMax]);
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
effect(() => {
|
|
278
|
+
const pos = this.maxThumb().position;
|
|
279
|
+
const c = this.config();
|
|
280
|
+
const min = c?.min ?? 0;
|
|
281
|
+
const max = c?.max ?? 100;
|
|
282
|
+
const tw = this._trackWidth();
|
|
283
|
+
if (tw === 0) return;
|
|
284
|
+
const currentVal = this.value()[1] ?? max;
|
|
285
|
+
const expectedX = tw > 0 ? tw * (currentVal - min) / (max - min) : tw;
|
|
286
|
+
if (pos.x !== expectedX) {
|
|
287
|
+
const newMax = Math.round(min + (max - min) * (pos.x ?? 0) / tw);
|
|
288
|
+
const currentMin = this.value()[0] ?? min;
|
|
289
|
+
this.setValue([currentMin, newMax]);
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
_onResize() {
|
|
294
|
+
const track = this._track();
|
|
295
|
+
if (track) this._trackWidth.set(track.nativeElement.getBoundingClientRect().width);
|
|
296
|
+
}
|
|
297
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
298
|
+
minVersion: "12.0.0",
|
|
299
|
+
version: "22.2.1",
|
|
300
|
+
ngImport: i0,
|
|
301
|
+
type: MultiRangeInputComponent,
|
|
302
|
+
deps: [],
|
|
303
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
304
|
+
});
|
|
305
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
306
|
+
minVersion: "17.0.0",
|
|
307
|
+
version: "22.2.1",
|
|
308
|
+
type: MultiRangeInputComponent,
|
|
309
|
+
isStandalone: true,
|
|
310
|
+
selector: "m-multi-range",
|
|
311
|
+
host: { listeners: { "window:resize": "_onResize()" } },
|
|
312
|
+
viewQueries: [{
|
|
313
|
+
propertyName: "_track",
|
|
314
|
+
first: true,
|
|
315
|
+
predicate: ["track"],
|
|
316
|
+
descendants: true,
|
|
317
|
+
isSignal: true
|
|
318
|
+
}],
|
|
319
|
+
usesInheritance: true,
|
|
320
|
+
ngImport: i0,
|
|
321
|
+
template: `
|
|
322
|
+
@if (config(); as range) {
|
|
323
|
+
<div class="m-range m-range--multi">
|
|
324
|
+
<m-label
|
|
325
|
+
class="m-range__label"
|
|
326
|
+
[placeholder]="range.label"
|
|
327
|
+
[params]="range.params"
|
|
328
|
+
[required]="required()"
|
|
329
|
+
[disabled]="disabled()"
|
|
330
|
+
/>
|
|
331
|
+
<div class="m-range__control">
|
|
332
|
+
<div class="m-range__track" #track>
|
|
333
|
+
<div
|
|
334
|
+
class="m-range__fill"
|
|
335
|
+
[style.left.px]="minThumb().position.x"
|
|
336
|
+
[style.width.px]="fillWidth()"
|
|
337
|
+
></div>
|
|
338
|
+
<div
|
|
339
|
+
class="m-range__thumb"
|
|
340
|
+
[(mDraggable)]="minThumb"
|
|
341
|
+
[min]="{ x: 0, y: _TRACK_HALF_H }"
|
|
342
|
+
[max]="{ x: maxThumb().position.x, y: _TRACK_HALF_H }"
|
|
343
|
+
></div>
|
|
344
|
+
<div
|
|
345
|
+
class="m-range__thumb"
|
|
346
|
+
[(mDraggable)]="maxThumb"
|
|
347
|
+
[min]="{ x: minThumb().position.x, y: _TRACK_HALF_H }"
|
|
348
|
+
[max]="{ x: _trackWidth(), y: _TRACK_HALF_H }"
|
|
349
|
+
></div>
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
<span class="m-range__value"
|
|
353
|
+
>{{ _displayMin() }}–{{ _displayMax() }}</span
|
|
354
|
+
>
|
|
355
|
+
</div>
|
|
356
|
+
}
|
|
357
|
+
`,
|
|
358
|
+
isInline: true,
|
|
359
|
+
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;width:100%}:host-context(.m-dynamic-input),:host-context(.section-form-item__input){display:contents}:host-context(.m-dynamic-input) .m-range,:host-context(.section-form-item__input) .m-range{width:100%}.m-range{display:flex;flex-direction:column;gap:0;-webkit-user-select:none;user-select:none}.m-range .m-range__label{--m-label-margin: 0;--m-label-font-size: calc(var(--input-size, 1em) * .8);--m-label-color: var(--m-text-secondary)}.m-range__control{display:flex;align-items:center;height:calc(var(--input-size, 1em) * 2.75);min-height:calc(var(--input-size, 1em) * 2.75);padding-inline:calc(calc(var(--input-size, 1em) * .95) / 2);cursor:pointer;gap:0}.m-range__control:has(.m-range__value:not(.hidden)){gap:calc(var(--input-size, 1em) * .5)}.m-range__control:hover .m-range__track{height:6px}.m-range__track{flex:1;position:relative;height:2px;background-color:var(--m-text-input-border, color-mix(in srgb, var(--m-text) 18%, var(--m-background)));border-radius:3px;overflow:visible;transition:height .15s ease}.m-range__fill{position:absolute;top:0;left:0;height:100%;background-color:var(--m-input-color, var(--m-mm));border-radius:inherit;pointer-events:none}.m-range__thumb{position:absolute;width:calc(var(--input-size, 1em) * .95);height:calc(var(--input-size, 1em) * .95);border-radius:50%;background-color:var(--m-input-color, var(--m-mm));border:2px solid var(--m-text-input-background, var(--m-background));box-shadow:0 0 0 1.5px var(--m-input-color, var(--m-mm)),0 1px 3px #00000026;top:50%;transform:translateY(-50%) translate(-50%);transition:box-shadow .15s ease;cursor:grab;z-index:1}.m-range__thumb:hover{box-shadow:0 0 0 1.5px var(--m-input-color, var(--m-mm)),0 0 0 calc(var(--input-size, 1em) * .45) color-mix(in srgb,var(--m-mm) 14%,transparent),0 1px 3px #00000026}.m-range__thumb.dragging{cursor:grabbing;box-shadow:0 0 0 1.5px var(--m-input-color, var(--m-mm)),var(--m-text-input-focus-shadow, 0 0 0 calc(var(--input-size, 1em) * .55) color-mix(in srgb, var(--m-mm) 25%, transparent));z-index:2}.m-range__value{font-size:calc(var(--input-size, 1em) * .8);font-weight:600;color:var(--m-input-color, var(--m-mm));font-variant-numeric:tabular-nums;flex-shrink:0;min-width:0}.m-range__value.hidden{display:none}.m-range--multi .m-range__control{height:calc(var(--input-size, 1em) * 2.75);min-height:calc(var(--input-size, 1em) * 2.75)}.m-range--multi .m-range__value{align-self:flex-end;font-size:calc(var(--input-size, 1em) * .75)}\n"],
|
|
360
|
+
dependencies: [{
|
|
361
|
+
kind: "directive",
|
|
362
|
+
type: DraggableDirective,
|
|
363
|
+
selector: "[mDraggable]",
|
|
364
|
+
inputs: [
|
|
365
|
+
"mDraggable",
|
|
366
|
+
"handleSelector",
|
|
367
|
+
"min",
|
|
368
|
+
"max",
|
|
369
|
+
"pos"
|
|
370
|
+
],
|
|
371
|
+
outputs: [
|
|
372
|
+
"mDraggableChange",
|
|
373
|
+
"dragStart",
|
|
374
|
+
"dragEnd"
|
|
375
|
+
]
|
|
376
|
+
}, {
|
|
377
|
+
kind: "component",
|
|
378
|
+
type: LabelComponent,
|
|
379
|
+
selector: "m-label",
|
|
380
|
+
inputs: [
|
|
381
|
+
"for",
|
|
382
|
+
"placeholder",
|
|
383
|
+
"params",
|
|
384
|
+
"required",
|
|
385
|
+
"disabled",
|
|
386
|
+
"color",
|
|
387
|
+
"noTranslate"
|
|
388
|
+
]
|
|
389
|
+
}],
|
|
390
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
394
|
+
minVersion: "12.0.0",
|
|
395
|
+
version: "22.2.1",
|
|
396
|
+
ngImport: i0,
|
|
397
|
+
type: MultiRangeInputComponent,
|
|
398
|
+
decorators: [{
|
|
399
|
+
type: Component,
|
|
400
|
+
args: [{
|
|
401
|
+
selector: "m-multi-range",
|
|
402
|
+
imports: [DraggableDirective, LabelComponent],
|
|
403
|
+
template: `
|
|
404
|
+
@if (config(); as range) {
|
|
405
|
+
<div class="m-range m-range--multi">
|
|
406
|
+
<m-label
|
|
407
|
+
class="m-range__label"
|
|
408
|
+
[placeholder]="range.label"
|
|
409
|
+
[params]="range.params"
|
|
410
|
+
[required]="required()"
|
|
411
|
+
[disabled]="disabled()"
|
|
412
|
+
/>
|
|
413
|
+
<div class="m-range__control">
|
|
414
|
+
<div class="m-range__track" #track>
|
|
415
|
+
<div
|
|
416
|
+
class="m-range__fill"
|
|
417
|
+
[style.left.px]="minThumb().position.x"
|
|
418
|
+
[style.width.px]="fillWidth()"
|
|
419
|
+
></div>
|
|
420
|
+
<div
|
|
421
|
+
class="m-range__thumb"
|
|
422
|
+
[(mDraggable)]="minThumb"
|
|
423
|
+
[min]="{ x: 0, y: _TRACK_HALF_H }"
|
|
424
|
+
[max]="{ x: maxThumb().position.x, y: _TRACK_HALF_H }"
|
|
425
|
+
></div>
|
|
426
|
+
<div
|
|
427
|
+
class="m-range__thumb"
|
|
428
|
+
[(mDraggable)]="maxThumb"
|
|
429
|
+
[min]="{ x: minThumb().position.x, y: _TRACK_HALF_H }"
|
|
430
|
+
[max]="{ x: _trackWidth(), y: _TRACK_HALF_H }"
|
|
431
|
+
></div>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
<span class="m-range__value"
|
|
435
|
+
>{{ _displayMin() }}–{{ _displayMax() }}</span
|
|
436
|
+
>
|
|
437
|
+
</div>
|
|
438
|
+
}
|
|
439
|
+
`,
|
|
440
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
441
|
+
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;width:100%}:host-context(.m-dynamic-input),:host-context(.section-form-item__input){display:contents}:host-context(.m-dynamic-input) .m-range,:host-context(.section-form-item__input) .m-range{width:100%}.m-range{display:flex;flex-direction:column;gap:0;-webkit-user-select:none;user-select:none}.m-range .m-range__label{--m-label-margin: 0;--m-label-font-size: calc(var(--input-size, 1em) * .8);--m-label-color: var(--m-text-secondary)}.m-range__control{display:flex;align-items:center;height:calc(var(--input-size, 1em) * 2.75);min-height:calc(var(--input-size, 1em) * 2.75);padding-inline:calc(calc(var(--input-size, 1em) * .95) / 2);cursor:pointer;gap:0}.m-range__control:has(.m-range__value:not(.hidden)){gap:calc(var(--input-size, 1em) * .5)}.m-range__control:hover .m-range__track{height:6px}.m-range__track{flex:1;position:relative;height:2px;background-color:var(--m-text-input-border, color-mix(in srgb, var(--m-text) 18%, var(--m-background)));border-radius:3px;overflow:visible;transition:height .15s ease}.m-range__fill{position:absolute;top:0;left:0;height:100%;background-color:var(--m-input-color, var(--m-mm));border-radius:inherit;pointer-events:none}.m-range__thumb{position:absolute;width:calc(var(--input-size, 1em) * .95);height:calc(var(--input-size, 1em) * .95);border-radius:50%;background-color:var(--m-input-color, var(--m-mm));border:2px solid var(--m-text-input-background, var(--m-background));box-shadow:0 0 0 1.5px var(--m-input-color, var(--m-mm)),0 1px 3px #00000026;top:50%;transform:translateY(-50%) translate(-50%);transition:box-shadow .15s ease;cursor:grab;z-index:1}.m-range__thumb:hover{box-shadow:0 0 0 1.5px var(--m-input-color, var(--m-mm)),0 0 0 calc(var(--input-size, 1em) * .45) color-mix(in srgb,var(--m-mm) 14%,transparent),0 1px 3px #00000026}.m-range__thumb.dragging{cursor:grabbing;box-shadow:0 0 0 1.5px var(--m-input-color, var(--m-mm)),var(--m-text-input-focus-shadow, 0 0 0 calc(var(--input-size, 1em) * .55) color-mix(in srgb, var(--m-mm) 25%, transparent));z-index:2}.m-range__value{font-size:calc(var(--input-size, 1em) * .8);font-weight:600;color:var(--m-input-color, var(--m-mm));font-variant-numeric:tabular-nums;flex-shrink:0;min-width:0}.m-range__value.hidden{display:none}.m-range--multi .m-range__control{height:calc(var(--input-size, 1em) * 2.75);min-height:calc(var(--input-size, 1em) * 2.75)}.m-range--multi .m-range__value{align-self:flex-end;font-size:calc(var(--input-size, 1em) * .75)}\n"]
|
|
442
|
+
}]
|
|
443
|
+
}],
|
|
444
|
+
ctorParameters: () => [],
|
|
445
|
+
propDecorators: {
|
|
446
|
+
_track: [{
|
|
447
|
+
type: i0.ViewChild,
|
|
448
|
+
args: ["track", { isSignal: true }]
|
|
449
|
+
}],
|
|
450
|
+
_onResize: [{
|
|
451
|
+
type: HostListener,
|
|
452
|
+
args: ["window:resize"]
|
|
453
|
+
}]
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
export { multi_range_exports as n, BaseArrayInputComponent as r, MultiRangeInputComponent as t };
|
|
457
|
+
|
|
458
|
+
//# sourceMappingURL=magmonium-one-multi-range-DCOwngql.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"magmonium-one-multi-range-DCOwngql.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/input/ui/text/base-array.ts","../../../../libs/one/src/lib/shared/ui/input/ui/range/multi-range.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n model,\n ElementRef,\n inject,\n} from '@angular/core';\nimport {\n FormValueControl,\n ValidationError,\n WithOptionalFieldTree,\n} from '@angular/forms/signals';\nimport { Input } from '../../model/input';\n\n@Component({\n selector: 'm-base-array-input',\n template: ``,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BaseArrayInputComponent implements FormValueControl<number[]> {\n value = model<number[]>([]);\n readonly focused = input<boolean>(false);\n readonly errors = input<readonly WithOptionalFieldTree<ValidationError>[]>([]);\n readonly config = input<Input>();\n readonly required = input<boolean>(false);\n readonly disabled = input<boolean>(false);\n readonly invalid = input<boolean>(false);\n touched = model<boolean>(false);\n\n protected readonly elementRef = inject(ElementRef);\n\n showErrors = computed(() => this.touched() && this.invalid());\n\n protected readonly setValue = (value: number[]): void => {\n this.value.set(value);\n this.touched.set(true);\n };\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n HostListener,\n linkedSignal,\n signal,\n viewChild,\n} from '@angular/core';\nimport { BaseArrayInputComponent } from '../text/base-array';\nimport { DraggableDirective, Draggable } from '../../../../directives';\nimport { LabelComponent } from '../label';\nimport { MultiRangeInput } from '../../model/input';\nimport { Direction } from '../../../../type';\n\n@Component({\n selector: 'm-multi-range',\n imports: [DraggableDirective, LabelComponent],\n template: `\n @if (config(); as range) {\n <div class=\"m-range m-range--multi\">\n <m-label\n class=\"m-range__label\"\n [placeholder]=\"range.label\"\n [params]=\"range.params\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n />\n <div class=\"m-range__control\">\n <div class=\"m-range__track\" #track>\n <div\n class=\"m-range__fill\"\n [style.left.px]=\"minThumb().position.x\"\n [style.width.px]=\"fillWidth()\"\n ></div>\n <div\n class=\"m-range__thumb\"\n [(mDraggable)]=\"minThumb\"\n [min]=\"{ x: 0, y: _TRACK_HALF_H }\"\n [max]=\"{ x: maxThumb().position.x, y: _TRACK_HALF_H }\"\n ></div>\n <div\n class=\"m-range__thumb\"\n [(mDraggable)]=\"maxThumb\"\n [min]=\"{ x: minThumb().position.x, y: _TRACK_HALF_H }\"\n [max]=\"{ x: _trackWidth(), y: _TRACK_HALF_H }\"\n ></div>\n </div>\n </div>\n <span class=\"m-range__value\"\n >{{ _displayMin() }}–{{ _displayMax() }}</span\n >\n </div>\n }\n `,\n styleUrl: './range.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MultiRangeInputComponent extends BaseArrayInputComponent {\n private readonly _track = viewChild<ElementRef<HTMLDivElement>>('track');\n protected readonly _trackWidth = signal(0);\n protected readonly _TRACK_HALF_H = 3;\n\n /**\n * Measured live rather than once. The track fills its row and opens inside\n * panels that animate in, and a width read mid\n * animation is the scaled one — `getBoundingClientRect` counts transforms\n * where a ResizeObserver's box does not. A stale width is a thumb that stops\n * short of the track's end or, before the bounds became inputs on the\n * Draggable, ran clean past it.\n */\n private readonly _measure = effect((onCleanup) => {\n const track = this._track();\n if (!track) return;\n\n const el = track.nativeElement;\n this._trackWidth.set(el.getBoundingClientRect().width);\n\n // Absent under jsdom, where the window resize below is the only signal.\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(([entry]) =>\n this._trackWidth.set(entry.contentRect.width)\n );\n observer.observe(el);\n onCleanup(() => observer.disconnect());\n });\n\n readonly minThumb = linkedSignal({\n source: () => ({\n val: this.value()[0],\n tw: this._trackWidth(),\n cfg: this.config(),\n }),\n computation: ({ val, tw, cfg }): Draggable => {\n const c = cfg as MultiRangeInput | undefined;\n const min = c?.min ?? 0;\n const max = c?.max ?? 100;\n const numVal = val ?? min;\n const x = tw > 0 ? (tw * (numVal - min)) / (max - min) : 0;\n return {\n direction: 'x' as Direction,\n position: { x, y: this._TRACK_HALF_H },\n };\n },\n });\n\n readonly maxThumb = linkedSignal({\n source: () => ({\n val: this.value()[1],\n tw: this._trackWidth(),\n cfg: this.config(),\n }),\n computation: ({ val, tw, cfg }): Draggable => {\n const c = cfg as MultiRangeInput | undefined;\n const min = c?.min ?? 0;\n const max = c?.max ?? 100;\n const numVal = val ?? max;\n const x = tw > 0 ? (tw * (numVal - min)) / (max - min) : tw;\n return {\n direction: 'x' as Direction,\n position: { x, y: this._TRACK_HALF_H },\n };\n },\n });\n\n readonly fillWidth = computed(() =>\n Math.max(\n 0,\n (this.maxThumb().position.x ?? 0) - (this.minThumb().position.x ?? 0)\n )\n );\n\n readonly _displayMin = computed(() => {\n const c = this.config() as MultiRangeInput | undefined;\n const min = c?.min ?? 0;\n const max = c?.max ?? 100;\n const tw = this._trackWidth();\n if (tw === 0) return this.value()[0] ?? min;\n return Math.round(\n min + ((max - min) * (this.minThumb().position.x ?? 0)) / tw\n );\n });\n\n readonly _displayMax = computed(() => {\n const c = this.config() as MultiRangeInput | undefined;\n const min = c?.min ?? 0;\n const max = c?.max ?? 100;\n const tw = this._trackWidth();\n if (tw === 0) return this.value()[1] ?? max;\n return Math.round(\n min + ((max - min) * (this.maxThumb().position.x ?? 0)) / tw\n );\n });\n\n constructor() {\n super();\n\n effect(() => {\n const pos = this.minThumb().position;\n const c = this.config() as MultiRangeInput | undefined;\n const min = c?.min ?? 0;\n const max = c?.max ?? 100;\n const tw = this._trackWidth();\n if (tw === 0) return;\n const currentVal = this.value()[0] ?? min;\n const expectedX = (tw * (currentVal - min)) / (max - min);\n if (pos.x !== expectedX) {\n const newMin = Math.round(min + ((max - min) * (pos.x ?? 0)) / tw);\n const currentMax = this.value()[1] ?? max;\n this.setValue([newMin, currentMax]);\n }\n });\n\n effect(() => {\n const pos = this.maxThumb().position;\n const c = this.config() as MultiRangeInput | undefined;\n const min = c?.min ?? 0;\n const max = c?.max ?? 100;\n const tw = this._trackWidth();\n if (tw === 0) return;\n const currentVal = this.value()[1] ?? max;\n const expectedX = tw > 0 ? (tw * (currentVal - min)) / (max - min) : tw;\n if (pos.x !== expectedX) {\n const newMax = Math.round(min + ((max - min) * (pos.x ?? 0)) / tw);\n const currentMin = this.value()[0] ?? min;\n this.setValue([currentMin, newMax]);\n }\n });\n }\n\n @HostListener('window:resize')\n protected _onResize(): void {\n const track = this._track();\n if (track) {\n this._trackWidth.set(track.nativeElement.getBoundingClientRect().width);\n }\n }\n}\n"],"mappings":";;;;;AAqBA,IAAa,0BAAb,MAAa,wBAAuB;CAClC,QAAQ,MAAgB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAClB,UAAU,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,SAAS,MAAyD,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACrE,SAAS,MAAc,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,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IAAA;IAAA;IAAA;IAAA;GAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAyCjC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EA3CpC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,SAChB,CAAC,oBAAoB,cAAc;GAAC,UACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCT,iBAEgB,wBAAwB;GAAM,QAAA,CAAA,soFAAA;EAAA,CAAA;CAGiB,CAAA;CAAA,sBAAA,CAAA;CAAA,gBAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAmItE,MAAA;GAAa,MAAA,CAAA,eAAe"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { J as OPTIONS_SOURCE, p as AssetStore } from "./magmonium-one-size-converter-B-UubQQ0.mjs";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Directive, computed, effect, inject, input, untracked } from "@angular/core";
|
|
4
|
+
import { of } from "rxjs";
|
|
5
|
+
import { rxResource } from "@angular/core/rxjs-interop";
|
|
6
|
+
var OptionsSourceDirective = class OptionsSourceDirective {
|
|
7
|
+
name = input(void 0, {
|
|
8
|
+
...ngDevMode ? { debugName: "name" } : /* istanbul ignore next */ {},
|
|
9
|
+
alias: "mOptions"
|
|
10
|
+
});
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
|
+
minVersion: "12.0.0",
|
|
13
|
+
version: "22.2.1",
|
|
14
|
+
ngImport: i0,
|
|
15
|
+
type: OptionsSourceDirective,
|
|
16
|
+
deps: [],
|
|
17
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
18
|
+
});
|
|
19
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
20
|
+
minVersion: "17.1.0",
|
|
21
|
+
version: "22.2.1",
|
|
22
|
+
type: OptionsSourceDirective,
|
|
23
|
+
isStandalone: true,
|
|
24
|
+
selector: "[mOptions]",
|
|
25
|
+
inputs: { name: {
|
|
26
|
+
classPropertyName: "name",
|
|
27
|
+
publicName: "mOptions",
|
|
28
|
+
isSignal: true,
|
|
29
|
+
isRequired: false,
|
|
30
|
+
transformFunction: null
|
|
31
|
+
} },
|
|
32
|
+
ngImport: i0
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
36
|
+
minVersion: "12.0.0",
|
|
37
|
+
version: "22.2.1",
|
|
38
|
+
ngImport: i0,
|
|
39
|
+
type: OptionsSourceDirective,
|
|
40
|
+
decorators: [{
|
|
41
|
+
type: Directive,
|
|
42
|
+
args: [{ selector: "[mOptions]" }]
|
|
43
|
+
}],
|
|
44
|
+
propDecorators: { name: [{
|
|
45
|
+
type: i0.Input,
|
|
46
|
+
args: [{
|
|
47
|
+
isSignal: true,
|
|
48
|
+
alias: "mOptions",
|
|
49
|
+
required: false
|
|
50
|
+
}]
|
|
51
|
+
}] }
|
|
52
|
+
});
|
|
53
|
+
function normalizeAssetOptions(data) {
|
|
54
|
+
if (!data?.length) return [];
|
|
55
|
+
return (Array.isArray(data[0]) ? data.flat() : data).map((option) => ({
|
|
56
|
+
value: option.value ?? option.id ?? "",
|
|
57
|
+
label: option.label,
|
|
58
|
+
icon: option.icon,
|
|
59
|
+
disabled: option.disabled,
|
|
60
|
+
...option.default === true ? { default: true } : {}
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
function assetOptions(name) {
|
|
64
|
+
const assetStore = inject(AssetStore);
|
|
65
|
+
const optionsSource = inject(OPTIONS_SOURCE, { optional: true });
|
|
66
|
+
const directive = inject(OptionsSourceDirective, { optional: true });
|
|
67
|
+
const assetName = computed(() => name?.()?.trim() || directive?.name()?.trim() || void 0, ...ngDevMode ? [{ debugName: "assetName" }] : /* istanbul ignore next */ []);
|
|
68
|
+
const suppliedRows = computed(() => {
|
|
69
|
+
const key = assetName();
|
|
70
|
+
if (!key) return void 0;
|
|
71
|
+
const rows = optionsSource?.()?.[key];
|
|
72
|
+
return Array.isArray(rows) ? rows : void 0;
|
|
73
|
+
}, ...ngDevMode ? [{ debugName: "suppliedRows" }] : /* istanbul ignore next */ []);
|
|
74
|
+
const resource = rxResource({
|
|
75
|
+
params: () => suppliedRows() ? void 0 : assetName(),
|
|
76
|
+
stream: ({ params }) => {
|
|
77
|
+
if (!params) return of(void 0);
|
|
78
|
+
return assetStore.resolve("options", params, true);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
return computed(() => normalizeAssetOptions(suppliedRows() ?? resource.value()));
|
|
82
|
+
}
|
|
83
|
+
const isEmptyValue = (value) => value === void 0 || value === null || value === "" || Array.isArray(value) && value.length === 0;
|
|
84
|
+
function presetDefaultOption(options, current, apply) {
|
|
85
|
+
let consulted;
|
|
86
|
+
effect(() => {
|
|
87
|
+
const row = options().find((option) => option.default && !option.disabled);
|
|
88
|
+
if (!row || row.value === consulted) return;
|
|
89
|
+
consulted = row.value;
|
|
90
|
+
untracked(() => {
|
|
91
|
+
if (isEmptyValue(current())) apply(row.value);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
export { OptionsSourceDirective as i, normalizeAssetOptions as n, presetDefaultOption as r, assetOptions as t };
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=magmonium-one-options-asset-D8Gg1yNl.mjs.map
|