@mintplayer/ng-bootstrap 22.33.0 → 22.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +7 -7
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/package.json +2 -2
- package/types/mintplayer-ng-bootstrap-machine.d.ts +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-query-builder.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/query-builder/src/value-accessor/query-builder-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/query-builder/src/query-builder.angular.ts","../../../../libs/mintplayer-ng-bootstrap/query-builder/src/generated/query-builder.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/query-builder/src/generated/query-builder.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/query-builder/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/query-builder/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/query-builder/mintplayer-ng-bootstrap-query-builder.ts"],"sourcesContent":["import { DestroyRef, Directive, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { Expression } from '@mintplayer/ui-core/query-builder';\nimport { BsQueryBuilderComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-query-builder` (a host directive of the\n * generated component, see `query-builder.angular.ts`). A bound form control\n * drives the tree through `viewValue`; every edit the user makes reaches the\n * form through the component's `query` model, which a form write never touches.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsQueryBuilderValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsQueryBuilderValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the tree: its `viewValue` wins over the `query` input. */\n readonly bound = signal(false);\n readonly viewValue = signal<Expression | null>(null);\n readonly disabled = signal(false);\n\n private onChange: (value: Expression | null) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n ngOnInit(): void {\n // The component is created after its host directives, so it is looked up here.\n const sub = this.injector.get(BsQueryBuilderComponent).query.subscribe((value) => {\n if (!this.bound() || value === this.viewValue()) return;\n this.viewValue.set(value);\n this.onChange(value);\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n\n writeValue(value: Expression | null | undefined): void {\n this.viewValue.set(value ?? null);\n }\n\n registerOnChange(fn: (value: Expression | null) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { QueryBuilderInputs } from '@mintplayer/ui-core/query-builder';\nimport { BsQueryBuilderValueAccessor } from './value-accessor/query-builder-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-query-builder` (PRD #437 D10\n * escape hatch): Angular forms. A bound form control drives the tree and the\n * disabled state.\n */\n\nexport const hostDirectives = [BsQueryBuilderValueAccessor];\n\nexport function extendInputs(inputs: () => QueryBuilderInputs): () => QueryBuilderInputs {\n const accessor = inject(BsQueryBuilderValueAccessor, { self: true });\n return computed<QueryBuilderInputs>(() => {\n const value = inputs();\n return {\n ...value,\n query: accessor.bound() ? accessor.viewValue() : value.query,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the query-builder manifest (query-builder) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChild, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type EditorContext, queryBuilderCore, type QueryBuilderInputs, type QueryBuilderNode, queryBuilderScopedStyles, type QueryBuilderView, type SavedQueryNameDetail, type SaveQueryDetail } from '@mintplayer/ui-core/query-builder';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { bootstrapButtonGroup } from '@mintplayer/ui-core/bootstrap/button-group';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../query-builder.angular';\n\n/** The `editor` slot of `<bs-query-builder>`: `<ng-template bsQueryBuilderEditor>` or `*bsQueryBuilderEditor`. */\n@Directive({ selector: '[bsQueryBuilderEditor]' })\nexport class BsQueryBuilderEditorDirective {\n readonly templateRef = inject<TemplateRef<{ ctx: EditorContext } & { $implicit: { ctx: EditorContext }['ctx'] }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsQueryBuilderEditorDirective, ctx: unknown): ctx is { ctx: EditorContext } & { $implicit: { ctx: EditorContext }['ctx'] } {\n return true;\n }\n}\n\n/** Types the `QueryBuilderItem` partial's context in this template. */\n@Directive({ selector: 'ng-template[mpPartialQueryBuilderItem]' })\nexport class QueryBuilderItemPartial {\n static ngTemplateContextGuard(_dir: QueryBuilderItemPartial, ctx: unknown): ctx is { node: QueryBuilderNode; view: QueryBuilderView } {\n return true;\n }\n}\n\n/**\n * A visual editor for a filter expression: AND/OR groups, conditions and sub-queries over a relation (#437).\n *\n * `query` is two-way. The tree renders as flat rows, so the server render shows the whole query.\n * A field with `editor: 'custom'` renders its value through the `editor` slot, which receives an\n * `EditorContext` (call `ctx.onChange(next)`). Rows reorder by dragging the handle, or with\n * Alt+Up/Down on a row. An `aria-label` names it.\n */\n@Component({\n selector: 'bs-query-builder',\n templateUrl: './query-builder.view.generated.html',\n imports: [MpPropsDirective, NgTemplateOutlet, QueryBuilderItemPartial],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsQueryBuilderComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly query = model<QueryBuilderInputs['query']>(null);\n readonly schema = input<QueryBuilderInputs['schema']>([]);\n readonly rootEntity = model<QueryBuilderInputs['rootEntity']>('');\n readonly multiEntityPickerEnabled = input<QueryBuilderInputs['multiEntityPickerEnabled'], unknown>(false, { transform: booleanAttribute });\n readonly selectedFields = model<QueryBuilderInputs['selectedFields']>([]);\n readonly sortBy = model<QueryBuilderInputs['sortBy']>([]);\n readonly disabled = input<QueryBuilderInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly messages = input<QueryBuilderInputs['messages']>();\n readonly maxDepth = input<QueryBuilderInputs['maxDepth'], unknown>(32, { transform: (v: unknown) => numberAttribute(v) as QueryBuilderInputs['maxDepth'] });\n readonly showPreview = input<QueryBuilderInputs['showPreview'], unknown>(false, { transform: booleanAttribute });\n readonly showSavedQueries = input<QueryBuilderInputs['showSavedQueries'], unknown>(false, { transform: booleanAttribute });\n readonly savedQueries = input<QueryBuilderInputs['savedQueries']>([]);\n /** Save the current query under a name. */\n readonly saveQuery = output<SaveQueryDetail>();\n /** Load the named saved query. */\n readonly loadQuery = output<SavedQueryNameDetail>();\n /** Delete the named saved query. */\n readonly deleteQuery = output<SavedQueryNameDetail>();\n\n private readonly editorSlot = contentChild(BsQueryBuilderEditorDirective);\n /** The template's named slots. */\n protected readonly slots = computed(() => ({ editor: this.editorSlot()?.templateRef }));\n readonly #core = useCore(queryBuilderCore, { inputs: ext_extendInputs(() => ({ query: this.query(), schema: this.schema(), rootEntity: this.rootEntity(), multiEntityPickerEnabled: this.multiEntityPickerEnabled(), selectedFields: this.selectedFields(), sortBy: this.sortBy(), disabled: this.disabled(), messages: this.messages(), maxDepth: this.maxDepth(), showPreview: this.showPreview(), showSavedQueries: this.showSavedQueries(), savedQueries: this.savedQueries() })), idPrefix: 'bs-query-builder', outputs: { saveQuery: this.saveQuery, loadQuery: this.loadQuery, deleteQuery: this.deleteQuery }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'query-builder' }), models: { query: this.query, rootEntity: this.rootEntity, selectedFields: this.selectedFields, sortBy: this.sortBy } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles(bootstrapButtonGroup.key, bootstrapButtonGroup.css, { order: bootstrapButtonGroup.order }); useScopedStyles('query-builder', queryBuilderScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/query-builder/src/templates/query-builder.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@if (p_view.toolbar) {\n <div data-mps=\"query-builder\" [mpProps]=\"p_view.toolbarBox\">\n <label data-mps=\"query-builder\" [mpProps]=\"p_view.toolbarLabel\">\n {{ p_view.text.entity }}\n : \n <select data-mps=\"query-builder\" [mpProps]=\"p_view.entity\">\n @for (o of p_view.entities; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n </label>\n @if (p_view.projection) {\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.projectionBox\">\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.toolbarLabel\">\n {{ p_view.text.columns }}\n :\n </span>\n @for (p of p_view.projections; track p.key) {\n <label data-mps=\"query-builder\" [mpProps]=\"p.box\">\n <input data-mps=\"query-builder\" [mpProps]=\"p.input\">\n {{ p.label }}\n </label>\n }\n </span>\n }\n @if (p_view.projection) {\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.sortBox\">\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.toolbarLabel\">\n {{ p_view.text.sortBy }}\n :\n </span>\n @for (s of p_view.sorts; track s.key) {\n <span data-mps=\"query-builder\" [mpProps]=\"s.box\">\n <select data-mps=\"query-builder\" [mpProps]=\"s.field\">\n @for (o of s.fields; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n <select data-mps=\"query-builder\" [mpProps]=\"s.direction\">\n @for (o of s.directions; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n <button data-mps=\"query-builder\" [mpProps]=\"s.remove\">\n ×\n </button>\n </span>\n }\n <button data-mps=\"query-builder\" [mpProps]=\"p_view.sortAdd\">\n + \n {{ p_view.text.addSort }}\n </button>\n </span>\n }\n </div>\n}\n@if (p_view.saved) {\n <div data-mps=\"query-builder\" [mpProps]=\"p_view.savedBox\">\n <div data-mps=\"query-builder\" [mpProps]=\"p_view.savedList\">\n @if (p_view.savedQueries.length === 0) {\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.savedEmpty\">\n {{ p_view.text.noSavedQueries }}\n </span>\n }\n @for (q of p_view.savedQueries; track q.key) {\n <span data-mps=\"query-builder\" [mpProps]=\"q.box\">\n <button data-mps=\"query-builder\" [mpProps]=\"q.load\">\n {{ q.loadText }}\n </button>\n <button data-mps=\"query-builder\" [mpProps]=\"q.remove\">\n {{ p_view.text.deleteQuery }}\n </button>\n </span>\n }\n </div>\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.savedNew\">\n <input data-mps=\"query-builder\" [mpProps]=\"p_view.savedName\">\n <button data-mps=\"query-builder\" [mpProps]=\"p_view.savedSave\">\n 💾 \n {{ p_view.text.saveCurrentAs }}\n </button>\n </span>\n </div>\n}\n@if (p_view.preview) {\n <pre data-mps=\"query-builder\" [mpProps]=\"p_view.previewBox\">\n {{ p_view.previewText }}\n </pre>\n}\n<ul data-mps=\"query-builder\" [mpProps]=\"p_view.list\">\n <ng-container [ngTemplateOutlet]=\"partial_QueryBuilderItem\" [ngTemplateOutletContext]=\"{ node: p_view.tree, view: p_view }\" />\n</ul>\n<ng-template #partial_QueryBuilderItem mpPartialQueryBuilderItem let-pp_node=\"node\" let-pp_view=\"view\">\n <li data-mps=\"query-builder\" [mpProps]=\"pp_node.item\">\n @if (pp_node.kind === 'group') {\n <div data-mps=\"query-builder\" [mpProps]=\"pp_node.group.header\">\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.group.logic\">\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.and\">\n {{ pp_view.text.logicAnd }}\n </button>\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.or\">\n {{ pp_view.text.logicOr }}\n </button>\n </span>\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.group.actions\">\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.addCondition\">\n + \n {{ pp_view.text.addCondition }}\n </button>\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.addGroup\">\n + \n {{ pp_view.text.addGroup }}\n </button>\n @if (pp_node.group.canAddSubquery) {\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.addSubquery\">\n + \n {{ pp_view.text.addSubquery }}\n </button>\n }\n @if (pp_node.group.removable) {\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.remove\">\n ×\n </button>\n }\n </span>\n </div>\n } @else if (pp_node.kind === 'condition') {\n <div data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.box\">\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.handle\">\n ⋮\n </button>\n <select data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.field\">\n @for (o of pp_node.condition.fields; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n <select data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.operator\">\n @for (o of pp_node.condition.operators; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n @if (pp_node.condition.hasEditor) {\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.wrap\">\n @if (pp_node.condition.editor.custom) {\n @if (slots().editor; as slot_editor) {\n <ng-container [ngTemplateOutlet]=\"slot_editor\" [ngTemplateOutletContext]=\"{ $implicit: pp_node.condition.editor.ctx, ctx: pp_node.condition.editor.ctx }\" />\n }\n } @else if (pp_node.condition.editor.isSelect) {\n <select data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.select\">\n @for (o of pp_node.condition.editor.options; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n } @else if (pp_node.condition.editor.isChips) {\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.chipBox\">\n @for (c of pp_node.condition.editor.chips; track c.key) {\n <span data-mps=\"query-builder\" [mpProps]=\"c.bag\">\n {{ c.label }}\n <button data-mps=\"query-builder\" [mpProps]=\"c.remove\">\n ×\n </button>\n </span>\n }\n <input data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.chipAdd\">\n </span>\n } @else {\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.inputBox\">\n @for (inp of pp_node.condition.editor.inputs; track inp.key) {\n @if (inp.sep) {\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.sep\">\n … \n </span>\n }\n <input data-mps=\"query-builder\" [mpProps]=\"inp.bag\">\n }\n </span>\n }\n </span>\n }\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.remove\">\n ×\n </button>\n </div>\n } @else if (pp_node.kind === 'subquery') {\n <div data-mps=\"query-builder\" [mpProps]=\"pp_node.subquery.header\">\n <span data-mps=\"query-builder\" [mpProps]=\"pp_view.subqueryField\">\n {{ pp_node.subquery.fieldLabel }}\n </span>\n <span data-mps=\"query-builder\" [mpProps]=\"pp_view.subqueryOperator\">\n {{ pp_node.subquery.operatorLabel }}\n </span>\n @if (pp_node.subquery.target) {\n <span data-mps=\"query-builder\" [mpProps]=\"pp_view.subqueryTarget\">\n (\n {{ pp_node.subquery.target }}\n )\n </span>\n }\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.subquery.remove\">\n ×\n </button>\n </div>\n } @else {\n <div data-mps=\"query-builder\" [mpProps]=\"pp_node.note\">\n {{ pp_node.text }}\n </div>\n }\n @if (pp_node.children.length) {\n <ul data-mps=\"query-builder\" [mpProps]=\"pp_node.list\">\n @for (child of pp_node.children; track child.key) {\n <ng-container [ngTemplateOutlet]=\"partial_QueryBuilderItem\" [ngTemplateOutletContext]=\"{ node: child, view: pp_view }\" />\n }\n </ul>\n }\n </li>\n</ng-template>\n","// GENERATED from the query-builder manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsQueryBuilderComponent, BsQueryBuilderEditorDirective } from './query-builder.component.generated';\n","// The query builder is generated from @mintplayer/ui-core/query-builder (PRD #437 D10).\nexport * from './generated';\nexport * from './value-accessor/query-builder-value-accessor';\nexport {\n DEFAULT_MESSAGES,\n DEFAULT_OPERATOR_CATALOG,\n MaxDepthExceededError,\n addChild,\n addEmptyConditionTo,\n addEmptyGroupTo,\n addEmptySubqueryTo,\n changeConditionField,\n changeConditionOperator,\n cloneTree,\n collectDescendantIds,\n defaultValueFor,\n emptyCondition,\n emptyGroup,\n emptySubquery,\n findNodeById,\n mapTree,\n moveNode,\n newId,\n operatorsForType,\n removeNode,\n renderExpression,\n setGroupLogic,\n updateCondition,\n validateOperatorOverrides,\n valueShapeFor,\n visitTree,\n} from '@mintplayer/ui-core/query-builder';\nexport type {\n Condition,\n EditorContext,\n EntitySchema,\n Expression,\n FieldDef,\n FieldDefOption,\n FieldType,\n Group,\n Operator,\n OperatorCatalog,\n OperatorOverrides,\n QueryBuilderMessages,\n RenderExpressionOptions,\n SaveQueryDetail,\n SavedQuery,\n SavedQueryNameDetail,\n SortDescriptor,\n SubQueryCondition,\n TreeVisitor,\n ValidateOperatorOverridesResult,\n ValueShape,\n VisitTreeOptions,\n VisitorContext,\n} from '@mintplayer/ui-core/query-builder';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsQueryBuilderValueAccessor","ext_host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builder-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/query-builder/src/query-builder.angular.ts","../../../../libs/mintplayer-ng-bootstrap/query-builder/src/generated/query-builder.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/query-builder/src/generated/query-builder.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/query-builder/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/query-builder/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/query-builder/mintplayer-ng-bootstrap-query-builder.ts"],"sourcesContent":["import { DestroyRef, Directive, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { Expression } from '@mintplayer/ui-core/query-builder';\nimport { BsQueryBuilderComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-query-builder` (a host directive of the\n * generated component, see `query-builder.angular.ts`). A bound form control\n * drives the tree through `viewValue`; every edit the user makes reaches the\n * form through the component's `query` model, which a form write never touches.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsQueryBuilderValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsQueryBuilderValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the tree: its `viewValue` wins over the `query` input. */\n readonly bound = signal(false);\n readonly viewValue = signal<Expression | null>(null);\n readonly disabled = signal(false);\n\n private onChange: (value: Expression | null) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n ngOnInit(): void {\n // The component is created after its host directives, so it is looked up here.\n const sub = this.injector.get(BsQueryBuilderComponent).query.subscribe((value) => {\n if (!this.bound() || value === this.viewValue()) return;\n this.viewValue.set(value);\n this.onChange(value);\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n\n writeValue(value: Expression | null | undefined): void {\n this.viewValue.set(value ?? null);\n }\n\n registerOnChange(fn: (value: Expression | null) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { QueryBuilderInputs } from '@mintplayer/ui-core/query-builder';\nimport { BsQueryBuilderValueAccessor } from './value-accessor/query-builder-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-query-builder` (PRD #437 D10\n * escape hatch): Angular forms. A bound form control drives the tree and the\n * disabled state.\n */\n\nexport const hostDirectives = [BsQueryBuilderValueAccessor];\n\nexport function extendInputs(inputs: () => QueryBuilderInputs): () => QueryBuilderInputs {\n const accessor = inject(BsQueryBuilderValueAccessor, { self: true });\n return computed<QueryBuilderInputs>(() => {\n const value = inputs();\n return {\n ...value,\n query: accessor.bound() ? accessor.viewValue() : value.query,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the query-builder manifest (query-builder) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChild, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type EditorContext, queryBuilderCore, type QueryBuilderInputs, type QueryBuilderNode, queryBuilderScopedStyles, type QueryBuilderView, type SavedQueryNameDetail, type SaveQueryDetail } from '@mintplayer/ui-core/query-builder';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { bootstrapButtonGroup } from '@mintplayer/ui-core/bootstrap/button-group';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../query-builder.angular';\n\n/** The `editor` slot of `<bs-query-builder>`: `<ng-template bsQueryBuilderEditor>` or `*bsQueryBuilderEditor`. */\n@Directive({ selector: '[bsQueryBuilderEditor]' })\nexport class BsQueryBuilderEditorDirective {\n readonly templateRef = inject<TemplateRef<{ ctx: EditorContext } & { $implicit: { ctx: EditorContext }['ctx'] }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsQueryBuilderEditorDirective, ctx: unknown): ctx is { ctx: EditorContext } & { $implicit: { ctx: EditorContext }['ctx'] } {\n return true;\n }\n}\n\n/** Types the `QueryBuilderItem` partial's context in this template. */\n@Directive({ selector: 'ng-template[mpPartialQueryBuilderItem]' })\nexport class QueryBuilderItemPartial {\n static ngTemplateContextGuard(_dir: QueryBuilderItemPartial, ctx: unknown): ctx is { node: QueryBuilderNode; view: QueryBuilderView } {\n return true;\n }\n}\n\n/**\n * A visual editor for a filter expression: AND/OR groups, conditions and sub-queries over a relation (#437).\n *\n * `query` is two-way. The tree renders as flat rows, so the server render shows the whole query.\n * A field with `editor: 'custom'` renders its value through the `editor` slot, which receives an\n * `EditorContext` (call `ctx.onChange(next)`). Rows reorder by dragging the handle, or with\n * Alt+Up/Down on a row. An `aria-label` names it.\n */\n@Component({\n selector: 'bs-query-builder',\n templateUrl: './query-builder.view.generated.html',\n imports: [MpPropsDirective, NgTemplateOutlet, QueryBuilderItemPartial],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsQueryBuilderComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly query = model<QueryBuilderInputs['query']>(null);\n readonly schema = input<QueryBuilderInputs['schema']>([]);\n readonly rootEntity = model<QueryBuilderInputs['rootEntity']>('');\n readonly multiEntityPickerEnabled = input<QueryBuilderInputs['multiEntityPickerEnabled'], unknown>(false, { transform: booleanAttribute });\n readonly selectedFields = model<QueryBuilderInputs['selectedFields']>([]);\n readonly sortBy = model<QueryBuilderInputs['sortBy']>([]);\n readonly disabled = input<QueryBuilderInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly messages = input<QueryBuilderInputs['messages']>();\n readonly maxDepth = input<QueryBuilderInputs['maxDepth'], unknown>(32, { transform: (v: unknown) => (v == null || v === '' ? 32 : numberAttribute(v)) as QueryBuilderInputs['maxDepth'] });\n readonly showPreview = input<QueryBuilderInputs['showPreview'], unknown>(false, { transform: booleanAttribute });\n readonly showSavedQueries = input<QueryBuilderInputs['showSavedQueries'], unknown>(false, { transform: booleanAttribute });\n readonly savedQueries = input<QueryBuilderInputs['savedQueries']>([]);\n /** Save the current query under a name. */\n readonly saveQuery = output<SaveQueryDetail>();\n /** Load the named saved query. */\n readonly loadQuery = output<SavedQueryNameDetail>();\n /** Delete the named saved query. */\n readonly deleteQuery = output<SavedQueryNameDetail>();\n\n private readonly editorSlot = contentChild(BsQueryBuilderEditorDirective);\n /** The template's named slots. */\n protected readonly slots = computed(() => ({ editor: this.editorSlot()?.templateRef }));\n readonly #core = useCore(queryBuilderCore, { inputs: ext_extendInputs(() => ({ query: this.query(), schema: this.schema(), rootEntity: this.rootEntity(), multiEntityPickerEnabled: this.multiEntityPickerEnabled(), selectedFields: this.selectedFields(), sortBy: this.sortBy(), disabled: this.disabled(), messages: this.messages(), maxDepth: this.maxDepth(), showPreview: this.showPreview(), showSavedQueries: this.showSavedQueries(), savedQueries: this.savedQueries() })), idPrefix: 'bs-query-builder', outputs: { saveQuery: this.saveQuery, loadQuery: this.loadQuery, deleteQuery: this.deleteQuery }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'query-builder' }), models: {query: this.query, rootEntity: this.rootEntity, selectedFields: this.selectedFields, sortBy: this.sortBy } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles(bootstrapButtonGroup.key, bootstrapButtonGroup.css, { order: bootstrapButtonGroup.order }); useScopedStyles('query-builder', queryBuilderScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/query-builder/src/templates/query-builder.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@if (p_view.toolbar) {\n <div data-mps=\"query-builder\" [mpProps]=\"p_view.toolbarBox\">\n <label data-mps=\"query-builder\" [mpProps]=\"p_view.toolbarLabel\">\n {{ p_view.text.entity }}\n : \n <select data-mps=\"query-builder\" [mpProps]=\"p_view.entity\">\n @for (o of p_view.entities; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n </label>\n @if (p_view.projection) {\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.projectionBox\">\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.toolbarLabel\">\n {{ p_view.text.columns }}\n :\n </span>\n @for (p of p_view.projections; track p.key) {\n <label data-mps=\"query-builder\" [mpProps]=\"p.box\">\n <input data-mps=\"query-builder\" [mpProps]=\"p.input\">\n {{ p.label }}\n </label>\n }\n </span>\n }\n @if (p_view.projection) {\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.sortBox\">\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.toolbarLabel\">\n {{ p_view.text.sortBy }}\n :\n </span>\n @for (s of p_view.sorts; track s.key) {\n <span data-mps=\"query-builder\" [mpProps]=\"s.box\">\n <select data-mps=\"query-builder\" [mpProps]=\"s.field\">\n @for (o of s.fields; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n <select data-mps=\"query-builder\" [mpProps]=\"s.direction\">\n @for (o of s.directions; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n <button data-mps=\"query-builder\" [mpProps]=\"s.remove\">\n ×\n </button>\n </span>\n }\n <button data-mps=\"query-builder\" [mpProps]=\"p_view.sortAdd\">\n + \n {{ p_view.text.addSort }}\n </button>\n </span>\n }\n </div>\n}\n@if (p_view.saved) {\n <div data-mps=\"query-builder\" [mpProps]=\"p_view.savedBox\">\n <div data-mps=\"query-builder\" [mpProps]=\"p_view.savedList\">\n @if (p_view.savedQueries.length === 0) {\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.savedEmpty\">\n {{ p_view.text.noSavedQueries }}\n </span>\n }\n @for (q of p_view.savedQueries; track q.key) {\n <span data-mps=\"query-builder\" [mpProps]=\"q.box\">\n <button data-mps=\"query-builder\" [mpProps]=\"q.load\">\n {{ q.loadText }}\n </button>\n <button data-mps=\"query-builder\" [mpProps]=\"q.remove\">\n {{ p_view.text.deleteQuery }}\n </button>\n </span>\n }\n </div>\n <span data-mps=\"query-builder\" [mpProps]=\"p_view.savedNew\">\n <input data-mps=\"query-builder\" [mpProps]=\"p_view.savedName\">\n <button data-mps=\"query-builder\" [mpProps]=\"p_view.savedSave\">\n 💾 \n {{ p_view.text.saveCurrentAs }}\n </button>\n </span>\n </div>\n}\n@if (p_view.preview) {\n <pre data-mps=\"query-builder\" [mpProps]=\"p_view.previewBox\">\n {{ p_view.previewText }}\n </pre>\n}\n<ul data-mps=\"query-builder\" [mpProps]=\"p_view.list\">\n <ng-container [ngTemplateOutlet]=\"partial_QueryBuilderItem\" [ngTemplateOutletContext]=\"{ node: p_view.tree, view: p_view }\" />\n</ul>\n<ng-template #partial_QueryBuilderItem mpPartialQueryBuilderItem let-pp_node=\"node\" let-pp_view=\"view\">\n <li data-mps=\"query-builder\" [mpProps]=\"pp_node.item\">\n @if (pp_node.kind === 'group') {\n <div data-mps=\"query-builder\" [mpProps]=\"pp_node.group.header\">\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.group.logic\">\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.and\">\n {{ pp_view.text.logicAnd }}\n </button>\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.or\">\n {{ pp_view.text.logicOr }}\n </button>\n </span>\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.group.actions\">\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.addCondition\">\n + \n {{ pp_view.text.addCondition }}\n </button>\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.addGroup\">\n + \n {{ pp_view.text.addGroup }}\n </button>\n @if (pp_node.group.canAddSubquery) {\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.addSubquery\">\n + \n {{ pp_view.text.addSubquery }}\n </button>\n }\n @if (pp_node.group.removable) {\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.group.remove\">\n ×\n </button>\n }\n </span>\n </div>\n } @else if (pp_node.kind === 'condition') {\n <div data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.box\">\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.handle\">\n ⋮\n </button>\n <select data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.field\">\n @for (o of pp_node.condition.fields; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n <select data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.operator\">\n @for (o of pp_node.condition.operators; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n @if (pp_node.condition.hasEditor) {\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.wrap\">\n @if (pp_node.condition.editor.custom) {\n @if (slots().editor; as slot_editor) {\n <ng-container [ngTemplateOutlet]=\"slot_editor\" [ngTemplateOutletContext]=\"{ $implicit: pp_node.condition.editor.ctx, ctx: pp_node.condition.editor.ctx }\" />\n }\n } @else if (pp_node.condition.editor.isSelect) {\n <select data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.select\">\n @for (o of pp_node.condition.editor.options; track o.key) {\n <option data-mps=\"query-builder\" [mpProps]=\"o.bag\">\n {{ o.label }}\n </option>\n }\n </select>\n } @else if (pp_node.condition.editor.isChips) {\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.chipBox\">\n @for (c of pp_node.condition.editor.chips; track c.key) {\n <span data-mps=\"query-builder\" [mpProps]=\"c.bag\">\n {{ c.label }}\n <button data-mps=\"query-builder\" [mpProps]=\"c.remove\">\n ×\n </button>\n </span>\n }\n <input data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.chipAdd\">\n </span>\n } @else {\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.inputBox\">\n @for (inp of pp_node.condition.editor.inputs; track inp.key) {\n @if (inp.sep) {\n <span data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.editor.sep\">\n … \n </span>\n }\n <input data-mps=\"query-builder\" [mpProps]=\"inp.bag\">\n }\n </span>\n }\n </span>\n }\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.condition.remove\">\n ×\n </button>\n </div>\n } @else if (pp_node.kind === 'subquery') {\n <div data-mps=\"query-builder\" [mpProps]=\"pp_node.subquery.header\">\n <span data-mps=\"query-builder\" [mpProps]=\"pp_view.subqueryField\">\n {{ pp_node.subquery.fieldLabel }}\n </span>\n <span data-mps=\"query-builder\" [mpProps]=\"pp_view.subqueryOperator\">\n {{ pp_node.subquery.operatorLabel }}\n </span>\n @if (pp_node.subquery.target) {\n <span data-mps=\"query-builder\" [mpProps]=\"pp_view.subqueryTarget\">\n (\n {{ pp_node.subquery.target }}\n )\n </span>\n }\n <button data-mps=\"query-builder\" [mpProps]=\"pp_node.subquery.remove\">\n ×\n </button>\n </div>\n } @else {\n <div data-mps=\"query-builder\" [mpProps]=\"pp_node.note\">\n {{ pp_node.text }}\n </div>\n }\n @if (pp_node.children.length) {\n <ul data-mps=\"query-builder\" [mpProps]=\"pp_node.list\">\n @for (child of pp_node.children; track child.key) {\n <ng-container [ngTemplateOutlet]=\"partial_QueryBuilderItem\" [ngTemplateOutletContext]=\"{ node: child, view: pp_view }\" />\n }\n </ul>\n }\n </li>\n</ng-template>\n","// GENERATED from the query-builder manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsQueryBuilderComponent, BsQueryBuilderEditorDirective } from './query-builder.component.generated';\n","// The query builder is generated from @mintplayer/ui-core/query-builder (PRD #437 D10).\nexport * from './generated';\nexport * from './value-accessor/query-builder-value-accessor';\nexport {\n DEFAULT_MESSAGES,\n DEFAULT_OPERATOR_CATALOG,\n MaxDepthExceededError,\n addChild,\n addEmptyConditionTo,\n addEmptyGroupTo,\n addEmptySubqueryTo,\n changeConditionField,\n changeConditionOperator,\n cloneTree,\n collectDescendantIds,\n defaultValueFor,\n emptyCondition,\n emptyGroup,\n emptySubquery,\n findNodeById,\n mapTree,\n moveNode,\n newId,\n operatorsForType,\n removeNode,\n renderExpression,\n setGroupLogic,\n updateCondition,\n validateOperatorOverrides,\n valueShapeFor,\n visitTree,\n} from '@mintplayer/ui-core/query-builder';\nexport type {\n Condition,\n EditorContext,\n EntitySchema,\n Expression,\n FieldDef,\n FieldDefOption,\n FieldType,\n Group,\n Operator,\n OperatorCatalog,\n OperatorOverrides,\n QueryBuilderMessages,\n RenderExpressionOptions,\n SaveQueryDetail,\n SavedQuery,\n SavedQueryNameDetail,\n SortDescriptor,\n SubQueryCondition,\n TreeVisitor,\n ValidateOperatorOverridesResult,\n ValueShape,\n VisitTreeOptions,\n VisitorContext,\n} from '@mintplayer/ui-core/query-builder';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsQueryBuilderValueAccessor","ext_hostDirectives"],"mappings":";;;;;;;;;;AAKA;;;;;AAKG;MAOU,2BAA2B,CAAA;AANxC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;QAGvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAoB,IAAI;sFAAC;QAC3C,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAAuC,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A,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAjBjC,uBAAuB,EAAA,QAAA,EAAA,wCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAqBvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,OAAA,EAEnB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,uBAAuB,CAAC,EAAA,eAAA,EACrD,uBAAuB,CAAC,MAAM,kBAC/BC,cAAkB,EAAA,QAAA,EAAA,6gTAAA,EAAA;iqDAyBS,6BAA6B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhE1E;;ACAA;;ACAA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-radio.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/radio/src/radio.angular.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/generated/radio.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/generated/radio.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/radio/src/radio-group.accessor.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/radio-group.angular.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/generated/radio-group.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/generated/radio-group.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/radio/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/directives/radio-group/radio-group.directive.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/radio/mintplayer-ng-bootstrap-radio.ts"],"sourcesContent":["import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';\nimport type { RadioInputs } from '@mintplayer/ui-core/radio';\n\n/*\n * The Angular extension of the generated `bs-radio` (#458 D10 escape hatch): a\n * form control's validity reaches the radio's ARIA and its message.\n */\n\nexport const hostDirectives = [{ directive: BsControlValidityDirective, inputs: ['errorMessages'] }];\n\nexport function extendInputs(inputs: () => RadioInputs): () => RadioInputs {\n const validity = inject(BsControlValidityDirective, { self: true });\n return computed<RadioInputs>(() => {\n const value = inputs();\n return {\n ...value,\n invalid: value.invalid || validity.invalid(),\n required: value.required || validity.required(),\n errorText: value.errorText ?? validity.errorText(),\n };\n });\n}\n","// GENERATED from the radio manifest (radio) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model } from '@angular/core';\nimport { MpPropsDirective, useCore, useHostAttrs, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { radioCore, type RadioInputs, radioScopedStyles } from '@mintplayer/ui-core/radio';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../radio.angular';\n\n/**\n * A native `<input type=radio>` in Bootstrap's `.form-check` or `.btn-check` markup (#458).\n *\n * Inside a radio group it takes the group's `name` and selection, so the browser supplies\n * one-of-N, the single tab stop and arrow-key selection, with JavaScript off as well. An\n * `aria-label` on the component, or `inputLabel`, names the input.\n */\n@Component({\n selector: 'bs-radio',\n templateUrl: './radio.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsRadioComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */\n protected readonly hostAttrs = useHostAttrs();\n\n readonly type = input<RadioInputs['type']>('radio');\n readonly color = input<RadioInputs['color']>('secondary');\n readonly inline = input<RadioInputs['inline'], unknown>(false, { transform: booleanAttribute });\n readonly value = input<RadioInputs['value']>(null);\n readonly checked = model<RadioInputs['checked']>(false);\n readonly name = input<RadioInputs['name']>(null);\n readonly disabled = input<RadioInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<RadioInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<RadioInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<RadioInputs['errorText']>(null);\n readonly inputLabel = input<RadioInputs['inputLabel']>(null);\n\n readonly #core = useCore(radioCore, { inputs: ext_extendInputs(() => ({ type: this.type(), color: this.color(), inline: this.inline(), value: this.value(), checked: this.checked(), name: this.name(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), inputLabel: this.inputLabel() })), idPrefix: 'bs-radio', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'radio' }), models: { checked: this.checked } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles('radio', radioScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/radio/src/templates/radio.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"radio\" [mpProps]=\"p_view.input\" [checked]=\"p_view.checked\" [mpHostAttrs]=\"hostAttrs\">\n<label data-mps=\"radio\" [mpProps]=\"p_view.label\">\n <ng-content />\n</label>\n@if (p_view.feedback) {\n <div data-mps=\"radio\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","import { afterNextRender, Directive, ElementRef, forwardRef, inject, PLATFORM_ID, signal } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { preHydrationChoice } from '@mintplayer/ui-core/forms';\nimport { ownsRadio } from '@mintplayer/ui-core/radio';\n\n/**\n * The `ControlValueAccessor` of a radio group, shared by the generated\n * `bs-radio-group` and the attribute form `[bsRadioGroup]` (a host directive of\n * both). The value is the picked radio's `value`. It reacts only to the radios\n * of its own group: a radio list nested in a table cell is its own group and\n * never changes this one (`ownsRadio`).\n */\n@Directive({\n // Applied as a host directive only.\n selector: '[bsRadioGroupAccessor]',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRadioGroupValueAccessor), multi: true }],\n host: {\n // A native radio's change bubbles to the group's element.\n '(change)': 'onNativeChange($event)',\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsRadioGroupValueAccessor implements ControlValueAccessor {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** A form control is bound: its value drives the group, over the group's own `value`. */\n readonly bound = signal(false);\n /** The selection as the form control or the user last set it. */\n readonly viewValue = signal<string | null>(null);\n readonly disabled = signal(false);\n\n private onChange: (value: string | null) => void = () => undefined;\n onTouched: () => void = () => undefined;\n /** The owner's own write-back of a pick (`[(value)]`), next to the form control's. */\n onPick: (value: string) => void = () => undefined;\n\n constructor() {\n this.adoptPreHydrationChoice();\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n writeValue(value: string | null): void {\n this.viewValue.set(value ?? null);\n }\n\n onNativeChange(event: Event): void {\n if (ownsRadio(this.host, event.target)) this.select(event.target.value);\n }\n\n private select(value: string): void {\n this.viewValue.set(value);\n this.onChange(value);\n this.onPick(value);\n }\n\n /**\n * A radio picked in the server-rendered page before hydration would be reverted\n * by the `checked` bindings. Read it while the host holds the server DOM, and\n * replay it as the user's pick once the form directives have written their\n * initial value (ngModel writes in a microtask after the first render) and the\n * group's core has attached: a real `change`, so every listener (this accessor,\n * the core and its model) takes the one path a live pick takes.\n */\n private adoptPreHydrationChoice(): void {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const picked = preHydrationChoice(this.host);\n if (picked === null) return;\n afterNextRender(() =>\n queueMicrotask(() => {\n const radio = [...this.host.querySelectorAll<HTMLInputElement>('input[type=radio]')]\n .find((input) => input.value === picked && ownsRadio(this.host, input));\n if (!radio) return;\n radio.checked = true;\n radio.dispatchEvent(new Event('change', { bubbles: true }));\n }),\n );\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { RadioGroupInputs } from '@mintplayer/ui-core/radio';\nimport { BsRadioGroupValueAccessor } from './radio-group.accessor';\n\n/*\n * The Angular extension of the generated `bs-radio-group` (#458 D10 escape\n * hatch): Angular forms. A bound form control\n * drives the selection, and a disabled control disables the group.\n */\n\nexport const hostDirectives = [BsRadioGroupValueAccessor];\n\nexport function extendInputs(inputs: () => RadioGroupInputs): () => RadioGroupInputs {\n const accessor = inject(BsRadioGroupValueAccessor, { self: true });\n return computed<RadioGroupInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the radio manifest (radio-group) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model } from '@angular/core';\nimport { provideCoreContext, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { RADIO_GROUP, radioGroupCore, type RadioGroupInputs, radioScopedStyles } from '@mintplayer/ui-core/radio';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../radio-group.angular';\n\n/**\n * A `role=radiogroup` element around radios (#458). It hands them one `name`, so they are native\n * radios of one set. `value` is two-way. Name it with `aria-label` / `aria-labelledby`. A radio\n * list nested inside (a table cell) is its own group: each group reacts only to its own radios.\n */\n@Component({\n selector: 'bs-radio-group',\n templateUrl: './radio-group.view.generated.html',\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [provideCoreContext(RADIO_GROUP, BsRadioGroupComponent)],\n hostDirectives: ext_hostDirectives,\n})\nexport class BsRadioGroupComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly name = input<RadioGroupInputs['name']>(null);\n readonly value = model<RadioGroupInputs['value']>(null);\n readonly disabled = input<RadioGroupInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<RadioGroupInputs['required'], unknown>(false, { transform: booleanAttribute });\n\n readonly #core = useCore(radioGroupCore, { inputs: ext_extendInputs(() => ({ name: this.name(), value: this.value(), disabled: this.disabled(), required: this.required() })), idPrefix: 'bs-radio-group', hostBag: (props) => ({ ...props.root, 'data-mps': 'radio' }), models: { value: this.value } });\n /** What this component hands its content. */\n readonly provided = this.#core.provided;\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles('radio', radioScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/radio/src/templates/radio-group.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n","// GENERATED from the radio manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsRadioComponent } from './radio.component.generated';\nexport { BsRadioGroupComponent } from './radio-group.component.generated';\n","import { booleanAttribute, computed, Directive, inject, input, model } from '@angular/core';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { coreContextToken } from '@mintplayer/ng-bootstrap/machine';\nimport { RADIO_GROUP, radioGroupName, type RadioGroupContext } from '@mintplayer/ui-core/radio';\nimport { BsRadioGroupValueAccessor } from '../../radio-group.accessor';\n\n/**\n * The attribute form of a radio group (Angular only, #458 M3): put it on a host\n * you already have (a `<tbody>` whose rows each hold a radio, a `<div>` in a table\n * cell, a `<bs-button-group>`). The `<bs-radio>` descendants take its `name` and\n * selection through DI, so the nearest group wins: a radio list in a cell is its\n * own group, and the row selection around it is another. Bind `[formControl]` /\n * `[(ngModel)]` / `[(value)]` on the same element.\n *\n * It adds no role: the host keeps its own (a `rowgroup`, a `group`). Use\n * `<bs-radio-group>` where the set needs `role=\"radiogroup\"`.\n */\n@Directive({\n selector: '[bsRadioGroup]',\n exportAs: 'bsRadioGroup',\n hostDirectives: [BsRadioGroupValueAccessor],\n providers: [{ provide: coreContextToken(RADIO_GROUP), useFactory: () => inject(BsRadioGroupDirective).provided }],\n host: {\n // RADIO_GROUP_ATTR, literal for the AOT compiler: the radios find their group by it.\n '[attr.data-radio-group]': \"''\",\n '[attr.aria-required]': \"required() ? 'true' : null\",\n '[attr.aria-disabled]': \"disabled() ? 'true' : null\",\n },\n})\nexport class BsRadioGroupDirective {\n private readonly accessor = inject(BsRadioGroupValueAccessor, { self: true });\n private readonly id = inject(BsIdService).next('bs-radio-group');\n\n /** The radios' shared name; generated when omitted, so native grouping always forms. */\n readonly name = input<string | null>(null);\n /** Marks the set required: `aria-required` on the host and `required` on every radio. */\n readonly required = input(false, { transform: booleanAttribute });\n /** The selected radio's value, when no form control is bound. */\n readonly value = model<string | null>(null);\n\n readonly disabled = computed(() => this.accessor.disabled());\n\n /** What the radios read. */\n readonly provided = computed<RadioGroupContext>(() => ({\n grouped: true,\n name: this.name() ?? radioGroupName(this.id),\n value: this.accessor.bound() ? this.accessor.viewValue() : this.value(),\n disabled: this.disabled(),\n required: this.required(),\n }));\n\n constructor() {\n // Keep [(value)] honest: a pick writes back.\n this.accessor.onPick = (value) => this.value.set(value);\n }\n}\n","// Generated from @mintplayer/ui-core/radio (#458 M3, D10): bs-radio, bs-radio-group.\nexport * from './generated';\nexport * from './directives';\nexport { BsRadioGroupValueAccessor } from './radio-group.accessor';\n","/**\n * Generated bundle index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cAAc;oBACxB,cAAc,EAAE,CAAC,yBAAyB,CAAC;oBAC3C,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,MAAM,MAAM,uBAAuB,CAAC,QAAQ,EAAE,CAAC;AACjH,oBAAA,IAAI,EAAE;;AAEJ,wBAAA,yBAAyB,EAAE,IAAI;AAC/B,wBAAA,sBAAsB,EAAE,4BAA4B;AACpD,wBAAA,sBAAsB,EAAE,4BAA4B;AACrD,qBAAA;AACF,iBAAA;;;AC5BD;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-radio.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/radio/src/radio.angular.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/generated/radio.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/generated/radio.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/radio/src/radio-group.accessor.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/radio-group.angular.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/generated/radio-group.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/generated/radio-group.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/radio/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/directives/radio-group/radio-group.directive.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/radio/mintplayer-ng-bootstrap-radio.ts"],"sourcesContent":["import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';\nimport type { RadioInputs } from '@mintplayer/ui-core/radio';\n\n/*\n * The Angular extension of the generated `bs-radio` (#458 D10 escape hatch): a\n * form control's validity reaches the radio's ARIA and its message.\n */\n\nexport const hostDirectives = [{ directive: BsControlValidityDirective, inputs: ['errorMessages'] }];\n\nexport function extendInputs(inputs: () => RadioInputs): () => RadioInputs {\n const validity = inject(BsControlValidityDirective, { self: true });\n return computed<RadioInputs>(() => {\n const value = inputs();\n return {\n ...value,\n invalid: value.invalid || validity.invalid(),\n required: value.required || validity.required(),\n errorText: value.errorText ?? validity.errorText(),\n };\n });\n}\n","// GENERATED from the radio manifest (radio) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model } from '@angular/core';\nimport { MpPropsDirective, useCore, useHostAttrs, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { radioCore, type RadioInputs, radioScopedStyles } from '@mintplayer/ui-core/radio';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../radio.angular';\n\n/**\n * A native `<input type=radio>` in Bootstrap's `.form-check` or `.btn-check` markup (#458).\n *\n * Inside a radio group it takes the group's `name` and selection, so the browser supplies\n * one-of-N, the single tab stop and arrow-key selection, with JavaScript off as well. An\n * `aria-label` on the component, or `inputLabel`, names the input.\n */\n@Component({\n selector: 'bs-radio',\n templateUrl: './radio.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsRadioComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */\n protected readonly hostAttrs = useHostAttrs();\n\n readonly type = input<RadioInputs['type']>('radio');\n readonly color = input<RadioInputs['color']>('secondary');\n readonly inline = input<RadioInputs['inline'], unknown>(false, { transform: booleanAttribute });\n readonly value = input<RadioInputs['value']>(null);\n readonly checked = model<RadioInputs['checked']>(false);\n readonly name = input<RadioInputs['name']>(null);\n readonly disabled = input<RadioInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<RadioInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<RadioInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<RadioInputs['errorText']>(null);\n readonly inputLabel = input<RadioInputs['inputLabel']>(null);\n\n readonly #core = useCore(radioCore, { inputs: ext_extendInputs(() => ({ type: this.type(), color: this.color(), inline: this.inline(), value: this.value(), checked: this.checked(), name: this.name(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), inputLabel: this.inputLabel() })), idPrefix: 'bs-radio', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'radio' }), models: {checked: this.checked } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles('radio', radioScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/radio/src/templates/radio.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"radio\" [mpProps]=\"p_view.input\" [checked]=\"p_view.checked\" [mpHostAttrs]=\"hostAttrs\">\n<label data-mps=\"radio\" [mpProps]=\"p_view.label\">\n <ng-content />\n</label>\n@if (p_view.feedback) {\n <div data-mps=\"radio\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","import { afterNextRender, Directive, ElementRef, forwardRef, inject, PLATFORM_ID, signal } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { preHydrationChoice } from '@mintplayer/ui-core/forms';\nimport { ownsRadio } from '@mintplayer/ui-core/radio';\n\n/**\n * The `ControlValueAccessor` of a radio group, shared by the generated\n * `bs-radio-group` and the attribute form `[bsRadioGroup]` (a host directive of\n * both). The value is the picked radio's `value`. It reacts only to the radios\n * of its own group: a radio list nested in a table cell is its own group and\n * never changes this one (`ownsRadio`).\n */\n@Directive({\n // Applied as a host directive only.\n selector: '[bsRadioGroupAccessor]',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRadioGroupValueAccessor), multi: true }],\n host: {\n // A native radio's change bubbles to the group's element.\n '(change)': 'onNativeChange($event)',\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsRadioGroupValueAccessor implements ControlValueAccessor {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** A form control is bound: its value drives the group, over the group's own `value`. */\n readonly bound = signal(false);\n /** The selection as the form control or the user last set it. */\n readonly viewValue = signal<string | null>(null);\n readonly disabled = signal(false);\n\n private onChange: (value: string | null) => void = () => undefined;\n onTouched: () => void = () => undefined;\n /** The owner's own write-back of a pick (`[(value)]`), next to the form control's. */\n onPick: (value: string) => void = () => undefined;\n\n constructor() {\n this.adoptPreHydrationChoice();\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n writeValue(value: string | null): void {\n this.viewValue.set(value ?? null);\n }\n\n onNativeChange(event: Event): void {\n if (ownsRadio(this.host, event.target)) this.select(event.target.value);\n }\n\n private select(value: string): void {\n this.viewValue.set(value);\n this.onChange(value);\n this.onPick(value);\n }\n\n /**\n * A radio picked in the server-rendered page before hydration would be reverted\n * by the `checked` bindings. Read it while the host holds the server DOM, and\n * replay it as the user's pick once the form directives have written their\n * initial value (ngModel writes in a microtask after the first render) and the\n * group's core has attached: a real `change`, so every listener (this accessor,\n * the core and its model) takes the one path a live pick takes.\n */\n private adoptPreHydrationChoice(): void {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const picked = preHydrationChoice(this.host);\n if (picked === null) return;\n afterNextRender(() =>\n queueMicrotask(() => {\n const radio = [...this.host.querySelectorAll<HTMLInputElement>('input[type=radio]')]\n .find((input) => input.value === picked && ownsRadio(this.host, input));\n if (!radio) return;\n radio.checked = true;\n radio.dispatchEvent(new Event('change', { bubbles: true }));\n }),\n );\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { RadioGroupInputs } from '@mintplayer/ui-core/radio';\nimport { BsRadioGroupValueAccessor } from './radio-group.accessor';\n\n/*\n * The Angular extension of the generated `bs-radio-group` (#458 D10 escape\n * hatch): Angular forms. A bound form control\n * drives the selection, and a disabled control disables the group.\n */\n\nexport const hostDirectives = [BsRadioGroupValueAccessor];\n\nexport function extendInputs(inputs: () => RadioGroupInputs): () => RadioGroupInputs {\n const accessor = inject(BsRadioGroupValueAccessor, { self: true });\n return computed<RadioGroupInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the radio manifest (radio-group) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model } from '@angular/core';\nimport { provideCoreContext, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { RADIO_GROUP, radioGroupCore, type RadioGroupInputs, radioScopedStyles } from '@mintplayer/ui-core/radio';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../radio-group.angular';\n\n/**\n * A `role=radiogroup` element around radios (#458). It hands them one `name`, so they are native\n * radios of one set. `value` is two-way. Name it with `aria-label` / `aria-labelledby`. A radio\n * list nested inside (a table cell) is its own group: each group reacts only to its own radios.\n */\n@Component({\n selector: 'bs-radio-group',\n templateUrl: './radio-group.view.generated.html',\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [provideCoreContext(RADIO_GROUP, BsRadioGroupComponent)],\n hostDirectives: ext_hostDirectives,\n})\nexport class BsRadioGroupComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly name = input<RadioGroupInputs['name']>(null);\n readonly value = model<RadioGroupInputs['value']>(null);\n readonly disabled = input<RadioGroupInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<RadioGroupInputs['required'], unknown>(false, { transform: booleanAttribute });\n\n readonly #core = useCore(radioGroupCore, { inputs: ext_extendInputs(() => ({ name: this.name(), value: this.value(), disabled: this.disabled(), required: this.required() })), idPrefix: 'bs-radio-group', hostBag: (props) => ({ ...props.root, 'data-mps': 'radio' }), models: {value: this.value } });\n /** What this component hands its content. */\n readonly provided = this.#core.provided;\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles('radio', radioScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/radio/src/templates/radio-group.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n","// GENERATED from the radio manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsRadioComponent } from './radio.component.generated';\nexport { BsRadioGroupComponent } from './radio-group.component.generated';\n","import { booleanAttribute, computed, Directive, inject, input, model } from '@angular/core';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { coreContextToken } from '@mintplayer/ng-bootstrap/machine';\nimport { RADIO_GROUP, radioGroupName, type RadioGroupContext } from '@mintplayer/ui-core/radio';\nimport { BsRadioGroupValueAccessor } from '../../radio-group.accessor';\n\n/**\n * The attribute form of a radio group (Angular only, #458 M3): put it on a host\n * you already have (a `<tbody>` whose rows each hold a radio, a `<div>` in a table\n * cell, a `<bs-button-group>`). The `<bs-radio>` descendants take its `name` and\n * selection through DI, so the nearest group wins: a radio list in a cell is its\n * own group, and the row selection around it is another. Bind `[formControl]` /\n * `[(ngModel)]` / `[(value)]` on the same element.\n *\n * It adds no role: the host keeps its own (a `rowgroup`, a `group`). Use\n * `<bs-radio-group>` where the set needs `role=\"radiogroup\"`.\n */\n@Directive({\n selector: '[bsRadioGroup]',\n exportAs: 'bsRadioGroup',\n hostDirectives: [BsRadioGroupValueAccessor],\n providers: [{ provide: coreContextToken(RADIO_GROUP), useFactory: () => inject(BsRadioGroupDirective).provided }],\n host: {\n // RADIO_GROUP_ATTR, literal for the AOT compiler: the radios find their group by it.\n '[attr.data-radio-group]': \"''\",\n '[attr.aria-required]': \"required() ? 'true' : null\",\n '[attr.aria-disabled]': \"disabled() ? 'true' : null\",\n },\n})\nexport class BsRadioGroupDirective {\n private readonly accessor = inject(BsRadioGroupValueAccessor, { self: true });\n private readonly id = inject(BsIdService).next('bs-radio-group');\n\n /** The radios' shared name; generated when omitted, so native grouping always forms. */\n readonly name = input<string | null>(null);\n /** Marks the set required: `aria-required` on the host and `required` on every radio. */\n readonly required = input(false, { transform: booleanAttribute });\n /** The selected radio's value, when no form control is bound. */\n readonly value = model<string | null>(null);\n\n readonly disabled = computed(() => this.accessor.disabled());\n\n /** What the radios read. */\n readonly provided = computed<RadioGroupContext>(() => ({\n grouped: true,\n name: this.name() ?? radioGroupName(this.id),\n value: this.accessor.bound() ? this.accessor.viewValue() : this.value(),\n disabled: this.disabled(),\n required: this.required(),\n }));\n\n constructor() {\n // Keep [(value)] honest: a pick writes back.\n this.accessor.onPick = (value) => this.value.set(value);\n }\n}\n","// Generated from @mintplayer/ui-core/radio (#458 M3, D10): bs-radio, bs-radio-group.\nexport * from './generated';\nexport * from './directives';\nexport { BsRadioGroupValueAccessor } from './radio-group.accessor';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["hostDirectives","extendInputs","ext_extendInputs","ext_hostDirectives","i1.BsRadioGroupValueAccessor"],"mappings":";;;;;;;;;;;;AAIA;;;AAGG;AAEI,MAAMA,gBAAc,GAAG,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC;AAE9F,SAAUC,cAAY,CAAC,MAAyB,EAAA;AACpD,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,0BAA0B,EAAE,EAAE,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;AC5BD;;ACAA;;AAEG;;;;"}
|
|
@@ -92,9 +92,9 @@ class BsRangeComponent {
|
|
|
92
92
|
this.hostAttrs = useHostAttrs();
|
|
93
93
|
this.value = model(0, /* @ts-ignore */
|
|
94
94
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
95
|
-
this.min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
96
|
-
this.max = input(10, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
97
|
-
this.step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
95
|
+
this.min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: (v) => (v == null || v === '' ? 0 : numberAttribute(v)) });
|
|
96
|
+
this.max = input(10, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: (v) => (v == null || v === '' ? 10 : numberAttribute(v)) });
|
|
97
|
+
this.step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: (v) => (v == null || v === '' ? 1 : numberAttribute(v)) });
|
|
98
98
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
99
99
|
this.label = input(null, /* @ts-ignore */
|
|
100
100
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-range.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/range/src/range.accessor.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/range.angular.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/generated/range.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/generated/range.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/range/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/range/mintplayer-ng-bootstrap-range.ts"],"sourcesContent":["import { Directive, ElementRef, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * The `ControlValueAccessor` of `bs-range` (a host directive of the generated\n * component). The value is the slider's number.\n */\n@Directive({\n // Applied as a host directive only.\n selector: '[bsRangeAccessor]',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRangeValueAccessor), multi: true }],\n host: {\n // The native input's input and blur events bubble to the host.\n '(input)': 'onNativeInput($event)',\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsRangeValueAccessor implements ControlValueAccessor {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** A form control is bound: its value drives the slider, over the `value` input. */\n readonly bound = signal(false);\n /** The value as the form control or the user last set it. */\n readonly viewValue = signal(0);\n readonly disabled = signal(false);\n\n private onChange: (value: number) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n registerOnChange(fn: (value: number) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n writeValue(value: number | null): void {\n this.viewValue.set(typeof value === 'number' && !Number.isNaN(value) ? value : 0);\n }\n\n onNativeInput(event: Event): void {\n const target = event.target;\n if (!(target instanceof HTMLInputElement) || target.type !== 'range' || !this.host.contains(target)) return;\n const value = parseFloat(target.value);\n if (Number.isNaN(value)) return;\n this.viewValue.set(value);\n this.onChange(value);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { RangeInputs } from '@mintplayer/ui-core/range';\nimport { BsRangeValueAccessor } from './range.accessor';\n\n/*\n * The Angular extension of the generated `bs-range` (#458 D10 escape hatch):\n * Angular forms. A bound form control drives the value, and a disabled\n * control disables the slider.\n */\n\nexport const hostDirectives = [BsRangeValueAccessor];\n\nexport function extendInputs(inputs: () => RangeInputs): () => RangeInputs {\n const accessor = inject(BsRangeValueAccessor, { self: true });\n return computed<RangeInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the range manifest (range) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, numberAttribute } from '@angular/core';\nimport { MpPropsDirective, useCore, useHostAttrs, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { rangeCore, type RangeInputs, rangeScopedStyles } from '@mintplayer/ui-core/range';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../range.angular';\n\n/** Bootstrap's `.form-range`: a native slider from `min` to `max` in `step`s. `value` is two-way; `label` names it when no `<label for>` does. */\n@Component({\n selector: 'bs-range',\n templateUrl: './range.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsRangeComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */\n protected readonly hostAttrs = useHostAttrs();\n\n readonly value = model<RangeInputs['value']>(0);\n readonly min = input<RangeInputs['min'], unknown>(0, { transform: (v: unknown) => numberAttribute(v) as RangeInputs['min'] });\n readonly max = input<RangeInputs['max'], unknown>(10, { transform: (v: unknown) => numberAttribute(v) as RangeInputs['max'] });\n readonly step = input<RangeInputs['step'], unknown>(1, { transform: (v: unknown) => numberAttribute(v) as RangeInputs['step'] });\n readonly disabled = input<RangeInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly label = input<RangeInputs['label']>(null);\n\n readonly #core = useCore(rangeCore, { inputs: ext_extendInputs(() => ({ value: this.value(), min: this.min(), max: this.max(), step: this.step(), disabled: this.disabled(), label: this.label() })), idPrefix: 'bs-range', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'range' }), models: { value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles('range', rangeScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/range/src/templates/range.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"range\" [mpProps]=\"p_view.input\" [value]=\"p_view.value\" [mpHostAttrs]=\"hostAttrs\">\n","// GENERATED from the range manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsRangeComponent } from './range.component.generated';\n","// Generated from @mintplayer/ui-core/range (#458 D10), plus the Angular forms accessor.\nexport * from './generated';\nexport { BsRangeValueAccessor } from './range.accessor';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsRangeValueAccessor","ext_hostDirectives"],"mappings":";;;;;;;AAGA;;;AAGG;MAWU,oBAAoB,CAAA;AAVjC,IAAA,WAAA,GAAA;AAWmB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;;QAGxE,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;;QAErB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,CAAC;sFAAC;QACrB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAA4B,MAAM,SAAS;AAC3D,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AA2BxC,IAAA;AAzBC,IAAA,gBAAgB,CAAC,EAA2B,EAAA;AAC1C,QAAA,IAAI,CAAC,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AAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAC,oBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECf7B,kRAGA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDQY,gBAAgB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIf,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;+BACE,UAAU,EAAA,OAAA,EAEX,CAAC,gBAAgB,CAAC,mBACV,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,kRAAA,EAAA;;;AEbpC;;ACAA;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-range.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/range/src/range.accessor.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/range.angular.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/generated/range.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/generated/range.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/range/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/range/mintplayer-ng-bootstrap-range.ts"],"sourcesContent":["import { Directive, ElementRef, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * The `ControlValueAccessor` of `bs-range` (a host directive of the generated\n * component). The value is the slider's number.\n */\n@Directive({\n // Applied as a host directive only.\n selector: '[bsRangeAccessor]',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRangeValueAccessor), multi: true }],\n host: {\n // The native input's input and blur events bubble to the host.\n '(input)': 'onNativeInput($event)',\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsRangeValueAccessor implements ControlValueAccessor {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** A form control is bound: its value drives the slider, over the `value` input. */\n readonly bound = signal(false);\n /** The value as the form control or the user last set it. */\n readonly viewValue = signal(0);\n readonly disabled = signal(false);\n\n private onChange: (value: number) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n registerOnChange(fn: (value: number) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n writeValue(value: number | null): void {\n this.viewValue.set(typeof value === 'number' && !Number.isNaN(value) ? value : 0);\n }\n\n onNativeInput(event: Event): void {\n const target = event.target;\n if (!(target instanceof HTMLInputElement) || target.type !== 'range' || !this.host.contains(target)) return;\n const value = parseFloat(target.value);\n if (Number.isNaN(value)) return;\n this.viewValue.set(value);\n this.onChange(value);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { RangeInputs } from '@mintplayer/ui-core/range';\nimport { BsRangeValueAccessor } from './range.accessor';\n\n/*\n * The Angular extension of the generated `bs-range` (#458 D10 escape hatch):\n * Angular forms. A bound form control drives the value, and a disabled\n * control disables the slider.\n */\n\nexport const hostDirectives = [BsRangeValueAccessor];\n\nexport function extendInputs(inputs: () => RangeInputs): () => RangeInputs {\n const accessor = inject(BsRangeValueAccessor, { self: true });\n return computed<RangeInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the range manifest (range) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, numberAttribute } from '@angular/core';\nimport { MpPropsDirective, useCore, useHostAttrs, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { rangeCore, type RangeInputs, rangeScopedStyles } from '@mintplayer/ui-core/range';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../range.angular';\n\n/** Bootstrap's `.form-range`: a native slider from `min` to `max` in `step`s. `value` is two-way; `label` names it when no `<label for>` does. */\n@Component({\n selector: 'bs-range',\n templateUrl: './range.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsRangeComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */\n protected readonly hostAttrs = useHostAttrs();\n\n readonly value = model<RangeInputs['value']>(0);\n readonly min = input<RangeInputs['min'], unknown>(0, { transform: (v: unknown) => (v == null || v === '' ? 0 : numberAttribute(v)) as RangeInputs['min'] });\n readonly max = input<RangeInputs['max'], unknown>(10, { transform: (v: unknown) => (v == null || v === '' ? 10 : numberAttribute(v)) as RangeInputs['max'] });\n readonly step = input<RangeInputs['step'], unknown>(1, { transform: (v: unknown) => (v == null || v === '' ? 1 : numberAttribute(v)) as RangeInputs['step'] });\n readonly disabled = input<RangeInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly label = input<RangeInputs['label']>(null);\n\n readonly #core = useCore(rangeCore, { inputs: ext_extendInputs(() => ({ value: this.value(), min: this.min(), max: this.max(), step: this.step(), disabled: this.disabled(), label: this.label() })), idPrefix: 'bs-range', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'range' }), models: {value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles('range', rangeScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/range/src/templates/range.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"range\" [mpProps]=\"p_view.input\" [value]=\"p_view.value\" [mpHostAttrs]=\"hostAttrs\">\n","// GENERATED from the range manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsRangeComponent } from './range.component.generated';\n","// Generated from @mintplayer/ui-core/range (#458 D10), plus the Angular forms accessor.\nexport * from './generated';\nexport { BsRangeValueAccessor } from './range.accessor';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsRangeValueAccessor","ext_hostDirectives"],"mappings":";;;;;;;AAGA;;;AAGG;MAWU,oBAAoB,CAAA;AAVjC,IAAA,WAAA,GAAA;AAWmB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;;QAGxE,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;;QAErB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,CAAC;sFAAC;QACrB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAA4B,MAAM,SAAS;AAC3D,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AA2BxC,IAAA;AAzBC,IAAA,gBAAgB,CAAC,EAA2B,EAAA;AAC1C,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;AACpB,QAAA,IAAI,C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A,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAC,oBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECf7B,kRAGA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDQY,gBAAgB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIf,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;+BACE,UAAU,EAAA,OAAA,EAEX,CAAC,gBAAgB,CAAC,mBACV,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,kRAAA,EAAA;;;AEbpC;;ACAA;;ACAA;;AAEG;;;;"}
|
|
@@ -87,7 +87,7 @@ class BsRatingComponent {
|
|
|
87
87
|
this.elementRef = inject(ElementRef);
|
|
88
88
|
this.value = model(0, /* @ts-ignore */
|
|
89
89
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
90
|
-
this.maximum = input(5, { ...(ngDevMode ? { debugName: "maximum" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
90
|
+
this.maximum = input(5, { ...(ngDevMode ? { debugName: "maximum" } : /* istanbul ignore next */ {}), transform: (v) => (v == null || v === '' ? 5 : numberAttribute(v)) });
|
|
91
91
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
92
92
|
/** The radios' form name; null derives one from the id. */
|
|
93
93
|
this.name = input(null, /* @ts-ignore */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-rating.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/rating/src/rating.accessor.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/rating.angular.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/generated/rating.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/generated/rating.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/rating/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/rating/mintplayer-ng-bootstrap-rating.ts"],"sourcesContent":["import { Directive, ElementRef, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { RATING_VALUE_ATTR } from '@mintplayer/ui-core/rating';\n\n/**\n * The `ControlValueAccessor` of `bs-rating` (a host directive of the generated\n * component). The value is the picked star, 0 for none.\n */\n@Directive({\n // Applied as a host directive only.\n selector: '[bsRatingAccessor]',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRatingValueAccessor), multi: true }],\n host: {\n // The radios' change and blur events bubble to the host.\n '(change)': 'onNativeChange($event)',\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsRatingValueAccessor implements ControlValueAccessor {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** A form control is bound: its value drives the stars, over the `value` input. */\n readonly bound = signal(false);\n /** The value as the form control or the user last set it. */\n readonly viewValue = signal(0);\n readonly disabled = signal(false);\n\n private onChange: (value: number) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n registerOnChange(fn: (value: number) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n writeValue(value: number | null): void {\n this.viewValue.set(typeof value === 'number' && !Number.isNaN(value) ? value : 0);\n }\n\n onNativeChange(event: Event): void {\n const target = event.target;\n if (!(target instanceof HTMLInputElement) || !target.hasAttribute(RATING_VALUE_ATTR) || !this.host.contains(target)) return;\n const value = Number(target.value);\n this.viewValue.set(value);\n this.onChange(value);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { RatingInputs } from '@mintplayer/ui-core/rating';\nimport { BsRatingValueAccessor } from './rating.accessor';\n\n/*\n * The Angular extension of the generated `bs-rating` (#458 D10 escape hatch):\n * Angular forms. A bound form control drives the value, and a disabled\n * control disables the stars.\n */\n\nexport const hostDirectives = [BsRatingValueAccessor];\n\nexport function extendInputs(inputs: () => RatingInputs): () => RatingInputs {\n const accessor = inject(BsRatingValueAccessor, { self: true });\n return computed<RatingInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the rating manifest (rating) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { ratingCore, type RatingInputs, ratingScopedStyles } from '@mintplayer/ui-core/rating';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../rating.angular';\n\n/** A star rating as native radios in a radiogroup: `value` (two-way, 0 for none) out of `maximum`. Works without JavaScript. */\n@Component({\n selector: 'bs-rating',\n templateUrl: './rating.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsRatingComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = model<RatingInputs['value']>(0);\n readonly maximum = input<RatingInputs['maximum'], unknown>(5, { transform: (v: unknown) => numberAttribute(v) as RatingInputs['maximum'] });\n readonly disabled = input<RatingInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n /** The radios' form name; null derives one from the id. */\n readonly name = input<RatingInputs['name']>(null);\n /** Names the radiogroup; a consumer `aria-label` wins. */\n readonly label = input<RatingInputs['label']>('Rating');\n /** Each star's accessible name, as a formatter (word order differs across languages). */\n readonly starLabel = input<RatingInputs['starLabel']>((star: number, maximum: number) => `Rate ${star} out of ${maximum} stars`);\n /** The star under the pointer; null when it leaves. */\n readonly previewChange = output<number | null>();\n\n readonly #core = useCore(ratingCore, { inputs: ext_extendInputs(() => ({ value: this.value(), maximum: this.maximum(), disabled: this.disabled(), name: this.name(), label: this.label(), starLabel: this.starLabel() })), idPrefix: 'bs-rating', outputs: { previewChange: this.previewChange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'rating' }), models: { value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('rating', ratingScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/rating/src/templates/rating.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@for (star of p_view.stars; track star.key) {\n <label data-mps=\"rating\" [mpProps]=\"star.star\">\n <input data-mps=\"rating\" [mpProps]=\"star.input\" [checked]=\"star.checked\">\n <span data-mps=\"rating\" aria-hidden=\"true\">\n ★\n </span>\n </label>\n}\n","// GENERATED from the rating manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsRatingComponent } from './rating.component.generated';\n","// Generated from @mintplayer/ui-core/rating (#458 D10), plus the Angular forms accessor.\nexport * from './generated';\nexport { BsRatingValueAccessor } from './rating.accessor';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsRatingValueAccessor","ext_hostDirectives"],"mappings":";;;;;;AAIA;;;AAGG;MAWU,qBAA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AAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,aAAA,EAAA,eAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAC,qBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECd9B,kcAUA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDAY,gBAAgB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIf,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;+BACE,WAAW,EAAA,OAAA,EAEZ,CAAC,gBAAgB,CAAC,mBACV,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,kcAAA,EAAA;;;AEZpC;;ACAA;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-rating.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/rating/src/rating.accessor.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/rating.angular.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/generated/rating.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/generated/rating.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/rating/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/rating/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/rating/mintplayer-ng-bootstrap-rating.ts"],"sourcesContent":["import { Directive, ElementRef, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { RATING_VALUE_ATTR } from '@mintplayer/ui-core/rating';\n\n/**\n * The `ControlValueAccessor` of `bs-rating` (a host directive of the generated\n * component). The value is the picked star, 0 for none.\n */\n@Directive({\n // Applied as a host directive only.\n selector: '[bsRatingAccessor]',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsRatingValueAccessor), multi: true }],\n host: {\n // The radios' change and blur events bubble to the host.\n '(change)': 'onNativeChange($event)',\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsRatingValueAccessor implements ControlValueAccessor {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** A form control is bound: its value drives the stars, over the `value` input. */\n readonly bound = signal(false);\n /** The value as the form control or the user last set it. */\n readonly viewValue = signal(0);\n readonly disabled = signal(false);\n\n private onChange: (value: number) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n registerOnChange(fn: (value: number) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n writeValue(value: number | null): void {\n this.viewValue.set(typeof value === 'number' && !Number.isNaN(value) ? value : 0);\n }\n\n onNativeChange(event: Event): void {\n const target = event.target;\n if (!(target instanceof HTMLInputElement) || !target.hasAttribute(RATING_VALUE_ATTR) || !this.host.contains(target)) return;\n const value = Number(target.value);\n this.viewValue.set(value);\n this.onChange(value);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { RatingInputs } from '@mintplayer/ui-core/rating';\nimport { BsRatingValueAccessor } from './rating.accessor';\n\n/*\n * The Angular extension of the generated `bs-rating` (#458 D10 escape hatch):\n * Angular forms. A bound form control drives the value, and a disabled\n * control disables the stars.\n */\n\nexport const hostDirectives = [BsRatingValueAccessor];\n\nexport function extendInputs(inputs: () => RatingInputs): () => RatingInputs {\n const accessor = inject(BsRatingValueAccessor, { self: true });\n return computed<RatingInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the rating manifest (rating) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { ratingCore, type RatingInputs, ratingScopedStyles } from '@mintplayer/ui-core/rating';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../rating.angular';\n\n/** A star rating as native radios in a radiogroup: `value` (two-way, 0 for none) out of `maximum`. Works without JavaScript. */\n@Component({\n selector: 'bs-rating',\n templateUrl: './rating.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsRatingComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = model<RatingInputs['value']>(0);\n readonly maximum = input<RatingInputs['maximum'], unknown>(5, { transform: (v: unknown) => (v == null || v === '' ? 5 : numberAttribute(v)) as RatingInputs['maximum'] });\n readonly disabled = input<RatingInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n /** The radios' form name; null derives one from the id. */\n readonly name = input<RatingInputs['name']>(null);\n /** Names the radiogroup; a consumer `aria-label` wins. */\n readonly label = input<RatingInputs['label']>('Rating');\n /** Each star's accessible name, as a formatter (word order differs across languages). */\n readonly starLabel = input<RatingInputs['starLabel']>((star: number, maximum: number) => `Rate ${star} out of ${maximum} stars`);\n /** The star under the pointer; null when it leaves. */\n readonly previewChange = output<number | null>();\n\n readonly #core = useCore(ratingCore, { inputs: ext_extendInputs(() => ({ value: this.value(), maximum: this.maximum(), disabled: this.disabled(), name: this.name(), label: this.label(), starLabel: this.starLabel() })), idPrefix: 'bs-rating', outputs: { previewChange: this.previewChange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'rating' }), models: {value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('rating', ratingScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/rating/src/templates/rating.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@for (star of p_view.stars; track star.key) {\n <label data-mps=\"rating\" [mpProps]=\"star.star\">\n <input data-mps=\"rating\" [mpProps]=\"star.input\" [checked]=\"star.checked\">\n <span data-mps=\"rating\" aria-hidden=\"true\">\n ★\n </span>\n </label>\n}\n","// GENERATED from the rating manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsRatingComponent } from './rating.component.generated';\n","// Generated from @mintplayer/ui-core/rating (#458 D10), plus the Angular forms accessor.\nexport * from './generated';\nexport { BsRatingValueAccessor } from './rating.accessor';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsRatingValueAccessor","ext_hostDirectives"],"mappings":";;;;;;AAIA;;;AAGG;MAWU,qBAAqB,CAAA;AAVlC,IAAA,WAAA,GAAA;AAWmB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;;QAGxE,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;;QAErB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,CAAC;sFAAC;QACrB,IAAA,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iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,aAAA,EAAA,eAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAC,qBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECd9B,kcAUA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDAY,gBAAgB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIf,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;+BACE,WAAW,EAAA,OAAA,EAEZ,CAAC,gBAAgB,CAAC,mBACV,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,kcAAA,EAAA;;;AEZpC;;ACAA;;ACAA;;AAEG;;;;"}
|
|
@@ -155,7 +155,7 @@ class BsRibbonGroupComponent {
|
|
|
155
155
|
this.dialogLauncher = input('', /* @ts-ignore */
|
|
156
156
|
...(ngDevMode ? [{ debugName: "dialogLauncher" }] : /* istanbul ignore next */ []));
|
|
157
157
|
/** Higher collapses later. */
|
|
158
|
-
this.priority = input(0, { ...(ngDevMode ? { debugName: "priority" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
158
|
+
this.priority = input(0, { ...(ngDevMode ? { debugName: "priority" } : /* istanbul ignore next */ {}), transform: (v) => (v == null || v === '' ? 0 : numberAttribute(v)) });
|
|
159
159
|
/** False keeps the group at its size. */
|
|
160
160
|
this.autoScale = input(true, { ...(ngDevMode ? { debugName: "autoScale" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
161
161
|
this.keyTip = input(null, /* @ts-ignore */
|
|
@@ -872,7 +872,7 @@ class BsRibbonGalleryComponent {
|
|
|
872
872
|
/** The KeyTip letter(s); default: allocated from the label. */
|
|
873
873
|
this.keyTip = input(null, /* @ts-ignore */
|
|
874
874
|
...(ngDevMode ? [{ debugName: "keyTip" }] : /* istanbul ignore next */ []));
|
|
875
|
-
this.columns = input(4, { ...(ngDevMode ? { debugName: "columns" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
875
|
+
this.columns = input(4, { ...(ngDevMode ? { debugName: "columns" } : /* istanbul ignore next */ {}), transform: (v) => (v == null || v === '' ? 4 : numberAttribute(v)) });
|
|
876
876
|
this.#core = useCore(ribbonGalleryCore, { inputs: () => ({ itemId: this.itemId(), label: this.label(), icon: this.icon(), size: this.size(), disabled: this.disabled(), tooltip: this.tooltip(), keyTip: this.keyTip(), columns: this.columns() }), idPrefix: 'bs-ribbon-gallery', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'ribbon' }) });
|
|
877
877
|
/** The template's props. */
|
|
878
878
|
this.props = this.#core.props;
|