@mintplayer/ng-bootstrap 22.28.0 → 22.30.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.
Files changed (134) hide show
  1. package/_bootstrap.scss +4 -101
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +62 -30
  3. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  4. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -64
  5. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  6. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +50 -46
  7. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +65 -94
  9. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +122 -97
  11. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +80 -133
  13. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -19
  15. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +41 -46
  17. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +76 -37
  19. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  20. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +37 -82
  21. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +1 -1
  23. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +157 -824
  25. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +172 -118
  27. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +180 -142
  29. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +66 -116
  31. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +41 -46
  33. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +80 -204
  35. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +2 -2
  37. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-bootstrap-form.mjs +2 -2
  39. package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +32 -17
  41. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +283 -20
  43. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +98 -129
  45. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
  46. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +144 -265
  47. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  48. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +133 -217
  49. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  50. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +46 -25
  51. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  52. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +166 -93
  53. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  54. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +148 -231
  55. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  56. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +133 -94
  57. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  58. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -2
  59. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  60. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +76 -7
  61. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  62. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +766 -812
  63. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
  64. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +206 -180
  65. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  66. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +202 -141
  67. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  68. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +113 -59
  69. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
  70. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +133 -76
  71. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  72. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +60 -87
  73. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  74. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +86 -83
  75. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  76. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +1 -2
  77. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  78. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +38 -34
  79. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
  80. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +177 -147
  81. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  82. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +200 -94
  83. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  84. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +186 -233
  85. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  86. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +58 -136
  87. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  88. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +22 -16
  89. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  90. package/package.json +11 -9
  91. package/types/mintplayer-ng-bootstrap-a11y.d.ts +40 -21
  92. package/types/mintplayer-ng-bootstrap-accordion.d.ts +36 -33
  93. package/types/mintplayer-ng-bootstrap-calendar.d.ts +39 -16
  94. package/types/mintplayer-ng-bootstrap-card.d.ts +25 -33
  95. package/types/mintplayer-ng-bootstrap-carousel.d.ts +70 -55
  96. package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +65 -45
  97. package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +12 -3
  98. package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +34 -19
  99. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +34 -8
  100. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +32 -59
  101. package/types/mintplayer-ng-bootstrap-datatable.d.ts +222 -422
  102. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +77 -29
  103. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +83 -51
  104. package/types/mintplayer-ng-bootstrap-dock.d.ts +57 -38
  105. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +25 -30
  106. package/types/mintplayer-ng-bootstrap-file-manager.d.ts +61 -81
  107. package/types/mintplayer-ng-bootstrap-input-group.d.ts +17 -12
  108. package/types/mintplayer-ng-bootstrap-machine.d.ts +124 -4
  109. package/types/mintplayer-ng-bootstrap-multi-range.d.ts +53 -27
  110. package/types/mintplayer-ng-bootstrap-navbar.d.ts +88 -164
  111. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +63 -30
  112. package/types/mintplayer-ng-bootstrap-pagination.d.ts +23 -7
  113. package/types/mintplayer-ng-bootstrap-phone-input.d.ts +77 -47
  114. package/types/mintplayer-ng-bootstrap-query-builder.d.ts +95 -98
  115. package/types/mintplayer-ng-bootstrap-radio.d.ts +68 -35
  116. package/types/mintplayer-ng-bootstrap-rating.d.ts +27 -2
  117. package/types/mintplayer-ng-bootstrap-ribbon.d.ts +546 -220
  118. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +82 -197
  119. package/types/mintplayer-ng-bootstrap-select.d.ts +113 -53
  120. package/types/mintplayer-ng-bootstrap-shell.d.ts +59 -33
  121. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +63 -27
  122. package/types/mintplayer-ng-bootstrap-splitter.d.ts +45 -56
  123. package/types/mintplayer-ng-bootstrap-tab-control.d.ts +47 -26
  124. package/types/mintplayer-ng-bootstrap-table.d.ts +1 -2
  125. package/types/mintplayer-ng-bootstrap-theming.d.ts +19 -18
  126. package/types/mintplayer-ng-bootstrap-timeline.d.ts +287 -117
  127. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +100 -27
  128. package/types/mintplayer-ng-bootstrap-tree-select.d.ts +188 -94
  129. package/types/mintplayer-ng-bootstrap-treeview.d.ts +74 -59
  130. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +3 -0
  131. package/src/styles/utilities/cursor.scss +0 -12
  132. package/src/styles/utilities/overflow.scss +0 -12
  133. package/src/styles/utilities/white-space.scss +0 -12
  134. package/src/styles/utilities/width.scss +0 -14
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-machine.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/machine/src/machine-signal.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/props.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/scoped-styles.ts","../../../../libs/mintplayer-ng-bootstrap/machine/mintplayer-ng-bootstrap-machine.ts"],"sourcesContent":["import { DestroyRef, inject, Signal, signal } from '@angular/core';\nimport type { Store } from '@mintplayer/ui-core/store';\n\n/**\n * Bridge a `@mintplayer/ui-core` store into Angular's reactivity: a read-only\n * `Signal` of the store's snapshot, kept current by `subscribe` and released on\n * the injection context's `DestroyRef`.\n *\n * The signal is set synchronously from the store's notification; Angular\n * coalesces the resulting change detection, so a command that commits one\n * snapshot costs one render (measured in `machine-signal.spec.ts`, spike S1).\n */\nexport function machineSignal<S extends object>(store: Store<S>, destroyRef: DestroyRef = inject(DestroyRef)): Signal<S> {\n const state = signal<S>(store.snapshot);\n const unsubscribe = store.subscribe((snapshot) => state.set(snapshot));\n destroyRef.onDestroy(unsubscribe);\n return state.asReadonly();\n}\n","import { Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';\n\n/** An attribute bag as a core's `connect()` returns it. `null`/`undefined`/`false` remove the attribute; `true` sets it empty. */\nexport type PropBag = Record<string, string | number | boolean | null | undefined>;\n\n/**\n * Attribute names a bag may never set. A bag is data the core computed, but a\n * generic setter is still an injection sink, so URL-bearing and script-bearing\n * attributes are refused outright rather than sanitised.\n */\nconst REFUSED = new Set(['href', 'src', 'srcdoc', 'xlink:href', 'style', 'action', 'formaction', 'data']);\n\nfunction isRefused(name: string): boolean {\n return REFUSED.has(name) || name.startsWith('on');\n}\n\n/**\n * Apply a core's attribute bag to the host element — the Angular stand-in for\n * JSX/Lit/Vue attribute spread. The directive diffs the previous and next bag:\n * a key that disappears is *removed* from the DOM (a stale\n * `aria-activedescendant` would otherwise survive a close), and unchanged keys\n * are not rewritten.\n *\n * Attributes are written through `Renderer2`, so they land in the server-\n * rendered HTML and are re-applied identically after hydration (spike S2 in\n * docs/prd/typeahead-wc-436.md). Consumers never see a bag: the front's own\n * template binds `[mpProps]=\"api().input\"` on its own nodes.\n */\n@Directive({ selector: '[mpProps]' })\nexport class MpPropsDirective {\n readonly mpProps = input<PropBag | null | undefined>(null);\n\n private readonly element = inject(ElementRef).nativeElement as Element;\n private readonly renderer = inject(Renderer2);\n private applied: PropBag = {};\n\n constructor() {\n effect(() => this.apply(this.mpProps() ?? {}));\n }\n\n private apply(next: PropBag): void {\n const previous = this.applied;\n Object.keys(previous)\n .filter((name) => !(name in next) || next[name] === null || next[name] === undefined || next[name] === false)\n .forEach((name) => this.renderer.removeAttribute(this.element, name));\n Object.entries(next)\n .filter(([name, value]) => value !== null && value !== undefined && value !== false)\n .filter(([name]) => {\n if (isRefused(name)) {\n throw new Error(`[mpProps] refuses to set \"${name}\"; bind it explicitly in the template.`);\n }\n return true;\n })\n .filter(([name, value]) => !Object.is(previous[name], value))\n .forEach(([name, value]) => this.renderer.setAttribute(this.element, name, value === true ? '' : String(value)));\n this.applied = next;\n }\n}\n","import { DOCUMENT, inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { installLightStyles, writeScopedStyleTag } from '@mintplayer/ui-core/scoped-styles';\n\n/**\n * Install a core's scoped stylesheet from an Angular front. In the browser it\n * goes through the shared registry (`installLightStyles`: once per key,\n * cross-bundle safe). On the server the registry cannot run, so the marker\n * `<style data-mp-light-styles=\"<key>\">` is written straight into the\n * request's `DOCUMENT` head — the client registry then treats it as already\n * installed. No string post-processing of the response is involved.\n *\n * Call from the component's constructor (an injection context).\n */\nexport function useScopedStyles(key: string, cssText: string): void {\n if (isPlatformServer(inject(PLATFORM_ID))) {\n writeScopedStyleTag(inject(DOCUMENT), key, cssText);\n } else {\n installLightStyles(key, cssText);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;;;;;AAQG;AACG,SAAU,aAAa,CAAmB,KAAe,EAAE,UAAA,GAAyB,MAAM,CAAC,UAAU,CAAC,EAAA;AAC1G,IAAA,MAAM,KAAK,GAAG,MAAM,CAAI,KAAK,CAAC,QAAQ;8EAAC;AACvC,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtE,IAAA,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC;AACjC,IAAA,OAAO,KAAK,CAAC,UAAU,EAAE;AAC3B;;ACZA;;;;AAIG;AACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AAEzG,SAAS,SAAS,CAAC,IAAY,EAAA;AAC7B,IAAA,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;AACnD;AAEA;;;;;;;;;;;AAWG;MAEU,gBAAgB,CAAA;AAO3B,IAAA,WAAA,GAAA;QANS,IAAA,CAAA,OAAO,GAAG,KAAK,CAA6B,IAAI;oFAAC;AAEzC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,aAAwB;AACrD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;QACrC,IAAA,CAAA,OAAO,GAAY,EAAE;AAG3B,QAAA,MAAM,CAAC,MAAM,IAAI,CAAC,KAA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KAAK,CAAC,CAAC,CAAC;AAClH,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;IACrB;8GA3BW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,SAAS;mBAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;ACxBpC;;;;;;;;;AASG;AACG,SAAU,eAAe,CAAC,GAAW,EAAE,OAAe,EAAA;IAC1D,IAAI,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE;QACzC,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC;IACrD;SAAO;AACL,QAAA,kBAAkB,CAAC,GAAG,EAAE,OAAO,CAAC;IAClC;AACF;;ACpBA;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-machine.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/machine/src/machine-signal.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/props.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/scoped-styles.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/host-props.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/ssr.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/core.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/teleport.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/trusted-html.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/machine/mintplayer-ng-bootstrap-machine.ts"],"sourcesContent":["import { DestroyRef, inject, Signal, signal } from '@angular/core';\nimport type { Store } from '@mintplayer/ui-core/store';\n\n/**\n * Bridge a `@mintplayer/ui-core` store into Angular's reactivity: a read-only\n * `Signal` of the store's snapshot, kept current by `subscribe` and released on\n * the injection context's `DestroyRef`.\n *\n * The signal is set synchronously from the store's notification; Angular\n * coalesces the resulting change detection, so a command that commits one\n * snapshot costs one render (measured in `machine-signal.spec.ts`, spike S1).\n */\nexport function machineSignal<S extends object>(store: Store<S>, destroyRef: DestroyRef = inject(DestroyRef)): Signal<S> {\n const state = signal<S>(store.snapshot);\n const unsubscribe = store.subscribe((snapshot) => state.set(snapshot));\n destroyRef.onDestroy(unsubscribe);\n return state.asReadonly();\n}\n","import { Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';\n\n/** An attribute bag as a core's `connect()` returns it. `null`/`undefined`/`false` remove the attribute; `true` sets it empty. */\nexport type PropBag = Record<string, string | number | boolean | null | undefined>;\n\n/**\n * Attribute names a bag may never set. A bag is data the core computed, but a\n * generic setter is still an injection sink, so URL-bearing and script-bearing\n * attributes are refused outright rather than sanitised.\n */\nconst REFUSED = new Set(['href', 'src', 'srcdoc', 'xlink:href', 'style', 'action', 'formaction', 'data']);\n\nfunction isRefused(name: string): boolean {\n return REFUSED.has(name) || name.startsWith('on');\n}\n\n/**\n * Apply a core's attribute bag to the host element — the Angular stand-in for\n * JSX/Lit/Vue attribute spread. The directive diffs the previous and next bag:\n * a key that disappears is *removed* from the DOM (a stale\n * `aria-activedescendant` would otherwise survive a close), and unchanged keys\n * are not rewritten.\n *\n * Attributes are written through `Renderer2`, so they land in the server-\n * rendered HTML and are re-applied identically after hydration (spike S2 in\n * docs/prd/typeahead-wc-436.md). Consumers never see a bag: the front's own\n * template binds `[mpProps]=\"api().input\"` on its own nodes.\n */\n@Directive({ selector: '[mpProps]' })\nexport class MpPropsDirective {\n readonly mpProps = input<PropBag | null | undefined>(null);\n\n private readonly element = inject(ElementRef).nativeElement as Element;\n private readonly renderer = inject(Renderer2);\n private applied: PropBag = {};\n\n constructor() {\n effect(() => (this.applied = applyPropBag(this.renderer, this.element, this.applied, this.mpProps() ?? {})));\n }\n}\n\n/** Write `next` onto `element`, removing what `previous` set and `next` drops. Returns `next`. */\nexport function applyPropBag(renderer: Renderer2, element: Element, previous: PropBag, next: PropBag): PropBag {\n Object.keys(previous)\n .filter((name) => !(name in next) || next[name] === null || next[name] === undefined || next[name] === false)\n .forEach((name) => renderer.removeAttribute(element, name));\n Object.entries(next)\n .filter(([, value]) => value !== null && value !== undefined && value !== false)\n .filter(([name]) => {\n if (isRefused(name)) {\n throw new Error(`[mpProps] refuses to set \"${name}\"; bind it explicitly in the template.`);\n }\n return true;\n })\n .filter(([name, value]) => !Object.is(previous[name], value))\n .forEach(([name, value]) => renderer.setAttribute(element, name, value === true ? '' : String(value)));\n return next;\n}\n","import { DOCUMENT, inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { installLightStyles, writeScopedStyleTag } from '@mintplayer/ui-core/scoped-styles';\n\n/**\n * Install a core's scoped stylesheet from an Angular front. In the browser it\n * goes through the shared registry (`installLightStyles`: once per key,\n * cross-bundle safe). On the server the registry cannot run, so the marker\n * `<style data-mp-light-styles=\"<key>\">` is written straight into the\n * request's `DOCUMENT` head — the client registry then treats it as already\n * installed. No string post-processing of the response is involved.\n *\n * In the browser it also repairs the event-replay body shift (below) — every\n * front calls this first thing, so the repair runs before any front's\n * projected children are hydrated.\n *\n * Call from the component's constructor (an injection context).\n */\nexport function useScopedStyles(key: string, cssText: string): void {\n if (isPlatformServer(inject(PLATFORM_ID))) {\n writeScopedStyleTag(inject(DOCUMENT), key, cssText);\n } else {\n repairEventReplayBodyPaths(inject(DOCUMENT));\n installLightStyles(key, cssText);\n }\n}\n\n/**\n * Angular SSR defect (platform-server 22): `_annotateForHydration` records the\n * hydration paths, and only THEN `insertEventRecordScript` adds the replay\n * `<script>` right after `#ng-event-dispatch-contract` in `<body>`. A node\n * whose path is body-relative — any projected node a front renders outside\n * its own host (an accordion tab's body inside the accordion's `<details>`, a\n * tab page's body inside the tab control's panel) — is then looked up one\n * sibling off, and hydration throws \"Cannot read properties of null\n * (reading 'nextSibling')\". The replay script has already run by the time any\n * component is constructed, so removing its element restores the body the\n * paths were computed against. Idempotent; a no-op without event replay.\n */\nexport function repairEventReplayBodyPaths(doc: Document): void {\n const replay = doc.getElementById('ng-event-dispatch-contract')?.nextSibling;\n if (replay instanceof HTMLScriptElement && replay.textContent?.startsWith('window.__jsaction_bootstrap(')) replay.remove();\n}\n","import { effect, ElementRef, inject, Renderer2 } from '@angular/core';\nimport { applyPropBag, type PropBag } from './props.directive';\n\n/**\n * Apply a core's attribute bag to the component's own host element: the host\n * twin of `[mpProps]`, for a compiled template whose root is marked `mp-host`\n * (the root element IS the host, so the template holds only its children).\n *\n * Diffs like `[mpProps]` and writes through `Renderer2`, so the attributes are\n * in the server-rendered HTML. `class` is merged token by token, never\n * written as an attribute: the consumer's own classes on the host survive.\n *\n * constructor() { useHostProps(() => this.view().root); }\n */\nexport function useHostProps(bag: () => PropBag | null | undefined): void {\n const element = inject(ElementRef).nativeElement as Element;\n const renderer = inject(Renderer2);\n let applied: PropBag = {};\n let classes: string[] = [];\n effect(() => {\n const { class: className, ...rest } = bag() ?? {};\n const next = typeof className === 'string' ? className.split(/\\s+/).filter(Boolean) : [];\n classes.filter((name) => !next.includes(name)).forEach((name) => renderer.removeClass(element, name));\n next.filter((name) => !classes.includes(name)).forEach((name) => renderer.addClass(element, name));\n classes = next;\n applied = applyPropBag(renderer, element, applied, rest);\n });\n}\n","import { InjectionToken, makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';\nimport { DEFAULT_PREFETCH_TIMEOUT } from '@mintplayer/ui-core/transfer-state';\n\nexport interface MachineSsrOptions {\n /**\n * How long a server render waits for one component's prefetch (a `[fetch]`\n * datatable's first page with a `stateKey`), ms. On expiry the component\n * renders its loading state and the browser fetches. Default 3000 (#448 D6).\n */\n readonly prefetchTimeout?: number;\n}\n\nexport const MACHINE_SSR_OPTIONS = new InjectionToken<MachineSsrOptions>('mp-machine-ssr-options', {\n factory: () => ({ prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT }),\n});\n\n/** App-level settings for components that load data during a server render. */\nexport function provideMachineSsr(options: MachineSsrOptions): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: MACHINE_SSR_OPTIONS, useValue: { prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT, ...options } }]);\n}\n","import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n makeStateKey,\n PendingTasks,\n PLATFORM_ID,\n signal,\n TransferState,\n untracked,\n type Provider,\n type Signal,\n type Type,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { coreRuntime, type ComponentCore, type CoreBag, type CoreContext, type ViewArgs } from '@mintplayer/ui-core/component';\nimport { runPrefetch } from '@mintplayer/ui-core/transfer-state';\nimport { useHostProps } from './host-props';\nimport { MACHINE_SSR_OPTIONS } from './ssr';\n\nconst tokens = new WeakMap<CoreContext<unknown>, InjectionToken<Signal<unknown>>>();\n\n/** The Angular token for a core context: one per context object. */\nexport function coreContextToken<T>(context: CoreContext<T>): InjectionToken<Signal<T>> {\n let token = tokens.get(context as CoreContext<unknown>);\n if (!token) {\n token = new InjectionToken<Signal<unknown>>(`mp-core-context:${context.name}`);\n tokens.set(context as CoreContext<unknown>, token);\n }\n return token as InjectionToken<Signal<T>>;\n}\n\n/** Provides `context` to the component's content, read from the component's `useCore().provided`. */\nexport function provideCoreContext<T>(context: CoreContext<T>, component: Type<{ readonly provided: Signal<T> }>): Provider {\n return { provide: coreContextToken(context), useFactory: () => inject(component).provided };\n}\n\nexport interface UseCoreOptions<I, P> {\n readonly inputs: () => I;\n /** Prefix of the deterministic id, e.g. `bs-navbar`. */\n readonly idPrefix: string;\n /** The outputs by name; `api.emit` calls their `emit`. */\n readonly outputs?: Readonly<Record<string, { emit(detail: never): void }>>;\n /** The host element's bag, where the template root is the host (`mp-host`). Default: `core.host`. */\n readonly hostBag?: (props: P) => CoreBag | null | undefined;\n /** Two-way inputs (`model()`), by name; written back when the core changes the state of the same name. */\n readonly models?: Readonly<Record<string, { set(value: never): void }>>;\n}\n\nexport interface CoreHandle<P, PC> {\n /** The template's props. */\n readonly props: Signal<P>;\n /** The value this component provides to its content. */\n readonly provided: Signal<PC>;\n /** Runs a core method; does nothing before the first client render. */\n call(name: string, args: unknown[]): unknown;\n}\n\n/**\n * Host a `ComponentCore` in a generated Angular component (PRD #437 D10).\n * Call it in a field initializer. The template's root is the host element\n * where `hostBag` is given, else the host's first element child.\n */\nexport function useCore<I, S, P, E, C, PC, M>(core: ComponentCore<I, S, P, E, C, PC, M>, options: UseCoreOptions<I, P>): CoreHandle<P, PC> {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const consumed = core.consume ? inject(coreContextToken(core.consume), { optional: true, skipSelf: true }) : null;\n const id = inject(BsIdService).next(options.idPrefix);\n // Read once: a host attribute is static content, and Angular does not observe it.\n const label = element.getAttribute('aria-label');\n const hydrated = signal(false);\n // The state is seeded at its first read, in the first change detection: the\n // template's bindings have set the inputs by then. In the constructor they\n // have not, and the server would render a bound model input's default.\n const written = signal<S | null>(null);\n const server = isPlatformServer(inject(PLATFORM_ID));\n const transfer = core.transferKey ? inject(TransferState) : null;\n /** Server only: starts the prefetch with the first inputs that name one (a `transferKey`), however late they arrive. */\n let prefetchOnce: ((inputs: I) => void) | null = null;\n /** Client only: the transferred seed is still unread, because no inputs have named its key yet. */\n let transferArmed = !server && !!transfer;\n let seeded: S | null = null;\n const seed = (): S => {\n if (seeded) return seeded;\n const inputs = untracked(options.inputs);\n // The baseline the state was seeded from: inputs that change before attaching\n // (a form control writing its value) reach inputsChanged on attach.\n runtime.inputs(inputs);\n return (seeded = core.state ? core.state(inputs, server ? undefined : takeTransferred(inputs)) : ({} as S));\n };\n /**\n * The server's prefetched seed for these inputs, read once: a later instance with the same query fetches fresh (#448).\n * Inputs without a key (a `fetch` the consumer sets after an async step) leave it armed for the next delivery.\n */\n const takeTransferred = (inputs: I): unknown => {\n const key = transferArmed && transfer ? core.transferKey?.(inputs) : undefined;\n if (!transfer || !key) return undefined;\n transferArmed = false;\n const stateKey = makeStateKey<unknown>(key);\n if (!transfer.hasKey(stateKey)) return undefined;\n const value = transfer.get(stateKey, undefined);\n transfer.remove(stateKey);\n return value;\n };\n if (server && transfer && core.prefetch) {\n // Outside the state computed, which must not write signals: the first change\n // detection seeds the loading snapshot, this replaces it before serialization.\n const pendingTasks = inject(PendingTasks);\n const ssr = inject(MACHINE_SSR_OPTIONS);\n const abort = new AbortController();\n inject(DestroyRef).onDestroy(() => abort.abort());\n prefetchOnce = (inputs) => {\n void pendingTasks.run(async () => {\n const result = await runPrefetch(core, inputs, { timeout: ssr.prefetchTimeout, signal: abort.signal });\n if (!result || abort.signal.aborted) return;\n transfer.set(makeStateKey<unknown>(result.key), result.seed);\n written.set(core.state!(inputs, result.seed));\n });\n };\n }\n const state = computed(() => written() ?? seed());\n\n const args = computed<ViewArgs<I, S, C, E>>(() => ({\n inputs: options.inputs(),\n state: state(),\n id,\n hydrated: hydrated(),\n context: (consumed ? consumed() : core.consume?.defaultValue) as C,\n label,\n api: () => runtime.api,\n }));\n const props = computed(() => core.view(args()));\n const provided = computed(() => core.provide?.(args()) as PC);\n\n const hostBag = options.hostBag ?? core.host?.bind(core);\n if (hostBag) useHostProps(() => hostBag(props()));\n\n const runtime = coreRuntime(core, {\n inputs: () => untracked(options.inputs),\n state: () => untracked(state),\n setState: (next) => written.set(next),\n emit: (name, detail) => options.outputs?.[name]?.emit(detail as never),\n models: Object.keys(options.models ?? {}) as never,\n writeModel: (name, value) => options.models?.[name]?.set(value as never),\n });\n afterNextRender(() => {\n hydrated.set(true);\n const root = options.hostBag ? element : (element.firstElementChild as HTMLElement | null);\n if (root) runtime.attachTo(root);\n });\n effect(() => {\n const inputs = options.inputs();\n untracked(() => {\n // A seed whose key the first inputs did not name: applied before the inputs reach the core,\n // so its inputsChanged sees the seeded page as the answer rather than reloading it.\n if (transferArmed && core.adopt) {\n const late = takeTransferred(inputs);\n if (late !== undefined) written.set(core.adopt(state(), inputs, late));\n }\n runtime.inputs(inputs);\n // Armed until the inputs name a prefetch: a `fetch` or `stateKey` can arrive after the first delivery.\n if (prefetchOnce && core.transferKey?.(inputs)) {\n const start = prefetchOnce;\n prefetchOnce = null;\n start(inputs);\n }\n });\n });\n inject(DestroyRef).onDestroy(() => runtime.dispose());\n\n return { props, provided, call: (name, callArgs) => runtime.call(name, callArgs) };\n}\n","import { DestroyRef, Directive, effect, EmbeddedViewRef, inject, input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n/**\n * Render an `<ng-template>` into another element, the compiled form of a view's\n * `<teleport :to>`. The twin of React's `createPortal`, Vue's `<Teleport>` and\n * Lit's `teleport()`. The view lives in this container, so change detection and\n * destruction follow the component, but its root nodes are moved into `to`, as\n * CDK's DomPortalOutlet does. Nothing renders while `to` is null, which is the\n * server's case. A core hands a target whose identity never changes (the\n * dock's per-pane hosts), so the content's state survives wherever the core\n * moves that target.\n *\n * <ng-template [mpTeleport]=\"view.paneHosts[pane]\">...</ng-template>\n */\n@Directive({ selector: '[mpTeleport]' })\nexport class MpTeleportDirective {\n readonly mpTeleport = input<Element | null | undefined>(null);\n\n private readonly template = inject(TemplateRef);\n private readonly container = inject(ViewContainerRef);\n private view: EmbeddedViewRef<unknown> | null = null;\n\n constructor() {\n effect(() => {\n const to = this.mpTeleport() ?? null;\n if (!to) {\n this.container.clear();\n this.view = null;\n return;\n }\n this.view ??= this.container.createEmbeddedView(this.template);\n // The view's nodes render in place first; detectChanges fills them before they move.\n this.view.detectChanges();\n this.view.rootNodes.filter((node: Node) => node.parentNode !== to).forEach((node: Node) => to.appendChild(node));\n });\n inject(DestroyRef).onDestroy(() => this.container.clear());\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n/**\n * Marks core-produced markup as trusted for `[innerHTML]`: the compiled form of\n * a view's `v-html`. The view contract is that `v-html` only ever carries markup\n * the core produced (flag and file-type SVGs, highlighted code rows), which the\n * React, Vue and Lit fronts insert as-is. Angular's sanitiser would instead drop\n * every `<svg>` — an empty flag, an icon-less file manager — so the Angular front\n * trusts it the same way.\n *\n * <span [innerHTML]=\"view.flagHtml | mpTrustedHtml\"></span>\n */\n@Pipe({ name: 'mpTrustedHtml' })\nexport class MpTrustedHtmlPipe implements PipeTransform {\n private readonly sanitizer = inject(DomSanitizer);\n\n transform(html: string | null | undefined): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(html ?? '');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;;;;;AAQG;AACG,SAAU,aAAa,CAAmB,KAAe,EAAE,UAAA,GAAyB,MAAM,CAAC,UAAU,CAAC,EAAA;AAC1G,IAAA,MAAM,KAAK,GAAG,MAAM,CAAI,KAAK,CAAC,QAAQ;8EAAC;AACvC,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtE,IAAA,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC;AACjC,IAAA,OAAO,KAAK,CAAC,UAAU,EAAE;AAC3B;;ACZA;;;;AAIG;AACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AAEzG,SAAS,SAAS,CAA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AAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,SAAS;mBAAC,EAAE,QAAQ,EAAE,cAAc,EAAE;;;ACXvC;;;;;;;;;AASG;MAEU,iBAAiB,CAAA;AAD9B,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AAKlD,IAAA;AAHC,IAAA,SAAS,CAAC,IAA+B,EAAA;QACvC,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,IAAI,IAAI,EAAE,CAAC;IAC3D;8GALW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,IAAI;mBAAC,EAAE,IAAI,EAAE,eAAe,EAAE;;;ACb/B;;AAEG;;;;"}
@@ -1,171 +1,140 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, forwardRef, Directive, input, model, output, viewChild, computed, effect, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2
+ import { inject, Injector, DestroyRef, signal, forwardRef, Directive, computed, ElementRef, input, numberAttribute, booleanAttribute, model, output, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
4
+ import { multiRangeCore, multiRangeScopedStyles } from '@mintplayer/ui-core/multi-range';
3
5
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
- export * from '@mintplayer/web-components/multi-range';
5
6
 
7
+ const same = (a, b) => a === b || (!!a && !!b && a.length === b.length && a.every((v, i) => v === b[i]));
8
+ /**
9
+ * The `ControlValueAccessor` of `bs-multi-range` (a host directive of the
10
+ * generated component, see `multi-range.angular.ts`). A bound form control
11
+ * drives the thumbs through `viewValue`; every move the user makes reaches the
12
+ * form through the component's `value` model, which a form write never echoes.
13
+ */
6
14
  class BsMultiRangeValueAccessor {
7
15
  constructor() {
8
- this.host = inject(BsMultiRangeComponent);
9
- }
10
- onInputEvent(ev) {
11
- if (!this.onValueChange)
12
- return;
13
- const detail = ev.detail;
14
- if (detail)
15
- this.onValueChange([...detail]);
16
+ this.injector = inject(Injector);
17
+ this.destroyRef = inject(DestroyRef);
18
+ /** A form control drives the thumbs: its `viewValue` wins over the `value` input. */
19
+ this.bound = signal(false, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "bound" }] : /* istanbul ignore next */ []));
21
+ this.viewValue = signal(null, /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "viewValue" }] : /* istanbul ignore next */ []));
23
+ this.disabled = signal(false, /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
25
+ this.onChange = () => undefined;
26
+ this.onTouched = () => undefined;
16
27
  }
17
- onTouchEvent() {
18
- if (this.onTouched)
19
- this.onTouched();
28
+ ngOnInit() {
29
+ // The component is created after its host directives, so it is looked up here.
30
+ // Its outputs fire for the user's moves only: a written or normalised value
31
+ // (a null form value shown as [min, max]) never reaches the form as a change.
32
+ const component = this.injector.get(BsMultiRangeComponent);
33
+ const report = (value) => {
34
+ if (!this.bound() || same(value, this.viewValue()))
35
+ return;
36
+ this.viewValue.set([...value]);
37
+ this.onChange([...value]);
38
+ };
39
+ const subs = [component.valueinput.subscribe(report), component.valuechange.subscribe(report)];
40
+ this.destroyRef.onDestroy(() => subs.forEach((sub) => sub.unsubscribe()));
20
41
  }
21
42
  registerOnChange(fn) {
22
- this.onValueChange = fn;
43
+ this.bound.set(true);
44
+ this.onChange = fn;
23
45
  }
24
46
  registerOnTouched(fn) {
25
47
  this.onTouched = fn;
26
48
  }
27
49
  writeValue(value) {
28
- const ref = this.host.elementRef();
29
- if (!ref)
30
- return;
31
- ref.nativeElement.value = value ?? [];
50
+ this.viewValue.set(Array.isArray(value) ? [...value] : null);
32
51
  }
33
52
  setDisabledState(isDisabled) {
34
- const ref = this.host.elementRef();
35
- if (!ref)
36
- return;
37
- if (isDisabled) {
38
- ref.nativeElement.setAttribute('disabled', '');
39
- }
40
- else {
41
- ref.nativeElement.removeAttribute('disabled');
42
- }
53
+ this.disabled.set(isDisabled);
43
54
  }
44
55
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsMultiRangeValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
45
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsMultiRangeValueAccessor, isStandalone: true, selector: "bs-multi-range", host: { listeners: { "value-input": "onInputEvent($event)", "value-change": "onTouchEvent()" } }, providers: [{
46
- provide: NG_VALUE_ACCESSOR,
47
- useExisting: forwardRef(() => BsMultiRangeValueAccessor),
48
- multi: true,
49
- }], ngImport: i0 }); }
56
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsMultiRangeValueAccessor, isStandalone: true, host: { listeners: { "focusout": "onTouched()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsMultiRangeValueAccessor), multi: true }], ngImport: i0 }); }
50
57
  }
51
58
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsMultiRangeValueAccessor, decorators: [{
52
59
  type: Directive,
53
60
  args: [{
54
- selector: 'bs-multi-range',
55
- providers: [{
56
- provide: NG_VALUE_ACCESSOR,
57
- useExisting: forwardRef(() => BsMultiRangeValueAccessor),
58
- multi: true,
59
- }],
61
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsMultiRangeValueAccessor), multi: true }],
60
62
  host: {
61
- '(value-input)': 'onInputEvent($event)',
62
- '(value-change)': 'onTouchEvent()',
63
+ '(focusout)': 'onTouched()',
63
64
  },
64
65
  }]
65
66
  }] });
66
67
 
68
+ /*
69
+ * The Angular extension of the generated `bs-multi-range` (PRD #437 D10 escape
70
+ * hatch): Angular forms. A bound form control drives the thumbs and the
71
+ * disabled state.
72
+ */
73
+ const hostDirectives = [BsMultiRangeValueAccessor];
74
+ function extendInputs(inputs) {
75
+ const accessor = inject(BsMultiRangeValueAccessor, { self: true });
76
+ return computed(() => {
77
+ const value = inputs();
78
+ return {
79
+ ...value,
80
+ value: accessor.bound() ? accessor.viewValue() : value.value,
81
+ disabled: value.disabled || accessor.disabled(),
82
+ };
83
+ });
84
+ }
85
+
86
+ // GENERATED from the multi-range manifest (multi-range) by @mintplayer/nx-component-compiler. Do not edit.
87
+ /**
88
+ * A slider with several thumbs on one track (#437): each thumb is a native `<input type="range">`.
89
+ *
90
+ * With JavaScript off the thumbs drag, step and submit under `name`. Thumbs never pass each other;
91
+ * `minDistance` keeps a gap between neighbours. `value` is two-way, one entry per thumb.
92
+ * `valueInput` fires while a thumb moves, `valueChange` when the move is committed.
93
+ */
67
94
  class BsMultiRangeComponent {
95
+ #core;
68
96
  constructor() {
69
- this.min = input(0, /* @ts-ignore */
70
- ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
71
- this.max = input(100, /* @ts-ignore */
72
- ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
73
- this.step = input(1, /* @ts-ignore */
74
- ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
75
- this.minDistance = input(0, /* @ts-ignore */
76
- ...(ngDevMode ? [{ debugName: "minDistance" }] : /* istanbul ignore next */ []));
97
+ /** The host element. */
98
+ this.elementRef = inject(ElementRef);
99
+ this.min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
100
+ this.max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
101
+ this.step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
102
+ this.minDistance = input(0, { ...(ngDevMode ? { debugName: "minDistance" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
77
103
  this.orientation = input('horizontal', /* @ts-ignore */
78
104
  ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
79
- this.disabled = input(false, /* @ts-ignore */
80
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
105
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
106
+ this.name = input(/* @ts-ignore */
107
+ ...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
108
+ this.label = input(/* @ts-ignore */
109
+ ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
110
+ this.thumbLabels = input(null, /* @ts-ignore */
111
+ ...(ngDevMode ? [{ debugName: "thumbLabels" }] : /* istanbul ignore next */ []));
81
112
  this.formatValue = input(null, /* @ts-ignore */
82
113
  ...(ngDevMode ? [{ debugName: "formatValue" }] : /* istanbul ignore next */ []));
83
- this.label = input(null, /* @ts-ignore */
84
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
85
- // Default is `undefined` so the effect doesn't clobber a writeValue() from a
86
- // form-control binding that hasn't fired yet. Once the model is set (either
87
- // by [(value)] binding or by user interaction), the effect drives the WC.
88
- // `model()` already exposes a `valueChange` output, so a two-way [(value)]
89
- // binding works without declaring it explicitly (Angular 22 errors — NG1054 —
90
- // if both exist). `value.set()` below drives that auto-output.
91
- this.value = model(undefined, /* @ts-ignore */
114
+ this.value = model(null, /* @ts-ignore */
92
115
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
93
- this.valueInput = output();
94
- this.elementRef = viewChild.required('el', /* @ts-ignore */
95
- ...(ngDevMode ? [{ debugName: "elementRef" }] : /* istanbul ignore next */ []));
96
- this.disabledAttr = computed(() => (this.disabled() ? '' : null), /* @ts-ignore */
97
- ...(ngDevMode ? [{ debugName: "disabledAttr" }] : /* istanbul ignore next */ []));
98
- effect(() => {
99
- const ref = this.elementRef();
100
- if (!ref)
101
- return;
102
- const v = this.value();
103
- if (v === undefined)
104
- return;
105
- ref.nativeElement.value = v;
106
- });
107
- effect(() => {
108
- const ref = this.elementRef();
109
- if (!ref)
110
- return;
111
- ref.nativeElement.formatValue = this.formatValue();
112
- });
113
- }
114
- onValueInput(event) {
115
- const detail = event.detail;
116
- if (!detail)
117
- return;
118
- this.value.set(detail);
119
- this.valueInput.emit(detail);
116
+ /** While a thumb moves: every pointer move and key step. */
117
+ this.valueinput = output();
118
+ /** A move committed: the pointer released, or a key step. */
119
+ this.valuechange = output();
120
+ this.#core = useCore(multiRangeCore, { inputs: extendInputs(() => ({ min: this.min(), max: this.max(), step: this.step(), minDistance: this.minDistance(), orientation: this.orientation(), disabled: this.disabled(), name: this.name(), label: this.label(), thumbLabels: this.thumbLabels(), formatValue: this.formatValue(), value: this.value() })), idPrefix: 'bs-multi-range', outputs: { valueInput: this.valueinput, valueChange: this.valuechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'multi-range' }), models: { value: this.value } });
121
+ /** The template's props. */
122
+ this.props = this.#core.props;
123
+ useScopedStyles('multi-range', multiRangeScopedStyles);
120
124
  }
121
- onValueChange(event) {
122
- const detail = event.detail;
123
- if (!detail)
124
- return;
125
- this.value.set(detail);
126
- }
127
- /** Imperatively read the currently-rendered values from the WC. */
128
- getValues() {
129
- const ref = this.elementRef();
130
- return ref ? ref.nativeElement.getValues() : [];
125
+ /** A copy of the current values. */
126
+ getValues(...args) {
127
+ return this.#core.call('getValues', args);
131
128
  }
132
129
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsMultiRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
133
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: BsMultiRangeComponent, isStandalone: true, selector: "bs-multi-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 }, minDistance: { classPropertyName: "minDistance", publicName: "minDistance", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, formatValue: { classPropertyName: "formatValue", publicName: "formatValue", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueInput: "valueInput" }, host: { properties: { "attr.orientation": "orientation()" } }, viewQueries: [{ propertyName: "elementRef", first: true, predicate: ["el"], descendants: true, isSignal: true }], hostDirectives: [{ directive: BsMultiRangeValueAccessor }], ngImport: i0, template: `
134
- <mp-multi-range
135
- #el
136
- class="bs-multi-range"
137
- [attr.min]="min()"
138
- [attr.max]="max()"
139
- [attr.step]="step()"
140
- [attr.min-distance]="minDistance()"
141
- [attr.orientation]="orientation()"
142
- [attr.disabled]="disabledAttr()"
143
- [attr.aria-label]="label()"
144
- (value-input)="onValueInput($event)"
145
- (value-change)="onValueChange($event)"
146
- ></mp-multi-range>
147
- `, isInline: true, styles: [":host{display:block;width:100%}.bs-multi-range{display:block;width:100%;height:100%}:host([orientation=\"vertical\"]){width:auto;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
130
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsMultiRangeComponent, isStandalone: true, selector: "bs-multi-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 }, minDistance: { classPropertyName: "minDistance", publicName: "minDistance", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, thumbLabels: { classPropertyName: "thumbLabels", publicName: "thumbLabels", isSignal: true, isRequired: false, transformFunction: null }, formatValue: { classPropertyName: "formatValue", publicName: "formatValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueinput: "valueinput", valuechange: "valuechange" }, hostDirectives: [{ directive: BsMultiRangeValueAccessor }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/multi-range/src/templates/multi-range.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"multi-range\" [mpProps]=\"p_view.track\">\n @for (fill of p_view.fills; track fill.key) {\n <div data-mps=\"multi-range\" [mpProps]=\"fill.bag\" [style]=\"fill.geometry\"></div>\n }\n @for (thumb of p_view.thumbs; track thumb.key) {\n <span data-mps=\"multi-range\" [mpProps]=\"thumb.slot\">\n <input data-mps=\"multi-range\" [mpProps]=\"thumb.input\">\n <span data-mps=\"multi-range\" [mpProps]=\"thumb.tooltip\" [style]=\"thumb.position\">\n {{ thumb.text }}\n </span>\n </span>\n }\n</div>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
148
131
  }
149
132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsMultiRangeComponent, decorators: [{
150
133
  type: Component,
151
- args: [{ selector: 'bs-multi-range', template: `
152
- <mp-multi-range
153
- #el
154
- class="bs-multi-range"
155
- [attr.min]="min()"
156
- [attr.max]="max()"
157
- [attr.step]="step()"
158
- [attr.min-distance]="minDistance()"
159
- [attr.orientation]="orientation()"
160
- [attr.disabled]="disabledAttr()"
161
- [attr.aria-label]="label()"
162
- (value-input)="onValueInput($event)"
163
- (value-change)="onValueChange($event)"
164
- ></mp-multi-range>
165
- `, host: {
166
- '[attr.orientation]': 'orientation()',
167
- }, schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [BsMultiRangeValueAccessor], styles: [":host{display:block;width:100%}.bs-multi-range{display:block;width:100%;height:100%}:host([orientation=\"vertical\"]){width:auto;height:100%}\n"] }]
168
- }], ctorParameters: () => [], propDecorators: { 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 }] }], minDistance: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDistance", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], formatValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatValue", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], valueInput: [{ type: i0.Output, args: ["valueInput"] }], elementRef: [{ type: i0.ViewChild, args: ['el', { isSignal: true }] }] } });
134
+ args: [{ selector: 'bs-multi-range', imports: [MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: hostDirectives, template: "<!-- GENERATED from libs/mintplayer-ui-core/multi-range/src/templates/multi-range.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"multi-range\" [mpProps]=\"p_view.track\">\n @for (fill of p_view.fills; track fill.key) {\n <div data-mps=\"multi-range\" [mpProps]=\"fill.bag\" [style]=\"fill.geometry\"></div>\n }\n @for (thumb of p_view.thumbs; track thumb.key) {\n <span data-mps=\"multi-range\" [mpProps]=\"thumb.slot\">\n <input data-mps=\"multi-range\" [mpProps]=\"thumb.input\">\n <span data-mps=\"multi-range\" [mpProps]=\"thumb.tooltip\" [style]=\"thumb.position\">\n {{ thumb.text }}\n </span>\n </span>\n }\n</div>\n" }]
135
+ }], ctorParameters: () => [], propDecorators: { 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 }] }], minDistance: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDistance", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], thumbLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "thumbLabels", required: false }] }], formatValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatValue", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], valueinput: [{ type: i0.Output, args: ["valueinput"] }], valuechange: [{ type: i0.Output, args: ["valuechange"] }] } });
136
+
137
+ // GENERATED from the multi-range manifest by @mintplayer/nx-component-compiler. Do not edit.
169
138
 
170
139
  /**
171
140
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-multi-range.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/multi-range/src/lib/value-accessor/multi-range-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/multi-range/src/lib/components/multi-range.component.ts","../../../../libs/mintplayer-ng-bootstrap/multi-range/mintplayer-ng-bootstrap-multi-range.ts"],"sourcesContent":["import { Directive, forwardRef, inject } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsMultiRangeComponent } from '../components/multi-range.component';\n\n@Directive({\n selector: 'bs-multi-range',\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsMultiRangeValueAccessor),\n multi: true,\n }],\n host: {\n '(value-input)': 'onInputEvent($event)',\n '(value-change)': 'onTouchEvent()',\n },\n})\nexport class BsMultiRangeValueAccessor implements ControlValueAccessor {\n private host = inject(BsMultiRangeComponent);\n\n private onValueChange?: (value: number[]) => void;\n private onTouched?: () => void;\n\n protected onInputEvent(ev: Event) {\n if (!this.onValueChange) return;\n const detail = (ev as CustomEvent<number[]>).detail;\n if (detail) this.onValueChange([...detail]);\n }\n\n protected onTouchEvent() {\n if (this.onTouched) this.onTouched();\n }\n\n registerOnChange(fn: (value: number[]) => void) {\n this.onValueChange = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn;\n }\n\n writeValue(value: number[] | null | undefined) {\n const ref = this.host.elementRef();\n if (!ref) return;\n ref.nativeElement.value = value ?? [];\n }\n\n setDisabledState(isDisabled: boolean) {\n const ref = this.host.elementRef();\n if (!ref) return;\n if (isDisabled) {\n ref.nativeElement.setAttribute('disabled', '');\n } else {\n ref.nativeElement.removeAttribute('disabled');\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n computed,\n effect,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport { MintMultiRangeElement, MultiRangeOrientation } from '@mintplayer/web-components/multi-range';\nimport { BsMultiRangeValueAccessor } from '../value-accessor/multi-range-value-accessor';\n\n@Component({\n selector: 'bs-multi-range',\n template: `\n <mp-multi-range\n #el\n class=\"bs-multi-range\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [attr.step]=\"step()\"\n [attr.min-distance]=\"minDistance()\"\n [attr.orientation]=\"orientation()\"\n [attr.disabled]=\"disabledAttr()\"\n [attr.aria-label]=\"label()\"\n (value-input)=\"onValueInput($event)\"\n (value-change)=\"onValueChange($event)\"\n ></mp-multi-range>\n `,\n styles: [`\n :host { display: block; width: 100%; }\n .bs-multi-range { display: block; width: 100%; height: 100%; }\n :host([orientation='vertical']) { width: auto; height: 100%; }\n `],\n host: {\n '[attr.orientation]': 'orientation()',\n },\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [BsMultiRangeValueAccessor],\n})\nexport class BsMultiRangeComponent {\n readonly min = input(0);\n readonly max = input(100);\n readonly step = input(1);\n readonly minDistance = input(0);\n readonly orientation = input<MultiRangeOrientation>('horizontal');\n readonly disabled = input(false);\n readonly formatValue = input<((value: number) => string) | null>(null);\n readonly label = input<string | null>(null);\n\n // Default is `undefined` so the effect doesn't clobber a writeValue() from a\n // form-control binding that hasn't fired yet. Once the model is set (either\n // by [(value)] binding or by user interaction), the effect drives the WC.\n // `model()` already exposes a `valueChange` output, so a two-way [(value)]\n // binding works without declaring it explicitly (Angular 22 errors — NG1054 —\n // if both exist). `value.set()` below drives that auto-output.\n readonly value = model<number[] | undefined>(undefined);\n\n readonly valueInput = output<number[]>();\n\n readonly elementRef = viewChild.required<ElementRef<MintMultiRangeElement>>('el');\n\n protected readonly disabledAttr = computed(() => (this.disabled() ? '' : null));\n\n constructor() {\n effect(() => {\n const ref = this.elementRef();\n if (!ref) return;\n const v = this.value();\n if (v === undefined) return;\n ref.nativeElement.value = v;\n });\n effect(() => {\n const ref = this.elementRef();\n if (!ref) return;\n ref.nativeElement.formatValue = this.formatValue();\n });\n }\n\n protected onValueInput(event: Event): void {\n const detail = (event as CustomEvent<number[]>).detail;\n if (!detail) return;\n this.value.set(detail);\n this.valueInput.emit(detail);\n }\n\n protected onValueChange(event: Event): void {\n const detail = (event as CustomEvent<number[]>).detail;\n if (!detail) return;\n this.value.set(detail);\n }\n\n /** Imperatively read the currently-rendered values from the WC. */\n getValues(): number[] {\n const ref = this.elementRef();\n return ref ? ref.nativeElement.getValues() : [];\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.BsMultiRangeValueAccessor"],"mappings":";;;;;MAgBa,yBAAyB,CAAA;AAZtC,IAAA,WAAA,GAAA;AAaU,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAsC7C,IAAA;AAjCW,IAAA,YAAY,CAAC,EAAS,EAAA;QAC9B,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE;AACzB,QAAA,MAAM,MAAM,GAAI,EAA4B,CAAC,MAAM;AACnD,QAAA,IAAI,MAAM;YAAE,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IAC7C;IAEU,YAAY,GAAA;QACpB,IAAI,IAAI,CAAC,SAAS;YAAE,IAAI,CAAC,SAAS,EAAE;IACtC;AAEA,IAAA,gBAAg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../libs/mintplayer-ng-bootstrap/multi-range/src/value-accessor/multi-range-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/multi-range/src/multi-range.angular.ts","../../../../libs/mintplayer-ng-bootstrap/multi-range/src/generated/multi-range.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/multi-range/src/generated/multi-range.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/multi-range/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/multi-range/mintplayer-ng-bootstrap-multi-range.ts"],"sourcesContent":["import { DestroyRef, Directive, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsMultiRangeComponent } from '../generated';\n\nconst same = (a: readonly number[] | null, b: readonly number[] | null) =>\n a === b || (!!a && !!b && a.length === b.length && a.every((v, i) => v === b[i]));\n\n/**\n * The `ControlValueAccessor` of `bs-multi-range` (a host directive of the\n * generated component, see `multi-range.angular.ts`). A bound form control\n * drives the thumbs through `viewValue`; every move the user makes reaches the\n * form through the component's `value` model, which a form write never echoes.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsMultiRangeValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsMultiRangeValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the thumbs: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n readonly viewValue = signal<number[] | null>(null);\n readonly disabled = signal(false);\n\n private onChange: (value: number[]) => 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 // Its outputs fire for the user's moves only: a written or normalised value\n // (a null form value shown as [min, max]) never reaches the form as a change.\n const component = this.injector.get(BsMultiRangeComponent);\n const report = (value: number[]) => {\n if (!this.bound() || same(value, this.viewValue())) return;\n this.viewValue.set([...value]);\n this.onChange([...value]);\n };\n const subs = [component.valueinput.subscribe(report), component.valuechange.subscribe(report)];\n this.destroyRef.onDestroy(() => subs.forEach((sub) => sub.unsubscribe()));\n }\n\n registerOnChange(fn: (value: number[]) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n writeValue(value: number[] | null | undefined): void {\n this.viewValue.set(Array.isArray(value) ? [...value] : null);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { MultiRangeInputs } from '@mintplayer/ui-core/multi-range';\nimport { BsMultiRangeValueAccessor } from './value-accessor/multi-range-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-multi-range` (PRD #437 D10 escape\n * hatch): Angular forms. A bound form control drives the thumbs and the\n * disabled state.\n */\n\nexport const hostDirectives = [BsMultiRangeValueAccessor];\n\nexport function extendInputs(inputs: () => MultiRangeInputs): () => MultiRangeInputs {\n const accessor = inject(BsMultiRangeValueAccessor, { self: true });\n return computed<MultiRangeInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the multi-range manifest (multi-range) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { multiRangeCore, type MultiRangeInputs, type MultiRangeMethods, multiRangeScopedStyles } from '@mintplayer/ui-core/multi-range';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../multi-range.angular';\n\n/**\n * A slider with several thumbs on one track (#437): each thumb is a native `<input type=\"range\">`.\n *\n * With JavaScript off the thumbs drag, step and submit under `name`. Thumbs never pass each other;\n * `minDistance` keeps a gap between neighbours. `value` is two-way, one entry per thumb.\n * `valueInput` fires while a thumb moves, `valueChange` when the move is committed.\n */\n@Component({\n selector: 'bs-multi-range',\n templateUrl: './multi-range.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsMultiRangeComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly min = input<MultiRangeInputs['min'], unknown>(0, { transform: (v: unknown) => numberAttribute(v) as MultiRangeInputs['min'] });\n readonly max = input<MultiRangeInputs['max'], unknown>(100, { transform: (v: unknown) => numberAttribute(v) as MultiRangeInputs['max'] });\n readonly step = input<MultiRangeInputs['step'], unknown>(1, { transform: (v: unknown) => numberAttribute(v) as MultiRangeInputs['step'] });\n readonly minDistance = input<MultiRangeInputs['minDistance'], unknown>(0, { transform: (v: unknown) => numberAttribute(v) as MultiRangeInputs['minDistance'] });\n readonly orientation = input<MultiRangeInputs['orientation']>('horizontal');\n readonly disabled = input<MultiRangeInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly name = input<MultiRangeInputs['name']>();\n readonly label = input<MultiRangeInputs['label']>();\n readonly thumbLabels = input<MultiRangeInputs['thumbLabels']>(null);\n readonly formatValue = input<MultiRangeInputs['formatValue']>(null);\n readonly value = model<MultiRangeInputs['value']>(null);\n /** While a thumb moves: every pointer move and key step. */\n readonly valueinput = output<number[]>();\n /** A move committed: the pointer released, or a key step. */\n readonly valuechange = output<number[]>();\n\n readonly #core = useCore(multiRangeCore, { inputs: ext_extendInputs(() => ({ min: this.min(), max: this.max(), step: this.step(), minDistance: this.minDistance(), orientation: this.orientation(), disabled: this.disabled(), name: this.name(), label: this.label(), thumbLabels: this.thumbLabels(), formatValue: this.formatValue(), value: this.value() })), idPrefix: 'bs-multi-range', outputs: { valueInput: this.valueinput, valueChange: this.valuechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'multi-range' }), models: { value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('multi-range', multiRangeScopedStyles);\n }\n\n /** A copy of the current values. */\n getValues(...args: Parameters<MultiRangeMethods['getValues']>): ReturnType<MultiRangeMethods['getValues']> {\n return this.#core.call('getValues', args) as ReturnType<MultiRangeMethods['getValues']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/multi-range/src/templates/multi-range.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"multi-range\" [mpProps]=\"p_view.track\">\n @for (fill of p_view.fills; track fill.key) {\n <div data-mps=\"multi-range\" [mpProps]=\"fill.bag\" [style]=\"fill.geometry\"></div>\n }\n @for (thumb of p_view.thumbs; track thumb.key) {\n <span data-mps=\"multi-range\" [mpProps]=\"thumb.slot\">\n <input data-mps=\"multi-range\" [mpProps]=\"thumb.input\">\n <span data-mps=\"multi-range\" [mpProps]=\"thumb.tooltip\" [style]=\"thumb.position\">\n {{ thumb.text }}\n </span>\n </span>\n }\n</div>\n","// GENERATED from the multi-range manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsMultiRangeComponent } from './multi-range.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsMultiRangeValueAccessor","ext_hostDirectives"],"mappings":";;;;;;AAIA,MAAM,IAAI,GAAG,CAAC,CAA2B,EAAE,CAA2B,KACpE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnF;;;;;AAKG;MAOU,yBAAyB,CAAA;AANtC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,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