ngwr 16.1.0 → 16.2.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 (123) hide show
  1. package/date-picker/styles/_index.scss +89 -1
  2. package/dropdown/styles/_index.scss +37 -1
  3. package/fesm2022/ngwr-date-picker-testing.mjs +18 -0
  4. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  5. package/fesm2022/ngwr-date-picker.mjs +152 -8
  6. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  7. package/fesm2022/ngwr-date-stamp-testing.mjs.map +1 -1
  8. package/fesm2022/ngwr-date-stamp.mjs +73 -9
  9. package/fesm2022/ngwr-date-stamp.mjs.map +1 -1
  10. package/fesm2022/ngwr-date.mjs +86 -5
  11. package/fesm2022/ngwr-date.mjs.map +1 -1
  12. package/fesm2022/ngwr-dropdown-testing.mjs +38 -3
  13. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  14. package/fesm2022/ngwr-dropdown.mjs +358 -24
  15. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  16. package/fesm2022/ngwr-i18n-ar.mjs +7 -2
  17. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  18. package/fesm2022/ngwr-i18n-cs.mjs +7 -2
  19. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  20. package/fesm2022/ngwr-i18n-de.mjs +7 -2
  21. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  22. package/fesm2022/ngwr-i18n-en.mjs +7 -2
  23. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  24. package/fesm2022/ngwr-i18n-es.mjs +7 -2
  25. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  26. package/fesm2022/ngwr-i18n-fr.mjs +7 -2
  27. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  28. package/fesm2022/ngwr-i18n-he.mjs +7 -2
  29. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  30. package/fesm2022/ngwr-i18n-hi.mjs +7 -2
  31. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  32. package/fesm2022/ngwr-i18n-id.mjs +7 -2
  33. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  34. package/fesm2022/ngwr-i18n-it.mjs +7 -2
  35. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  36. package/fesm2022/ngwr-i18n-ja.mjs +7 -2
  37. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  38. package/fesm2022/ngwr-i18n-ko.mjs +7 -2
  39. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  40. package/fesm2022/ngwr-i18n-nl.mjs +7 -2
  41. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  42. package/fesm2022/ngwr-i18n-pl.mjs +7 -2
  43. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  44. package/fesm2022/ngwr-i18n-pt.mjs +7 -2
  45. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  46. package/fesm2022/ngwr-i18n-ru.mjs +7 -2
  47. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  48. package/fesm2022/ngwr-i18n-sv.mjs +7 -2
  49. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  50. package/fesm2022/ngwr-i18n-tr.mjs +7 -2
  51. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  52. package/fesm2022/ngwr-i18n-uk.mjs +7 -2
  53. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  54. package/fesm2022/ngwr-i18n-vi.mjs +7 -2
  55. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  56. package/fesm2022/ngwr-i18n-zh-tw.mjs +7 -2
  57. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  58. package/fesm2022/ngwr-i18n-zh.mjs +7 -2
  59. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  60. package/fesm2022/ngwr-lightbox-testing.mjs +26 -0
  61. package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
  62. package/fesm2022/ngwr-lightbox.mjs +246 -10
  63. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  64. package/fesm2022/ngwr-pipes.mjs +28 -6
  65. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  66. package/fesm2022/ngwr-schema-form.mjs +3 -0
  67. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  68. package/fesm2022/ngwr-slider-testing.mjs +17 -0
  69. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  70. package/fesm2022/ngwr-slider.mjs +87 -11
  71. package/fesm2022/ngwr-slider.mjs.map +1 -1
  72. package/fesm2022/ngwr-sortable-list-testing.mjs +103 -0
  73. package/fesm2022/ngwr-sortable-list-testing.mjs.map +1 -0
  74. package/fesm2022/ngwr-sortable-list.mjs +257 -53
  75. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  76. package/fesm2022/ngwr-version.mjs +1 -1
  77. package/fesm2022/ngwr-version.mjs.map +1 -1
  78. package/i18n/ar.json +7 -2
  79. package/i18n/cs.json +7 -2
  80. package/i18n/de.json +7 -2
  81. package/i18n/en.json +7 -2
  82. package/i18n/es.json +7 -2
  83. package/i18n/fr.json +7 -2
  84. package/i18n/he.json +7 -2
  85. package/i18n/hi.json +7 -2
  86. package/i18n/id.json +7 -2
  87. package/i18n/it.json +7 -2
  88. package/i18n/ja.json +7 -2
  89. package/i18n/ko.json +7 -2
  90. package/i18n/nl.json +7 -2
  91. package/i18n/pl.json +7 -2
  92. package/i18n/pt.json +7 -2
  93. package/i18n/ru.json +7 -2
  94. package/i18n/sv.json +7 -2
  95. package/i18n/tr.json +7 -2
  96. package/i18n/uk.json +7 -2
  97. package/i18n/vi.json +7 -2
  98. package/i18n/zh-TW.json +7 -2
  99. package/i18n/zh.json +7 -2
  100. package/lightbox/styles/_rules.scss +96 -0
  101. package/llms-full.txt +12 -8
  102. package/llms.txt +12 -0
  103. package/package.json +5 -1
  104. package/schematics/use/symbol-map.json +1 -0
  105. package/skills/ngwr/SKILL.md +1 -1
  106. package/skills/ngwr/references/catalog.md +2 -1
  107. package/slider/styles/_index.scss +106 -0
  108. package/sortable-list/styles/_rules.scss +23 -1
  109. package/types/ngwr-date-picker-testing.d.ts +17 -0
  110. package/types/ngwr-date-picker.d.ts +79 -2
  111. package/types/ngwr-date-stamp-testing.d.ts +1 -1
  112. package/types/ngwr-date-stamp.d.ts +53 -7
  113. package/types/ngwr-date.d.ts +118 -15
  114. package/types/ngwr-dropdown-testing.d.ts +53 -5
  115. package/types/ngwr-dropdown.d.ts +100 -0
  116. package/types/ngwr-lightbox-testing.d.ts +27 -0
  117. package/types/ngwr-lightbox.d.ts +71 -6
  118. package/types/ngwr-pipes.d.ts +33 -13
  119. package/types/ngwr-slider-testing.d.ts +8 -1
  120. package/types/ngwr-slider.d.ts +89 -3
  121. package/types/ngwr-sortable-list-testing.d.ts +79 -0
  122. package/types/ngwr-sortable-list.d.ts +113 -10
  123. package/types/ngwr-version.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-sortable-list.mjs","names":[],"sources":["../../../projects/lib/sortable-list/tokens/sortable-list.token.ts","../../../projects/lib/sortable-list/sortable-list.ts","../../../projects/lib/sortable-list/sortable-list.html","../../../projects/lib/sortable-list/sortable-item.ts","../../../projects/lib/sortable-list/drag-handle.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport type { WrSortableListContext } from '../types';\n\n/**\n * Token a `<wr-sortable-item>` injects to find its parent `<wr-sortable-list>`.\n *\n * Rows arrive through `<ng-content>`, so nothing in the list's template can\n * bind to them and the child has to reach up — the same shape\n * `<wr-carousel-slide>` and `<wr-tab>` use.\n *\n * @internal\n */\nexport const WR_SORTABLE_LIST = new InjectionToken<WrSortableListContext>('WR_SORTABLE_LIST');\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type CdkDragDrop, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop';\nimport type { ElementRef } from '@angular/core';\nimport {\n Component,\n Injector,\n ViewEncapsulation,\n afterNextRender,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\n\nimport { wrReadI18nText, useI18nFormatter } from 'ngwr/i18n';\n\nimport { WR_SORTABLE_LIST } from './tokens';\nimport type { WrSortableListContext, WrSortableReorderEvent } from './types';\n\n/** Whether `b` comes after `a` in the document. */\nfunction follows(a: HTMLElement, b: HTMLElement): boolean {\n // eslint-disable-next-line no-bitwise -- compareDocumentPosition answers with a bitmask\n return (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0;\n}\n\n/** Counted, not random: the list prerenders, so the id has to match on rehydration. */\nlet sortableListUid = 0;\n\n/**\n * Drag-to-reorder list. Wraps CDK's `cdkDropList` + `cdkDrag` with a\n * signal-based items binding — the source array is updated in place and\n * emitted via 2-way `[(items)]`.\n *\n * Write the loop yourself and project a `<wr-sortable-item>` per row. Until\n * v15 the list owned the loop and rendered one unnamed `<ng-template\n * let-row let-i=\"index\">`, which said nothing in the markup about where those\n * variables came from and gave a row no way to carry anything of its own. Put\n * `wrDragHandle` on an element inside a row to restrict drag start to a\n * handle; there is no input for it, the directive's presence is the switch.\n *\n * Every row is a tab stop: Space or Enter picks it up, the arrow keys move it,\n * Space or Enter drops it and Escape puts it back. CDK's `cdkDrag` ships no key\n * handling of its own, so without this the component's only function was\n * unreachable from a keyboard.\n *\n * Reading direction: a `horizontal` list follows the VISUAL order, so under\n * `dir=\"rtl\"` ArrowLeft moves the held row toward the higher index — the same\n * rule `wr-slider` applies to its track. A vertical list never mirrors.\n *\n * What that does NOT answer is WCAG 2.5.7, which asks for a POINTER alternative\n * to the drag. Click-to-pick-up is the obvious candidate and is not safe here:\n * the CDK's drag-drop bundle installs no click suppressor of any kind, so the\n * mouseup ending a drag still produces a click, and a row that grabbed itself on\n * click would be picking itself straight back up. A visible move-up /\n * move-down affordance is the remaining answer, and that is a design change.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\" (reorder)=\"onReorder($event)\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle>≡</span>\n * {{ row.label }}\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n *\n * @see https://ngwr.dev/reference/components/sortable-list\n */\n@Component({\n selector: 'wr-sortable-list',\n templateUrl: './sortable-list.html',\n styleUrl: './sortable-list.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [CdkDropList],\n host: { class: 'wr-sortable-list' },\n providers: [{ provide: WR_SORTABLE_LIST, useExisting: WrSortableList }],\n})\nexport class WrSortableList<T = unknown> implements WrSortableListContext {\n /** Items to render. Two-way — emits the reordered array on drop. */\n readonly items = model.required<T[]>();\n\n /** Layout direction. Drives CDK's `cdkDropListOrientation`. @default 'vertical' */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Disable all dragging. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Locked axis — restrict drag movement to one axis even diagonally. */\n readonly lockAxis = input<'x' | 'y' | undefined>(undefined);\n\n /**\n * Delay (ms) before a drag begins after the pointer goes down. The touch\n * delay is the fix for the classic CDK touch snag: without it, the\n * `touch-action: none` CDK puts on each item blocks scrolling the list on a\n * phone. With a small touch delay, a quick swipe scrolls and a brief hold\n * starts the drag; mouse stays instant. Pass a single number to apply one\n * delay to both pointers. @default { touch: 150, mouse: 0 }\n */\n readonly dragStartDelay = input<number | { touch: number; mouse: number }>({ touch: 150, mouse: 0 });\n\n /** Fired after a successful reorder with the new array + indices. */\n readonly reorder = output<WrSortableReorderEvent<T>>();\n\n private readonly injector = inject(Injector);\n\n /**\n * Ambient reading direction, for the horizontal keyboard path only.\n *\n * Optional so a bare `TestBed` — or any consumer that never set a direction —\n * needs no provider; `Directionality` is root-provided, so `null` only ever\n * means \"nobody asked\", which is LTR. Nothing caches a direction-derived\n * value: `isRtl()` is read inside the key handler, so a runtime flip needs no\n * subscription to `Directionality.change`.\n *\n * The POINTER path already mirrors without this — `cdkDropList` injects\n * `Directionality` itself and feeds it to `DropListRef.withDirection`, so a\n * horizontal drag has always followed the visual order. The keyboard path was\n * the half that did not, which is why the two disagreed.\n */\n private readonly dir = inject(Directionality, { optional: true });\n\n /**\n * The rows, in projection order, which is the order the consumer's own loop\n * rendered them in — so a row's position here IS its index into `items()`.\n *\n * Collected on construction rather than through `contentChildren`, because\n * the keyboard path has to resolve an index DURING a keydown and a query\n * signal is only guaranteed current after change detection. A row that\n * Angular destroys drops out on the next lookup: the element is gone from\n * the DOM, so `indexOf` cannot find it and the stale entry is swept then.\n */\n private readonly rows: { readonly host: ElementRef<HTMLElement> }[] = [];\n\n /** Index of the row the keyboard is holding, or `null` when nothing is held. */\n readonly grabbedIndex = signal<number | null>(null);\n\n /** Live-region text. Written by the keyboard path only. */\n protected readonly announcement = signal('');\n\n /** Links every row to the key model via `aria-describedby`. */\n readonly keyHelpId = `wr-sortable-list-help-${++sortableListUid}`;\n\n protected readonly resolvedKeyHelp = wrReadI18nText(\n 'sortableList.keyHelp',\n 'Press Space to pick this item up, then use the arrow keys to move it. ' +\n 'Press Space again to drop it, or Escape to put it back.'\n );\n\n private readonly grabbedText = useI18nFormatter('sortableList.grabbed', 'Grabbed. {{index}} of {{total}}.');\n private readonly movedText = useI18nFormatter('sortableList.moved', '{{index}} of {{total}}.');\n private readonly droppedText = useI18nFormatter('sortableList.dropped', 'Dropped. {{index}} of {{total}}.');\n private readonly cancelledText = wrReadI18nText('sortableList.cancelled', 'Move cancelled.');\n\n /** Where the held row started. Escape puts it back there. */\n private grabOrigin = -1;\n\n /** True while a keyboard move is handing focus back — see `onRowFocusout`. */\n private restoringFocus = false;\n\n protected onDrop(event: CdkDragDrop<T[]>): void {\n if (event.previousIndex === event.currentIndex) return;\n const next = this.items().slice();\n moveItemInArray(next, event.previousIndex, event.currentIndex);\n this.items.set(next);\n this.reorder.emit({\n items: next,\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n item: next[event.currentIndex],\n });\n }\n\n /**\n * The keyboard reorder path: pick up, move, drop — deliberately a two-step\n * grab rather than \"an arrow moves the focused row\", so that arrowing through\n * a list a user is only reading can never rearrange it.\n *\n * Keys are handled only when the ROW itself is the event target; a button or\n * an input projected into the row template keeps every key it would normally\n * get.\n */\n /** @internal A row registering itself on construction. */\n register(item: { readonly host: ElementRef<HTMLElement> }): void {\n this.rows.push(item);\n }\n\n /**\n * @internal A row's position among its live siblings.\n *\n * Read off the DOM rather than off the registration order, because a row can\n * be added, removed or moved by the consumer's own loop and construction\n * order survives none of those. Rows whose element has left the document are\n * swept here, which is the only place that can tell.\n */\n indexOf(item: { readonly host: ElementRef<HTMLElement> }): number {\n this.sortRows();\n return this.rows.indexOf(item);\n }\n\n /**\n * Drops rows whose element has left the document and puts the rest into\n * document order.\n *\n * Its own method because `relocate` needs it too: that one focuses\n * `rows[to]` after the move, and without a re-sort it reached into an array\n * still ordered as the list looked BEFORE the move.\n */\n private sortRows(): void {\n for (let i = this.rows.length - 1; i >= 0; i -= 1) {\n if (!this.rows[i].host.nativeElement.isConnected) this.rows.splice(i, 1);\n }\n this.rows.sort((a, b) => (follows(a.host.nativeElement, b.host.nativeElement) ? -1 : 1));\n }\n\n /** @internal */\n onRowKeydown(event: KeyboardEvent, index: number): void {\n if (this.disabled() || event.target !== event.currentTarget) return;\n\n const grabbed = this.grabbedIndex();\n const horizontal = this.orientation() === 'horizontal';\n // The horizontal arrows name a SIDE of the row, so they follow the reading\n // direction: a horizontal list under `dir=\"rtl\"` paints index 0 at the right,\n // so the key that raises the index is ArrowLeft. Raising it on ArrowRight\n // regardless moved the held item away from the arrow the user pressed — the\n // one failure in this set a user cannot rationalise, because it inverts their\n // model of the list silently. The block arrows name a value's direction in a\n // column and never mirror, which is why only the horizontal pair is swapped.\n const rtl = horizontal && this.dir?.value === 'rtl';\n const forward = horizontal ? (rtl ? 'ArrowLeft' : 'ArrowRight') : 'ArrowDown';\n const back = horizontal ? (rtl ? 'ArrowRight' : 'ArrowLeft') : 'ArrowUp';\n\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n if (grabbed === null) this.grab(index);\n else this.drop();\n return;\n }\n\n if (grabbed === null) return;\n\n if (event.key === 'Escape') {\n event.preventDefault();\n // Held only while a row is grabbed — an Escape typed anywhere else has to\n // keep reaching whatever dialog or overlay the list is sitting in.\n event.stopPropagation();\n this.cancelGrab();\n return;\n }\n\n if (event.key === forward || event.key === back) {\n event.preventDefault();\n this.moveGrabbed(event.key === forward ? 1 : -1);\n }\n }\n\n /**\n * Focus leaving a held row ends the gesture as a drop rather than dropping the\n * change on the floor — `[(items)]` has already been written by then, so a\n * silent release would leave `reorder` never reporting a move that happened.\n * The guard is what makes it safe: moving a focused node in the DOM blurs it,\n * so every keyboard move fires this too.\n */\n /** @internal */\n onRowFocusout(): void {\n if (this.restoringFocus || this.grabbedIndex() === null) return;\n this.drop();\n }\n\n private grab(index: number): void {\n this.grabOrigin = index;\n this.grabbedIndex.set(index);\n this.announcement.set(this.grabbedText(this.position(index)));\n }\n\n private moveGrabbed(delta: number): void {\n const from = this.grabbedIndex();\n if (from === null) return;\n const to = from + delta;\n if (to < 0 || to >= this.items().length) return;\n\n this.relocate(from, to);\n this.grabbedIndex.set(to);\n this.announcement.set(this.movedText(this.position(to)));\n }\n\n private drop(): void {\n const to = this.grabbedIndex();\n const from = this.grabOrigin;\n this.grabbedIndex.set(null);\n this.grabOrigin = -1;\n if (to === null) return;\n\n this.announcement.set(this.droppedText(this.position(to)));\n if (from === to) return;\n // One event per gesture, the way a drag emits one on drop — not one per\n // arrow press, which would put a host that persists on `reorder` through a\n // write per keystroke. `[(items)]` still updates on every press, because\n // the rendered order has to follow the row the user is moving.\n this.reorder.emit({ items: this.items(), previousIndex: from, currentIndex: to, item: this.items()[to] });\n }\n\n private cancelGrab(): void {\n const from = this.grabbedIndex();\n if (from === null) return;\n if (from !== this.grabOrigin) this.relocate(from, this.grabOrigin);\n this.grabbedIndex.set(null);\n this.grabOrigin = -1;\n this.announcement.set(this.cancelledText());\n }\n\n private relocate(from: number, to: number): void {\n const next = this.items().slice();\n moveItemInArray(next, from, to);\n this.items.set(next);\n\n // The row is the same DOM node moved to another slot, and moving a focused\n // node hands focus back to `<body>` — so it has to be taken again once the\n // move has rendered. `afterNextRender`, never a microtask: zoneless change\n // detection runs in a macrotask, so a microtask would fire while the row is\n // still at its old index and focus the wrong one. (jsdom keeps focus across\n // a node move, so no spec here can express that half.)\n this.restoringFocus = true;\n afterNextRender(\n () => {\n // Re-sorted FIRST. `this.rows` is only ever put into document order by\n // `indexOf`, and nothing calls it between the move and here — so the\n // array was still in the order it had BEFORE the move, and `rows[to]`\n // was whichever row used to be at that slot. `sortRows()` is the same\n // sweep-and-sort `indexOf` runs; after it, index `to` is the row the\n // move actually put there.\n this.sortRows();\n this.rows[to]?.host.nativeElement.focus();\n this.restoringFocus = false;\n },\n { injector: this.injector }\n );\n }\n\n private position(index: number): { index: number; total: number } {\n return { index: index + 1, total: this.items().length };\n }\n}\n\nexport type { WrSortableReorderEvent } from './types';\n","<!--\n `role=\"list\"` on the container and `role=\"listitem\"` on each row rather than\n bare divs: every row is a tab stop, and a focusable element with no role at\n all is announced as loose text. The list role is what gives the reader the\n position of the row focus lands on.\n\n Rows arrive through `<ng-content>` — the consumer writes the loop, so the\n markup says what each row is instead of hiding it in an unnamed template.\n-->\n<div\n cdkDropList\n role=\"list\"\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n <ng-content />\n</div>\n\n<!--\n The key model, on every row rather than once on the container: focus lands on\n a row and never on the list itself, so a description hung on the list would\n never be read out.\n-->\n<p class=\"wr-sortable-list__sr-only\" [id]=\"keyHelpId\">{{ resolvedKeyHelp() }}</p>\n\n<!--\n Position announcements, written by the keyboard path only — a drag already\n gives sighted feedback, and announcing every pointer move would flood the\n region.\n-->\n<p class=\"wr-sortable-list__sr-only\" role=\"status\">{{ announcement() }}</p>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { CdkDrag } from '@angular/cdk/drag-drop';\nimport { Component, ElementRef, ViewEncapsulation, computed, effect, inject } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport { WR_SORTABLE_LIST } from './tokens';\n\n/**\n * One row of a {@link WrSortableList}. Write the loop yourself and put whatever\n * the row shows inside it.\n *\n * It replaced a single unnamed `<ng-template let-row let-i=\"index\">` that the\n * list rendered per item. Two things were wrong with that. The template had no\n * name, so nothing in the markup said what the context variables were or where\n * they came from — a reader had to open the component to learn that `let-row`\n * is the item and `let-i` the index. And a row could not carry anything of its\n * own: every per-row decision had to be an input on the LIST, or a branch\n * inside one template.\n *\n * The row is the tab stop, so the keyboard contract lives here: Space or Enter\n * picks it up, the arrows move it, Space or Enter drops it, Escape puts it\n * back. The list owns the array and the announcements, and this delegates to\n * it — an item knows its own position and nothing else.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle>≡</span>\n * {{ row.label }}\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n *\n * @see https://ngwr.dev/reference/components/sortable-list\n */\n@Component({\n selector: 'wr-sortable-item',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [CdkDrag],\n host: {\n class: 'wr-sortable-list__item',\n role: 'listitem',\n '[class.wr-sortable-list__item--grabbed]': 'grabbed()',\n '[attr.tabindex]': 'list.disabled() ? null : 0',\n '[attr.aria-describedby]': 'list.disabled() ? null : list.keyHelpId',\n '(keydown)': 'onKeydown($event)',\n '(focusout)': 'list.onRowFocusout()',\n },\n})\nexport class WrSortableItem {\n /** @internal The list this row belongs to. Read by the host bindings above. */\n protected readonly list = inject(WR_SORTABLE_LIST);\n\n private readonly drag = inject(CdkDrag);\n\n /** @internal */\n readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Position among the list's rows, which IS the index into `items()`: the\n * consumer's own loop renders them in that order.\n *\n * `indexOf` resolves by DOCUMENT ORDER over a plain array and touches no\n * signal, so the `computed` needs a producer that changes whenever a position\n * can. That producer is the `items` ARRAY, not its length: a reorder keeps the\n * count, so a length-keyed index stayed on the slot the row had left, the\n * highlight stayed behind with it, and a second pick-up of the same row moved\n * its old neighbour instead. Host bindings run after the consumer's `@for`\n * has moved the nodes, so the recomputation reads the new order.\n */\n protected readonly index = computed(() => {\n this.list.items();\n return this.list.indexOf(this);\n });\n\n protected readonly grabbed = computed(() => this.list.grabbedIndex() === this.index());\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('sortable-list');\n this.list.register(this);\n\n // Assigned rather than bound, because these belong to the LIST and a host\n // binding cannot reach another directive's input. `CdkDrag` reads all\n // three as plain properties on every gesture, so writing them from an\n // effect is enough and a runtime change takes effect on the next drag.\n effect(() => {\n this.drag.disabled = this.list.disabled();\n this.drag.lockAxis = this.list.lockAxis() ?? null;\n this.drag.dragStartDelay = this.list.dragStartDelay();\n });\n }\n\n /**\n * @internal Resolves the position at the moment of the key, off the DOM,\n * rather than through the cached `index`: nothing has to have rendered\n * between two presses for the answer to be right.\n */\n protected onKeydown(event: KeyboardEvent): void {\n this.list.onRowKeydown(event, this.list.indexOf(this));\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { CdkDragHandle } from '@angular/cdk/drag-drop';\nimport { Directive } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Drag handle for {@link WrSortableList} (and any nested `cdkDrag`).\n * Composes CDK's `cdkDragHandle` via `hostDirectives` so consumers don't\n * need to import the CDK selector directly.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle class=\"grip\">≡</span>\n * <span>{{ row.label }}</span>\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n */\n@Directive({\n selector: '[wrDragHandle]',\n hostDirectives: [CdkDragHandle],\n host: { class: 'wr-drag-handle' },\n})\nexport class WrDragHandle {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('sortable-list');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAa,mBAAmB,IAAI,eAAsC,kBAAkB;;;;;;;ACS5F,SAAS,QAAQ,GAAgB,GAAc;CAE7C,QAAQ,EAAE,wBAAwB,CAAC,IAAI,KAAK,iCAAiC;AAC/E;AAGA,IAAI,kBAAkB;AAqDtB,IAAa,iBAAb,MAAa,eAAc;CAEhB,QAAQ,MAAM,SAAe,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAG7B,cAAc,MAAiC,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAG1D,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAG1D,WAAW,MAA6B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAUlD,iBAAiB,MAAiD;EAAE,OAAO;EAAK,OAAO;CAAC,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA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AAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAaf,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAf1B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,eAAe,kBAAkB;GACjC,gBAAgB,CAAC,OAAO;GACxB,MAAM;IACJ,OAAO;IACP,MAAM;IACN,2CAA2C;IAC3C,mBAAmB;IACnB,2BAA2B;IAC3B,aAAa;IACb,cAAc;GACf;EACF,CAAA;;;;;;;;;;ACzBD,IAAa,eAAb,MAAa,aAAY;CACvB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,eAAe;CAClF;CAHW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAZ,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAY,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,iBAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,cAAA,CAAA;EAAA,UAAA;CAAA,CAAA;;AAAZ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EALxB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,gBAAgB,CAAC,aAAa;GAC9B,MAAM,EAAE,OAAO,iBAAgB;EAChC,CAAA"}
1
+ {"version":3,"file":"ngwr-sortable-list.mjs","names":[],"sources":["../../../projects/lib/sortable-list/tokens/sortable-list.token.ts","../../../projects/lib/sortable-list/sortable-list.ts","../../../projects/lib/sortable-list/sortable-list.html","../../../projects/lib/sortable-list/sortable-item.ts","../../../projects/lib/sortable-list/drag-handle.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken, type WritableSignal, signal } from '@angular/core';\n\nimport type { WrSortableList } from '../sortable-list';\nimport type { WrSortableListContext } from '../types';\n\n/**\n * Token a `<wr-sortable-item>` injects to find its parent `<wr-sortable-list>`.\n *\n * Rows arrive through `<ng-content>`, so nothing in the list's template can\n * bind to them and the child has to reach up — the same shape\n * `<wr-carousel-slide>` and `<wr-tab>` use.\n *\n * @internal\n */\nexport const WR_SORTABLE_LIST = new InjectionToken<WrSortableListContext>('WR_SORTABLE_LIST');\n\n/**\n * Every live `<wr-sortable-list>` of the application. A list reads its group\n * out of it, so two lists connect by name with no common ancestor: each column\n * of a board can sit in its own component.\n *\n * @internal\n */\nexport const WR_SORTABLE_LISTS = new InjectionToken<WritableSignal<readonly WrSortableList[]>>('WR_SORTABLE_LISTS', {\n providedIn: 'root',\n factory: () => signal<readonly WrSortableList[]>([]),\n});\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type CdkDrag, type CdkDragDrop, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n type WritableSignal,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\n\nimport { wrReadI18nText, useI18nFormatter } from 'ngwr/i18n';\n\nimport { WR_SORTABLE_LIST, WR_SORTABLE_LISTS } from './tokens';\nimport type {\n WrSortableCanEnter,\n WrSortableListContext,\n WrSortableMoveEnd,\n WrSortableMoveEvent,\n WrSortableReorderEvent,\n} from './types';\n\n/** Whether `b` comes after `a` in the document. */\nfunction follows(a: HTMLElement, b: HTMLElement): boolean {\n // eslint-disable-next-line no-bitwise -- compareDocumentPosition answers with a bitmask\n return (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0;\n}\n\n/** Counted, not random: the list prerenders, so the id has to match on rehydration. */\nlet sortableListUid = 0;\n\n/**\n * Drag-to-reorder list. Wraps CDK's `cdkDropList` + `cdkDrag` with a\n * signal-based items binding — the source array is updated in place and\n * emitted via 2-way `[(items)]`.\n *\n * Write the loop yourself and project a `<wr-sortable-item>` per row. Until\n * v15 the list owned the loop and rendered one unnamed `<ng-template\n * let-row let-i=\"index\">`, which said nothing in the markup about where those\n * variables came from and gave a row no way to carry anything of its own. Put\n * `wrDragHandle` on an element inside a row to restrict drag start to a\n * handle; there is no input for it, the directive's presence is the switch.\n *\n * Every row is a tab stop: Space or Enter picks it up, the arrow keys move it,\n * Space or Enter drops it and Escape puts it back. CDK's `cdkDrag` ships no key\n * handling of its own, so without this the component's only function was\n * unreachable from a keyboard.\n *\n * Reading direction: a `horizontal` list follows the VISUAL order, so under\n * `dir=\"rtl\"` ArrowLeft moves the held row toward the higher index — the same\n * rule `wr-slider` applies to its track. A vertical list never mirrors.\n *\n * What that does NOT answer is WCAG 2.5.7, which asks for a POINTER alternative\n * to the drag. Click-to-pick-up is the obvious candidate and is not safe here:\n * the CDK's drag-drop bundle installs no click suppressor of any kind, so the\n * mouseup ending a drag still produces a click, and a row that grabbed itself on\n * click would be picking itself straight back up. A visible move-up /\n * move-down affordance is the remaining answer, and that is a design change.\n *\n * Lists that share a `group` exchange items, by drag and by keyboard. The\n * target list emits `move` once, and both lists write `[(items)]`; `reorder`\n * stays for a move inside one list. Lists find each other through a root\n * registry and are handed to `cdkDropListConnectedTo`, not through\n * `cdkDropListGroup`, which needs a common ancestor directive and so cannot\n * join lists that live in separate components.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\" (reorder)=\"onReorder($event)\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle>≡</span>\n * {{ row.label }}\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n *\n * @see https://ngwr.dev/reference/components/sortable-list\n */\n@Component({\n selector: 'wr-sortable-list',\n templateUrl: './sortable-list.html',\n styleUrl: './sortable-list.scss',\n encapsulation: ViewEncapsulation.None,\n // On the host, not in the template: rows are projected, and a projected\n // `cdkDrag` resolves its drop list through the element injector, which\n // never passes through this component's own view.\n hostDirectives: [CdkDropList],\n host: {\n class: 'wr-sortable-list',\n '[class.wr-sortable-list--connected]': '!!group()',\n '[class.wr-sortable-list--empty]': 'items().length === 0',\n '[attr.id]': 'id() ?? fallbackId',\n },\n providers: [{ provide: WR_SORTABLE_LIST, useExisting: WrSortableList }],\n})\nexport class WrSortableList<T = unknown> implements WrSortableListContext {\n /** Items to render. Two-way — emits the reordered array on drop. */\n readonly items = model.required<T[]>();\n\n /** Layout direction. Drives CDK's `cdkDropListOrientation`. @default 'vertical' */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Disable all dragging. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Locked axis — restrict drag movement to one axis even diagonally. */\n readonly lockAxis = input<'x' | 'y' | undefined>(undefined);\n\n /**\n * Delay (ms) before a drag begins after the pointer goes down. The touch\n * delay is the fix for the classic CDK touch snag: without it, the\n * `touch-action: none` CDK puts on each item blocks scrolling the list on a\n * phone. With a small touch delay, a quick swipe scrolls and a brief hold\n * starts the drag; mouse stays instant. Pass a single number to apply one\n * delay to both pointers. @default { touch: 150, mouse: 0 }\n */\n readonly dragStartDelay = input<number | { touch: number; mouse: number }>({ touch: 150, mouse: 0 });\n\n /**\n * Name of the group this list belongs to. Lists with the same group exchange\n * items, wherever they sit in the page. @default null\n */\n readonly group = input<string | null>(null);\n\n /**\n * Refuses an item coming from another list of the group, by drag and by\n * keyboard alike. An item can always return to the list it left.\n * @default null\n */\n readonly canEnter = input<WrSortableCanEnter<T> | null>(null);\n\n /**\n * Accessible name of the list. A keyboard move into this list announces it;\n * without one the announcement falls back to the list's position in the group.\n * @default null\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** The host's `id`, and what tells the lists of a `move` apart. Generated when omitted. */\n readonly id = input<string>();\n\n /** Fired after a successful reorder with the new array + indices. Not fired for a move between lists. */\n readonly reorder = output<WrSortableReorderEvent<T>>();\n\n /**\n * Fired once on the list an item ARRIVED in from another list of the group,\n * after both lists have written `items`. The list it left emits nothing but\n * `itemsChange`.\n */\n readonly move = output<WrSortableMoveEvent<T>>();\n\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly dropList = inject<CdkDropList<WrSortableList<T>>>(CdkDropList, { self: true });\n private readonly lists = inject(WR_SORTABLE_LISTS) as unknown as WritableSignal<readonly WrSortableList<T>[]>;\n private readonly listEl = viewChild.required<ElementRef<HTMLElement>>('list');\n\n /** The other lists of this list's group. */\n private readonly peers = computed(() => {\n const group = this.group();\n return group ? this.lists().filter(list => list !== this && list.group() === group) : [];\n });\n\n /**\n * Ambient reading direction, for the keyboard path.\n *\n * Optional so a bare `TestBed` — or any consumer that never set a direction —\n * needs no provider; `Directionality` is root-provided, so `null` only ever\n * means \"nobody asked\", which is LTR. Nothing caches a direction-derived\n * value: `isRtl()` is read inside the key handler, so a runtime flip needs no\n * subscription to `Directionality.change`.\n *\n * The POINTER path already mirrors without this — `cdkDropList` injects\n * `Directionality` itself and feeds it to `DropListRef.withDirection`, so a\n * horizontal drag has always followed the visual order. The keyboard path was\n * the half that did not, which is why the two disagreed.\n */\n private readonly dir = inject(Directionality, { optional: true });\n\n /**\n * The rows, in projection order, which is the order the consumer's own loop\n * rendered them in — so a row's position here IS its index into `items()`.\n *\n * Collected on construction rather than through `contentChildren`, because\n * the keyboard path has to resolve an index DURING a keydown and a query\n * signal is only guaranteed current after change detection. A row that\n * Angular destroys drops out on the next lookup: the element is gone from\n * the DOM, so `indexOf` cannot find it and the stale entry is swept then.\n */\n private readonly rows: { readonly host: ElementRef<HTMLElement> }[] = [];\n\n /** Index of the row the keyboard is holding, or `null` when nothing is held. */\n readonly grabbedIndex = signal<number | null>(null);\n\n /** Live-region text. Written by the keyboard path only. */\n protected readonly announcement = signal('');\n\n private readonly uid = ++sortableListUid;\n\n /** Links every row to the key model via `aria-describedby`. */\n readonly keyHelpId = `wr-sortable-list-help-${this.uid}`;\n\n protected readonly fallbackId = `wr-sortable-list-${this.uid}`;\n\n private readonly keyHelp = wrReadI18nText(\n 'sortableList.keyHelp',\n 'Press Space to pick this item up, then use the arrow keys to move it. ' +\n 'Press Space again to drop it, or Escape to put it back.'\n );\n private readonly groupKeyHelp = wrReadI18nText(\n 'sortableList.groupKeyHelp',\n 'Press Space to pick this item up, then use the arrow keys to move it, within its list or into the next one. ' +\n 'Press Space again to drop it, or Escape to put it back.'\n );\n protected readonly resolvedKeyHelp = computed(() => (this.group() ? this.groupKeyHelp() : this.keyHelp()));\n\n private readonly grabbedText = useI18nFormatter('sortableList.grabbed', 'Grabbed. {{index}} of {{total}}.');\n private readonly movedText = useI18nFormatter('sortableList.moved', '{{index}} of {{total}}.');\n private readonly droppedText = useI18nFormatter('sortableList.dropped', 'Dropped. {{index}} of {{total}}.');\n private readonly cancelledText = wrReadI18nText('sortableList.cancelled', 'Move cancelled.');\n private readonly movedToText = useI18nFormatter('sortableList.movedTo', 'Moved to {{list}}. {{index}} of {{total}}.');\n private readonly listPositionText = useI18nFormatter('sortableList.listPosition', 'list {{index}} of {{total}}');\n\n /** Where the held row started, which can be another list. Escape puts it back there. */\n private grabOrigin: WrSortableMoveEnd<T> | null = null;\n\n /** True while a keyboard move is handing focus back — see `onRowFocusout`. */\n private restoringFocus = false;\n\n constructor() {\n this.lists.update(lists => [...lists, this]);\n inject(DestroyRef).onDestroy(() => this.lists.update(lists => lists.filter(list => list !== this)));\n\n const dropList = this.dropList;\n dropList.data = this;\n dropList.elementContainerSelector = '.wr-sortable-list__list';\n dropList.enterPredicate = (drag: CdkDrag<T>) => {\n const from = drag.dropContainer?.data as WrSortableList<T> | undefined;\n return !!from && this.accepts(drag.data, from);\n };\n dropList.dropped.subscribe((event: CdkDragDrop<WrSortableList<T>>) => this.onDrop(event));\n\n // Assigned, not bound: a host directive's inputs are out of a host binding's reach.\n effect(() => {\n dropList.id = this.id() ?? this.fallbackId;\n dropList.orientation = this.orientation();\n dropList.disabled = this.disabled();\n dropList.connectedTo = this.peers().map(list => list.dropList);\n });\n\n // The CDK resolves the selector above only on the list a drag STARTS in. A\n // list that only ever receives would append the placeholder to the host,\n // beside the rows' container rather than in it.\n afterNextRender(() => dropList._dropListRef.withElementContainer(this.listEl().nativeElement));\n }\n\n private onDrop(event: CdkDragDrop<WrSortableList<T>>): void {\n if (event.previousContainer !== event.container) {\n const source = event.previousContainer.data;\n const item = source.removeAt(event.previousIndex);\n this.insertAt(item, event.currentIndex);\n this.move.emit({\n item,\n from: { list: source, index: event.previousIndex },\n to: { list: this, index: event.currentIndex },\n });\n return;\n }\n if (event.previousIndex === event.currentIndex) return;\n const next = this.items().slice();\n moveItemInArray(next, event.previousIndex, event.currentIndex);\n this.items.set(next);\n this.reorder.emit({\n items: next,\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n item: next[event.currentIndex],\n });\n }\n\n /**\n * The keyboard reorder path: pick up, move, drop — deliberately a two-step\n * grab rather than \"an arrow moves the focused row\", so that arrowing through\n * a list a user is only reading can never rearrange it.\n *\n * Keys are handled only when the ROW itself is the event target; a button or\n * an input projected into the row template keeps every key it would normally\n * get.\n */\n /** @internal A row registering itself on construction. */\n register(item: { readonly host: ElementRef<HTMLElement> }): void {\n this.rows.push(item);\n }\n\n /**\n * @internal A row's position among its live siblings.\n *\n * Read off the DOM rather than off the registration order, because a row can\n * be added, removed or moved by the consumer's own loop and construction\n * order survives none of those. Rows whose element has left the document are\n * swept here, which is the only place that can tell.\n */\n indexOf(item: { readonly host: ElementRef<HTMLElement> }): number {\n this.sortRows();\n return this.rows.indexOf(item);\n }\n\n /**\n * Drops rows whose element has left the document and puts the rest into\n * document order.\n *\n * Its own method because `relocate` needs it too: that one focuses\n * `rows[to]` after the move, and without a re-sort it reached into an array\n * still ordered as the list looked BEFORE the move.\n */\n private sortRows(): void {\n for (let i = this.rows.length - 1; i >= 0; i -= 1) {\n if (!this.rows[i].host.nativeElement.isConnected) this.rows.splice(i, 1);\n }\n this.rows.sort((a, b) => (follows(a.host.nativeElement, b.host.nativeElement) ? -1 : 1));\n }\n\n /** @internal */\n onRowKeydown(event: KeyboardEvent, index: number): void {\n if (this.disabled() || event.target !== event.currentTarget) return;\n\n const grabbed = this.grabbedIndex();\n const horizontal = this.orientation() === 'horizontal';\n // The horizontal arrows name a SIDE of the row, so they follow the reading\n // direction: a horizontal list under `dir=\"rtl\"` paints index 0 at the right,\n // so the key that raises the index is ArrowLeft. Raising it on ArrowRight\n // regardless moved the held item away from the arrow the user pressed — the\n // one failure in this set a user cannot rationalise, because it inverts their\n // model of the list silently. The block arrows name a value's direction in a\n // column and never mirror, which is why only the horizontal pair is swapped.\n const rtl = this.dir?.value === 'rtl';\n const inlineForward = rtl ? 'ArrowLeft' : 'ArrowRight';\n const inlineBack = rtl ? 'ArrowRight' : 'ArrowLeft';\n const forward = horizontal ? inlineForward : 'ArrowDown';\n const back = horizontal ? inlineBack : 'ArrowUp';\n // The arrows of the other axis walk the group: columns sit side by side, so\n // a vertical list hands the row over on the inline pair, mirrored like above.\n const nextList = horizontal ? 'ArrowDown' : inlineForward;\n const previousList = horizontal ? 'ArrowUp' : inlineBack;\n\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n if (grabbed === null) this.grab(index);\n else this.drop();\n return;\n }\n\n if (grabbed === null) return;\n\n if (event.key === 'Escape') {\n event.preventDefault();\n // Held only while a row is grabbed — an Escape typed anywhere else has to\n // keep reaching whatever dialog or overlay the list is sitting in.\n event.stopPropagation();\n this.cancelGrab();\n return;\n }\n\n if (event.key === forward || event.key === back) {\n event.preventDefault();\n this.moveGrabbed(event.key === forward ? 1 : -1);\n return;\n }\n\n if (this.group() && (event.key === nextList || event.key === previousList)) {\n event.preventDefault();\n this.moveToList(event.key === nextList ? 1 : -1);\n }\n }\n\n /**\n * Focus leaving a held row ends the gesture as a drop rather than dropping the\n * change on the floor — `[(items)]` has already been written by then, so a\n * silent release would leave `reorder` never reporting a move that happened.\n * The guard is what makes it safe: moving a focused node in the DOM blurs it,\n * so every keyboard move fires this too.\n */\n /** @internal */\n onRowFocusout(): void {\n if (this.restoringFocus || this.grabbedIndex() === null) return;\n this.drop();\n }\n\n private grab(index: number): void {\n this.grabOrigin = { list: this, index };\n this.grabbedIndex.set(index);\n this.announcement.set(this.grabbedText(this.position(index)));\n }\n\n private moveGrabbed(delta: number): void {\n const from = this.grabbedIndex();\n if (from === null) return;\n const to = from + delta;\n if (to < 0 || to >= this.items().length) return;\n\n this.relocate(from, to);\n this.grabbedIndex.set(to);\n this.announcement.set(this.movedText(this.position(to)));\n }\n\n /**\n * Hands the held row to the nearest list of the group, in document order,\n * that takes it. A list that refuses is stepped over, since a drag can reach\n * any list of the group and the keyboard must not reach fewer.\n */\n private moveToList(step: 1 | -1): void {\n const from = this.grabbedIndex();\n const origin = this.grabOrigin;\n if (from === null || !origin) return;\n\n const group = this.groupLists();\n const item = this.items()[from];\n let at = group.indexOf(this) + step;\n while (group[at] && !group[at].accepts(item, origin.list)) at += step;\n const target = group[at];\n if (!target) return;\n\n this.grabbedIndex.set(null);\n this.grabOrigin = null;\n this.announcement.set('');\n this.removeAt(from);\n\n const to = Math.min(from, target.items().length);\n target.insertAt(item, to);\n target.grabOrigin = origin;\n target.grabbedIndex.set(to);\n const list =\n target.ariaLabel() ?? target.listPositionText({ index: group.indexOf(target) + 1, total: group.length });\n target.announcement.set(target.movedToText({ list, ...target.position(to) }));\n target.focusRow(to);\n }\n\n private drop(): void {\n const to = this.grabbedIndex();\n const origin = this.grabOrigin;\n this.grabbedIndex.set(null);\n this.grabOrigin = null;\n if (to === null || !origin) return;\n\n this.announcement.set(this.droppedText(this.position(to)));\n if (origin.list !== this) {\n this.move.emit({ item: this.items()[to], from: origin, to: { list: this, index: to } });\n return;\n }\n if (origin.index === to) return;\n // One event per gesture, the way a drag emits one on drop — not one per\n // arrow press, which would put a host that persists on `reorder` through a\n // write per keystroke. `[(items)]` still updates on every press, because\n // the rendered order has to follow the row the user is moving.\n this.reorder.emit({ items: this.items(), previousIndex: origin.index, currentIndex: to, item: this.items()[to] });\n }\n\n private cancelGrab(): void {\n const from = this.grabbedIndex();\n const origin = this.grabOrigin;\n if (from === null || !origin) return;\n this.grabbedIndex.set(null);\n this.grabOrigin = null;\n\n if (origin.list === this) {\n if (from !== origin.index) this.relocate(from, origin.index);\n this.announcement.set(this.cancelledText());\n return;\n }\n this.announcement.set('');\n origin.list.insertAt(this.removeAt(from), origin.index);\n origin.list.announcement.set(origin.list.cancelledText());\n origin.list.focusRow(origin.index);\n }\n\n /** Whether this list takes `item` from another list of the group. */\n private accepts(item: T, from: WrSortableList<T>): boolean {\n return !this.disabled() && (from === this || (this.canEnter()?.(item, from) ?? true));\n }\n\n /** This list and its peers, in document order. */\n private groupLists(): WrSortableList<T>[] {\n return [this, ...this.peers()].sort((a, b) => (follows(a.host.nativeElement, b.host.nativeElement) ? -1 : 1));\n }\n\n private removeAt(index: number): T {\n const next = this.items().slice();\n const [item] = next.splice(index, 1);\n this.items.set(next);\n return item;\n }\n\n private insertAt(item: T, index: number): void {\n const next = this.items().slice();\n next.splice(index, 0, item);\n this.items.set(next);\n }\n\n private relocate(from: number, to: number): void {\n const next = this.items().slice();\n moveItemInArray(next, from, to);\n this.items.set(next);\n this.focusRow(to);\n }\n\n private focusRow(to: number): void {\n // The row is the same DOM node moved to another slot, and moving a focused\n // node hands focus back to `<body>` — so it has to be taken again once the\n // move has rendered. `afterNextRender`, never a microtask: zoneless change\n // detection runs in a macrotask, so a microtask would fire while the row is\n // still at its old index and focus the wrong one. (jsdom keeps focus across\n // a node move, so no spec here can express that half.)\n this.restoringFocus = true;\n afterNextRender(\n () => {\n // Re-sorted FIRST. `this.rows` is only ever put into document order by\n // `indexOf`, and nothing calls it between the move and here — so the\n // array was still in the order it had BEFORE the move, and `rows[to]`\n // was whichever row used to be at that slot. `sortRows()` is the same\n // sweep-and-sort `indexOf` runs; after it, index `to` is the row the\n // move actually put there.\n this.sortRows();\n this.rows[to]?.host.nativeElement.focus();\n this.restoringFocus = false;\n },\n { injector: this.injector }\n );\n }\n\n private position(index: number): { index: number; total: number } {\n return { index: index + 1, total: this.items().length };\n }\n}\n\nexport type { WrSortableCanEnter, WrSortableMoveEnd, WrSortableMoveEvent, WrSortableReorderEvent } from './types';\n","<!--\n `role=\"list\"` on the container and `role=\"listitem\"` on each row rather than\n bare divs: every row is a tab stop, and a focusable element with no role at\n all is announced as loose text. The list role is what gives the reader the\n position of the row focus lands on.\n\n Rows arrive through `<ng-content>` — the consumer writes the loop, so the\n markup says what each row is instead of hiding it in an unnamed template.\n-->\n<div #list role=\"list\" class=\"wr-sortable-list__list\" [attr.aria-label]=\"ariaLabel()\">\n <ng-content />\n @if (items().length === 0) {\n <!-- A row of its own, so the list announces what it shows; hidden by `:empty` when nothing is projected. -->\n <div role=\"listitem\" class=\"wr-sortable-list__empty\"><ng-content select=\"[wrSortableListEmpty]\" /></div>\n }\n</div>\n\n<!--\n The key model, on every row rather than once on the container: focus lands on\n a row and never on the list itself, so a description hung on the list would\n never be read out.\n-->\n<p class=\"wr-sortable-list__sr-only\" [id]=\"keyHelpId\">{{ resolvedKeyHelp() }}</p>\n\n<!--\n Position announcements, written by the keyboard path only — a drag already\n gives sighted feedback, and announcing every pointer move would flood the\n region.\n-->\n<p class=\"wr-sortable-list__sr-only\" role=\"status\">{{ announcement() }}</p>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { CdkDrag } from '@angular/cdk/drag-drop';\nimport { Component, ElementRef, ViewEncapsulation, computed, effect, inject } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport { WR_SORTABLE_LIST } from './tokens';\n\n/**\n * One row of a {@link WrSortableList}. Write the loop yourself and put whatever\n * the row shows inside it.\n *\n * It replaced a single unnamed `<ng-template let-row let-i=\"index\">` that the\n * list rendered per item. Two things were wrong with that. The template had no\n * name, so nothing in the markup said what the context variables were or where\n * they came from — a reader had to open the component to learn that `let-row`\n * is the item and `let-i` the index. And a row could not carry anything of its\n * own: every per-row decision had to be an input on the LIST, or a branch\n * inside one template.\n *\n * The row is the tab stop, so the keyboard contract lives here: Space or Enter\n * picks it up, the arrows move it, Space or Enter drops it, Escape puts it\n * back. The list owns the array and the announcements, and this delegates to\n * it — an item knows its own position and nothing else.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle>≡</span>\n * {{ row.label }}\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n *\n * @see https://ngwr.dev/reference/components/sortable-list\n */\n@Component({\n selector: 'wr-sortable-item',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [CdkDrag],\n host: {\n class: 'wr-sortable-list__item',\n role: 'listitem',\n '[class.wr-sortable-list__item--grabbed]': 'grabbed()',\n '[attr.tabindex]': 'list.disabled() ? null : 0',\n '[attr.aria-describedby]': 'list.disabled() ? null : list.keyHelpId',\n '(keydown)': 'onKeydown($event)',\n '(focusout)': 'list.onRowFocusout()',\n },\n})\nexport class WrSortableItem {\n /** @internal The list this row belongs to. Read by the host bindings above. */\n protected readonly list = inject(WR_SORTABLE_LIST);\n\n private readonly drag = inject(CdkDrag);\n\n /** @internal */\n readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Position among the list's rows, which IS the index into `items()`: the\n * consumer's own loop renders them in that order.\n *\n * `indexOf` resolves by DOCUMENT ORDER over a plain array and touches no\n * signal, so the `computed` needs a producer that changes whenever a position\n * can. That producer is the `items` ARRAY, not its length: a reorder keeps the\n * count, so a length-keyed index stayed on the slot the row had left, the\n * highlight stayed behind with it, and a second pick-up of the same row moved\n * its old neighbour instead. Host bindings run after the consumer's `@for`\n * has moved the nodes, so the recomputation reads the new order.\n */\n protected readonly index = computed(() => {\n this.list.items();\n return this.list.indexOf(this);\n });\n\n protected readonly grabbed = computed(() => this.list.grabbedIndex() === this.index());\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('sortable-list');\n this.list.register(this);\n\n // Assigned rather than bound, because these belong to the LIST and a host\n // binding cannot reach another directive's input. `CdkDrag` reads all\n // three as plain properties on every gesture, so writing them from an\n // effect is enough and a runtime change takes effect on the next drag.\n effect(() => {\n this.drag.disabled = this.list.disabled();\n this.drag.lockAxis = this.list.lockAxis() ?? null;\n this.drag.dragStartDelay = this.list.dragStartDelay();\n });\n\n // What a connected list's `canEnter` is asked about.\n effect(() => {\n this.drag.data = this.list.items()[this.index()];\n });\n }\n\n /**\n * @internal Resolves the position at the moment of the key, off the DOM,\n * rather than through the cached `index`: nothing has to have rendered\n * between two presses for the answer to be right.\n */\n protected onKeydown(event: KeyboardEvent): void {\n this.list.onRowKeydown(event, this.list.indexOf(this));\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { CdkDragHandle } from '@angular/cdk/drag-drop';\nimport { Directive } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Drag handle for {@link WrSortableList} (and any nested `cdkDrag`).\n * Composes CDK's `cdkDragHandle` via `hostDirectives` so consumers don't\n * need to import the CDK selector directly.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle class=\"grip\">≡</span>\n * <span>{{ row.label }}</span>\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n */\n@Directive({\n selector: '[wrDragHandle]',\n hostDirectives: [CdkDragHandle],\n host: { class: 'wr-drag-handle' },\n})\nexport class WrDragHandle {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('sortable-list');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAqBA,MAAa,mBAAmB,IAAI,eAAsC,kBAAkB;AAS5F,MAAa,oBAAoB,IAAI,eAA0D,qBAAqB;CAClH,YAAY;CACZ,eAAe,OAAkC,CAAA,CAAE;AACpD,CAAA;;;;;;;ACOD,SAAS,QAAQ,GAAgB,GAAc;CAE7C,QAAQ,EAAE,wBAAwB,CAAC,IAAI,KAAK,iCAAiC;AAC/E;AAGA,IAAI,kBAAkB;AAoEtB,IAAa,iBAAb,MAAa,eAAc;CAEhB,QAAQ,MAAM,SAAe,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAG7B,cAAc,MAAiC,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAG1D,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAG1D,WAAW,MAA6B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAUlD,iBAAiB,MAAiD;EAAE,OAAO;EAAK,OAAO;CAAC,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;CAM3F,QAAQ,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAOlC,WAAW,MAAoC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAOpD,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,C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;;;ACzBD,IAAa,eAAb,MAAa,aAAY;CACvB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,eAAe;CAClF;CAHW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAZ,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAY,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,iBAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,cAAA,CAAA;EAAA,UAAA;CAAA,CAAA;;AAAZ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EALxB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,gBAAgB,CAAC,aAAa;GAC9B,MAAM,EAAE,OAAO,iBAAgB;EAChC,CAAA"}
@@ -5,7 +5,7 @@ import { InjectionToken } from "@angular/core";
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
7
7
  */
8
- const NGWR_VERSION = "16.1.0";
8
+ const NGWR_VERSION = "16.2.0";
9
9
  /**
10
10
  * @license
11
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-version.mjs","names":[],"sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release/prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '16.1.0';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport { NGWR_VERSION } from './version';\n\n/**\n * Injection token holding the ngwr library version string.\n *\n * Default factory returns {@link NGWR_VERSION}. Override it in tests or in\n * apps that want to surface a custom build identifier.\n *\n * @example\n * ```ts\n * @Component({...})\n * export class FooterComponent {\n * readonly version = inject(NGWR_VERSION_TOKEN);\n * }\n * ```\n */\nexport const NGWR_VERSION_TOKEN = new InjectionToken<string>('NGWR_VERSION_TOKEN', {\n providedIn: 'root',\n factory: () => NGWR_VERSION,\n});\n"],"mappings":";;;;;;;AAiBA,MAAa,eAAe;;;;;;;ACQ5B,MAAa,qBAAqB,IAAI,eAAuB,sBAAsB;CACjF,YAAY;CACZ,eAAe;AAChB,CAAA"}
1
+ {"version":3,"file":"ngwr-version.mjs","names":[],"sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release/prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '16.2.0';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport { NGWR_VERSION } from './version';\n\n/**\n * Injection token holding the ngwr library version string.\n *\n * Default factory returns {@link NGWR_VERSION}. Override it in tests or in\n * apps that want to surface a custom build identifier.\n *\n * @example\n * ```ts\n * @Component({...})\n * export class FooterComponent {\n * readonly version = inject(NGWR_VERSION_TOKEN);\n * }\n * ```\n */\nexport const NGWR_VERSION_TOKEN = new InjectionToken<string>('NGWR_VERSION_TOKEN', {\n providedIn: 'root',\n factory: () => NGWR_VERSION,\n});\n"],"mappings":";;;;;;;AAiBA,MAAa,eAAe;;;;;;;ACQ5B,MAAa,qBAAqB,IAAI,eAAuB,sBAAsB;CACjF,YAAY;CACZ,eAAe;AAChB,CAAA"}
package/i18n/ar.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "تم الالتقاط. {{index}} من {{total}}.",
210
210
  "moved": "{{index}} من {{total}}.",
211
211
  "dropped": "تم الإفلات. {{index}} من {{total}}.",
212
- "cancelled": "تم إلغاء النقل."
212
+ "cancelled": "تم إلغاء النقل.",
213
+ "groupKeyHelp": "اضغط مفتاح المسافة لالتقاط هذا العنصر، ثم استخدم مفاتيح الأسهم لتحريكه داخل قائمته أو إلى القائمة المجاورة. اضغط مفتاح المسافة مرة أخرى لإفلاته، أو Escape لإعادته إلى مكانه.",
214
+ "movedTo": "تم النقل إلى {{list}}. {{index}} من {{total}}.",
215
+ "listPosition": "القائمة {{index}} من {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "التشبع والسطوع، {{saturation}}% و{{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "معاينة الصورة",
337
340
  "open": "فتح المعاينة",
338
- "close": "إغلاق المعاينة"
341
+ "close": "إغلاق المعاينة",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "الصورة {{current}} من {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "إغلاق",
package/i18n/cs.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Uchopeno. {{index}} z {{total}}.",
210
210
  "moved": "{{index}} z {{total}}.",
211
211
  "dropped": "Položeno. {{index}} z {{total}}.",
212
- "cancelled": "Přesun zrušen."
212
+ "cancelled": "Přesun zrušen.",
213
+ "groupKeyHelp": "Mezerníkem položku uchopíte, šipkami ji přesunete v seznamu nebo do sousedního seznamu. Dalším stisknutím mezerníku ji položíte, klávesou Escape ji vrátíte zpět.",
214
+ "movedTo": "Přesunuto do: {{list}}. {{index}} z {{total}}.",
215
+ "listPosition": "seznam {{index}} z {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Sytost a jas, {{saturation}} % a {{brightness}} %",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Náhled obrázku",
337
340
  "open": "Otevřít náhled",
338
- "close": "Zavřít náhled"
341
+ "close": "Zavřít náhled",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Obrázek {{current}} z {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Zavřít",
package/i18n/de.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Aufgenommen. {{index}} von {{total}}.",
210
210
  "moved": "{{index}} von {{total}}.",
211
211
  "dropped": "Abgelegt. {{index}} von {{total}}.",
212
- "cancelled": "Verschieben abgebrochen."
212
+ "cancelled": "Verschieben abgebrochen.",
213
+ "groupKeyHelp": "Drücken Sie die Leertaste, um dieses Element aufzunehmen, und verschieben Sie es dann mit den Pfeiltasten, innerhalb der Liste oder in die benachbarte Liste. Drücken Sie die Leertaste erneut, um es abzulegen, oder Escape, um es an seinen Platz zurückzulegen.",
214
+ "movedTo": "Verschoben nach {{list}}. {{index}} von {{total}}.",
215
+ "listPosition": "Liste {{index}} von {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Sättigung und Helligkeit, {{saturation}} % und {{brightness}} %",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Bildvorschau",
337
340
  "open": "Vorschau öffnen",
338
- "close": "Vorschau schließen"
341
+ "close": "Vorschau schließen",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Bild {{current}} von {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Schließen",
package/i18n/en.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Grabbed. {{index}} of {{total}}.",
210
210
  "moved": "{{index}} of {{total}}.",
211
211
  "dropped": "Dropped. {{index}} of {{total}}.",
212
- "cancelled": "Move cancelled."
212
+ "cancelled": "Move cancelled.",
213
+ "groupKeyHelp": "Press Space to pick this item up, then use the arrow keys to move it, within its list or into the next one. Press Space again to drop it, or Escape to put it back.",
214
+ "movedTo": "Moved to {{list}}. {{index}} of {{total}}.",
215
+ "listPosition": "list {{index}} of {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Saturation and brightness, {{saturation}}% and {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Image preview",
337
340
  "open": "Open preview",
338
- "close": "Close preview"
341
+ "close": "Close preview",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Image {{current}} of {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Close",
package/i18n/es.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Elemento levantado. {{index}} de {{total}}.",
210
210
  "moved": "{{index}} de {{total}}.",
211
211
  "dropped": "Elemento soltado. {{index}} de {{total}}.",
212
- "cancelled": "Movimiento cancelado."
212
+ "cancelled": "Movimiento cancelado.",
213
+ "groupKeyHelp": "Pulsa Espacio para levantar este elemento y muévelo con las flechas, dentro de su lista o a la lista contigua. Pulsa Espacio otra vez para soltarlo o Escape para devolverlo a su sitio.",
214
+ "movedTo": "Movido a {{list}}. {{index}} de {{total}}.",
215
+ "listPosition": "lista {{index}} de {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Saturación y brillo, {{saturation}}% y {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Vista previa de la imagen",
337
340
  "open": "Abrir vista previa",
338
- "close": "Cerrar vista previa"
341
+ "close": "Cerrar vista previa",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Imagen {{current}} de {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Cerrar",
package/i18n/fr.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Élément saisi. {{index}} sur {{total}}.",
210
210
  "moved": "{{index}} sur {{total}}.",
211
211
  "dropped": "Élément déposé. {{index}} sur {{total}}.",
212
- "cancelled": "Déplacement annulé."
212
+ "cancelled": "Déplacement annulé.",
213
+ "groupKeyHelp": "Appuyez sur Espace pour saisir cet élément, puis déplacez-le avec les touches fléchées, dans sa liste ou vers la liste voisine. Appuyez de nouveau sur Espace pour le déposer, ou sur Échap pour le remettre à sa place.",
214
+ "movedTo": "Déplacé vers {{list}}. {{index}} sur {{total}}.",
215
+ "listPosition": "liste {{index}} sur {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Saturation et luminosité, {{saturation}}% et {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Aperçu de l'image",
337
340
  "open": "Ouvrir l'aperçu",
338
- "close": "Fermer l'aperçu"
341
+ "close": "Fermer l'aperçu",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Image {{current}} sur {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Fermer",
package/i18n/he.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "הורם. {{index}} מתוך {{total}}.",
210
210
  "moved": "{{index}} מתוך {{total}}.",
211
211
  "dropped": "הונח. {{index}} מתוך {{total}}.",
212
- "cancelled": "ההזזה בוטלה."
212
+ "cancelled": "ההזזה בוטלה.",
213
+ "groupKeyHelp": "לחיצה על מקש הרווח מרימה את הפריט, ואז מקשי החיצים מזיזים אותו בתוך הרשימה או אל הרשימה הסמוכה. רווח נוסף מניח אותו, ו-Escape מחזיר אותו למקומו.",
214
+ "movedTo": "הועבר אל {{list}}. {{index}} מתוך {{total}}.",
215
+ "listPosition": "רשימה {{index}} מתוך {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "רוויה ובהירות, {{saturation}}% ו-{{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "תצוגה מקדימה של התמונה",
337
340
  "open": "פתיחת התצוגה המקדימה",
338
- "close": "סגירת התצוגה המקדימה"
341
+ "close": "סגירת התצוגה המקדימה",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "תמונה {{current}} מתוך {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "סגירה",
package/i18n/hi.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "उठाया गया। {{total}} में से {{index}}।",
210
210
  "moved": "{{total}} में से {{index}}।",
211
211
  "dropped": "छोड़ा गया। {{total}} में से {{index}}।",
212
- "cancelled": "स्थानांतरण रद्द किया गया।"
212
+ "cancelled": "स्थानांतरण रद्द किया गया।",
213
+ "groupKeyHelp": "इस आइटम को उठाने के लिए स्पेस दबाएं, फिर तीर कुंजियों से इसे इसकी सूची के भीतर या बगल की सूची में खिसकाएं। छोड़ने के लिए फिर से स्पेस दबाएं, या वापस रखने के लिए Escape दबाएं।",
214
+ "movedTo": "{{list}} में ले जाया गया। {{total}} में से {{index}}।",
215
+ "listPosition": "{{total}} में से सूची {{index}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "संतृप्ति और चमक, {{saturation}}% और {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "इमेज प्रीव्यू",
337
340
  "open": "प्रीव्यू खोलें",
338
- "close": "प्रीव्यू बंद करें"
341
+ "close": "प्रीव्यू बंद करें",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "{{total}} में से इमेज {{current}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "बंद करें",
package/i18n/id.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Diangkat. {{index}} dari {{total}}.",
210
210
  "moved": "{{index}} dari {{total}}.",
211
211
  "dropped": "Dilepaskan. {{index}} dari {{total}}.",
212
- "cancelled": "Pemindahan dibatalkan."
212
+ "cancelled": "Pemindahan dibatalkan.",
213
+ "groupKeyHelp": "Tekan Spasi untuk mengangkat item ini, lalu gunakan tombol panah untuk memindahkannya di dalam daftar atau ke daftar di sebelahnya. Tekan Spasi lagi untuk melepaskannya, atau Escape untuk mengembalikannya.",
214
+ "movedTo": "Dipindahkan ke {{list}}. {{index}} dari {{total}}.",
215
+ "listPosition": "daftar {{index}} dari {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Saturasi dan kecerahan, {{saturation}}% dan {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Pratinjau gambar",
337
340
  "open": "Buka pratinjau",
338
- "close": "Tutup pratinjau"
341
+ "close": "Tutup pratinjau",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Gambar {{current}} dari {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Tutup",
package/i18n/it.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Preso. {{index}} di {{total}}.",
210
210
  "moved": "{{index}} di {{total}}.",
211
211
  "dropped": "Rilasciato. {{index}} di {{total}}.",
212
- "cancelled": "Spostamento annullato."
212
+ "cancelled": "Spostamento annullato.",
213
+ "groupKeyHelp": "Premi la barra spaziatrice per prendere questo elemento, poi spostalo con i tasti freccia, nel suo elenco o nell'elenco accanto. Premi di nuovo la barra spaziatrice per rilasciarlo oppure Esc per rimetterlo al suo posto.",
214
+ "movedTo": "Spostato in {{list}}. {{index}} di {{total}}.",
215
+ "listPosition": "elenco {{index}} di {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Saturazione e luminosità, {{saturation}}% e {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Anteprima immagine",
337
340
  "open": "Apri anteprima",
338
- "close": "Chiudi anteprima"
341
+ "close": "Chiudi anteprima",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Immagine {{current}} di {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Chiudi",
package/i18n/ja.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "持ち上げました。{{total}}件中{{index}}件目。",
210
210
  "moved": "{{total}}件中{{index}}件目。",
211
211
  "dropped": "ドロップしました。{{total}}件中{{index}}件目。",
212
- "cancelled": "移動をキャンセルしました。"
212
+ "cancelled": "移動をキャンセルしました。",
213
+ "groupKeyHelp": "スペースキーで項目を持ち上げ、矢印キーでリスト内または隣のリストへ移動します。もう一度スペースキーでドロップ、Escape キーで元の位置に戻します。",
214
+ "movedTo": "{{list}}に移動しました。{{total}}件中{{index}}件目。",
215
+ "listPosition": "リスト {{index}}/{{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "彩度{{saturation}}%、明度{{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "画像プレビュー",
337
340
  "open": "プレビューを開く",
338
- "close": "プレビューを閉じる"
341
+ "close": "プレビューを閉じる",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "画像 {{total}} 枚中 {{current}} 枚目"
339
344
  },
340
345
  "window": {
341
346
  "close": "閉じる",
package/i18n/ko.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "집었습니다. {{total}}개 중 {{index}}번째.",
210
210
  "moved": "{{total}}개 중 {{index}}번째.",
211
211
  "dropped": "내려놓았습니다. {{total}}개 중 {{index}}번째.",
212
- "cancelled": "이동을 취소했습니다."
212
+ "cancelled": "이동을 취소했습니다.",
213
+ "groupKeyHelp": "스페이스 키를 누르면 항목을 집고, 화살표 키로 목록 안에서 또는 옆 목록으로 옮길 수 있습니다. 스페이스 키를 다시 누르면 내려놓고, Esc 키를 누르면 제자리로 되돌립니다.",
214
+ "movedTo": "{{list}}(으)로 옮겼습니다. {{total}}개 중 {{index}}번째.",
215
+ "listPosition": "목록 {{total}}개 중 {{index}}번째"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "채도 {{saturation}}%, 명도 {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "이미지 미리 보기",
337
340
  "open": "미리 보기 열기",
338
- "close": "미리 보기 닫기"
341
+ "close": "미리 보기 닫기",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "이미지 {{total}}개 중 {{current}}번째"
339
344
  },
340
345
  "window": {
341
346
  "close": "닫기",
package/i18n/nl.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Opgepakt. {{index}} van {{total}}.",
210
210
  "moved": "{{index}} van {{total}}.",
211
211
  "dropped": "Neergezet. {{index}} van {{total}}.",
212
- "cancelled": "Verplaatsing geannuleerd."
212
+ "cancelled": "Verplaatsing geannuleerd.",
213
+ "groupKeyHelp": "Druk op de spatiebalk om dit item op te pakken en verplaats het daarna met de pijltoetsen, binnen de lijst of naar de lijst ernaast. Druk nogmaals op de spatiebalk om het neer te zetten, of op Escape om het terug te zetten.",
214
+ "movedTo": "Verplaatst naar {{list}}. {{index}} van {{total}}.",
215
+ "listPosition": "lijst {{index}} van {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Verzadiging en helderheid, {{saturation}}% en {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Afbeeldingsvoorbeeld",
337
340
  "open": "Voorbeeld openen",
338
- "close": "Voorbeeld sluiten"
341
+ "close": "Voorbeeld sluiten",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Afbeelding {{current}} van {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Sluiten",
package/i18n/pl.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Podniesiono. {{index}} z {{total}}.",
210
210
  "moved": "{{index}} z {{total}}.",
211
211
  "dropped": "Upuszczono. {{index}} z {{total}}.",
212
- "cancelled": "Przenoszenie anulowane."
212
+ "cancelled": "Przenoszenie anulowane.",
213
+ "groupKeyHelp": "Naciśnij spację, aby podnieść ten element, a następnie przesuwaj go strzałkami w obrębie listy lub na sąsiednią listę. Naciśnij spację ponownie, aby go upuścić, albo Escape, aby cofnąć przenoszenie.",
214
+ "movedTo": "Przeniesiono do: {{list}}. {{index}} z {{total}}.",
215
+ "listPosition": "lista {{index}} z {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Nasycenie i jasność, {{saturation}}% i {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Podgląd obrazu",
337
340
  "open": "Otwórz podgląd",
338
- "close": "Zamknij podgląd"
341
+ "close": "Zamknij podgląd",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Obraz {{current}} z {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Zamknij",
package/i18n/pt.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Agarrado. {{index}} de {{total}}.",
210
210
  "moved": "{{index}} de {{total}}.",
211
211
  "dropped": "Largado. {{index}} de {{total}}.",
212
- "cancelled": "Movimento cancelado."
212
+ "cancelled": "Movimento cancelado.",
213
+ "groupKeyHelp": "Prima a barra de espaços para agarrar este item e depois use as teclas de setas para o mover, dentro da lista ou para a lista ao lado. Prima novamente a barra de espaços para o largar ou Escape para o voltar a colocar.",
214
+ "movedTo": "Movido para {{list}}. {{index}} de {{total}}.",
215
+ "listPosition": "lista {{index}} de {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Saturação e brilho, {{saturation}}% e {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Pré-visualização da imagem",
337
340
  "open": "Abrir pré-visualização",
338
- "close": "Fechar pré-visualização"
341
+ "close": "Fechar pré-visualização",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Imagem {{current}} de {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Fechar",
package/i18n/ru.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Взят. {{index}} из {{total}}.",
210
210
  "moved": "{{index}} из {{total}}.",
211
211
  "dropped": "Отпущен. {{index}} из {{total}}.",
212
- "cancelled": "Перемещение отменено."
212
+ "cancelled": "Перемещение отменено.",
213
+ "groupKeyHelp": "Нажмите пробел, чтобы взять элемент, затем перемещайте его стрелками внутри списка или в соседний список. Нажмите пробел ещё раз, чтобы отпустить, или Escape, чтобы вернуть на место.",
214
+ "movedTo": "Перемещено: {{list}}. {{index}} из {{total}}.",
215
+ "listPosition": "список {{index}} из {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Насыщенность и яркость, {{saturation}}% и {{brightness}}%",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Просмотр изображения",
337
340
  "open": "Открыть превью",
338
- "close": "Закрыть превью"
341
+ "close": "Закрыть превью",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Изображение {{current}} из {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Закрыть",
package/i18n/sv.json CHANGED
@@ -209,7 +209,10 @@
209
209
  "grabbed": "Upplyft. {{index}} av {{total}}.",
210
210
  "moved": "{{index}} av {{total}}.",
211
211
  "dropped": "Släppt. {{index}} av {{total}}.",
212
- "cancelled": "Flytten avbröts."
212
+ "cancelled": "Flytten avbröts.",
213
+ "groupKeyHelp": "Tryck på blanksteg för att ta upp objektet och flytta det sedan med piltangenterna, inom listan eller till listan bredvid. Tryck på blanksteg igen för att släppa det, eller Escape för att lägga tillbaka det.",
214
+ "movedTo": "Flyttat till {{list}}. {{index}} av {{total}}.",
215
+ "listPosition": "lista {{index}} av {{total}}"
213
216
  },
214
217
  "colorPicker": {
215
218
  "area": "Mättnad och ljusstyrka, {{saturation}} % och {{brightness}} %",
@@ -335,7 +338,9 @@
335
338
  "image": {
336
339
  "viewer": "Förhandsgranskning av bild",
337
340
  "open": "Öppna förhandsgranskning",
338
- "close": "Stäng förhandsgranskning"
341
+ "close": "Stäng förhandsgranskning",
342
+ "counter": "{{current}} / {{total}}",
343
+ "position": "Bild {{current}} av {{total}}"
339
344
  },
340
345
  "window": {
341
346
  "close": "Stäng",