@rt-tools/ui-kit-v2 0.23.3 → 0.23.4
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 +2309 -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-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 +41 -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 +35 -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/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/styles/tokens.css +3 -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 +856 -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-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,540 +1,713 @@
|
|
|
1
|
-
import { DOCUMENT } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { RT_KIT_LABELS } from
|
|
6
|
-
import { RtSpinnerComponent } from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { DOCUMENT } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, afterNextRender, booleanAttribute, computed, effect, inject, input, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
|
|
4
|
+
import { BlockDirective, ElemDirective, ModDirective, PlatformService, WINDOW } from "@rt-tools/core";
|
|
5
|
+
import { RT_KIT_LABELS } from "@rt-tools/ui-kit-v2/core";
|
|
6
|
+
import { RtSpinnerComponent } from "@rt-tools/ui-kit-v2/spinner";
|
|
7
|
+
const RT_IMAGE_CROPPER_HANDLES = [
|
|
8
|
+
"nw",
|
|
9
|
+
"n",
|
|
10
|
+
"ne",
|
|
11
|
+
"e",
|
|
12
|
+
"se",
|
|
13
|
+
"s",
|
|
14
|
+
"sw",
|
|
15
|
+
"w"
|
|
16
|
+
];
|
|
16
17
|
const RT_IMAGE_CROPPER_KEY_STEP = 1;
|
|
17
18
|
const RT_IMAGE_CROPPER_KEY_STEP_LARGE = 10;
|
|
18
|
-
/** Качество по умолчанию — то же, что у загрузчика первого кита */
|
|
19
19
|
const RT_IMAGE_CROPPER_QUALITY = 92;
|
|
20
|
-
const OWN_TYPES = [
|
|
20
|
+
const OWN_TYPES = [
|
|
21
|
+
"image/png",
|
|
22
|
+
"image/jpeg",
|
|
23
|
+
"image/webp"
|
|
24
|
+
];
|
|
21
25
|
function clamp(value, min, max) {
|
|
22
|
-
|
|
26
|
+
return Math.max(min, Math.min(max, value));
|
|
23
27
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Вписывает исходник в поле целиком, с его пропорциями, по центру. Ни одна часть
|
|
26
|
-
* картинки не срезается полем, и ни одна не растянута.
|
|
27
|
-
*/
|
|
28
28
|
function fitSource(source, field) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
if (source.width <= 0 || source.height <= 0 || field.width <= 0 || field.height <= 0) return {
|
|
30
|
+
scale: 0,
|
|
31
|
+
offsetX: 0,
|
|
32
|
+
offsetY: 0,
|
|
33
|
+
width: 0,
|
|
34
|
+
height: 0
|
|
35
|
+
};
|
|
36
|
+
const scale = Math.min(field.width / source.width, field.height / source.height);
|
|
37
|
+
const width = source.width * scale;
|
|
38
|
+
const height = source.height * scale;
|
|
39
|
+
return {
|
|
40
|
+
offsetX: (field.width - width) / 2,
|
|
41
|
+
offsetY: (field.height - height) / 2,
|
|
42
|
+
scale,
|
|
43
|
+
width,
|
|
44
|
+
height
|
|
45
|
+
};
|
|
36
46
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Пропорция, которую держит рамка. Круглый вид держит один к одному при любой
|
|
39
|
-
* заданной; заданная не числом или не больше нуля значит свободную рамку.
|
|
40
|
-
*/
|
|
41
47
|
function frameRatio(ratio, round) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
return typeof ratio === 'number' && Number.isFinite(ratio) && ratio > 0 ? ratio : null;
|
|
48
|
+
if (round) return 1;
|
|
49
|
+
return typeof ratio === "number" && Number.isFinite(ratio) && ratio > 0 ? ratio : null;
|
|
46
50
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Начальная рамка — наибольшая, какую позволяет пропорция, по центру исходника.
|
|
49
|
-
* Свободная начинается как весь исходник.
|
|
50
|
-
*/
|
|
51
51
|
function initialFrame(source, ratio) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
if (ratio === null) return {
|
|
53
|
+
x: 0,
|
|
54
|
+
y: 0,
|
|
55
|
+
width: source.width,
|
|
56
|
+
height: source.height
|
|
57
|
+
};
|
|
58
|
+
const width = Math.min(source.width, source.height * ratio);
|
|
59
|
+
const height = width / ratio;
|
|
60
|
+
return {
|
|
61
|
+
x: (source.width - width) / 2,
|
|
62
|
+
y: (source.height - height) / 2,
|
|
63
|
+
width,
|
|
64
|
+
height
|
|
65
|
+
};
|
|
58
66
|
}
|
|
59
|
-
/** Сдвиг рамки целиком: размер тот же, у края исходника рамка останавливается */
|
|
60
67
|
function moveFrame(frame, delta, source) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
return {
|
|
69
|
+
x: clamp(frame.x + delta.dx, 0, Math.max(0, source.width - frame.width)),
|
|
70
|
+
y: clamp(frame.y + delta.dy, 0, Math.max(0, source.height - frame.height)),
|
|
71
|
+
width: frame.width,
|
|
72
|
+
height: frame.height
|
|
73
|
+
};
|
|
67
74
|
}
|
|
68
|
-
/** Знак оси по ручке: к концу оси, к началу, или ось не тянется */
|
|
69
75
|
function axisSign(handle, forward, backward) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
return handle.includes(backward) ? -1 : 0;
|
|
76
|
+
if (handle.includes(forward)) return 1;
|
|
77
|
+
return handle.includes(backward) ? -1 : 0;
|
|
74
78
|
}
|
|
75
|
-
/** По каким осям и в какую сторону тянет ручка */
|
|
76
79
|
function handleDirection(handle) {
|
|
77
|
-
|
|
80
|
+
return {
|
|
81
|
+
x: axisSign(handle, "e", "w"),
|
|
82
|
+
y: axisSign(handle, "s", "n")
|
|
83
|
+
};
|
|
78
84
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Наибольший размер по оси: от неподвижной стороны до края исходника, а для оси,
|
|
81
|
-
* которую ручка не тянет, — удвоенное расстояние от центра до ближнего края.
|
|
82
|
-
*/
|
|
83
85
|
function axisRoom(start, size, limit, direction) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return start + size;
|
|
89
|
-
}
|
|
90
|
-
const centre = start + size / 2;
|
|
91
|
-
return 2 * Math.min(centre, limit - centre);
|
|
86
|
+
if (direction > 0) return limit - start;
|
|
87
|
+
if (direction < 0) return start + size;
|
|
88
|
+
const centre = start + size / 2;
|
|
89
|
+
return 2 * Math.min(centre, limit - centre);
|
|
92
90
|
}
|
|
93
|
-
/** Где рамка встаёт на оси: от неподвижной стороны, или вокруг центра для оси, которую ручка не тянет */
|
|
94
91
|
function axisStart(start, size, next, direction) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if (direction < 0) {
|
|
99
|
-
return start + size - next;
|
|
100
|
-
}
|
|
101
|
-
return start + size / 2 - next / 2;
|
|
92
|
+
if (direction > 0) return start;
|
|
93
|
+
if (direction < 0) return start + size - next;
|
|
94
|
+
return start + size / 2 - next / 2;
|
|
102
95
|
}
|
|
103
|
-
/** Свободная рамка: каждая ось тянется сама, ось без ручки остаётся как была */
|
|
104
96
|
function resizeFree(frame, direction, delta, source, least) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
97
|
+
let { x, y, width, height } = frame;
|
|
98
|
+
if (direction.x !== 0) {
|
|
99
|
+
const room = axisRoom(frame.x, frame.width, source.width, direction.x);
|
|
100
|
+
width = clamp(frame.width + direction.x * delta.dx, Math.min(least, room), room);
|
|
101
|
+
x = axisStart(frame.x, frame.width, width, direction.x);
|
|
102
|
+
}
|
|
103
|
+
if (direction.y !== 0) {
|
|
104
|
+
const room = axisRoom(frame.y, frame.height, source.height, direction.y);
|
|
105
|
+
height = clamp(frame.height + direction.y * delta.dy, Math.min(least, room), room);
|
|
106
|
+
y = axisStart(frame.y, frame.height, height, direction.y);
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
x,
|
|
110
|
+
y,
|
|
111
|
+
width,
|
|
112
|
+
height
|
|
113
|
+
};
|
|
117
114
|
}
|
|
118
|
-
/**
|
|
119
|
-
* Ширина, которую просит сдвиг при заданной пропорции. Угол берёт ту ось, по
|
|
120
|
-
* которой сдвиг больше; сторона — свою ось.
|
|
121
|
-
*/
|
|
122
115
|
function wantedRatioWidth(frame, direction, delta, ratio) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (direction.y === 0) {
|
|
129
|
-
return byWidth;
|
|
130
|
-
}
|
|
131
|
-
return Math.abs(delta.dx) >= Math.abs(delta.dy * ratio) ? byWidth : byHeight;
|
|
116
|
+
const byWidth = frame.width + direction.x * delta.dx;
|
|
117
|
+
const byHeight = (frame.height + direction.y * delta.dy) * ratio;
|
|
118
|
+
if (direction.x === 0) return byHeight;
|
|
119
|
+
if (direction.y === 0) return byWidth;
|
|
120
|
+
return Math.abs(delta.dx) >= Math.abs(delta.dy * ratio) ? byWidth : byHeight;
|
|
132
121
|
}
|
|
133
|
-
/**
|
|
134
|
-
* Растяжение рамки за ручку. Сторона или угол напротив ручки стоит на месте;
|
|
135
|
-
* рамка не выходит за исходник и не становится меньше наименьшего размера; рамка
|
|
136
|
-
* с пропорцией держит её, а боковая ручка тянет её вокруг центра второй оси.
|
|
137
|
-
*/
|
|
138
122
|
function resizeFrame(frame, handle, delta, source, ratio, minSize) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
height,
|
|
153
|
-
};
|
|
123
|
+
const direction = handleDirection(handle);
|
|
124
|
+
const least = Math.max(0, minSize);
|
|
125
|
+
if (ratio === null) return resizeFree(frame, direction, delta, source, least);
|
|
126
|
+
const roomWidth = Math.min(axisRoom(frame.x, frame.width, source.width, direction.x), axisRoom(frame.y, frame.height, source.height, direction.y) * ratio);
|
|
127
|
+
const leastWidth = Math.min(Math.max(least, least * ratio), roomWidth);
|
|
128
|
+
const width = clamp(wantedRatioWidth(frame, direction, delta, ratio), leastWidth, roomWidth);
|
|
129
|
+
const height = width / ratio;
|
|
130
|
+
return {
|
|
131
|
+
x: axisStart(frame.x, frame.width, width, direction.x),
|
|
132
|
+
y: axisStart(frame.y, frame.height, height, direction.y),
|
|
133
|
+
width,
|
|
134
|
+
height
|
|
135
|
+
};
|
|
154
136
|
}
|
|
155
|
-
/**
|
|
156
|
-
* Сдвиг от стрелки клавиатуры в пикселях исходника. Одно нажатие — пиксель поля,
|
|
157
|
-
* с Shift десять; не стрелка даёт `null`.
|
|
158
|
-
*/
|
|
159
137
|
function keyDelta(key, isLarge, scale) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
138
|
+
if (scale <= 0) return null;
|
|
139
|
+
const step = (isLarge ? 10 : 1) / scale;
|
|
140
|
+
switch (key) {
|
|
141
|
+
case "ArrowLeft": return {
|
|
142
|
+
dx: -step,
|
|
143
|
+
dy: 0
|
|
144
|
+
};
|
|
145
|
+
case "ArrowRight": return {
|
|
146
|
+
dx: step,
|
|
147
|
+
dy: 0
|
|
148
|
+
};
|
|
149
|
+
case "ArrowUp": return {
|
|
150
|
+
dx: 0,
|
|
151
|
+
dy: -step
|
|
152
|
+
};
|
|
153
|
+
case "ArrowDown": return {
|
|
154
|
+
dx: 0,
|
|
155
|
+
dy: step
|
|
156
|
+
};
|
|
157
|
+
default: return null;
|
|
158
|
+
}
|
|
176
159
|
}
|
|
177
|
-
/** Сдвиг указателя в пикселях поля переводится в пиксели исходника */
|
|
178
160
|
function fieldDelta(dx, dy, scale) {
|
|
179
|
-
|
|
161
|
+
return scale > 0 ? {
|
|
162
|
+
dx: dx / scale,
|
|
163
|
+
dy: dy / scale
|
|
164
|
+
} : {
|
|
165
|
+
dx: 0,
|
|
166
|
+
dy: 0
|
|
167
|
+
};
|
|
180
168
|
}
|
|
181
|
-
/** Рамка в пикселях поля — для рисования поверх вписанной картинки */
|
|
182
169
|
function frameInField(frame, fit) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
170
|
+
return {
|
|
171
|
+
x: fit.offsetX + frame.x * fit.scale,
|
|
172
|
+
y: fit.offsetY + frame.y * fit.scale,
|
|
173
|
+
width: frame.width * fit.scale,
|
|
174
|
+
height: frame.height * fit.scale
|
|
175
|
+
};
|
|
189
176
|
}
|
|
190
|
-
/** Рамка в целых пикселях исходника — то, что вырезает холст; не меньше пикселя */
|
|
191
177
|
function cropArea(frame, source) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
178
|
+
const x = clamp(Math.round(frame.x), 0, Math.max(0, source.width - 1));
|
|
179
|
+
const y = clamp(Math.round(frame.y), 0, Math.max(0, source.height - 1));
|
|
180
|
+
return {
|
|
181
|
+
x,
|
|
182
|
+
y,
|
|
183
|
+
width: clamp(Math.round(frame.width), 1, Math.max(1, source.width - x)),
|
|
184
|
+
height: clamp(Math.round(frame.height), 1, Math.max(1, source.height - y))
|
|
185
|
+
};
|
|
200
186
|
}
|
|
201
|
-
/**
|
|
202
|
-
* Тип результата. Без выбранного формата берётся формат исходника, и png, когда
|
|
203
|
-
* он не из трёх.
|
|
204
|
-
*/
|
|
205
187
|
function resultType(format, sourceType) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
return OWN_TYPES.includes(sourceType) ? sourceType : 'image/png';
|
|
188
|
+
if (format) return `image/${format}`;
|
|
189
|
+
return OWN_TYPES.includes(sourceType) ? sourceType : "image/png";
|
|
210
190
|
}
|
|
211
|
-
/** Качество холста — доля единицы; вход берёт проценты */
|
|
212
191
|
function resultQuality(quality) {
|
|
213
|
-
|
|
192
|
+
return Number.isFinite(quality) ? clamp(quality, 0, 100) / 100 : 92 / 100;
|
|
214
193
|
}
|
|
215
|
-
/** Имя файла результата: основа имени исходника и расширение по типу результата */
|
|
216
194
|
function resultFileName(sourceName, type) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
return `${base}.${extension}`;
|
|
195
|
+
const extension = type === "image/jpeg" ? "jpg" : type.replace("image/", "");
|
|
196
|
+
const dot = sourceName.lastIndexOf(".");
|
|
197
|
+
let base = sourceName || "image";
|
|
198
|
+
if (dot > 0) base = sourceName.slice(0, dot);
|
|
199
|
+
return `${base}.${extension}`;
|
|
224
200
|
}
|
|
225
|
-
|
|
226
|
-
const BEM_BLOCK = 'rt-image-cropper';
|
|
227
|
-
/** Наименьший размер рамки по умолчанию, в пикселях исходника */
|
|
201
|
+
const BEM_BLOCK = "rt-image-cropper";
|
|
228
202
|
const DEFAULT_MIN_SIZE = 16;
|
|
229
|
-
/** Подпись каждой ручки — ключ словаря кита */
|
|
230
203
|
const HANDLE_LABELS = {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
204
|
+
n: "uiImageCropperHandleN",
|
|
205
|
+
s: "uiImageCropperHandleS",
|
|
206
|
+
e: "uiImageCropperHandleE",
|
|
207
|
+
w: "uiImageCropperHandleW",
|
|
208
|
+
ne: "uiImageCropperHandleNe",
|
|
209
|
+
nw: "uiImageCropperHandleNw",
|
|
210
|
+
se: "uiImageCropperHandleSe",
|
|
211
|
+
sw: "uiImageCropperHandleSw"
|
|
239
212
|
};
|
|
240
213
|
function sameRect(a, b) {
|
|
241
|
-
|
|
214
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
242
215
|
}
|
|
243
216
|
function optionalNumber(value) {
|
|
244
|
-
|
|
217
|
+
return value === null || value === void 0 || value === "" ? null : numberAttribute(value, 0);
|
|
245
218
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
219
|
+
var RtImageCropperComponent = class RtImageCropperComponent {
|
|
220
|
+
#destroyRef;
|
|
221
|
+
#window;
|
|
222
|
+
#document;
|
|
223
|
+
#platform;
|
|
224
|
+
#fieldSize;
|
|
225
|
+
#source;
|
|
226
|
+
#frame;
|
|
227
|
+
#ratio;
|
|
228
|
+
#fit;
|
|
229
|
+
#image;
|
|
230
|
+
#pending;
|
|
231
|
+
#sourceType;
|
|
232
|
+
#sourceName;
|
|
233
|
+
#drag;
|
|
234
|
+
#resultTicket;
|
|
235
|
+
constructor() {
|
|
236
|
+
this.#destroyRef = inject(DestroyRef);
|
|
237
|
+
this.#window = inject(WINDOW);
|
|
238
|
+
this.#document = inject(DOCUMENT);
|
|
239
|
+
this.#platform = inject(PlatformService);
|
|
240
|
+
this.#fieldSize = signal({
|
|
241
|
+
width: 0,
|
|
242
|
+
height: 0
|
|
243
|
+
}, ...ngDevMode ? [{ debugName: "#fieldSize" }] : /* istanbul ignore next */ []);
|
|
244
|
+
this.#source = signal({
|
|
245
|
+
width: 0,
|
|
246
|
+
height: 0
|
|
247
|
+
}, ...ngDevMode ? [{ debugName: "#source" }] : /* istanbul ignore next */ []);
|
|
248
|
+
this.#frame = signal({
|
|
249
|
+
x: 0,
|
|
250
|
+
y: 0,
|
|
251
|
+
width: 0,
|
|
252
|
+
height: 0
|
|
253
|
+
}, ...ngDevMode ? [{ debugName: "#frame" }] : /* istanbul ignore next */ []);
|
|
254
|
+
this.#ratio = computed(() => frameRatio(this.ratio(), this.round()), ...ngDevMode ? [{ debugName: "#ratio" }] : /* istanbul ignore next */ []);
|
|
255
|
+
this.#fit = computed(() => fitSource(this.#source(), this.#fieldSize()), ...ngDevMode ? [{ debugName: "#fit" }] : /* istanbul ignore next */ []);
|
|
256
|
+
this.#image = null;
|
|
257
|
+
this.#pending = null;
|
|
258
|
+
this.#sourceType = "";
|
|
259
|
+
this.#sourceName = "";
|
|
260
|
+
this.#drag = null;
|
|
261
|
+
this.#resultTicket = 0;
|
|
262
|
+
this.field = viewChild.required("field", ...ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []);
|
|
263
|
+
this.t = inject(RT_KIT_LABELS);
|
|
264
|
+
this.handles = RT_IMAGE_CROPPER_HANDLES;
|
|
265
|
+
this.handleLabels = HANDLE_LABELS;
|
|
266
|
+
this.state = signal("empty", ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
267
|
+
this.placeholderText = computed(() => this.placeholder() || this.t().uiImageCropperPlaceholder, ...ngDevMode ? [{ debugName: "placeholderText" }] : /* istanbul ignore next */ []);
|
|
268
|
+
this.url = signal(null, ...ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []);
|
|
269
|
+
this.image = computed(() => {
|
|
270
|
+
const fit = this.#fit();
|
|
271
|
+
return {
|
|
272
|
+
x: fit.offsetX,
|
|
273
|
+
y: fit.offsetY,
|
|
274
|
+
width: fit.width,
|
|
275
|
+
height: fit.height
|
|
276
|
+
};
|
|
277
|
+
}, ...ngDevMode ? [{ debugName: "image" }] : /* istanbul ignore next */ []);
|
|
278
|
+
this.frameBox = computed(() => frameInField(this.#frame(), this.#fit()), ...ngDevMode ? [{ debugName: "frameBox" }] : /* istanbul ignore next */ []);
|
|
279
|
+
this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
280
|
+
this.file = input(null, ...ngDevMode ? [{ debugName: "file" }] : /* istanbul ignore next */ []);
|
|
281
|
+
this.ratio = input(null, {
|
|
282
|
+
...ngDevMode ? { debugName: "ratio" } : /* istanbul ignore next */ {},
|
|
283
|
+
transform: optionalNumber
|
|
284
|
+
});
|
|
285
|
+
this.round = input(false, {
|
|
286
|
+
...ngDevMode ? { debugName: "round" } : /* istanbul ignore next */ {},
|
|
287
|
+
transform: booleanAttribute
|
|
288
|
+
});
|
|
289
|
+
this.minSize = input(DEFAULT_MIN_SIZE, {
|
|
290
|
+
...ngDevMode ? { debugName: "minSize" } : /* istanbul ignore next */ {},
|
|
291
|
+
transform: (value) => numberAttribute(value, DEFAULT_MIN_SIZE)
|
|
292
|
+
});
|
|
293
|
+
this.format = input(null, ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
|
|
294
|
+
this.quality = input(92, {
|
|
295
|
+
...ngDevMode ? { debugName: "quality" } : /* istanbul ignore next */ {},
|
|
296
|
+
transform: (value) => numberAttribute(value, 92)
|
|
297
|
+
});
|
|
298
|
+
this.disabled = input(false, {
|
|
299
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
300
|
+
transform: booleanAttribute
|
|
301
|
+
});
|
|
302
|
+
this.cropped = output();
|
|
303
|
+
this.loadFailed = output();
|
|
304
|
+
effect(() => {
|
|
305
|
+
const file = this.file();
|
|
306
|
+
untracked(() => this.#load(file));
|
|
307
|
+
});
|
|
308
|
+
effect(() => {
|
|
309
|
+
const ratio = this.#ratio();
|
|
310
|
+
untracked(() => {
|
|
311
|
+
if (this.state() === "ready") {
|
|
312
|
+
this.#frame.set(initialFrame(this.#source(), ratio));
|
|
313
|
+
this.#emitResult();
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
afterNextRender(() => this.#observe(this.field().nativeElement));
|
|
318
|
+
this.#destroyRef.onDestroy(() => this.#revoke());
|
|
319
|
+
}
|
|
320
|
+
onPointerDown(event, handle) {
|
|
321
|
+
if (this.disabled() || this.#drag !== null || event.pointerType === "mouse" && event.button !== 0) return;
|
|
322
|
+
event.preventDefault();
|
|
323
|
+
event.stopPropagation();
|
|
324
|
+
const target = event.currentTarget;
|
|
325
|
+
if (target instanceof this.#window.HTMLElement && typeof target.setPointerCapture === "function") target.setPointerCapture(event.pointerId);
|
|
326
|
+
this.#drag = {
|
|
327
|
+
pointerId: event.pointerId,
|
|
328
|
+
startX: event.clientX,
|
|
329
|
+
startY: event.clientY,
|
|
330
|
+
startFrame: this.#frame(),
|
|
331
|
+
handle
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
onPointerMove(event) {
|
|
335
|
+
const drag = this.#drag;
|
|
336
|
+
if (drag === null || drag.pointerId !== event.pointerId) return;
|
|
337
|
+
event.preventDefault();
|
|
338
|
+
event.stopPropagation();
|
|
339
|
+
const delta = fieldDelta(event.clientX - drag.startX, event.clientY - drag.startY, this.#fit().scale);
|
|
340
|
+
this.#frame.set(this.#change(drag.startFrame, drag.handle, delta));
|
|
341
|
+
}
|
|
342
|
+
onPointerUp(event) {
|
|
343
|
+
const drag = this.#drag;
|
|
344
|
+
if (drag === null || drag.pointerId !== event.pointerId) return;
|
|
345
|
+
event.stopPropagation();
|
|
346
|
+
this.#drag = null;
|
|
347
|
+
const target = event.currentTarget;
|
|
348
|
+
if (target instanceof this.#window.HTMLElement && typeof target.releasePointerCapture === "function") target.releasePointerCapture(event.pointerId);
|
|
349
|
+
if (!sameRect(drag.startFrame, this.#frame())) this.#emitResult();
|
|
350
|
+
}
|
|
351
|
+
onKeyDown(event, handle) {
|
|
352
|
+
if (this.disabled()) return;
|
|
353
|
+
const delta = keyDelta(event.key, event.shiftKey, this.#fit().scale);
|
|
354
|
+
if (delta === null) return;
|
|
355
|
+
event.preventDefault();
|
|
356
|
+
event.stopPropagation();
|
|
357
|
+
const before = this.#frame();
|
|
358
|
+
const next = this.#change(before, handle, delta);
|
|
359
|
+
if (!sameRect(before, next)) {
|
|
360
|
+
this.#frame.set(next);
|
|
361
|
+
this.#emitResult();
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
#change(frame, handle, delta) {
|
|
365
|
+
return handle === null ? moveFrame(frame, delta, this.#source()) : resizeFrame(frame, handle, delta, this.#source(), this.#ratio(), this.minSize());
|
|
366
|
+
}
|
|
367
|
+
#load(file) {
|
|
368
|
+
this.#revoke();
|
|
369
|
+
this.#image = null;
|
|
370
|
+
this.#pending = null;
|
|
371
|
+
this.#drag = null;
|
|
372
|
+
this.#resultTicket++;
|
|
373
|
+
if (file === null || !this.#platform.isPlatformBrowser) {
|
|
374
|
+
this.state.set("empty");
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
this.#sourceType = file.type;
|
|
378
|
+
this.#sourceName = file instanceof this.#window.File ? file.name : "";
|
|
379
|
+
const url = this.#window.URL.createObjectURL(file);
|
|
380
|
+
const image = new this.#window.Image();
|
|
381
|
+
this.#pending = image;
|
|
382
|
+
this.url.set(url);
|
|
383
|
+
this.state.set("loading");
|
|
384
|
+
image.onload = () => {
|
|
385
|
+
if (this.#pending === image) {
|
|
386
|
+
this.#pending = null;
|
|
387
|
+
this.#ready(image);
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
image.onerror = () => {
|
|
391
|
+
if (this.#pending === image) {
|
|
392
|
+
this.#pending = null;
|
|
393
|
+
this.#refuse();
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
image.src = url;
|
|
397
|
+
}
|
|
398
|
+
#ready(image) {
|
|
399
|
+
if (image.naturalWidth <= 0 || image.naturalHeight <= 0) {
|
|
400
|
+
this.#refuse();
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
this.#image = image;
|
|
404
|
+
this.#source.set({
|
|
405
|
+
width: image.naturalWidth,
|
|
406
|
+
height: image.naturalHeight
|
|
407
|
+
});
|
|
408
|
+
this.#frame.set(initialFrame(this.#source(), this.#ratio()));
|
|
409
|
+
this.state.set("ready");
|
|
410
|
+
this.#emitResult();
|
|
411
|
+
}
|
|
412
|
+
#refuse() {
|
|
413
|
+
this.state.set("refusal");
|
|
414
|
+
this.loadFailed.emit();
|
|
415
|
+
}
|
|
416
|
+
#revoke() {
|
|
417
|
+
const url = this.url();
|
|
418
|
+
if (url !== null) {
|
|
419
|
+
this.#window.URL.revokeObjectURL(url);
|
|
420
|
+
this.url.set(null);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
#observe(field) {
|
|
424
|
+
const measure = () => this.#fieldSize.set({
|
|
425
|
+
width: field.clientWidth,
|
|
426
|
+
height: field.clientHeight
|
|
427
|
+
});
|
|
428
|
+
measure();
|
|
429
|
+
if (typeof this.#window.ResizeObserver !== "function") return;
|
|
430
|
+
const observer = new this.#window.ResizeObserver(measure);
|
|
431
|
+
observer.observe(field);
|
|
432
|
+
this.#destroyRef.onDestroy(() => observer.disconnect());
|
|
433
|
+
}
|
|
434
|
+
#emitResult() {
|
|
435
|
+
const image = this.#image;
|
|
436
|
+
if (image === null) return;
|
|
437
|
+
this.#resultTicket++;
|
|
438
|
+
const ticket = this.#resultTicket;
|
|
439
|
+
const area = cropArea(this.#frame(), this.#source());
|
|
440
|
+
const canvas = this.#document.createElement("canvas");
|
|
441
|
+
canvas.width = area.width;
|
|
442
|
+
canvas.height = area.height;
|
|
443
|
+
const context = canvas.getContext("2d");
|
|
444
|
+
if (context === null) return;
|
|
445
|
+
context.drawImage(image, area.x, area.y, area.width, area.height, 0, 0, area.width, area.height);
|
|
446
|
+
const type = resultType(this.format(), this.#sourceType);
|
|
447
|
+
canvas.toBlob((blob) => {
|
|
448
|
+
if (blob === null || ticket !== this.#resultTicket) return;
|
|
449
|
+
const file = new this.#window.File([blob], resultFileName(this.#sourceName, type), { type });
|
|
450
|
+
this.cropped.emit({
|
|
451
|
+
file,
|
|
452
|
+
frame: area
|
|
453
|
+
});
|
|
454
|
+
}, type, resultQuality(this.quality()));
|
|
455
|
+
}
|
|
456
|
+
static {
|
|
457
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
458
|
+
minVersion: "12.0.0",
|
|
459
|
+
version: "22.2.2",
|
|
460
|
+
ngImport: i0,
|
|
461
|
+
type: RtImageCropperComponent,
|
|
462
|
+
deps: [],
|
|
463
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
static {
|
|
467
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
468
|
+
minVersion: "17.0.0",
|
|
469
|
+
version: "22.2.2",
|
|
470
|
+
type: RtImageCropperComponent,
|
|
471
|
+
isStandalone: true,
|
|
472
|
+
selector: "rt-image-cropper",
|
|
473
|
+
inputs: {
|
|
474
|
+
placeholder: {
|
|
475
|
+
classPropertyName: "placeholder",
|
|
476
|
+
publicName: "placeholder",
|
|
477
|
+
isSignal: true,
|
|
478
|
+
isRequired: false,
|
|
479
|
+
transformFunction: null
|
|
480
|
+
},
|
|
481
|
+
file: {
|
|
482
|
+
classPropertyName: "file",
|
|
483
|
+
publicName: "file",
|
|
484
|
+
isSignal: true,
|
|
485
|
+
isRequired: false,
|
|
486
|
+
transformFunction: null
|
|
487
|
+
},
|
|
488
|
+
ratio: {
|
|
489
|
+
classPropertyName: "ratio",
|
|
490
|
+
publicName: "ratio",
|
|
491
|
+
isSignal: true,
|
|
492
|
+
isRequired: false,
|
|
493
|
+
transformFunction: null
|
|
494
|
+
},
|
|
495
|
+
round: {
|
|
496
|
+
classPropertyName: "round",
|
|
497
|
+
publicName: "round",
|
|
498
|
+
isSignal: true,
|
|
499
|
+
isRequired: false,
|
|
500
|
+
transformFunction: null
|
|
501
|
+
},
|
|
502
|
+
minSize: {
|
|
503
|
+
classPropertyName: "minSize",
|
|
504
|
+
publicName: "minSize",
|
|
505
|
+
isSignal: true,
|
|
506
|
+
isRequired: false,
|
|
507
|
+
transformFunction: null
|
|
508
|
+
},
|
|
509
|
+
format: {
|
|
510
|
+
classPropertyName: "format",
|
|
511
|
+
publicName: "format",
|
|
512
|
+
isSignal: true,
|
|
513
|
+
isRequired: false,
|
|
514
|
+
transformFunction: null
|
|
515
|
+
},
|
|
516
|
+
quality: {
|
|
517
|
+
classPropertyName: "quality",
|
|
518
|
+
publicName: "quality",
|
|
519
|
+
isSignal: true,
|
|
520
|
+
isRequired: false,
|
|
521
|
+
transformFunction: null
|
|
522
|
+
},
|
|
523
|
+
disabled: {
|
|
524
|
+
classPropertyName: "disabled",
|
|
525
|
+
publicName: "disabled",
|
|
526
|
+
isSignal: true,
|
|
527
|
+
isRequired: false,
|
|
528
|
+
transformFunction: null
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
outputs: {
|
|
532
|
+
cropped: "cropped",
|
|
533
|
+
loadFailed: "loadFailed"
|
|
534
|
+
},
|
|
535
|
+
host: {
|
|
536
|
+
properties: {
|
|
537
|
+
"class.rt-image-cropper--round": "round()",
|
|
538
|
+
"class.rt-image-cropper--disabled": "disabled()",
|
|
539
|
+
"style.--rt-image-cropper-image-x": "image().x + 'px'",
|
|
540
|
+
"style.--rt-image-cropper-image-y": "image().y + 'px'",
|
|
541
|
+
"style.--rt-image-cropper-image-width": "image().width + 'px'",
|
|
542
|
+
"style.--rt-image-cropper-image-height": "image().height + 'px'",
|
|
543
|
+
"style.--rt-image-cropper-frame-x": "frameBox().x + 'px'",
|
|
544
|
+
"style.--rt-image-cropper-frame-y": "frameBox().y + 'px'",
|
|
545
|
+
"style.--rt-image-cropper-frame-width": "frameBox().width + 'px'",
|
|
546
|
+
"style.--rt-image-cropper-frame-height": "frameBox().height + 'px'"
|
|
547
|
+
},
|
|
548
|
+
classAttribute: "rt-image-cropper"
|
|
549
|
+
},
|
|
550
|
+
viewQueries: [{
|
|
551
|
+
propertyName: "field",
|
|
552
|
+
first: true,
|
|
553
|
+
predicate: ["field"],
|
|
554
|
+
descendants: true,
|
|
555
|
+
isSignal: true
|
|
556
|
+
}],
|
|
557
|
+
ngImport: i0,
|
|
558
|
+
template: "<ng-container rtBlock=\"rt-image-cropper\">\n <div #field rtElem=\"field\" qa-dataid=\"image-cropper-field\">\n @switch (state()) {\n @case ('empty') {\n <p rtElem=\"placeholder\" qa-dataid=\"image-cropper-placeholder\">{{ placeholderText() }}</p>\n }\n @case ('loading') {\n <rt-spinner rtElem=\"spinner\" qa-dataid=\"image-cropper-spinner\" />\n }\n @case ('refusal') {\n <p rtElem=\"refusal\" qa-dataid=\"image-cropper-refusal\">{{ t().uiImageCropperRefusal }}</p>\n }\n @case ('ready') {\n <img rtElem=\"image\" qa-dataid=\"image-cropper-image\" alt=\"\" draggable=\"false\" [src]=\"url()\" />\n <div\n rtElem=\"frame\"\n qa-dataid=\"image-cropper-frame\"\n role=\"group\"\n [attr.aria-label]=\"t().uiImageCropperFrame\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event, null)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (keydown)=\"onKeyDown($event, null)\">\n @for (handle of handles; track handle) {\n <span\n rtElem=\"handle\"\n role=\"button\"\n [attr.qa-dataid]=\"'image-cropper-handle-' + handle\"\n [rtMod]=\"{ side: handle }\"\n [attr.aria-label]=\"t()[handleLabels[handle]]\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event, handle)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (keydown)=\"onKeyDown($event, handle)\"></span>\n }\n </div>\n }\n }\n </div>\n</ng-container>\n",
|
|
559
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-image-cropper{--rt-image-cropper-height: calc(var(--rt-size-20) * 4);--rt-image-cropper-radius: var(--rt-radius-md);--rt-image-cropper-frame-radius: var(--rt-radius-none);--rt-image-cropper-field-bg: var(--rt-color-bg-subtle);--rt-image-cropper-shade: var(--rt-overlay-black-50);--rt-image-cropper-rim-width: var(--rt-border-width-thin);--rt-image-cropper-rim-color: var(--rt-overlay-white-50);--rt-image-cropper-dash-style: none;--rt-image-cropper-dash-color: transparent;--rt-image-cropper-dash-opacity: 1;--rt-image-cropper-handle-size: var(--rt-size-3);--rt-image-cropper-handle-bg: var(--rt-color-action-on-primary);--rt-image-cropper-handle-border: var(--rt-color-border-strong);--rt-image-cropper-focus-shadow: var(--rt-shadow-focus-ring);--rt-image-cropper-text-color: var(--rt-color-text-muted);--rt-image-cropper-disabled-opacity: .5;--rt-image-cropper-image-x: 0;--rt-image-cropper-image-y: 0;--rt-image-cropper-image-width: 0;--rt-image-cropper-image-height: 0;--rt-image-cropper-frame-x: 0;--rt-image-cropper-frame-y: 0;--rt-image-cropper-frame-width: 0;--rt-image-cropper-frame-height: 0;display:block;width:100%}.rt-image-cropper__field{position:relative;overflow:hidden;height:var(--rt-image-cropper-height);border-radius:var(--rt-image-cropper-radius);background:var(--rt-image-cropper-field-bg);-webkit-user-select:none;user-select:none}.rt-image-cropper__spinner{position:absolute;inset:50% auto auto 50%;translate:-50% -50%}.rt-image-cropper__placeholder,.rt-image-cropper__refusal{position:absolute;display:flex;align-items:center;justify-content:center;padding:var(--rt-space-md);margin:0;color:var(--rt-image-cropper-text-color);inset:0;text-align:center}.rt-image-cropper__image{position:absolute;top:var(--rt-image-cropper-image-y);left:var(--rt-image-cropper-image-x);width:var(--rt-image-cropper-image-width);max-width:none;height:var(--rt-image-cropper-image-height);image-orientation:from-image;pointer-events:none}.rt-image-cropper__frame{position:absolute;top:var(--rt-image-cropper-frame-y);left:var(--rt-image-cropper-frame-x);width:var(--rt-image-cropper-frame-width);height:var(--rt-image-cropper-frame-height);box-sizing:border-box;border:var(--rt-image-cropper-rim-width) solid var(--rt-image-cropper-rim-color);border-radius:var(--rt-image-cropper-frame-radius);cursor:move;outline:100vmax solid var(--rt-image-cropper-shade);touch-action:none}.rt-image-cropper__frame:after{position:absolute;border:var(--rt-image-cropper-rim-width) var(--rt-image-cropper-dash-style) var(--rt-image-cropper-dash-color);border-radius:inherit;content:\"\";inset:calc(-1 * var(--rt-image-cropper-rim-width));opacity:var(--rt-image-cropper-dash-opacity);pointer-events:none}.rt-image-cropper__frame:focus-visible{box-shadow:var(--rt-image-cropper-focus-shadow)}.rt-image-cropper__handle{position:absolute;width:var(--rt-image-cropper-handle-size);height:var(--rt-image-cropper-handle-size);box-sizing:border-box;border:var(--rt-image-cropper-rim-width) solid var(--rt-image-cropper-handle-border);background:var(--rt-image-cropper-handle-bg);touch-action:none}.rt-image-cropper__handle:focus-visible{box-shadow:var(--rt-image-cropper-focus-shadow);outline:none}.rt-image-cropper__handle--side--nw{top:0;left:0;cursor:nwse-resize}.rt-image-cropper__handle--side--n{top:0;left:50%;cursor:ns-resize;translate:-50% 0}.rt-image-cropper__handle--side--ne{top:0;left:100%;cursor:nesw-resize;translate:-100% 0}.rt-image-cropper__handle--side--e{top:50%;left:100%;cursor:ew-resize;translate:-100% -50%}.rt-image-cropper__handle--side--se{top:100%;left:100%;cursor:nwse-resize;translate:-100% -100%}.rt-image-cropper__handle--side--s{top:100%;left:50%;cursor:ns-resize;translate:-50% -100%}.rt-image-cropper__handle--side--sw{top:100%;left:0;cursor:nesw-resize;translate:0 -100%}.rt-image-cropper__handle--side--w{top:50%;left:0;cursor:ew-resize;translate:0 -50%}:is(.rt-preset-material,[data-preset=material]) .rt-image-cropper{--rt-image-cropper-radius: var(--rt-radius-none);--rt-image-cropper-field-bg: transparent;--rt-image-cropper-shade: var(--rt-overlay-white-25);--rt-image-cropper-dash-style: dashed;--rt-image-cropper-dash-color: var(--rt-mat-dark-40);--rt-image-cropper-dash-opacity: .75;--rt-image-cropper-handle-size: var(--rt-size-2);--rt-image-cropper-handle-bg: var(--rt-mat-dark-40);--rt-image-cropper-handle-border: var(--rt-overlay-white-50)}@media(pointer:coarse){:is(.rt-preset-material,[data-preset=material]) .rt-image-cropper{--rt-image-cropper-handle-size: var(--rt-size-6)}}.rt-image-cropper--round{--rt-image-cropper-frame-radius: var(--rt-radius-full)}.rt-image-cropper--disabled .rt-image-cropper__frame,.rt-image-cropper--disabled .rt-image-cropper__handle{cursor:default}.rt-image-cropper--disabled .rt-image-cropper__handle,.rt-image-cropper--disabled .rt-image-cropper__image{opacity:var(--rt-image-cropper-disabled-opacity)}@media(pointer:coarse){.rt-image-cropper{--rt-image-cropper-handle-size: var(--rt-size-6)}}}\n"],
|
|
560
|
+
dependencies: [
|
|
561
|
+
{
|
|
562
|
+
kind: "directive",
|
|
563
|
+
type: BlockDirective,
|
|
564
|
+
selector: "[rtBlock]",
|
|
565
|
+
inputs: ["rtMod"]
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
kind: "directive",
|
|
569
|
+
type: ElemDirective,
|
|
570
|
+
selector: "[rtElem]",
|
|
571
|
+
inputs: ["rtMod"]
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
kind: "directive",
|
|
575
|
+
type: ModDirective,
|
|
576
|
+
selector: "[rtMod]"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
kind: "component",
|
|
580
|
+
type: RtSpinnerComponent,
|
|
581
|
+
selector: "rt-spinner",
|
|
582
|
+
inputs: [
|
|
583
|
+
"diameter",
|
|
584
|
+
"color",
|
|
585
|
+
"appearance",
|
|
586
|
+
"overlay",
|
|
587
|
+
"backdrop",
|
|
588
|
+
"plate"
|
|
589
|
+
]
|
|
590
|
+
}
|
|
591
|
+
],
|
|
592
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
593
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
598
|
+
minVersion: "12.0.0",
|
|
599
|
+
version: "22.2.2",
|
|
600
|
+
ngImport: i0,
|
|
601
|
+
type: RtImageCropperComponent,
|
|
602
|
+
decorators: [{
|
|
603
|
+
type: Component,
|
|
604
|
+
args: [{
|
|
605
|
+
selector: "rt-image-cropper",
|
|
606
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
607
|
+
encapsulation: ViewEncapsulation.None,
|
|
608
|
+
imports: [
|
|
609
|
+
BlockDirective,
|
|
610
|
+
ElemDirective,
|
|
611
|
+
ModDirective,
|
|
612
|
+
RtSpinnerComponent
|
|
613
|
+
],
|
|
614
|
+
host: {
|
|
615
|
+
class: BEM_BLOCK,
|
|
616
|
+
"[class.rt-image-cropper--round]": "round()",
|
|
617
|
+
"[class.rt-image-cropper--disabled]": "disabled()",
|
|
618
|
+
"[style.--rt-image-cropper-image-x]": "image().x + 'px'",
|
|
619
|
+
"[style.--rt-image-cropper-image-y]": "image().y + 'px'",
|
|
620
|
+
"[style.--rt-image-cropper-image-width]": "image().width + 'px'",
|
|
621
|
+
"[style.--rt-image-cropper-image-height]": "image().height + 'px'",
|
|
622
|
+
"[style.--rt-image-cropper-frame-x]": "frameBox().x + 'px'",
|
|
623
|
+
"[style.--rt-image-cropper-frame-y]": "frameBox().y + 'px'",
|
|
624
|
+
"[style.--rt-image-cropper-frame-width]": "frameBox().width + 'px'",
|
|
625
|
+
"[style.--rt-image-cropper-frame-height]": "frameBox().height + 'px'"
|
|
626
|
+
},
|
|
627
|
+
template: "<ng-container rtBlock=\"rt-image-cropper\">\n <div #field rtElem=\"field\" qa-dataid=\"image-cropper-field\">\n @switch (state()) {\n @case ('empty') {\n <p rtElem=\"placeholder\" qa-dataid=\"image-cropper-placeholder\">{{ placeholderText() }}</p>\n }\n @case ('loading') {\n <rt-spinner rtElem=\"spinner\" qa-dataid=\"image-cropper-spinner\" />\n }\n @case ('refusal') {\n <p rtElem=\"refusal\" qa-dataid=\"image-cropper-refusal\">{{ t().uiImageCropperRefusal }}</p>\n }\n @case ('ready') {\n <img rtElem=\"image\" qa-dataid=\"image-cropper-image\" alt=\"\" draggable=\"false\" [src]=\"url()\" />\n <div\n rtElem=\"frame\"\n qa-dataid=\"image-cropper-frame\"\n role=\"group\"\n [attr.aria-label]=\"t().uiImageCropperFrame\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event, null)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (keydown)=\"onKeyDown($event, null)\">\n @for (handle of handles; track handle) {\n <span\n rtElem=\"handle\"\n role=\"button\"\n [attr.qa-dataid]=\"'image-cropper-handle-' + handle\"\n [rtMod]=\"{ side: handle }\"\n [attr.aria-label]=\"t()[handleLabels[handle]]\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event, handle)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (keydown)=\"onKeyDown($event, handle)\"></span>\n }\n </div>\n }\n }\n </div>\n</ng-container>\n",
|
|
628
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-image-cropper{--rt-image-cropper-height: calc(var(--rt-size-20) * 4);--rt-image-cropper-radius: var(--rt-radius-md);--rt-image-cropper-frame-radius: var(--rt-radius-none);--rt-image-cropper-field-bg: var(--rt-color-bg-subtle);--rt-image-cropper-shade: var(--rt-overlay-black-50);--rt-image-cropper-rim-width: var(--rt-border-width-thin);--rt-image-cropper-rim-color: var(--rt-overlay-white-50);--rt-image-cropper-dash-style: none;--rt-image-cropper-dash-color: transparent;--rt-image-cropper-dash-opacity: 1;--rt-image-cropper-handle-size: var(--rt-size-3);--rt-image-cropper-handle-bg: var(--rt-color-action-on-primary);--rt-image-cropper-handle-border: var(--rt-color-border-strong);--rt-image-cropper-focus-shadow: var(--rt-shadow-focus-ring);--rt-image-cropper-text-color: var(--rt-color-text-muted);--rt-image-cropper-disabled-opacity: .5;--rt-image-cropper-image-x: 0;--rt-image-cropper-image-y: 0;--rt-image-cropper-image-width: 0;--rt-image-cropper-image-height: 0;--rt-image-cropper-frame-x: 0;--rt-image-cropper-frame-y: 0;--rt-image-cropper-frame-width: 0;--rt-image-cropper-frame-height: 0;display:block;width:100%}.rt-image-cropper__field{position:relative;overflow:hidden;height:var(--rt-image-cropper-height);border-radius:var(--rt-image-cropper-radius);background:var(--rt-image-cropper-field-bg);-webkit-user-select:none;user-select:none}.rt-image-cropper__spinner{position:absolute;inset:50% auto auto 50%;translate:-50% -50%}.rt-image-cropper__placeholder,.rt-image-cropper__refusal{position:absolute;display:flex;align-items:center;justify-content:center;padding:var(--rt-space-md);margin:0;color:var(--rt-image-cropper-text-color);inset:0;text-align:center}.rt-image-cropper__image{position:absolute;top:var(--rt-image-cropper-image-y);left:var(--rt-image-cropper-image-x);width:var(--rt-image-cropper-image-width);max-width:none;height:var(--rt-image-cropper-image-height);image-orientation:from-image;pointer-events:none}.rt-image-cropper__frame{position:absolute;top:var(--rt-image-cropper-frame-y);left:var(--rt-image-cropper-frame-x);width:var(--rt-image-cropper-frame-width);height:var(--rt-image-cropper-frame-height);box-sizing:border-box;border:var(--rt-image-cropper-rim-width) solid var(--rt-image-cropper-rim-color);border-radius:var(--rt-image-cropper-frame-radius);cursor:move;outline:100vmax solid var(--rt-image-cropper-shade);touch-action:none}.rt-image-cropper__frame:after{position:absolute;border:var(--rt-image-cropper-rim-width) var(--rt-image-cropper-dash-style) var(--rt-image-cropper-dash-color);border-radius:inherit;content:\"\";inset:calc(-1 * var(--rt-image-cropper-rim-width));opacity:var(--rt-image-cropper-dash-opacity);pointer-events:none}.rt-image-cropper__frame:focus-visible{box-shadow:var(--rt-image-cropper-focus-shadow)}.rt-image-cropper__handle{position:absolute;width:var(--rt-image-cropper-handle-size);height:var(--rt-image-cropper-handle-size);box-sizing:border-box;border:var(--rt-image-cropper-rim-width) solid var(--rt-image-cropper-handle-border);background:var(--rt-image-cropper-handle-bg);touch-action:none}.rt-image-cropper__handle:focus-visible{box-shadow:var(--rt-image-cropper-focus-shadow);outline:none}.rt-image-cropper__handle--side--nw{top:0;left:0;cursor:nwse-resize}.rt-image-cropper__handle--side--n{top:0;left:50%;cursor:ns-resize;translate:-50% 0}.rt-image-cropper__handle--side--ne{top:0;left:100%;cursor:nesw-resize;translate:-100% 0}.rt-image-cropper__handle--side--e{top:50%;left:100%;cursor:ew-resize;translate:-100% -50%}.rt-image-cropper__handle--side--se{top:100%;left:100%;cursor:nwse-resize;translate:-100% -100%}.rt-image-cropper__handle--side--s{top:100%;left:50%;cursor:ns-resize;translate:-50% -100%}.rt-image-cropper__handle--side--sw{top:100%;left:0;cursor:nesw-resize;translate:0 -100%}.rt-image-cropper__handle--side--w{top:50%;left:0;cursor:ew-resize;translate:0 -50%}:is(.rt-preset-material,[data-preset=material]) .rt-image-cropper{--rt-image-cropper-radius: var(--rt-radius-none);--rt-image-cropper-field-bg: transparent;--rt-image-cropper-shade: var(--rt-overlay-white-25);--rt-image-cropper-dash-style: dashed;--rt-image-cropper-dash-color: var(--rt-mat-dark-40);--rt-image-cropper-dash-opacity: .75;--rt-image-cropper-handle-size: var(--rt-size-2);--rt-image-cropper-handle-bg: var(--rt-mat-dark-40);--rt-image-cropper-handle-border: var(--rt-overlay-white-50)}@media(pointer:coarse){:is(.rt-preset-material,[data-preset=material]) .rt-image-cropper{--rt-image-cropper-handle-size: var(--rt-size-6)}}.rt-image-cropper--round{--rt-image-cropper-frame-radius: var(--rt-radius-full)}.rt-image-cropper--disabled .rt-image-cropper__frame,.rt-image-cropper--disabled .rt-image-cropper__handle{cursor:default}.rt-image-cropper--disabled .rt-image-cropper__handle,.rt-image-cropper--disabled .rt-image-cropper__image{opacity:var(--rt-image-cropper-disabled-opacity)}@media(pointer:coarse){.rt-image-cropper{--rt-image-cropper-handle-size: var(--rt-size-6)}}}\n"]
|
|
629
|
+
}]
|
|
630
|
+
}],
|
|
631
|
+
ctorParameters: () => [],
|
|
632
|
+
propDecorators: {
|
|
633
|
+
field: [{
|
|
634
|
+
type: i0.ViewChild,
|
|
635
|
+
args: ["field", { isSignal: true }]
|
|
636
|
+
}],
|
|
637
|
+
placeholder: [{
|
|
638
|
+
type: i0.Input,
|
|
639
|
+
args: [{
|
|
640
|
+
isSignal: true,
|
|
641
|
+
alias: "placeholder",
|
|
642
|
+
required: false
|
|
643
|
+
}]
|
|
644
|
+
}],
|
|
645
|
+
file: [{
|
|
646
|
+
type: i0.Input,
|
|
647
|
+
args: [{
|
|
648
|
+
isSignal: true,
|
|
649
|
+
alias: "file",
|
|
650
|
+
required: false
|
|
651
|
+
}]
|
|
652
|
+
}],
|
|
653
|
+
ratio: [{
|
|
654
|
+
type: i0.Input,
|
|
655
|
+
args: [{
|
|
656
|
+
isSignal: true,
|
|
657
|
+
alias: "ratio",
|
|
658
|
+
required: false
|
|
659
|
+
}]
|
|
660
|
+
}],
|
|
661
|
+
round: [{
|
|
662
|
+
type: i0.Input,
|
|
663
|
+
args: [{
|
|
664
|
+
isSignal: true,
|
|
665
|
+
alias: "round",
|
|
666
|
+
required: false
|
|
667
|
+
}]
|
|
668
|
+
}],
|
|
669
|
+
minSize: [{
|
|
670
|
+
type: i0.Input,
|
|
671
|
+
args: [{
|
|
672
|
+
isSignal: true,
|
|
673
|
+
alias: "minSize",
|
|
674
|
+
required: false
|
|
675
|
+
}]
|
|
676
|
+
}],
|
|
677
|
+
format: [{
|
|
678
|
+
type: i0.Input,
|
|
679
|
+
args: [{
|
|
680
|
+
isSignal: true,
|
|
681
|
+
alias: "format",
|
|
682
|
+
required: false
|
|
683
|
+
}]
|
|
684
|
+
}],
|
|
685
|
+
quality: [{
|
|
686
|
+
type: i0.Input,
|
|
687
|
+
args: [{
|
|
688
|
+
isSignal: true,
|
|
689
|
+
alias: "quality",
|
|
690
|
+
required: false
|
|
691
|
+
}]
|
|
692
|
+
}],
|
|
693
|
+
disabled: [{
|
|
694
|
+
type: i0.Input,
|
|
695
|
+
args: [{
|
|
696
|
+
isSignal: true,
|
|
697
|
+
alias: "disabled",
|
|
698
|
+
required: false
|
|
699
|
+
}]
|
|
700
|
+
}],
|
|
701
|
+
cropped: [{
|
|
702
|
+
type: i0.Output,
|
|
703
|
+
args: ["cropped"]
|
|
704
|
+
}],
|
|
705
|
+
loadFailed: [{
|
|
706
|
+
type: i0.Output,
|
|
707
|
+
args: ["loadFailed"]
|
|
708
|
+
}]
|
|
709
|
+
}
|
|
710
|
+
});
|
|
539
711
|
export { RT_IMAGE_CROPPER_HANDLES, RT_IMAGE_CROPPER_KEY_STEP, RT_IMAGE_CROPPER_KEY_STEP_LARGE, RT_IMAGE_CROPPER_QUALITY, RtImageCropperComponent, cropArea, fieldDelta, fitSource, frameInField, frameRatio, handleDirection, initialFrame, keyDelta, moveFrame, resizeFrame, resultFileName, resultQuality, resultType };
|
|
540
|
-
|
|
712
|
+
|
|
713
|
+
//# sourceMappingURL=rt-tools-ui-kit-v2-image-cropper.mjs.map
|