@rt-tools/ui-kit-v2 0.23.3 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/rt-tools-ui-kit-v2-accordion.mjs +142 -71
- package/fesm2022/rt-tools-ui-kit-v2-accordion.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-action-bar.mjs +467 -231
- package/fesm2022/rt-tools-ui-kit-v2-action-bar.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-ai-run-status.mjs +260 -91
- package/fesm2022/rt-tools-ui-kit-v2-ai-run-status.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-aside-section.mjs +80 -46
- package/fesm2022/rt-tools-ui-kit-v2-aside-section.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-aside.mjs +984 -697
- package/fesm2022/rt-tools-ui-kit-v2-aside.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-autocomplete.mjs +452 -210
- package/fesm2022/rt-tools-ui-kit-v2-autocomplete.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-bar-list.mjs +143 -52
- package/fesm2022/rt-tools-ui-kit-v2-bar-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-bottom-sheet.mjs +158 -83
- package/fesm2022/rt-tools-ui-kit-v2-bottom-sheet.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-breadcrumbs.mjs +335 -0
- package/fesm2022/rt-tools-ui-kit-v2-breadcrumbs.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-button.mjs +437 -363
- package/fesm2022/rt-tools-ui-kit-v2-button.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-calendar.mjs +430 -149
- package/fesm2022/rt-tools-ui-kit-v2-calendar.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-card.mjs +155 -71
- package/fesm2022/rt-tools-ui-kit-v2-card.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-carousel.mjs +155 -0
- package/fesm2022/rt-tools-ui-kit-v2-carousel.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-checkbox.mjs +215 -110
- package/fesm2022/rt-tools-ui-kit-v2-checkbox.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-collapsible-text.mjs +158 -75
- package/fesm2022/rt-tools-ui-kit-v2-collapsible-text.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-color-palette.mjs +769 -0
- package/fesm2022/rt-tools-ui-kit-v2-color-palette.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-confirm-popover.mjs +462 -253
- package/fesm2022/rt-tools-ui-kit-v2-confirm-popover.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-container.mjs +1276 -1316
- package/fesm2022/rt-tools-ui-kit-v2-container.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-copy-value.mjs +185 -80
- package/fesm2022/rt-tools-ui-kit-v2-copy-value.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-core.mjs +2321 -2619
- package/fesm2022/rt-tools-ui-kit-v2-core.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-counter-row.mjs +100 -44
- package/fesm2022/rt-tools-ui-kit-v2-counter-row.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-counter.mjs +290 -155
- package/fesm2022/rt-tools-ui-kit-v2-counter.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs +2097 -858
- package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-data-table.mjs +2247 -1176
- package/fesm2022/rt-tools-ui-kit-v2-data-table.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs +1043 -705
- package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs +810 -525
- package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-delta-view.mjs +158 -138
- package/fesm2022/rt-tools-ui-kit-v2-delta-view.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs +177 -67
- package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-dialog.mjs +550 -477
- package/fesm2022/rt-tools-ui-kit-v2-dialog.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-dot-field.mjs +185 -168
- package/fesm2022/rt-tools-ui-kit-v2-dot-field.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-download-link.mjs +116 -43
- package/fesm2022/rt-tools-ui-kit-v2-download-link.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-draggable-tree.mjs +585 -0
- package/fesm2022/rt-tools-ui-kit-v2-draggable-tree.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-list.mjs +755 -259
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-selector.mjs +3266 -1115
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-selector.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-empty-state.mjs +190 -55
- package/fesm2022/rt-tools-ui-kit-v2-empty-state.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-expansion-panel.mjs +283 -103
- package/fesm2022/rt-tools-ui-kit-v2-expansion-panel.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-field.mjs +393 -177
- package/fesm2022/rt-tools-ui-kit-v2-field.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-file-card.mjs +399 -207
- package/fesm2022/rt-tools-ui-kit-v2-file-card.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-file-drop.mjs +288 -212
- package/fesm2022/rt-tools-ui-kit-v2-file-drop.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-file-input.mjs +262 -116
- package/fesm2022/rt-tools-ui-kit-v2-file-input.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-file-list.mjs +57 -31
- package/fesm2022/rt-tools-ui-kit-v2-file-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-filter-control.mjs +258 -90
- package/fesm2022/rt-tools-ui-kit-v2-filter-control.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-form-control.mjs +249 -215
- package/fesm2022/rt-tools-ui-kit-v2-form-control.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-header.mjs +199 -71
- package/fesm2022/rt-tools-ui-kit-v2-header.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree-selector.mjs +231 -0
- package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree-selector.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree.mjs +336 -0
- package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-icon-button.mjs +451 -162
- package/fesm2022/rt-tools-ui-kit-v2-icon-button.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-icon.mjs +931 -686
- package/fesm2022/rt-tools-ui-kit-v2-icon.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-image-cropper.mjs +664 -491
- package/fesm2022/rt-tools-ui-kit-v2-image-cropper.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-image-upload.mjs +574 -222
- package/fesm2022/rt-tools-ui-kit-v2-image-upload.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-info-item.mjs +150 -36
- package/fesm2022/rt-tools-ui-kit-v2-info-item.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-inline-edit.mjs +606 -0
- package/fesm2022/rt-tools-ui-kit-v2-inline-edit.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-input-number.mjs +461 -355
- package/fesm2022/rt-tools-ui-kit-v2-input-number.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-input.mjs +338 -143
- package/fesm2022/rt-tools-ui-kit-v2-input.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-live-badge.mjs +135 -48
- package/fesm2022/rt-tools-ui-kit-v2-live-badge.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-logo.mjs +166 -92
- package/fesm2022/rt-tools-ui-kit-v2-logo.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-markdown-text.mjs +118 -56
- package/fesm2022/rt-tools-ui-kit-v2-markdown-text.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-menu.mjs +1054 -527
- package/fesm2022/rt-tools-ui-kit-v2-menu.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-message.mjs +230 -104
- package/fesm2022/rt-tools-ui-kit-v2-message.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-money-list.mjs +210 -70
- package/fesm2022/rt-tools-ui-kit-v2-money-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-multiselect.mjs +532 -311
- package/fesm2022/rt-tools-ui-kit-v2-multiselect.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-night-grid.mjs +125 -50
- package/fesm2022/rt-tools-ui-kit-v2-night-grid.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-note.mjs +73 -43
- package/fesm2022/rt-tools-ui-kit-v2-note.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-notifications-bell.mjs +161 -53
- package/fesm2022/rt-tools-ui-kit-v2-notifications-bell.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-page-header.mjs +491 -310
- package/fesm2022/rt-tools-ui-kit-v2-page-header.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-pagination.mjs +374 -174
- package/fesm2022/rt-tools-ui-kit-v2-pagination.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-photo-viewer.mjs +202 -159
- package/fesm2022/rt-tools-ui-kit-v2-photo-viewer.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-popover.mjs +438 -309
- package/fesm2022/rt-tools-ui-kit-v2-popover.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-profile-menu.mjs +295 -0
- package/fesm2022/rt-tools-ui-kit-v2-profile-menu.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-prompt-suggestion.mjs +135 -45
- package/fesm2022/rt-tools-ui-kit-v2-prompt-suggestion.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-radio-button.mjs +293 -171
- package/fesm2022/rt-tools-ui-kit-v2-radio-button.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-radius.mjs +62 -55
- package/fesm2022/rt-tools-ui-kit-v2-radius.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs +3379 -1466
- package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-ripple.mjs +114 -116
- package/fesm2022/rt-tools-ui-kit-v2-ripple.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-scroll-area.mjs +406 -299
- package/fesm2022/rt-tools-ui-kit-v2-scroll-area.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-section-nav.mjs +137 -36
- package/fesm2022/rt-tools-ui-kit-v2-section-nav.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-select.mjs +687 -468
- package/fesm2022/rt-tools-ui-kit-v2-select.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-side-menu.mjs +2195 -1569
- package/fesm2022/rt-tools-ui-kit-v2-side-menu.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-skeleton-wrapper.mjs +187 -48
- package/fesm2022/rt-tools-ui-kit-v2-skeleton-wrapper.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-skeleton.mjs +242 -122
- package/fesm2022/rt-tools-ui-kit-v2-skeleton.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-speed-menu.mjs +439 -0
- package/fesm2022/rt-tools-ui-kit-v2-speed-menu.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-spinner.mjs +218 -69
- package/fesm2022/rt-tools-ui-kit-v2-spinner.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-split-button.mjs +292 -91
- package/fesm2022/rt-tools-ui-kit-v2-split-button.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs +225 -138
- package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-stepper.mjs +150 -116
- package/fesm2022/rt-tools-ui-kit-v2-stepper.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-table.mjs +2462 -1583
- package/fesm2022/rt-tools-ui-kit-v2-table.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs +647 -346
- package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-tag.mjs +335 -121
- package/fesm2022/rt-tools-ui-kit-v2-tag.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-textarea.mjs +217 -84
- package/fesm2022/rt-tools-ui-kit-v2-textarea.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-theme-toggle.mjs +151 -72
- package/fesm2022/rt-tools-ui-kit-v2-theme-toggle.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs +697 -226
- package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-timeline.mjs +92 -38
- package/fesm2022/rt-tools-ui-kit-v2-timeline.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-toast.mjs +752 -338
- package/fesm2022/rt-tools-ui-kit-v2-toast.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs +310 -129
- package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-toggle-switch.mjs +286 -158
- package/fesm2022/rt-tools-ui-kit-v2-toggle-switch.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs +270 -134
- package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-tooltip.mjs +322 -202
- package/fesm2022/rt-tools-ui-kit-v2-tooltip.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-tree-selector.mjs +908 -0
- package/fesm2022/rt-tools-ui-kit-v2-tree-selector.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-tree.mjs +785 -0
- package/fesm2022/rt-tools-ui-kit-v2-tree.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-welcome-dialog.mjs +118 -63
- package/fesm2022/rt-tools-ui-kit-v2-welcome-dialog.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs +783 -262
- package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs +633 -294
- package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2.mjs +100 -103
- package/package.json +45 -1
- package/src/assets/icons/collapse-all.svg +9 -0
- package/src/assets/icons/expand-all.svg +9 -0
- package/src/assets/icons-material/collapse-all.fill.svg +5 -0
- package/src/assets/icons-material/collapse-all.svg +5 -0
- package/src/assets/icons-material/expand-all.fill.svg +5 -0
- package/src/assets/icons-material/expand-all.svg +5 -0
- package/src/assets/icons-material/undo.fill.svg +5 -0
- package/src/assets/icons-material/undo.svg +5 -0
- package/src/lib/components/bottom-sheet/CONTEXT.md +20 -2
- package/src/lib/components/bottom-sheet/rt-bottom-sheet.component.scss +36 -1
- package/src/lib/components/breadcrumbs/CONTEXT.md +37 -0
- package/src/lib/components/breadcrumbs/rt-breadcrumbs.component.scss +205 -0
- package/src/lib/components/carousel/CONTEXT.md +42 -0
- package/src/lib/components/carousel/rt-carousel.component.scss +117 -0
- package/src/lib/components/checkbox/CONTEXT.md +3 -0
- package/src/lib/components/checkbox/rt-checkbox.component.scss +9 -3
- package/src/lib/components/color-palette/CONTEXT.md +49 -0
- package/src/lib/components/color-palette/picker/rt-color-picker.component.scss +161 -0
- package/src/lib/components/color-palette/rt-color-palette.component.scss +132 -0
- package/src/lib/components/draggable-tree/CONTEXT.md +54 -0
- package/src/lib/components/draggable-tree/rt-draggable-tree.component.scss +219 -0
- package/src/lib/components/hybrid-tree/CONTEXT.md +31 -0
- package/src/lib/components/hybrid-tree-selector/CONTEXT.md +25 -0
- package/src/lib/components/icon-button/CONTEXT.md +3 -0
- package/src/lib/components/inline-edit/CONTEXT.md +41 -0
- package/src/lib/components/inline-edit/rt-inline-edit.component.scss +274 -0
- package/src/lib/components/popover/CONTEXT.md +3 -0
- package/src/lib/components/profile-menu/CONTEXT.md +32 -0
- package/src/lib/components/profile-menu/rt-profile-menu.component.scss +104 -0
- package/src/lib/components/speed-menu/CONTEXT.md +34 -0
- package/src/lib/components/speed-menu/rt-speed-menu.component.scss +118 -0
- package/src/lib/components/tag/rt-tag.component.scss +12 -0
- package/src/lib/components/thread-list/CONTEXT.md +1 -0
- package/src/lib/components/thread-list/rt-thread-list.component.scss +2 -1
- package/src/lib/components/toolbar/CONTEXT.md +9 -4
- package/src/lib/components/toolbar/rt-toolbar.component.scss +10 -2
- package/src/lib/components/tooltip/CONTEXT.md +8 -1
- package/src/lib/components/tree/CONTEXT.md +66 -0
- package/src/lib/components/tree/rt-tree.component.scss +313 -0
- package/src/lib/components/tree-selector/CONTEXT.md +47 -0
- package/src/lib/components/tree-selector/rt-tree-selector.component.scss +121 -0
- package/src/styles/_primitives.scss +4 -0
- package/src/styles/_semantic.scss +5 -0
- package/styles/tokens.css +43 -0
- package/types/rt-tools-ui-kit-v2-accordion.d.ts +31 -24
- package/types/rt-tools-ui-kit-v2-action-bar.d.ts +112 -91
- package/types/rt-tools-ui-kit-v2-ai-run-status.d.ts +64 -40
- package/types/rt-tools-ui-kit-v2-aside-section.d.ts +13 -10
- package/types/rt-tools-ui-kit-v2-aside.d.ts +268 -206
- package/types/rt-tools-ui-kit-v2-autocomplete.d.ts +102 -61
- package/types/rt-tools-ui-kit-v2-bar-list.d.ts +39 -27
- package/types/rt-tools-ui-kit-v2-bottom-sheet.d.ts +31 -20
- package/types/rt-tools-ui-kit-v2-breadcrumbs.d.ts +89 -0
- package/types/rt-tools-ui-kit-v2-button.d.ts +119 -59
- package/types/rt-tools-ui-kit-v2-calendar.d.ts +151 -86
- package/types/rt-tools-ui-kit-v2-card.d.ts +42 -21
- package/types/rt-tools-ui-kit-v2-carousel.d.ts +76 -0
- package/types/rt-tools-ui-kit-v2-checkbox.d.ts +48 -24
- package/types/rt-tools-ui-kit-v2-collapsible-text.d.ts +28 -20
- package/types/rt-tools-ui-kit-v2-color-palette.d.ts +208 -0
- package/types/rt-tools-ui-kit-v2-confirm-popover.d.ts +104 -47
- package/types/rt-tools-ui-kit-v2-container.d.ts +278 -221
- package/types/rt-tools-ui-kit-v2-copy-value.d.ts +39 -24
- package/types/rt-tools-ui-kit-v2-core.d.ts +862 -865
- package/types/rt-tools-ui-kit-v2-counter-row.d.ts +20 -12
- package/types/rt-tools-ui-kit-v2-counter.d.ts +70 -38
- package/types/rt-tools-ui-kit-v2-data-list.d.ts +429 -264
- package/types/rt-tools-ui-kit-v2-data-table.d.ts +500 -351
- package/types/rt-tools-ui-kit-v2-date-picker.d.ts +164 -138
- package/types/rt-tools-ui-kit-v2-date-range.d.ts +102 -84
- package/types/rt-tools-ui-kit-v2-delta-view.d.ts +16 -13
- package/types/rt-tools-ui-kit-v2-detail-list.d.ts +23 -16
- package/types/rt-tools-ui-kit-v2-dialog.d.ts +130 -101
- package/types/rt-tools-ui-kit-v2-dot-field.d.ts +10 -13
- package/types/rt-tools-ui-kit-v2-download-link.d.ts +22 -17
- package/types/rt-tools-ui-kit-v2-draggable-tree.d.ts +132 -0
- package/types/rt-tools-ui-kit-v2-dynamic-list.d.ts +185 -96
- package/types/rt-tools-ui-kit-v2-dynamic-selector.d.ts +904 -404
- package/types/rt-tools-ui-kit-v2-empty-state.d.ts +48 -19
- package/types/rt-tools-ui-kit-v2-expansion-panel.d.ts +67 -39
- package/types/rt-tools-ui-kit-v2-field.d.ts +90 -49
- package/types/rt-tools-ui-kit-v2-file-card.d.ts +115 -75
- package/types/rt-tools-ui-kit-v2-file-drop.d.ts +75 -48
- package/types/rt-tools-ui-kit-v2-file-input.d.ts +53 -36
- package/types/rt-tools-ui-kit-v2-file-list.d.ts +5 -8
- package/types/rt-tools-ui-kit-v2-filter-control.d.ts +83 -49
- package/types/rt-tools-ui-kit-v2-form-control.d.ts +102 -74
- package/types/rt-tools-ui-kit-v2-header.d.ts +40 -22
- package/types/rt-tools-ui-kit-v2-hybrid-tree-selector.d.ts +14 -0
- package/types/rt-tools-ui-kit-v2-hybrid-tree.d.ts +72 -0
- package/types/rt-tools-ui-kit-v2-icon-button.d.ts +190 -90
- package/types/rt-tools-ui-kit-v2-icon.d.ts +160 -129
- package/types/rt-tools-ui-kit-v2-image-cropper.d.ts +151 -111
- package/types/rt-tools-ui-kit-v2-image-upload.d.ts +159 -85
- package/types/rt-tools-ui-kit-v2-info-item.d.ts +26 -13
- package/types/rt-tools-ui-kit-v2-inline-edit.d.ts +194 -0
- package/types/rt-tools-ui-kit-v2-input-number.d.ts +102 -53
- package/types/rt-tools-ui-kit-v2-input.d.ts +82 -43
- package/types/rt-tools-ui-kit-v2-live-badge.d.ts +30 -17
- package/types/rt-tools-ui-kit-v2-logo.d.ts +49 -32
- package/types/rt-tools-ui-kit-v2-markdown-text.d.ts +26 -17
- package/types/rt-tools-ui-kit-v2-menu.d.ts +272 -155
- package/types/rt-tools-ui-kit-v2-message.d.ts +59 -33
- package/types/rt-tools-ui-kit-v2-money-list.d.ts +36 -18
- package/types/rt-tools-ui-kit-v2-multiselect.d.ts +114 -80
- package/types/rt-tools-ui-kit-v2-night-grid.d.ts +34 -25
- package/types/rt-tools-ui-kit-v2-note.d.ts +12 -9
- package/types/rt-tools-ui-kit-v2-notifications-bell.d.ts +37 -16
- package/types/rt-tools-ui-kit-v2-page-header.d.ts +218 -150
- package/types/rt-tools-ui-kit-v2-pagination.d.ts +99 -63
- package/types/rt-tools-ui-kit-v2-photo-viewer.d.ts +61 -66
- package/types/rt-tools-ui-kit-v2-popover.d.ts +116 -55
- package/types/rt-tools-ui-kit-v2-profile-menu.d.ts +103 -0
- package/types/rt-tools-ui-kit-v2-prompt-suggestion.d.ts +26 -16
- package/types/rt-tools-ui-kit-v2-radio-button.d.ts +85 -43
- package/types/rt-tools-ui-kit-v2-radius.d.ts +18 -15
- package/types/rt-tools-ui-kit-v2-rich-editor.d.ts +931 -590
- package/types/rt-tools-ui-kit-v2-ripple.d.ts +28 -25
- package/types/rt-tools-ui-kit-v2-scroll-area.d.ts +60 -58
- package/types/rt-tools-ui-kit-v2-section-nav.d.ts +32 -22
- package/types/rt-tools-ui-kit-v2-select.d.ts +182 -139
- package/types/rt-tools-ui-kit-v2-side-menu.d.ts +452 -349
- package/types/rt-tools-ui-kit-v2-skeleton-wrapper.d.ts +53 -20
- package/types/rt-tools-ui-kit-v2-skeleton.d.ts +55 -26
- package/types/rt-tools-ui-kit-v2-speed-menu.d.ts +131 -0
- package/types/rt-tools-ui-kit-v2-spinner.d.ts +56 -28
- package/types/rt-tools-ui-kit-v2-split-button.d.ts +96 -55
- package/types/rt-tools-ui-kit-v2-stat-tile.d.ts +88 -60
- package/types/rt-tools-ui-kit-v2-stepper.d.ts +50 -37
- package/types/rt-tools-ui-kit-v2-table.d.ts +631 -480
- package/types/rt-tools-ui-kit-v2-tabs.d.ts +198 -113
- package/types/rt-tools-ui-kit-v2-tag.d.ts +106 -53
- package/types/rt-tools-ui-kit-v2-textarea.d.ts +48 -25
- package/types/rt-tools-ui-kit-v2-theme-toggle.d.ts +28 -26
- package/types/rt-tools-ui-kit-v2-thread-list.d.ts +154 -94
- package/types/rt-tools-ui-kit-v2-timeline.d.ts +30 -28
- package/types/rt-tools-ui-kit-v2-toast.d.ts +174 -98
- package/types/rt-tools-ui-kit-v2-toggle-button-group.d.ts +132 -86
- package/types/rt-tools-ui-kit-v2-toggle-switch.d.ts +88 -50
- package/types/rt-tools-ui-kit-v2-toolbar.d.ts +30 -27
- package/types/rt-tools-ui-kit-v2-tooltip.d.ts +65 -41
- package/types/rt-tools-ui-kit-v2-tree-selector.d.ts +257 -0
- package/types/rt-tools-ui-kit-v2-tree.d.ts +282 -0
- package/types/rt-tools-ui-kit-v2-welcome-dialog.d.ts +21 -24
- package/types/rt-tools-ui-kit-v2-workspace-details.d.ts +195 -124
- package/types/rt-tools-ui-kit-v2-workspace.d.ts +122 -79
- package/types/rt-tools-ui-kit-v2.d.ts +100 -90
- package/fesm2022/rt-tools-ui-kit-v2.mjs.map +0 -1
|
@@ -1,1149 +1,3300 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import * as i1 from
|
|
4
|
-
import { FormsModule } from
|
|
5
|
-
import { BlockDirective, ElemDirective, ModDirective } from
|
|
6
|
-
import { BreakpointsService,
|
|
7
|
-
import { RtButtonDirective } from
|
|
8
|
-
import { RtEmptyStateComponent } from
|
|
9
|
-
import { RtFormControlBase } from
|
|
10
|
-
import { RtFieldComponent } from
|
|
11
|
-
import { RtInputComponent } from
|
|
12
|
-
import { CdkDrag, CdkDragHandle, CdkDropList } from
|
|
13
|
-
import { NgTemplateOutlet } from
|
|
14
|
-
import { RtIconButtonComponent } from
|
|
15
|
-
import { RtTooltipDirective } from
|
|
16
|
-
import { takeUntilDestroyed, toObservable } from
|
|
17
|
-
import { RouterLink } from
|
|
18
|
-
import { Subject, debounceTime } from
|
|
19
|
-
import { RtCheckboxComponent } from
|
|
20
|
-
import { RtIconComponent } from
|
|
21
|
-
import { RtRadioButtonComponent } from
|
|
22
|
-
import { RtSpinnerComponent } from
|
|
23
|
-
import { RtToggleSwitchComponent } from
|
|
24
|
-
import { RtPopoverDirective } from
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtDynamicSelectorListComponent, isStandalone: true, selector: "rt-dynamic-selector-list", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, actionsShown: { classPropertyName: "actionsShown", publicName: "actionsShown", isSignal: true, isRequired: false, transformFunction: null }, resetClearShown: { classPropertyName: "resetClearShown", publicName: "resetClearShown", isSignal: true, isRequired: false, transformFunction: null }, removeShown: { classPropertyName: "removeShown", publicName: "removeShown", isSignal: true, isRequired: false, transformFunction: null }, resetDisabled: { classPropertyName: "resetDisabled", publicName: "resetDisabled", isSignal: true, isRequired: false, transformFunction: null }, clearDisabled: { classPropertyName: "clearDisabled", publicName: "clearDisabled", isSignal: true, isRequired: false, transformFunction: null }, buttonRadius: { classPropertyName: "buttonRadius", publicName: "buttonRadius", isSignal: true, isRequired: false, transformFunction: null }, clearIcon: { classPropertyName: "clearIcon", publicName: "clearIcon", isSignal: true, isRequired: false, transformFunction: null }, titleWrap: { classPropertyName: "titleWrap", publicName: "titleWrap", isSignal: true, isRequired: false, transformFunction: null }, titleTpl: { classPropertyName: "titleTpl", publicName: "titleTpl", isSignal: true, isRequired: false, transformFunction: null }, controlsTpl: { classPropertyName: "controlsTpl", publicName: "controlsTpl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { removed: "removed", moved: "moved", edited: "edited", resetClicked: "resetClicked", cleared: "cleared" }, host: { classAttribute: "rt-dynamic-selector-list" }, ngImport: i0, template: "<ng-container rtBlock=\"rt-dynamic-selector-list\">\n @if (rows().length > 0) {\n <div rtElem=\"rows\" cdkDropList qa-dataid=\"dynamic-selector-rows\" (cdkDropListDropped)=\"onDrop($event)\">\n @for (row of rows(); track row.key; let index = $index) {\n <div\n rtElem=\"row\"\n cdkDrag\n qa-dataid=\"dynamic-selector-row\"\n [rtMod]=\"{ locked: row.locked }\"\n [cdkDragDisabled]=\"!draggable() || disabled()\">\n @if (draggable()) {\n <span rtElem=\"handle\">\n <rt-icon-button\n cdkDragHandle\n qa-dataid=\"dynamic-selector-drag\"\n icon=\"arrows\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"dragLabel()\"\n [tooltip]=\"isNarrow() ? '' : dragLabel()\"\n [disabled]=\"disabled()\" />\n </span>\n }\n\n @if (editedIndex() === index) {\n <rt-input\n rtElem=\"field\"\n qa-dataid=\"dynamic-selector-edit-field\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event ?? '')\"\n (keydown.enter)=\"onEditApply(row)\" />\n } @else if (titleTpl(); as tpl) {\n <div rtElem=\"title\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.item }\" />\n </div>\n } @else {\n <span\n rtElem=\"title\"\n rtTooltipWhenTruncated\n [rtMod]=\"{ nowrap: !titleWrap() }\"\n [rtTooltip]=\"titleWrap() ? '' : row.label\">\n {{ row.label }}\n </span>\n }\n\n <div rtElem=\"controls\">\n @if (controlsTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.item }\" />\n }\n\n @if (editable()) {\n @if (editedIndex() === index) {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit-cancel\"\n icon=\"undo\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"cancelLabel()\"\n [tooltip]=\"isNarrow() ? '' : cancelLabel()\"\n (clicked)=\"onEditCancel()\" />\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit-apply\"\n icon=\"check\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"applyLabel()\"\n [tooltip]=\"isNarrow() ? '' : applyLabel()\"\n (clicked)=\"onEditApply(row)\" />\n } @else {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit\"\n icon=\"pencil\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"editLabel()\"\n [tooltip]=\"isNarrow() ? '' : editLabel()\"\n [disabled]=\"disabled()\"\n (clicked)=\"onEditStart(index, row)\" />\n }\n }\n\n @if (removeShown()) {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-remove\"\n icon=\"trash\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"row.locked || disabled() ? 'muted' : 'danger'\"\n [ariaLabel]=\"removeLabel()\"\n [tooltip]=\"isNarrow() ? '' : removeLabel()\"\n [disabled]=\"row.locked || disabled()\"\n (clicked)=\"onRemove(row)\" />\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (actionsShown()) {\n <div rtElem=\"actions\">\n <div rtElem=\"add\">\n <ng-content />\n </div>\n\n @if (resetClearShown()) {\n <rt-icon-button\n rtElem=\"reset\"\n qa-dataid=\"dynamic-selector-reset\"\n icon=\"refresh\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"resetDisabled() || disabled() ? 'muted' : 'current'\"\n [ariaLabel]=\"resetLabel()\"\n [tooltip]=\"isNarrow() ? '' : resetLabel()\"\n [disabled]=\"resetDisabled() || disabled()\"\n (clicked)=\"resetClicked.emit()\" />\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"dynamic-selector-clear\"\n size=\"sm\"\n [icon]=\"clearIcon()\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"clearDisabled() || disabled() ? 'muted' : 'danger'\"\n [ariaLabel]=\"clearLabel()\"\n [tooltip]=\"isNarrow() ? '' : clearLabel()\"\n [disabled]=\"clearDisabled() || disabled()\"\n (clicked)=\"cleared.emit()\" />\n }\n </div>\n }\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-list{--rt-dynamic-selector-list-row-bg: var(--rt-color-action-primary-subtle);--rt-dynamic-selector-list-row-radius: var(--rt-radius-sm);--rt-dynamic-selector-list-divider-width: var(--rt-border-width-thin);--rt-dynamic-selector-list-drag-shadow: var(--rt-shadow-md);--rt-dynamic-selector-list-drag-duration: var(--rt-duration-base);--rt-dynamic-selector-list-row-padding-x: var(--rt-space-sm);--rt-dynamic-selector-list-add-font-weight: var(--rt-font-weight-medium);--rt-dynamic-selector-list-add-indent: 0;--rt-dynamic-selector-list-reset-color: var(--rt-color-text-primary);--rt-dynamic-selector-list-actions-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-divider-width-default: 0;--rt-dynamic-selector-list-controls-divider-color-default: var(--rt-color-border-default);--rt-dynamic-selector-list-row-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-offset-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-padding-end-default: 0;--rt-dynamic-selector-list-handle-padding-start-default: 0;--rt-dynamic-selector-list-handle-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-title-gap-default: var(--rt-space-sm);display:flex;flex-direction:column;gap:var(--rt-dynamic-selector-list-actions-offset, var(--rt-dynamic-selector-list-actions-offset-default))}.rt-dynamic-selector-list__rows{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-dynamic-selector-list__row{display:flex;min-height:var(--rt-control-height-lg);box-sizing:border-box;align-items:center;padding:var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-end, var(--rt-dynamic-selector-list-row-padding-end-default)) var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-x);border-radius:var(--rt-dynamic-selector-list-row-radius);background:var(--rt-dynamic-selector-list-row-bg);color:var(--rt-color-text-primary);gap:var(--rt-space-sm)}.rt-dynamic-selector-list__handle{border-right:var(--rt-dynamic-selector-list-divider-width) solid var(--rt-color-border-default);cursor:grab;margin-inline-end:calc(var(--rt-dynamic-selector-list-title-gap, var(--rt-dynamic-selector-list-title-gap-default)) - var(--rt-space-sm));padding-inline:var(--rt-dynamic-selector-list-handle-padding-start, var(--rt-dynamic-selector-list-handle-padding-start-default)) var(--rt-dynamic-selector-list-handle-padding-end, var(--rt-dynamic-selector-list-handle-padding-end-default))}.rt-dynamic-selector-list__title{min-width:0;flex:1 1 auto;font-size:var(--rt-text-md);overflow-wrap:anywhere}.rt-dynamic-selector-list__title--nowrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-dynamic-selector-list__field{min-width:0;flex:1 1 auto}.rt-dynamic-selector-list__controls{display:flex;flex:0 0 auto;align-items:center;gap:var(--rt-dynamic-selector-list-controls-gap, var(--rt-dynamic-selector-list-controls-gap-default))}.rt-dynamic-selector-list__controls>:not(:last-child){border-inline-end:var(--rt-dynamic-selector-list-controls-divider-width, var(--rt-dynamic-selector-list-controls-divider-width-default)) solid var(--rt-dynamic-selector-list-controls-divider-color, var(--rt-dynamic-selector-list-controls-divider-color-default))}.rt-dynamic-selector-list__actions{display:flex;align-items:center;gap:var(--rt-dynamic-selector-list-actions-gap, var(--rt-dynamic-selector-list-actions-gap-default));padding-inline-end:var(--rt-dynamic-selector-list-actions-padding-end, var(--rt-dynamic-selector-list-actions-padding-end-default))}.rt-dynamic-selector-list__add{display:flex;min-width:0;flex:1 1 auto;align-items:center;padding-inline-start:var(--rt-dynamic-selector-list-add-indent)}.rt-dynamic-selector-list__add .rt-button{color:var(--rt-dynamic-selector-list-add-color, var(--rt-btn-color));font-weight:var(--rt-dynamic-selector-list-add-font-weight)}.rt-dynamic-selector-list__reset.rt-icon-button{--rt-icon-button-color: var(--rt-dynamic-selector-list-reset-color)}.rt-dynamic-selector-list__clear{flex:none}.rt-dynamic-selector-list__row.cdk-drag-preview{--rt-dynamic-selector-list-row-bg: var(--rt-color-action-primary-subtle);--rt-dynamic-selector-list-row-radius: var(--rt-radius-sm);--rt-dynamic-selector-list-divider-width: var(--rt-border-width-thin);--rt-dynamic-selector-list-drag-shadow: var(--rt-shadow-md);--rt-dynamic-selector-list-actions-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-divider-width-default: 0;--rt-dynamic-selector-list-controls-divider-color-default: var(--rt-color-border-default);--rt-dynamic-selector-list-row-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-offset-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-padding-end-default: 0;--rt-dynamic-selector-list-handle-padding-start-default: 0;--rt-dynamic-selector-list-handle-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-title-gap-default: var(--rt-space-sm);box-shadow:var(--rt-dynamic-selector-list-drag-shadow)}.rt-dynamic-selector-list__row.cdk-drag-placeholder{opacity:0}.rt-dynamic-selector-list__row.cdk-drag-animating,.rt-dynamic-selector-list__rows.cdk-drop-list-dragging .rt-dynamic-selector-list__row:not(.cdk-drag-placeholder){transition:transform var(--rt-dynamic-selector-list-drag-duration) ease-out}}.rt-dynamic-selector-list__row.cdk-drag-preview{padding:var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-end, var(--rt-space-2xs)) var(--rt-space-2xs) var(--rt-space-sm);background-color:var(--rt-color-bg-surface);background-image:linear-gradient(var(--rt-dynamic-selector-list-row-bg),var(--rt-dynamic-selector-list-row-bg));color:var(--rt-color-text-primary)}\n"], dependencies: [{ kind: "ngmodule", type:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
], host: { class: BEM_BLOCK$3 }, template: "<ng-container rtBlock=\"rt-dynamic-selector-list\">\n @if (rows().length > 0) {\n <div rtElem=\"rows\" cdkDropList qa-dataid=\"dynamic-selector-rows\" (cdkDropListDropped)=\"onDrop($event)\">\n @for (row of rows(); track row.key; let index = $index) {\n <div\n rtElem=\"row\"\n cdkDrag\n qa-dataid=\"dynamic-selector-row\"\n [rtMod]=\"{ locked: row.locked }\"\n [cdkDragDisabled]=\"!draggable() || disabled()\">\n @if (draggable()) {\n <span rtElem=\"handle\">\n <rt-icon-button\n cdkDragHandle\n qa-dataid=\"dynamic-selector-drag\"\n icon=\"arrows\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"dragLabel()\"\n [tooltip]=\"isNarrow() ? '' : dragLabel()\"\n [disabled]=\"disabled()\" />\n </span>\n }\n\n @if (editedIndex() === index) {\n <rt-input\n rtElem=\"field\"\n qa-dataid=\"dynamic-selector-edit-field\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event ?? '')\"\n (keydown.enter)=\"onEditApply(row)\" />\n } @else if (titleTpl(); as tpl) {\n <div rtElem=\"title\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.item }\" />\n </div>\n } @else {\n <span\n rtElem=\"title\"\n rtTooltipWhenTruncated\n [rtMod]=\"{ nowrap: !titleWrap() }\"\n [rtTooltip]=\"titleWrap() ? '' : row.label\">\n {{ row.label }}\n </span>\n }\n\n <div rtElem=\"controls\">\n @if (controlsTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.item }\" />\n }\n\n @if (editable()) {\n @if (editedIndex() === index) {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit-cancel\"\n icon=\"undo\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"cancelLabel()\"\n [tooltip]=\"isNarrow() ? '' : cancelLabel()\"\n (clicked)=\"onEditCancel()\" />\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit-apply\"\n icon=\"check\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"applyLabel()\"\n [tooltip]=\"isNarrow() ? '' : applyLabel()\"\n (clicked)=\"onEditApply(row)\" />\n } @else {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit\"\n icon=\"pencil\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"editLabel()\"\n [tooltip]=\"isNarrow() ? '' : editLabel()\"\n [disabled]=\"disabled()\"\n (clicked)=\"onEditStart(index, row)\" />\n }\n }\n\n @if (removeShown()) {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-remove\"\n icon=\"trash\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"row.locked || disabled() ? 'muted' : 'danger'\"\n [ariaLabel]=\"removeLabel()\"\n [tooltip]=\"isNarrow() ? '' : removeLabel()\"\n [disabled]=\"row.locked || disabled()\"\n (clicked)=\"onRemove(row)\" />\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (actionsShown()) {\n <div rtElem=\"actions\">\n <div rtElem=\"add\">\n <ng-content />\n </div>\n\n @if (resetClearShown()) {\n <rt-icon-button\n rtElem=\"reset\"\n qa-dataid=\"dynamic-selector-reset\"\n icon=\"refresh\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"resetDisabled() || disabled() ? 'muted' : 'current'\"\n [ariaLabel]=\"resetLabel()\"\n [tooltip]=\"isNarrow() ? '' : resetLabel()\"\n [disabled]=\"resetDisabled() || disabled()\"\n (clicked)=\"resetClicked.emit()\" />\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"dynamic-selector-clear\"\n size=\"sm\"\n [icon]=\"clearIcon()\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"clearDisabled() || disabled() ? 'muted' : 'danger'\"\n [ariaLabel]=\"clearLabel()\"\n [tooltip]=\"isNarrow() ? '' : clearLabel()\"\n [disabled]=\"clearDisabled() || disabled()\"\n (clicked)=\"cleared.emit()\" />\n }\n </div>\n }\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-list{--rt-dynamic-selector-list-row-bg: var(--rt-color-action-primary-subtle);--rt-dynamic-selector-list-row-radius: var(--rt-radius-sm);--rt-dynamic-selector-list-divider-width: var(--rt-border-width-thin);--rt-dynamic-selector-list-drag-shadow: var(--rt-shadow-md);--rt-dynamic-selector-list-drag-duration: var(--rt-duration-base);--rt-dynamic-selector-list-row-padding-x: var(--rt-space-sm);--rt-dynamic-selector-list-add-font-weight: var(--rt-font-weight-medium);--rt-dynamic-selector-list-add-indent: 0;--rt-dynamic-selector-list-reset-color: var(--rt-color-text-primary);--rt-dynamic-selector-list-actions-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-divider-width-default: 0;--rt-dynamic-selector-list-controls-divider-color-default: var(--rt-color-border-default);--rt-dynamic-selector-list-row-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-offset-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-padding-end-default: 0;--rt-dynamic-selector-list-handle-padding-start-default: 0;--rt-dynamic-selector-list-handle-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-title-gap-default: var(--rt-space-sm);display:flex;flex-direction:column;gap:var(--rt-dynamic-selector-list-actions-offset, var(--rt-dynamic-selector-list-actions-offset-default))}.rt-dynamic-selector-list__rows{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-dynamic-selector-list__row{display:flex;min-height:var(--rt-control-height-lg);box-sizing:border-box;align-items:center;padding:var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-end, var(--rt-dynamic-selector-list-row-padding-end-default)) var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-x);border-radius:var(--rt-dynamic-selector-list-row-radius);background:var(--rt-dynamic-selector-list-row-bg);color:var(--rt-color-text-primary);gap:var(--rt-space-sm)}.rt-dynamic-selector-list__handle{border-right:var(--rt-dynamic-selector-list-divider-width) solid var(--rt-color-border-default);cursor:grab;margin-inline-end:calc(var(--rt-dynamic-selector-list-title-gap, var(--rt-dynamic-selector-list-title-gap-default)) - var(--rt-space-sm));padding-inline:var(--rt-dynamic-selector-list-handle-padding-start, var(--rt-dynamic-selector-list-handle-padding-start-default)) var(--rt-dynamic-selector-list-handle-padding-end, var(--rt-dynamic-selector-list-handle-padding-end-default))}.rt-dynamic-selector-list__title{min-width:0;flex:1 1 auto;font-size:var(--rt-text-md);overflow-wrap:anywhere}.rt-dynamic-selector-list__title--nowrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-dynamic-selector-list__field{min-width:0;flex:1 1 auto}.rt-dynamic-selector-list__controls{display:flex;flex:0 0 auto;align-items:center;gap:var(--rt-dynamic-selector-list-controls-gap, var(--rt-dynamic-selector-list-controls-gap-default))}.rt-dynamic-selector-list__controls>:not(:last-child){border-inline-end:var(--rt-dynamic-selector-list-controls-divider-width, var(--rt-dynamic-selector-list-controls-divider-width-default)) solid var(--rt-dynamic-selector-list-controls-divider-color, var(--rt-dynamic-selector-list-controls-divider-color-default))}.rt-dynamic-selector-list__actions{display:flex;align-items:center;gap:var(--rt-dynamic-selector-list-actions-gap, var(--rt-dynamic-selector-list-actions-gap-default));padding-inline-end:var(--rt-dynamic-selector-list-actions-padding-end, var(--rt-dynamic-selector-list-actions-padding-end-default))}.rt-dynamic-selector-list__add{display:flex;min-width:0;flex:1 1 auto;align-items:center;padding-inline-start:var(--rt-dynamic-selector-list-add-indent)}.rt-dynamic-selector-list__add .rt-button{color:var(--rt-dynamic-selector-list-add-color, var(--rt-btn-color));font-weight:var(--rt-dynamic-selector-list-add-font-weight)}.rt-dynamic-selector-list__reset.rt-icon-button{--rt-icon-button-color: var(--rt-dynamic-selector-list-reset-color)}.rt-dynamic-selector-list__clear{flex:none}.rt-dynamic-selector-list__row.cdk-drag-preview{--rt-dynamic-selector-list-row-bg: var(--rt-color-action-primary-subtle);--rt-dynamic-selector-list-row-radius: var(--rt-radius-sm);--rt-dynamic-selector-list-divider-width: var(--rt-border-width-thin);--rt-dynamic-selector-list-drag-shadow: var(--rt-shadow-md);--rt-dynamic-selector-list-actions-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-divider-width-default: 0;--rt-dynamic-selector-list-controls-divider-color-default: var(--rt-color-border-default);--rt-dynamic-selector-list-row-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-offset-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-padding-end-default: 0;--rt-dynamic-selector-list-handle-padding-start-default: 0;--rt-dynamic-selector-list-handle-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-title-gap-default: var(--rt-space-sm);box-shadow:var(--rt-dynamic-selector-list-drag-shadow)}.rt-dynamic-selector-list__row.cdk-drag-placeholder{opacity:0}.rt-dynamic-selector-list__row.cdk-drag-animating,.rt-dynamic-selector-list__rows.cdk-drop-list-dragging .rt-dynamic-selector-list__row:not(.cdk-drag-placeholder){transition:transform var(--rt-dynamic-selector-list-drag-duration) ease-out}}.rt-dynamic-selector-list__row.cdk-drag-preview{padding:var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-end, var(--rt-space-2xs)) var(--rt-space-2xs) var(--rt-space-sm);background-color:var(--rt-color-bg-surface);background-image:linear-gradient(var(--rt-dynamic-selector-list-row-bg),var(--rt-dynamic-selector-list-row-bg));color:var(--rt-color-text-primary)}\n"] }]
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, Injector, TemplateRef, ViewEncapsulation, afterNextRender, booleanAttribute, computed, contentChild, forwardRef, inject, input, model, output, signal, viewChild, viewChildren } from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/forms";
|
|
4
|
+
import { FormsModule } from "@angular/forms";
|
|
5
|
+
import { BlockDirective, ElemDirective, ModDirective } from "@rt-tools/core";
|
|
6
|
+
import { BreakpointsService, RtInfiniteScrollDirective, rtKitDefault, rtKitLabel } from "@rt-tools/ui-kit-v2/core";
|
|
7
|
+
import { RtButtonDirective } from "@rt-tools/ui-kit-v2/button";
|
|
8
|
+
import { RtEmptyStateComponent } from "@rt-tools/ui-kit-v2/empty-state";
|
|
9
|
+
import { RtFormControlBase } from "@rt-tools/ui-kit-v2/form-control";
|
|
10
|
+
import { RtFieldComponent } from "@rt-tools/ui-kit-v2/field";
|
|
11
|
+
import { RtInputComponent } from "@rt-tools/ui-kit-v2/input";
|
|
12
|
+
import { CdkDrag, CdkDragHandle, CdkDropList } from "@angular/cdk/drag-drop";
|
|
13
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
14
|
+
import { RtIconButtonComponent } from "@rt-tools/ui-kit-v2/icon-button";
|
|
15
|
+
import { RtTooltipDirective } from "@rt-tools/ui-kit-v2/tooltip";
|
|
16
|
+
import { takeUntilDestroyed, toObservable } from "@angular/core/rxjs-interop";
|
|
17
|
+
import { RouterLink } from "@angular/router";
|
|
18
|
+
import { Subject, debounceTime } from "rxjs";
|
|
19
|
+
import { RtCheckboxComponent } from "@rt-tools/ui-kit-v2/checkbox";
|
|
20
|
+
import { RtIconComponent } from "@rt-tools/ui-kit-v2/icon";
|
|
21
|
+
import { RtRadioButtonComponent } from "@rt-tools/ui-kit-v2/radio-button";
|
|
22
|
+
import { RtSpinnerComponent } from "@rt-tools/ui-kit-v2/spinner";
|
|
23
|
+
import { RtToggleSwitchComponent } from "@rt-tools/ui-kit-v2/toggle-switch";
|
|
24
|
+
import { RtPopoverDirective } from "@rt-tools/ui-kit-v2/popover";
|
|
25
|
+
const BEM_BLOCK$3 = "rt-dynamic-selector-list";
|
|
26
|
+
var RtDynamicSelectorListComponent = class RtDynamicSelectorListComponent {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.#breakpoints = inject(BreakpointsService);
|
|
29
|
+
this.isNarrow = this.#breakpoints.narrow;
|
|
30
|
+
this.dragLabel = rtKitLabel("dynamicSelectorDrag");
|
|
31
|
+
this.removeLabel = rtKitLabel("dynamicSelectorRemove");
|
|
32
|
+
this.editLabel = rtKitLabel("dynamicSelectorEdit");
|
|
33
|
+
this.applyLabel = rtKitLabel("dynamicSelectorApply");
|
|
34
|
+
this.cancelLabel = rtKitLabel("uiCancel");
|
|
35
|
+
this.resetLabel = rtKitLabel("dynamicSelectorReset");
|
|
36
|
+
this.clearLabel = rtKitLabel("dynamicSelectorClear");
|
|
37
|
+
this.editedIndex = signal(null, ...ngDevMode ? [{ debugName: "editedIndex" }] : /* istanbul ignore next */ []);
|
|
38
|
+
this.draft = signal("", ...ngDevMode ? [{ debugName: "draft" }] : /* istanbul ignore next */ []);
|
|
39
|
+
this.rows = input([], ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
40
|
+
this.draggable = input(false, {
|
|
41
|
+
...ngDevMode ? { debugName: "draggable" } : /* istanbul ignore next */ {},
|
|
42
|
+
transform: booleanAttribute
|
|
43
|
+
});
|
|
44
|
+
this.editable = input(false, {
|
|
45
|
+
...ngDevMode ? { debugName: "editable" } : /* istanbul ignore next */ {},
|
|
46
|
+
transform: booleanAttribute
|
|
47
|
+
});
|
|
48
|
+
this.disabled = input(false, {
|
|
49
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
50
|
+
transform: booleanAttribute
|
|
51
|
+
});
|
|
52
|
+
this.actionsShown = input(true, {
|
|
53
|
+
...ngDevMode ? { debugName: "actionsShown" } : /* istanbul ignore next */ {},
|
|
54
|
+
transform: booleanAttribute
|
|
55
|
+
});
|
|
56
|
+
this.resetClearShown = input(true, {
|
|
57
|
+
...ngDevMode ? { debugName: "resetClearShown" } : /* istanbul ignore next */ {},
|
|
58
|
+
transform: booleanAttribute
|
|
59
|
+
});
|
|
60
|
+
this.removeShown = input(true, {
|
|
61
|
+
...ngDevMode ? { debugName: "removeShown" } : /* istanbul ignore next */ {},
|
|
62
|
+
transform: booleanAttribute
|
|
63
|
+
});
|
|
64
|
+
this.resetDisabled = input(true, {
|
|
65
|
+
...ngDevMode ? { debugName: "resetDisabled" } : /* istanbul ignore next */ {},
|
|
66
|
+
transform: booleanAttribute
|
|
67
|
+
});
|
|
68
|
+
this.clearDisabled = input(true, {
|
|
69
|
+
...ngDevMode ? { debugName: "clearDisabled" } : /* istanbul ignore next */ {},
|
|
70
|
+
transform: booleanAttribute
|
|
71
|
+
});
|
|
72
|
+
this.buttonRadius = input("full", ...ngDevMode ? [{ debugName: "buttonRadius" }] : /* istanbul ignore next */ []);
|
|
73
|
+
this.clearIcon = input("close", ...ngDevMode ? [{ debugName: "clearIcon" }] : /* istanbul ignore next */ []);
|
|
74
|
+
this.titleWrap = input(true, {
|
|
75
|
+
...ngDevMode ? { debugName: "titleWrap" } : /* istanbul ignore next */ {},
|
|
76
|
+
transform: booleanAttribute
|
|
77
|
+
});
|
|
78
|
+
this.titleTpl = input(null, ...ngDevMode ? [{ debugName: "titleTpl" }] : /* istanbul ignore next */ []);
|
|
79
|
+
this.controlsTpl = input(null, ...ngDevMode ? [{ debugName: "controlsTpl" }] : /* istanbul ignore next */ []);
|
|
80
|
+
this.removed = output();
|
|
81
|
+
this.moved = output();
|
|
82
|
+
this.edited = output();
|
|
83
|
+
this.resetClicked = output();
|
|
84
|
+
this.cleared = output();
|
|
85
|
+
}
|
|
86
|
+
#breakpoints;
|
|
87
|
+
onDrop(event) {
|
|
88
|
+
if (event.previousContainer !== event.container || event.previousIndex === event.currentIndex) return;
|
|
89
|
+
this.moved.emit({
|
|
90
|
+
from: event.previousIndex,
|
|
91
|
+
to: event.currentIndex
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
onRemove(row) {
|
|
95
|
+
if (!row.locked && !this.disabled()) this.removed.emit(row.key);
|
|
96
|
+
}
|
|
97
|
+
onEditStart(index, row) {
|
|
98
|
+
this.draft.set(row.label);
|
|
99
|
+
this.editedIndex.set(index);
|
|
100
|
+
}
|
|
101
|
+
onEditApply(row) {
|
|
102
|
+
this.edited.emit({
|
|
103
|
+
previous: row.label,
|
|
104
|
+
next: this.draft()
|
|
105
|
+
});
|
|
106
|
+
this.editedIndex.set(null);
|
|
107
|
+
}
|
|
108
|
+
onEditCancel() {
|
|
109
|
+
this.editedIndex.set(null);
|
|
110
|
+
}
|
|
111
|
+
static {
|
|
112
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
113
|
+
minVersion: "12.0.0",
|
|
114
|
+
version: "22.2.2",
|
|
115
|
+
ngImport: i0,
|
|
116
|
+
type: RtDynamicSelectorListComponent,
|
|
117
|
+
deps: [],
|
|
118
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
static {
|
|
122
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
123
|
+
minVersion: "17.0.0",
|
|
124
|
+
version: "22.2.2",
|
|
125
|
+
type: RtDynamicSelectorListComponent,
|
|
126
|
+
isStandalone: true,
|
|
127
|
+
selector: "rt-dynamic-selector-list",
|
|
128
|
+
inputs: {
|
|
129
|
+
rows: {
|
|
130
|
+
classPropertyName: "rows",
|
|
131
|
+
publicName: "rows",
|
|
132
|
+
isSignal: true,
|
|
133
|
+
isRequired: false,
|
|
134
|
+
transformFunction: null
|
|
135
|
+
},
|
|
136
|
+
draggable: {
|
|
137
|
+
classPropertyName: "draggable",
|
|
138
|
+
publicName: "draggable",
|
|
139
|
+
isSignal: true,
|
|
140
|
+
isRequired: false,
|
|
141
|
+
transformFunction: null
|
|
142
|
+
},
|
|
143
|
+
editable: {
|
|
144
|
+
classPropertyName: "editable",
|
|
145
|
+
publicName: "editable",
|
|
146
|
+
isSignal: true,
|
|
147
|
+
isRequired: false,
|
|
148
|
+
transformFunction: null
|
|
149
|
+
},
|
|
150
|
+
disabled: {
|
|
151
|
+
classPropertyName: "disabled",
|
|
152
|
+
publicName: "disabled",
|
|
153
|
+
isSignal: true,
|
|
154
|
+
isRequired: false,
|
|
155
|
+
transformFunction: null
|
|
156
|
+
},
|
|
157
|
+
actionsShown: {
|
|
158
|
+
classPropertyName: "actionsShown",
|
|
159
|
+
publicName: "actionsShown",
|
|
160
|
+
isSignal: true,
|
|
161
|
+
isRequired: false,
|
|
162
|
+
transformFunction: null
|
|
163
|
+
},
|
|
164
|
+
resetClearShown: {
|
|
165
|
+
classPropertyName: "resetClearShown",
|
|
166
|
+
publicName: "resetClearShown",
|
|
167
|
+
isSignal: true,
|
|
168
|
+
isRequired: false,
|
|
169
|
+
transformFunction: null
|
|
170
|
+
},
|
|
171
|
+
removeShown: {
|
|
172
|
+
classPropertyName: "removeShown",
|
|
173
|
+
publicName: "removeShown",
|
|
174
|
+
isSignal: true,
|
|
175
|
+
isRequired: false,
|
|
176
|
+
transformFunction: null
|
|
177
|
+
},
|
|
178
|
+
resetDisabled: {
|
|
179
|
+
classPropertyName: "resetDisabled",
|
|
180
|
+
publicName: "resetDisabled",
|
|
181
|
+
isSignal: true,
|
|
182
|
+
isRequired: false,
|
|
183
|
+
transformFunction: null
|
|
184
|
+
},
|
|
185
|
+
clearDisabled: {
|
|
186
|
+
classPropertyName: "clearDisabled",
|
|
187
|
+
publicName: "clearDisabled",
|
|
188
|
+
isSignal: true,
|
|
189
|
+
isRequired: false,
|
|
190
|
+
transformFunction: null
|
|
191
|
+
},
|
|
192
|
+
buttonRadius: {
|
|
193
|
+
classPropertyName: "buttonRadius",
|
|
194
|
+
publicName: "buttonRadius",
|
|
195
|
+
isSignal: true,
|
|
196
|
+
isRequired: false,
|
|
197
|
+
transformFunction: null
|
|
198
|
+
},
|
|
199
|
+
clearIcon: {
|
|
200
|
+
classPropertyName: "clearIcon",
|
|
201
|
+
publicName: "clearIcon",
|
|
202
|
+
isSignal: true,
|
|
203
|
+
isRequired: false,
|
|
204
|
+
transformFunction: null
|
|
205
|
+
},
|
|
206
|
+
titleWrap: {
|
|
207
|
+
classPropertyName: "titleWrap",
|
|
208
|
+
publicName: "titleWrap",
|
|
209
|
+
isSignal: true,
|
|
210
|
+
isRequired: false,
|
|
211
|
+
transformFunction: null
|
|
212
|
+
},
|
|
213
|
+
titleTpl: {
|
|
214
|
+
classPropertyName: "titleTpl",
|
|
215
|
+
publicName: "titleTpl",
|
|
216
|
+
isSignal: true,
|
|
217
|
+
isRequired: false,
|
|
218
|
+
transformFunction: null
|
|
219
|
+
},
|
|
220
|
+
controlsTpl: {
|
|
221
|
+
classPropertyName: "controlsTpl",
|
|
222
|
+
publicName: "controlsTpl",
|
|
223
|
+
isSignal: true,
|
|
224
|
+
isRequired: false,
|
|
225
|
+
transformFunction: null
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
outputs: {
|
|
229
|
+
removed: "removed",
|
|
230
|
+
moved: "moved",
|
|
231
|
+
edited: "edited",
|
|
232
|
+
resetClicked: "resetClicked",
|
|
233
|
+
cleared: "cleared"
|
|
234
|
+
},
|
|
235
|
+
host: { classAttribute: "rt-dynamic-selector-list" },
|
|
236
|
+
ngImport: i0,
|
|
237
|
+
template: "<ng-container rtBlock=\"rt-dynamic-selector-list\">\n @if (rows().length > 0) {\n <div rtElem=\"rows\" cdkDropList qa-dataid=\"dynamic-selector-rows\" (cdkDropListDropped)=\"onDrop($event)\">\n @for (row of rows(); track row.key; let index = $index) {\n <div\n rtElem=\"row\"\n cdkDrag\n qa-dataid=\"dynamic-selector-row\"\n [rtMod]=\"{ locked: row.locked }\"\n [cdkDragDisabled]=\"!draggable() || disabled()\">\n @if (draggable()) {\n <span rtElem=\"handle\">\n <rt-icon-button\n cdkDragHandle\n qa-dataid=\"dynamic-selector-drag\"\n icon=\"arrows\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"dragLabel()\"\n [tooltip]=\"isNarrow() ? '' : dragLabel()\"\n [disabled]=\"disabled()\" />\n </span>\n }\n\n @if (editedIndex() === index) {\n <rt-input\n rtElem=\"field\"\n qa-dataid=\"dynamic-selector-edit-field\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event ?? '')\"\n (keydown.enter)=\"onEditApply(row)\" />\n } @else if (titleTpl(); as tpl) {\n <div rtElem=\"title\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.item }\" />\n </div>\n } @else {\n <span\n rtElem=\"title\"\n rtTooltipWhenTruncated\n [rtMod]=\"{ nowrap: !titleWrap() }\"\n [rtTooltip]=\"titleWrap() ? '' : row.label\">\n {{ row.label }}\n </span>\n }\n\n <div rtElem=\"controls\">\n @if (controlsTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.item }\" />\n }\n\n @if (editable()) {\n @if (editedIndex() === index) {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit-cancel\"\n icon=\"undo\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"cancelLabel()\"\n [tooltip]=\"isNarrow() ? '' : cancelLabel()\"\n (clicked)=\"onEditCancel()\" />\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit-apply\"\n icon=\"check\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"applyLabel()\"\n [tooltip]=\"isNarrow() ? '' : applyLabel()\"\n (clicked)=\"onEditApply(row)\" />\n } @else {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit\"\n icon=\"pencil\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"editLabel()\"\n [tooltip]=\"isNarrow() ? '' : editLabel()\"\n [disabled]=\"disabled()\"\n (clicked)=\"onEditStart(index, row)\" />\n }\n }\n\n @if (removeShown()) {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-remove\"\n icon=\"trash\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"row.locked || disabled() ? 'muted' : 'danger'\"\n [ariaLabel]=\"removeLabel()\"\n [tooltip]=\"isNarrow() ? '' : removeLabel()\"\n [disabled]=\"row.locked || disabled()\"\n (clicked)=\"onRemove(row)\" />\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (actionsShown()) {\n <div rtElem=\"actions\">\n <div rtElem=\"add\">\n <ng-content />\n </div>\n\n @if (resetClearShown()) {\n <rt-icon-button\n rtElem=\"reset\"\n qa-dataid=\"dynamic-selector-reset\"\n icon=\"refresh\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"resetDisabled() || disabled() ? 'muted' : 'current'\"\n [ariaLabel]=\"resetLabel()\"\n [tooltip]=\"isNarrow() ? '' : resetLabel()\"\n [disabled]=\"resetDisabled() || disabled()\"\n (clicked)=\"resetClicked.emit()\" />\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"dynamic-selector-clear\"\n size=\"sm\"\n [icon]=\"clearIcon()\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"clearDisabled() || disabled() ? 'muted' : 'danger'\"\n [ariaLabel]=\"clearLabel()\"\n [tooltip]=\"isNarrow() ? '' : clearLabel()\"\n [disabled]=\"clearDisabled() || disabled()\"\n (clicked)=\"cleared.emit()\" />\n }\n </div>\n }\n</ng-container>\n",
|
|
238
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-list{--rt-dynamic-selector-list-row-bg: var(--rt-color-action-primary-subtle);--rt-dynamic-selector-list-row-radius: var(--rt-radius-sm);--rt-dynamic-selector-list-divider-width: var(--rt-border-width-thin);--rt-dynamic-selector-list-drag-shadow: var(--rt-shadow-md);--rt-dynamic-selector-list-drag-duration: var(--rt-duration-base);--rt-dynamic-selector-list-row-padding-x: var(--rt-space-sm);--rt-dynamic-selector-list-add-font-weight: var(--rt-font-weight-medium);--rt-dynamic-selector-list-add-indent: 0;--rt-dynamic-selector-list-reset-color: var(--rt-color-text-primary);--rt-dynamic-selector-list-actions-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-divider-width-default: 0;--rt-dynamic-selector-list-controls-divider-color-default: var(--rt-color-border-default);--rt-dynamic-selector-list-row-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-offset-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-padding-end-default: 0;--rt-dynamic-selector-list-handle-padding-start-default: 0;--rt-dynamic-selector-list-handle-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-title-gap-default: var(--rt-space-sm);display:flex;flex-direction:column;gap:var(--rt-dynamic-selector-list-actions-offset, var(--rt-dynamic-selector-list-actions-offset-default))}.rt-dynamic-selector-list__rows{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-dynamic-selector-list__row{display:flex;min-height:var(--rt-control-height-lg);box-sizing:border-box;align-items:center;padding:var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-end, var(--rt-dynamic-selector-list-row-padding-end-default)) var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-x);border-radius:var(--rt-dynamic-selector-list-row-radius);background:var(--rt-dynamic-selector-list-row-bg);color:var(--rt-color-text-primary);gap:var(--rt-space-sm)}.rt-dynamic-selector-list__handle{border-right:var(--rt-dynamic-selector-list-divider-width) solid var(--rt-color-border-default);cursor:grab;margin-inline-end:calc(var(--rt-dynamic-selector-list-title-gap, var(--rt-dynamic-selector-list-title-gap-default)) - var(--rt-space-sm));padding-inline:var(--rt-dynamic-selector-list-handle-padding-start, var(--rt-dynamic-selector-list-handle-padding-start-default)) var(--rt-dynamic-selector-list-handle-padding-end, var(--rt-dynamic-selector-list-handle-padding-end-default))}.rt-dynamic-selector-list__title{min-width:0;flex:1 1 auto;font-size:var(--rt-text-md);overflow-wrap:anywhere}.rt-dynamic-selector-list__title--nowrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-dynamic-selector-list__field{min-width:0;flex:1 1 auto}.rt-dynamic-selector-list__controls{display:flex;flex:0 0 auto;align-items:center;gap:var(--rt-dynamic-selector-list-controls-gap, var(--rt-dynamic-selector-list-controls-gap-default))}.rt-dynamic-selector-list__controls>:not(:last-child){border-inline-end:var(--rt-dynamic-selector-list-controls-divider-width, var(--rt-dynamic-selector-list-controls-divider-width-default)) solid var(--rt-dynamic-selector-list-controls-divider-color, var(--rt-dynamic-selector-list-controls-divider-color-default))}.rt-dynamic-selector-list__actions{display:flex;align-items:center;gap:var(--rt-dynamic-selector-list-actions-gap, var(--rt-dynamic-selector-list-actions-gap-default));padding-inline-end:var(--rt-dynamic-selector-list-actions-padding-end, var(--rt-dynamic-selector-list-actions-padding-end-default))}.rt-dynamic-selector-list__add{display:flex;min-width:0;flex:1 1 auto;align-items:center;padding-inline-start:var(--rt-dynamic-selector-list-add-indent)}.rt-dynamic-selector-list__add .rt-button{color:var(--rt-dynamic-selector-list-add-color, var(--rt-btn-color));font-weight:var(--rt-dynamic-selector-list-add-font-weight)}.rt-dynamic-selector-list__reset.rt-icon-button{--rt-icon-button-color: var(--rt-dynamic-selector-list-reset-color)}.rt-dynamic-selector-list__clear{flex:none}.rt-dynamic-selector-list__row.cdk-drag-preview{--rt-dynamic-selector-list-row-bg: var(--rt-color-action-primary-subtle);--rt-dynamic-selector-list-row-radius: var(--rt-radius-sm);--rt-dynamic-selector-list-divider-width: var(--rt-border-width-thin);--rt-dynamic-selector-list-drag-shadow: var(--rt-shadow-md);--rt-dynamic-selector-list-actions-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-divider-width-default: 0;--rt-dynamic-selector-list-controls-divider-color-default: var(--rt-color-border-default);--rt-dynamic-selector-list-row-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-offset-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-padding-end-default: 0;--rt-dynamic-selector-list-handle-padding-start-default: 0;--rt-dynamic-selector-list-handle-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-title-gap-default: var(--rt-space-sm);box-shadow:var(--rt-dynamic-selector-list-drag-shadow)}.rt-dynamic-selector-list__row.cdk-drag-placeholder{opacity:0}.rt-dynamic-selector-list__row.cdk-drag-animating,.rt-dynamic-selector-list__rows.cdk-drop-list-dragging .rt-dynamic-selector-list__row:not(.cdk-drag-placeholder){transition:transform var(--rt-dynamic-selector-list-drag-duration) ease-out}}.rt-dynamic-selector-list__row.cdk-drag-preview{padding:var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-end, var(--rt-space-2xs)) var(--rt-space-2xs) var(--rt-space-sm);background-color:var(--rt-color-bg-surface);background-image:linear-gradient(var(--rt-dynamic-selector-list-row-bg),var(--rt-dynamic-selector-list-row-bg));color:var(--rt-color-text-primary)}\n"],
|
|
239
|
+
dependencies: [
|
|
240
|
+
{
|
|
241
|
+
kind: "ngmodule",
|
|
242
|
+
type: FormsModule
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
kind: "directive",
|
|
246
|
+
type: i1.NgControlStatus,
|
|
247
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
kind: "directive",
|
|
251
|
+
type: i1.NgModel,
|
|
252
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
253
|
+
inputs: [
|
|
254
|
+
"name",
|
|
255
|
+
"disabled",
|
|
256
|
+
"ngModel",
|
|
257
|
+
"ngModelOptions"
|
|
258
|
+
],
|
|
259
|
+
outputs: ["ngModelChange"],
|
|
260
|
+
exportAs: ["ngModel"]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
kind: "directive",
|
|
264
|
+
type: NgTemplateOutlet,
|
|
265
|
+
selector: "[ngTemplateOutlet]",
|
|
266
|
+
inputs: [
|
|
267
|
+
"ngTemplateOutletContext",
|
|
268
|
+
"ngTemplateOutlet",
|
|
269
|
+
"ngTemplateOutletInjector"
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
kind: "directive",
|
|
274
|
+
type: CdkDrag,
|
|
275
|
+
selector: "[cdkDrag]",
|
|
276
|
+
inputs: [
|
|
277
|
+
"cdkDragData",
|
|
278
|
+
"cdkDragLockAxis",
|
|
279
|
+
"cdkDragRootElement",
|
|
280
|
+
"cdkDragBoundary",
|
|
281
|
+
"cdkDragStartDelay",
|
|
282
|
+
"cdkDragFreeDragPosition",
|
|
283
|
+
"cdkDragDisabled",
|
|
284
|
+
"cdkDragConstrainPosition",
|
|
285
|
+
"cdkDragPreviewClass",
|
|
286
|
+
"cdkDragPreviewContainer",
|
|
287
|
+
"cdkDragScale"
|
|
288
|
+
],
|
|
289
|
+
outputs: [
|
|
290
|
+
"cdkDragStarted",
|
|
291
|
+
"cdkDragReleased",
|
|
292
|
+
"cdkDragEnded",
|
|
293
|
+
"cdkDragEntered",
|
|
294
|
+
"cdkDragExited",
|
|
295
|
+
"cdkDragDropped",
|
|
296
|
+
"cdkDragMoved"
|
|
297
|
+
],
|
|
298
|
+
exportAs: ["cdkDrag"]
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
kind: "directive",
|
|
302
|
+
type: CdkDragHandle,
|
|
303
|
+
selector: "[cdkDragHandle]",
|
|
304
|
+
inputs: ["cdkDragHandleDisabled"]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
kind: "directive",
|
|
308
|
+
type: CdkDropList,
|
|
309
|
+
selector: "[cdkDropList], cdk-drop-list",
|
|
310
|
+
inputs: [
|
|
311
|
+
"cdkDropListConnectedTo",
|
|
312
|
+
"cdkDropListData",
|
|
313
|
+
"cdkDropListOrientation",
|
|
314
|
+
"id",
|
|
315
|
+
"cdkDropListLockAxis",
|
|
316
|
+
"cdkDropListDisabled",
|
|
317
|
+
"cdkDropListSortingDisabled",
|
|
318
|
+
"cdkDropListEnterPredicate",
|
|
319
|
+
"cdkDropListSortPredicate",
|
|
320
|
+
"cdkDropListAutoScrollDisabled",
|
|
321
|
+
"cdkDropListAutoScrollStep",
|
|
322
|
+
"cdkDropListElementContainer",
|
|
323
|
+
"cdkDropListHasAnchor"
|
|
324
|
+
],
|
|
325
|
+
outputs: [
|
|
326
|
+
"cdkDropListDropped",
|
|
327
|
+
"cdkDropListEntered",
|
|
328
|
+
"cdkDropListExited",
|
|
329
|
+
"cdkDropListSorted"
|
|
330
|
+
],
|
|
331
|
+
exportAs: ["cdkDropList"]
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
kind: "directive",
|
|
335
|
+
type: BlockDirective,
|
|
336
|
+
selector: "[rtBlock]",
|
|
337
|
+
inputs: ["rtMod"]
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
kind: "directive",
|
|
341
|
+
type: ElemDirective,
|
|
342
|
+
selector: "[rtElem]",
|
|
343
|
+
inputs: ["rtMod"]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
kind: "directive",
|
|
347
|
+
type: ModDirective,
|
|
348
|
+
selector: "[rtMod]"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
kind: "component",
|
|
352
|
+
type: RtIconButtonComponent,
|
|
353
|
+
selector: "rt-icon-button",
|
|
354
|
+
inputs: [
|
|
355
|
+
"icon",
|
|
356
|
+
"glyph",
|
|
357
|
+
"ariaLabel",
|
|
358
|
+
"variant",
|
|
359
|
+
"iconColor",
|
|
360
|
+
"iconFill",
|
|
361
|
+
"size",
|
|
362
|
+
"iconSize",
|
|
363
|
+
"type",
|
|
364
|
+
"tooltip",
|
|
365
|
+
"tooltipHideOnClick",
|
|
366
|
+
"tabIndex",
|
|
367
|
+
"loading",
|
|
368
|
+
"disabled",
|
|
369
|
+
"active",
|
|
370
|
+
"expanded",
|
|
371
|
+
"indicator"
|
|
372
|
+
],
|
|
373
|
+
outputs: ["clicked"]
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
kind: "component",
|
|
377
|
+
type: RtInputComponent,
|
|
378
|
+
selector: "rt-input",
|
|
379
|
+
inputs: [
|
|
380
|
+
"appearance",
|
|
381
|
+
"type",
|
|
382
|
+
"placeholder",
|
|
383
|
+
"iconLeft",
|
|
384
|
+
"iconRight",
|
|
385
|
+
"passwordToggle",
|
|
386
|
+
"autocomplete"
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
kind: "directive",
|
|
391
|
+
type: RtTooltipDirective,
|
|
392
|
+
selector: "[rtTooltip]",
|
|
393
|
+
inputs: [
|
|
394
|
+
"rtTooltip",
|
|
395
|
+
"rtTooltipPlacement",
|
|
396
|
+
"rtTooltipWhenTruncated",
|
|
397
|
+
"rtTooltipHideOnClick"
|
|
398
|
+
],
|
|
399
|
+
exportAs: ["rtTooltip"]
|
|
400
|
+
}
|
|
401
|
+
],
|
|
402
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
403
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
408
|
+
minVersion: "12.0.0",
|
|
409
|
+
version: "22.2.2",
|
|
410
|
+
ngImport: i0,
|
|
411
|
+
type: RtDynamicSelectorListComponent,
|
|
412
|
+
decorators: [{
|
|
413
|
+
type: Component,
|
|
414
|
+
args: [{
|
|
415
|
+
selector: "rt-dynamic-selector-list",
|
|
416
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
417
|
+
encapsulation: ViewEncapsulation.None,
|
|
418
|
+
imports: [
|
|
419
|
+
FormsModule,
|
|
420
|
+
NgTemplateOutlet,
|
|
421
|
+
CdkDrag,
|
|
422
|
+
CdkDragHandle,
|
|
423
|
+
CdkDropList,
|
|
424
|
+
BlockDirective,
|
|
425
|
+
ElemDirective,
|
|
426
|
+
ModDirective,
|
|
427
|
+
RtIconButtonComponent,
|
|
428
|
+
RtInputComponent,
|
|
429
|
+
RtTooltipDirective
|
|
430
|
+
],
|
|
431
|
+
host: { class: BEM_BLOCK$3 },
|
|
432
|
+
template: "<ng-container rtBlock=\"rt-dynamic-selector-list\">\n @if (rows().length > 0) {\n <div rtElem=\"rows\" cdkDropList qa-dataid=\"dynamic-selector-rows\" (cdkDropListDropped)=\"onDrop($event)\">\n @for (row of rows(); track row.key; let index = $index) {\n <div\n rtElem=\"row\"\n cdkDrag\n qa-dataid=\"dynamic-selector-row\"\n [rtMod]=\"{ locked: row.locked }\"\n [cdkDragDisabled]=\"!draggable() || disabled()\">\n @if (draggable()) {\n <span rtElem=\"handle\">\n <rt-icon-button\n cdkDragHandle\n qa-dataid=\"dynamic-selector-drag\"\n icon=\"arrows\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"dragLabel()\"\n [tooltip]=\"isNarrow() ? '' : dragLabel()\"\n [disabled]=\"disabled()\" />\n </span>\n }\n\n @if (editedIndex() === index) {\n <rt-input\n rtElem=\"field\"\n qa-dataid=\"dynamic-selector-edit-field\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event ?? '')\"\n (keydown.enter)=\"onEditApply(row)\" />\n } @else if (titleTpl(); as tpl) {\n <div rtElem=\"title\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.item }\" />\n </div>\n } @else {\n <span\n rtElem=\"title\"\n rtTooltipWhenTruncated\n [rtMod]=\"{ nowrap: !titleWrap() }\"\n [rtTooltip]=\"titleWrap() ? '' : row.label\">\n {{ row.label }}\n </span>\n }\n\n <div rtElem=\"controls\">\n @if (controlsTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.item }\" />\n }\n\n @if (editable()) {\n @if (editedIndex() === index) {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit-cancel\"\n icon=\"undo\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"cancelLabel()\"\n [tooltip]=\"isNarrow() ? '' : cancelLabel()\"\n (clicked)=\"onEditCancel()\" />\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit-apply\"\n icon=\"check\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"applyLabel()\"\n [tooltip]=\"isNarrow() ? '' : applyLabel()\"\n (clicked)=\"onEditApply(row)\" />\n } @else {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-edit\"\n icon=\"pencil\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [ariaLabel]=\"editLabel()\"\n [tooltip]=\"isNarrow() ? '' : editLabel()\"\n [disabled]=\"disabled()\"\n (clicked)=\"onEditStart(index, row)\" />\n }\n }\n\n @if (removeShown()) {\n <rt-icon-button\n qa-dataid=\"dynamic-selector-remove\"\n icon=\"trash\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"row.locked || disabled() ? 'muted' : 'danger'\"\n [ariaLabel]=\"removeLabel()\"\n [tooltip]=\"isNarrow() ? '' : removeLabel()\"\n [disabled]=\"row.locked || disabled()\"\n (clicked)=\"onRemove(row)\" />\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (actionsShown()) {\n <div rtElem=\"actions\">\n <div rtElem=\"add\">\n <ng-content />\n </div>\n\n @if (resetClearShown()) {\n <rt-icon-button\n rtElem=\"reset\"\n qa-dataid=\"dynamic-selector-reset\"\n icon=\"refresh\"\n size=\"sm\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"resetDisabled() || disabled() ? 'muted' : 'current'\"\n [ariaLabel]=\"resetLabel()\"\n [tooltip]=\"isNarrow() ? '' : resetLabel()\"\n [disabled]=\"resetDisabled() || disabled()\"\n (clicked)=\"resetClicked.emit()\" />\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"dynamic-selector-clear\"\n size=\"sm\"\n [icon]=\"clearIcon()\"\n [radius]=\"buttonRadius()\"\n [iconColor]=\"clearDisabled() || disabled() ? 'muted' : 'danger'\"\n [ariaLabel]=\"clearLabel()\"\n [tooltip]=\"isNarrow() ? '' : clearLabel()\"\n [disabled]=\"clearDisabled() || disabled()\"\n (clicked)=\"cleared.emit()\" />\n }\n </div>\n }\n</ng-container>\n",
|
|
433
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-list{--rt-dynamic-selector-list-row-bg: var(--rt-color-action-primary-subtle);--rt-dynamic-selector-list-row-radius: var(--rt-radius-sm);--rt-dynamic-selector-list-divider-width: var(--rt-border-width-thin);--rt-dynamic-selector-list-drag-shadow: var(--rt-shadow-md);--rt-dynamic-selector-list-drag-duration: var(--rt-duration-base);--rt-dynamic-selector-list-row-padding-x: var(--rt-space-sm);--rt-dynamic-selector-list-add-font-weight: var(--rt-font-weight-medium);--rt-dynamic-selector-list-add-indent: 0;--rt-dynamic-selector-list-reset-color: var(--rt-color-text-primary);--rt-dynamic-selector-list-actions-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-divider-width-default: 0;--rt-dynamic-selector-list-controls-divider-color-default: var(--rt-color-border-default);--rt-dynamic-selector-list-row-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-offset-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-padding-end-default: 0;--rt-dynamic-selector-list-handle-padding-start-default: 0;--rt-dynamic-selector-list-handle-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-title-gap-default: var(--rt-space-sm);display:flex;flex-direction:column;gap:var(--rt-dynamic-selector-list-actions-offset, var(--rt-dynamic-selector-list-actions-offset-default))}.rt-dynamic-selector-list__rows{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-dynamic-selector-list__row{display:flex;min-height:var(--rt-control-height-lg);box-sizing:border-box;align-items:center;padding:var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-end, var(--rt-dynamic-selector-list-row-padding-end-default)) var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-x);border-radius:var(--rt-dynamic-selector-list-row-radius);background:var(--rt-dynamic-selector-list-row-bg);color:var(--rt-color-text-primary);gap:var(--rt-space-sm)}.rt-dynamic-selector-list__handle{border-right:var(--rt-dynamic-selector-list-divider-width) solid var(--rt-color-border-default);cursor:grab;margin-inline-end:calc(var(--rt-dynamic-selector-list-title-gap, var(--rt-dynamic-selector-list-title-gap-default)) - var(--rt-space-sm));padding-inline:var(--rt-dynamic-selector-list-handle-padding-start, var(--rt-dynamic-selector-list-handle-padding-start-default)) var(--rt-dynamic-selector-list-handle-padding-end, var(--rt-dynamic-selector-list-handle-padding-end-default))}.rt-dynamic-selector-list__title{min-width:0;flex:1 1 auto;font-size:var(--rt-text-md);overflow-wrap:anywhere}.rt-dynamic-selector-list__title--nowrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-dynamic-selector-list__field{min-width:0;flex:1 1 auto}.rt-dynamic-selector-list__controls{display:flex;flex:0 0 auto;align-items:center;gap:var(--rt-dynamic-selector-list-controls-gap, var(--rt-dynamic-selector-list-controls-gap-default))}.rt-dynamic-selector-list__controls>:not(:last-child){border-inline-end:var(--rt-dynamic-selector-list-controls-divider-width, var(--rt-dynamic-selector-list-controls-divider-width-default)) solid var(--rt-dynamic-selector-list-controls-divider-color, var(--rt-dynamic-selector-list-controls-divider-color-default))}.rt-dynamic-selector-list__actions{display:flex;align-items:center;gap:var(--rt-dynamic-selector-list-actions-gap, var(--rt-dynamic-selector-list-actions-gap-default));padding-inline-end:var(--rt-dynamic-selector-list-actions-padding-end, var(--rt-dynamic-selector-list-actions-padding-end-default))}.rt-dynamic-selector-list__add{display:flex;min-width:0;flex:1 1 auto;align-items:center;padding-inline-start:var(--rt-dynamic-selector-list-add-indent)}.rt-dynamic-selector-list__add .rt-button{color:var(--rt-dynamic-selector-list-add-color, var(--rt-btn-color));font-weight:var(--rt-dynamic-selector-list-add-font-weight)}.rt-dynamic-selector-list__reset.rt-icon-button{--rt-icon-button-color: var(--rt-dynamic-selector-list-reset-color)}.rt-dynamic-selector-list__clear{flex:none}.rt-dynamic-selector-list__row.cdk-drag-preview{--rt-dynamic-selector-list-row-bg: var(--rt-color-action-primary-subtle);--rt-dynamic-selector-list-row-radius: var(--rt-radius-sm);--rt-dynamic-selector-list-divider-width: var(--rt-border-width-thin);--rt-dynamic-selector-list-drag-shadow: var(--rt-shadow-md);--rt-dynamic-selector-list-actions-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-gap-default: var(--rt-space-2xs);--rt-dynamic-selector-list-controls-divider-width-default: 0;--rt-dynamic-selector-list-controls-divider-color-default: var(--rt-color-border-default);--rt-dynamic-selector-list-row-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-offset-default: var(--rt-space-2xs);--rt-dynamic-selector-list-actions-padding-end-default: 0;--rt-dynamic-selector-list-handle-padding-start-default: 0;--rt-dynamic-selector-list-handle-padding-end-default: var(--rt-space-2xs);--rt-dynamic-selector-list-title-gap-default: var(--rt-space-sm);box-shadow:var(--rt-dynamic-selector-list-drag-shadow)}.rt-dynamic-selector-list__row.cdk-drag-placeholder{opacity:0}.rt-dynamic-selector-list__row.cdk-drag-animating,.rt-dynamic-selector-list__rows.cdk-drop-list-dragging .rt-dynamic-selector-list__row:not(.cdk-drag-placeholder){transition:transform var(--rt-dynamic-selector-list-drag-duration) ease-out}}.rt-dynamic-selector-list__row.cdk-drag-preview{padding:var(--rt-space-2xs) var(--rt-dynamic-selector-list-row-padding-end, var(--rt-space-2xs)) var(--rt-space-2xs) var(--rt-space-sm);background-color:var(--rt-color-bg-surface);background-image:linear-gradient(var(--rt-dynamic-selector-list-row-bg),var(--rt-dynamic-selector-list-row-bg));color:var(--rt-color-text-primary)}\n"]
|
|
434
|
+
}]
|
|
435
|
+
}],
|
|
436
|
+
propDecorators: {
|
|
437
|
+
rows: [{
|
|
438
|
+
type: i0.Input,
|
|
439
|
+
args: [{
|
|
440
|
+
isSignal: true,
|
|
441
|
+
alias: "rows",
|
|
442
|
+
required: false
|
|
443
|
+
}]
|
|
444
|
+
}],
|
|
445
|
+
draggable: [{
|
|
446
|
+
type: i0.Input,
|
|
447
|
+
args: [{
|
|
448
|
+
isSignal: true,
|
|
449
|
+
alias: "draggable",
|
|
450
|
+
required: false
|
|
451
|
+
}]
|
|
452
|
+
}],
|
|
453
|
+
editable: [{
|
|
454
|
+
type: i0.Input,
|
|
455
|
+
args: [{
|
|
456
|
+
isSignal: true,
|
|
457
|
+
alias: "editable",
|
|
458
|
+
required: false
|
|
459
|
+
}]
|
|
460
|
+
}],
|
|
461
|
+
disabled: [{
|
|
462
|
+
type: i0.Input,
|
|
463
|
+
args: [{
|
|
464
|
+
isSignal: true,
|
|
465
|
+
alias: "disabled",
|
|
466
|
+
required: false
|
|
467
|
+
}]
|
|
468
|
+
}],
|
|
469
|
+
actionsShown: [{
|
|
470
|
+
type: i0.Input,
|
|
471
|
+
args: [{
|
|
472
|
+
isSignal: true,
|
|
473
|
+
alias: "actionsShown",
|
|
474
|
+
required: false
|
|
475
|
+
}]
|
|
476
|
+
}],
|
|
477
|
+
resetClearShown: [{
|
|
478
|
+
type: i0.Input,
|
|
479
|
+
args: [{
|
|
480
|
+
isSignal: true,
|
|
481
|
+
alias: "resetClearShown",
|
|
482
|
+
required: false
|
|
483
|
+
}]
|
|
484
|
+
}],
|
|
485
|
+
removeShown: [{
|
|
486
|
+
type: i0.Input,
|
|
487
|
+
args: [{
|
|
488
|
+
isSignal: true,
|
|
489
|
+
alias: "removeShown",
|
|
490
|
+
required: false
|
|
491
|
+
}]
|
|
492
|
+
}],
|
|
493
|
+
resetDisabled: [{
|
|
494
|
+
type: i0.Input,
|
|
495
|
+
args: [{
|
|
496
|
+
isSignal: true,
|
|
497
|
+
alias: "resetDisabled",
|
|
498
|
+
required: false
|
|
499
|
+
}]
|
|
500
|
+
}],
|
|
501
|
+
clearDisabled: [{
|
|
502
|
+
type: i0.Input,
|
|
503
|
+
args: [{
|
|
504
|
+
isSignal: true,
|
|
505
|
+
alias: "clearDisabled",
|
|
506
|
+
required: false
|
|
507
|
+
}]
|
|
508
|
+
}],
|
|
509
|
+
buttonRadius: [{
|
|
510
|
+
type: i0.Input,
|
|
511
|
+
args: [{
|
|
512
|
+
isSignal: true,
|
|
513
|
+
alias: "buttonRadius",
|
|
514
|
+
required: false
|
|
515
|
+
}]
|
|
516
|
+
}],
|
|
517
|
+
clearIcon: [{
|
|
518
|
+
type: i0.Input,
|
|
519
|
+
args: [{
|
|
520
|
+
isSignal: true,
|
|
521
|
+
alias: "clearIcon",
|
|
522
|
+
required: false
|
|
523
|
+
}]
|
|
524
|
+
}],
|
|
525
|
+
titleWrap: [{
|
|
526
|
+
type: i0.Input,
|
|
527
|
+
args: [{
|
|
528
|
+
isSignal: true,
|
|
529
|
+
alias: "titleWrap",
|
|
530
|
+
required: false
|
|
531
|
+
}]
|
|
532
|
+
}],
|
|
533
|
+
titleTpl: [{
|
|
534
|
+
type: i0.Input,
|
|
535
|
+
args: [{
|
|
536
|
+
isSignal: true,
|
|
537
|
+
alias: "titleTpl",
|
|
538
|
+
required: false
|
|
539
|
+
}]
|
|
540
|
+
}],
|
|
541
|
+
controlsTpl: [{
|
|
542
|
+
type: i0.Input,
|
|
543
|
+
args: [{
|
|
544
|
+
isSignal: true,
|
|
545
|
+
alias: "controlsTpl",
|
|
546
|
+
required: false
|
|
547
|
+
}]
|
|
548
|
+
}],
|
|
549
|
+
removed: [{
|
|
550
|
+
type: i0.Output,
|
|
551
|
+
args: ["removed"]
|
|
552
|
+
}],
|
|
553
|
+
moved: [{
|
|
554
|
+
type: i0.Output,
|
|
555
|
+
args: ["moved"]
|
|
556
|
+
}],
|
|
557
|
+
edited: [{
|
|
558
|
+
type: i0.Output,
|
|
559
|
+
args: ["edited"]
|
|
560
|
+
}],
|
|
561
|
+
resetClicked: [{
|
|
562
|
+
type: i0.Output,
|
|
563
|
+
args: ["resetClicked"]
|
|
564
|
+
}],
|
|
565
|
+
cleared: [{
|
|
566
|
+
type: i0.Output,
|
|
567
|
+
args: ["cleared"]
|
|
568
|
+
}]
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
var RtDynamicSelectorRowControlsDirective = class RtDynamicSelectorRowControlsDirective {
|
|
572
|
+
constructor() {
|
|
573
|
+
this.templateRef = inject(TemplateRef);
|
|
574
|
+
}
|
|
575
|
+
static {
|
|
576
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
577
|
+
minVersion: "12.0.0",
|
|
578
|
+
version: "22.2.2",
|
|
579
|
+
ngImport: i0,
|
|
580
|
+
type: RtDynamicSelectorRowControlsDirective,
|
|
581
|
+
deps: [],
|
|
582
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
static {
|
|
586
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
587
|
+
minVersion: "14.0.0",
|
|
588
|
+
version: "22.2.2",
|
|
589
|
+
type: RtDynamicSelectorRowControlsDirective,
|
|
590
|
+
isStandalone: true,
|
|
591
|
+
selector: "[rtDynamicSelectorRowControls]",
|
|
592
|
+
ngImport: i0
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
597
|
+
minVersion: "12.0.0",
|
|
598
|
+
version: "22.2.2",
|
|
599
|
+
ngImport: i0,
|
|
600
|
+
type: RtDynamicSelectorRowControlsDirective,
|
|
601
|
+
decorators: [{
|
|
602
|
+
type: Directive,
|
|
603
|
+
args: [{ selector: "[rtDynamicSelectorRowControls]" }]
|
|
604
|
+
}]
|
|
605
|
+
});
|
|
606
|
+
var RtDynamicSelectorRowTitleDirective = class RtDynamicSelectorRowTitleDirective {
|
|
607
|
+
constructor() {
|
|
608
|
+
this.templateRef = inject(TemplateRef);
|
|
609
|
+
}
|
|
610
|
+
static {
|
|
611
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
612
|
+
minVersion: "12.0.0",
|
|
613
|
+
version: "22.2.2",
|
|
614
|
+
ngImport: i0,
|
|
615
|
+
type: RtDynamicSelectorRowTitleDirective,
|
|
616
|
+
deps: [],
|
|
617
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
static {
|
|
621
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
622
|
+
minVersion: "14.0.0",
|
|
623
|
+
version: "22.2.2",
|
|
624
|
+
type: RtDynamicSelectorRowTitleDirective,
|
|
625
|
+
isStandalone: true,
|
|
626
|
+
selector: "[rtDynamicSelectorRowTitle]",
|
|
627
|
+
ngImport: i0
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
632
|
+
minVersion: "12.0.0",
|
|
633
|
+
version: "22.2.2",
|
|
634
|
+
ngImport: i0,
|
|
635
|
+
type: RtDynamicSelectorRowTitleDirective,
|
|
636
|
+
decorators: [{
|
|
637
|
+
type: Directive,
|
|
638
|
+
args: [{ selector: "[rtDynamicSelectorRowTitle]" }]
|
|
639
|
+
}]
|
|
640
|
+
});
|
|
182
641
|
function dynamicSelectorLabel(item, labelOf) {
|
|
183
|
-
|
|
184
|
-
|
|
642
|
+
const label = labelOf(item);
|
|
643
|
+
return typeof label === "string" || typeof label === "number" ? String(label) : null;
|
|
185
644
|
}
|
|
186
|
-
/**
|
|
187
|
-
* Совпадает ли подпись с запросом. Запрос режется по пробелам, и каждое слово обязано найтись в
|
|
188
|
-
* подписи без учёта регистра: «отчёт март» находит «Март, отчёт по складу».
|
|
189
|
-
*/
|
|
190
645
|
function dynamicSelectorMatches(label, query) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
646
|
+
const words = query.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
647
|
+
const text = label.toLowerCase();
|
|
648
|
+
return words.every((word) => text.includes(word));
|
|
194
649
|
}
|
|
195
|
-
/**
|
|
196
|
-
* Подпись, разрезанная по словам запроса: совпавшие куски помечены. Слова ищутся так же, как при
|
|
197
|
-
* отборе, — без учёта регистра и везде, где встречаются; пересёкшиеся совпадения сливаются в один
|
|
198
|
-
* кусок. Подпись, длина которой меняется от смены регистра, остаётся одним куском без отметки.
|
|
199
|
-
*/
|
|
200
650
|
function dynamicMatchParts(label, query) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
651
|
+
const words = query.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
652
|
+
const text = label.toLowerCase();
|
|
653
|
+
if (words.length === 0 || label === "" || text.length !== label.length) return [{
|
|
654
|
+
text: label,
|
|
655
|
+
matched: false
|
|
656
|
+
}];
|
|
657
|
+
const marks = Array.from({ length: label.length }, () => false);
|
|
658
|
+
for (const word of words) {
|
|
659
|
+
let from = text.indexOf(word);
|
|
660
|
+
while (from !== -1) {
|
|
661
|
+
marks.fill(true, from, from + word.length);
|
|
662
|
+
from = text.indexOf(word, from + 1);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
const parts = [];
|
|
666
|
+
let start = 0;
|
|
667
|
+
for (let index = 1; index <= label.length; index++) if (index === label.length || marks[index] !== marks[start]) {
|
|
668
|
+
parts.push({
|
|
669
|
+
text: label.slice(start, index),
|
|
670
|
+
matched: marks[start]
|
|
671
|
+
});
|
|
672
|
+
start = index;
|
|
673
|
+
}
|
|
674
|
+
return parts;
|
|
223
675
|
}
|
|
224
|
-
/**
|
|
225
|
-
* Пункты, которые можно выбрать: без уже выбранных, без пунктов без подписи и, если запрос есть,
|
|
226
|
-
* только совпавшие. Порядок — функция сортировки приложения, а без неё — по алфавиту подписи.
|
|
227
|
-
*/
|
|
228
676
|
function selectableDynamicItems(items, chosenKeys, keyOf, labelOf, query, sortFn) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
return found.sort(sortFn ?? ((a, b) => (dynamicSelectorLabel(a, labelOf) ?? '').localeCompare(dynamicSelectorLabel(b, labelOf) ?? '')));
|
|
677
|
+
const chosen = new Set(chosenKeys);
|
|
678
|
+
return items.filter((item) => {
|
|
679
|
+
const label = dynamicSelectorLabel(item, labelOf);
|
|
680
|
+
return label !== null && !chosen.has(keyOf(item)) && dynamicSelectorMatches(label, query);
|
|
681
|
+
}).sort(sortFn ?? ((a, b) => (dynamicSelectorLabel(a, labelOf) ?? "").localeCompare(dynamicSelectorLabel(b, labelOf) ?? "")));
|
|
235
682
|
}
|
|
236
|
-
/** Ключ добавлен или снят. Повторно добавленный ключ не удваивается. */
|
|
237
683
|
function toggleDynamicKey(keys, key, checked) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
return keys.filter((item) => item !== key);
|
|
684
|
+
if (checked) return keys.includes(key) ? [...keys] : [...keys, key];
|
|
685
|
+
return keys.filter((item) => item !== key);
|
|
242
686
|
}
|
|
243
|
-
/** Состояние флажка «Выбрать всё» по видимым пунктам. */
|
|
244
687
|
function dynamicSelectAllState(visibleKeys, pickedKeys) {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
return picked === visibleKeys.length ? 'all' : 'some';
|
|
688
|
+
const picked = visibleKeys.filter((key) => pickedKeys.includes(key)).length;
|
|
689
|
+
if (picked === 0) return "none";
|
|
690
|
+
return picked === visibleKeys.length ? "all" : "some";
|
|
250
691
|
}
|
|
251
|
-
/**
|
|
252
|
-
* «Выбрать всё» добавляет к отмеченному все видимые пункты, снятие — убирает видимые и оставляет
|
|
253
|
-
* отмеченное вне запроса.
|
|
254
|
-
*/
|
|
255
692
|
function selectAllDynamicKeys(visibleKeys, pickedKeys, checked) {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
return [...pickedKeys, ...visibleKeys.filter((key) => !pickedKeys.includes(key))];
|
|
693
|
+
if (!checked) return pickedKeys.filter((key) => !visibleKeys.includes(key));
|
|
694
|
+
return [...pickedKeys, ...visibleKeys.filter((key) => !pickedKeys.includes(key))];
|
|
260
695
|
}
|
|
261
|
-
/** «Очистить» оставляет только ключи только для чтения, в их прежнем порядке. */
|
|
262
696
|
function clearDynamicKeys(keys, readonlyKeys) {
|
|
263
|
-
|
|
697
|
+
return keys.filter((key) => readonlyKeys.includes(key));
|
|
264
698
|
}
|
|
265
|
-
/** Строка перетащена на новое место. Индексы вне списка приводятся к его краям. */
|
|
266
699
|
function moveDynamicKey(keys, from, to) {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
list.splice(Math.min(Math.max(to, 0), last), 0, ...moved);
|
|
274
|
-
return list;
|
|
700
|
+
const list = [...keys];
|
|
701
|
+
const last = list.length - 1;
|
|
702
|
+
if (from < 0 || from > last) return list;
|
|
703
|
+
const moved = list.splice(from, 1);
|
|
704
|
+
list.splice(Math.min(Math.max(to, 0), last), 0, ...moved);
|
|
705
|
+
return list;
|
|
275
706
|
}
|
|
276
|
-
/** Совпадают ли два набора ключей с учётом порядка: так «Сбросить» узнаёт, что сбрасывать нечего. */
|
|
277
707
|
function sameDynamicKeys(a, b) {
|
|
278
|
-
|
|
708
|
+
return a.length === b.length && a.every((key, index) => key === b[index]);
|
|
279
709
|
}
|
|
280
|
-
/** Совпадают ли два набора ключей без учёта порядка: так «Очистить» узнаёт, что чистить нечего. */
|
|
281
710
|
function sameDynamicKeySet(a, b) {
|
|
282
|
-
|
|
283
|
-
|
|
711
|
+
const set = new Set(b);
|
|
712
|
+
return a.length === set.size && a.every((key) => set.has(key));
|
|
284
713
|
}
|
|
285
|
-
/** Строка поля списка строк: пустая и повторная не добавляются, пробелы по краям срезаются. */
|
|
286
714
|
function addDynamicText(values, raw) {
|
|
287
|
-
|
|
288
|
-
|
|
715
|
+
const text = (raw ?? "").trim();
|
|
716
|
+
return text === "" || values.includes(text) ? [...values] : [...values, text];
|
|
289
717
|
}
|
|
290
|
-
/**
|
|
291
|
-
* Строка поля списка строк исправлена на месте. Пустая правка и правка в уже существующую строку
|
|
292
|
-
* список не меняют: иначе строка пропала бы или удвоилась.
|
|
293
|
-
*/
|
|
294
718
|
function renameDynamicText(values, previous, next) {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
return values.map((value) => (value === previous ? text : value));
|
|
719
|
+
const text = (next ?? "").trim();
|
|
720
|
+
if (text === "" || text === previous || values.includes(text)) return [...values];
|
|
721
|
+
return values.map((value) => value === previous ? text : value);
|
|
300
722
|
}
|
|
301
|
-
/** Ключ последней видимой закреплённой строки: под ней стоит разделитель. Порядок строк не меняется. */
|
|
302
723
|
function lastPinnedDynamicKey(rows, pinnedKeys, keyOf) {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
return null;
|
|
724
|
+
for (let index = rows.length - 1; index >= 0; index -= 1) {
|
|
725
|
+
const key = keyOf(rows[index]);
|
|
726
|
+
if (pinnedKeys.includes(key)) return key;
|
|
727
|
+
}
|
|
728
|
+
return null;
|
|
310
729
|
}
|
|
311
|
-
/**
|
|
312
|
-
* Строки всплывающего выбора во время поиска: отмеченные раньше стоят над найденными и не пропадают
|
|
313
|
-
* оттого, что запрос перестал с ними совпадать. Без запроса отмеченные остаются на своих местах.
|
|
314
|
-
*/
|
|
315
730
|
function dynamicPopupRows(offered, found, ticked, keyOf, query) {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
731
|
+
if (query.trim() === "") return {
|
|
732
|
+
ticked: [],
|
|
733
|
+
found: [...found]
|
|
734
|
+
};
|
|
735
|
+
return {
|
|
736
|
+
ticked: ticked.map((key) => offered.find((item) => keyOf(item) === key)).filter((item) => item !== void 0),
|
|
737
|
+
found: found.filter((item) => !ticked.includes(keyOf(item)))
|
|
738
|
+
};
|
|
323
739
|
}
|
|
324
|
-
/**
|
|
325
|
-
* Подпись в заданном регистре. «title» ставит заглавную в начало каждого слова, а остальные буквы
|
|
326
|
-
* слова строчными: «SUBMIT FORM» и «submit form» обе становятся «Submit Form».
|
|
327
|
-
*/
|
|
328
740
|
function dynamicLabelCase(label, labelCase) {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
if (labelCase === 'title') {
|
|
333
|
-
return label.replace(/\S+/g, (word) => word.charAt(0).toLocaleUpperCase() + word.slice(1).toLocaleLowerCase());
|
|
334
|
-
}
|
|
335
|
-
return label;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
const BEM_BLOCK$2 = 'rt-dynamic-input';
|
|
339
|
-
/**
|
|
340
|
-
* Поле списка строк: строки человек набирает сам. Значение — массив строк в порядке списка.
|
|
341
|
-
* Enter или уход из поля добавляют срезанный по краям текст в конец; пустой и повторный не
|
|
342
|
-
* добавляются. Сброс, очистка, удаление строки и перетаскивание — те же, что у селектора.
|
|
343
|
-
*
|
|
344
|
-
* @example
|
|
345
|
-
* ```html
|
|
346
|
-
* <rt-dynamic-input editable [formControl]="tags" />
|
|
347
|
-
* ```
|
|
348
|
-
*/
|
|
349
|
-
class RtDynamicInputComponent extends RtFormControlBase {
|
|
350
|
-
constructor() {
|
|
351
|
-
super(...arguments);
|
|
352
|
-
this.#injector = inject(Injector);
|
|
353
|
-
/** Последнее значение, записанное формой: к нему возвращает сброс. */
|
|
354
|
-
this.#initial = signal([], /* @ts-ignore */
|
|
355
|
-
...(ngDevMode ? [{ debugName: "#initial" }] : /* istanbul ignore next */ []));
|
|
356
|
-
/* Умолчания входов считаются из настроек кита при объявлении: вход в разметке перебивает их. */
|
|
357
|
-
this.#invitationButtonIconDefault = rtKitDefault('dynamicSelector', (it) => it.invitationButtonIcon, null);
|
|
358
|
-
this.#invitationButtonAppearanceDefault = rtKitDefault('dynamicSelector', (it) => it.invitationButtonAppearance, 'outlined');
|
|
359
|
-
this.#clearIconDefault = rtKitDefault('dynamicSelector', (it) => it.clearIcon, 'close');
|
|
360
|
-
this.#titleWrapDefault = rtKitDefault('dynamicSelector', (it) => it.titleWrap, true);
|
|
361
|
-
this.addLabel = rtKitLabel('dynamicSelectorAdd');
|
|
362
|
-
this.placeholderLabel = rtKitLabel('dynamicInputPlaceholder');
|
|
363
|
-
this.field = viewChild('field', { ...(ngDevMode ? { debugName: "field" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
364
|
-
this.rowControls = contentChild(RtDynamicSelectorRowControlsDirective, /* @ts-ignore */
|
|
365
|
-
...(ngDevMode ? [{ debugName: "rowControls" }] : /* istanbul ignore next */ []));
|
|
366
|
-
this.controlsTpl = computed(() => this.rowControls()?.templateRef ?? null, /* @ts-ignore */
|
|
367
|
-
...(ngDevMode ? [{ debugName: "controlsTpl" }] : /* istanbul ignore next */ []));
|
|
368
|
-
/** Поле набора открыто, и в нём текст. */
|
|
369
|
-
this.isFieldShown = signal(false, /* @ts-ignore */
|
|
370
|
-
...(ngDevMode ? [{ debugName: "isFieldShown" }] : /* istanbul ignore next */ []));
|
|
371
|
-
this.draft = signal('', /* @ts-ignore */
|
|
372
|
-
...(ngDevMode ? [{ debugName: "draft" }] : /* istanbul ignore next */ []));
|
|
373
|
-
/** Приглашение снимается нажатием его кнопки и до новой записи формы не возвращается. */
|
|
374
|
-
this.isInvitationDismissed = signal(false, /* @ts-ignore */
|
|
375
|
-
...(ngDevMode ? [{ debugName: "isInvitationDismissed" }] : /* istanbul ignore next */ []));
|
|
376
|
-
this.rows = computed(() => {
|
|
377
|
-
const locked = this.readonlyKeys();
|
|
378
|
-
return this.value().map((text) => ({
|
|
379
|
-
item: text,
|
|
380
|
-
key: text,
|
|
381
|
-
label: text,
|
|
382
|
-
locked: locked.includes(text),
|
|
383
|
-
}));
|
|
384
|
-
}, /* @ts-ignore */
|
|
385
|
-
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
386
|
-
this.isInvitationShown = computed(() => this.invitation() && !this.isInvitationDismissed(), /* @ts-ignore */
|
|
387
|
-
...(ngDevMode ? [{ debugName: "isInvitationShown" }] : /* istanbul ignore next */ []));
|
|
388
|
-
this.isAddShown = computed(() => !this.isFieldShown(), /* @ts-ignore */
|
|
389
|
-
...(ngDevMode ? [{ debugName: "isAddShown" }] : /* istanbul ignore next */ []));
|
|
390
|
-
this.isKeysReset = computed(() => sameDynamicKeys(this.value(), this.#initial()), /* @ts-ignore */
|
|
391
|
-
...(ngDevMode ? [{ debugName: "isKeysReset" }] : /* istanbul ignore next */ []));
|
|
392
|
-
this.isKeysClear = computed(() => clearDynamicKeys(this.value(), this.readonlyKeys()).length === this.value().length, /* @ts-ignore */
|
|
393
|
-
...(ngDevMode ? [{ debugName: "isKeysClear" }] : /* istanbul ignore next */ []));
|
|
394
|
-
/** Правки в шаблоне строки держат сброс и очистку включёнными, даже когда строки не менялись. */
|
|
395
|
-
this.isResetDisabled = computed(() => !this.extraChanged() && this.isKeysReset(), /* @ts-ignore */
|
|
396
|
-
...(ngDevMode ? [{ debugName: "isResetDisabled" }] : /* istanbul ignore next */ []));
|
|
397
|
-
this.isClearDisabled = computed(() => !this.extraChanged() && this.isKeysClear(), /* @ts-ignore */
|
|
398
|
-
...(ngDevMode ? [{ debugName: "isClearDisabled" }] : /* istanbul ignore next */ []));
|
|
399
|
-
this.addTitle = computed(() => this.buttonTitle() || this.addLabel(), /* @ts-ignore */
|
|
400
|
-
...(ngDevMode ? [{ debugName: "addTitle" }] : /* istanbul ignore next */ []));
|
|
401
|
-
this.fieldPlaceholder = computed(() => this.placeholder() || this.placeholderLabel(), /* @ts-ignore */
|
|
402
|
-
...(ngDevMode ? [{ debugName: "fieldPlaceholder" }] : /* istanbul ignore next */ []));
|
|
403
|
-
this.hasValue = computed(() => this.value().length > 0, /* @ts-ignore */
|
|
404
|
-
...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
405
|
-
this.buttonTitle = input('', /* @ts-ignore */
|
|
406
|
-
...(ngDevMode ? [{ debugName: "buttonTitle" }] : /* istanbul ignore next */ []));
|
|
407
|
-
this.placeholder = input('', /* @ts-ignore */
|
|
408
|
-
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
409
|
-
/** Строки, которые нельзя убрать из списка. */
|
|
410
|
-
this.readonlyKeys = input([], /* @ts-ignore */
|
|
411
|
-
...(ngDevMode ? [{ debugName: "readonlyKeys" }] : /* istanbul ignore next */ []));
|
|
412
|
-
this.draggable = input(false, { ...(ngDevMode ? { debugName: "draggable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
413
|
-
/** Шаг скругления кнопок-иконок списка; по умолчанию они круглые. */
|
|
414
|
-
this.buttonRadius = input('full', /* @ts-ignore */
|
|
415
|
-
...(ngDevMode ? [{ debugName: "buttonRadius" }] : /* istanbul ignore next */ []));
|
|
416
|
-
this.editable = input(false, { ...(ngDevMode ? { debugName: "editable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
417
|
-
this.invitation = input(false, { ...(ngDevMode ? { debugName: "invitation" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
418
|
-
this.invitationIcon = input(null, /* @ts-ignore */
|
|
419
|
-
...(ngDevMode ? [{ debugName: "invitationIcon" }] : /* istanbul ignore next */ []));
|
|
420
|
-
/** Имя Material вместо `invitationIcon` — уходит во вход `glyph` заглушки приглашения. */
|
|
421
|
-
this.invitationGlyph = input(null, /* @ts-ignore */
|
|
422
|
-
...(ngDevMode ? [{ debugName: "invitationGlyph" }] : /* istanbul ignore next */ []));
|
|
423
|
-
this.invitationDescription = input('', /* @ts-ignore */
|
|
424
|
-
...(ngDevMode ? [{ debugName: "invitationDescription" }] : /* istanbul ignore next */ []));
|
|
425
|
-
/** Значок кнопки приглашения; null — кнопка без значка. */
|
|
426
|
-
this.invitationButtonIcon = input(this.#invitationButtonIconDefault, /* @ts-ignore */
|
|
427
|
-
...(ngDevMode ? [{ debugName: "invitationButtonIcon" }] : /* istanbul ignore next */ []));
|
|
428
|
-
/** Вид кнопки приглашения — тот же набор, что у кнопки кита. */
|
|
429
|
-
this.invitationButtonAppearance = input(this.#invitationButtonAppearanceDefault, /* @ts-ignore */
|
|
430
|
-
...(ngDevMode ? [{ debugName: "invitationButtonAppearance" }] : /* istanbul ignore next */ []));
|
|
431
|
-
/** Значок кнопки «Очистить список». */
|
|
432
|
-
this.clearIcon = input(this.#clearIconDefault, /* @ts-ignore */
|
|
433
|
-
...(ngDevMode ? [{ debugName: "clearIcon" }] : /* istanbul ignore next */ []));
|
|
434
|
-
/** Название строки переносится; `false` ведёт его одной строкой с многоточием и подсказкой при обрезке. */
|
|
435
|
-
this.titleWrap = input(this.#titleWrapDefault, { ...(ngDevMode ? { debugName: "titleWrap" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
436
|
-
/** Вид поля, в которое вводят новую строку. */
|
|
437
|
-
this.fieldAppearance = input('outline', /* @ts-ignore */
|
|
438
|
-
...(ngDevMode ? [{ debugName: "fieldAppearance" }] : /* istanbul ignore next */ []));
|
|
439
|
-
/** Подпись поля новой строки; пустая — поле без подписи, как раньше. */
|
|
440
|
-
this.fieldLabel = input('', /* @ts-ignore */
|
|
441
|
-
...(ngDevMode ? [{ debugName: "fieldLabel" }] : /* istanbul ignore next */ []));
|
|
442
|
-
/** Корзина строк; без неё строки убирает только очистка или сам вызывающий. */
|
|
443
|
-
this.removeShown = input(true, { ...(ngDevMode ? { debugName: "removeShown" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
444
|
-
/** Сброс и очистка под списком: `false` их убирает, кнопка добавления остаётся. */
|
|
445
|
-
this.listActionsShown = input(true, { ...(ngDevMode ? { debugName: "listActionsShown" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
446
|
-
/**
|
|
447
|
-
* Строки правлены в шаблоне вызывающего: сброс и очистка включены и тогда, когда строки прежние.
|
|
448
|
-
* Сброс сообщает `listReset`, очистка — `listCleared`, и вызывающий снимает свои правки.
|
|
449
|
-
*/
|
|
450
|
-
this.extraChanged = input(false, { ...(ngDevMode ? { debugName: "extraChanged" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
451
|
-
this.listReset = output();
|
|
452
|
-
this.listCleared = output();
|
|
453
|
-
this.displayText = computed(() => this.value().join(', '), /* @ts-ignore */
|
|
454
|
-
...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
|
|
455
|
-
}
|
|
456
|
-
#injector;
|
|
457
|
-
/** Последнее значение, записанное формой: к нему возвращает сброс. */
|
|
458
|
-
#initial;
|
|
459
|
-
/* Умолчания входов считаются из настроек кита при объявлении: вход в разметке перебивает их. */
|
|
460
|
-
#invitationButtonIconDefault;
|
|
461
|
-
#invitationButtonAppearanceDefault;
|
|
462
|
-
#clearIconDefault;
|
|
463
|
-
#titleWrapDefault;
|
|
464
|
-
/** Записанное формой становится и списком, и значением для сброса; пустой массив список опустошает. */
|
|
465
|
-
writeValue(value) {
|
|
466
|
-
super.writeValue(value === null ? null : [...value]);
|
|
467
|
-
this.#initial.set([...this.value()]);
|
|
468
|
-
this.isInvitationDismissed.set(false);
|
|
469
|
-
}
|
|
470
|
-
onAdd() {
|
|
471
|
-
if (this.isDisabled()) {
|
|
472
|
-
return;
|
|
473
|
-
}
|
|
474
|
-
this.isInvitationDismissed.set(true);
|
|
475
|
-
this.draft.set('');
|
|
476
|
-
this.isFieldShown.set(true);
|
|
477
|
-
afterNextRender(() => this.field()?.nativeElement.querySelector('input')?.focus(), { injector: this.#injector });
|
|
478
|
-
}
|
|
479
|
-
/** Enter или уход из поля: пустой текст поле не закрывает, повторный закрывает без изменений. */
|
|
480
|
-
onCommit() {
|
|
481
|
-
if (!this.isFieldShown() || this.draft().trim() === '') {
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
const next = addDynamicText(this.value(), this.draft());
|
|
485
|
-
this.draft.set('');
|
|
486
|
-
this.isFieldShown.set(false);
|
|
487
|
-
this.markTouched();
|
|
488
|
-
if (next.length !== this.value().length) {
|
|
489
|
-
this.#change(next);
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
onRemoved(key) {
|
|
493
|
-
if (!this.isDisabled() && typeof key === 'string' && !this.readonlyKeys().includes(key)) {
|
|
494
|
-
this.#change(this.value().filter((text) => text !== key));
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
onMoved(move) {
|
|
498
|
-
if (!this.isDisabled()) {
|
|
499
|
-
this.#change(moveDynamicKey(this.value(), move.from, move.to));
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
onEdited(edit) {
|
|
503
|
-
const next = renameDynamicText(this.value(), edit.previous, edit.next);
|
|
504
|
-
if (!this.isDisabled() && !sameDynamicKeys(next, this.value())) {
|
|
505
|
-
this.#change(next);
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
onReset() {
|
|
509
|
-
if (this.isDisabled() || this.isResetDisabled()) {
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
// Строки прежние, а правки только в шаблоне: значение не трогаем, сообщаем о сбросе.
|
|
513
|
-
if (!this.isKeysReset()) {
|
|
514
|
-
this.#change([...this.#initial()]);
|
|
515
|
-
}
|
|
516
|
-
this.listReset.emit();
|
|
517
|
-
}
|
|
518
|
-
onCleared() {
|
|
519
|
-
if (this.isDisabled() || this.isClearDisabled()) {
|
|
520
|
-
return;
|
|
521
|
-
}
|
|
522
|
-
if (!this.isKeysClear()) {
|
|
523
|
-
this.#change(clearDynamicKeys(this.value(), this.readonlyKeys()));
|
|
524
|
-
}
|
|
525
|
-
this.listCleared.emit();
|
|
526
|
-
}
|
|
527
|
-
getEmptyValue() {
|
|
528
|
-
return [];
|
|
529
|
-
}
|
|
530
|
-
focusAfterClear() {
|
|
531
|
-
// Очистка крестиком у поля не ставится: фокус остаётся там, где был.
|
|
532
|
-
}
|
|
533
|
-
#change(values) {
|
|
534
|
-
this.value.set(values);
|
|
535
|
-
this.emitChange(values);
|
|
536
|
-
}
|
|
537
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtDynamicInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
538
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtDynamicInputComponent, isStandalone: true, selector: "rt-dynamic-input", inputs: { buttonTitle: { classPropertyName: "buttonTitle", publicName: "buttonTitle", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonlyKeys: { classPropertyName: "readonlyKeys", publicName: "readonlyKeys", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, buttonRadius: { classPropertyName: "buttonRadius", publicName: "buttonRadius", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, invitation: { classPropertyName: "invitation", publicName: "invitation", isSignal: true, isRequired: false, transformFunction: null }, invitationIcon: { classPropertyName: "invitationIcon", publicName: "invitationIcon", isSignal: true, isRequired: false, transformFunction: null }, invitationGlyph: { classPropertyName: "invitationGlyph", publicName: "invitationGlyph", isSignal: true, isRequired: false, transformFunction: null }, invitationDescription: { classPropertyName: "invitationDescription", publicName: "invitationDescription", isSignal: true, isRequired: false, transformFunction: null }, invitationButtonIcon: { classPropertyName: "invitationButtonIcon", publicName: "invitationButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, invitationButtonAppearance: { classPropertyName: "invitationButtonAppearance", publicName: "invitationButtonAppearance", isSignal: true, isRequired: false, transformFunction: null }, clearIcon: { classPropertyName: "clearIcon", publicName: "clearIcon", isSignal: true, isRequired: false, transformFunction: null }, titleWrap: { classPropertyName: "titleWrap", publicName: "titleWrap", isSignal: true, isRequired: false, transformFunction: null }, fieldAppearance: { classPropertyName: "fieldAppearance", publicName: "fieldAppearance", isSignal: true, isRequired: false, transformFunction: null }, fieldLabel: { classPropertyName: "fieldLabel", publicName: "fieldLabel", isSignal: true, isRequired: false, transformFunction: null }, removeShown: { classPropertyName: "removeShown", publicName: "removeShown", isSignal: true, isRequired: false, transformFunction: null }, listActionsShown: { classPropertyName: "listActionsShown", publicName: "listActionsShown", isSignal: true, isRequired: false, transformFunction: null }, extraChanged: { classPropertyName: "extraChanged", publicName: "extraChanged", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { listReset: "listReset", listCleared: "listCleared" }, host: { classAttribute: "rt-dynamic-input" }, providers: [
|
|
539
|
-
// Алиас базового токена — для contentChild(RtFormControlBase) в rt-field.
|
|
540
|
-
{ provide: RtFormControlBase, useExisting: forwardRef(() => RtDynamicInputComponent) },
|
|
541
|
-
], queries: [{ propertyName: "rowControls", first: true, predicate: RtDynamicSelectorRowControlsDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "field", first: true, predicate: ["field"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-container rtBlock=\"rt-dynamic-input\">\n <!-- \u041F\u043E\u0434 \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435\u043C \u043F\u0443\u0441\u0442\u043E\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u043D\u0435 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044F: \u0443\u0437\u0435\u043B \u043D\u0443\u043B\u0435\u0432\u043E\u0439 \u0432\u044B\u0441\u043E\u0442\u044B \u0441\u0434\u0432\u0438\u0433\u0430\u043B \u0431\u044B \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435 \u0437\u0430\u0437\u043E\u0440\u043E\u043C. -->\n @if (rows().length > 0 || !isInvitationShown()) {\n <rt-dynamic-selector-list\n [rows]=\"rows()\"\n [draggable]=\"draggable()\"\n [buttonRadius]=\"buttonRadius()\"\n [clearIcon]=\"clearIcon()\"\n [titleWrap]=\"titleWrap()\"\n [editable]=\"editable()\"\n [disabled]=\"isDisabled()\"\n [actionsShown]=\"!isInvitationShown()\"\n [resetClearShown]=\"listActionsShown()\"\n [removeShown]=\"removeShown()\"\n [resetDisabled]=\"isResetDisabled()\"\n [clearDisabled]=\"isClearDisabled()\"\n [controlsTpl]=\"controlsTpl()\"\n (removed)=\"onRemoved($event)\"\n (moved)=\"onMoved($event)\"\n (edited)=\"onEdited($event)\"\n (resetClicked)=\"onReset()\"\n (cleared)=\"onCleared()\">\n @if (isAddShown()) {\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"dynamic-input-add\"\n [label]=\"addTitle()\"\n [attr.aria-label]=\"addTitle()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onAdd()\"></button>\n }\n </rt-dynamic-selector-list>\n }\n\n @if (isFieldShown()) {\n <!-- \u041F\u043E\u0434\u043F\u0438\u0441\u044C \u043F\u043E\u043B\u044F \u0440\u0438\u0441\u0443\u0435\u0442 rt-field: \u0443 rt-input \u0441\u0432\u043E\u0435\u0439 \u043D\u0435\u0442. \u041E\u0431\u0451\u0440\u0442\u043A\u0430 \u0441\u0442\u043E\u0438\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u0438 \u2014\n \u043F\u0443\u0441\u0442\u0430\u044F \u0434\u043E\u0431\u0430\u0432\u0438\u043B\u0430 \u0431\u044B \u0437\u0430\u0437\u043E\u0440 \u043F\u043E\u0434 \u043F\u043E\u043B\u0435\u043C \u0438 \u0441\u0434\u0432\u0438\u043D\u0443\u043B\u0430 \u043F\u0440\u0435\u0436\u043D\u0438\u0439 \u0432\u0438\u0434. -->\n @if (fieldLabel(); as label) {\n <rt-field qa-dataid=\"dynamic-input-field-label\" [label]=\"label\">\n <rt-input\n #field\n rtElem=\"field\"\n qa-dataid=\"dynamic-input-field\"\n [appearance]=\"fieldAppearance()\"\n [controlId]=\"effectiveControlId()\"\n [placeholder]=\"fieldPlaceholder()\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event ?? '')\"\n (keydown.enter)=\"onCommit()\"\n (focusout)=\"onCommit()\" />\n </rt-field>\n } @else {\n <rt-input\n #field\n rtElem=\"field\"\n qa-dataid=\"dynamic-input-field\"\n [appearance]=\"fieldAppearance()\"\n [controlId]=\"effectiveControlId()\"\n [placeholder]=\"fieldPlaceholder()\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event ?? '')\"\n (keydown.enter)=\"onCommit()\"\n (focusout)=\"onCommit()\" />\n }\n }\n\n @if (isInvitationShown()) {\n <rt-empty-state\n rtElem=\"invitation\"\n qa-dataid=\"dynamic-input-invitation\"\n [icon]=\"invitationIcon()\"\n [glyph]=\"invitationGlyph()\"\n [description]=\"invitationDescription()\">\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"dynamic-input-invitation-add\"\n [appearance]=\"invitationButtonAppearance()\"\n [icon]=\"invitationButtonIcon()\"\n [label]=\"addTitle()\"\n [attr.aria-label]=\"addTitle()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onAdd()\"></button>\n </rt-empty-state>\n }\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-input{display:flex;width:100%;flex-direction:column;gap:var(--rt-space-sm)}.rt-dynamic-input__field,.rt-dynamic-input__invitation{min-width:0}}\n"], dependencies: [{ kind: "ngmodule", type:
|
|
542
|
-
// Angular
|
|
543
|
-
FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type:
|
|
544
|
-
// standalone components / directives
|
|
545
|
-
BlockDirective, selector: "[rtBlock]", inputs: ["rtMod"] }, { kind: "directive", type: ElemDirective, selector: "[rtElem]", inputs: ["rtMod"] }, { kind: "directive", type: RtButtonDirective, selector: "button[rtButton], a[rtButton]", inputs: ["label", "icon", "iconPos", "theme", "appearance", "size", "loading", "loadingIcon", "loadingLabel", "pressed"] }, { kind: "component", type: RtDynamicSelectorListComponent, selector: "rt-dynamic-selector-list", inputs: ["rows", "draggable", "editable", "disabled", "actionsShown", "resetClearShown", "removeShown", "resetDisabled", "clearDisabled", "buttonRadius", "clearIcon", "titleWrap", "titleTpl", "controlsTpl"], outputs: ["removed", "moved", "edited", "resetClicked", "cleared"] }, { kind: "component", type: RtEmptyStateComponent, selector: "rt-empty-state", inputs: ["icon", "glyph", "title", "description", "framed"] }, { kind: "component", type: RtFieldComponent, selector: "rt-field", inputs: ["label", "hint", "help", "readonly", "loading", "required", "hideRequiredMark", "reserveHintSpace", "errors"] }, { kind: "component", type: RtInputComponent, selector: "rt-input", inputs: ["appearance", "type", "placeholder", "iconLeft", "iconRight", "passwordToggle", "autocomplete"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
741
|
+
if (labelCase === "upper") return label.toLocaleUpperCase();
|
|
742
|
+
if (labelCase === "title") return label.replace(/\S+/g, (word) => word.charAt(0).toLocaleUpperCase() + word.slice(1).toLocaleLowerCase());
|
|
743
|
+
return label;
|
|
546
744
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
745
|
+
const BEM_BLOCK$2 = "rt-dynamic-input";
|
|
746
|
+
var RtDynamicInputComponent = class RtDynamicInputComponent extends RtFormControlBase {
|
|
747
|
+
constructor() {
|
|
748
|
+
super(...arguments);
|
|
749
|
+
this.#injector = inject(Injector);
|
|
750
|
+
this.#initial = signal([], ...ngDevMode ? [{ debugName: "#initial" }] : /* istanbul ignore next */ []);
|
|
751
|
+
this.#invitationButtonIconDefault = rtKitDefault("dynamicSelector", (it) => it.invitationButtonIcon, null);
|
|
752
|
+
this.#invitationButtonAppearanceDefault = rtKitDefault("dynamicSelector", (it) => it.invitationButtonAppearance, "outlined");
|
|
753
|
+
this.#clearIconDefault = rtKitDefault("dynamicSelector", (it) => it.clearIcon, "close");
|
|
754
|
+
this.#titleWrapDefault = rtKitDefault("dynamicSelector", (it) => it.titleWrap, true);
|
|
755
|
+
this.addLabel = rtKitLabel("dynamicSelectorAdd");
|
|
756
|
+
this.placeholderLabel = rtKitLabel("dynamicInputPlaceholder");
|
|
757
|
+
this.field = viewChild("field", {
|
|
758
|
+
...ngDevMode ? { debugName: "field" } : /* istanbul ignore next */ {},
|
|
759
|
+
read: ElementRef
|
|
760
|
+
});
|
|
761
|
+
this.rowControls = contentChild(RtDynamicSelectorRowControlsDirective, ...ngDevMode ? [{ debugName: "rowControls" }] : /* istanbul ignore next */ []);
|
|
762
|
+
this.controlsTpl = computed(() => this.rowControls()?.templateRef ?? null, ...ngDevMode ? [{ debugName: "controlsTpl" }] : /* istanbul ignore next */ []);
|
|
763
|
+
this.isFieldShown = signal(false, ...ngDevMode ? [{ debugName: "isFieldShown" }] : /* istanbul ignore next */ []);
|
|
764
|
+
this.draft = signal("", ...ngDevMode ? [{ debugName: "draft" }] : /* istanbul ignore next */ []);
|
|
765
|
+
this.isInvitationDismissed = signal(false, ...ngDevMode ? [{ debugName: "isInvitationDismissed" }] : /* istanbul ignore next */ []);
|
|
766
|
+
this.rows = computed(() => {
|
|
767
|
+
const locked = this.readonlyKeys();
|
|
768
|
+
return this.value().map((text) => ({
|
|
769
|
+
item: text,
|
|
770
|
+
key: text,
|
|
771
|
+
label: text,
|
|
772
|
+
locked: locked.includes(text)
|
|
773
|
+
}));
|
|
774
|
+
}, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
775
|
+
this.isInvitationShown = computed(() => this.invitation() && !this.isInvitationDismissed(), ...ngDevMode ? [{ debugName: "isInvitationShown" }] : /* istanbul ignore next */ []);
|
|
776
|
+
this.isAddShown = computed(() => !this.isFieldShown(), ...ngDevMode ? [{ debugName: "isAddShown" }] : /* istanbul ignore next */ []);
|
|
777
|
+
this.isKeysReset = computed(() => sameDynamicKeys(this.value(), this.#initial()), ...ngDevMode ? [{ debugName: "isKeysReset" }] : /* istanbul ignore next */ []);
|
|
778
|
+
this.isKeysClear = computed(() => clearDynamicKeys(this.value(), this.readonlyKeys()).length === this.value().length, ...ngDevMode ? [{ debugName: "isKeysClear" }] : /* istanbul ignore next */ []);
|
|
779
|
+
this.isResetDisabled = computed(() => !this.extraChanged() && this.isKeysReset(), ...ngDevMode ? [{ debugName: "isResetDisabled" }] : /* istanbul ignore next */ []);
|
|
780
|
+
this.isClearDisabled = computed(() => !this.extraChanged() && this.isKeysClear(), ...ngDevMode ? [{ debugName: "isClearDisabled" }] : /* istanbul ignore next */ []);
|
|
781
|
+
this.addTitle = computed(() => this.buttonTitle() || this.addLabel(), ...ngDevMode ? [{ debugName: "addTitle" }] : /* istanbul ignore next */ []);
|
|
782
|
+
this.fieldPlaceholder = computed(() => this.placeholder() || this.placeholderLabel(), ...ngDevMode ? [{ debugName: "fieldPlaceholder" }] : /* istanbul ignore next */ []);
|
|
783
|
+
this.hasValue = computed(() => this.value().length > 0, ...ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []);
|
|
784
|
+
this.buttonTitle = input("", ...ngDevMode ? [{ debugName: "buttonTitle" }] : /* istanbul ignore next */ []);
|
|
785
|
+
this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
786
|
+
this.readonlyKeys = input([], ...ngDevMode ? [{ debugName: "readonlyKeys" }] : /* istanbul ignore next */ []);
|
|
787
|
+
this.draggable = input(false, {
|
|
788
|
+
...ngDevMode ? { debugName: "draggable" } : /* istanbul ignore next */ {},
|
|
789
|
+
transform: booleanAttribute
|
|
790
|
+
});
|
|
791
|
+
this.buttonRadius = input("full", ...ngDevMode ? [{ debugName: "buttonRadius" }] : /* istanbul ignore next */ []);
|
|
792
|
+
this.editable = input(false, {
|
|
793
|
+
...ngDevMode ? { debugName: "editable" } : /* istanbul ignore next */ {},
|
|
794
|
+
transform: booleanAttribute
|
|
795
|
+
});
|
|
796
|
+
this.invitation = input(false, {
|
|
797
|
+
...ngDevMode ? { debugName: "invitation" } : /* istanbul ignore next */ {},
|
|
798
|
+
transform: booleanAttribute
|
|
799
|
+
});
|
|
800
|
+
this.invitationIcon = input(null, ...ngDevMode ? [{ debugName: "invitationIcon" }] : /* istanbul ignore next */ []);
|
|
801
|
+
this.invitationGlyph = input(null, ...ngDevMode ? [{ debugName: "invitationGlyph" }] : /* istanbul ignore next */ []);
|
|
802
|
+
this.invitationDescription = input("", ...ngDevMode ? [{ debugName: "invitationDescription" }] : /* istanbul ignore next */ []);
|
|
803
|
+
this.invitationButtonIcon = input(this.#invitationButtonIconDefault, ...ngDevMode ? [{ debugName: "invitationButtonIcon" }] : /* istanbul ignore next */ []);
|
|
804
|
+
this.invitationButtonAppearance = input(this.#invitationButtonAppearanceDefault, ...ngDevMode ? [{ debugName: "invitationButtonAppearance" }] : /* istanbul ignore next */ []);
|
|
805
|
+
this.clearIcon = input(this.#clearIconDefault, ...ngDevMode ? [{ debugName: "clearIcon" }] : /* istanbul ignore next */ []);
|
|
806
|
+
this.titleWrap = input(this.#titleWrapDefault, {
|
|
807
|
+
...ngDevMode ? { debugName: "titleWrap" } : /* istanbul ignore next */ {},
|
|
808
|
+
transform: booleanAttribute
|
|
809
|
+
});
|
|
810
|
+
this.fieldAppearance = input("outline", ...ngDevMode ? [{ debugName: "fieldAppearance" }] : /* istanbul ignore next */ []);
|
|
811
|
+
this.fieldLabel = input("", ...ngDevMode ? [{ debugName: "fieldLabel" }] : /* istanbul ignore next */ []);
|
|
812
|
+
this.removeShown = input(true, {
|
|
813
|
+
...ngDevMode ? { debugName: "removeShown" } : /* istanbul ignore next */ {},
|
|
814
|
+
transform: booleanAttribute
|
|
815
|
+
});
|
|
816
|
+
this.listActionsShown = input(true, {
|
|
817
|
+
...ngDevMode ? { debugName: "listActionsShown" } : /* istanbul ignore next */ {},
|
|
818
|
+
transform: booleanAttribute
|
|
819
|
+
});
|
|
820
|
+
this.extraChanged = input(false, {
|
|
821
|
+
...ngDevMode ? { debugName: "extraChanged" } : /* istanbul ignore next */ {},
|
|
822
|
+
transform: booleanAttribute
|
|
823
|
+
});
|
|
824
|
+
this.listReset = output();
|
|
825
|
+
this.listCleared = output();
|
|
826
|
+
this.displayText = computed(() => this.value().join(", "), ...ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []);
|
|
827
|
+
}
|
|
828
|
+
#injector;
|
|
829
|
+
#initial;
|
|
830
|
+
#invitationButtonIconDefault;
|
|
831
|
+
#invitationButtonAppearanceDefault;
|
|
832
|
+
#clearIconDefault;
|
|
833
|
+
#titleWrapDefault;
|
|
834
|
+
writeValue(value) {
|
|
835
|
+
super.writeValue(value === null ? null : [...value]);
|
|
836
|
+
this.#initial.set([...this.value()]);
|
|
837
|
+
this.isInvitationDismissed.set(false);
|
|
838
|
+
}
|
|
839
|
+
onAdd() {
|
|
840
|
+
if (this.isDisabled()) return;
|
|
841
|
+
this.isInvitationDismissed.set(true);
|
|
842
|
+
this.draft.set("");
|
|
843
|
+
this.isFieldShown.set(true);
|
|
844
|
+
afterNextRender(() => this.field()?.nativeElement.querySelector("input")?.focus(), { injector: this.#injector });
|
|
845
|
+
}
|
|
846
|
+
onCommit() {
|
|
847
|
+
if (!this.isFieldShown() || this.draft().trim() === "") return;
|
|
848
|
+
const next = addDynamicText(this.value(), this.draft());
|
|
849
|
+
this.draft.set("");
|
|
850
|
+
this.isFieldShown.set(false);
|
|
851
|
+
this.markTouched();
|
|
852
|
+
if (next.length !== this.value().length) this.#change(next);
|
|
853
|
+
}
|
|
854
|
+
onRemoved(key) {
|
|
855
|
+
if (!this.isDisabled() && typeof key === "string" && !this.readonlyKeys().includes(key)) this.#change(this.value().filter((text) => text !== key));
|
|
856
|
+
}
|
|
857
|
+
onMoved(move) {
|
|
858
|
+
if (!this.isDisabled()) this.#change(moveDynamicKey(this.value(), move.from, move.to));
|
|
859
|
+
}
|
|
860
|
+
onEdited(edit) {
|
|
861
|
+
const next = renameDynamicText(this.value(), edit.previous, edit.next);
|
|
862
|
+
if (!this.isDisabled() && !sameDynamicKeys(next, this.value())) this.#change(next);
|
|
863
|
+
}
|
|
864
|
+
onReset() {
|
|
865
|
+
if (this.isDisabled() || this.isResetDisabled()) return;
|
|
866
|
+
if (!this.isKeysReset()) this.#change([...this.#initial()]);
|
|
867
|
+
this.listReset.emit();
|
|
868
|
+
}
|
|
869
|
+
onCleared() {
|
|
870
|
+
if (this.isDisabled() || this.isClearDisabled()) return;
|
|
871
|
+
if (!this.isKeysClear()) this.#change(clearDynamicKeys(this.value(), this.readonlyKeys()));
|
|
872
|
+
this.listCleared.emit();
|
|
873
|
+
}
|
|
874
|
+
getEmptyValue() {
|
|
875
|
+
return [];
|
|
876
|
+
}
|
|
877
|
+
focusAfterClear() {}
|
|
878
|
+
#change(values) {
|
|
879
|
+
this.value.set(values);
|
|
880
|
+
this.emitChange(values);
|
|
881
|
+
}
|
|
882
|
+
static {
|
|
883
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
884
|
+
minVersion: "12.0.0",
|
|
885
|
+
version: "22.2.2",
|
|
886
|
+
ngImport: i0,
|
|
887
|
+
type: RtDynamicInputComponent,
|
|
888
|
+
deps: null,
|
|
889
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
static {
|
|
893
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
894
|
+
minVersion: "17.0.0",
|
|
895
|
+
version: "22.2.2",
|
|
896
|
+
type: RtDynamicInputComponent,
|
|
897
|
+
isStandalone: true,
|
|
898
|
+
selector: "rt-dynamic-input",
|
|
899
|
+
inputs: {
|
|
900
|
+
buttonTitle: {
|
|
901
|
+
classPropertyName: "buttonTitle",
|
|
902
|
+
publicName: "buttonTitle",
|
|
903
|
+
isSignal: true,
|
|
904
|
+
isRequired: false,
|
|
905
|
+
transformFunction: null
|
|
906
|
+
},
|
|
907
|
+
placeholder: {
|
|
908
|
+
classPropertyName: "placeholder",
|
|
909
|
+
publicName: "placeholder",
|
|
910
|
+
isSignal: true,
|
|
911
|
+
isRequired: false,
|
|
912
|
+
transformFunction: null
|
|
913
|
+
},
|
|
914
|
+
readonlyKeys: {
|
|
915
|
+
classPropertyName: "readonlyKeys",
|
|
916
|
+
publicName: "readonlyKeys",
|
|
917
|
+
isSignal: true,
|
|
918
|
+
isRequired: false,
|
|
919
|
+
transformFunction: null
|
|
920
|
+
},
|
|
921
|
+
draggable: {
|
|
922
|
+
classPropertyName: "draggable",
|
|
923
|
+
publicName: "draggable",
|
|
924
|
+
isSignal: true,
|
|
925
|
+
isRequired: false,
|
|
926
|
+
transformFunction: null
|
|
927
|
+
},
|
|
928
|
+
buttonRadius: {
|
|
929
|
+
classPropertyName: "buttonRadius",
|
|
930
|
+
publicName: "buttonRadius",
|
|
931
|
+
isSignal: true,
|
|
932
|
+
isRequired: false,
|
|
933
|
+
transformFunction: null
|
|
934
|
+
},
|
|
935
|
+
editable: {
|
|
936
|
+
classPropertyName: "editable",
|
|
937
|
+
publicName: "editable",
|
|
938
|
+
isSignal: true,
|
|
939
|
+
isRequired: false,
|
|
940
|
+
transformFunction: null
|
|
941
|
+
},
|
|
942
|
+
invitation: {
|
|
943
|
+
classPropertyName: "invitation",
|
|
944
|
+
publicName: "invitation",
|
|
945
|
+
isSignal: true,
|
|
946
|
+
isRequired: false,
|
|
947
|
+
transformFunction: null
|
|
948
|
+
},
|
|
949
|
+
invitationIcon: {
|
|
950
|
+
classPropertyName: "invitationIcon",
|
|
951
|
+
publicName: "invitationIcon",
|
|
952
|
+
isSignal: true,
|
|
953
|
+
isRequired: false,
|
|
954
|
+
transformFunction: null
|
|
955
|
+
},
|
|
956
|
+
invitationGlyph: {
|
|
957
|
+
classPropertyName: "invitationGlyph",
|
|
958
|
+
publicName: "invitationGlyph",
|
|
959
|
+
isSignal: true,
|
|
960
|
+
isRequired: false,
|
|
961
|
+
transformFunction: null
|
|
962
|
+
},
|
|
963
|
+
invitationDescription: {
|
|
964
|
+
classPropertyName: "invitationDescription",
|
|
965
|
+
publicName: "invitationDescription",
|
|
966
|
+
isSignal: true,
|
|
967
|
+
isRequired: false,
|
|
968
|
+
transformFunction: null
|
|
969
|
+
},
|
|
970
|
+
invitationButtonIcon: {
|
|
971
|
+
classPropertyName: "invitationButtonIcon",
|
|
972
|
+
publicName: "invitationButtonIcon",
|
|
973
|
+
isSignal: true,
|
|
974
|
+
isRequired: false,
|
|
975
|
+
transformFunction: null
|
|
976
|
+
},
|
|
977
|
+
invitationButtonAppearance: {
|
|
978
|
+
classPropertyName: "invitationButtonAppearance",
|
|
979
|
+
publicName: "invitationButtonAppearance",
|
|
980
|
+
isSignal: true,
|
|
981
|
+
isRequired: false,
|
|
982
|
+
transformFunction: null
|
|
983
|
+
},
|
|
984
|
+
clearIcon: {
|
|
985
|
+
classPropertyName: "clearIcon",
|
|
986
|
+
publicName: "clearIcon",
|
|
987
|
+
isSignal: true,
|
|
988
|
+
isRequired: false,
|
|
989
|
+
transformFunction: null
|
|
990
|
+
},
|
|
991
|
+
titleWrap: {
|
|
992
|
+
classPropertyName: "titleWrap",
|
|
993
|
+
publicName: "titleWrap",
|
|
994
|
+
isSignal: true,
|
|
995
|
+
isRequired: false,
|
|
996
|
+
transformFunction: null
|
|
997
|
+
},
|
|
998
|
+
fieldAppearance: {
|
|
999
|
+
classPropertyName: "fieldAppearance",
|
|
1000
|
+
publicName: "fieldAppearance",
|
|
1001
|
+
isSignal: true,
|
|
1002
|
+
isRequired: false,
|
|
1003
|
+
transformFunction: null
|
|
1004
|
+
},
|
|
1005
|
+
fieldLabel: {
|
|
1006
|
+
classPropertyName: "fieldLabel",
|
|
1007
|
+
publicName: "fieldLabel",
|
|
1008
|
+
isSignal: true,
|
|
1009
|
+
isRequired: false,
|
|
1010
|
+
transformFunction: null
|
|
1011
|
+
},
|
|
1012
|
+
removeShown: {
|
|
1013
|
+
classPropertyName: "removeShown",
|
|
1014
|
+
publicName: "removeShown",
|
|
1015
|
+
isSignal: true,
|
|
1016
|
+
isRequired: false,
|
|
1017
|
+
transformFunction: null
|
|
1018
|
+
},
|
|
1019
|
+
listActionsShown: {
|
|
1020
|
+
classPropertyName: "listActionsShown",
|
|
1021
|
+
publicName: "listActionsShown",
|
|
1022
|
+
isSignal: true,
|
|
1023
|
+
isRequired: false,
|
|
1024
|
+
transformFunction: null
|
|
1025
|
+
},
|
|
1026
|
+
extraChanged: {
|
|
1027
|
+
classPropertyName: "extraChanged",
|
|
1028
|
+
publicName: "extraChanged",
|
|
1029
|
+
isSignal: true,
|
|
1030
|
+
isRequired: false,
|
|
1031
|
+
transformFunction: null
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
outputs: {
|
|
1035
|
+
listReset: "listReset",
|
|
1036
|
+
listCleared: "listCleared"
|
|
1037
|
+
},
|
|
1038
|
+
host: { classAttribute: "rt-dynamic-input" },
|
|
1039
|
+
providers: [{
|
|
1040
|
+
provide: RtFormControlBase,
|
|
1041
|
+
useExisting: forwardRef(() => RtDynamicInputComponent)
|
|
1042
|
+
}],
|
|
1043
|
+
queries: [{
|
|
1044
|
+
propertyName: "rowControls",
|
|
1045
|
+
first: true,
|
|
1046
|
+
predicate: RtDynamicSelectorRowControlsDirective,
|
|
1047
|
+
descendants: true,
|
|
1048
|
+
isSignal: true
|
|
1049
|
+
}],
|
|
1050
|
+
viewQueries: [{
|
|
1051
|
+
propertyName: "field",
|
|
1052
|
+
first: true,
|
|
1053
|
+
predicate: ["field"],
|
|
1054
|
+
descendants: true,
|
|
1055
|
+
read: ElementRef,
|
|
1056
|
+
isSignal: true
|
|
1057
|
+
}],
|
|
1058
|
+
usesInheritance: true,
|
|
1059
|
+
ngImport: i0,
|
|
1060
|
+
template: "<ng-container rtBlock=\"rt-dynamic-input\">\n <!-- Под приглашением пустой список не рисуется: узел нулевой высоты сдвигал бы приглашение зазором. -->\n @if (rows().length > 0 || !isInvitationShown()) {\n <rt-dynamic-selector-list\n [rows]=\"rows()\"\n [draggable]=\"draggable()\"\n [buttonRadius]=\"buttonRadius()\"\n [clearIcon]=\"clearIcon()\"\n [titleWrap]=\"titleWrap()\"\n [editable]=\"editable()\"\n [disabled]=\"isDisabled()\"\n [actionsShown]=\"!isInvitationShown()\"\n [resetClearShown]=\"listActionsShown()\"\n [removeShown]=\"removeShown()\"\n [resetDisabled]=\"isResetDisabled()\"\n [clearDisabled]=\"isClearDisabled()\"\n [controlsTpl]=\"controlsTpl()\"\n (removed)=\"onRemoved($event)\"\n (moved)=\"onMoved($event)\"\n (edited)=\"onEdited($event)\"\n (resetClicked)=\"onReset()\"\n (cleared)=\"onCleared()\">\n @if (isAddShown()) {\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"dynamic-input-add\"\n [label]=\"addTitle()\"\n [attr.aria-label]=\"addTitle()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onAdd()\"></button>\n }\n </rt-dynamic-selector-list>\n }\n\n @if (isFieldShown()) {\n <!-- Подпись поля рисует rt-field: у rt-input своей нет. Обёртка стоит только при подписи —\n пустая добавила бы зазор под полем и сдвинула прежний вид. -->\n @if (fieldLabel(); as label) {\n <rt-field qa-dataid=\"dynamic-input-field-label\" [label]=\"label\">\n <rt-input\n #field\n rtElem=\"field\"\n qa-dataid=\"dynamic-input-field\"\n [appearance]=\"fieldAppearance()\"\n [controlId]=\"effectiveControlId()\"\n [placeholder]=\"fieldPlaceholder()\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event ?? '')\"\n (keydown.enter)=\"onCommit()\"\n (focusout)=\"onCommit()\" />\n </rt-field>\n } @else {\n <rt-input\n #field\n rtElem=\"field\"\n qa-dataid=\"dynamic-input-field\"\n [appearance]=\"fieldAppearance()\"\n [controlId]=\"effectiveControlId()\"\n [placeholder]=\"fieldPlaceholder()\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event ?? '')\"\n (keydown.enter)=\"onCommit()\"\n (focusout)=\"onCommit()\" />\n }\n }\n\n @if (isInvitationShown()) {\n <rt-empty-state\n rtElem=\"invitation\"\n qa-dataid=\"dynamic-input-invitation\"\n [icon]=\"invitationIcon()\"\n [glyph]=\"invitationGlyph()\"\n [description]=\"invitationDescription()\">\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"dynamic-input-invitation-add\"\n [appearance]=\"invitationButtonAppearance()\"\n [icon]=\"invitationButtonIcon()\"\n [label]=\"addTitle()\"\n [attr.aria-label]=\"addTitle()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onAdd()\"></button>\n </rt-empty-state>\n }\n</ng-container>\n",
|
|
1061
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-input{display:flex;width:100%;flex-direction:column;gap:var(--rt-space-sm)}.rt-dynamic-input__field,.rt-dynamic-input__invitation{min-width:0}}\n"],
|
|
1062
|
+
dependencies: [
|
|
1063
|
+
{
|
|
1064
|
+
kind: "ngmodule",
|
|
1065
|
+
type: FormsModule
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
kind: "directive",
|
|
1069
|
+
type: i1.NgControlStatus,
|
|
1070
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
kind: "directive",
|
|
1074
|
+
type: i1.NgModel,
|
|
1075
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
1076
|
+
inputs: [
|
|
1077
|
+
"name",
|
|
1078
|
+
"disabled",
|
|
1079
|
+
"ngModel",
|
|
1080
|
+
"ngModelOptions"
|
|
1081
|
+
],
|
|
1082
|
+
outputs: ["ngModelChange"],
|
|
1083
|
+
exportAs: ["ngModel"]
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
kind: "directive",
|
|
1087
|
+
type: BlockDirective,
|
|
1088
|
+
selector: "[rtBlock]",
|
|
1089
|
+
inputs: ["rtMod"]
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
kind: "directive",
|
|
1093
|
+
type: ElemDirective,
|
|
1094
|
+
selector: "[rtElem]",
|
|
1095
|
+
inputs: ["rtMod"]
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
kind: "directive",
|
|
1099
|
+
type: RtButtonDirective,
|
|
1100
|
+
selector: "button[rtButton], a[rtButton]",
|
|
1101
|
+
inputs: [
|
|
1102
|
+
"label",
|
|
1103
|
+
"icon",
|
|
1104
|
+
"iconPos",
|
|
1105
|
+
"theme",
|
|
1106
|
+
"appearance",
|
|
1107
|
+
"size",
|
|
1108
|
+
"loading",
|
|
1109
|
+
"loadingIcon",
|
|
1110
|
+
"loadingLabel",
|
|
1111
|
+
"pressed"
|
|
1112
|
+
]
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
kind: "component",
|
|
1116
|
+
type: RtDynamicSelectorListComponent,
|
|
1117
|
+
selector: "rt-dynamic-selector-list",
|
|
1118
|
+
inputs: [
|
|
1119
|
+
"rows",
|
|
1120
|
+
"draggable",
|
|
1121
|
+
"editable",
|
|
1122
|
+
"disabled",
|
|
1123
|
+
"actionsShown",
|
|
1124
|
+
"resetClearShown",
|
|
1125
|
+
"removeShown",
|
|
1126
|
+
"resetDisabled",
|
|
1127
|
+
"clearDisabled",
|
|
1128
|
+
"buttonRadius",
|
|
1129
|
+
"clearIcon",
|
|
1130
|
+
"titleWrap",
|
|
1131
|
+
"titleTpl",
|
|
1132
|
+
"controlsTpl"
|
|
1133
|
+
],
|
|
1134
|
+
outputs: [
|
|
1135
|
+
"removed",
|
|
1136
|
+
"moved",
|
|
1137
|
+
"edited",
|
|
1138
|
+
"resetClicked",
|
|
1139
|
+
"cleared"
|
|
1140
|
+
]
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
kind: "component",
|
|
1144
|
+
type: RtEmptyStateComponent,
|
|
1145
|
+
selector: "rt-empty-state",
|
|
1146
|
+
inputs: [
|
|
1147
|
+
"icon",
|
|
1148
|
+
"glyph",
|
|
1149
|
+
"title",
|
|
1150
|
+
"description",
|
|
1151
|
+
"framed"
|
|
1152
|
+
]
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
kind: "component",
|
|
1156
|
+
type: RtFieldComponent,
|
|
1157
|
+
selector: "rt-field",
|
|
1158
|
+
inputs: [
|
|
1159
|
+
"label",
|
|
1160
|
+
"hint",
|
|
1161
|
+
"help",
|
|
1162
|
+
"readonly",
|
|
1163
|
+
"loading",
|
|
1164
|
+
"required",
|
|
1165
|
+
"hideRequiredMark",
|
|
1166
|
+
"reserveHintSpace",
|
|
1167
|
+
"errors"
|
|
1168
|
+
]
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
kind: "component",
|
|
1172
|
+
type: RtInputComponent,
|
|
1173
|
+
selector: "rt-input",
|
|
1174
|
+
inputs: [
|
|
1175
|
+
"appearance",
|
|
1176
|
+
"type",
|
|
1177
|
+
"placeholder",
|
|
1178
|
+
"iconLeft",
|
|
1179
|
+
"iconRight",
|
|
1180
|
+
"passwordToggle",
|
|
1181
|
+
"autocomplete"
|
|
1182
|
+
]
|
|
1183
|
+
}
|
|
1184
|
+
],
|
|
1185
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1186
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
};
|
|
1190
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1191
|
+
minVersion: "12.0.0",
|
|
1192
|
+
version: "22.2.2",
|
|
1193
|
+
ngImport: i0,
|
|
1194
|
+
type: RtDynamicInputComponent,
|
|
1195
|
+
decorators: [{
|
|
1196
|
+
type: Component,
|
|
1197
|
+
args: [{
|
|
1198
|
+
selector: "rt-dynamic-input",
|
|
1199
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1200
|
+
encapsulation: ViewEncapsulation.None,
|
|
1201
|
+
imports: [
|
|
1202
|
+
FormsModule,
|
|
1203
|
+
BlockDirective,
|
|
1204
|
+
ElemDirective,
|
|
1205
|
+
RtButtonDirective,
|
|
1206
|
+
RtDynamicSelectorListComponent,
|
|
1207
|
+
RtEmptyStateComponent,
|
|
1208
|
+
RtFieldComponent,
|
|
1209
|
+
RtInputComponent
|
|
1210
|
+
],
|
|
1211
|
+
providers: [{
|
|
1212
|
+
provide: RtFormControlBase,
|
|
1213
|
+
useExisting: forwardRef(() => RtDynamicInputComponent)
|
|
1214
|
+
}],
|
|
1215
|
+
host: { class: BEM_BLOCK$2 },
|
|
1216
|
+
template: "<ng-container rtBlock=\"rt-dynamic-input\">\n <!-- Под приглашением пустой список не рисуется: узел нулевой высоты сдвигал бы приглашение зазором. -->\n @if (rows().length > 0 || !isInvitationShown()) {\n <rt-dynamic-selector-list\n [rows]=\"rows()\"\n [draggable]=\"draggable()\"\n [buttonRadius]=\"buttonRadius()\"\n [clearIcon]=\"clearIcon()\"\n [titleWrap]=\"titleWrap()\"\n [editable]=\"editable()\"\n [disabled]=\"isDisabled()\"\n [actionsShown]=\"!isInvitationShown()\"\n [resetClearShown]=\"listActionsShown()\"\n [removeShown]=\"removeShown()\"\n [resetDisabled]=\"isResetDisabled()\"\n [clearDisabled]=\"isClearDisabled()\"\n [controlsTpl]=\"controlsTpl()\"\n (removed)=\"onRemoved($event)\"\n (moved)=\"onMoved($event)\"\n (edited)=\"onEdited($event)\"\n (resetClicked)=\"onReset()\"\n (cleared)=\"onCleared()\">\n @if (isAddShown()) {\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"dynamic-input-add\"\n [label]=\"addTitle()\"\n [attr.aria-label]=\"addTitle()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onAdd()\"></button>\n }\n </rt-dynamic-selector-list>\n }\n\n @if (isFieldShown()) {\n <!-- Подпись поля рисует rt-field: у rt-input своей нет. Обёртка стоит только при подписи —\n пустая добавила бы зазор под полем и сдвинула прежний вид. -->\n @if (fieldLabel(); as label) {\n <rt-field qa-dataid=\"dynamic-input-field-label\" [label]=\"label\">\n <rt-input\n #field\n rtElem=\"field\"\n qa-dataid=\"dynamic-input-field\"\n [appearance]=\"fieldAppearance()\"\n [controlId]=\"effectiveControlId()\"\n [placeholder]=\"fieldPlaceholder()\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event ?? '')\"\n (keydown.enter)=\"onCommit()\"\n (focusout)=\"onCommit()\" />\n </rt-field>\n } @else {\n <rt-input\n #field\n rtElem=\"field\"\n qa-dataid=\"dynamic-input-field\"\n [appearance]=\"fieldAppearance()\"\n [controlId]=\"effectiveControlId()\"\n [placeholder]=\"fieldPlaceholder()\"\n [ngModel]=\"draft()\"\n (ngModelChange)=\"draft.set($event ?? '')\"\n (keydown.enter)=\"onCommit()\"\n (focusout)=\"onCommit()\" />\n }\n }\n\n @if (isInvitationShown()) {\n <rt-empty-state\n rtElem=\"invitation\"\n qa-dataid=\"dynamic-input-invitation\"\n [icon]=\"invitationIcon()\"\n [glyph]=\"invitationGlyph()\"\n [description]=\"invitationDescription()\">\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"dynamic-input-invitation-add\"\n [appearance]=\"invitationButtonAppearance()\"\n [icon]=\"invitationButtonIcon()\"\n [label]=\"addTitle()\"\n [attr.aria-label]=\"addTitle()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onAdd()\"></button>\n </rt-empty-state>\n }\n</ng-container>\n",
|
|
1217
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-input{display:flex;width:100%;flex-direction:column;gap:var(--rt-space-sm)}.rt-dynamic-input__field,.rt-dynamic-input__invitation{min-width:0}}\n"]
|
|
1218
|
+
}]
|
|
1219
|
+
}],
|
|
1220
|
+
propDecorators: {
|
|
1221
|
+
field: [{
|
|
1222
|
+
type: i0.ViewChild,
|
|
1223
|
+
args: ["field", {
|
|
1224
|
+
read: ElementRef,
|
|
1225
|
+
isSignal: true
|
|
1226
|
+
}]
|
|
1227
|
+
}],
|
|
1228
|
+
rowControls: [{
|
|
1229
|
+
type: i0.ContentChild,
|
|
1230
|
+
args: [i0.forwardRef(() => RtDynamicSelectorRowControlsDirective), { isSignal: true }]
|
|
1231
|
+
}],
|
|
1232
|
+
buttonTitle: [{
|
|
1233
|
+
type: i0.Input,
|
|
1234
|
+
args: [{
|
|
1235
|
+
isSignal: true,
|
|
1236
|
+
alias: "buttonTitle",
|
|
1237
|
+
required: false
|
|
1238
|
+
}]
|
|
1239
|
+
}],
|
|
1240
|
+
placeholder: [{
|
|
1241
|
+
type: i0.Input,
|
|
1242
|
+
args: [{
|
|
1243
|
+
isSignal: true,
|
|
1244
|
+
alias: "placeholder",
|
|
1245
|
+
required: false
|
|
1246
|
+
}]
|
|
1247
|
+
}],
|
|
1248
|
+
readonlyKeys: [{
|
|
1249
|
+
type: i0.Input,
|
|
1250
|
+
args: [{
|
|
1251
|
+
isSignal: true,
|
|
1252
|
+
alias: "readonlyKeys",
|
|
1253
|
+
required: false
|
|
1254
|
+
}]
|
|
1255
|
+
}],
|
|
1256
|
+
draggable: [{
|
|
1257
|
+
type: i0.Input,
|
|
1258
|
+
args: [{
|
|
1259
|
+
isSignal: true,
|
|
1260
|
+
alias: "draggable",
|
|
1261
|
+
required: false
|
|
1262
|
+
}]
|
|
1263
|
+
}],
|
|
1264
|
+
buttonRadius: [{
|
|
1265
|
+
type: i0.Input,
|
|
1266
|
+
args: [{
|
|
1267
|
+
isSignal: true,
|
|
1268
|
+
alias: "buttonRadius",
|
|
1269
|
+
required: false
|
|
1270
|
+
}]
|
|
1271
|
+
}],
|
|
1272
|
+
editable: [{
|
|
1273
|
+
type: i0.Input,
|
|
1274
|
+
args: [{
|
|
1275
|
+
isSignal: true,
|
|
1276
|
+
alias: "editable",
|
|
1277
|
+
required: false
|
|
1278
|
+
}]
|
|
1279
|
+
}],
|
|
1280
|
+
invitation: [{
|
|
1281
|
+
type: i0.Input,
|
|
1282
|
+
args: [{
|
|
1283
|
+
isSignal: true,
|
|
1284
|
+
alias: "invitation",
|
|
1285
|
+
required: false
|
|
1286
|
+
}]
|
|
1287
|
+
}],
|
|
1288
|
+
invitationIcon: [{
|
|
1289
|
+
type: i0.Input,
|
|
1290
|
+
args: [{
|
|
1291
|
+
isSignal: true,
|
|
1292
|
+
alias: "invitationIcon",
|
|
1293
|
+
required: false
|
|
1294
|
+
}]
|
|
1295
|
+
}],
|
|
1296
|
+
invitationGlyph: [{
|
|
1297
|
+
type: i0.Input,
|
|
1298
|
+
args: [{
|
|
1299
|
+
isSignal: true,
|
|
1300
|
+
alias: "invitationGlyph",
|
|
1301
|
+
required: false
|
|
1302
|
+
}]
|
|
1303
|
+
}],
|
|
1304
|
+
invitationDescription: [{
|
|
1305
|
+
type: i0.Input,
|
|
1306
|
+
args: [{
|
|
1307
|
+
isSignal: true,
|
|
1308
|
+
alias: "invitationDescription",
|
|
1309
|
+
required: false
|
|
1310
|
+
}]
|
|
1311
|
+
}],
|
|
1312
|
+
invitationButtonIcon: [{
|
|
1313
|
+
type: i0.Input,
|
|
1314
|
+
args: [{
|
|
1315
|
+
isSignal: true,
|
|
1316
|
+
alias: "invitationButtonIcon",
|
|
1317
|
+
required: false
|
|
1318
|
+
}]
|
|
1319
|
+
}],
|
|
1320
|
+
invitationButtonAppearance: [{
|
|
1321
|
+
type: i0.Input,
|
|
1322
|
+
args: [{
|
|
1323
|
+
isSignal: true,
|
|
1324
|
+
alias: "invitationButtonAppearance",
|
|
1325
|
+
required: false
|
|
1326
|
+
}]
|
|
1327
|
+
}],
|
|
1328
|
+
clearIcon: [{
|
|
1329
|
+
type: i0.Input,
|
|
1330
|
+
args: [{
|
|
1331
|
+
isSignal: true,
|
|
1332
|
+
alias: "clearIcon",
|
|
1333
|
+
required: false
|
|
1334
|
+
}]
|
|
1335
|
+
}],
|
|
1336
|
+
titleWrap: [{
|
|
1337
|
+
type: i0.Input,
|
|
1338
|
+
args: [{
|
|
1339
|
+
isSignal: true,
|
|
1340
|
+
alias: "titleWrap",
|
|
1341
|
+
required: false
|
|
1342
|
+
}]
|
|
1343
|
+
}],
|
|
1344
|
+
fieldAppearance: [{
|
|
1345
|
+
type: i0.Input,
|
|
1346
|
+
args: [{
|
|
1347
|
+
isSignal: true,
|
|
1348
|
+
alias: "fieldAppearance",
|
|
1349
|
+
required: false
|
|
1350
|
+
}]
|
|
1351
|
+
}],
|
|
1352
|
+
fieldLabel: [{
|
|
1353
|
+
type: i0.Input,
|
|
1354
|
+
args: [{
|
|
1355
|
+
isSignal: true,
|
|
1356
|
+
alias: "fieldLabel",
|
|
1357
|
+
required: false
|
|
1358
|
+
}]
|
|
1359
|
+
}],
|
|
1360
|
+
removeShown: [{
|
|
1361
|
+
type: i0.Input,
|
|
1362
|
+
args: [{
|
|
1363
|
+
isSignal: true,
|
|
1364
|
+
alias: "removeShown",
|
|
1365
|
+
required: false
|
|
1366
|
+
}]
|
|
1367
|
+
}],
|
|
1368
|
+
listActionsShown: [{
|
|
1369
|
+
type: i0.Input,
|
|
1370
|
+
args: [{
|
|
1371
|
+
isSignal: true,
|
|
1372
|
+
alias: "listActionsShown",
|
|
1373
|
+
required: false
|
|
1374
|
+
}]
|
|
1375
|
+
}],
|
|
1376
|
+
extraChanged: [{
|
|
1377
|
+
type: i0.Input,
|
|
1378
|
+
args: [{
|
|
1379
|
+
isSignal: true,
|
|
1380
|
+
alias: "extraChanged",
|
|
1381
|
+
required: false
|
|
1382
|
+
}]
|
|
1383
|
+
}],
|
|
1384
|
+
listReset: [{
|
|
1385
|
+
type: i0.Output,
|
|
1386
|
+
args: ["listReset"]
|
|
1387
|
+
}],
|
|
1388
|
+
listCleared: [{
|
|
1389
|
+
type: i0.Output,
|
|
1390
|
+
args: ["listCleared"]
|
|
1391
|
+
}]
|
|
1392
|
+
}
|
|
1393
|
+
});
|
|
1394
|
+
const BEM_BLOCK$1 = "rt-dynamic-selector-popup";
|
|
568
1395
|
const RT_DYNAMIC_SELECTOR_SEARCH_DEBOUNCE = 500;
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtDynamicSelectorPopupComponent, isStandalone: true, selector: "rt-dynamic-selector-popup", inputs: { entities: { classPropertyName: "entities", publicName: "entities", isSignal: true, isRequired: false, transformFunction: null }, keyExp: { classPropertyName: "keyExp", publicName: "keyExp", isSignal: true, isRequired: true, transformFunction: null }, displayExp: { classPropertyName: "displayExp", publicName: "displayExp", isSignal: true, isRequired: true, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, multiToggleShown: { classPropertyName: "multiToggleShown", publicName: "multiToggleShown", isSignal: true, isRequired: false, transformFunction: null }, selectAllShown: { classPropertyName: "selectAllShown", publicName: "selectAllShown", isSignal: true, isRequired: false, transformFunction: null }, localSearch: { classPropertyName: "localSearch", publicName: "localSearch", isSignal: true, isRequired: false, transformFunction: null }, lazyLoad: { classPropertyName: "lazyLoad", publicName: "lazyLoad", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, fetching: { classPropertyName: "fetching", publicName: "fetching", isSignal: true, isRequired: false, transformFunction: null }, pinnedKeys: { classPropertyName: "pinnedKeys", publicName: "pinnedKeys", isSignal: true, isRequired: false, transformFunction: null }, navigateTitle: { classPropertyName: "navigateTitle", publicName: "navigateTitle", isSignal: true, isRequired: false, transformFunction: null }, navigateLink: { classPropertyName: "navigateLink", publicName: "navigateLink", isSignal: true, isRequired: false, transformFunction: null }, searchTerm: { classPropertyName: "searchTerm", publicName: "searchTerm", isSignal: true, isRequired: false, transformFunction: null }, searchAppearance: { classPropertyName: "searchAppearance", publicName: "searchAppearance", isSignal: true, isRequired: false, transformFunction: null }, searchRadius: { classPropertyName: "searchRadius", publicName: "searchRadius", isSignal: true, isRequired: false, transformFunction: null }, emptyResultsText: { classPropertyName: "emptyResultsText", publicName: "emptyResultsText", isSignal: true, isRequired: false, transformFunction: null }, applyLabel: { classPropertyName: "applyLabel", publicName: "applyLabel", isSignal: true, isRequired: false, transformFunction: null }, applyLabelCase: { classPropertyName: "applyLabelCase", publicName: "applyLabelCase", isSignal: true, isRequired: false, transformFunction: null }, autofocusSearch: { classPropertyName: "autofocusSearch", publicName: "autofocusSearch", isSignal: true, isRequired: false, transformFunction: null }, titleWrap: { classPropertyName: "titleWrap", publicName: "titleWrap", isSignal: true, isRequired: false, transformFunction: null }, highlightSearch: { classPropertyName: "highlightSearch", publicName: "highlightSearch", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { applied: "applied", cancelled: "cancelled", searchChange: "searchChange", loadMore: "loadMore", temporaryChoiceChange: "temporaryChoiceChange" }, host: { classAttribute: "rt-dynamic-selector-popup" }, viewQueries: [{ propertyName: "searchField", first: true, predicate: ["searchField"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<ng-container rtBlock=\"rt-dynamic-selector-popup\">\n <div rtElem=\"head\">\n <rt-input\n #searchField\n rtElem=\"search\"\n qa-dataid=\"dynamic-selector-search\"\n iconLeft=\"search\"\n [appearance]=\"searchAppearance()\"\n [radius]=\"searchRadius()\"\n [placeholder]=\"searchLabel()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onQueryChange($event)\" />\n\n @if (isMultiToggleVisible() || isSelectAllShown()) {\n <div rtElem=\"controls\">\n @if (isMultiToggleVisible()) {\n <div rtElem=\"multi\">\n <rt-toggle-switch\n qa-dataid=\"dynamic-selector-multi\"\n [ariaLabel]=\"multiLabel()\"\n [ngModel]=\"isMultiOn()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onMultiToggle($event)\" />\n <span rtElem=\"multi-label\">{{ multiLabel() }}</span>\n <rt-icon rtElem=\"multi-hint-icon\" name=\"info-circle\" size=\"sm\" [rtTooltip]=\"multiHintLabel()\" />\n <span rtElem=\"multi-hint\">{{ multiHintLabel() }}</span>\n </div>\n }\n\n @if (isSelectAllShown()) {\n <rt-checkbox\n rtElem=\"select-all\"\n qa-dataid=\"dynamic-selector-select-all\"\n [indeterminate]=\"selectAllState() === 'some'\"\n [ngModel]=\"selectAllState() === 'all'\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onSelectAll($event)\">\n {{ selectAllLabel() }}\n </rt-checkbox>\n }\n </div>\n }\n </div>\n\n @if (loading()) {\n <div rtElem=\"state\" qa-dataid=\"dynamic-selector-loading\">\n <rt-spinner [diameter]=\"24\" />\n </div>\n } @else if (hasRows()) {\n <div rtElem=\"list\" qa-dataid=\"dynamic-selector-options\">\n @for (row of rowItems(); track row.key) {\n <div rtElem=\"row\" [rtMod]=\"{ separated: row.separated, nowrap: !titleWrap(), own: isSingle() && ownLabel() }\">\n @if (isSingle()) {\n <!-- \u0411\u0435\u0437 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0430 \u0438 \u043F\u0440\u0438 \u043F\u043E\u0434\u0441\u0432\u0435\u0442\u043A\u0435 \u043F\u043E\u0438\u0441\u043A\u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u044C \u0440\u0438\u0441\u0443\u0435\u0442 \u043E\u043A\u043D\u043E \u0440\u044F\u0434\u043E\u043C \u0441 \u043A\u043D\u043E\u043F\u043A\u043E\u0439: \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0430\n \u043C\u0435\u0440\u044F\u0435\u0442 \u043E\u0431\u0440\u0435\u0437\u043A\u0443 \u0441\u0432\u043E\u0435\u0433\u043E \u0443\u0437\u043B\u0430, \u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u044C \u0432\u043D\u0443\u0442\u0440\u0438 \u043A\u043D\u043E\u043F\u043A\u0438 \u043E\u043A\u043D\u0443 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430. -->\n <rt-radio-button\n rtElem=\"option\"\n qa-dataid=\"dynamic-selector-option\"\n [value]=\"row.key\"\n [checked]=\"row.ticked\"\n [label]=\"ownLabel() ? '' : row.label\"\n [ariaLabel]=\"ownLabel() ? row.label : null\"\n [rtMod]=\"{ fixed: ownLabel() }\"\n (checkedChange)=\"onRadioChange(row.entity)\" />\n @if (ownLabel()) {\n <!-- \u0424\u043E\u043A\u0443\u0441 \u0438 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u043E\u0441\u0442\u0430\u044E\u0442\u0441\u044F \u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0435: \u043E\u043D\u0430 \u043D\u0430\u0437\u0432\u0430\u043D\u0430 \u044D\u0442\u043E\u0439 \u0436\u0435 \u043F\u043E\u0434\u043F\u0438\u0441\u044C\u044E, \u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u044C \u0434\u0430\u0451\u0442 \u043D\u0430\u0436\u0430\u0442\u044C \u043C\u044B\u0448\u044C\u044E, \u043A\u0430\u043A label. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <span\n rtElem=\"option-label\"\n qa-dataid=\"dynamic-selector-option-label\"\n rtTooltipWhenTruncated\n [rtTooltip]=\"titleWrap() ? '' : row.label\"\n (click)=\"onRadioChange(row.entity)\">\n <ng-container *ngTemplateOutlet=\"labelParts; context: { $implicit: row.parts }\" />\n </span>\n }\n } @else {\n <rt-checkbox\n rtElem=\"option\"\n qa-dataid=\"dynamic-selector-option\"\n [ngModel]=\"row.ticked\"\n [ngModelOptions]=\"{ standalone: true }\"\n (click)=\"onRowClick($event, row.entity)\">\n <span\n rtElem=\"option-label\"\n qa-dataid=\"dynamic-selector-option-label\"\n rtTooltipWhenTruncated\n [rtTooltip]=\"titleWrap() ? '' : row.label\">\n <ng-container *ngTemplateOutlet=\"labelParts; context: { $implicit: row.parts }\" />\n </span>\n </rt-checkbox>\n }\n </div>\n }\n\n <div rtElem=\"sentinel\" rtInfiniteScroll [disabled]=\"!lazyLoad() || fetching()\" (loadMore)=\"loadMore.emit()\"></div>\n\n @if (fetching()) {\n <div rtElem=\"fetching\" qa-dataid=\"dynamic-selector-fetching\">\n <rt-spinner [diameter]=\"20\" />\n </div>\n }\n </div>\n } @else {\n <rt-empty-state rtElem=\"empty\" qa-dataid=\"dynamic-selector-no-results\" icon=\"search\" [title]=\"emptyText()\" />\n }\n\n <div rtElem=\"foot\" [rtMod]=\"{ nav: isNavShown() }\">\n @if (isNavShown()) {\n <a rtElem=\"nav\" qa-dataid=\"dynamic-selector-nav\" [routerLink]=\"navigateLink()\" [rtTooltip]=\"navigateTitle()\">\n {{ navigateTitle() }}\n </a>\n }\n\n <div rtElem=\"actions\">\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"dynamic-selector-cancel\"\n [label]=\"cancelLabel()\"\n [attr.aria-label]=\"cancelLabel()\"\n (click)=\"onCancel()\"></button>\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"dynamic-selector-apply\"\n [label]=\"applyText()\"\n [attr.aria-label]=\"applyText()\"\n [disabled]=\"isApplyDisabled()\"\n (click)=\"onApply()\"></button>\n </div>\n </div>\n\n <!-- \u041A\u0443\u0441\u043A\u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u0438 \u0441\u0442\u043E\u044F\u0442 \u0431\u0435\u0437 \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432 \u043C\u0435\u0436\u0434\u0443 \u0441\u043E\u0431\u043E\u0439: \u043F\u0440\u043E\u0431\u0435\u043B \u0432 \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0435 \u0440\u0430\u0437\u043E\u0440\u0432\u0430\u043B \u0431\u044B \u0441\u043B\u043E\u0432\u043E \u043D\u0430 \u043F\u043E\u0434\u0441\u0432\u0435\u0447\u0435\u043D\u043D\u043E\u0439 \u0433\u0440\u0430\u043D\u0438\u0446\u0435. -->\n <!-- prettier-ignore -->\n <ng-template #labelParts let-parts>@for (part of parts; track $index) {@if (part.matched) {<mark rtElem=\"match\">{{ part.text }}</mark>} @else {{{ part.text }}}}</ng-template>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-popup{--rt-dynamic-selector-popup-width-default: calc(var(--rt-size-40) * 2);--rt-dynamic-selector-popup-max-height-default: calc(var(--rt-size-100) + var(--rt-size-20));--rt-dynamic-selector-popup-radius-default: var(--rt-radius-md);--rt-dynamic-selector-popup-border-width-default: var(--rt-border-width-thin);--rt-dynamic-selector-popup-shadow-default: var(--rt-shadow-lg);--rt-dynamic-selector-popup-bg-default: var(--rt-color-bg-surface);--rt-dynamic-selector-popup-min-height-default: 0;--rt-dynamic-selector-popup-padding-default: var(--rt-space-md);--rt-dynamic-selector-popup-foot-border-width-default: var( --rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default) );--rt-dynamic-selector-popup-nav-color-default: var(--rt-color-text-link);--rt-dynamic-selector-popup-button-height-default: var(--rt-control-height-md);--rt-dynamic-selector-popup-button-font-size-default: .95rem;--rt-dynamic-selector-popup-empty-icon-size-default: var(--rt-size-8);--rt-dynamic-selector-popup-empty-icon-wrap-bg-default: var(--rt-color-bg-subtle);--rt-dynamic-selector-popup-empty-text-size-default: var(--rt-text-md);--rt-dynamic-selector-popup-empty-text-weight-default: var(--rt-font-weight-medium);--rt-dynamic-selector-popup-empty-text-color-default: var(--rt-color-text-primary);--rt-dynamic-selector-popup-highlight-color-default: var(--rt-color-text-primary);--rt-dynamic-selector-popup-highlight-weight-default: var(--rt-font-weight-semibold);--rt-dynamic-selector-popup-highlight-bg-default: transparent;--rt-dynamic-selector-popup-highlight-radius-default: 0;--rt-dynamic-selector-popup-option-line-height-default: normal;--rt-dynamic-selector-popup-option-min-height-default: 0;--rt-dynamic-selector-popup-empty-gap-default: calc(var(--rt-space-xs) + var(--rt-space-sm));--rt-dynamic-selector-popup-foot-padding-default: var(--rt-space-sm) var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default)) 0;display:flex;width:var(--rt-dynamic-selector-popup-width, var(--rt-dynamic-selector-popup-width-default));max-width:calc(100vw - var(--rt-space-md) * 2);min-height:var(--rt-dynamic-selector-popup-min-height, var(--rt-dynamic-selector-popup-min-height-default));max-height:var(--rt-dynamic-selector-popup-max-height, var(--rt-dynamic-selector-popup-max-height-default));box-sizing:border-box;flex-direction:column;border:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);border-radius:var(--rt-dynamic-selector-popup-radius, var(--rt-dynamic-selector-popup-radius-default));background:var(--rt-dynamic-selector-popup-bg, var(--rt-dynamic-selector-popup-bg-default));box-shadow:var(--rt-dynamic-selector-popup-shadow, var(--rt-dynamic-selector-popup-shadow-default));color:var(--rt-color-text-primary);gap:var(--rt-space-sm);padding-block:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__head{display:flex;flex-direction:column;gap:var(--rt-space-sm);padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__controls{display:flex;flex-direction:column;border-bottom:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);gap:var(--rt-space-sm);padding-block-end:var(--rt-space-sm)}.rt-dynamic-selector-popup__multi{display:flex;flex-wrap:wrap;align-items:center;gap:var(--rt-space-2xs) var(--rt-space-sm)}.rt-dynamic-selector-popup__multi-label{font-size:var(--rt-text-sm)}.rt-dynamic-selector-popup__multi-hint-icon{color:var(--rt-color-text-muted)}.rt-dynamic-selector-popup__multi-hint{display:none;flex-basis:100%;color:var(--rt-color-text-muted);font-size:var(--rt-text-xs)}@media(width<=1080px){.rt-dynamic-selector-popup__multi-hint{display:block}.rt-dynamic-selector-popup__multi .rt-dynamic-selector-popup__multi-hint-icon{display:none}}.rt-dynamic-selector-popup__select-all{min-width:0}.rt-dynamic-selector-popup__state{display:flex;flex:1 1 auto;align-items:center;justify-content:center;padding:var(--rt-space-md)}.rt-dynamic-selector-popup__list{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;overflow-y:auto;padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__sentinel{min-height:var(--rt-size-1)}.rt-dynamic-selector-popup__fetching{display:flex;justify-content:center;padding-block:var(--rt-space-sm)}.rt-dynamic-selector-popup__empty{flex:1 1 auto;padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__empty .rt-empty-state__icon-wrap{margin-bottom:calc(var(--rt-dynamic-selector-popup-empty-gap, var(--rt-dynamic-selector-popup-empty-gap-default)) - var(--rt-space-sm))}.rt-dynamic-selector-popup__empty.rt-empty-state{--rt-empty-state-icon-size: var( --rt-dynamic-selector-popup-empty-icon-size, var(--rt-dynamic-selector-popup-empty-icon-size-default) );--rt-empty-state-icon-wrap-bg: var( --rt-dynamic-selector-popup-empty-icon-wrap-bg, var(--rt-dynamic-selector-popup-empty-icon-wrap-bg-default) );--rt-empty-state-title-size: var( --rt-dynamic-selector-popup-empty-text-size, var(--rt-dynamic-selector-popup-empty-text-size-default) );--rt-empty-state-title-weight: var( --rt-dynamic-selector-popup-empty-text-weight, var(--rt-dynamic-selector-popup-empty-text-weight-default) );--rt-empty-state-title-color: var( --rt-dynamic-selector-popup-empty-text-color, var(--rt-dynamic-selector-popup-empty-text-color-default) )}.rt-dynamic-selector-popup__foot{display:flex;align-items:center;justify-content:flex-end;padding:var(--rt-dynamic-selector-popup-foot-padding, var(--rt-dynamic-selector-popup-foot-padding-default));border-top:var(--rt-dynamic-selector-popup-foot-border-width, var(--rt-dynamic-selector-popup-foot-border-width-default)) solid var(--rt-color-border-subtle);gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__foot--nav{justify-content:space-between}.rt-dynamic-selector-popup__nav{overflow:hidden;min-width:0;color:var(--rt-dynamic-selector-popup-nav-color, var(--rt-dynamic-selector-popup-nav-color-default));font-size:var(--rt-text-sm);text-overflow:ellipsis;white-space:nowrap}.rt-dynamic-selector-popup__nav:hover{color:var(--rt-color-text-link-hover)}.rt-dynamic-selector-popup__actions{display:flex;flex:0 0 auto;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__actions .rt-button{--rt-btn-height: var(--rt-dynamic-selector-popup-button-height, var(--rt-dynamic-selector-popup-button-height-default));--rt-btn-font-size: var( --rt-dynamic-selector-popup-button-font-size, var(--rt-dynamic-selector-popup-button-font-size-default) )}}\n", "@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-popup__row{display:flex;min-height:var(--rt-dynamic-selector-popup-option-min-height, var(--rt-dynamic-selector-popup-option-min-height-default));box-sizing:border-box;flex-direction:column;justify-content:center;padding-block:var(--rt-space-sm)}.rt-dynamic-selector-popup__row--separated{border-bottom:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);margin-block-end:var(--rt-space-2xs);padding-block-end:var(--rt-space-sm)}.rt-dynamic-selector-popup__option{display:block;overflow-wrap:anywhere}.rt-dynamic-selector-popup__option-label{overflow-wrap:anywhere}.rt-dynamic-selector-popup__option-label,.rt-dynamic-selector-popup__option .rt-checkbox__label,.rt-dynamic-selector-popup__option .rt-radio-button__label{line-height:var(--rt-dynamic-selector-popup-option-line-height, var(--rt-dynamic-selector-popup-option-line-height-default))}.rt-dynamic-selector-popup__row--nowrap{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option{min-width:0;max-width:100%}.rt-dynamic-selector-popup__row--own{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__option--fixed{flex:0 0 auto}.rt-dynamic-selector-popup__row--own .rt-dynamic-selector-popup__option-label{min-width:0;flex:1 1 auto;color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-text-sm);-webkit-user-select:none;user-select:none}.rt-dynamic-selector-popup__match{border-radius:var(--rt-dynamic-selector-popup-highlight-radius, var(--rt-dynamic-selector-popup-highlight-radius-default));background:var(--rt-dynamic-selector-popup-highlight-bg, var(--rt-dynamic-selector-popup-highlight-bg-default));color:var(--rt-dynamic-selector-popup-highlight-color, var(--rt-dynamic-selector-popup-highlight-color-default));font-weight:var(--rt-dynamic-selector-popup-highlight-weight, var(--rt-dynamic-selector-popup-highlight-weight-default))}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option .rt-checkbox{max-width:100%}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option .rt-checkbox__label{overflow:hidden;min-width:0}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option-label{display:block;overflow:hidden;min-width:0;flex:1 1 auto;font-size:var(--rt-text-sm);text-overflow:ellipsis;white-space:nowrap}}\n"], dependencies: [{ kind: "ngmodule", type:
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
], host: { class: BEM_BLOCK$1 }, template: "<ng-container rtBlock=\"rt-dynamic-selector-popup\">\n <div rtElem=\"head\">\n <rt-input\n #searchField\n rtElem=\"search\"\n qa-dataid=\"dynamic-selector-search\"\n iconLeft=\"search\"\n [appearance]=\"searchAppearance()\"\n [radius]=\"searchRadius()\"\n [placeholder]=\"searchLabel()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onQueryChange($event)\" />\n\n @if (isMultiToggleVisible() || isSelectAllShown()) {\n <div rtElem=\"controls\">\n @if (isMultiToggleVisible()) {\n <div rtElem=\"multi\">\n <rt-toggle-switch\n qa-dataid=\"dynamic-selector-multi\"\n [ariaLabel]=\"multiLabel()\"\n [ngModel]=\"isMultiOn()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onMultiToggle($event)\" />\n <span rtElem=\"multi-label\">{{ multiLabel() }}</span>\n <rt-icon rtElem=\"multi-hint-icon\" name=\"info-circle\" size=\"sm\" [rtTooltip]=\"multiHintLabel()\" />\n <span rtElem=\"multi-hint\">{{ multiHintLabel() }}</span>\n </div>\n }\n\n @if (isSelectAllShown()) {\n <rt-checkbox\n rtElem=\"select-all\"\n qa-dataid=\"dynamic-selector-select-all\"\n [indeterminate]=\"selectAllState() === 'some'\"\n [ngModel]=\"selectAllState() === 'all'\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onSelectAll($event)\">\n {{ selectAllLabel() }}\n </rt-checkbox>\n }\n </div>\n }\n </div>\n\n @if (loading()) {\n <div rtElem=\"state\" qa-dataid=\"dynamic-selector-loading\">\n <rt-spinner [diameter]=\"24\" />\n </div>\n } @else if (hasRows()) {\n <div rtElem=\"list\" qa-dataid=\"dynamic-selector-options\">\n @for (row of rowItems(); track row.key) {\n <div rtElem=\"row\" [rtMod]=\"{ separated: row.separated, nowrap: !titleWrap(), own: isSingle() && ownLabel() }\">\n @if (isSingle()) {\n <!-- \u0411\u0435\u0437 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0430 \u0438 \u043F\u0440\u0438 \u043F\u043E\u0434\u0441\u0432\u0435\u0442\u043A\u0435 \u043F\u043E\u0438\u0441\u043A\u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u044C \u0440\u0438\u0441\u0443\u0435\u0442 \u043E\u043A\u043D\u043E \u0440\u044F\u0434\u043E\u043C \u0441 \u043A\u043D\u043E\u043F\u043A\u043E\u0439: \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0430\n \u043C\u0435\u0440\u044F\u0435\u0442 \u043E\u0431\u0440\u0435\u0437\u043A\u0443 \u0441\u0432\u043E\u0435\u0433\u043E \u0443\u0437\u043B\u0430, \u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u044C \u0432\u043D\u0443\u0442\u0440\u0438 \u043A\u043D\u043E\u043F\u043A\u0438 \u043E\u043A\u043D\u0443 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430. -->\n <rt-radio-button\n rtElem=\"option\"\n qa-dataid=\"dynamic-selector-option\"\n [value]=\"row.key\"\n [checked]=\"row.ticked\"\n [label]=\"ownLabel() ? '' : row.label\"\n [ariaLabel]=\"ownLabel() ? row.label : null\"\n [rtMod]=\"{ fixed: ownLabel() }\"\n (checkedChange)=\"onRadioChange(row.entity)\" />\n @if (ownLabel()) {\n <!-- \u0424\u043E\u043A\u0443\u0441 \u0438 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u043E\u0441\u0442\u0430\u044E\u0442\u0441\u044F \u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0435: \u043E\u043D\u0430 \u043D\u0430\u0437\u0432\u0430\u043D\u0430 \u044D\u0442\u043E\u0439 \u0436\u0435 \u043F\u043E\u0434\u043F\u0438\u0441\u044C\u044E, \u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u044C \u0434\u0430\u0451\u0442 \u043D\u0430\u0436\u0430\u0442\u044C \u043C\u044B\u0448\u044C\u044E, \u043A\u0430\u043A label. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <span\n rtElem=\"option-label\"\n qa-dataid=\"dynamic-selector-option-label\"\n rtTooltipWhenTruncated\n [rtTooltip]=\"titleWrap() ? '' : row.label\"\n (click)=\"onRadioChange(row.entity)\">\n <ng-container *ngTemplateOutlet=\"labelParts; context: { $implicit: row.parts }\" />\n </span>\n }\n } @else {\n <rt-checkbox\n rtElem=\"option\"\n qa-dataid=\"dynamic-selector-option\"\n [ngModel]=\"row.ticked\"\n [ngModelOptions]=\"{ standalone: true }\"\n (click)=\"onRowClick($event, row.entity)\">\n <span\n rtElem=\"option-label\"\n qa-dataid=\"dynamic-selector-option-label\"\n rtTooltipWhenTruncated\n [rtTooltip]=\"titleWrap() ? '' : row.label\">\n <ng-container *ngTemplateOutlet=\"labelParts; context: { $implicit: row.parts }\" />\n </span>\n </rt-checkbox>\n }\n </div>\n }\n\n <div rtElem=\"sentinel\" rtInfiniteScroll [disabled]=\"!lazyLoad() || fetching()\" (loadMore)=\"loadMore.emit()\"></div>\n\n @if (fetching()) {\n <div rtElem=\"fetching\" qa-dataid=\"dynamic-selector-fetching\">\n <rt-spinner [diameter]=\"20\" />\n </div>\n }\n </div>\n } @else {\n <rt-empty-state rtElem=\"empty\" qa-dataid=\"dynamic-selector-no-results\" icon=\"search\" [title]=\"emptyText()\" />\n }\n\n <div rtElem=\"foot\" [rtMod]=\"{ nav: isNavShown() }\">\n @if (isNavShown()) {\n <a rtElem=\"nav\" qa-dataid=\"dynamic-selector-nav\" [routerLink]=\"navigateLink()\" [rtTooltip]=\"navigateTitle()\">\n {{ navigateTitle() }}\n </a>\n }\n\n <div rtElem=\"actions\">\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"dynamic-selector-cancel\"\n [label]=\"cancelLabel()\"\n [attr.aria-label]=\"cancelLabel()\"\n (click)=\"onCancel()\"></button>\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"dynamic-selector-apply\"\n [label]=\"applyText()\"\n [attr.aria-label]=\"applyText()\"\n [disabled]=\"isApplyDisabled()\"\n (click)=\"onApply()\"></button>\n </div>\n </div>\n\n <!-- \u041A\u0443\u0441\u043A\u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u0438 \u0441\u0442\u043E\u044F\u0442 \u0431\u0435\u0437 \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432 \u043C\u0435\u0436\u0434\u0443 \u0441\u043E\u0431\u043E\u0439: \u043F\u0440\u043E\u0431\u0435\u043B \u0432 \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0435 \u0440\u0430\u0437\u043E\u0440\u0432\u0430\u043B \u0431\u044B \u0441\u043B\u043E\u0432\u043E \u043D\u0430 \u043F\u043E\u0434\u0441\u0432\u0435\u0447\u0435\u043D\u043D\u043E\u0439 \u0433\u0440\u0430\u043D\u0438\u0446\u0435. -->\n <!-- prettier-ignore -->\n <ng-template #labelParts let-parts>@for (part of parts; track $index) {@if (part.matched) {<mark rtElem=\"match\">{{ part.text }}</mark>} @else {{{ part.text }}}}</ng-template>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-popup{--rt-dynamic-selector-popup-width-default: calc(var(--rt-size-40) * 2);--rt-dynamic-selector-popup-max-height-default: calc(var(--rt-size-100) + var(--rt-size-20));--rt-dynamic-selector-popup-radius-default: var(--rt-radius-md);--rt-dynamic-selector-popup-border-width-default: var(--rt-border-width-thin);--rt-dynamic-selector-popup-shadow-default: var(--rt-shadow-lg);--rt-dynamic-selector-popup-bg-default: var(--rt-color-bg-surface);--rt-dynamic-selector-popup-min-height-default: 0;--rt-dynamic-selector-popup-padding-default: var(--rt-space-md);--rt-dynamic-selector-popup-foot-border-width-default: var( --rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default) );--rt-dynamic-selector-popup-nav-color-default: var(--rt-color-text-link);--rt-dynamic-selector-popup-button-height-default: var(--rt-control-height-md);--rt-dynamic-selector-popup-button-font-size-default: .95rem;--rt-dynamic-selector-popup-empty-icon-size-default: var(--rt-size-8);--rt-dynamic-selector-popup-empty-icon-wrap-bg-default: var(--rt-color-bg-subtle);--rt-dynamic-selector-popup-empty-text-size-default: var(--rt-text-md);--rt-dynamic-selector-popup-empty-text-weight-default: var(--rt-font-weight-medium);--rt-dynamic-selector-popup-empty-text-color-default: var(--rt-color-text-primary);--rt-dynamic-selector-popup-highlight-color-default: var(--rt-color-text-primary);--rt-dynamic-selector-popup-highlight-weight-default: var(--rt-font-weight-semibold);--rt-dynamic-selector-popup-highlight-bg-default: transparent;--rt-dynamic-selector-popup-highlight-radius-default: 0;--rt-dynamic-selector-popup-option-line-height-default: normal;--rt-dynamic-selector-popup-option-min-height-default: 0;--rt-dynamic-selector-popup-empty-gap-default: calc(var(--rt-space-xs) + var(--rt-space-sm));--rt-dynamic-selector-popup-foot-padding-default: var(--rt-space-sm) var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default)) 0;display:flex;width:var(--rt-dynamic-selector-popup-width, var(--rt-dynamic-selector-popup-width-default));max-width:calc(100vw - var(--rt-space-md) * 2);min-height:var(--rt-dynamic-selector-popup-min-height, var(--rt-dynamic-selector-popup-min-height-default));max-height:var(--rt-dynamic-selector-popup-max-height, var(--rt-dynamic-selector-popup-max-height-default));box-sizing:border-box;flex-direction:column;border:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);border-radius:var(--rt-dynamic-selector-popup-radius, var(--rt-dynamic-selector-popup-radius-default));background:var(--rt-dynamic-selector-popup-bg, var(--rt-dynamic-selector-popup-bg-default));box-shadow:var(--rt-dynamic-selector-popup-shadow, var(--rt-dynamic-selector-popup-shadow-default));color:var(--rt-color-text-primary);gap:var(--rt-space-sm);padding-block:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__head{display:flex;flex-direction:column;gap:var(--rt-space-sm);padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__controls{display:flex;flex-direction:column;border-bottom:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);gap:var(--rt-space-sm);padding-block-end:var(--rt-space-sm)}.rt-dynamic-selector-popup__multi{display:flex;flex-wrap:wrap;align-items:center;gap:var(--rt-space-2xs) var(--rt-space-sm)}.rt-dynamic-selector-popup__multi-label{font-size:var(--rt-text-sm)}.rt-dynamic-selector-popup__multi-hint-icon{color:var(--rt-color-text-muted)}.rt-dynamic-selector-popup__multi-hint{display:none;flex-basis:100%;color:var(--rt-color-text-muted);font-size:var(--rt-text-xs)}@media(width<=1080px){.rt-dynamic-selector-popup__multi-hint{display:block}.rt-dynamic-selector-popup__multi .rt-dynamic-selector-popup__multi-hint-icon{display:none}}.rt-dynamic-selector-popup__select-all{min-width:0}.rt-dynamic-selector-popup__state{display:flex;flex:1 1 auto;align-items:center;justify-content:center;padding:var(--rt-space-md)}.rt-dynamic-selector-popup__list{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;overflow-y:auto;padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__sentinel{min-height:var(--rt-size-1)}.rt-dynamic-selector-popup__fetching{display:flex;justify-content:center;padding-block:var(--rt-space-sm)}.rt-dynamic-selector-popup__empty{flex:1 1 auto;padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__empty .rt-empty-state__icon-wrap{margin-bottom:calc(var(--rt-dynamic-selector-popup-empty-gap, var(--rt-dynamic-selector-popup-empty-gap-default)) - var(--rt-space-sm))}.rt-dynamic-selector-popup__empty.rt-empty-state{--rt-empty-state-icon-size: var( --rt-dynamic-selector-popup-empty-icon-size, var(--rt-dynamic-selector-popup-empty-icon-size-default) );--rt-empty-state-icon-wrap-bg: var( --rt-dynamic-selector-popup-empty-icon-wrap-bg, var(--rt-dynamic-selector-popup-empty-icon-wrap-bg-default) );--rt-empty-state-title-size: var( --rt-dynamic-selector-popup-empty-text-size, var(--rt-dynamic-selector-popup-empty-text-size-default) );--rt-empty-state-title-weight: var( --rt-dynamic-selector-popup-empty-text-weight, var(--rt-dynamic-selector-popup-empty-text-weight-default) );--rt-empty-state-title-color: var( --rt-dynamic-selector-popup-empty-text-color, var(--rt-dynamic-selector-popup-empty-text-color-default) )}.rt-dynamic-selector-popup__foot{display:flex;align-items:center;justify-content:flex-end;padding:var(--rt-dynamic-selector-popup-foot-padding, var(--rt-dynamic-selector-popup-foot-padding-default));border-top:var(--rt-dynamic-selector-popup-foot-border-width, var(--rt-dynamic-selector-popup-foot-border-width-default)) solid var(--rt-color-border-subtle);gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__foot--nav{justify-content:space-between}.rt-dynamic-selector-popup__nav{overflow:hidden;min-width:0;color:var(--rt-dynamic-selector-popup-nav-color, var(--rt-dynamic-selector-popup-nav-color-default));font-size:var(--rt-text-sm);text-overflow:ellipsis;white-space:nowrap}.rt-dynamic-selector-popup__nav:hover{color:var(--rt-color-text-link-hover)}.rt-dynamic-selector-popup__actions{display:flex;flex:0 0 auto;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__actions .rt-button{--rt-btn-height: var(--rt-dynamic-selector-popup-button-height, var(--rt-dynamic-selector-popup-button-height-default));--rt-btn-font-size: var( --rt-dynamic-selector-popup-button-font-size, var(--rt-dynamic-selector-popup-button-font-size-default) )}}\n", "@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-popup__row{display:flex;min-height:var(--rt-dynamic-selector-popup-option-min-height, var(--rt-dynamic-selector-popup-option-min-height-default));box-sizing:border-box;flex-direction:column;justify-content:center;padding-block:var(--rt-space-sm)}.rt-dynamic-selector-popup__row--separated{border-bottom:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);margin-block-end:var(--rt-space-2xs);padding-block-end:var(--rt-space-sm)}.rt-dynamic-selector-popup__option{display:block;overflow-wrap:anywhere}.rt-dynamic-selector-popup__option-label{overflow-wrap:anywhere}.rt-dynamic-selector-popup__option-label,.rt-dynamic-selector-popup__option .rt-checkbox__label,.rt-dynamic-selector-popup__option .rt-radio-button__label{line-height:var(--rt-dynamic-selector-popup-option-line-height, var(--rt-dynamic-selector-popup-option-line-height-default))}.rt-dynamic-selector-popup__row--nowrap{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option{min-width:0;max-width:100%}.rt-dynamic-selector-popup__row--own{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__option--fixed{flex:0 0 auto}.rt-dynamic-selector-popup__row--own .rt-dynamic-selector-popup__option-label{min-width:0;flex:1 1 auto;color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-text-sm);-webkit-user-select:none;user-select:none}.rt-dynamic-selector-popup__match{border-radius:var(--rt-dynamic-selector-popup-highlight-radius, var(--rt-dynamic-selector-popup-highlight-radius-default));background:var(--rt-dynamic-selector-popup-highlight-bg, var(--rt-dynamic-selector-popup-highlight-bg-default));color:var(--rt-dynamic-selector-popup-highlight-color, var(--rt-dynamic-selector-popup-highlight-color-default));font-weight:var(--rt-dynamic-selector-popup-highlight-weight, var(--rt-dynamic-selector-popup-highlight-weight-default))}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option .rt-checkbox{max-width:100%}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option .rt-checkbox__label{overflow:hidden;min-width:0}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option-label{display:block;overflow:hidden;min-width:0;flex:1 1 auto;font-size:var(--rt-text-sm);text-overflow:ellipsis;white-space:nowrap}}\n"] }]
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1396
|
+
var RtDynamicSelectorPopupComponent = class RtDynamicSelectorPopupComponent {
|
|
1397
|
+
constructor() {
|
|
1398
|
+
this.#destroyRef = inject(DestroyRef);
|
|
1399
|
+
this.#injector = inject(Injector);
|
|
1400
|
+
this.#searchSource = new Subject();
|
|
1401
|
+
this.searchLabel = rtKitLabel("dynamicSelectorSearch");
|
|
1402
|
+
this.searchField = viewChild("searchField", {
|
|
1403
|
+
...ngDevMode ? { debugName: "searchField" } : /* istanbul ignore next */ {},
|
|
1404
|
+
read: ElementRef
|
|
1405
|
+
});
|
|
1406
|
+
this.selectAllLabel = rtKitLabel("uiSelectAll");
|
|
1407
|
+
this.multiLabel = rtKitLabel("dynamicSelectorMulti");
|
|
1408
|
+
this.multiHintLabel = rtKitLabel("dynamicSelectorMultiHint");
|
|
1409
|
+
this.noResultsLabel = rtKitLabel("dynamicSelectorNoResults");
|
|
1410
|
+
this.emptyText = computed(() => this.emptyResultsText() || this.noResultsLabel(), ...ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []);
|
|
1411
|
+
this.cancelLabel = rtKitLabel("uiCancel");
|
|
1412
|
+
this.applyKitLabel = rtKitLabel("dynamicSelectorApply");
|
|
1413
|
+
this.applyText = computed(() => dynamicLabelCase(this.applyLabel() || this.applyKitLabel(), this.applyLabelCase()), ...ngDevMode ? [{ debugName: "applyText" }] : /* istanbul ignore next */ []);
|
|
1414
|
+
this.ticked = signal([], ...ngDevMode ? [{ debugName: "ticked" }] : /* istanbul ignore next */ []);
|
|
1415
|
+
this.raised = signal([], ...ngDevMode ? [{ debugName: "raised" }] : /* istanbul ignore next */ []);
|
|
1416
|
+
this.query = signal("", ...ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []);
|
|
1417
|
+
this.isMultiOn = signal(false, ...ngDevMode ? [{ debugName: "isMultiOn" }] : /* istanbul ignore next */ []);
|
|
1418
|
+
this.found = computed(() => {
|
|
1419
|
+
const query = this.query();
|
|
1420
|
+
if (!this.localSearch() || query.trim() === "") return [...this.entities()];
|
|
1421
|
+
return this.entities().filter((item) => {
|
|
1422
|
+
const label = dynamicSelectorLabel(item, (entity) => this.#labelOf(entity));
|
|
1423
|
+
return label !== null && dynamicSelectorMatches(label, query);
|
|
1424
|
+
});
|
|
1425
|
+
}, ...ngDevMode ? [{ debugName: "found" }] : /* istanbul ignore next */ []);
|
|
1426
|
+
this.rows = computed(() => dynamicPopupRows(this.entities(), this.found(), this.raised(), (item) => this.#keyOf(item), this.query()), ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
1427
|
+
this.visibleKeys = computed(() => [...this.rows().ticked, ...this.rows().found].map((item) => this.#keyOf(item)), ...ngDevMode ? [{ debugName: "visibleKeys" }] : /* istanbul ignore next */ []);
|
|
1428
|
+
this.rowItems = computed(() => {
|
|
1429
|
+
const ticked = this.ticked();
|
|
1430
|
+
const lastPinned = this.lastPinnedKey();
|
|
1431
|
+
const { ticked: above, found } = this.rows();
|
|
1432
|
+
const highlight = this.highlightSearch();
|
|
1433
|
+
const query = this.query();
|
|
1434
|
+
const labelOf = (item) => dynamicSelectorLabel(item, (entity) => this.#labelOf(entity)) ?? "";
|
|
1435
|
+
const toRow = (item, separated) => ({
|
|
1436
|
+
entity: item,
|
|
1437
|
+
key: this.#keyOf(item),
|
|
1438
|
+
label: labelOf(item),
|
|
1439
|
+
parts: highlight ? dynamicMatchParts(labelOf(item), query) : [{
|
|
1440
|
+
text: labelOf(item),
|
|
1441
|
+
matched: false
|
|
1442
|
+
}],
|
|
1443
|
+
ticked: ticked.includes(this.#keyOf(item)),
|
|
1444
|
+
separated
|
|
1445
|
+
});
|
|
1446
|
+
return [...above.map((item, index) => toRow(item, index === above.length - 1)), ...found.map((item) => toRow(item, lastPinned !== null && this.#keyOf(item) === lastPinned))];
|
|
1447
|
+
}, ...ngDevMode ? [{ debugName: "rowItems" }] : /* istanbul ignore next */ []);
|
|
1448
|
+
this.ownLabel = computed(() => !this.titleWrap() || this.highlightSearch(), ...ngDevMode ? [{ debugName: "ownLabel" }] : /* istanbul ignore next */ []);
|
|
1449
|
+
this.hasRows = computed(() => this.visibleKeys().length > 0, ...ngDevMode ? [{ debugName: "hasRows" }] : /* istanbul ignore next */ []);
|
|
1450
|
+
this.selectAllState = computed(() => dynamicSelectAllState(this.visibleKeys(), this.ticked()), ...ngDevMode ? [{ debugName: "selectAllState" }] : /* istanbul ignore next */ []);
|
|
1451
|
+
this.isSingle = computed(() => this.mode() === "single", ...ngDevMode ? [{ debugName: "isSingle" }] : /* istanbul ignore next */ []);
|
|
1452
|
+
this.isSelectAllShown = computed(() => !this.isSingle() && this.selectAllShown() && this.visibleKeys().length > 1 && !this.loading(), ...ngDevMode ? [{ debugName: "isSelectAllShown" }] : /* istanbul ignore next */ []);
|
|
1453
|
+
this.isMultiToggleVisible = computed(() => !this.isSingle() && this.multiToggleShown() && this.visibleKeys().length > 1 && !this.loading(), ...ngDevMode ? [{ debugName: "isMultiToggleVisible" }] : /* istanbul ignore next */ []);
|
|
1454
|
+
this.lastPinnedKey = computed(() => lastPinnedDynamicKey(this.rows().found, this.pinnedKeys(), (item) => this.#keyOf(item)), ...ngDevMode ? [{ debugName: "lastPinnedKey" }] : /* istanbul ignore next */ []);
|
|
1455
|
+
this.isApplyDisabled = computed(() => this.ticked().length === 0 || this.loading(), ...ngDevMode ? [{ debugName: "isApplyDisabled" }] : /* istanbul ignore next */ []);
|
|
1456
|
+
this.isNavShown = computed(() => !!this.navigateTitle() && !!this.navigateLink(), ...ngDevMode ? [{ debugName: "isNavShown" }] : /* istanbul ignore next */ []);
|
|
1457
|
+
this.entities = input([], ...ngDevMode ? [{ debugName: "entities" }] : /* istanbul ignore next */ []);
|
|
1458
|
+
this.keyExp = input.required(...ngDevMode ? [{ debugName: "keyExp" }] : /* istanbul ignore next */ []);
|
|
1459
|
+
this.displayExp = input.required(...ngDevMode ? [{ debugName: "displayExp" }] : /* istanbul ignore next */ []);
|
|
1460
|
+
this.displayWith = input(null, ...ngDevMode ? [{ debugName: "displayWith" }] : /* istanbul ignore next */ []);
|
|
1461
|
+
this.mode = input("multi", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
|
|
1462
|
+
this.multiToggleShown = input(false, {
|
|
1463
|
+
...ngDevMode ? { debugName: "multiToggleShown" } : /* istanbul ignore next */ {},
|
|
1464
|
+
transform: booleanAttribute
|
|
1465
|
+
});
|
|
1466
|
+
this.selectAllShown = input(true, {
|
|
1467
|
+
...ngDevMode ? { debugName: "selectAllShown" } : /* istanbul ignore next */ {},
|
|
1468
|
+
transform: booleanAttribute
|
|
1469
|
+
});
|
|
1470
|
+
this.localSearch = input(true, {
|
|
1471
|
+
...ngDevMode ? { debugName: "localSearch" } : /* istanbul ignore next */ {},
|
|
1472
|
+
transform: booleanAttribute
|
|
1473
|
+
});
|
|
1474
|
+
this.lazyLoad = input(false, {
|
|
1475
|
+
...ngDevMode ? { debugName: "lazyLoad" } : /* istanbul ignore next */ {},
|
|
1476
|
+
transform: booleanAttribute
|
|
1477
|
+
});
|
|
1478
|
+
this.loading = input(false, {
|
|
1479
|
+
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
1480
|
+
transform: booleanAttribute
|
|
1481
|
+
});
|
|
1482
|
+
this.fetching = input(false, {
|
|
1483
|
+
...ngDevMode ? { debugName: "fetching" } : /* istanbul ignore next */ {},
|
|
1484
|
+
transform: booleanAttribute
|
|
1485
|
+
});
|
|
1486
|
+
this.pinnedKeys = input([], ...ngDevMode ? [{ debugName: "pinnedKeys" }] : /* istanbul ignore next */ []);
|
|
1487
|
+
this.navigateTitle = input("", ...ngDevMode ? [{ debugName: "navigateTitle" }] : /* istanbul ignore next */ []);
|
|
1488
|
+
this.navigateLink = input("", ...ngDevMode ? [{ debugName: "navigateLink" }] : /* istanbul ignore next */ []);
|
|
1489
|
+
this.searchTerm = input("", ...ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []);
|
|
1490
|
+
this.searchAppearance = input("outline", ...ngDevMode ? [{ debugName: "searchAppearance" }] : /* istanbul ignore next */ []);
|
|
1491
|
+
this.searchRadius = input(null, ...ngDevMode ? [{ debugName: "searchRadius" }] : /* istanbul ignore next */ []);
|
|
1492
|
+
this.emptyResultsText = input("", ...ngDevMode ? [{ debugName: "emptyResultsText" }] : /* istanbul ignore next */ []);
|
|
1493
|
+
this.applyLabel = input("", ...ngDevMode ? [{ debugName: "applyLabel" }] : /* istanbul ignore next */ []);
|
|
1494
|
+
this.applyLabelCase = input("none", ...ngDevMode ? [{ debugName: "applyLabelCase" }] : /* istanbul ignore next */ []);
|
|
1495
|
+
this.autofocusSearch = input(false, {
|
|
1496
|
+
...ngDevMode ? { debugName: "autofocusSearch" } : /* istanbul ignore next */ {},
|
|
1497
|
+
transform: booleanAttribute
|
|
1498
|
+
});
|
|
1499
|
+
this.titleWrap = input(true, {
|
|
1500
|
+
...ngDevMode ? { debugName: "titleWrap" } : /* istanbul ignore next */ {},
|
|
1501
|
+
transform: booleanAttribute
|
|
1502
|
+
});
|
|
1503
|
+
this.highlightSearch = input(false, {
|
|
1504
|
+
...ngDevMode ? { debugName: "highlightSearch" } : /* istanbul ignore next */ {},
|
|
1505
|
+
transform: booleanAttribute
|
|
1506
|
+
});
|
|
1507
|
+
this.applied = output();
|
|
1508
|
+
this.cancelled = output();
|
|
1509
|
+
this.searchChange = output();
|
|
1510
|
+
this.loadMore = output();
|
|
1511
|
+
this.temporaryChoiceChange = output();
|
|
1512
|
+
}
|
|
1513
|
+
#destroyRef;
|
|
1514
|
+
#injector;
|
|
1515
|
+
#searchSource;
|
|
1516
|
+
ngOnInit() {
|
|
1517
|
+
this.query.set(this.searchTerm());
|
|
1518
|
+
this.temporaryChoiceChange.emit([]);
|
|
1519
|
+
this.#searchSource.pipe(debounceTime(500), takeUntilDestroyed(this.#destroyRef)).subscribe((query) => this.searchChange.emit(query));
|
|
1520
|
+
if (this.autofocusSearch()) afterNextRender(() => this.searchField()?.nativeElement.querySelector("input")?.focus({ preventScroll: true }), { injector: this.#injector });
|
|
1521
|
+
}
|
|
1522
|
+
onQueryChange(value) {
|
|
1523
|
+
const query = value ?? "";
|
|
1524
|
+
this.raised.set([...this.ticked()]);
|
|
1525
|
+
this.query.set(query);
|
|
1526
|
+
this.temporaryChoiceChange.emit(this.#tickedEntities());
|
|
1527
|
+
if (!this.localSearch()) this.#searchSource.next(query);
|
|
1528
|
+
}
|
|
1529
|
+
onRowClick(event, item) {
|
|
1530
|
+
const key = this.#keyOf(item);
|
|
1531
|
+
const checked = !this.ticked().includes(key);
|
|
1532
|
+
const addsToTicks = !this.multiToggleShown() || this.isMultiOn() || event.ctrlKey || event.metaKey;
|
|
1533
|
+
this.ticked.update((keys) => toggleDynamicKey(addsToTicks ? keys : [], key, checked));
|
|
1534
|
+
}
|
|
1535
|
+
onRadioChange(item) {
|
|
1536
|
+
this.ticked.set([this.#keyOf(item)]);
|
|
1537
|
+
}
|
|
1538
|
+
onSelectAll(checked) {
|
|
1539
|
+
this.ticked.update((keys) => selectAllDynamicKeys(this.visibleKeys(), keys, checked));
|
|
1540
|
+
}
|
|
1541
|
+
onMultiToggle(value) {
|
|
1542
|
+
this.isMultiOn.set(value);
|
|
1543
|
+
}
|
|
1544
|
+
onApply() {
|
|
1545
|
+
if (!this.isApplyDisabled()) this.applied.emit([...this.ticked()]);
|
|
1546
|
+
}
|
|
1547
|
+
onCancel() {
|
|
1548
|
+
this.cancelled.emit();
|
|
1549
|
+
}
|
|
1550
|
+
#tickedEntities() {
|
|
1551
|
+
return this.ticked().map((key) => this.entities().find((item) => this.#keyOf(item) === key)).filter((item) => item !== void 0);
|
|
1552
|
+
}
|
|
1553
|
+
#keyOf(item) {
|
|
1554
|
+
return item[this.keyExp()];
|
|
1555
|
+
}
|
|
1556
|
+
#labelOf(item) {
|
|
1557
|
+
const displayWith = this.displayWith();
|
|
1558
|
+
return displayWith === null ? item[this.displayExp()] : displayWith(item);
|
|
1559
|
+
}
|
|
1560
|
+
static {
|
|
1561
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1562
|
+
minVersion: "12.0.0",
|
|
1563
|
+
version: "22.2.2",
|
|
1564
|
+
ngImport: i0,
|
|
1565
|
+
type: RtDynamicSelectorPopupComponent,
|
|
1566
|
+
deps: [],
|
|
1567
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1568
|
+
});
|
|
1569
|
+
}
|
|
1570
|
+
static {
|
|
1571
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1572
|
+
minVersion: "17.0.0",
|
|
1573
|
+
version: "22.2.2",
|
|
1574
|
+
type: RtDynamicSelectorPopupComponent,
|
|
1575
|
+
isStandalone: true,
|
|
1576
|
+
selector: "rt-dynamic-selector-popup",
|
|
1577
|
+
inputs: {
|
|
1578
|
+
entities: {
|
|
1579
|
+
classPropertyName: "entities",
|
|
1580
|
+
publicName: "entities",
|
|
1581
|
+
isSignal: true,
|
|
1582
|
+
isRequired: false,
|
|
1583
|
+
transformFunction: null
|
|
1584
|
+
},
|
|
1585
|
+
keyExp: {
|
|
1586
|
+
classPropertyName: "keyExp",
|
|
1587
|
+
publicName: "keyExp",
|
|
1588
|
+
isSignal: true,
|
|
1589
|
+
isRequired: true,
|
|
1590
|
+
transformFunction: null
|
|
1591
|
+
},
|
|
1592
|
+
displayExp: {
|
|
1593
|
+
classPropertyName: "displayExp",
|
|
1594
|
+
publicName: "displayExp",
|
|
1595
|
+
isSignal: true,
|
|
1596
|
+
isRequired: true,
|
|
1597
|
+
transformFunction: null
|
|
1598
|
+
},
|
|
1599
|
+
displayWith: {
|
|
1600
|
+
classPropertyName: "displayWith",
|
|
1601
|
+
publicName: "displayWith",
|
|
1602
|
+
isSignal: true,
|
|
1603
|
+
isRequired: false,
|
|
1604
|
+
transformFunction: null
|
|
1605
|
+
},
|
|
1606
|
+
mode: {
|
|
1607
|
+
classPropertyName: "mode",
|
|
1608
|
+
publicName: "mode",
|
|
1609
|
+
isSignal: true,
|
|
1610
|
+
isRequired: false,
|
|
1611
|
+
transformFunction: null
|
|
1612
|
+
},
|
|
1613
|
+
multiToggleShown: {
|
|
1614
|
+
classPropertyName: "multiToggleShown",
|
|
1615
|
+
publicName: "multiToggleShown",
|
|
1616
|
+
isSignal: true,
|
|
1617
|
+
isRequired: false,
|
|
1618
|
+
transformFunction: null
|
|
1619
|
+
},
|
|
1620
|
+
selectAllShown: {
|
|
1621
|
+
classPropertyName: "selectAllShown",
|
|
1622
|
+
publicName: "selectAllShown",
|
|
1623
|
+
isSignal: true,
|
|
1624
|
+
isRequired: false,
|
|
1625
|
+
transformFunction: null
|
|
1626
|
+
},
|
|
1627
|
+
localSearch: {
|
|
1628
|
+
classPropertyName: "localSearch",
|
|
1629
|
+
publicName: "localSearch",
|
|
1630
|
+
isSignal: true,
|
|
1631
|
+
isRequired: false,
|
|
1632
|
+
transformFunction: null
|
|
1633
|
+
},
|
|
1634
|
+
lazyLoad: {
|
|
1635
|
+
classPropertyName: "lazyLoad",
|
|
1636
|
+
publicName: "lazyLoad",
|
|
1637
|
+
isSignal: true,
|
|
1638
|
+
isRequired: false,
|
|
1639
|
+
transformFunction: null
|
|
1640
|
+
},
|
|
1641
|
+
loading: {
|
|
1642
|
+
classPropertyName: "loading",
|
|
1643
|
+
publicName: "loading",
|
|
1644
|
+
isSignal: true,
|
|
1645
|
+
isRequired: false,
|
|
1646
|
+
transformFunction: null
|
|
1647
|
+
},
|
|
1648
|
+
fetching: {
|
|
1649
|
+
classPropertyName: "fetching",
|
|
1650
|
+
publicName: "fetching",
|
|
1651
|
+
isSignal: true,
|
|
1652
|
+
isRequired: false,
|
|
1653
|
+
transformFunction: null
|
|
1654
|
+
},
|
|
1655
|
+
pinnedKeys: {
|
|
1656
|
+
classPropertyName: "pinnedKeys",
|
|
1657
|
+
publicName: "pinnedKeys",
|
|
1658
|
+
isSignal: true,
|
|
1659
|
+
isRequired: false,
|
|
1660
|
+
transformFunction: null
|
|
1661
|
+
},
|
|
1662
|
+
navigateTitle: {
|
|
1663
|
+
classPropertyName: "navigateTitle",
|
|
1664
|
+
publicName: "navigateTitle",
|
|
1665
|
+
isSignal: true,
|
|
1666
|
+
isRequired: false,
|
|
1667
|
+
transformFunction: null
|
|
1668
|
+
},
|
|
1669
|
+
navigateLink: {
|
|
1670
|
+
classPropertyName: "navigateLink",
|
|
1671
|
+
publicName: "navigateLink",
|
|
1672
|
+
isSignal: true,
|
|
1673
|
+
isRequired: false,
|
|
1674
|
+
transformFunction: null
|
|
1675
|
+
},
|
|
1676
|
+
searchTerm: {
|
|
1677
|
+
classPropertyName: "searchTerm",
|
|
1678
|
+
publicName: "searchTerm",
|
|
1679
|
+
isSignal: true,
|
|
1680
|
+
isRequired: false,
|
|
1681
|
+
transformFunction: null
|
|
1682
|
+
},
|
|
1683
|
+
searchAppearance: {
|
|
1684
|
+
classPropertyName: "searchAppearance",
|
|
1685
|
+
publicName: "searchAppearance",
|
|
1686
|
+
isSignal: true,
|
|
1687
|
+
isRequired: false,
|
|
1688
|
+
transformFunction: null
|
|
1689
|
+
},
|
|
1690
|
+
searchRadius: {
|
|
1691
|
+
classPropertyName: "searchRadius",
|
|
1692
|
+
publicName: "searchRadius",
|
|
1693
|
+
isSignal: true,
|
|
1694
|
+
isRequired: false,
|
|
1695
|
+
transformFunction: null
|
|
1696
|
+
},
|
|
1697
|
+
emptyResultsText: {
|
|
1698
|
+
classPropertyName: "emptyResultsText",
|
|
1699
|
+
publicName: "emptyResultsText",
|
|
1700
|
+
isSignal: true,
|
|
1701
|
+
isRequired: false,
|
|
1702
|
+
transformFunction: null
|
|
1703
|
+
},
|
|
1704
|
+
applyLabel: {
|
|
1705
|
+
classPropertyName: "applyLabel",
|
|
1706
|
+
publicName: "applyLabel",
|
|
1707
|
+
isSignal: true,
|
|
1708
|
+
isRequired: false,
|
|
1709
|
+
transformFunction: null
|
|
1710
|
+
},
|
|
1711
|
+
applyLabelCase: {
|
|
1712
|
+
classPropertyName: "applyLabelCase",
|
|
1713
|
+
publicName: "applyLabelCase",
|
|
1714
|
+
isSignal: true,
|
|
1715
|
+
isRequired: false,
|
|
1716
|
+
transformFunction: null
|
|
1717
|
+
},
|
|
1718
|
+
autofocusSearch: {
|
|
1719
|
+
classPropertyName: "autofocusSearch",
|
|
1720
|
+
publicName: "autofocusSearch",
|
|
1721
|
+
isSignal: true,
|
|
1722
|
+
isRequired: false,
|
|
1723
|
+
transformFunction: null
|
|
1724
|
+
},
|
|
1725
|
+
titleWrap: {
|
|
1726
|
+
classPropertyName: "titleWrap",
|
|
1727
|
+
publicName: "titleWrap",
|
|
1728
|
+
isSignal: true,
|
|
1729
|
+
isRequired: false,
|
|
1730
|
+
transformFunction: null
|
|
1731
|
+
},
|
|
1732
|
+
highlightSearch: {
|
|
1733
|
+
classPropertyName: "highlightSearch",
|
|
1734
|
+
publicName: "highlightSearch",
|
|
1735
|
+
isSignal: true,
|
|
1736
|
+
isRequired: false,
|
|
1737
|
+
transformFunction: null
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
outputs: {
|
|
1741
|
+
applied: "applied",
|
|
1742
|
+
cancelled: "cancelled",
|
|
1743
|
+
searchChange: "searchChange",
|
|
1744
|
+
loadMore: "loadMore",
|
|
1745
|
+
temporaryChoiceChange: "temporaryChoiceChange"
|
|
1746
|
+
},
|
|
1747
|
+
host: { classAttribute: "rt-dynamic-selector-popup" },
|
|
1748
|
+
viewQueries: [{
|
|
1749
|
+
propertyName: "searchField",
|
|
1750
|
+
first: true,
|
|
1751
|
+
predicate: ["searchField"],
|
|
1752
|
+
descendants: true,
|
|
1753
|
+
read: ElementRef,
|
|
1754
|
+
isSignal: true
|
|
1755
|
+
}],
|
|
1756
|
+
ngImport: i0,
|
|
1757
|
+
template: "<ng-container rtBlock=\"rt-dynamic-selector-popup\">\n <div rtElem=\"head\">\n <rt-input\n #searchField\n rtElem=\"search\"\n qa-dataid=\"dynamic-selector-search\"\n iconLeft=\"search\"\n [appearance]=\"searchAppearance()\"\n [radius]=\"searchRadius()\"\n [placeholder]=\"searchLabel()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onQueryChange($event)\" />\n\n @if (isMultiToggleVisible() || isSelectAllShown()) {\n <div rtElem=\"controls\">\n @if (isMultiToggleVisible()) {\n <div rtElem=\"multi\">\n <rt-toggle-switch\n qa-dataid=\"dynamic-selector-multi\"\n [ariaLabel]=\"multiLabel()\"\n [ngModel]=\"isMultiOn()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onMultiToggle($event)\" />\n <span rtElem=\"multi-label\">{{ multiLabel() }}</span>\n <rt-icon rtElem=\"multi-hint-icon\" name=\"info-circle\" size=\"sm\" [rtTooltip]=\"multiHintLabel()\" />\n <span rtElem=\"multi-hint\">{{ multiHintLabel() }}</span>\n </div>\n }\n\n @if (isSelectAllShown()) {\n <rt-checkbox\n rtElem=\"select-all\"\n qa-dataid=\"dynamic-selector-select-all\"\n [indeterminate]=\"selectAllState() === 'some'\"\n [ngModel]=\"selectAllState() === 'all'\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onSelectAll($event)\">\n {{ selectAllLabel() }}\n </rt-checkbox>\n }\n </div>\n }\n </div>\n\n @if (loading()) {\n <div rtElem=\"state\" qa-dataid=\"dynamic-selector-loading\">\n <rt-spinner [diameter]=\"24\" />\n </div>\n } @else if (hasRows()) {\n <div rtElem=\"list\" qa-dataid=\"dynamic-selector-options\">\n @for (row of rowItems(); track row.key) {\n <div rtElem=\"row\" [rtMod]=\"{ separated: row.separated, nowrap: !titleWrap(), own: isSingle() && ownLabel() }\">\n @if (isSingle()) {\n <!-- Без переноса и при подсветке поиска подпись рисует окно рядом с кнопкой: подсказка\n меряет обрезку своего узла, а подпись внутри кнопки окну недоступна. -->\n <rt-radio-button\n rtElem=\"option\"\n qa-dataid=\"dynamic-selector-option\"\n [value]=\"row.key\"\n [checked]=\"row.ticked\"\n [label]=\"ownLabel() ? '' : row.label\"\n [ariaLabel]=\"ownLabel() ? row.label : null\"\n [rtMod]=\"{ fixed: ownLabel() }\"\n (checkedChange)=\"onRadioChange(row.entity)\" />\n @if (ownLabel()) {\n <!-- Фокус и клавиатура остаются на кнопке: она названа этой же подписью, а подпись даёт нажать мышью, как label. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <span\n rtElem=\"option-label\"\n qa-dataid=\"dynamic-selector-option-label\"\n rtTooltipWhenTruncated\n [rtTooltip]=\"titleWrap() ? '' : row.label\"\n (click)=\"onRadioChange(row.entity)\">\n <ng-container *ngTemplateOutlet=\"labelParts; context: { $implicit: row.parts }\" />\n </span>\n }\n } @else {\n <rt-checkbox\n rtElem=\"option\"\n qa-dataid=\"dynamic-selector-option\"\n [ngModel]=\"row.ticked\"\n [ngModelOptions]=\"{ standalone: true }\"\n (click)=\"onRowClick($event, row.entity)\">\n <span\n rtElem=\"option-label\"\n qa-dataid=\"dynamic-selector-option-label\"\n rtTooltipWhenTruncated\n [rtTooltip]=\"titleWrap() ? '' : row.label\">\n <ng-container *ngTemplateOutlet=\"labelParts; context: { $implicit: row.parts }\" />\n </span>\n </rt-checkbox>\n }\n </div>\n }\n\n <div rtElem=\"sentinel\" rtInfiniteScroll [disabled]=\"!lazyLoad() || fetching()\" (loadMore)=\"loadMore.emit()\"></div>\n\n @if (fetching()) {\n <div rtElem=\"fetching\" qa-dataid=\"dynamic-selector-fetching\">\n <rt-spinner [diameter]=\"20\" />\n </div>\n }\n </div>\n } @else {\n <rt-empty-state rtElem=\"empty\" qa-dataid=\"dynamic-selector-no-results\" icon=\"search\" [title]=\"emptyText()\" />\n }\n\n <div rtElem=\"foot\" [rtMod]=\"{ nav: isNavShown() }\">\n @if (isNavShown()) {\n <a rtElem=\"nav\" qa-dataid=\"dynamic-selector-nav\" [routerLink]=\"navigateLink()\" [rtTooltip]=\"navigateTitle()\">\n {{ navigateTitle() }}\n </a>\n }\n\n <div rtElem=\"actions\">\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"dynamic-selector-cancel\"\n [label]=\"cancelLabel()\"\n [attr.aria-label]=\"cancelLabel()\"\n (click)=\"onCancel()\"></button>\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"dynamic-selector-apply\"\n [label]=\"applyText()\"\n [attr.aria-label]=\"applyText()\"\n [disabled]=\"isApplyDisabled()\"\n (click)=\"onApply()\"></button>\n </div>\n </div>\n\n <!-- Куски подписи стоят без пробелов между собой: пробел в разметке разорвал бы слово на подсвеченной границе. -->\n <!-- prettier-ignore -->\n <ng-template #labelParts let-parts>@for (part of parts; track $index) {@if (part.matched) {<mark rtElem=\"match\">{{ part.text }}</mark>} @else {{{ part.text }}}}</ng-template>\n</ng-container>\n",
|
|
1758
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-popup{--rt-dynamic-selector-popup-width-default: calc(var(--rt-size-40) * 2);--rt-dynamic-selector-popup-max-height-default: calc(var(--rt-size-100) + var(--rt-size-20));--rt-dynamic-selector-popup-radius-default: var(--rt-radius-md);--rt-dynamic-selector-popup-border-width-default: var(--rt-border-width-thin);--rt-dynamic-selector-popup-shadow-default: var(--rt-shadow-lg);--rt-dynamic-selector-popup-bg-default: var(--rt-color-bg-surface);--rt-dynamic-selector-popup-min-height-default: 0;--rt-dynamic-selector-popup-padding-default: var(--rt-space-md);--rt-dynamic-selector-popup-foot-border-width-default: var( --rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default) );--rt-dynamic-selector-popup-nav-color-default: var(--rt-color-text-link);--rt-dynamic-selector-popup-button-height-default: var(--rt-control-height-md);--rt-dynamic-selector-popup-button-font-size-default: .95rem;--rt-dynamic-selector-popup-empty-icon-size-default: var(--rt-size-8);--rt-dynamic-selector-popup-empty-icon-wrap-bg-default: var(--rt-color-bg-subtle);--rt-dynamic-selector-popup-empty-text-size-default: var(--rt-text-md);--rt-dynamic-selector-popup-empty-text-weight-default: var(--rt-font-weight-medium);--rt-dynamic-selector-popup-empty-text-color-default: var(--rt-color-text-primary);--rt-dynamic-selector-popup-highlight-color-default: var(--rt-color-text-primary);--rt-dynamic-selector-popup-highlight-weight-default: var(--rt-font-weight-semibold);--rt-dynamic-selector-popup-highlight-bg-default: transparent;--rt-dynamic-selector-popup-highlight-radius-default: 0;--rt-dynamic-selector-popup-option-line-height-default: normal;--rt-dynamic-selector-popup-option-min-height-default: 0;--rt-dynamic-selector-popup-empty-gap-default: calc(var(--rt-space-xs) + var(--rt-space-sm));--rt-dynamic-selector-popup-foot-padding-default: var(--rt-space-sm) var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default)) 0;display:flex;width:var(--rt-dynamic-selector-popup-width, var(--rt-dynamic-selector-popup-width-default));max-width:calc(100vw - var(--rt-space-md) * 2);min-height:var(--rt-dynamic-selector-popup-min-height, var(--rt-dynamic-selector-popup-min-height-default));max-height:var(--rt-dynamic-selector-popup-max-height, var(--rt-dynamic-selector-popup-max-height-default));box-sizing:border-box;flex-direction:column;border:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);border-radius:var(--rt-dynamic-selector-popup-radius, var(--rt-dynamic-selector-popup-radius-default));background:var(--rt-dynamic-selector-popup-bg, var(--rt-dynamic-selector-popup-bg-default));box-shadow:var(--rt-dynamic-selector-popup-shadow, var(--rt-dynamic-selector-popup-shadow-default));color:var(--rt-color-text-primary);gap:var(--rt-space-sm);padding-block:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__head{display:flex;flex-direction:column;gap:var(--rt-space-sm);padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__controls{display:flex;flex-direction:column;border-bottom:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);gap:var(--rt-space-sm);padding-block-end:var(--rt-space-sm)}.rt-dynamic-selector-popup__multi{display:flex;flex-wrap:wrap;align-items:center;gap:var(--rt-space-2xs) var(--rt-space-sm)}.rt-dynamic-selector-popup__multi-label{font-size:var(--rt-text-sm)}.rt-dynamic-selector-popup__multi-hint-icon{color:var(--rt-color-text-muted)}.rt-dynamic-selector-popup__multi-hint{display:none;flex-basis:100%;color:var(--rt-color-text-muted);font-size:var(--rt-text-xs)}@media(width<=1080px){.rt-dynamic-selector-popup__multi-hint{display:block}.rt-dynamic-selector-popup__multi .rt-dynamic-selector-popup__multi-hint-icon{display:none}}.rt-dynamic-selector-popup__select-all{min-width:0}.rt-dynamic-selector-popup__state{display:flex;flex:1 1 auto;align-items:center;justify-content:center;padding:var(--rt-space-md)}.rt-dynamic-selector-popup__list{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;overflow-y:auto;padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__sentinel{min-height:var(--rt-size-1)}.rt-dynamic-selector-popup__fetching{display:flex;justify-content:center;padding-block:var(--rt-space-sm)}.rt-dynamic-selector-popup__empty{flex:1 1 auto;padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__empty .rt-empty-state__icon-wrap{margin-bottom:calc(var(--rt-dynamic-selector-popup-empty-gap, var(--rt-dynamic-selector-popup-empty-gap-default)) - var(--rt-space-sm))}.rt-dynamic-selector-popup__empty.rt-empty-state{--rt-empty-state-icon-size: var( --rt-dynamic-selector-popup-empty-icon-size, var(--rt-dynamic-selector-popup-empty-icon-size-default) );--rt-empty-state-icon-wrap-bg: var( --rt-dynamic-selector-popup-empty-icon-wrap-bg, var(--rt-dynamic-selector-popup-empty-icon-wrap-bg-default) );--rt-empty-state-title-size: var( --rt-dynamic-selector-popup-empty-text-size, var(--rt-dynamic-selector-popup-empty-text-size-default) );--rt-empty-state-title-weight: var( --rt-dynamic-selector-popup-empty-text-weight, var(--rt-dynamic-selector-popup-empty-text-weight-default) );--rt-empty-state-title-color: var( --rt-dynamic-selector-popup-empty-text-color, var(--rt-dynamic-selector-popup-empty-text-color-default) )}.rt-dynamic-selector-popup__foot{display:flex;align-items:center;justify-content:flex-end;padding:var(--rt-dynamic-selector-popup-foot-padding, var(--rt-dynamic-selector-popup-foot-padding-default));border-top:var(--rt-dynamic-selector-popup-foot-border-width, var(--rt-dynamic-selector-popup-foot-border-width-default)) solid var(--rt-color-border-subtle);gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__foot--nav{justify-content:space-between}.rt-dynamic-selector-popup__nav{overflow:hidden;min-width:0;color:var(--rt-dynamic-selector-popup-nav-color, var(--rt-dynamic-selector-popup-nav-color-default));font-size:var(--rt-text-sm);text-overflow:ellipsis;white-space:nowrap}.rt-dynamic-selector-popup__nav:hover{color:var(--rt-color-text-link-hover)}.rt-dynamic-selector-popup__actions{display:flex;flex:0 0 auto;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__actions .rt-button{--rt-btn-height: var(--rt-dynamic-selector-popup-button-height, var(--rt-dynamic-selector-popup-button-height-default));--rt-btn-font-size: var( --rt-dynamic-selector-popup-button-font-size, var(--rt-dynamic-selector-popup-button-font-size-default) )}}\n", "@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-popup__row{display:flex;min-height:var(--rt-dynamic-selector-popup-option-min-height, var(--rt-dynamic-selector-popup-option-min-height-default));box-sizing:border-box;flex-direction:column;justify-content:center;padding-block:var(--rt-space-sm)}.rt-dynamic-selector-popup__row--separated{border-bottom:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);margin-block-end:var(--rt-space-2xs);padding-block-end:var(--rt-space-sm)}.rt-dynamic-selector-popup__option{display:block;overflow-wrap:anywhere}.rt-dynamic-selector-popup__option-label{overflow-wrap:anywhere}.rt-dynamic-selector-popup__option-label,.rt-dynamic-selector-popup__option .rt-checkbox__label,.rt-dynamic-selector-popup__option .rt-radio-button__label{line-height:var(--rt-dynamic-selector-popup-option-line-height, var(--rt-dynamic-selector-popup-option-line-height-default))}.rt-dynamic-selector-popup__row--nowrap{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option{min-width:0;max-width:100%}.rt-dynamic-selector-popup__row--own{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__option--fixed{flex:0 0 auto}.rt-dynamic-selector-popup__row--own .rt-dynamic-selector-popup__option-label{min-width:0;flex:1 1 auto;color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-text-sm);-webkit-user-select:none;user-select:none}.rt-dynamic-selector-popup__match{border-radius:var(--rt-dynamic-selector-popup-highlight-radius, var(--rt-dynamic-selector-popup-highlight-radius-default));background:var(--rt-dynamic-selector-popup-highlight-bg, var(--rt-dynamic-selector-popup-highlight-bg-default));color:var(--rt-dynamic-selector-popup-highlight-color, var(--rt-dynamic-selector-popup-highlight-color-default));font-weight:var(--rt-dynamic-selector-popup-highlight-weight, var(--rt-dynamic-selector-popup-highlight-weight-default))}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option .rt-checkbox{max-width:100%}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option .rt-checkbox__label{overflow:hidden;min-width:0}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option-label{display:block;overflow:hidden;min-width:0;flex:1 1 auto;font-size:var(--rt-text-sm);text-overflow:ellipsis;white-space:nowrap}}\n"],
|
|
1759
|
+
dependencies: [
|
|
1760
|
+
{
|
|
1761
|
+
kind: "ngmodule",
|
|
1762
|
+
type: FormsModule
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
kind: "directive",
|
|
1766
|
+
type: i1.NgControlStatus,
|
|
1767
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
kind: "directive",
|
|
1771
|
+
type: i1.NgModel,
|
|
1772
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
1773
|
+
inputs: [
|
|
1774
|
+
"name",
|
|
1775
|
+
"disabled",
|
|
1776
|
+
"ngModel",
|
|
1777
|
+
"ngModelOptions"
|
|
1778
|
+
],
|
|
1779
|
+
outputs: ["ngModelChange"],
|
|
1780
|
+
exportAs: ["ngModel"]
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
kind: "directive",
|
|
1784
|
+
type: NgTemplateOutlet,
|
|
1785
|
+
selector: "[ngTemplateOutlet]",
|
|
1786
|
+
inputs: [
|
|
1787
|
+
"ngTemplateOutletContext",
|
|
1788
|
+
"ngTemplateOutlet",
|
|
1789
|
+
"ngTemplateOutletInjector"
|
|
1790
|
+
]
|
|
1791
|
+
},
|
|
1792
|
+
{
|
|
1793
|
+
kind: "directive",
|
|
1794
|
+
type: RouterLink,
|
|
1795
|
+
selector: "[routerLink]",
|
|
1796
|
+
inputs: [
|
|
1797
|
+
"target",
|
|
1798
|
+
"queryParams",
|
|
1799
|
+
"fragment",
|
|
1800
|
+
"queryParamsHandling",
|
|
1801
|
+
"state",
|
|
1802
|
+
"info",
|
|
1803
|
+
"relativeTo",
|
|
1804
|
+
"preserveFragment",
|
|
1805
|
+
"skipLocationChange",
|
|
1806
|
+
"replaceUrl",
|
|
1807
|
+
"browserUrl",
|
|
1808
|
+
"routerLink"
|
|
1809
|
+
]
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
kind: "directive",
|
|
1813
|
+
type: BlockDirective,
|
|
1814
|
+
selector: "[rtBlock]",
|
|
1815
|
+
inputs: ["rtMod"]
|
|
1816
|
+
},
|
|
1817
|
+
{
|
|
1818
|
+
kind: "directive",
|
|
1819
|
+
type: ElemDirective,
|
|
1820
|
+
selector: "[rtElem]",
|
|
1821
|
+
inputs: ["rtMod"]
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
kind: "directive",
|
|
1825
|
+
type: ModDirective,
|
|
1826
|
+
selector: "[rtMod]"
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
kind: "directive",
|
|
1830
|
+
type: RtButtonDirective,
|
|
1831
|
+
selector: "button[rtButton], a[rtButton]",
|
|
1832
|
+
inputs: [
|
|
1833
|
+
"label",
|
|
1834
|
+
"icon",
|
|
1835
|
+
"iconPos",
|
|
1836
|
+
"theme",
|
|
1837
|
+
"appearance",
|
|
1838
|
+
"size",
|
|
1839
|
+
"loading",
|
|
1840
|
+
"loadingIcon",
|
|
1841
|
+
"loadingLabel",
|
|
1842
|
+
"pressed"
|
|
1843
|
+
]
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
kind: "component",
|
|
1847
|
+
type: RtCheckboxComponent,
|
|
1848
|
+
selector: "rt-checkbox",
|
|
1849
|
+
inputs: [
|
|
1850
|
+
"inputId",
|
|
1851
|
+
"ariaLabel",
|
|
1852
|
+
"disabled",
|
|
1853
|
+
"indeterminate"
|
|
1854
|
+
]
|
|
1855
|
+
},
|
|
1856
|
+
{
|
|
1857
|
+
kind: "component",
|
|
1858
|
+
type: RtEmptyStateComponent,
|
|
1859
|
+
selector: "rt-empty-state",
|
|
1860
|
+
inputs: [
|
|
1861
|
+
"icon",
|
|
1862
|
+
"glyph",
|
|
1863
|
+
"title",
|
|
1864
|
+
"description",
|
|
1865
|
+
"framed"
|
|
1866
|
+
]
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
kind: "component",
|
|
1870
|
+
type: RtIconComponent,
|
|
1871
|
+
selector: "rt-icon",
|
|
1872
|
+
inputs: [
|
|
1873
|
+
"name",
|
|
1874
|
+
"glyph",
|
|
1875
|
+
"glyphStrategy",
|
|
1876
|
+
"size",
|
|
1877
|
+
"color",
|
|
1878
|
+
"fill",
|
|
1879
|
+
"spin",
|
|
1880
|
+
"rotate"
|
|
1881
|
+
]
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
kind: "directive",
|
|
1885
|
+
type: RtInfiniteScrollDirective,
|
|
1886
|
+
selector: "[rtInfiniteScroll]",
|
|
1887
|
+
inputs: ["disabled", "rootMargin"],
|
|
1888
|
+
outputs: ["loadMore"]
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
kind: "component",
|
|
1892
|
+
type: RtInputComponent,
|
|
1893
|
+
selector: "rt-input",
|
|
1894
|
+
inputs: [
|
|
1895
|
+
"appearance",
|
|
1896
|
+
"type",
|
|
1897
|
+
"placeholder",
|
|
1898
|
+
"iconLeft",
|
|
1899
|
+
"iconRight",
|
|
1900
|
+
"passwordToggle",
|
|
1901
|
+
"autocomplete"
|
|
1902
|
+
]
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
kind: "component",
|
|
1906
|
+
type: RtRadioButtonComponent,
|
|
1907
|
+
selector: "rt-radio-button",
|
|
1908
|
+
inputs: [
|
|
1909
|
+
"value",
|
|
1910
|
+
"checked",
|
|
1911
|
+
"disabled",
|
|
1912
|
+
"card",
|
|
1913
|
+
"label",
|
|
1914
|
+
"description",
|
|
1915
|
+
"ariaLabel"
|
|
1916
|
+
],
|
|
1917
|
+
outputs: ["clickAction", "checkedChange"]
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
kind: "component",
|
|
1921
|
+
type: RtSpinnerComponent,
|
|
1922
|
+
selector: "rt-spinner",
|
|
1923
|
+
inputs: [
|
|
1924
|
+
"diameter",
|
|
1925
|
+
"color",
|
|
1926
|
+
"appearance",
|
|
1927
|
+
"overlay",
|
|
1928
|
+
"backdrop",
|
|
1929
|
+
"plate"
|
|
1930
|
+
]
|
|
1931
|
+
},
|
|
1932
|
+
{
|
|
1933
|
+
kind: "component",
|
|
1934
|
+
type: RtToggleSwitchComponent,
|
|
1935
|
+
selector: "rt-toggle-switch",
|
|
1936
|
+
inputs: [
|
|
1937
|
+
"inputId",
|
|
1938
|
+
"ariaLabel",
|
|
1939
|
+
"label",
|
|
1940
|
+
"size",
|
|
1941
|
+
"iconOff",
|
|
1942
|
+
"iconOn",
|
|
1943
|
+
"disabled"
|
|
1944
|
+
]
|
|
1945
|
+
},
|
|
1946
|
+
{
|
|
1947
|
+
kind: "directive",
|
|
1948
|
+
type: RtTooltipDirective,
|
|
1949
|
+
selector: "[rtTooltip]",
|
|
1950
|
+
inputs: [
|
|
1951
|
+
"rtTooltip",
|
|
1952
|
+
"rtTooltipPlacement",
|
|
1953
|
+
"rtTooltipWhenTruncated",
|
|
1954
|
+
"rtTooltipHideOnClick"
|
|
1955
|
+
],
|
|
1956
|
+
exportAs: ["rtTooltip"]
|
|
1957
|
+
}
|
|
1958
|
+
],
|
|
1959
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1960
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1961
|
+
});
|
|
1962
|
+
}
|
|
1963
|
+
};
|
|
1964
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1965
|
+
minVersion: "12.0.0",
|
|
1966
|
+
version: "22.2.2",
|
|
1967
|
+
ngImport: i0,
|
|
1968
|
+
type: RtDynamicSelectorPopupComponent,
|
|
1969
|
+
decorators: [{
|
|
1970
|
+
type: Component,
|
|
1971
|
+
args: [{
|
|
1972
|
+
selector: "rt-dynamic-selector-popup",
|
|
1973
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1974
|
+
encapsulation: ViewEncapsulation.None,
|
|
1975
|
+
imports: [
|
|
1976
|
+
FormsModule,
|
|
1977
|
+
NgTemplateOutlet,
|
|
1978
|
+
RouterLink,
|
|
1979
|
+
BlockDirective,
|
|
1980
|
+
ElemDirective,
|
|
1981
|
+
ModDirective,
|
|
1982
|
+
RtButtonDirective,
|
|
1983
|
+
RtCheckboxComponent,
|
|
1984
|
+
RtEmptyStateComponent,
|
|
1985
|
+
RtIconComponent,
|
|
1986
|
+
RtInfiniteScrollDirective,
|
|
1987
|
+
RtInputComponent,
|
|
1988
|
+
RtRadioButtonComponent,
|
|
1989
|
+
RtSpinnerComponent,
|
|
1990
|
+
RtToggleSwitchComponent,
|
|
1991
|
+
RtTooltipDirective
|
|
1992
|
+
],
|
|
1993
|
+
host: { class: BEM_BLOCK$1 },
|
|
1994
|
+
template: "<ng-container rtBlock=\"rt-dynamic-selector-popup\">\n <div rtElem=\"head\">\n <rt-input\n #searchField\n rtElem=\"search\"\n qa-dataid=\"dynamic-selector-search\"\n iconLeft=\"search\"\n [appearance]=\"searchAppearance()\"\n [radius]=\"searchRadius()\"\n [placeholder]=\"searchLabel()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onQueryChange($event)\" />\n\n @if (isMultiToggleVisible() || isSelectAllShown()) {\n <div rtElem=\"controls\">\n @if (isMultiToggleVisible()) {\n <div rtElem=\"multi\">\n <rt-toggle-switch\n qa-dataid=\"dynamic-selector-multi\"\n [ariaLabel]=\"multiLabel()\"\n [ngModel]=\"isMultiOn()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onMultiToggle($event)\" />\n <span rtElem=\"multi-label\">{{ multiLabel() }}</span>\n <rt-icon rtElem=\"multi-hint-icon\" name=\"info-circle\" size=\"sm\" [rtTooltip]=\"multiHintLabel()\" />\n <span rtElem=\"multi-hint\">{{ multiHintLabel() }}</span>\n </div>\n }\n\n @if (isSelectAllShown()) {\n <rt-checkbox\n rtElem=\"select-all\"\n qa-dataid=\"dynamic-selector-select-all\"\n [indeterminate]=\"selectAllState() === 'some'\"\n [ngModel]=\"selectAllState() === 'all'\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onSelectAll($event)\">\n {{ selectAllLabel() }}\n </rt-checkbox>\n }\n </div>\n }\n </div>\n\n @if (loading()) {\n <div rtElem=\"state\" qa-dataid=\"dynamic-selector-loading\">\n <rt-spinner [diameter]=\"24\" />\n </div>\n } @else if (hasRows()) {\n <div rtElem=\"list\" qa-dataid=\"dynamic-selector-options\">\n @for (row of rowItems(); track row.key) {\n <div rtElem=\"row\" [rtMod]=\"{ separated: row.separated, nowrap: !titleWrap(), own: isSingle() && ownLabel() }\">\n @if (isSingle()) {\n <!-- Без переноса и при подсветке поиска подпись рисует окно рядом с кнопкой: подсказка\n меряет обрезку своего узла, а подпись внутри кнопки окну недоступна. -->\n <rt-radio-button\n rtElem=\"option\"\n qa-dataid=\"dynamic-selector-option\"\n [value]=\"row.key\"\n [checked]=\"row.ticked\"\n [label]=\"ownLabel() ? '' : row.label\"\n [ariaLabel]=\"ownLabel() ? row.label : null\"\n [rtMod]=\"{ fixed: ownLabel() }\"\n (checkedChange)=\"onRadioChange(row.entity)\" />\n @if (ownLabel()) {\n <!-- Фокус и клавиатура остаются на кнопке: она названа этой же подписью, а подпись даёт нажать мышью, как label. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <span\n rtElem=\"option-label\"\n qa-dataid=\"dynamic-selector-option-label\"\n rtTooltipWhenTruncated\n [rtTooltip]=\"titleWrap() ? '' : row.label\"\n (click)=\"onRadioChange(row.entity)\">\n <ng-container *ngTemplateOutlet=\"labelParts; context: { $implicit: row.parts }\" />\n </span>\n }\n } @else {\n <rt-checkbox\n rtElem=\"option\"\n qa-dataid=\"dynamic-selector-option\"\n [ngModel]=\"row.ticked\"\n [ngModelOptions]=\"{ standalone: true }\"\n (click)=\"onRowClick($event, row.entity)\">\n <span\n rtElem=\"option-label\"\n qa-dataid=\"dynamic-selector-option-label\"\n rtTooltipWhenTruncated\n [rtTooltip]=\"titleWrap() ? '' : row.label\">\n <ng-container *ngTemplateOutlet=\"labelParts; context: { $implicit: row.parts }\" />\n </span>\n </rt-checkbox>\n }\n </div>\n }\n\n <div rtElem=\"sentinel\" rtInfiniteScroll [disabled]=\"!lazyLoad() || fetching()\" (loadMore)=\"loadMore.emit()\"></div>\n\n @if (fetching()) {\n <div rtElem=\"fetching\" qa-dataid=\"dynamic-selector-fetching\">\n <rt-spinner [diameter]=\"20\" />\n </div>\n }\n </div>\n } @else {\n <rt-empty-state rtElem=\"empty\" qa-dataid=\"dynamic-selector-no-results\" icon=\"search\" [title]=\"emptyText()\" />\n }\n\n <div rtElem=\"foot\" [rtMod]=\"{ nav: isNavShown() }\">\n @if (isNavShown()) {\n <a rtElem=\"nav\" qa-dataid=\"dynamic-selector-nav\" [routerLink]=\"navigateLink()\" [rtTooltip]=\"navigateTitle()\">\n {{ navigateTitle() }}\n </a>\n }\n\n <div rtElem=\"actions\">\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"dynamic-selector-cancel\"\n [label]=\"cancelLabel()\"\n [attr.aria-label]=\"cancelLabel()\"\n (click)=\"onCancel()\"></button>\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"dynamic-selector-apply\"\n [label]=\"applyText()\"\n [attr.aria-label]=\"applyText()\"\n [disabled]=\"isApplyDisabled()\"\n (click)=\"onApply()\"></button>\n </div>\n </div>\n\n <!-- Куски подписи стоят без пробелов между собой: пробел в разметке разорвал бы слово на подсвеченной границе. -->\n <!-- prettier-ignore -->\n <ng-template #labelParts let-parts>@for (part of parts; track $index) {@if (part.matched) {<mark rtElem=\"match\">{{ part.text }}</mark>} @else {{{ part.text }}}}</ng-template>\n</ng-container>\n",
|
|
1995
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-popup{--rt-dynamic-selector-popup-width-default: calc(var(--rt-size-40) * 2);--rt-dynamic-selector-popup-max-height-default: calc(var(--rt-size-100) + var(--rt-size-20));--rt-dynamic-selector-popup-radius-default: var(--rt-radius-md);--rt-dynamic-selector-popup-border-width-default: var(--rt-border-width-thin);--rt-dynamic-selector-popup-shadow-default: var(--rt-shadow-lg);--rt-dynamic-selector-popup-bg-default: var(--rt-color-bg-surface);--rt-dynamic-selector-popup-min-height-default: 0;--rt-dynamic-selector-popup-padding-default: var(--rt-space-md);--rt-dynamic-selector-popup-foot-border-width-default: var( --rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default) );--rt-dynamic-selector-popup-nav-color-default: var(--rt-color-text-link);--rt-dynamic-selector-popup-button-height-default: var(--rt-control-height-md);--rt-dynamic-selector-popup-button-font-size-default: .95rem;--rt-dynamic-selector-popup-empty-icon-size-default: var(--rt-size-8);--rt-dynamic-selector-popup-empty-icon-wrap-bg-default: var(--rt-color-bg-subtle);--rt-dynamic-selector-popup-empty-text-size-default: var(--rt-text-md);--rt-dynamic-selector-popup-empty-text-weight-default: var(--rt-font-weight-medium);--rt-dynamic-selector-popup-empty-text-color-default: var(--rt-color-text-primary);--rt-dynamic-selector-popup-highlight-color-default: var(--rt-color-text-primary);--rt-dynamic-selector-popup-highlight-weight-default: var(--rt-font-weight-semibold);--rt-dynamic-selector-popup-highlight-bg-default: transparent;--rt-dynamic-selector-popup-highlight-radius-default: 0;--rt-dynamic-selector-popup-option-line-height-default: normal;--rt-dynamic-selector-popup-option-min-height-default: 0;--rt-dynamic-selector-popup-empty-gap-default: calc(var(--rt-space-xs) + var(--rt-space-sm));--rt-dynamic-selector-popup-foot-padding-default: var(--rt-space-sm) var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default)) 0;display:flex;width:var(--rt-dynamic-selector-popup-width, var(--rt-dynamic-selector-popup-width-default));max-width:calc(100vw - var(--rt-space-md) * 2);min-height:var(--rt-dynamic-selector-popup-min-height, var(--rt-dynamic-selector-popup-min-height-default));max-height:var(--rt-dynamic-selector-popup-max-height, var(--rt-dynamic-selector-popup-max-height-default));box-sizing:border-box;flex-direction:column;border:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);border-radius:var(--rt-dynamic-selector-popup-radius, var(--rt-dynamic-selector-popup-radius-default));background:var(--rt-dynamic-selector-popup-bg, var(--rt-dynamic-selector-popup-bg-default));box-shadow:var(--rt-dynamic-selector-popup-shadow, var(--rt-dynamic-selector-popup-shadow-default));color:var(--rt-color-text-primary);gap:var(--rt-space-sm);padding-block:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__head{display:flex;flex-direction:column;gap:var(--rt-space-sm);padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__controls{display:flex;flex-direction:column;border-bottom:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);gap:var(--rt-space-sm);padding-block-end:var(--rt-space-sm)}.rt-dynamic-selector-popup__multi{display:flex;flex-wrap:wrap;align-items:center;gap:var(--rt-space-2xs) var(--rt-space-sm)}.rt-dynamic-selector-popup__multi-label{font-size:var(--rt-text-sm)}.rt-dynamic-selector-popup__multi-hint-icon{color:var(--rt-color-text-muted)}.rt-dynamic-selector-popup__multi-hint{display:none;flex-basis:100%;color:var(--rt-color-text-muted);font-size:var(--rt-text-xs)}@media(width<=1080px){.rt-dynamic-selector-popup__multi-hint{display:block}.rt-dynamic-selector-popup__multi .rt-dynamic-selector-popup__multi-hint-icon{display:none}}.rt-dynamic-selector-popup__select-all{min-width:0}.rt-dynamic-selector-popup__state{display:flex;flex:1 1 auto;align-items:center;justify-content:center;padding:var(--rt-space-md)}.rt-dynamic-selector-popup__list{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;overflow-y:auto;padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__sentinel{min-height:var(--rt-size-1)}.rt-dynamic-selector-popup__fetching{display:flex;justify-content:center;padding-block:var(--rt-space-sm)}.rt-dynamic-selector-popup__empty{flex:1 1 auto;padding-inline:var(--rt-dynamic-selector-popup-padding, var(--rt-dynamic-selector-popup-padding-default))}.rt-dynamic-selector-popup__empty .rt-empty-state__icon-wrap{margin-bottom:calc(var(--rt-dynamic-selector-popup-empty-gap, var(--rt-dynamic-selector-popup-empty-gap-default)) - var(--rt-space-sm))}.rt-dynamic-selector-popup__empty.rt-empty-state{--rt-empty-state-icon-size: var( --rt-dynamic-selector-popup-empty-icon-size, var(--rt-dynamic-selector-popup-empty-icon-size-default) );--rt-empty-state-icon-wrap-bg: var( --rt-dynamic-selector-popup-empty-icon-wrap-bg, var(--rt-dynamic-selector-popup-empty-icon-wrap-bg-default) );--rt-empty-state-title-size: var( --rt-dynamic-selector-popup-empty-text-size, var(--rt-dynamic-selector-popup-empty-text-size-default) );--rt-empty-state-title-weight: var( --rt-dynamic-selector-popup-empty-text-weight, var(--rt-dynamic-selector-popup-empty-text-weight-default) );--rt-empty-state-title-color: var( --rt-dynamic-selector-popup-empty-text-color, var(--rt-dynamic-selector-popup-empty-text-color-default) )}.rt-dynamic-selector-popup__foot{display:flex;align-items:center;justify-content:flex-end;padding:var(--rt-dynamic-selector-popup-foot-padding, var(--rt-dynamic-selector-popup-foot-padding-default));border-top:var(--rt-dynamic-selector-popup-foot-border-width, var(--rt-dynamic-selector-popup-foot-border-width-default)) solid var(--rt-color-border-subtle);gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__foot--nav{justify-content:space-between}.rt-dynamic-selector-popup__nav{overflow:hidden;min-width:0;color:var(--rt-dynamic-selector-popup-nav-color, var(--rt-dynamic-selector-popup-nav-color-default));font-size:var(--rt-text-sm);text-overflow:ellipsis;white-space:nowrap}.rt-dynamic-selector-popup__nav:hover{color:var(--rt-color-text-link-hover)}.rt-dynamic-selector-popup__actions{display:flex;flex:0 0 auto;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__actions .rt-button{--rt-btn-height: var(--rt-dynamic-selector-popup-button-height, var(--rt-dynamic-selector-popup-button-height-default));--rt-btn-font-size: var( --rt-dynamic-selector-popup-button-font-size, var(--rt-dynamic-selector-popup-button-font-size-default) )}}\n", "@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector-popup__row{display:flex;min-height:var(--rt-dynamic-selector-popup-option-min-height, var(--rt-dynamic-selector-popup-option-min-height-default));box-sizing:border-box;flex-direction:column;justify-content:center;padding-block:var(--rt-space-sm)}.rt-dynamic-selector-popup__row--separated{border-bottom:var(--rt-dynamic-selector-popup-border-width, var(--rt-dynamic-selector-popup-border-width-default)) solid var(--rt-color-border-subtle);margin-block-end:var(--rt-space-2xs);padding-block-end:var(--rt-space-sm)}.rt-dynamic-selector-popup__option{display:block;overflow-wrap:anywhere}.rt-dynamic-selector-popup__option-label{overflow-wrap:anywhere}.rt-dynamic-selector-popup__option-label,.rt-dynamic-selector-popup__option .rt-checkbox__label,.rt-dynamic-selector-popup__option .rt-radio-button__label{line-height:var(--rt-dynamic-selector-popup-option-line-height, var(--rt-dynamic-selector-popup-option-line-height-default))}.rt-dynamic-selector-popup__row--nowrap{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option{min-width:0;max-width:100%}.rt-dynamic-selector-popup__row--own{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:var(--rt-space-sm)}.rt-dynamic-selector-popup__option--fixed{flex:0 0 auto}.rt-dynamic-selector-popup__row--own .rt-dynamic-selector-popup__option-label{min-width:0;flex:1 1 auto;color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-text-sm);-webkit-user-select:none;user-select:none}.rt-dynamic-selector-popup__match{border-radius:var(--rt-dynamic-selector-popup-highlight-radius, var(--rt-dynamic-selector-popup-highlight-radius-default));background:var(--rt-dynamic-selector-popup-highlight-bg, var(--rt-dynamic-selector-popup-highlight-bg-default));color:var(--rt-dynamic-selector-popup-highlight-color, var(--rt-dynamic-selector-popup-highlight-color-default));font-weight:var(--rt-dynamic-selector-popup-highlight-weight, var(--rt-dynamic-selector-popup-highlight-weight-default))}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option .rt-checkbox{max-width:100%}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option .rt-checkbox__label{overflow:hidden;min-width:0}.rt-dynamic-selector-popup__row--nowrap .rt-dynamic-selector-popup__option-label{display:block;overflow:hidden;min-width:0;flex:1 1 auto;font-size:var(--rt-text-sm);text-overflow:ellipsis;white-space:nowrap}}\n"]
|
|
1996
|
+
}]
|
|
1997
|
+
}],
|
|
1998
|
+
propDecorators: {
|
|
1999
|
+
searchField: [{
|
|
2000
|
+
type: i0.ViewChild,
|
|
2001
|
+
args: ["searchField", {
|
|
2002
|
+
read: ElementRef,
|
|
2003
|
+
isSignal: true
|
|
2004
|
+
}]
|
|
2005
|
+
}],
|
|
2006
|
+
entities: [{
|
|
2007
|
+
type: i0.Input,
|
|
2008
|
+
args: [{
|
|
2009
|
+
isSignal: true,
|
|
2010
|
+
alias: "entities",
|
|
2011
|
+
required: false
|
|
2012
|
+
}]
|
|
2013
|
+
}],
|
|
2014
|
+
keyExp: [{
|
|
2015
|
+
type: i0.Input,
|
|
2016
|
+
args: [{
|
|
2017
|
+
isSignal: true,
|
|
2018
|
+
alias: "keyExp",
|
|
2019
|
+
required: true
|
|
2020
|
+
}]
|
|
2021
|
+
}],
|
|
2022
|
+
displayExp: [{
|
|
2023
|
+
type: i0.Input,
|
|
2024
|
+
args: [{
|
|
2025
|
+
isSignal: true,
|
|
2026
|
+
alias: "displayExp",
|
|
2027
|
+
required: true
|
|
2028
|
+
}]
|
|
2029
|
+
}],
|
|
2030
|
+
displayWith: [{
|
|
2031
|
+
type: i0.Input,
|
|
2032
|
+
args: [{
|
|
2033
|
+
isSignal: true,
|
|
2034
|
+
alias: "displayWith",
|
|
2035
|
+
required: false
|
|
2036
|
+
}]
|
|
2037
|
+
}],
|
|
2038
|
+
mode: [{
|
|
2039
|
+
type: i0.Input,
|
|
2040
|
+
args: [{
|
|
2041
|
+
isSignal: true,
|
|
2042
|
+
alias: "mode",
|
|
2043
|
+
required: false
|
|
2044
|
+
}]
|
|
2045
|
+
}],
|
|
2046
|
+
multiToggleShown: [{
|
|
2047
|
+
type: i0.Input,
|
|
2048
|
+
args: [{
|
|
2049
|
+
isSignal: true,
|
|
2050
|
+
alias: "multiToggleShown",
|
|
2051
|
+
required: false
|
|
2052
|
+
}]
|
|
2053
|
+
}],
|
|
2054
|
+
selectAllShown: [{
|
|
2055
|
+
type: i0.Input,
|
|
2056
|
+
args: [{
|
|
2057
|
+
isSignal: true,
|
|
2058
|
+
alias: "selectAllShown",
|
|
2059
|
+
required: false
|
|
2060
|
+
}]
|
|
2061
|
+
}],
|
|
2062
|
+
localSearch: [{
|
|
2063
|
+
type: i0.Input,
|
|
2064
|
+
args: [{
|
|
2065
|
+
isSignal: true,
|
|
2066
|
+
alias: "localSearch",
|
|
2067
|
+
required: false
|
|
2068
|
+
}]
|
|
2069
|
+
}],
|
|
2070
|
+
lazyLoad: [{
|
|
2071
|
+
type: i0.Input,
|
|
2072
|
+
args: [{
|
|
2073
|
+
isSignal: true,
|
|
2074
|
+
alias: "lazyLoad",
|
|
2075
|
+
required: false
|
|
2076
|
+
}]
|
|
2077
|
+
}],
|
|
2078
|
+
loading: [{
|
|
2079
|
+
type: i0.Input,
|
|
2080
|
+
args: [{
|
|
2081
|
+
isSignal: true,
|
|
2082
|
+
alias: "loading",
|
|
2083
|
+
required: false
|
|
2084
|
+
}]
|
|
2085
|
+
}],
|
|
2086
|
+
fetching: [{
|
|
2087
|
+
type: i0.Input,
|
|
2088
|
+
args: [{
|
|
2089
|
+
isSignal: true,
|
|
2090
|
+
alias: "fetching",
|
|
2091
|
+
required: false
|
|
2092
|
+
}]
|
|
2093
|
+
}],
|
|
2094
|
+
pinnedKeys: [{
|
|
2095
|
+
type: i0.Input,
|
|
2096
|
+
args: [{
|
|
2097
|
+
isSignal: true,
|
|
2098
|
+
alias: "pinnedKeys",
|
|
2099
|
+
required: false
|
|
2100
|
+
}]
|
|
2101
|
+
}],
|
|
2102
|
+
navigateTitle: [{
|
|
2103
|
+
type: i0.Input,
|
|
2104
|
+
args: [{
|
|
2105
|
+
isSignal: true,
|
|
2106
|
+
alias: "navigateTitle",
|
|
2107
|
+
required: false
|
|
2108
|
+
}]
|
|
2109
|
+
}],
|
|
2110
|
+
navigateLink: [{
|
|
2111
|
+
type: i0.Input,
|
|
2112
|
+
args: [{
|
|
2113
|
+
isSignal: true,
|
|
2114
|
+
alias: "navigateLink",
|
|
2115
|
+
required: false
|
|
2116
|
+
}]
|
|
2117
|
+
}],
|
|
2118
|
+
searchTerm: [{
|
|
2119
|
+
type: i0.Input,
|
|
2120
|
+
args: [{
|
|
2121
|
+
isSignal: true,
|
|
2122
|
+
alias: "searchTerm",
|
|
2123
|
+
required: false
|
|
2124
|
+
}]
|
|
2125
|
+
}],
|
|
2126
|
+
searchAppearance: [{
|
|
2127
|
+
type: i0.Input,
|
|
2128
|
+
args: [{
|
|
2129
|
+
isSignal: true,
|
|
2130
|
+
alias: "searchAppearance",
|
|
2131
|
+
required: false
|
|
2132
|
+
}]
|
|
2133
|
+
}],
|
|
2134
|
+
searchRadius: [{
|
|
2135
|
+
type: i0.Input,
|
|
2136
|
+
args: [{
|
|
2137
|
+
isSignal: true,
|
|
2138
|
+
alias: "searchRadius",
|
|
2139
|
+
required: false
|
|
2140
|
+
}]
|
|
2141
|
+
}],
|
|
2142
|
+
emptyResultsText: [{
|
|
2143
|
+
type: i0.Input,
|
|
2144
|
+
args: [{
|
|
2145
|
+
isSignal: true,
|
|
2146
|
+
alias: "emptyResultsText",
|
|
2147
|
+
required: false
|
|
2148
|
+
}]
|
|
2149
|
+
}],
|
|
2150
|
+
applyLabel: [{
|
|
2151
|
+
type: i0.Input,
|
|
2152
|
+
args: [{
|
|
2153
|
+
isSignal: true,
|
|
2154
|
+
alias: "applyLabel",
|
|
2155
|
+
required: false
|
|
2156
|
+
}]
|
|
2157
|
+
}],
|
|
2158
|
+
applyLabelCase: [{
|
|
2159
|
+
type: i0.Input,
|
|
2160
|
+
args: [{
|
|
2161
|
+
isSignal: true,
|
|
2162
|
+
alias: "applyLabelCase",
|
|
2163
|
+
required: false
|
|
2164
|
+
}]
|
|
2165
|
+
}],
|
|
2166
|
+
autofocusSearch: [{
|
|
2167
|
+
type: i0.Input,
|
|
2168
|
+
args: [{
|
|
2169
|
+
isSignal: true,
|
|
2170
|
+
alias: "autofocusSearch",
|
|
2171
|
+
required: false
|
|
2172
|
+
}]
|
|
2173
|
+
}],
|
|
2174
|
+
titleWrap: [{
|
|
2175
|
+
type: i0.Input,
|
|
2176
|
+
args: [{
|
|
2177
|
+
isSignal: true,
|
|
2178
|
+
alias: "titleWrap",
|
|
2179
|
+
required: false
|
|
2180
|
+
}]
|
|
2181
|
+
}],
|
|
2182
|
+
highlightSearch: [{
|
|
2183
|
+
type: i0.Input,
|
|
2184
|
+
args: [{
|
|
2185
|
+
isSignal: true,
|
|
2186
|
+
alias: "highlightSearch",
|
|
2187
|
+
required: false
|
|
2188
|
+
}]
|
|
2189
|
+
}],
|
|
2190
|
+
applied: [{
|
|
2191
|
+
type: i0.Output,
|
|
2192
|
+
args: ["applied"]
|
|
2193
|
+
}],
|
|
2194
|
+
cancelled: [{
|
|
2195
|
+
type: i0.Output,
|
|
2196
|
+
args: ["cancelled"]
|
|
2197
|
+
}],
|
|
2198
|
+
searchChange: [{
|
|
2199
|
+
type: i0.Output,
|
|
2200
|
+
args: ["searchChange"]
|
|
2201
|
+
}],
|
|
2202
|
+
loadMore: [{
|
|
2203
|
+
type: i0.Output,
|
|
2204
|
+
args: ["loadMore"]
|
|
2205
|
+
}],
|
|
2206
|
+
temporaryChoiceChange: [{
|
|
2207
|
+
type: i0.Output,
|
|
2208
|
+
args: ["temporaryChoiceChange"]
|
|
2209
|
+
}]
|
|
2210
|
+
}
|
|
2211
|
+
});
|
|
2212
|
+
const BEM_BLOCK = "rt-dynamic-selector";
|
|
2213
|
+
var RtDynamicSelectorComponent = class RtDynamicSelectorComponent extends RtFormControlBase {
|
|
2214
|
+
#initial;
|
|
2215
|
+
#invitationButtonIconDefault;
|
|
2216
|
+
#invitationButtonAppearanceDefault;
|
|
2217
|
+
#clearIconDefault;
|
|
2218
|
+
#titleWrapDefault;
|
|
2219
|
+
#searchAppearanceDefault;
|
|
2220
|
+
#searchRadiusDefault;
|
|
2221
|
+
#highlightSearchDefault;
|
|
2222
|
+
#applyLabelDefault;
|
|
2223
|
+
#applyLabelCaseDefault;
|
|
2224
|
+
#autofocusSearchDefault;
|
|
2225
|
+
#emptyResultsTextDefault;
|
|
2226
|
+
constructor() {
|
|
2227
|
+
super();
|
|
2228
|
+
this.#initial = signal([], ...ngDevMode ? [{ debugName: "#initial" }] : /* istanbul ignore next */ []);
|
|
2229
|
+
this.#invitationButtonIconDefault = rtKitDefault("dynamicSelector", (it) => it.invitationButtonIcon, null);
|
|
2230
|
+
this.#invitationButtonAppearanceDefault = rtKitDefault("dynamicSelector", (it) => it.invitationButtonAppearance, "outlined");
|
|
2231
|
+
this.#clearIconDefault = rtKitDefault("dynamicSelector", (it) => it.clearIcon, "close");
|
|
2232
|
+
this.#titleWrapDefault = rtKitDefault("dynamicSelector", (it) => it.titleWrap, true);
|
|
2233
|
+
this.#searchAppearanceDefault = rtKitDefault("dynamicSelector", (it) => it.searchAppearance, "outline");
|
|
2234
|
+
this.#searchRadiusDefault = rtKitDefault("dynamicSelector", (it) => it.searchRadius, null);
|
|
2235
|
+
this.#highlightSearchDefault = rtKitDefault("dynamicSelector", (it) => it.highlightSearch, false);
|
|
2236
|
+
this.#applyLabelDefault = rtKitDefault("dynamicSelector", (it) => it.applyLabel, "");
|
|
2237
|
+
this.#applyLabelCaseDefault = rtKitDefault("dynamicSelector", (it) => it.applyLabelCase, "none");
|
|
2238
|
+
this.#autofocusSearchDefault = rtKitDefault("dynamicSelector", (it) => it.autofocusSearch, false);
|
|
2239
|
+
this.#emptyResultsTextDefault = rtKitDefault("dynamicSelector", (it) => it.emptyResultsText, "");
|
|
2240
|
+
this.addLabel = rtKitLabel("dynamicSelectorAdd");
|
|
2241
|
+
this.nothingToChooseLabel = rtKitLabel("dynamicSelectorNothingToChoose");
|
|
2242
|
+
this.popovers = viewChildren(RtPopoverDirective, ...ngDevMode ? [{ debugName: "popovers" }] : /* istanbul ignore next */ []);
|
|
2243
|
+
this.rowTitle = contentChild(RtDynamicSelectorRowTitleDirective, ...ngDevMode ? [{ debugName: "rowTitle" }] : /* istanbul ignore next */ []);
|
|
2244
|
+
this.rowControls = contentChild(RtDynamicSelectorRowControlsDirective, ...ngDevMode ? [{ debugName: "rowControls" }] : /* istanbul ignore next */ []);
|
|
2245
|
+
this.titleTpl = computed(() => this.rowTitle()?.templateRef ?? null, ...ngDevMode ? [{ debugName: "titleTpl" }] : /* istanbul ignore next */ []);
|
|
2246
|
+
this.controlsTpl = computed(() => this.rowControls()?.templateRef ?? null, ...ngDevMode ? [{ debugName: "controlsTpl" }] : /* istanbul ignore next */ []);
|
|
2247
|
+
this.chosen = computed(() => this.#entitiesOf(this.value()), ...ngDevMode ? [{ debugName: "chosen" }] : /* istanbul ignore next */ []);
|
|
2248
|
+
this.rows = computed(() => {
|
|
2249
|
+
const locked = this.readonlyKeys();
|
|
2250
|
+
return this.chosen().map((item) => ({
|
|
2251
|
+
item,
|
|
2252
|
+
key: this.#keyOf(item),
|
|
2253
|
+
label: dynamicSelectorLabel(item, (entity) => this.#labelOf(entity)) ?? "",
|
|
2254
|
+
locked: locked.includes(this.#keyOf(item))
|
|
2255
|
+
}));
|
|
2256
|
+
}, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
2257
|
+
this.offered = computed(() => selectableDynamicItems(this.entities(), this.value(), (item) => this.#keyOf(item), (item) => this.#labelOf(item), "", this.sortFn()), ...ngDevMode ? [{ debugName: "offered" }] : /* istanbul ignore next */ []);
|
|
2258
|
+
this.hasOffer = computed(() => this.offered().length > 0 || !this.localSearch(), ...ngDevMode ? [{ debugName: "hasOffer" }] : /* istanbul ignore next */ []);
|
|
2259
|
+
this.isNothingToChoose = computed(() => this.value().length === 0 && !this.hasOffer(), ...ngDevMode ? [{ debugName: "isNothingToChoose" }] : /* istanbul ignore next */ []);
|
|
2260
|
+
this.isAddShown = computed(() => this.addShown() && this.hasOffer(), ...ngDevMode ? [{ debugName: "isAddShown" }] : /* istanbul ignore next */ []);
|
|
2261
|
+
this.isKeysReset = computed(() => sameDynamicKeys(this.value(), this.#initial()), ...ngDevMode ? [{ debugName: "isKeysReset" }] : /* istanbul ignore next */ []);
|
|
2262
|
+
this.isKeysClear = computed(() => clearDynamicKeys(this.value(), this.readonlyKeys()).length === this.value().length, ...ngDevMode ? [{ debugName: "isKeysClear" }] : /* istanbul ignore next */ []);
|
|
2263
|
+
this.isResetDisabled = computed(() => !this.extraChanged() && this.isKeysReset(), ...ngDevMode ? [{ debugName: "isResetDisabled" }] : /* istanbul ignore next */ []);
|
|
2264
|
+
this.isClearDisabled = computed(() => !this.extraChanged() && this.isKeysClear(), ...ngDevMode ? [{ debugName: "isClearDisabled" }] : /* istanbul ignore next */ []);
|
|
2265
|
+
this.addTitle = computed(() => this.buttonTitle() || this.addLabel(), ...ngDevMode ? [{ debugName: "addTitle" }] : /* istanbul ignore next */ []);
|
|
2266
|
+
this.hasValue = computed(() => this.value().length > 0, ...ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []);
|
|
2267
|
+
this.entities = input([], ...ngDevMode ? [{ debugName: "entities" }] : /* istanbul ignore next */ []);
|
|
2268
|
+
this.keyExp = input.required(...ngDevMode ? [{ debugName: "keyExp" }] : /* istanbul ignore next */ []);
|
|
2269
|
+
this.displayExp = input.required(...ngDevMode ? [{ debugName: "displayExp" }] : /* istanbul ignore next */ []);
|
|
2270
|
+
this.displayWith = input(null, ...ngDevMode ? [{ debugName: "displayWith" }] : /* istanbul ignore next */ []);
|
|
2271
|
+
this.mode = input("multi", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
|
|
2272
|
+
this.buttonTitle = input("", ...ngDevMode ? [{ debugName: "buttonTitle" }] : /* istanbul ignore next */ []);
|
|
2273
|
+
this.addShown = input(true, {
|
|
2274
|
+
...ngDevMode ? { debugName: "addShown" } : /* istanbul ignore next */ {},
|
|
2275
|
+
transform: booleanAttribute
|
|
2276
|
+
});
|
|
2277
|
+
this.removeShown = input(true, {
|
|
2278
|
+
...ngDevMode ? { debugName: "removeShown" } : /* istanbul ignore next */ {},
|
|
2279
|
+
transform: booleanAttribute
|
|
2280
|
+
});
|
|
2281
|
+
this.listActionsShown = input(true, {
|
|
2282
|
+
...ngDevMode ? { debugName: "listActionsShown" } : /* istanbul ignore next */ {},
|
|
2283
|
+
transform: booleanAttribute
|
|
2284
|
+
});
|
|
2285
|
+
this.extraChanged = input(false, {
|
|
2286
|
+
...ngDevMode ? { debugName: "extraChanged" } : /* istanbul ignore next */ {},
|
|
2287
|
+
transform: booleanAttribute
|
|
2288
|
+
});
|
|
2289
|
+
this.searchTerm = input("", ...ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []);
|
|
2290
|
+
this.readonlyKeys = input([], ...ngDevMode ? [{ debugName: "readonlyKeys" }] : /* istanbul ignore next */ []);
|
|
2291
|
+
this.pinnedKeys = input([], ...ngDevMode ? [{ debugName: "pinnedKeys" }] : /* istanbul ignore next */ []);
|
|
2292
|
+
this.draggable = input(false, {
|
|
2293
|
+
...ngDevMode ? { debugName: "draggable" } : /* istanbul ignore next */ {},
|
|
2294
|
+
transform: booleanAttribute
|
|
2295
|
+
});
|
|
2296
|
+
this.buttonRadius = input("full", ...ngDevMode ? [{ debugName: "buttonRadius" }] : /* istanbul ignore next */ []);
|
|
2297
|
+
this.invitation = input(false, {
|
|
2298
|
+
...ngDevMode ? { debugName: "invitation" } : /* istanbul ignore next */ {},
|
|
2299
|
+
transform: booleanAttribute
|
|
2300
|
+
});
|
|
2301
|
+
this.invitationIcon = input(null, ...ngDevMode ? [{ debugName: "invitationIcon" }] : /* istanbul ignore next */ []);
|
|
2302
|
+
this.invitationGlyph = input(null, ...ngDevMode ? [{ debugName: "invitationGlyph" }] : /* istanbul ignore next */ []);
|
|
2303
|
+
this.invitationDescription = input("", ...ngDevMode ? [{ debugName: "invitationDescription" }] : /* istanbul ignore next */ []);
|
|
2304
|
+
this.invitationButtonIcon = input(this.#invitationButtonIconDefault, ...ngDevMode ? [{ debugName: "invitationButtonIcon" }] : /* istanbul ignore next */ []);
|
|
2305
|
+
this.invitationButtonAppearance = input(this.#invitationButtonAppearanceDefault, ...ngDevMode ? [{ debugName: "invitationButtonAppearance" }] : /* istanbul ignore next */ []);
|
|
2306
|
+
this.clearIcon = input(this.#clearIconDefault, ...ngDevMode ? [{ debugName: "clearIcon" }] : /* istanbul ignore next */ []);
|
|
2307
|
+
this.titleWrap = input(this.#titleWrapDefault, {
|
|
2308
|
+
...ngDevMode ? { debugName: "titleWrap" } : /* istanbul ignore next */ {},
|
|
2309
|
+
transform: booleanAttribute
|
|
2310
|
+
});
|
|
2311
|
+
this.searchAppearance = input(this.#searchAppearanceDefault, ...ngDevMode ? [{ debugName: "searchAppearance" }] : /* istanbul ignore next */ []);
|
|
2312
|
+
this.searchRadius = input(this.#searchRadiusDefault, ...ngDevMode ? [{ debugName: "searchRadius" }] : /* istanbul ignore next */ []);
|
|
2313
|
+
this.highlightSearch = input(this.#highlightSearchDefault, {
|
|
2314
|
+
...ngDevMode ? { debugName: "highlightSearch" } : /* istanbul ignore next */ {},
|
|
2315
|
+
transform: booleanAttribute
|
|
2316
|
+
});
|
|
2317
|
+
this.emptyResultsText = input(this.#emptyResultsTextDefault, ...ngDevMode ? [{ debugName: "emptyResultsText" }] : /* istanbul ignore next */ []);
|
|
2318
|
+
this.applyLabel = input(this.#applyLabelDefault, ...ngDevMode ? [{ debugName: "applyLabel" }] : /* istanbul ignore next */ []);
|
|
2319
|
+
this.applyLabelCase = input(this.#applyLabelCaseDefault, ...ngDevMode ? [{ debugName: "applyLabelCase" }] : /* istanbul ignore next */ []);
|
|
2320
|
+
this.autofocusSearch = input(this.#autofocusSearchDefault, {
|
|
2321
|
+
...ngDevMode ? { debugName: "autofocusSearch" } : /* istanbul ignore next */ {},
|
|
2322
|
+
transform: booleanAttribute
|
|
2323
|
+
});
|
|
2324
|
+
this.multiToggleShown = input(false, {
|
|
2325
|
+
...ngDevMode ? { debugName: "multiToggleShown" } : /* istanbul ignore next */ {},
|
|
2326
|
+
transform: booleanAttribute
|
|
2327
|
+
});
|
|
2328
|
+
this.selectAllShown = input(true, {
|
|
2329
|
+
...ngDevMode ? { debugName: "selectAllShown" } : /* istanbul ignore next */ {},
|
|
2330
|
+
transform: booleanAttribute
|
|
2331
|
+
});
|
|
2332
|
+
this.localSearch = input(true, {
|
|
2333
|
+
...ngDevMode ? { debugName: "localSearch" } : /* istanbul ignore next */ {},
|
|
2334
|
+
transform: booleanAttribute
|
|
2335
|
+
});
|
|
2336
|
+
this.lazyLoad = input(false, {
|
|
2337
|
+
...ngDevMode ? { debugName: "lazyLoad" } : /* istanbul ignore next */ {},
|
|
2338
|
+
transform: booleanAttribute
|
|
2339
|
+
});
|
|
2340
|
+
this.loading = input(false, {
|
|
2341
|
+
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
2342
|
+
transform: booleanAttribute
|
|
2343
|
+
});
|
|
2344
|
+
this.fetching = input(false, {
|
|
2345
|
+
...ngDevMode ? { debugName: "fetching" } : /* istanbul ignore next */ {},
|
|
2346
|
+
transform: booleanAttribute
|
|
2347
|
+
});
|
|
2348
|
+
this.navigateTitle = input("", ...ngDevMode ? [{ debugName: "navigateTitle" }] : /* istanbul ignore next */ []);
|
|
2349
|
+
this.navigateLink = input("", ...ngDevMode ? [{ debugName: "navigateLink" }] : /* istanbul ignore next */ []);
|
|
2350
|
+
this.sortFn = input(null, ...ngDevMode ? [{ debugName: "sortFn" }] : /* istanbul ignore next */ []);
|
|
2351
|
+
this.chosenEntities = model([], ...ngDevMode ? [{ debugName: "chosenEntities" }] : /* istanbul ignore next */ []);
|
|
2352
|
+
this.selectionChange = output();
|
|
2353
|
+
this.listReset = output();
|
|
2354
|
+
this.listCleared = output();
|
|
2355
|
+
this.popupOpenChange = output();
|
|
2356
|
+
this.searchChange = output();
|
|
2357
|
+
this.loadMore = output();
|
|
2358
|
+
this.temporaryChoiceChange = output();
|
|
2359
|
+
this.popupOpen = computed(() => this.popovers().some((popover) => popover.isOpen()), ...ngDevMode ? [{ debugName: "popupOpen" }] : /* istanbul ignore next */ []);
|
|
2360
|
+
this.displayText = computed(() => this.rows().map((row) => row.label).join(", "), ...ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []);
|
|
2361
|
+
toObservable(this.chosenEntities).pipe(takeUntilDestroyed()).subscribe((list) => this.#takeChosen(list));
|
|
2362
|
+
}
|
|
2363
|
+
writeValue(value) {
|
|
2364
|
+
super.writeValue(value === null ? null : [...value]);
|
|
2365
|
+
this.#initial.set([...this.value()]);
|
|
2366
|
+
}
|
|
2367
|
+
onAdd(popover) {
|
|
2368
|
+
if (!this.isDisabled()) popover.open();
|
|
2369
|
+
}
|
|
2370
|
+
onApplied(keys) {
|
|
2371
|
+
this.#closePopup();
|
|
2372
|
+
this.#change(this.mode() === "single" ? keys.slice(0, 1) : [...this.value(), ...keys.filter((key) => !this.value().includes(key))]);
|
|
2373
|
+
}
|
|
2374
|
+
onCancelled() {
|
|
2375
|
+
this.#closePopup();
|
|
2376
|
+
}
|
|
2377
|
+
onRemoved(key) {
|
|
2378
|
+
if (!this.isDisabled() && !this.readonlyKeys().includes(key)) this.#change(this.value().filter((item) => item !== key));
|
|
2379
|
+
}
|
|
2380
|
+
onMoved(move) {
|
|
2381
|
+
if (!this.isDisabled()) this.#change(moveDynamicKey(this.value(), move.from, move.to));
|
|
2382
|
+
}
|
|
2383
|
+
onReset() {
|
|
2384
|
+
if (this.isDisabled() || this.isResetDisabled()) return;
|
|
2385
|
+
if (!this.isKeysReset()) this.#change([...this.#initial()]);
|
|
2386
|
+
this.listReset.emit();
|
|
2387
|
+
}
|
|
2388
|
+
onCleared() {
|
|
2389
|
+
if (this.isDisabled() || this.isClearDisabled()) return;
|
|
2390
|
+
if (!this.isKeysClear()) this.#change(clearDynamicKeys(this.value(), this.readonlyKeys()));
|
|
2391
|
+
this.listCleared.emit();
|
|
2392
|
+
}
|
|
2393
|
+
onOpened() {
|
|
2394
|
+
this.popupOpenChange.emit(true);
|
|
2395
|
+
}
|
|
2396
|
+
onClosed() {
|
|
2397
|
+
this.markTouched();
|
|
2398
|
+
this.popupOpenChange.emit(false);
|
|
2399
|
+
}
|
|
2400
|
+
#closePopup() {
|
|
2401
|
+
for (const popover of this.popovers()) popover.close();
|
|
2402
|
+
}
|
|
2403
|
+
getEmptyValue() {
|
|
2404
|
+
return [];
|
|
2405
|
+
}
|
|
2406
|
+
focusAfterClear() {}
|
|
2407
|
+
#change(keys) {
|
|
2408
|
+
const entities = this.#entitiesOf(keys);
|
|
2409
|
+
this.value.set(keys);
|
|
2410
|
+
this.emitChange(keys);
|
|
2411
|
+
this.chosenEntities.set(entities);
|
|
2412
|
+
this.selectionChange.emit(entities);
|
|
2413
|
+
}
|
|
2414
|
+
#takeChosen(list) {
|
|
2415
|
+
const keys = list.map((item) => this.#keyOf(item));
|
|
2416
|
+
const shown = this.#entitiesOf(this.value()).map((item) => this.#keyOf(item));
|
|
2417
|
+
if (keys.length === 0 || sameDynamicKeySet(keys, shown)) return;
|
|
2418
|
+
this.value.set(keys);
|
|
2419
|
+
this.#initial.set([...keys]);
|
|
2420
|
+
}
|
|
2421
|
+
#entitiesOf(keys) {
|
|
2422
|
+
const known = [...this.entities(), ...this.chosenEntities()];
|
|
2423
|
+
return keys.map((key) => known.find((item) => this.#keyOf(item) === key)).filter((item) => item !== void 0);
|
|
2424
|
+
}
|
|
2425
|
+
#keyOf(item) {
|
|
2426
|
+
return item[this.keyExp()];
|
|
2427
|
+
}
|
|
2428
|
+
#labelOf(item) {
|
|
2429
|
+
const displayWith = this.displayWith();
|
|
2430
|
+
return displayWith === null ? item[this.displayExp()] : displayWith(item);
|
|
2431
|
+
}
|
|
2432
|
+
static {
|
|
2433
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2434
|
+
minVersion: "12.0.0",
|
|
2435
|
+
version: "22.2.2",
|
|
2436
|
+
ngImport: i0,
|
|
2437
|
+
type: RtDynamicSelectorComponent,
|
|
2438
|
+
deps: [],
|
|
2439
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2440
|
+
});
|
|
2441
|
+
}
|
|
2442
|
+
static {
|
|
2443
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2444
|
+
minVersion: "17.0.0",
|
|
2445
|
+
version: "22.2.2",
|
|
2446
|
+
type: RtDynamicSelectorComponent,
|
|
2447
|
+
isStandalone: true,
|
|
2448
|
+
selector: "rt-dynamic-selector",
|
|
2449
|
+
inputs: {
|
|
2450
|
+
entities: {
|
|
2451
|
+
classPropertyName: "entities",
|
|
2452
|
+
publicName: "entities",
|
|
2453
|
+
isSignal: true,
|
|
2454
|
+
isRequired: false,
|
|
2455
|
+
transformFunction: null
|
|
2456
|
+
},
|
|
2457
|
+
keyExp: {
|
|
2458
|
+
classPropertyName: "keyExp",
|
|
2459
|
+
publicName: "keyExp",
|
|
2460
|
+
isSignal: true,
|
|
2461
|
+
isRequired: true,
|
|
2462
|
+
transformFunction: null
|
|
2463
|
+
},
|
|
2464
|
+
displayExp: {
|
|
2465
|
+
classPropertyName: "displayExp",
|
|
2466
|
+
publicName: "displayExp",
|
|
2467
|
+
isSignal: true,
|
|
2468
|
+
isRequired: true,
|
|
2469
|
+
transformFunction: null
|
|
2470
|
+
},
|
|
2471
|
+
displayWith: {
|
|
2472
|
+
classPropertyName: "displayWith",
|
|
2473
|
+
publicName: "displayWith",
|
|
2474
|
+
isSignal: true,
|
|
2475
|
+
isRequired: false,
|
|
2476
|
+
transformFunction: null
|
|
2477
|
+
},
|
|
2478
|
+
mode: {
|
|
2479
|
+
classPropertyName: "mode",
|
|
2480
|
+
publicName: "mode",
|
|
2481
|
+
isSignal: true,
|
|
2482
|
+
isRequired: false,
|
|
2483
|
+
transformFunction: null
|
|
2484
|
+
},
|
|
2485
|
+
buttonTitle: {
|
|
2486
|
+
classPropertyName: "buttonTitle",
|
|
2487
|
+
publicName: "buttonTitle",
|
|
2488
|
+
isSignal: true,
|
|
2489
|
+
isRequired: false,
|
|
2490
|
+
transformFunction: null
|
|
2491
|
+
},
|
|
2492
|
+
addShown: {
|
|
2493
|
+
classPropertyName: "addShown",
|
|
2494
|
+
publicName: "addShown",
|
|
2495
|
+
isSignal: true,
|
|
2496
|
+
isRequired: false,
|
|
2497
|
+
transformFunction: null
|
|
2498
|
+
},
|
|
2499
|
+
removeShown: {
|
|
2500
|
+
classPropertyName: "removeShown",
|
|
2501
|
+
publicName: "removeShown",
|
|
2502
|
+
isSignal: true,
|
|
2503
|
+
isRequired: false,
|
|
2504
|
+
transformFunction: null
|
|
2505
|
+
},
|
|
2506
|
+
listActionsShown: {
|
|
2507
|
+
classPropertyName: "listActionsShown",
|
|
2508
|
+
publicName: "listActionsShown",
|
|
2509
|
+
isSignal: true,
|
|
2510
|
+
isRequired: false,
|
|
2511
|
+
transformFunction: null
|
|
2512
|
+
},
|
|
2513
|
+
extraChanged: {
|
|
2514
|
+
classPropertyName: "extraChanged",
|
|
2515
|
+
publicName: "extraChanged",
|
|
2516
|
+
isSignal: true,
|
|
2517
|
+
isRequired: false,
|
|
2518
|
+
transformFunction: null
|
|
2519
|
+
},
|
|
2520
|
+
searchTerm: {
|
|
2521
|
+
classPropertyName: "searchTerm",
|
|
2522
|
+
publicName: "searchTerm",
|
|
2523
|
+
isSignal: true,
|
|
2524
|
+
isRequired: false,
|
|
2525
|
+
transformFunction: null
|
|
2526
|
+
},
|
|
2527
|
+
readonlyKeys: {
|
|
2528
|
+
classPropertyName: "readonlyKeys",
|
|
2529
|
+
publicName: "readonlyKeys",
|
|
2530
|
+
isSignal: true,
|
|
2531
|
+
isRequired: false,
|
|
2532
|
+
transformFunction: null
|
|
2533
|
+
},
|
|
2534
|
+
pinnedKeys: {
|
|
2535
|
+
classPropertyName: "pinnedKeys",
|
|
2536
|
+
publicName: "pinnedKeys",
|
|
2537
|
+
isSignal: true,
|
|
2538
|
+
isRequired: false,
|
|
2539
|
+
transformFunction: null
|
|
2540
|
+
},
|
|
2541
|
+
draggable: {
|
|
2542
|
+
classPropertyName: "draggable",
|
|
2543
|
+
publicName: "draggable",
|
|
2544
|
+
isSignal: true,
|
|
2545
|
+
isRequired: false,
|
|
2546
|
+
transformFunction: null
|
|
2547
|
+
},
|
|
2548
|
+
buttonRadius: {
|
|
2549
|
+
classPropertyName: "buttonRadius",
|
|
2550
|
+
publicName: "buttonRadius",
|
|
2551
|
+
isSignal: true,
|
|
2552
|
+
isRequired: false,
|
|
2553
|
+
transformFunction: null
|
|
2554
|
+
},
|
|
2555
|
+
invitation: {
|
|
2556
|
+
classPropertyName: "invitation",
|
|
2557
|
+
publicName: "invitation",
|
|
2558
|
+
isSignal: true,
|
|
2559
|
+
isRequired: false,
|
|
2560
|
+
transformFunction: null
|
|
2561
|
+
},
|
|
2562
|
+
invitationIcon: {
|
|
2563
|
+
classPropertyName: "invitationIcon",
|
|
2564
|
+
publicName: "invitationIcon",
|
|
2565
|
+
isSignal: true,
|
|
2566
|
+
isRequired: false,
|
|
2567
|
+
transformFunction: null
|
|
2568
|
+
},
|
|
2569
|
+
invitationGlyph: {
|
|
2570
|
+
classPropertyName: "invitationGlyph",
|
|
2571
|
+
publicName: "invitationGlyph",
|
|
2572
|
+
isSignal: true,
|
|
2573
|
+
isRequired: false,
|
|
2574
|
+
transformFunction: null
|
|
2575
|
+
},
|
|
2576
|
+
invitationDescription: {
|
|
2577
|
+
classPropertyName: "invitationDescription",
|
|
2578
|
+
publicName: "invitationDescription",
|
|
2579
|
+
isSignal: true,
|
|
2580
|
+
isRequired: false,
|
|
2581
|
+
transformFunction: null
|
|
2582
|
+
},
|
|
2583
|
+
invitationButtonIcon: {
|
|
2584
|
+
classPropertyName: "invitationButtonIcon",
|
|
2585
|
+
publicName: "invitationButtonIcon",
|
|
2586
|
+
isSignal: true,
|
|
2587
|
+
isRequired: false,
|
|
2588
|
+
transformFunction: null
|
|
2589
|
+
},
|
|
2590
|
+
invitationButtonAppearance: {
|
|
2591
|
+
classPropertyName: "invitationButtonAppearance",
|
|
2592
|
+
publicName: "invitationButtonAppearance",
|
|
2593
|
+
isSignal: true,
|
|
2594
|
+
isRequired: false,
|
|
2595
|
+
transformFunction: null
|
|
2596
|
+
},
|
|
2597
|
+
clearIcon: {
|
|
2598
|
+
classPropertyName: "clearIcon",
|
|
2599
|
+
publicName: "clearIcon",
|
|
2600
|
+
isSignal: true,
|
|
2601
|
+
isRequired: false,
|
|
2602
|
+
transformFunction: null
|
|
2603
|
+
},
|
|
2604
|
+
titleWrap: {
|
|
2605
|
+
classPropertyName: "titleWrap",
|
|
2606
|
+
publicName: "titleWrap",
|
|
2607
|
+
isSignal: true,
|
|
2608
|
+
isRequired: false,
|
|
2609
|
+
transformFunction: null
|
|
2610
|
+
},
|
|
2611
|
+
searchAppearance: {
|
|
2612
|
+
classPropertyName: "searchAppearance",
|
|
2613
|
+
publicName: "searchAppearance",
|
|
2614
|
+
isSignal: true,
|
|
2615
|
+
isRequired: false,
|
|
2616
|
+
transformFunction: null
|
|
2617
|
+
},
|
|
2618
|
+
searchRadius: {
|
|
2619
|
+
classPropertyName: "searchRadius",
|
|
2620
|
+
publicName: "searchRadius",
|
|
2621
|
+
isSignal: true,
|
|
2622
|
+
isRequired: false,
|
|
2623
|
+
transformFunction: null
|
|
2624
|
+
},
|
|
2625
|
+
highlightSearch: {
|
|
2626
|
+
classPropertyName: "highlightSearch",
|
|
2627
|
+
publicName: "highlightSearch",
|
|
2628
|
+
isSignal: true,
|
|
2629
|
+
isRequired: false,
|
|
2630
|
+
transformFunction: null
|
|
2631
|
+
},
|
|
2632
|
+
emptyResultsText: {
|
|
2633
|
+
classPropertyName: "emptyResultsText",
|
|
2634
|
+
publicName: "emptyResultsText",
|
|
2635
|
+
isSignal: true,
|
|
2636
|
+
isRequired: false,
|
|
2637
|
+
transformFunction: null
|
|
2638
|
+
},
|
|
2639
|
+
applyLabel: {
|
|
2640
|
+
classPropertyName: "applyLabel",
|
|
2641
|
+
publicName: "applyLabel",
|
|
2642
|
+
isSignal: true,
|
|
2643
|
+
isRequired: false,
|
|
2644
|
+
transformFunction: null
|
|
2645
|
+
},
|
|
2646
|
+
applyLabelCase: {
|
|
2647
|
+
classPropertyName: "applyLabelCase",
|
|
2648
|
+
publicName: "applyLabelCase",
|
|
2649
|
+
isSignal: true,
|
|
2650
|
+
isRequired: false,
|
|
2651
|
+
transformFunction: null
|
|
2652
|
+
},
|
|
2653
|
+
autofocusSearch: {
|
|
2654
|
+
classPropertyName: "autofocusSearch",
|
|
2655
|
+
publicName: "autofocusSearch",
|
|
2656
|
+
isSignal: true,
|
|
2657
|
+
isRequired: false,
|
|
2658
|
+
transformFunction: null
|
|
2659
|
+
},
|
|
2660
|
+
multiToggleShown: {
|
|
2661
|
+
classPropertyName: "multiToggleShown",
|
|
2662
|
+
publicName: "multiToggleShown",
|
|
2663
|
+
isSignal: true,
|
|
2664
|
+
isRequired: false,
|
|
2665
|
+
transformFunction: null
|
|
2666
|
+
},
|
|
2667
|
+
selectAllShown: {
|
|
2668
|
+
classPropertyName: "selectAllShown",
|
|
2669
|
+
publicName: "selectAllShown",
|
|
2670
|
+
isSignal: true,
|
|
2671
|
+
isRequired: false,
|
|
2672
|
+
transformFunction: null
|
|
2673
|
+
},
|
|
2674
|
+
localSearch: {
|
|
2675
|
+
classPropertyName: "localSearch",
|
|
2676
|
+
publicName: "localSearch",
|
|
2677
|
+
isSignal: true,
|
|
2678
|
+
isRequired: false,
|
|
2679
|
+
transformFunction: null
|
|
2680
|
+
},
|
|
2681
|
+
lazyLoad: {
|
|
2682
|
+
classPropertyName: "lazyLoad",
|
|
2683
|
+
publicName: "lazyLoad",
|
|
2684
|
+
isSignal: true,
|
|
2685
|
+
isRequired: false,
|
|
2686
|
+
transformFunction: null
|
|
2687
|
+
},
|
|
2688
|
+
loading: {
|
|
2689
|
+
classPropertyName: "loading",
|
|
2690
|
+
publicName: "loading",
|
|
2691
|
+
isSignal: true,
|
|
2692
|
+
isRequired: false,
|
|
2693
|
+
transformFunction: null
|
|
2694
|
+
},
|
|
2695
|
+
fetching: {
|
|
2696
|
+
classPropertyName: "fetching",
|
|
2697
|
+
publicName: "fetching",
|
|
2698
|
+
isSignal: true,
|
|
2699
|
+
isRequired: false,
|
|
2700
|
+
transformFunction: null
|
|
2701
|
+
},
|
|
2702
|
+
navigateTitle: {
|
|
2703
|
+
classPropertyName: "navigateTitle",
|
|
2704
|
+
publicName: "navigateTitle",
|
|
2705
|
+
isSignal: true,
|
|
2706
|
+
isRequired: false,
|
|
2707
|
+
transformFunction: null
|
|
2708
|
+
},
|
|
2709
|
+
navigateLink: {
|
|
2710
|
+
classPropertyName: "navigateLink",
|
|
2711
|
+
publicName: "navigateLink",
|
|
2712
|
+
isSignal: true,
|
|
2713
|
+
isRequired: false,
|
|
2714
|
+
transformFunction: null
|
|
2715
|
+
},
|
|
2716
|
+
sortFn: {
|
|
2717
|
+
classPropertyName: "sortFn",
|
|
2718
|
+
publicName: "sortFn",
|
|
2719
|
+
isSignal: true,
|
|
2720
|
+
isRequired: false,
|
|
2721
|
+
transformFunction: null
|
|
2722
|
+
},
|
|
2723
|
+
chosenEntities: {
|
|
2724
|
+
classPropertyName: "chosenEntities",
|
|
2725
|
+
publicName: "chosenEntities",
|
|
2726
|
+
isSignal: true,
|
|
2727
|
+
isRequired: false,
|
|
2728
|
+
transformFunction: null
|
|
2729
|
+
}
|
|
2730
|
+
},
|
|
2731
|
+
outputs: {
|
|
2732
|
+
chosenEntities: "chosenEntitiesChange",
|
|
2733
|
+
selectionChange: "selectionChange",
|
|
2734
|
+
listReset: "listReset",
|
|
2735
|
+
listCleared: "listCleared",
|
|
2736
|
+
popupOpenChange: "popupOpenChange",
|
|
2737
|
+
searchChange: "searchChange",
|
|
2738
|
+
loadMore: "loadMore",
|
|
2739
|
+
temporaryChoiceChange: "temporaryChoiceChange"
|
|
2740
|
+
},
|
|
2741
|
+
host: { classAttribute: "rt-dynamic-selector" },
|
|
2742
|
+
providers: [{
|
|
2743
|
+
provide: RtFormControlBase,
|
|
2744
|
+
useExisting: forwardRef(() => RtDynamicSelectorComponent)
|
|
2745
|
+
}],
|
|
2746
|
+
queries: [{
|
|
2747
|
+
propertyName: "rowTitle",
|
|
2748
|
+
first: true,
|
|
2749
|
+
predicate: RtDynamicSelectorRowTitleDirective,
|
|
2750
|
+
descendants: true,
|
|
2751
|
+
isSignal: true
|
|
2752
|
+
}, {
|
|
2753
|
+
propertyName: "rowControls",
|
|
2754
|
+
first: true,
|
|
2755
|
+
predicate: RtDynamicSelectorRowControlsDirective,
|
|
2756
|
+
descendants: true,
|
|
2757
|
+
isSignal: true
|
|
2758
|
+
}],
|
|
2759
|
+
viewQueries: [{
|
|
2760
|
+
propertyName: "popovers",
|
|
2761
|
+
predicate: RtPopoverDirective,
|
|
2762
|
+
descendants: true,
|
|
2763
|
+
isSignal: true
|
|
2764
|
+
}],
|
|
2765
|
+
usesInheritance: true,
|
|
2766
|
+
ngImport: i0,
|
|
2767
|
+
template: "<ng-container rtBlock=\"rt-dynamic-selector\">\n @if (isNothingToChoose()) {\n <rt-empty-state rtElem=\"nothing\" qa-dataid=\"dynamic-selector-nothing\" icon=\"warning\" [title]=\"nothingToChooseLabel()\" />\n } @else {\n <div rtElem=\"content\">\n <!-- Под приглашением пустой список не рисуется: узел нулевой высоты сдвигал бы приглашение зазором. -->\n @if (rows().length > 0 || !invitation()) {\n <rt-dynamic-selector-list\n [rows]=\"rows()\"\n [draggable]=\"draggable()\"\n [buttonRadius]=\"buttonRadius()\"\n [clearIcon]=\"clearIcon()\"\n [titleWrap]=\"titleWrap()\"\n [disabled]=\"isDisabled()\"\n [actionsShown]=\"!invitation()\"\n [resetClearShown]=\"listActionsShown()\"\n [removeShown]=\"removeShown()\"\n [resetDisabled]=\"isResetDisabled()\"\n [clearDisabled]=\"isClearDisabled()\"\n [titleTpl]=\"titleTpl()\"\n [controlsTpl]=\"controlsTpl()\"\n (removed)=\"onRemoved($event)\"\n (moved)=\"onMoved($event)\"\n (resetClicked)=\"onReset()\"\n (cleared)=\"onCleared()\">\n @if (isAddShown()) {\n <button\n rtButton\n theme=\"secondary\"\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"dynamic-selector-add\"\n rtPopoverTrigger=\"manual\"\n #addPopover=\"rtPopover\"\n [rtPopover]=\"popupTpl\"\n [rtPopoverDisabled]=\"isDisabled()\"\n [label]=\"addTitle()\"\n [attr.aria-label]=\"addTitle()\"\n [disabled]=\"isDisabled()\"\n (rtPopoverOpened)=\"onOpened()\"\n (rtPopoverClosed)=\"onClosed()\"\n (click)=\"onAdd(addPopover)\"></button>\n }\n </rt-dynamic-selector-list>\n }\n\n @if (invitation()) {\n <rt-empty-state\n rtElem=\"invitation\"\n qa-dataid=\"dynamic-selector-invitation\"\n [icon]=\"invitationIcon()\"\n [glyph]=\"invitationGlyph()\"\n [description]=\"invitationDescription()\">\n @if (hasOffer()) {\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"dynamic-selector-invitation-add\"\n rtPopoverTrigger=\"manual\"\n #invitationPopover=\"rtPopover\"\n [appearance]=\"invitationButtonAppearance()\"\n [icon]=\"invitationButtonIcon()\"\n [rtPopover]=\"popupTpl\"\n [rtPopoverDisabled]=\"isDisabled()\"\n [label]=\"addTitle()\"\n [attr.aria-label]=\"addTitle()\"\n [disabled]=\"isDisabled()\"\n (rtPopoverOpened)=\"onOpened()\"\n (rtPopoverClosed)=\"onClosed()\"\n (click)=\"onAdd(invitationPopover)\"></button>\n }\n </rt-empty-state>\n }\n </div>\n }\n\n <ng-template #popupTpl>\n <rt-dynamic-selector-popup\n [entities]=\"offered()\"\n [keyExp]=\"keyExp()\"\n [displayExp]=\"displayExp()\"\n [displayWith]=\"displayWith()\"\n [mode]=\"mode()\"\n [multiToggleShown]=\"multiToggleShown()\"\n [selectAllShown]=\"selectAllShown()\"\n [localSearch]=\"localSearch()\"\n [lazyLoad]=\"lazyLoad()\"\n [loading]=\"loading()\"\n [fetching]=\"fetching()\"\n [pinnedKeys]=\"pinnedKeys()\"\n [navigateTitle]=\"navigateTitle()\"\n [navigateLink]=\"navigateLink()\"\n [searchTerm]=\"searchTerm()\"\n [searchAppearance]=\"searchAppearance()\"\n [searchRadius]=\"searchRadius()\"\n [emptyResultsText]=\"emptyResultsText()\"\n [titleWrap]=\"titleWrap()\"\n [highlightSearch]=\"highlightSearch()\"\n [applyLabel]=\"applyLabel()\"\n [applyLabelCase]=\"applyLabelCase()\"\n [autofocusSearch]=\"autofocusSearch()\"\n (applied)=\"onApplied($event)\"\n (cancelled)=\"onCancelled()\"\n (searchChange)=\"searchChange.emit($event)\"\n (loadMore)=\"loadMore.emit()\"\n (temporaryChoiceChange)=\"temporaryChoiceChange.emit($event)\" />\n </ng-template>\n</ng-container>\n",
|
|
2768
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector{display:block;width:100%}.rt-dynamic-selector__content{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-dynamic-selector__invitation,.rt-dynamic-selector__nothing{min-width:0}}\n"],
|
|
2769
|
+
dependencies: [
|
|
2770
|
+
{
|
|
2771
|
+
kind: "directive",
|
|
2772
|
+
type: BlockDirective,
|
|
2773
|
+
selector: "[rtBlock]",
|
|
2774
|
+
inputs: ["rtMod"]
|
|
2775
|
+
},
|
|
2776
|
+
{
|
|
2777
|
+
kind: "directive",
|
|
2778
|
+
type: ElemDirective,
|
|
2779
|
+
selector: "[rtElem]",
|
|
2780
|
+
inputs: ["rtMod"]
|
|
2781
|
+
},
|
|
2782
|
+
{
|
|
2783
|
+
kind: "directive",
|
|
2784
|
+
type: RtButtonDirective,
|
|
2785
|
+
selector: "button[rtButton], a[rtButton]",
|
|
2786
|
+
inputs: [
|
|
2787
|
+
"label",
|
|
2788
|
+
"icon",
|
|
2789
|
+
"iconPos",
|
|
2790
|
+
"theme",
|
|
2791
|
+
"appearance",
|
|
2792
|
+
"size",
|
|
2793
|
+
"loading",
|
|
2794
|
+
"loadingIcon",
|
|
2795
|
+
"loadingLabel",
|
|
2796
|
+
"pressed"
|
|
2797
|
+
]
|
|
2798
|
+
},
|
|
2799
|
+
{
|
|
2800
|
+
kind: "component",
|
|
2801
|
+
type: RtDynamicSelectorListComponent,
|
|
2802
|
+
selector: "rt-dynamic-selector-list",
|
|
2803
|
+
inputs: [
|
|
2804
|
+
"rows",
|
|
2805
|
+
"draggable",
|
|
2806
|
+
"editable",
|
|
2807
|
+
"disabled",
|
|
2808
|
+
"actionsShown",
|
|
2809
|
+
"resetClearShown",
|
|
2810
|
+
"removeShown",
|
|
2811
|
+
"resetDisabled",
|
|
2812
|
+
"clearDisabled",
|
|
2813
|
+
"buttonRadius",
|
|
2814
|
+
"clearIcon",
|
|
2815
|
+
"titleWrap",
|
|
2816
|
+
"titleTpl",
|
|
2817
|
+
"controlsTpl"
|
|
2818
|
+
],
|
|
2819
|
+
outputs: [
|
|
2820
|
+
"removed",
|
|
2821
|
+
"moved",
|
|
2822
|
+
"edited",
|
|
2823
|
+
"resetClicked",
|
|
2824
|
+
"cleared"
|
|
2825
|
+
]
|
|
2826
|
+
},
|
|
2827
|
+
{
|
|
2828
|
+
kind: "component",
|
|
2829
|
+
type: RtDynamicSelectorPopupComponent,
|
|
2830
|
+
selector: "rt-dynamic-selector-popup",
|
|
2831
|
+
inputs: [
|
|
2832
|
+
"entities",
|
|
2833
|
+
"keyExp",
|
|
2834
|
+
"displayExp",
|
|
2835
|
+
"displayWith",
|
|
2836
|
+
"mode",
|
|
2837
|
+
"multiToggleShown",
|
|
2838
|
+
"selectAllShown",
|
|
2839
|
+
"localSearch",
|
|
2840
|
+
"lazyLoad",
|
|
2841
|
+
"loading",
|
|
2842
|
+
"fetching",
|
|
2843
|
+
"pinnedKeys",
|
|
2844
|
+
"navigateTitle",
|
|
2845
|
+
"navigateLink",
|
|
2846
|
+
"searchTerm",
|
|
2847
|
+
"searchAppearance",
|
|
2848
|
+
"searchRadius",
|
|
2849
|
+
"emptyResultsText",
|
|
2850
|
+
"applyLabel",
|
|
2851
|
+
"applyLabelCase",
|
|
2852
|
+
"autofocusSearch",
|
|
2853
|
+
"titleWrap",
|
|
2854
|
+
"highlightSearch"
|
|
2855
|
+
],
|
|
2856
|
+
outputs: [
|
|
2857
|
+
"applied",
|
|
2858
|
+
"cancelled",
|
|
2859
|
+
"searchChange",
|
|
2860
|
+
"loadMore",
|
|
2861
|
+
"temporaryChoiceChange"
|
|
2862
|
+
]
|
|
2863
|
+
},
|
|
2864
|
+
{
|
|
2865
|
+
kind: "component",
|
|
2866
|
+
type: RtEmptyStateComponent,
|
|
2867
|
+
selector: "rt-empty-state",
|
|
2868
|
+
inputs: [
|
|
2869
|
+
"icon",
|
|
2870
|
+
"glyph",
|
|
2871
|
+
"title",
|
|
2872
|
+
"description",
|
|
2873
|
+
"framed"
|
|
2874
|
+
]
|
|
2875
|
+
},
|
|
2876
|
+
{
|
|
2877
|
+
kind: "directive",
|
|
2878
|
+
type: RtPopoverDirective,
|
|
2879
|
+
selector: "[rtPopover]",
|
|
2880
|
+
inputs: [
|
|
2881
|
+
"rtPopover",
|
|
2882
|
+
"rtPopoverTrigger",
|
|
2883
|
+
"rtPopoverWidth",
|
|
2884
|
+
"rtPopoverAlign",
|
|
2885
|
+
"rtPopoverFitViewport",
|
|
2886
|
+
"rtPopoverContext",
|
|
2887
|
+
"rtPopoverPanelClass",
|
|
2888
|
+
"rtPopoverDisabled",
|
|
2889
|
+
"rtPopoverOffsetY",
|
|
2890
|
+
"rtPopoverOffsetX",
|
|
2891
|
+
"rtPopoverPositions"
|
|
2892
|
+
],
|
|
2893
|
+
outputs: ["rtPopoverOpened", "rtPopoverClosed"],
|
|
2894
|
+
exportAs: ["rtPopover"]
|
|
2895
|
+
}
|
|
2896
|
+
],
|
|
2897
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2898
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2899
|
+
});
|
|
2900
|
+
}
|
|
2901
|
+
};
|
|
2902
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2903
|
+
minVersion: "12.0.0",
|
|
2904
|
+
version: "22.2.2",
|
|
2905
|
+
ngImport: i0,
|
|
2906
|
+
type: RtDynamicSelectorComponent,
|
|
2907
|
+
decorators: [{
|
|
2908
|
+
type: Component,
|
|
2909
|
+
args: [{
|
|
2910
|
+
selector: "rt-dynamic-selector",
|
|
2911
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2912
|
+
encapsulation: ViewEncapsulation.None,
|
|
2913
|
+
imports: [
|
|
2914
|
+
BlockDirective,
|
|
2915
|
+
ElemDirective,
|
|
2916
|
+
RtButtonDirective,
|
|
2917
|
+
RtDynamicSelectorListComponent,
|
|
2918
|
+
RtDynamicSelectorPopupComponent,
|
|
2919
|
+
RtEmptyStateComponent,
|
|
2920
|
+
RtPopoverDirective
|
|
2921
|
+
],
|
|
2922
|
+
providers: [{
|
|
2923
|
+
provide: RtFormControlBase,
|
|
2924
|
+
useExisting: forwardRef(() => RtDynamicSelectorComponent)
|
|
2925
|
+
}],
|
|
2926
|
+
host: { class: BEM_BLOCK },
|
|
2927
|
+
template: "<ng-container rtBlock=\"rt-dynamic-selector\">\n @if (isNothingToChoose()) {\n <rt-empty-state rtElem=\"nothing\" qa-dataid=\"dynamic-selector-nothing\" icon=\"warning\" [title]=\"nothingToChooseLabel()\" />\n } @else {\n <div rtElem=\"content\">\n <!-- Под приглашением пустой список не рисуется: узел нулевой высоты сдвигал бы приглашение зазором. -->\n @if (rows().length > 0 || !invitation()) {\n <rt-dynamic-selector-list\n [rows]=\"rows()\"\n [draggable]=\"draggable()\"\n [buttonRadius]=\"buttonRadius()\"\n [clearIcon]=\"clearIcon()\"\n [titleWrap]=\"titleWrap()\"\n [disabled]=\"isDisabled()\"\n [actionsShown]=\"!invitation()\"\n [resetClearShown]=\"listActionsShown()\"\n [removeShown]=\"removeShown()\"\n [resetDisabled]=\"isResetDisabled()\"\n [clearDisabled]=\"isClearDisabled()\"\n [titleTpl]=\"titleTpl()\"\n [controlsTpl]=\"controlsTpl()\"\n (removed)=\"onRemoved($event)\"\n (moved)=\"onMoved($event)\"\n (resetClicked)=\"onReset()\"\n (cleared)=\"onCleared()\">\n @if (isAddShown()) {\n <button\n rtButton\n theme=\"secondary\"\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"dynamic-selector-add\"\n rtPopoverTrigger=\"manual\"\n #addPopover=\"rtPopover\"\n [rtPopover]=\"popupTpl\"\n [rtPopoverDisabled]=\"isDisabled()\"\n [label]=\"addTitle()\"\n [attr.aria-label]=\"addTitle()\"\n [disabled]=\"isDisabled()\"\n (rtPopoverOpened)=\"onOpened()\"\n (rtPopoverClosed)=\"onClosed()\"\n (click)=\"onAdd(addPopover)\"></button>\n }\n </rt-dynamic-selector-list>\n }\n\n @if (invitation()) {\n <rt-empty-state\n rtElem=\"invitation\"\n qa-dataid=\"dynamic-selector-invitation\"\n [icon]=\"invitationIcon()\"\n [glyph]=\"invitationGlyph()\"\n [description]=\"invitationDescription()\">\n @if (hasOffer()) {\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"dynamic-selector-invitation-add\"\n rtPopoverTrigger=\"manual\"\n #invitationPopover=\"rtPopover\"\n [appearance]=\"invitationButtonAppearance()\"\n [icon]=\"invitationButtonIcon()\"\n [rtPopover]=\"popupTpl\"\n [rtPopoverDisabled]=\"isDisabled()\"\n [label]=\"addTitle()\"\n [attr.aria-label]=\"addTitle()\"\n [disabled]=\"isDisabled()\"\n (rtPopoverOpened)=\"onOpened()\"\n (rtPopoverClosed)=\"onClosed()\"\n (click)=\"onAdd(invitationPopover)\"></button>\n }\n </rt-empty-state>\n }\n </div>\n }\n\n <ng-template #popupTpl>\n <rt-dynamic-selector-popup\n [entities]=\"offered()\"\n [keyExp]=\"keyExp()\"\n [displayExp]=\"displayExp()\"\n [displayWith]=\"displayWith()\"\n [mode]=\"mode()\"\n [multiToggleShown]=\"multiToggleShown()\"\n [selectAllShown]=\"selectAllShown()\"\n [localSearch]=\"localSearch()\"\n [lazyLoad]=\"lazyLoad()\"\n [loading]=\"loading()\"\n [fetching]=\"fetching()\"\n [pinnedKeys]=\"pinnedKeys()\"\n [navigateTitle]=\"navigateTitle()\"\n [navigateLink]=\"navigateLink()\"\n [searchTerm]=\"searchTerm()\"\n [searchAppearance]=\"searchAppearance()\"\n [searchRadius]=\"searchRadius()\"\n [emptyResultsText]=\"emptyResultsText()\"\n [titleWrap]=\"titleWrap()\"\n [highlightSearch]=\"highlightSearch()\"\n [applyLabel]=\"applyLabel()\"\n [applyLabelCase]=\"applyLabelCase()\"\n [autofocusSearch]=\"autofocusSearch()\"\n (applied)=\"onApplied($event)\"\n (cancelled)=\"onCancelled()\"\n (searchChange)=\"searchChange.emit($event)\"\n (loadMore)=\"loadMore.emit()\"\n (temporaryChoiceChange)=\"temporaryChoiceChange.emit($event)\" />\n </ng-template>\n</ng-container>\n",
|
|
2928
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-dynamic-selector{display:block;width:100%}.rt-dynamic-selector__content{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-dynamic-selector__invitation,.rt-dynamic-selector__nothing{min-width:0}}\n"]
|
|
2929
|
+
}]
|
|
2930
|
+
}],
|
|
2931
|
+
ctorParameters: () => [],
|
|
2932
|
+
propDecorators: {
|
|
2933
|
+
popovers: [{
|
|
2934
|
+
type: i0.ViewChildren,
|
|
2935
|
+
args: [i0.forwardRef(() => RtPopoverDirective), { isSignal: true }]
|
|
2936
|
+
}],
|
|
2937
|
+
rowTitle: [{
|
|
2938
|
+
type: i0.ContentChild,
|
|
2939
|
+
args: [i0.forwardRef(() => RtDynamicSelectorRowTitleDirective), { isSignal: true }]
|
|
2940
|
+
}],
|
|
2941
|
+
rowControls: [{
|
|
2942
|
+
type: i0.ContentChild,
|
|
2943
|
+
args: [i0.forwardRef(() => RtDynamicSelectorRowControlsDirective), { isSignal: true }]
|
|
2944
|
+
}],
|
|
2945
|
+
entities: [{
|
|
2946
|
+
type: i0.Input,
|
|
2947
|
+
args: [{
|
|
2948
|
+
isSignal: true,
|
|
2949
|
+
alias: "entities",
|
|
2950
|
+
required: false
|
|
2951
|
+
}]
|
|
2952
|
+
}],
|
|
2953
|
+
keyExp: [{
|
|
2954
|
+
type: i0.Input,
|
|
2955
|
+
args: [{
|
|
2956
|
+
isSignal: true,
|
|
2957
|
+
alias: "keyExp",
|
|
2958
|
+
required: true
|
|
2959
|
+
}]
|
|
2960
|
+
}],
|
|
2961
|
+
displayExp: [{
|
|
2962
|
+
type: i0.Input,
|
|
2963
|
+
args: [{
|
|
2964
|
+
isSignal: true,
|
|
2965
|
+
alias: "displayExp",
|
|
2966
|
+
required: true
|
|
2967
|
+
}]
|
|
2968
|
+
}],
|
|
2969
|
+
displayWith: [{
|
|
2970
|
+
type: i0.Input,
|
|
2971
|
+
args: [{
|
|
2972
|
+
isSignal: true,
|
|
2973
|
+
alias: "displayWith",
|
|
2974
|
+
required: false
|
|
2975
|
+
}]
|
|
2976
|
+
}],
|
|
2977
|
+
mode: [{
|
|
2978
|
+
type: i0.Input,
|
|
2979
|
+
args: [{
|
|
2980
|
+
isSignal: true,
|
|
2981
|
+
alias: "mode",
|
|
2982
|
+
required: false
|
|
2983
|
+
}]
|
|
2984
|
+
}],
|
|
2985
|
+
buttonTitle: [{
|
|
2986
|
+
type: i0.Input,
|
|
2987
|
+
args: [{
|
|
2988
|
+
isSignal: true,
|
|
2989
|
+
alias: "buttonTitle",
|
|
2990
|
+
required: false
|
|
2991
|
+
}]
|
|
2992
|
+
}],
|
|
2993
|
+
addShown: [{
|
|
2994
|
+
type: i0.Input,
|
|
2995
|
+
args: [{
|
|
2996
|
+
isSignal: true,
|
|
2997
|
+
alias: "addShown",
|
|
2998
|
+
required: false
|
|
2999
|
+
}]
|
|
3000
|
+
}],
|
|
3001
|
+
removeShown: [{
|
|
3002
|
+
type: i0.Input,
|
|
3003
|
+
args: [{
|
|
3004
|
+
isSignal: true,
|
|
3005
|
+
alias: "removeShown",
|
|
3006
|
+
required: false
|
|
3007
|
+
}]
|
|
3008
|
+
}],
|
|
3009
|
+
listActionsShown: [{
|
|
3010
|
+
type: i0.Input,
|
|
3011
|
+
args: [{
|
|
3012
|
+
isSignal: true,
|
|
3013
|
+
alias: "listActionsShown",
|
|
3014
|
+
required: false
|
|
3015
|
+
}]
|
|
3016
|
+
}],
|
|
3017
|
+
extraChanged: [{
|
|
3018
|
+
type: i0.Input,
|
|
3019
|
+
args: [{
|
|
3020
|
+
isSignal: true,
|
|
3021
|
+
alias: "extraChanged",
|
|
3022
|
+
required: false
|
|
3023
|
+
}]
|
|
3024
|
+
}],
|
|
3025
|
+
searchTerm: [{
|
|
3026
|
+
type: i0.Input,
|
|
3027
|
+
args: [{
|
|
3028
|
+
isSignal: true,
|
|
3029
|
+
alias: "searchTerm",
|
|
3030
|
+
required: false
|
|
3031
|
+
}]
|
|
3032
|
+
}],
|
|
3033
|
+
readonlyKeys: [{
|
|
3034
|
+
type: i0.Input,
|
|
3035
|
+
args: [{
|
|
3036
|
+
isSignal: true,
|
|
3037
|
+
alias: "readonlyKeys",
|
|
3038
|
+
required: false
|
|
3039
|
+
}]
|
|
3040
|
+
}],
|
|
3041
|
+
pinnedKeys: [{
|
|
3042
|
+
type: i0.Input,
|
|
3043
|
+
args: [{
|
|
3044
|
+
isSignal: true,
|
|
3045
|
+
alias: "pinnedKeys",
|
|
3046
|
+
required: false
|
|
3047
|
+
}]
|
|
3048
|
+
}],
|
|
3049
|
+
draggable: [{
|
|
3050
|
+
type: i0.Input,
|
|
3051
|
+
args: [{
|
|
3052
|
+
isSignal: true,
|
|
3053
|
+
alias: "draggable",
|
|
3054
|
+
required: false
|
|
3055
|
+
}]
|
|
3056
|
+
}],
|
|
3057
|
+
buttonRadius: [{
|
|
3058
|
+
type: i0.Input,
|
|
3059
|
+
args: [{
|
|
3060
|
+
isSignal: true,
|
|
3061
|
+
alias: "buttonRadius",
|
|
3062
|
+
required: false
|
|
3063
|
+
}]
|
|
3064
|
+
}],
|
|
3065
|
+
invitation: [{
|
|
3066
|
+
type: i0.Input,
|
|
3067
|
+
args: [{
|
|
3068
|
+
isSignal: true,
|
|
3069
|
+
alias: "invitation",
|
|
3070
|
+
required: false
|
|
3071
|
+
}]
|
|
3072
|
+
}],
|
|
3073
|
+
invitationIcon: [{
|
|
3074
|
+
type: i0.Input,
|
|
3075
|
+
args: [{
|
|
3076
|
+
isSignal: true,
|
|
3077
|
+
alias: "invitationIcon",
|
|
3078
|
+
required: false
|
|
3079
|
+
}]
|
|
3080
|
+
}],
|
|
3081
|
+
invitationGlyph: [{
|
|
3082
|
+
type: i0.Input,
|
|
3083
|
+
args: [{
|
|
3084
|
+
isSignal: true,
|
|
3085
|
+
alias: "invitationGlyph",
|
|
3086
|
+
required: false
|
|
3087
|
+
}]
|
|
3088
|
+
}],
|
|
3089
|
+
invitationDescription: [{
|
|
3090
|
+
type: i0.Input,
|
|
3091
|
+
args: [{
|
|
3092
|
+
isSignal: true,
|
|
3093
|
+
alias: "invitationDescription",
|
|
3094
|
+
required: false
|
|
3095
|
+
}]
|
|
3096
|
+
}],
|
|
3097
|
+
invitationButtonIcon: [{
|
|
3098
|
+
type: i0.Input,
|
|
3099
|
+
args: [{
|
|
3100
|
+
isSignal: true,
|
|
3101
|
+
alias: "invitationButtonIcon",
|
|
3102
|
+
required: false
|
|
3103
|
+
}]
|
|
3104
|
+
}],
|
|
3105
|
+
invitationButtonAppearance: [{
|
|
3106
|
+
type: i0.Input,
|
|
3107
|
+
args: [{
|
|
3108
|
+
isSignal: true,
|
|
3109
|
+
alias: "invitationButtonAppearance",
|
|
3110
|
+
required: false
|
|
3111
|
+
}]
|
|
3112
|
+
}],
|
|
3113
|
+
clearIcon: [{
|
|
3114
|
+
type: i0.Input,
|
|
3115
|
+
args: [{
|
|
3116
|
+
isSignal: true,
|
|
3117
|
+
alias: "clearIcon",
|
|
3118
|
+
required: false
|
|
3119
|
+
}]
|
|
3120
|
+
}],
|
|
3121
|
+
titleWrap: [{
|
|
3122
|
+
type: i0.Input,
|
|
3123
|
+
args: [{
|
|
3124
|
+
isSignal: true,
|
|
3125
|
+
alias: "titleWrap",
|
|
3126
|
+
required: false
|
|
3127
|
+
}]
|
|
3128
|
+
}],
|
|
3129
|
+
searchAppearance: [{
|
|
3130
|
+
type: i0.Input,
|
|
3131
|
+
args: [{
|
|
3132
|
+
isSignal: true,
|
|
3133
|
+
alias: "searchAppearance",
|
|
3134
|
+
required: false
|
|
3135
|
+
}]
|
|
3136
|
+
}],
|
|
3137
|
+
searchRadius: [{
|
|
3138
|
+
type: i0.Input,
|
|
3139
|
+
args: [{
|
|
3140
|
+
isSignal: true,
|
|
3141
|
+
alias: "searchRadius",
|
|
3142
|
+
required: false
|
|
3143
|
+
}]
|
|
3144
|
+
}],
|
|
3145
|
+
highlightSearch: [{
|
|
3146
|
+
type: i0.Input,
|
|
3147
|
+
args: [{
|
|
3148
|
+
isSignal: true,
|
|
3149
|
+
alias: "highlightSearch",
|
|
3150
|
+
required: false
|
|
3151
|
+
}]
|
|
3152
|
+
}],
|
|
3153
|
+
emptyResultsText: [{
|
|
3154
|
+
type: i0.Input,
|
|
3155
|
+
args: [{
|
|
3156
|
+
isSignal: true,
|
|
3157
|
+
alias: "emptyResultsText",
|
|
3158
|
+
required: false
|
|
3159
|
+
}]
|
|
3160
|
+
}],
|
|
3161
|
+
applyLabel: [{
|
|
3162
|
+
type: i0.Input,
|
|
3163
|
+
args: [{
|
|
3164
|
+
isSignal: true,
|
|
3165
|
+
alias: "applyLabel",
|
|
3166
|
+
required: false
|
|
3167
|
+
}]
|
|
3168
|
+
}],
|
|
3169
|
+
applyLabelCase: [{
|
|
3170
|
+
type: i0.Input,
|
|
3171
|
+
args: [{
|
|
3172
|
+
isSignal: true,
|
|
3173
|
+
alias: "applyLabelCase",
|
|
3174
|
+
required: false
|
|
3175
|
+
}]
|
|
3176
|
+
}],
|
|
3177
|
+
autofocusSearch: [{
|
|
3178
|
+
type: i0.Input,
|
|
3179
|
+
args: [{
|
|
3180
|
+
isSignal: true,
|
|
3181
|
+
alias: "autofocusSearch",
|
|
3182
|
+
required: false
|
|
3183
|
+
}]
|
|
3184
|
+
}],
|
|
3185
|
+
multiToggleShown: [{
|
|
3186
|
+
type: i0.Input,
|
|
3187
|
+
args: [{
|
|
3188
|
+
isSignal: true,
|
|
3189
|
+
alias: "multiToggleShown",
|
|
3190
|
+
required: false
|
|
3191
|
+
}]
|
|
3192
|
+
}],
|
|
3193
|
+
selectAllShown: [{
|
|
3194
|
+
type: i0.Input,
|
|
3195
|
+
args: [{
|
|
3196
|
+
isSignal: true,
|
|
3197
|
+
alias: "selectAllShown",
|
|
3198
|
+
required: false
|
|
3199
|
+
}]
|
|
3200
|
+
}],
|
|
3201
|
+
localSearch: [{
|
|
3202
|
+
type: i0.Input,
|
|
3203
|
+
args: [{
|
|
3204
|
+
isSignal: true,
|
|
3205
|
+
alias: "localSearch",
|
|
3206
|
+
required: false
|
|
3207
|
+
}]
|
|
3208
|
+
}],
|
|
3209
|
+
lazyLoad: [{
|
|
3210
|
+
type: i0.Input,
|
|
3211
|
+
args: [{
|
|
3212
|
+
isSignal: true,
|
|
3213
|
+
alias: "lazyLoad",
|
|
3214
|
+
required: false
|
|
3215
|
+
}]
|
|
3216
|
+
}],
|
|
3217
|
+
loading: [{
|
|
3218
|
+
type: i0.Input,
|
|
3219
|
+
args: [{
|
|
3220
|
+
isSignal: true,
|
|
3221
|
+
alias: "loading",
|
|
3222
|
+
required: false
|
|
3223
|
+
}]
|
|
3224
|
+
}],
|
|
3225
|
+
fetching: [{
|
|
3226
|
+
type: i0.Input,
|
|
3227
|
+
args: [{
|
|
3228
|
+
isSignal: true,
|
|
3229
|
+
alias: "fetching",
|
|
3230
|
+
required: false
|
|
3231
|
+
}]
|
|
3232
|
+
}],
|
|
3233
|
+
navigateTitle: [{
|
|
3234
|
+
type: i0.Input,
|
|
3235
|
+
args: [{
|
|
3236
|
+
isSignal: true,
|
|
3237
|
+
alias: "navigateTitle",
|
|
3238
|
+
required: false
|
|
3239
|
+
}]
|
|
3240
|
+
}],
|
|
3241
|
+
navigateLink: [{
|
|
3242
|
+
type: i0.Input,
|
|
3243
|
+
args: [{
|
|
3244
|
+
isSignal: true,
|
|
3245
|
+
alias: "navigateLink",
|
|
3246
|
+
required: false
|
|
3247
|
+
}]
|
|
3248
|
+
}],
|
|
3249
|
+
sortFn: [{
|
|
3250
|
+
type: i0.Input,
|
|
3251
|
+
args: [{
|
|
3252
|
+
isSignal: true,
|
|
3253
|
+
alias: "sortFn",
|
|
3254
|
+
required: false
|
|
3255
|
+
}]
|
|
3256
|
+
}],
|
|
3257
|
+
chosenEntities: [{
|
|
3258
|
+
type: i0.Input,
|
|
3259
|
+
args: [{
|
|
3260
|
+
isSignal: true,
|
|
3261
|
+
alias: "chosenEntities",
|
|
3262
|
+
required: false
|
|
3263
|
+
}]
|
|
3264
|
+
}, {
|
|
3265
|
+
type: i0.Output,
|
|
3266
|
+
args: ["chosenEntitiesChange"]
|
|
3267
|
+
}],
|
|
3268
|
+
selectionChange: [{
|
|
3269
|
+
type: i0.Output,
|
|
3270
|
+
args: ["selectionChange"]
|
|
3271
|
+
}],
|
|
3272
|
+
listReset: [{
|
|
3273
|
+
type: i0.Output,
|
|
3274
|
+
args: ["listReset"]
|
|
3275
|
+
}],
|
|
3276
|
+
listCleared: [{
|
|
3277
|
+
type: i0.Output,
|
|
3278
|
+
args: ["listCleared"]
|
|
3279
|
+
}],
|
|
3280
|
+
popupOpenChange: [{
|
|
3281
|
+
type: i0.Output,
|
|
3282
|
+
args: ["popupOpenChange"]
|
|
3283
|
+
}],
|
|
3284
|
+
searchChange: [{
|
|
3285
|
+
type: i0.Output,
|
|
3286
|
+
args: ["searchChange"]
|
|
3287
|
+
}],
|
|
3288
|
+
loadMore: [{
|
|
3289
|
+
type: i0.Output,
|
|
3290
|
+
args: ["loadMore"]
|
|
3291
|
+
}],
|
|
3292
|
+
temporaryChoiceChange: [{
|
|
3293
|
+
type: i0.Output,
|
|
3294
|
+
args: ["temporaryChoiceChange"]
|
|
3295
|
+
}]
|
|
3296
|
+
}
|
|
3297
|
+
});
|
|
1148
3298
|
export { RT_DYNAMIC_SELECTOR_SEARCH_DEBOUNCE, RtDynamicInputComponent, RtDynamicSelectorComponent, RtDynamicSelectorListComponent, RtDynamicSelectorPopupComponent, RtDynamicSelectorRowControlsDirective, RtDynamicSelectorRowTitleDirective };
|
|
1149
|
-
|
|
3299
|
+
|
|
3300
|
+
//# sourceMappingURL=rt-tools-ui-kit-v2-dynamic-selector.mjs.map
|