@mintplayer/ng-bootstrap 22.31.0 → 22.32.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/README.md +12 -11
- package/_bootstrap.scss +2 -4
- package/a11y/forms/package.json +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs +120 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +2 -109
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +12 -5
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +74 -83
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +9 -5
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +9 -2
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +12 -4
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +2 -0
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +6 -2
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs +8 -4
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +7 -2
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +40 -12
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +23 -6
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +16 -4
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +23 -7
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +93 -0
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +43 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +15 -6
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +22 -16
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +22 -7
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +13 -6
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +9 -5
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +2 -0
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +19 -9
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +25 -11
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +14 -4
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +9 -14
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +5 -2
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +23 -8
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +4 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/nav/package.json +4 -0
- package/package.json +11 -8
- package/types/mintplayer-ng-bootstrap-a11y-forms.d.ts +64 -0
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -62
- package/types/mintplayer-ng-bootstrap-alert.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-badge.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -0
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-card.d.ts +14 -3
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-close.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-for.d.ts +5 -5
- package/types/mintplayer-ng-bootstrap-form.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-grid.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +15 -8
- package/types/mintplayer-ng-bootstrap-machine.d.ts +13 -2
- package/types/mintplayer-ng-bootstrap-modal.d.ts +2 -0
- package/types/mintplayer-ng-bootstrap-nav.d.ts +52 -0
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +17 -1
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-phone-input.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +10 -10
- package/types/mintplayer-ng-bootstrap-popover.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +2 -0
- package/types/mintplayer-ng-bootstrap-radio.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-range.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-select.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-spinner.d.ts +14 -7
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +7 -1
- package/types/mintplayer-ng-bootstrap-table.d.ts +2 -6
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-toast.d.ts +2 -0
- package/container/package.json +0 -4
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs +0 -18
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +0 -1
- package/types/mintplayer-ng-bootstrap-container.d.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-progress-bar.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress/progress.component.ts","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress/progress.component.html","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress-bar/progress-bar.component.ts","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress-bar/progress-bar.component.html","../../../../libs/mintplayer-ng-bootstrap/progress-bar/mintplayer-ng-bootstrap-progress-bar.ts"],"sourcesContent":["import { Component, input, ChangeDetectionStrategy} from '@angular/core';\n\n@Component({\n selector: 'bs-progress',\n templateUrl: './progress.component.html',\n styleUrls: ['./progress.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.height.px]': 'height()',\n '[class.d-block]': 'true',\n '[class.overflow-hidden]': 'true',\n },\n})\nexport class BsProgressComponent {\n readonly height = input<number | null>(null);\n readonly isIndeterminate = input(false);\n readonly ariaLabel = input<string>('Loading');\n}\n","<div class=\"progress\">\n @if (isIndeterminate()) {\n <div class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel()\"></div>\n } @else {\n <ng-content></ng-content>\n }\n</div>\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { Color } from '@mintplayer/ng-bootstrap';\n\n@Component({\n selector: 'bs-progress-bar',\n templateUrl: './progress-bar.component.html',\n styleUrls: ['./progress-bar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.progress-bar]': 'true',\n '[class.progress-bar-striped]': 'striped()',\n '[class.progress-bar-animated]': 'animated()',\n '[class]': 'colorClassComputed()',\n '[style.width]': 'width()',\n '[attr.role]': '\"progressbar\"',\n '[attr.aria-valuenow]': 'value()',\n '[attr.aria-valuemin]': 'minimum()',\n '[attr.aria-valuemax]': 'maximum()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-valuetext]': 'valueText()',\n },\n})\nexport class BsProgressBarComponent {\n\n minimum = input<number>(0);\n maximum = input<number>(100);\n value = input<number>(50);\n color = input<Color>(Color.primary);\n striped = input(false);\n animated = input(false);\n /** Accessible name for the progressbar. Override for localisation. */\n ariaLabel = input<string>('Progress');\n /** Human reading of the value ('3 of 5 steps') when the raw number misleads. */\n valueText = input<string | null>(null);\n\n percentage = computed(() => {\n const min = this.minimum();\n const max = this.maximum();\n const val = this.value();\n return (val - min) / (max - min) * 100;\n });\n\n width = computed(() => `${this.percentage()}%`);\n\n colorClassComputed = computed(() => {\n const name = Color[this.color()];\n return `bg-${name}`;\n });\n}\n","","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-progress-bar.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress/progress.component.ts","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress/progress.component.html","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress-bar/progress-bar.component.ts","../../../../libs/mintplayer-ng-bootstrap/progress-bar/src/progress-bar/progress-bar.component.html","../../../../libs/mintplayer-ng-bootstrap/progress-bar/mintplayer-ng-bootstrap-progress-bar.ts"],"sourcesContent":["import { Component, input, ChangeDetectionStrategy} from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapProgress } from '@mintplayer/ui-core/bootstrap/progress';\n\n@Component({\n selector: 'bs-progress',\n templateUrl: './progress.component.html',\n styleUrls: ['./progress.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.height.px]': 'height()',\n '[class.d-block]': 'true',\n '[class.overflow-hidden]': 'true',\n },\n})\nexport class BsProgressComponent {\n constructor() {\n // #452: the progress partial ships with this component, scoped to the elements it stamps (data-mps=\"progress\").\n useBootstrap(bootstrapProgress);\n }\n\n readonly height = input<number | null>(null);\n readonly isIndeterminate = input(false);\n readonly ariaLabel = input<string>('Loading');\n}\n","<div data-mps=\"progress\" class=\"progress\">\n @if (isIndeterminate()) {\n <div data-mps=\"progress\" class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel()\"></div>\n } @else {\n <ng-content></ng-content>\n }\n</div>\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapProgress } from '@mintplayer/ui-core/bootstrap/progress';\nimport { Color } from '@mintplayer/ng-bootstrap';\n\n@Component({\n selector: 'bs-progress-bar',\n templateUrl: './progress-bar.component.html',\n styleUrls: ['./progress-bar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-mps]': '\"progress\"',\n '[class.progress-bar]': 'true',\n '[class.progress-bar-striped]': 'striped()',\n '[class.progress-bar-animated]': 'animated()',\n '[class]': 'colorClassComputed()',\n '[style.width]': 'width()',\n '[attr.role]': '\"progressbar\"',\n '[attr.aria-valuenow]': 'value()',\n '[attr.aria-valuemin]': 'minimum()',\n '[attr.aria-valuemax]': 'maximum()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-valuetext]': 'valueText()',\n },\n})\nexport class BsProgressBarComponent {\n constructor() {\n // #452: the progress partial ships with this component, scoped to the elements it stamps (data-mps=\"progress\").\n useBootstrap(bootstrapProgress);\n }\n\n\n minimum = input<number>(0);\n maximum = input<number>(100);\n value = input<number>(50);\n color = input<Color>(Color.primary);\n striped = input(false);\n animated = input(false);\n /** Accessible name for the progressbar. Override for localisation. */\n ariaLabel = input<string>('Progress');\n /** Human reading of the value ('3 of 5 steps') when the raw number misleads. */\n valueText = input<string | null>(null);\n\n percentage = computed(() => {\n const min = this.minimum();\n const max = this.maximum();\n const val = this.value();\n return (val - min) / (max - min) * 100;\n });\n\n width = computed(() => `${this.percentage()}%`);\n\n colorClassComputed = computed(() => {\n const name = Color[this.color()];\n return `bg-${name}`;\n });\n}\n","","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAea,mBAAmB,CAAA;AAC9B,IAAA,WAAA,GAAA;QAKS,IAAA,CAAA,MAAM,GAAG,KAAK,CAAgB,IAAI;mFAAC;QACnC,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,KAAK;4FAAC;QAC9B,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,SAAS;sFAAC;;QAL3C,YAAY,CAAC,iBAAiB,CAAC;IACjC;8GAJW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,2lBCfhC,4SAOA,EAAA,MAAA,EAAA,CAAA,qPAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDQa,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAX/B,SAAS;AACE,YAAA,IAAA,EA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;;;;"}
|
|
@@ -4,6 +4,8 @@ import { NgTemplateOutlet } from '@angular/common';
|
|
|
4
4
|
import { useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
5
5
|
import { queryBuilderCore, queryBuilderScopedStyles } from '@mintplayer/ui-core/query-builder';
|
|
6
6
|
export { DEFAULT_MESSAGES, DEFAULT_OPERATOR_CATALOG, MaxDepthExceededError, addChild, addEmptyConditionTo, addEmptyGroupTo, addEmptySubqueryTo, changeConditionField, changeConditionOperator, cloneTree, collectDescendantIds, defaultValueFor, emptyCondition, emptyGroup, emptySubquery, findNodeById, mapTree, moveNode, newId, operatorsForType, removeNode, renderExpression, setGroupLogic, updateCondition, validateOperatorOverrides, valueShapeFor, visitTree } from '@mintplayer/ui-core/query-builder';
|
|
7
|
+
import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
|
|
8
|
+
import { bootstrapButtonGroup } from '@mintplayer/ui-core/bootstrap/button-group';
|
|
7
9
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
10
|
|
|
9
11
|
/**
|
|
@@ -162,6 +164,8 @@ class BsQueryBuilderComponent {
|
|
|
162
164
|
this.#core = useCore(queryBuilderCore, { inputs: 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: { queryChange: this.querychange, rootEntityChange: this.rootentitychange, selectedFieldsChange: this.selectedfieldschange, sortByChange: this.sortbychange, 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 } });
|
|
163
165
|
/** The template's props. */
|
|
164
166
|
this.props = this.#core.props;
|
|
167
|
+
useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
|
|
168
|
+
useScopedStyles(bootstrapButtonGroup.key, bootstrapButtonGroup.css, { order: bootstrapButtonGroup.order });
|
|
165
169
|
useScopedStyles('query-builder', queryBuilderScopedStyles);
|
|
166
170
|
}
|
|
167
171
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsQueryBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -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, type Expression, queryBuilderCore, type QueryBuilderInputs, type QueryBuilderNode, queryBuilderScopedStyles, type QueryBuilderView, type SavedQueryNameDetail, type SaveQueryDetail, type SortDescriptor } from '@mintplayer/ui-core/query-builder';\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 } }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsQueryBuilderEditorDirective, ctx: unknown): ctx is { ctx: EditorContext } & { $implicit: { ctx: EditorContext } } {\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 /** The user edited the query. */\n readonly querychange = output<Expression>();\n /** The user picked another entity in the toolbar. */\n readonly rootentitychange = output<string>();\n /** The projected columns changed. */\n readonly selectedfieldschange = output<string[]>();\n /** The sort changed. */\n readonly sortbychange = output<SortDescriptor[]>();\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: { queryChange: this.querychange, rootEntityChange: this.rootentitychange, selectedFieldsChange: this.selectedfieldschange, sortByChange: this.sortbychange, 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('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: { ctx: 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';\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A,EAAA,shTAAA,EAAA;26DAiCS,6BAA6B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtE1E;;ACAA;;ACAA;;AAEG;;;;"}
|
|
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, type Expression, queryBuilderCore, type QueryBuilderInputs, type QueryBuilderNode, queryBuilderScopedStyles, type QueryBuilderView, type SavedQueryNameDetail, type SaveQueryDetail, type SortDescriptor } 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 } }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsQueryBuilderEditorDirective, ctx: unknown): ctx is { ctx: EditorContext } & { $implicit: { ctx: EditorContext } } {\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 /** The user edited the query. */\n readonly querychange = output<Expression>();\n /** The user picked another entity in the toolbar. */\n readonly rootentitychange = output<string>();\n /** The projected columns changed. */\n readonly selectedfieldschange = output<string[]>();\n /** The sort changed. */\n readonly sortbychange = output<SortDescriptor[]>();\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: { queryChange: this.querychange, rootEntityChange: this.rootentitychange, selectedFieldsChange: this.selectedfieldschange, sortByChange: this.sortbychange, 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: { ctx: 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';\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A;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,shTAAA,EAAA;26DAiCS,6BAA6B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExE1E;;ACAA;;ACAA;;AAEG;;;;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, ElementRef, input, computed, signal, PLATFORM_ID, afterNextRender, forwardRef, Directive, model, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { useBootstrap, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
|
|
3
5
|
import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
4
6
|
import { radioGroupName, connectRadioGroup, radioClasses, connectRadio } from '@mintplayer/ui-core/radio';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
7
|
+
import { BsIdService, takeHostAria } from '@mintplayer/ng-bootstrap/a11y';
|
|
8
|
+
import * as i1 from '@mintplayer/ng-bootstrap/a11y/forms';
|
|
9
|
+
import { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';
|
|
8
10
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
11
|
import { preHydrationChoice } from '@mintplayer/ui-core/forms';
|
|
10
12
|
|
|
@@ -177,6 +179,8 @@ class BsRadioComponent {
|
|
|
177
179
|
return { ...bags, input: inputBag, labelFor: bags.labelFor === null ? null : String(inputBag['id']) };
|
|
178
180
|
}, /* @ts-ignore */
|
|
179
181
|
...(ngDevMode ? [{ debugName: "bags" }] : /* istanbul ignore next */ []));
|
|
182
|
+
// #452: the forms partial ships with this component, scoped to the elements it stamps (data-mps="radio").
|
|
183
|
+
useBootstrap(bootstrapForms);
|
|
180
184
|
// Keep `[(isToggled)]` honest in a group, where a sibling's selection unchecks this radio.
|
|
181
185
|
effect(() => {
|
|
182
186
|
if (this.resolvedGroup())
|
|
@@ -193,7 +197,7 @@ class BsRadioComponent {
|
|
|
193
197
|
this.isToggled.set(checked);
|
|
194
198
|
}
|
|
195
199
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
196
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsRadioComponent, isStandalone: true, selector: "bs-radio", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, isToggled: { classPropertyName: "isToggled", publicName: "isToggled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isToggled: "isToggledChange" }, host: { classAttribute: "d-inline-block" }, hostDirectives: [{ directive: i1.BsControlValidityDirective, inputs: ["errorMessages", "errorMessages"] }], ngImport: i0, template: "@if (classes().root; as rootClass) {\n <label [class]=\"rootClass\">\n <input type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <span [class]=\"classes().label\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></span>\n </label>\n} @else {\n <input type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <label [class]=\"classes().label\" [attr.for]=\"bags().labelFor\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></label>\n}\n@if (bags().feedback; as feedback) {\n <div [mpProps]=\"feedback.attrs\">{{ feedback.text }}</div>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
200
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsRadioComponent, isStandalone: true, selector: "bs-radio", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, isToggled: { classPropertyName: "isToggled", publicName: "isToggled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isToggled: "isToggledChange" }, host: { classAttribute: "d-inline-block" }, hostDirectives: [{ directive: i1.BsControlValidityDirective, inputs: ["errorMessages", "errorMessages"] }], ngImport: i0, template: "@if (classes().root; as rootClass) {\n <label data-mps=\"radio\" [class]=\"rootClass\">\n <input data-mps=\"radio\" type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <span data-mps=\"radio\" [class]=\"classes().label\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></span>\n </label>\n} @else {\n <input data-mps=\"radio\" type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <label data-mps=\"radio\" [class]=\"classes().label\" [attr.for]=\"bags().labelFor\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></label>\n}\n@if (bags().feedback; as feedback) {\n <div data-mps=\"radio\" [mpProps]=\"feedback.attrs\">{{ feedback.text }}</div>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
197
201
|
}
|
|
198
202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRadioComponent, decorators: [{
|
|
199
203
|
type: Component,
|
|
@@ -202,7 +206,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
202
206
|
inputs: ['errorMessages'],
|
|
203
207
|
}], selector: 'bs-radio', imports: [MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
204
208
|
'class': 'd-inline-block',
|
|
205
|
-
}, template: "@if (classes().root; as rootClass) {\n <label [class]=\"rootClass\">\n <input type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <span [class]=\"classes().label\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></span>\n </label>\n} @else {\n <input type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <label [class]=\"classes().label\" [attr.for]=\"bags().labelFor\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></label>\n}\n@if (bags().feedback; as feedback) {\n <div [mpProps]=\"feedback.attrs\">{{ feedback.text }}</div>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n" }]
|
|
209
|
+
}, template: "@if (classes().root; as rootClass) {\n <label data-mps=\"radio\" [class]=\"rootClass\">\n <input data-mps=\"radio\" type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <span data-mps=\"radio\" [class]=\"classes().label\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></span>\n </label>\n} @else {\n <input data-mps=\"radio\" type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <label data-mps=\"radio\" [class]=\"classes().label\" [attr.for]=\"bags().labelFor\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></label>\n}\n@if (bags().feedback; as feedback) {\n <div data-mps=\"radio\" [mpProps]=\"feedback.attrs\">{{ feedback.text }}</div>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n" }]
|
|
206
210
|
}], ctorParameters: () => [], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], isToggled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isToggled", required: false }] }, { type: i0.Output, args: ["isToggledChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }] } });
|
|
207
211
|
|
|
208
212
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-radio.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/radio/src/directives/radio-group/radio-group.directive.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/component/radio.component.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/component/radio.component.html","../../../../libs/mintplayer-ng-bootstrap/radio/mintplayer-ng-bootstrap-radio.ts"],"sourcesContent":["import { afterNextRender, computed, Directive, ElementRef, forwardRef, inject, input, PLATFORM_ID, signal } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { connectRadioGroup, radioGroupName } from '@mintplayer/ui-core/radio';\nimport { preHydrationChoice } from '@mintplayer/ui-core/forms';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\n\n/**\n * Groups N `<bs-radio>` descendants into a single-select FormControl whose\n * value is the selected radio's `value()`. Bind `[formControl]` /\n * `[(ngModel)]` on the element carrying it.\n *\n * The group hands its `name` to every radio (generated when none is given),\n * so they are native radios of ONE set in one node tree: the browser supplies\n * exclusivity, the single tab stop, arrow move-and-select and posinset, also\n * with JavaScript off (#437). This directive only carries the value, the\n * disabled state and the touched signal.\n *\n * `<bs-radio-group>` is the element form and takes `role=\"radiogroup\"`; name\n * it with `aria-label` / `aria-labelledby`. On another host (a `<tbody>`, a\n * `<bs-button-group>`) the attribute form adds no role, because the host keeps\n * its own; radios that are not descendants wire in with `[group]=\"g\"`.\n */\n@Directive({\n selector: '[bsRadioGroup], bs-radio-group',\n exportAs: 'bsRadioGroup',\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsRadioGroupDirective),\n multi: true,\n }],\n host: {\n '[attr.role]': 'groupAttrs()[\\'role\\']',\n '[attr.aria-required]': 'groupAttrs()[\"aria-required\"]',\n '[attr.aria-disabled]': 'groupAttrs()[\"aria-disabled\"]',\n '(focusout)': 'onTouched?.()',\n },\n})\nexport class BsRadioGroupDirective implements ControlValueAccessor {\n\n private readonly host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly isElementHost = this.host.localName === 'bs-radio-group';\n private readonly id = inject(BsIdService).next('bs-radio-group');\n\n readonly name = input<string | null>(null);\n /** Marks the set required: `aria-required` on the group and `required` on every radio. */\n readonly required = input<boolean>(false);\n\n /** The radios' shared `name`; one is generated so native grouping always forms. */\n readonly groupName = computed(() => this.name() ?? radioGroupName(this.id));\n\n private readonly selected = signal<string | null>(null);\n readonly value = this.selected.asReadonly();\n\n private readonly formDisabled = signal(false);\n readonly disabled = this.formDisabled.asReadonly();\n\n protected readonly groupAttrs = computed(() => {\n const attrs = connectRadioGroup({ required: this.required(), disabled: this.disabled() });\n return this.isElementHost ? attrs : { ...attrs, role: null };\n });\n\n private onValueChange?: (value: string | null) => void;\n // protected, not private: the focusout host binding compiles outside the\n // class body under AOT and cannot reach a private member.\n protected onTouched?: () => void;\n\n constructor() {\n this.adoptPreHydrationChoice();\n }\n\n /** Called by a radio whose native input became checked. */\n select(value: string | null) {\n this.selected.set(value);\n this.onValueChange?.(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 * report it once the form directives have written their initial value (ngModel\n * writes in a microtask after the first render).\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(() => queueMicrotask(() => this.select(picked)));\n }\n\n registerOnChange(fn: (_: string | null) => void) {\n this.onValueChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn;\n }\n\n writeValue(value: string | null) {\n this.selected.set(value ?? null);\n }\n\n setDisabledState(isDisabled: boolean) {\n this.formDisabled.set(isDisabled);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n connectRadio,\n radioClasses,\n type RadioInputBag,\n type RadioState,\n} from '@mintplayer/ui-core/radio';\nimport type { ToggleButtonColor } from '@mintplayer/ui-core/checkbox';\nimport { BsControlValidityDirective, BsIdService, takeHostAria } from '@mintplayer/ng-bootstrap/a11y';\nimport { MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';\nimport { BsRadioGroupDirective } from '../directives/radio-group/radio-group.directive';\nimport { BsRadioType } from '../types/radio-type';\n\n/**\n * A native `<input type=radio>` in Bootstrap's `.form-check` / `.btn-check`\n * markup, rendered by this component's own template (#437). Inside a\n * `[bsRadioGroup]` it takes the group's `name`, so the browser supplies the\n * one-of-N, the single tab stop and arrow move-and-select, with JavaScript\n * off as well. The consumer's `aria-*` / `id` / `tabindex` on `<bs-radio>`\n * land on the input.\n */\n@Component({\n hostDirectives: [{\n directive: BsControlValidityDirective,\n inputs: ['errorMessages'],\n }],\n selector: 'bs-radio',\n templateUrl: './radio.component.html',\n imports: [MpPropsDirective, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'd-inline-block',\n },\n})\nexport class BsRadioComponent {\n\n private readonly parentGroup = inject(BsRadioGroupDirective, { optional: true, skipSelf: true });\n private readonly validity = inject(BsControlValidityDirective, { self: true });\n private readonly hostAria = takeHostAria(inject(ElementRef).nativeElement);\n private readonly id = inject(BsIdService).next('bs-radio');\n\n type = input<BsRadioType>('radio');\n /** Button colour of a `toggle_button`; ignored by `radio`. */\n color = input<ToggleButtonColor>('secondary');\n isToggled = model<boolean>(false);\n value = input<string | null>(null);\n disabled = input<boolean>(false);\n group = input<BsRadioGroupDirective | null>(null);\n /**\n * The input's accessible name when it has no visible label (a radio in a table\n * row). Host aria-* are read once at creation, so a bound [attr.aria-label]\n * would not follow; this input does.\n */\n inputLabel = input<string | null>(null);\n\n /** Explicit `[group]` input wins over the DI-injected ancestor. */\n readonly resolvedGroup = computed(() => this.group() ?? this.parentGroup ?? null);\n\n /** In a group the selection is the group's value; alone, `isToggled`. */\n readonly checked = computed(() => {\n const group = this.resolvedGroup();\n return group ? group.value() !== null && group.value() === this.value() : this.isToggled();\n });\n\n private readonly state = computed<RadioState>(() => ({\n type: this.type(),\n checked: this.checked(),\n disabled: this.disabled() || !!this.resolvedGroup()?.disabled(),\n required: this.validity.required() || !!this.resolvedGroup()?.required(),\n invalid: this.validity.invalid(),\n // `<bs-radio>` has no `[name]` input: the group owns it.\n name: this.resolvedGroup()?.groupName() ?? null,\n value: this.value(),\n errorText: this.validity.errorText(),\n }));\n\n readonly classes = computed(() => radioClasses(this.type(), this.color(), this.state().invalid));\n\n readonly bags = computed(() => {\n const { 'aria-describedby': describedBy, ...aria } = this.hostAria;\n const bags = connectRadio(this.state(), this.id, describedBy);\n const label = this.inputLabel();\n const inputBag: RadioInputBag = {\n ...bags.input,\n ...aria,\n ...(label === null ? {} : { 'aria-label': label }),\n 'aria-describedby': bags.input['aria-describedby'],\n };\n return { ...bags, input: inputBag, labelFor: bags.labelFor === null ? null : String(inputBag['id']) };\n });\n\n constructor() {\n // Keep `[(isToggled)]` honest in a group, where a sibling's selection unchecks this radio.\n effect(() => {\n if (this.resolvedGroup()) this.isToggled.set(this.checked());\n });\n }\n\n /** A native radio fires `change` only when it becomes checked: by click, Space or an arrow key. */\n onChange(ev: Event) {\n const checked = (ev.target as HTMLInputElement).checked;\n const group = this.resolvedGroup();\n if (group) group.select(this.value());\n else this.isToggled.set(checked);\n }\n\n}\n","@if (classes().root; as rootClass) {\n <label [class]=\"rootClass\">\n <input type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <span [class]=\"classes().label\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></span>\n </label>\n} @else {\n <input type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <label [class]=\"classes().label\" [attr.for]=\"bags().labelFor\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></label>\n}\n@if (bags().feedback; as feedback) {\n <div [mpProps]=\"feedback.attrs\">{{ feedback.text }}</div>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAOA;;;;;;;;;;;;;;;AAeG;MAgBU,qBAAqB,CAAA;AA6BhC,IAAA,WAAA,GAAA;AA3BiB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,aAA4B;QACtD,IAAA,CAAA,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,gBAAgB;QACxD,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;QAEvD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,IAAI;iFAAC;;QAEjC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK;qFAAC;;AAGhC,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;sFAAC;QAE1D,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAgB,IAAI;qFAAC;AAC9C,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;QAE1B,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,KAAK;yFAAC;AACpC,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,CAAC,YAAY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A,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAMjC,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAb5B,SAAS;qCACQ,CAAC;AACf,4BAAA,SAAS,EAAE,0BAA0B;4BACrC,MAAM,EAAE,CAAC,eAAe,CAAC;AAC1B,yBAAA,CAAC,EAAA,QAAA,EACQ,UAAU,EAAA,OAAA,EAEX,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAA,eAAA,EAC5B,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,OAAO,EAAE,gBAAgB;AAC1B,qBAAA,EAAA,QAAA,EAAA,i2BAAA,EAAA;;;AE1CH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-radio.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/radio/src/directives/radio-group/radio-group.directive.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/component/radio.component.ts","../../../../libs/mintplayer-ng-bootstrap/radio/src/component/radio.component.html","../../../../libs/mintplayer-ng-bootstrap/radio/mintplayer-ng-bootstrap-radio.ts"],"sourcesContent":["import { afterNextRender, computed, Directive, ElementRef, forwardRef, inject, input, PLATFORM_ID, signal } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { connectRadioGroup, radioGroupName } from '@mintplayer/ui-core/radio';\nimport { preHydrationChoice } from '@mintplayer/ui-core/forms';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\n\n/**\n * Groups N `<bs-radio>` descendants into a single-select FormControl whose\n * value is the selected radio's `value()`. Bind `[formControl]` /\n * `[(ngModel)]` on the element carrying it.\n *\n * The group hands its `name` to every radio (generated when none is given),\n * so they are native radios of ONE set in one node tree: the browser supplies\n * exclusivity, the single tab stop, arrow move-and-select and posinset, also\n * with JavaScript off (#437). This directive only carries the value, the\n * disabled state and the touched signal.\n *\n * `<bs-radio-group>` is the element form and takes `role=\"radiogroup\"`; name\n * it with `aria-label` / `aria-labelledby`. On another host (a `<tbody>`, a\n * `<bs-button-group>`) the attribute form adds no role, because the host keeps\n * its own; radios that are not descendants wire in with `[group]=\"g\"`.\n */\n@Directive({\n selector: '[bsRadioGroup], bs-radio-group',\n exportAs: 'bsRadioGroup',\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsRadioGroupDirective),\n multi: true,\n }],\n host: {\n '[attr.role]': 'groupAttrs()[\\'role\\']',\n '[attr.aria-required]': 'groupAttrs()[\"aria-required\"]',\n '[attr.aria-disabled]': 'groupAttrs()[\"aria-disabled\"]',\n '(focusout)': 'onTouched?.()',\n },\n})\nexport class BsRadioGroupDirective implements ControlValueAccessor {\n\n private readonly host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly isElementHost = this.host.localName === 'bs-radio-group';\n private readonly id = inject(BsIdService).next('bs-radio-group');\n\n readonly name = input<string | null>(null);\n /** Marks the set required: `aria-required` on the group and `required` on every radio. */\n readonly required = input<boolean>(false);\n\n /** The radios' shared `name`; one is generated so native grouping always forms. */\n readonly groupName = computed(() => this.name() ?? radioGroupName(this.id));\n\n private readonly selected = signal<string | null>(null);\n readonly value = this.selected.asReadonly();\n\n private readonly formDisabled = signal(false);\n readonly disabled = this.formDisabled.asReadonly();\n\n protected readonly groupAttrs = computed(() => {\n const attrs = connectRadioGroup({ required: this.required(), disabled: this.disabled() });\n return this.isElementHost ? attrs : { ...attrs, role: null };\n });\n\n private onValueChange?: (value: string | null) => void;\n // protected, not private: the focusout host binding compiles outside the\n // class body under AOT and cannot reach a private member.\n protected onTouched?: () => void;\n\n constructor() {\n this.adoptPreHydrationChoice();\n }\n\n /** Called by a radio whose native input became checked. */\n select(value: string | null) {\n this.selected.set(value);\n this.onValueChange?.(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 * report it once the form directives have written their initial value (ngModel\n * writes in a microtask after the first render).\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(() => queueMicrotask(() => this.select(picked)));\n }\n\n registerOnChange(fn: (_: string | null) => void) {\n this.onValueChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn;\n }\n\n writeValue(value: string | null) {\n this.selected.set(value ?? null);\n }\n\n setDisabledState(isDisabled: boolean) {\n this.formDisabled.set(isDisabled);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n connectRadio,\n radioClasses,\n type RadioInputBag,\n type RadioState,\n} from '@mintplayer/ui-core/radio';\nimport type { ToggleButtonColor } from '@mintplayer/ui-core/checkbox';\nimport { BsIdService, takeHostAria } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';\nimport { MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';\nimport { BsRadioGroupDirective } from '../directives/radio-group/radio-group.directive';\nimport { BsRadioType } from '../types/radio-type';\n\n/**\n * A native `<input type=radio>` in Bootstrap's `.form-check` / `.btn-check`\n * markup, rendered by this component's own template (#437). Inside a\n * `[bsRadioGroup]` it takes the group's `name`, so the browser supplies the\n * one-of-N, the single tab stop and arrow move-and-select, with JavaScript\n * off as well. The consumer's `aria-*` / `id` / `tabindex` on `<bs-radio>`\n * land on the input.\n */\n@Component({\n hostDirectives: [{\n directive: BsControlValidityDirective,\n inputs: ['errorMessages'],\n }],\n selector: 'bs-radio',\n templateUrl: './radio.component.html',\n imports: [MpPropsDirective, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'd-inline-block',\n },\n})\nexport class BsRadioComponent {\n\n private readonly parentGroup = inject(BsRadioGroupDirective, { optional: true, skipSelf: true });\n private readonly validity = inject(BsControlValidityDirective, { self: true });\n private readonly hostAria = takeHostAria(inject(ElementRef).nativeElement);\n private readonly id = inject(BsIdService).next('bs-radio');\n\n type = input<BsRadioType>('radio');\n /** Button colour of a `toggle_button`; ignored by `radio`. */\n color = input<ToggleButtonColor>('secondary');\n isToggled = model<boolean>(false);\n value = input<string | null>(null);\n disabled = input<boolean>(false);\n group = input<BsRadioGroupDirective | null>(null);\n /**\n * The input's accessible name when it has no visible label (a radio in a table\n * row). Host aria-* are read once at creation, so a bound [attr.aria-label]\n * would not follow; this input does.\n */\n inputLabel = input<string | null>(null);\n\n /** Explicit `[group]` input wins over the DI-injected ancestor. */\n readonly resolvedGroup = computed(() => this.group() ?? this.parentGroup ?? null);\n\n /** In a group the selection is the group's value; alone, `isToggled`. */\n readonly checked = computed(() => {\n const group = this.resolvedGroup();\n return group ? group.value() !== null && group.value() === this.value() : this.isToggled();\n });\n\n private readonly state = computed<RadioState>(() => ({\n type: this.type(),\n checked: this.checked(),\n disabled: this.disabled() || !!this.resolvedGroup()?.disabled(),\n required: this.validity.required() || !!this.resolvedGroup()?.required(),\n invalid: this.validity.invalid(),\n // `<bs-radio>` has no `[name]` input: the group owns it.\n name: this.resolvedGroup()?.groupName() ?? null,\n value: this.value(),\n errorText: this.validity.errorText(),\n }));\n\n readonly classes = computed(() => radioClasses(this.type(), this.color(), this.state().invalid));\n\n readonly bags = computed(() => {\n const { 'aria-describedby': describedBy, ...aria } = this.hostAria;\n const bags = connectRadio(this.state(), this.id, describedBy);\n const label = this.inputLabel();\n const inputBag: RadioInputBag = {\n ...bags.input,\n ...aria,\n ...(label === null ? {} : { 'aria-label': label }),\n 'aria-describedby': bags.input['aria-describedby'],\n };\n return { ...bags, input: inputBag, labelFor: bags.labelFor === null ? null : String(inputBag['id']) };\n });\n\n constructor() {\n // #452: the forms partial ships with this component, scoped to the elements it stamps (data-mps=\"radio\").\n useBootstrap(bootstrapForms);\n // Keep `[(isToggled)]` honest in a group, where a sibling's selection unchecks this radio.\n effect(() => {\n if (this.resolvedGroup()) this.isToggled.set(this.checked());\n });\n }\n\n /** A native radio fires `change` only when it becomes checked: by click, Space or an arrow key. */\n onChange(ev: Event) {\n const checked = (ev.target as HTMLInputElement).checked;\n const group = this.resolvedGroup();\n if (group) group.select(this.value());\n else this.isToggled.set(checked);\n }\n\n}\n","@if (classes().root; as rootClass) {\n <label data-mps=\"radio\" [class]=\"rootClass\">\n <input data-mps=\"radio\" type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <span data-mps=\"radio\" [class]=\"classes().label\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></span>\n </label>\n} @else {\n <input data-mps=\"radio\" type=\"radio\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <label data-mps=\"radio\" [class]=\"classes().label\" [attr.for]=\"bags().labelFor\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></label>\n}\n@if (bags().feedback; as feedback) {\n <div data-mps=\"radio\" [mpProps]=\"feedback.attrs\">{{ feedback.text }}</div>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;AAeG;MAgBU,qBAAqB,CAAA;AA6BhC,IAAA,WAAA,GAAA;AA3BiB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,aAA4B;QACtD,IAAA,CAAA,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,gBAAgB;QACxD,IAAA,CAAA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AA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,eAAA,EAAA,eAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC/C7B,m9BAaA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED4BY,gBAAgB,2EAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAMjC,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAb5B,SAAS;qCACQ,CAAC;AACf,4BAAA,SAAS,EAAE,0BAA0B;4BACrC,MAAM,EAAE,CAAC,eAAe,CAAC;AAC1B,yBAAA,CAAC,EAAA,QAAA,EACQ,UAAU,EAAA,OAAA,EAEX,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAA,eAAA,EAC5B,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,OAAO,EAAE,gBAAgB;AAC1B,qBAAA,EAAA,QAAA,EAAA,m9BAAA,EAAA;;;AE7CH;;AAEG;;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, forwardRef, Directive, viewChild, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { useBootstrap } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
|
|
3
5
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
6
|
|
|
5
7
|
class BsRangeValueAccessor {
|
|
@@ -65,14 +67,16 @@ class BsRangeComponent {
|
|
|
65
67
|
...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
66
68
|
this.ariaLabel = input(null, /* @ts-ignore */
|
|
67
69
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
70
|
+
// #452: the forms partial ships with this component, scoped to the elements it stamps (data-mps="range").
|
|
71
|
+
useBootstrap(bootstrapForms);
|
|
68
72
|
}
|
|
69
73
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
70
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: BsRangeComponent, isStandalone: true, selector: "bs-range", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "slider", first: true, predicate: ["slider"], descendants: true, isSignal: true }], hostDirectives: [{ directive: BsRangeValueAccessor }], ngImport: i0, template: "<input #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" [attr.aria-label]=\"ariaLabel()\" class=\"form-range\">\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: BsRangeComponent, isStandalone: true, selector: "bs-range", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "slider", first: true, predicate: ["slider"], descendants: true, isSignal: true }], hostDirectives: [{ directive: BsRangeValueAccessor }], ngImport: i0, template: "<input data-mps=\"range\" #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" [attr.aria-label]=\"ariaLabel()\" class=\"form-range\">\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
71
75
|
}
|
|
72
76
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRangeComponent, decorators: [{
|
|
73
77
|
type: Component,
|
|
74
|
-
args: [{ selector: 'bs-range', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [BsRangeValueAccessor], template: "<input #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" [attr.aria-label]=\"ariaLabel()\" class=\"form-range\">\n" }]
|
|
75
|
-
}], propDecorators: { slider: [{ type: i0.ViewChild, args: ['slider', { isSignal: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
78
|
+
args: [{ selector: 'bs-range', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [BsRangeValueAccessor], template: "<input data-mps=\"range\" #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" [attr.aria-label]=\"ariaLabel()\" class=\"form-range\">\n" }]
|
|
79
|
+
}], ctorParameters: () => [], propDecorators: { slider: [{ type: i0.ViewChild, args: ['slider', { isSignal: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
76
80
|
|
|
77
81
|
/**
|
|
78
82
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-range.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/range/src/value-accessor/range-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/component/range.component.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/component/range.component.html","../../../../libs/mintplayer-ng-bootstrap/range/mintplayer-ng-bootstrap-range.ts"],"sourcesContent":["import { Directive, forwardRef, inject } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsRangeComponent } from '../component/range.component';\n\n@Directive({\n selector: 'bs-range',\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsRangeValueAccessor),\n multi: true,\n }],\n host: {\n '(input)': 'onInputEvent($event)',\n // focusout is composed: the shadow input's blur reaches the host. The\n // stored onTouched was never CALLED before, which kept every\n // invalid-after-touched mirror dead (audit 4.9 prerequisite).\n '(focusout)': 'onTouched?.()',\n },\n})\nexport class BsRangeValueAccessor implements ControlValueAccessor {\n private host = inject(BsRangeComponent);\n\n onValueChange?: (value: number) => void;\n onTouched?: () => void;\n\n onInputEvent(ev: Event) {\n if (this.onValueChange) {\n const val = parseFloat((<HTMLInputElement>ev.target).value);\n this.onValueChange(val);\n }\n }\n\n //#region ControlValueAccessor implementation\n registerOnChange(fn: (_: any) => void) {\n this.onValueChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn;\n }\n\n writeValue(value?: number) {\n if (typeof value === 'number') {\n this.host.slider().nativeElement.value = value.toString();\n }\n }\n\n setDisabledState(isDisabled: boolean) {\n this.host.slider().nativeElement.disabled = isDisabled;\n }\n //#endregion\n\n}\n","import { Component, ElementRef, input, viewChild, ChangeDetectionStrategy} from '@angular/core';\nimport { BsRangeValueAccessor } from '../value-accessor/range-value-accessor';\n\n@Component({\n selector: 'bs-range',\n templateUrl: './range.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [BsRangeValueAccessor],\n})\nexport class BsRangeComponent {\n readonly slider = viewChild.required<ElementRef<HTMLInputElement>>('slider');\n\n readonly min = input(0);\n readonly max = input(10);\n readonly step = input(1);\n readonly ariaLabel = input<string | null>(null);\n}\n","<input #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" [attr.aria-label]=\"ariaLabel()\" class=\"form-range\">\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-range.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/range/src/value-accessor/range-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/component/range.component.ts","../../../../libs/mintplayer-ng-bootstrap/range/src/component/range.component.html","../../../../libs/mintplayer-ng-bootstrap/range/mintplayer-ng-bootstrap-range.ts"],"sourcesContent":["import { Directive, forwardRef, inject } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsRangeComponent } from '../component/range.component';\n\n@Directive({\n selector: 'bs-range',\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsRangeValueAccessor),\n multi: true,\n }],\n host: {\n '(input)': 'onInputEvent($event)',\n // focusout is composed: the shadow input's blur reaches the host. The\n // stored onTouched was never CALLED before, which kept every\n // invalid-after-touched mirror dead (audit 4.9 prerequisite).\n '(focusout)': 'onTouched?.()',\n },\n})\nexport class BsRangeValueAccessor implements ControlValueAccessor {\n private host = inject(BsRangeComponent);\n\n onValueChange?: (value: number) => void;\n onTouched?: () => void;\n\n onInputEvent(ev: Event) {\n if (this.onValueChange) {\n const val = parseFloat((<HTMLInputElement>ev.target).value);\n this.onValueChange(val);\n }\n }\n\n //#region ControlValueAccessor implementation\n registerOnChange(fn: (_: any) => void) {\n this.onValueChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn;\n }\n\n writeValue(value?: number) {\n if (typeof value === 'number') {\n this.host.slider().nativeElement.value = value.toString();\n }\n }\n\n setDisabledState(isDisabled: boolean) {\n this.host.slider().nativeElement.disabled = isDisabled;\n }\n //#endregion\n\n}\n","import { Component, ElementRef, input, viewChild, ChangeDetectionStrategy} from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { BsRangeValueAccessor } from '../value-accessor/range-value-accessor';\n\n@Component({\n selector: 'bs-range',\n templateUrl: './range.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [BsRangeValueAccessor],\n})\nexport class BsRangeComponent {\n constructor() {\n // #452: the forms partial ships with this component, scoped to the elements it stamps (data-mps=\"range\").\n useBootstrap(bootstrapForms);\n }\n\n readonly slider = viewChild.required<ElementRef<HTMLInputElement>>('slider');\n\n readonly min = input(0);\n readonly max = input(10);\n readonly step = input(1);\n readonly ariaLabel = input<string | null>(null);\n}\n","<input data-mps=\"range\" #slider type=\"range\" [min]=\"min()\" [max]=\"max()\" [step]=\"step()\" [attr.aria-label]=\"ariaLabel()\" class=\"form-range\">\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAmBa,oBAAoB,CAAA;AAfjC,IAAA,WAAA,GAAA;AAgBU,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,gB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B,CAAC,EAAA,QAAA,EAAA,8JAAA,EAAA;8FAQ6B,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,KAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,KAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEjB7E;;AAEG;;;;"}
|
|
@@ -5,6 +5,7 @@ import { useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-boots
|
|
|
5
5
|
import { schedulerCore, schedulerScopedStyles } from '@mintplayer/ui-core/scheduler';
|
|
6
6
|
export { SchedulerStateManager, createInitialState } from '@mintplayer/ui-core/scheduler';
|
|
7
7
|
import { BsDatetimePickerComponent } from '@mintplayer/ng-bootstrap/datetime-picker';
|
|
8
|
+
import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
|
|
8
9
|
export { generateEventId, generateGroupId, generateResourceId } from '@mintplayer/ui-core/scheduler-core';
|
|
9
10
|
|
|
10
11
|
// GENERATED from the scheduler manifest (scheduler) by @mintplayer/nx-component-compiler. Do not edit.
|
|
@@ -170,6 +171,7 @@ class BsSchedulerComponent {
|
|
|
170
171
|
this.#core = useCore(schedulerCore, { inputs: () => ({ events: this.events(), resources: this.resources(), options: this.options(), readonly: this.readonly(), eventEditor: this.eventEditor(), locale: this.locale(), firstDayOfWeek: this.firstDayOfWeek(), slotDuration: this.slotDuration(), timeFormat: this.timeFormat(), view: this.view(), date: this.date(), selectedEvent: this.selectedEvent(), selectedRange: this.selectedRange() }), idPrefix: 'bs-scheduler', outputs: { eventSelected: this.eventselected, eventDblClick: this.eventdblclick, eventCreate: this.eventcreate, eventUpdate: this.eventupdate, eventDelete: this.eventdelete, dateClick: this.dateclick, selectionChanged: this.selectionchanged, resourceCreate: this.resourcecreate, groupCreate: this.groupcreate, resourceUpdate: this.resourceupdate, resourceDelete: this.resourcedelete, viewChange: this.viewchange, dateChange: this.datechange, selectedEventChange: this.selectedeventchange, selectedRangeChange: this.selectedrangechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'scheduler' }), models: { view: this.view, date: this.date, selectedEvent: this.selectedEvent, selectedRange: this.selectedRange } });
|
|
171
172
|
/** The template's props. */
|
|
172
173
|
this.props = this.#core.props;
|
|
174
|
+
useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
|
|
173
175
|
useScopedStyles('scheduler', schedulerScopedStyles);
|
|
174
176
|
}
|
|
175
177
|
/** The next period. */
|