ngwr 16.2.0 → 16.4.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/badge/styles/_tag.scss +73 -1
- package/calendar/styles/_index.scss +22 -0
- package/carousel/styles/_index.scss +53 -1
- package/cascader/styles/_rules.scss +7 -0
- package/color-picker/styles/_index.scss +21 -0
- package/date-picker/styles/_index.scss +19 -0
- package/dropdown/styles/_index.scss +13 -19
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert-testing.mjs +70 -0
- package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +17 -6
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-aurora.mjs +3 -3
- package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
- package/fesm2022/ngwr-animations-confetti.mjs +3 -3
- package/fesm2022/ngwr-animations-decode.mjs +3 -3
- package/fesm2022/ngwr-animations-destruct.mjs +3 -3
- package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
- package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
- package/fesm2022/ngwr-animations-glitch.mjs +3 -3
- package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
- package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
- package/fesm2022/ngwr-animations-marquee.mjs +3 -3
- package/fesm2022/ngwr-animations-orbit.mjs +3 -3
- package/fesm2022/ngwr-animations-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
- package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
- package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-tilt.mjs +3 -3
- package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +129 -11
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
- package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
- package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger-testing.mjs +45 -0
- package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-testing.mjs +18 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +500 -73
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel-testing.mjs +24 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +73 -10
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +45 -37
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +3 -3
- package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +153 -37
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-comment.mjs +10 -6
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare-testing.mjs +84 -0
- package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +28 -13
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-copy-value.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +342 -69
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +3 -3
- package/fesm2022/ngwr-date.mjs +59 -8
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +18 -18
- package/fesm2022/ngwr-directives.mjs +15 -15
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +51 -29
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +70 -99
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +4 -3
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +186 -33
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +279 -16
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +9 -9
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +30 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +664 -43
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +27 -8
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +27 -8
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +27 -8
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +27 -8
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +27 -8
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +27 -8
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +27 -8
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +27 -8
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +27 -8
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +27 -8
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +27 -8
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +27 -8
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +27 -8
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +27 -8
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +27 -8
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +27 -8
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +27 -8
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +27 -8
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +27 -8
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +27 -8
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +27 -8
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +27 -8
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number-testing.mjs +11 -0
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +68 -7
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +23 -3
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +24 -1
- package/fesm2022/ngwr-input-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +152 -36
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +8 -8
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +8 -8
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-load-state.mjs +15 -15
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs +175 -13
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +6 -3
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +31 -29
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +44 -63
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +7 -1
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +58 -156
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +50 -9
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-resizable-testing.mjs +113 -0
- package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
- package/fesm2022/ngwr-resizable.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
- package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
- package/fesm2022/ngwr-schema-form.mjs +416 -19
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select-testing.mjs +19 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +361 -84
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
- package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider-testing.mjs +6 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +21 -3
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +29 -12
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +42 -11
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table-testing.mjs +157 -3
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +1051 -74
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs-testing.mjs +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +15 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +11 -0
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +128 -16
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +40 -19
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour-testing.mjs +13 -1
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +19 -15
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer-testing.mjs +6 -0
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +24 -5
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +62 -2
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +978 -79
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +97 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +33 -22
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +156 -0
- package/graph/styles/_index.scss +87 -0
- package/i18n/ar.json +29 -8
- package/i18n/cs.json +29 -8
- package/i18n/de.json +29 -8
- package/i18n/en.json +29 -8
- package/i18n/es.json +29 -8
- package/i18n/fr.json +29 -8
- package/i18n/he.json +29 -8
- package/i18n/hi.json +29 -8
- package/i18n/id.json +29 -8
- package/i18n/it.json +29 -8
- package/i18n/ja.json +29 -8
- package/i18n/ko.json +29 -8
- package/i18n/nl.json +29 -8
- package/i18n/pl.json +29 -8
- package/i18n/pt.json +29 -8
- package/i18n/ru.json +29 -8
- package/i18n/sv.json +29 -8
- package/i18n/tr.json +29 -8
- package/i18n/uk.json +29 -8
- package/i18n/vi.json +29 -8
- package/i18n/zh-TW.json +29 -8
- package/i18n/zh.json +29 -8
- package/input/styles/_index.scss +68 -1
- package/input-otp/styles/_index.scss +14 -0
- package/llms-full.txt +53 -21
- package/llms.txt +57 -24
- package/overlay/styles/_arrow.scss +4 -4
- package/package.json +33 -1
- package/popconfirm/styles/_index.scss +3 -11
- package/progress/styles/_index.scss +32 -0
- package/schema-form/styles/_index.scss +78 -0
- package/schematics/collection.json +5 -0
- package/schematics/eject/index.js +158 -0
- package/schematics/eject/schema.js +8 -0
- package/schematics/eject/schema.json +24 -0
- package/schematics/eject/source.js +295 -0
- package/schematics/use/rule.js +2 -0
- package/schematics/use/symbol-map.json +5 -0
- package/select/styles/_index.scss +127 -22
- package/skills/ngwr/SKILL.md +31 -4
- package/skills/ngwr/references/catalog.md +9 -1
- package/slider/styles/_index.scss +22 -0
- package/table/styles/_index.scss +191 -3
- package/textarea/styles/_index.scss +80 -0
- package/theme/styles/_focus.scss +16 -1
- package/theme/styles/_motion.scss +5 -0
- package/transfer/styles/_index.scss +84 -0
- package/tree/styles/_index.scss +138 -5
- package/types/ngwr-alert-testing.d.ts +88 -0
- package/types/ngwr-badge.d.ts +72 -2
- package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
- package/types/ngwr-burger-testing.d.ts +51 -0
- package/types/ngwr-calendar-testing.d.ts +18 -6
- package/types/ngwr-calendar.d.ts +272 -22
- package/types/ngwr-carousel-testing.d.ts +27 -6
- package/types/ngwr-carousel.d.ts +42 -6
- package/types/ngwr-cascader.d.ts +13 -6
- package/types/ngwr-charts-chart-legend.d.ts +9 -4
- package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
- package/types/ngwr-charts-line-chart.d.ts +7 -4
- package/types/ngwr-color-picker-testing.d.ts +15 -4
- package/types/ngwr-color-picker.d.ts +76 -6
- package/types/ngwr-compare-testing.d.ts +72 -0
- package/types/ngwr-context-menu.d.ts +2 -0
- package/types/ngwr-date-picker-testing.d.ts +23 -8
- package/types/ngwr-date-picker.d.ts +100 -9
- package/types/ngwr-date.d.ts +71 -1
- package/types/ngwr-drawer.d.ts +9 -0
- package/types/ngwr-dropdown-testing.d.ts +20 -0
- package/types/ngwr-dropdown.d.ts +26 -6
- package/types/ngwr-event-calendar.d.ts +66 -8
- package/types/ngwr-file-upload-testing.d.ts +31 -2
- package/types/ngwr-file-upload.d.ts +156 -3
- package/types/ngwr-form.d.ts +47 -3
- package/types/ngwr-graph-testing.d.ts +36 -3
- package/types/ngwr-graph.d.ts +309 -13
- package/types/ngwr-input-number-testing.d.ts +10 -0
- package/types/ngwr-input-number.d.ts +30 -1
- package/types/ngwr-input-otp.d.ts +10 -0
- package/types/ngwr-input-testing.d.ts +30 -0
- package/types/ngwr-input.d.ts +54 -3
- package/types/ngwr-overlay.d.ts +84 -5
- package/types/ngwr-pipes.d.ts +2 -1
- package/types/ngwr-popconfirm-testing.d.ts +12 -3
- package/types/ngwr-popconfirm.d.ts +28 -3
- package/types/ngwr-popover-testing.d.ts +19 -2
- package/types/ngwr-popover.d.ts +22 -2
- package/types/ngwr-progress.d.ts +29 -1
- package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
- package/types/ngwr-resizable-testing.d.ts +116 -0
- package/types/ngwr-schema-form-testing.d.ts +260 -0
- package/types/ngwr-schema-form.d.ts +76 -6
- package/types/ngwr-select-testing.d.ts +20 -0
- package/types/ngwr-select.d.ts +149 -11
- package/types/ngwr-sidebar-testing.d.ts +176 -0
- package/types/ngwr-slider-testing.d.ts +3 -1
- package/types/ngwr-slider.d.ts +21 -1
- package/types/ngwr-sortable-list.d.ts +6 -0
- package/types/ngwr-stepper.d.ts +20 -11
- package/types/ngwr-table-testing.d.ts +122 -7
- package/types/ngwr-table.d.ts +572 -50
- package/types/ngwr-tabs-testing.d.ts +14 -17
- package/types/ngwr-tabs.d.ts +6 -0
- package/types/ngwr-textarea-testing.d.ts +10 -0
- package/types/ngwr-textarea.d.ts +48 -2
- package/types/ngwr-toast.d.ts +8 -1
- package/types/ngwr-tour-testing.d.ts +10 -0
- package/types/ngwr-tour.d.ts +11 -2
- package/types/ngwr-transfer-testing.d.ts +3 -0
- package/types/ngwr-transfer.d.ts +24 -1
- package/types/ngwr-tree-testing.d.ts +65 -1
- package/types/ngwr-tree.d.ts +335 -12
- package/types/ngwr-utils.d.ts +107 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +7 -4
package/fesm2022/ngwr-graph.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { Component, Directive, LOCALE_ID, TemplateRef, ViewEncapsulation, computed, contentChild, effect, inject, input, isDevMode } from "@angular/core";
|
|
3
|
-
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import { Component, DestroyRef, Directive, LOCALE_ID, PLATFORM_ID, TemplateRef, ViewEncapsulation, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, effect, inject, input, isDevMode, linkedSignal, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
|
|
4
4
|
import { wrCheckStyles, wrNumAttr } from "ngwr/utils";
|
|
5
5
|
import { WrI18n, useI18nFormatter, useI18nText } from "ngwr/i18n";
|
|
6
|
+
import { WrPlatform } from "ngwr/platform";
|
|
6
7
|
import { Directionality } from "@angular/cdk/bidi";
|
|
7
8
|
/**
|
|
8
9
|
* @license
|
|
@@ -14,7 +15,7 @@ var WrGraphNodeTemplate = class WrGraphNodeTemplate {
|
|
|
14
15
|
template = inject(TemplateRef);
|
|
15
16
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
16
17
|
minVersion: "12.0.0",
|
|
17
|
-
version: "22.2.
|
|
18
|
+
version: "22.2.6",
|
|
18
19
|
ngImport: i0,
|
|
19
20
|
type: WrGraphNodeTemplate,
|
|
20
21
|
deps: [],
|
|
@@ -22,7 +23,7 @@ var WrGraphNodeTemplate = class WrGraphNodeTemplate {
|
|
|
22
23
|
});
|
|
23
24
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
24
25
|
minVersion: "14.0.0",
|
|
25
|
-
version: "22.2.
|
|
26
|
+
version: "22.2.6",
|
|
26
27
|
type: WrGraphNodeTemplate,
|
|
27
28
|
isStandalone: true,
|
|
28
29
|
selector: "ng-template[wrGraphNode]",
|
|
@@ -31,7 +32,7 @@ var WrGraphNodeTemplate = class WrGraphNodeTemplate {
|
|
|
31
32
|
};
|
|
32
33
|
i0.ɵɵngDeclareClassMetadata({
|
|
33
34
|
minVersion: "12.0.0",
|
|
34
|
-
version: "22.2.
|
|
35
|
+
version: "22.2.6",
|
|
35
36
|
ngImport: i0,
|
|
36
37
|
type: WrGraphNodeTemplate,
|
|
37
38
|
decorators: [{
|
|
@@ -554,10 +555,82 @@ var WrLayeredGraphLayout = class extends WrGraphLayout {
|
|
|
554
555
|
* Use of this source code is governed by an MIT-style license that can be
|
|
555
556
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
556
557
|
*/
|
|
558
|
+
const KEEP_VISIBLE = 48;
|
|
559
|
+
function clampAxis(offset, origin, extent, room) {
|
|
560
|
+
const keep = Math.min(KEEP_VISIBLE, extent, room);
|
|
561
|
+
const min = keep - extent - origin;
|
|
562
|
+
const max = room - keep - origin;
|
|
563
|
+
return Math.min(max, Math.max(min, offset));
|
|
564
|
+
}
|
|
565
|
+
const IDENTITY = {
|
|
566
|
+
x: 0,
|
|
567
|
+
y: 0,
|
|
568
|
+
k: 1
|
|
569
|
+
};
|
|
570
|
+
function roundZoom(value) {
|
|
571
|
+
return Math.round(value * 1e4) / 1e4;
|
|
572
|
+
}
|
|
573
|
+
function clampZoom(value, min, max) {
|
|
574
|
+
return roundZoom(Math.min(max, Math.max(min, Number.isFinite(value) && value > 0 ? value : 1)));
|
|
575
|
+
}
|
|
576
|
+
function zoomAround(from, k, px, py, frame) {
|
|
577
|
+
const ratio = k / from.k;
|
|
578
|
+
const dx = px - frame.originX;
|
|
579
|
+
const dy = py - frame.originY;
|
|
580
|
+
return {
|
|
581
|
+
k,
|
|
582
|
+
x: dx - (dx - from.x) * ratio,
|
|
583
|
+
y: dy - (dy - from.y) * ratio
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
function clampPan(at, frame, width, height) {
|
|
587
|
+
if (frame.width <= 0 || frame.height <= 0) return at;
|
|
588
|
+
return {
|
|
589
|
+
k: at.k,
|
|
590
|
+
x: clampAxis(at.x, frame.originX, width * at.k, frame.width),
|
|
591
|
+
y: clampAxis(at.y, frame.originY, height * at.k, frame.height)
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
function fitTransform(frame, insets, width, height, min, max) {
|
|
595
|
+
const roomX = Math.max(0, frame.width - insets.left - insets.right);
|
|
596
|
+
const roomY = Math.max(0, frame.height - insets.top - insets.bottom);
|
|
597
|
+
const k = clampZoom(Math.min(1, width > 0 ? roomX / width : 1, height > 0 ? roomY / height : 1), min, max);
|
|
598
|
+
return {
|
|
599
|
+
k,
|
|
600
|
+
x: insets.left + (roomX - width * k) / 2 - frame.originX,
|
|
601
|
+
y: insets.top + (roomY - height * k) / 2 - frame.originY
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* @license
|
|
606
|
+
*
|
|
607
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
608
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
609
|
+
*/
|
|
557
610
|
const DEFAULT_NODE_WIDTH = 160;
|
|
558
611
|
const DEFAULT_NODE_HEIGHT = 48;
|
|
559
612
|
const ARROW_SIZE = 6;
|
|
613
|
+
const DEFAULT_MIN_ZOOM = .25;
|
|
614
|
+
const DEFAULT_MAX_ZOOM = 4;
|
|
615
|
+
const ZOOM_STEP = 1.25;
|
|
616
|
+
const PAN_STEP = 40;
|
|
617
|
+
const DRAG_THRESHOLD = 3;
|
|
618
|
+
const WHEEL_RATE = .01;
|
|
619
|
+
const WHEEL_MAX = 24;
|
|
620
|
+
const WHEEL_LINE = 16;
|
|
621
|
+
const INTERACTIVE = "a[href], button, input, select, textarea, summary, [tabindex], [contenteditable], [draggable=\"true\"]";
|
|
560
622
|
let graphUid = 0;
|
|
623
|
+
const NO_FRAME = {
|
|
624
|
+
left: 0,
|
|
625
|
+
top: 0,
|
|
626
|
+
width: 0,
|
|
627
|
+
height: 0,
|
|
628
|
+
originX: 0,
|
|
629
|
+
originY: 0
|
|
630
|
+
};
|
|
631
|
+
function sameTransform(a, b) {
|
|
632
|
+
return a.x === b.x && a.y === b.y && a.k === b.k;
|
|
633
|
+
}
|
|
561
634
|
function isSize(value) {
|
|
562
635
|
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
563
636
|
}
|
|
@@ -617,8 +690,8 @@ function listFormat(locale) {
|
|
|
617
690
|
} catch {}
|
|
618
691
|
return new Intl.ListFormat("en", { type: "conjunction" });
|
|
619
692
|
}
|
|
620
|
-
function warn(message) {
|
|
621
|
-
console.warn(`[NGWR] <wr-graph>: ${message}
|
|
693
|
+
function warn(message, ...detail) {
|
|
694
|
+
console.warn(`[NGWR] <wr-graph>: ${message}`, ...detail);
|
|
622
695
|
}
|
|
623
696
|
function layoutProblems(graph, result) {
|
|
624
697
|
const problems = [];
|
|
@@ -645,10 +718,36 @@ var WrGraph = class WrGraph {
|
|
|
645
718
|
transform: wrNumAttr(48)
|
|
646
719
|
});
|
|
647
720
|
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
721
|
+
zoomable = input(false, {
|
|
722
|
+
...ngDevMode ? { debugName: "zoomable" } : /* istanbul ignore next */ {},
|
|
723
|
+
transform: booleanAttribute
|
|
724
|
+
});
|
|
725
|
+
wheelZoom = input(false, {
|
|
726
|
+
...ngDevMode ? { debugName: "wheelZoom" } : /* istanbul ignore next */ {},
|
|
727
|
+
transform: booleanAttribute
|
|
728
|
+
});
|
|
729
|
+
zoom = model(1, ...ngDevMode ? [{ debugName: "zoom" }] : /* istanbul ignore next */ []);
|
|
730
|
+
minZoom = input(DEFAULT_MIN_ZOOM, {
|
|
731
|
+
...ngDevMode ? { debugName: "minZoom" } : /* istanbul ignore next */ {},
|
|
732
|
+
transform: wrNumAttr(DEFAULT_MIN_ZOOM)
|
|
733
|
+
});
|
|
734
|
+
maxZoom = input(DEFAULT_MAX_ZOOM, {
|
|
735
|
+
...ngDevMode ? { debugName: "maxZoom" } : /* istanbul ignore next */ {},
|
|
736
|
+
transform: wrNumAttr(DEFAULT_MAX_ZOOM)
|
|
737
|
+
});
|
|
738
|
+
zoomInLabel = input(null, ...ngDevMode ? [{ debugName: "zoomInLabel" }] : /* istanbul ignore next */ []);
|
|
739
|
+
zoomOutLabel = input(null, ...ngDevMode ? [{ debugName: "zoomOutLabel" }] : /* istanbul ignore next */ []);
|
|
740
|
+
fitLabel = input(null, ...ngDevMode ? [{ debugName: "fitLabel" }] : /* istanbul ignore next */ []);
|
|
741
|
+
layoutError = output();
|
|
648
742
|
label = useI18nText(this.ariaLabel, "graph.label", "Graph");
|
|
649
743
|
parentsText = useI18nFormatter("graph.parents", "Parents: {{names}}.");
|
|
650
744
|
childrenText = useI18nFormatter("graph.children", "Children: {{names}}.");
|
|
745
|
+
zoomInText = useI18nText(this.zoomInLabel, "graph.zoomIn", "Zoom in");
|
|
746
|
+
zoomOutText = useI18nText(this.zoomOutLabel, "graph.zoomOut", "Zoom out");
|
|
747
|
+
fitText = useI18nText(this.fitLabel, "graph.fit", "Fit to view");
|
|
651
748
|
nodeTemplate = contentChild(WrGraphNodeTemplate, ...ngDevMode ? [{ debugName: "nodeTemplate" }] : /* istanbul ignore next */ []);
|
|
749
|
+
viewportRef = viewChild("viewport", ...ngDevMode ? [{ debugName: "viewportRef" }] : /* istanbul ignore next */ []);
|
|
750
|
+
stageRef = viewChild("stage", ...ngDevMode ? [{ debugName: "stageRef" }] : /* istanbul ignore next */ []);
|
|
652
751
|
markerId = `wr-graph-${graphUid++}-arrow`;
|
|
653
752
|
markerUrl = `url(#${this.markerId})`;
|
|
654
753
|
arrowSize = ARROW_SIZE;
|
|
@@ -656,6 +755,8 @@ var WrGraph = class WrGraph {
|
|
|
656
755
|
dir = inject(Directionality, { optional: true });
|
|
657
756
|
i18n = inject(WrI18n, { optional: true });
|
|
658
757
|
localeId = inject(LOCALE_ID);
|
|
758
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
759
|
+
reducedMotion = inject(WrPlatform).prefersReducedMotion;
|
|
659
760
|
isRtl = computed(() => this.dir?.valueSignal() === "rtl", ...ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []);
|
|
660
761
|
locale = computed(() => this.i18n?.locale() ?? this.localeId, ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
661
762
|
defaultSize = computed(() => {
|
|
@@ -670,20 +771,47 @@ var WrGraph = class WrGraph {
|
|
|
670
771
|
const { width, height } = this.defaultSize();
|
|
671
772
|
return prepare(this.nodes(), this.edges(), width, height);
|
|
672
773
|
}, ...ngDevMode ? [{ debugName: "prepared" }] : /* istanbul ignore next */ []);
|
|
673
|
-
|
|
674
|
-
result = computed(() => {
|
|
675
|
-
const raw = this.raw();
|
|
676
|
-
return isThenable(raw) ? null : raw;
|
|
677
|
-
}, ...ngDevMode ? [{ debugName: "result" }] : /* istanbul ignore next */ []);
|
|
678
|
-
placed = computed(() => {
|
|
774
|
+
run = computed(() => {
|
|
679
775
|
const graph = this.prepared();
|
|
680
|
-
const
|
|
681
|
-
|
|
776
|
+
const controller = new AbortController();
|
|
777
|
+
return {
|
|
778
|
+
graph,
|
|
779
|
+
controller,
|
|
780
|
+
raw: this.engine.layout(graph.input, { signal: controller.signal })
|
|
781
|
+
};
|
|
782
|
+
}, ...ngDevMode ? [{ debugName: "run" }] : /* istanbul ignore next */ []);
|
|
783
|
+
settled = signal(null, ...ngDevMode ? [{ debugName: "settled" }] : /* istanbul ignore next */ []);
|
|
784
|
+
drawing = linkedSignal({
|
|
785
|
+
...ngDevMode ? { debugName: "drawing" } : /* istanbul ignore next */ {},
|
|
786
|
+
source: () => ({
|
|
787
|
+
run: this.run(),
|
|
788
|
+
settled: this.settled()
|
|
789
|
+
}),
|
|
790
|
+
computation: ({ run, settled }, previous) => {
|
|
791
|
+
if (!isThenable(run.raw)) return {
|
|
792
|
+
graph: run.graph,
|
|
793
|
+
result: run.raw
|
|
794
|
+
};
|
|
795
|
+
if (settled?.run === run && settled.result) return {
|
|
796
|
+
graph: run.graph,
|
|
797
|
+
result: settled.result
|
|
798
|
+
};
|
|
799
|
+
return previous?.value ?? null;
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
layoutPending = computed(() => {
|
|
803
|
+
const run = this.run();
|
|
804
|
+
return isThenable(run.raw) && this.settled()?.run !== run;
|
|
805
|
+
}, ...ngDevMode ? [{ debugName: "layoutPending" }] : /* istanbul ignore next */ []);
|
|
806
|
+
placed = computed(() => {
|
|
807
|
+
const drawing = this.drawing();
|
|
808
|
+
if (!drawing) return {
|
|
682
809
|
width: 0,
|
|
683
810
|
height: 0,
|
|
684
811
|
nodes: [],
|
|
685
812
|
edges: []
|
|
686
813
|
};
|
|
814
|
+
const { graph, result } = drawing;
|
|
687
815
|
const positions = new Map(result.nodes.map((placement) => [placement.id, placement]));
|
|
688
816
|
const nodes = graph.nodes.flatMap((prepared) => {
|
|
689
817
|
const at = positions.get(prepared.node.id);
|
|
@@ -752,6 +880,49 @@ var WrGraph = class WrGraph {
|
|
|
752
880
|
}))
|
|
753
881
|
};
|
|
754
882
|
}, ...ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []);
|
|
883
|
+
bounds = computed(() => {
|
|
884
|
+
const min = isSize(this.minZoom()) ? this.minZoom() : DEFAULT_MIN_ZOOM;
|
|
885
|
+
const max = isSize(this.maxZoom()) ? this.maxZoom() : DEFAULT_MAX_ZOOM;
|
|
886
|
+
return {
|
|
887
|
+
min,
|
|
888
|
+
max: Math.max(min, max)
|
|
889
|
+
};
|
|
890
|
+
}, ...ngDevMode ? [{ debugName: "bounds" }] : /* istanbul ignore next */ []);
|
|
891
|
+
at = signal(IDENTITY, ...ngDevMode ? [{ debugName: "at" }] : /* istanbul ignore next */ []);
|
|
892
|
+
pan = computed(() => {
|
|
893
|
+
const { x, y } = this.at();
|
|
894
|
+
return {
|
|
895
|
+
x,
|
|
896
|
+
y
|
|
897
|
+
};
|
|
898
|
+
}, {
|
|
899
|
+
...ngDevMode ? { debugName: "pan" } : /* istanbul ignore next */ {},
|
|
900
|
+
equal: (a, b) => a.x === b.x && a.y === b.y
|
|
901
|
+
});
|
|
902
|
+
size = computed(() => {
|
|
903
|
+
const { width, height } = this.view();
|
|
904
|
+
return {
|
|
905
|
+
width,
|
|
906
|
+
height
|
|
907
|
+
};
|
|
908
|
+
}, {
|
|
909
|
+
...ngDevMode ? { debugName: "size" } : /* istanbul ignore next */ {},
|
|
910
|
+
equal: (a, b) => a.width === b.width && a.height === b.height
|
|
911
|
+
});
|
|
912
|
+
stageTransform = computed(() => {
|
|
913
|
+
const at = this.at();
|
|
914
|
+
if (!this.zoomable() || sameTransform(at, IDENTITY)) return null;
|
|
915
|
+
return `translate(${px(at.x)}px, ${px(at.y)}px) scale(${at.k})`;
|
|
916
|
+
}, ...ngDevMode ? [{ debugName: "stageTransform" }] : /* istanbul ignore next */ []);
|
|
917
|
+
atMinZoom = computed(() => this.at().k <= this.bounds().min, ...ngDevMode ? [{ debugName: "atMinZoom" }] : /* istanbul ignore next */ []);
|
|
918
|
+
atMaxZoom = computed(() => this.at().k >= this.bounds().max, ...ngDevMode ? [{ debugName: "atMaxZoom" }] : /* istanbul ignore next */ []);
|
|
919
|
+
panning = signal(false, ...ngDevMode ? [{ debugName: "panning" }] : /* istanbul ignore next */ []);
|
|
920
|
+
animated = signal(false, ...ngDevMode ? [{ debugName: "animated" }] : /* istanbul ignore next */ []);
|
|
921
|
+
moved = false;
|
|
922
|
+
queued = null;
|
|
923
|
+
frameId = null;
|
|
924
|
+
pointers = /* @__PURE__ */ new Map();
|
|
925
|
+
dragging = false;
|
|
755
926
|
relations = computed(() => {
|
|
756
927
|
const { nodes } = this.placed();
|
|
757
928
|
const list = listFormat(this.locale());
|
|
@@ -763,7 +934,7 @@ var WrGraph = class WrGraph {
|
|
|
763
934
|
set.add(neighbour);
|
|
764
935
|
map.set(id, set);
|
|
765
936
|
};
|
|
766
|
-
for (const { from, to } of this.
|
|
937
|
+
for (const { from, to } of this.drawing()?.graph.edges ?? []) {
|
|
767
938
|
if (!order.has(from) || !order.has(to)) continue;
|
|
768
939
|
link(parents, to, from);
|
|
769
940
|
link(children, from, to);
|
|
@@ -786,30 +957,316 @@ var WrGraph = class WrGraph {
|
|
|
786
957
|
}, ...ngDevMode ? [{ debugName: "relations" }] : /* istanbul ignore next */ []);
|
|
787
958
|
constructor() {
|
|
788
959
|
if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("graph");
|
|
789
|
-
|
|
790
|
-
const
|
|
791
|
-
const raw =
|
|
792
|
-
if (
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
960
|
+
effect((onCleanup) => {
|
|
961
|
+
const run = this.run();
|
|
962
|
+
const { raw } = run;
|
|
963
|
+
if (!isThenable(raw)) return;
|
|
964
|
+
const { signal: aborted } = run.controller;
|
|
965
|
+
onCleanup(() => run.controller.abort());
|
|
966
|
+
raw.then((result) => {
|
|
967
|
+
if (!aborted.aborted) this.settled.set({
|
|
968
|
+
run,
|
|
969
|
+
result
|
|
970
|
+
});
|
|
971
|
+
}, (error) => {
|
|
972
|
+
if (aborted.aborted) return;
|
|
973
|
+
this.settled.set({
|
|
974
|
+
run,
|
|
975
|
+
result: null
|
|
976
|
+
});
|
|
977
|
+
if (isDevMode()) warn("the layout rejected, so the last drawn result stays.", error);
|
|
978
|
+
this.layoutError.emit(error);
|
|
979
|
+
});
|
|
980
|
+
});
|
|
981
|
+
effect(() => {
|
|
982
|
+
const zoom = this.zoom();
|
|
983
|
+
const { min, max } = this.bounds();
|
|
984
|
+
if (!this.zoomable()) return;
|
|
985
|
+
untracked(() => {
|
|
986
|
+
const from = this.current();
|
|
987
|
+
const k = clampZoom(zoom, min, max);
|
|
988
|
+
if (k !== from.k) {
|
|
989
|
+
const frame = this.frame();
|
|
990
|
+
this.moved = true;
|
|
991
|
+
this.commit(this.bounded(zoomAround(from, k, frame.width / 2, frame.height / 2, frame), frame));
|
|
992
|
+
} else if (k !== zoom) this.zoom.set(k);
|
|
993
|
+
});
|
|
808
994
|
});
|
|
995
|
+
effect((onCleanup) => {
|
|
996
|
+
const viewport = this.viewportRef()?.nativeElement;
|
|
997
|
+
if (!this.isBrowser || !viewport || !this.zoomable()) return;
|
|
998
|
+
const controller = new AbortController();
|
|
999
|
+
const { signal: stop } = controller;
|
|
1000
|
+
viewport.addEventListener("wheel", (event) => this.onWheel(event), {
|
|
1001
|
+
signal: stop,
|
|
1002
|
+
passive: false
|
|
1003
|
+
});
|
|
1004
|
+
viewport.addEventListener("keydown", (event) => this.onKeydown(event), { signal: stop });
|
|
1005
|
+
viewport.addEventListener("pointerdown", (event) => this.onPointerDown(event, viewport), { signal: stop });
|
|
1006
|
+
viewport.addEventListener("pointermove", (event) => this.onPointerMove(event, viewport), { signal: stop });
|
|
1007
|
+
viewport.addEventListener("pointerup", (event) => this.onPointerEnd(event, viewport), { signal: stop });
|
|
1008
|
+
viewport.addEventListener("pointercancel", (event) => this.onPointerEnd(event, viewport), { signal: stop });
|
|
1009
|
+
onCleanup(() => {
|
|
1010
|
+
controller.abort();
|
|
1011
|
+
this.pointers.clear();
|
|
1012
|
+
this.dragging = false;
|
|
1013
|
+
untracked(() => this.panning.set(false));
|
|
1014
|
+
});
|
|
1015
|
+
});
|
|
1016
|
+
afterRenderEffect(() => {
|
|
1017
|
+
this.size();
|
|
1018
|
+
if (!this.zoomable()) return;
|
|
1019
|
+
untracked(() => this.settle());
|
|
1020
|
+
});
|
|
1021
|
+
const destroyRef = inject(DestroyRef);
|
|
1022
|
+
afterNextRender(() => {
|
|
1023
|
+
const viewport = this.viewportRef()?.nativeElement;
|
|
1024
|
+
if (!viewport || typeof ResizeObserver === "undefined") return;
|
|
1025
|
+
const observer = new ResizeObserver(() => {
|
|
1026
|
+
if (this.zoomable()) this.settle();
|
|
1027
|
+
});
|
|
1028
|
+
observer.observe(viewport);
|
|
1029
|
+
destroyRef.onDestroy(() => observer.disconnect());
|
|
1030
|
+
});
|
|
1031
|
+
destroyRef.onDestroy(() => this.cancelFrame());
|
|
1032
|
+
if (isDevMode()) {
|
|
1033
|
+
effect(() => {
|
|
1034
|
+
const graph = this.prepared();
|
|
1035
|
+
if (graph.duplicates.length) warn(`node id(s) ${graph.duplicates.map((id) => `"${id}"`).join(", ")} appear more than once. The first occurrence of each is drawn and the rest are skipped.`);
|
|
1036
|
+
if (graph.dangling.length) warn(`edge(s) ${graph.dangling.join(", ")} name a node that does not exist and were skipped.`);
|
|
1037
|
+
if (graph.badSizes.length) warn(`node(s) ${graph.badSizes.map((id) => `"${id}"`).join(", ")} have a width or height that is not a positive finite number, so nodeWidth / nodeHeight is used instead.`);
|
|
1038
|
+
const width = this.nodeWidth();
|
|
1039
|
+
const height = this.nodeHeight();
|
|
1040
|
+
const invalid = [...isSize(width) ? [] : [`nodeWidth (${String(width)})`], ...isSize(height) ? [] : [`nodeHeight (${String(height)})`]];
|
|
1041
|
+
if (invalid.length) {
|
|
1042
|
+
const used = this.defaultSize();
|
|
1043
|
+
warn(`${invalid.join(" and ")} must be a positive finite number, so a node with no size of its own is drawn ${used.width} × ${used.height}.`);
|
|
1044
|
+
}
|
|
1045
|
+
});
|
|
1046
|
+
effect(() => {
|
|
1047
|
+
const drawing = this.drawing();
|
|
1048
|
+
const problems = drawing ? layoutProblems(drawing.graph, drawing.result) : [];
|
|
1049
|
+
if (problems.length) warn(`the layout result cannot be drawn faithfully: ${problems.join("; ")}.`);
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
fit() {
|
|
1054
|
+
this.fitView(false);
|
|
1055
|
+
}
|
|
1056
|
+
resetView() {
|
|
1057
|
+
if (!this.zoomable()) return;
|
|
1058
|
+
this.moved = true;
|
|
1059
|
+
this.commit(IDENTITY);
|
|
1060
|
+
}
|
|
1061
|
+
zoomIn() {
|
|
1062
|
+
this.zoomBy(ZOOM_STEP);
|
|
1063
|
+
}
|
|
1064
|
+
zoomOut() {
|
|
1065
|
+
this.zoomBy(1 / ZOOM_STEP);
|
|
1066
|
+
}
|
|
1067
|
+
fitView(animate) {
|
|
1068
|
+
if (!this.zoomable()) return;
|
|
1069
|
+
this.moved = false;
|
|
1070
|
+
const fitted = this.fitted();
|
|
1071
|
+
if (fitted) this.commit(fitted, animate);
|
|
1072
|
+
}
|
|
1073
|
+
frame() {
|
|
1074
|
+
const viewport = this.viewportRef()?.nativeElement;
|
|
1075
|
+
const stage = this.stageRef()?.nativeElement;
|
|
1076
|
+
if (!this.isBrowser || !viewport || !stage) return NO_FRAME;
|
|
1077
|
+
const rect = viewport.getBoundingClientRect();
|
|
1078
|
+
return {
|
|
1079
|
+
left: rect.left,
|
|
1080
|
+
top: rect.top,
|
|
1081
|
+
width: rect.width,
|
|
1082
|
+
height: rect.height,
|
|
1083
|
+
originX: viewport.clientLeft + stage.offsetLeft,
|
|
1084
|
+
originY: viewport.clientTop + stage.offsetTop
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
fitted() {
|
|
1088
|
+
const viewport = this.viewportRef()?.nativeElement;
|
|
1089
|
+
const frame = this.frame();
|
|
1090
|
+
const { width, height } = this.size();
|
|
1091
|
+
if (!viewport || !frame.width || !frame.height || !width || !height) return null;
|
|
1092
|
+
const style = getComputedStyle(viewport);
|
|
1093
|
+
const inset = (value) => Number.parseFloat(value) || 0;
|
|
1094
|
+
const { min, max } = this.bounds();
|
|
1095
|
+
return fitTransform(frame, {
|
|
1096
|
+
top: inset(style.paddingTop),
|
|
1097
|
+
right: inset(style.paddingRight),
|
|
1098
|
+
bottom: inset(style.paddingBottom),
|
|
1099
|
+
left: inset(style.paddingLeft)
|
|
1100
|
+
}, width, height, min, max);
|
|
1101
|
+
}
|
|
1102
|
+
settle() {
|
|
1103
|
+
if (!this.moved) {
|
|
1104
|
+
const fitted = this.fitted();
|
|
1105
|
+
if (fitted) this.commit(fitted);
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
this.commit(this.bounded(this.current(), this.frame()));
|
|
1109
|
+
}
|
|
1110
|
+
current() {
|
|
1111
|
+
return this.queued ?? this.at();
|
|
1112
|
+
}
|
|
1113
|
+
bounded(at, frame) {
|
|
1114
|
+
const { width, height } = this.size();
|
|
1115
|
+
return clampPan(at, frame, width, height);
|
|
1116
|
+
}
|
|
1117
|
+
commit(next, animate = false) {
|
|
1118
|
+
this.cancelFrame();
|
|
1119
|
+
if (sameTransform(next, this.at())) return;
|
|
1120
|
+
this.animated.set(animate && !this.reducedMotion());
|
|
1121
|
+
this.at.set(next);
|
|
1122
|
+
this.zoom.set(next.k);
|
|
1123
|
+
}
|
|
1124
|
+
schedule(next) {
|
|
1125
|
+
if (sameTransform(next, this.current())) return;
|
|
1126
|
+
this.moved = true;
|
|
1127
|
+
this.queued = next;
|
|
1128
|
+
this.frameId ??= requestAnimationFrame(() => {
|
|
1129
|
+
this.frameId = null;
|
|
1130
|
+
const queued = this.queued;
|
|
1131
|
+
if (queued) this.commit(queued);
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
cancelFrame() {
|
|
1135
|
+
if (this.frameId !== null) cancelAnimationFrame(this.frameId);
|
|
1136
|
+
this.frameId = null;
|
|
1137
|
+
this.queued = null;
|
|
1138
|
+
}
|
|
1139
|
+
zoomBy(factor) {
|
|
1140
|
+
const frame = this.frame();
|
|
1141
|
+
const from = this.current();
|
|
1142
|
+
const { min, max } = this.bounds();
|
|
1143
|
+
const k = clampZoom(from.k * factor, min, max);
|
|
1144
|
+
if (k === from.k) return;
|
|
1145
|
+
this.moved = true;
|
|
1146
|
+
this.commit(this.bounded(zoomAround(from, k, frame.width / 2, frame.height / 2, frame), frame), true);
|
|
1147
|
+
}
|
|
1148
|
+
panBy(dx, dy) {
|
|
1149
|
+
const from = this.current();
|
|
1150
|
+
const next = this.bounded({
|
|
1151
|
+
k: from.k,
|
|
1152
|
+
x: from.x + dx,
|
|
1153
|
+
y: from.y + dy
|
|
1154
|
+
}, this.frame());
|
|
1155
|
+
if (sameTransform(next, from)) return;
|
|
1156
|
+
this.moved = true;
|
|
1157
|
+
this.commit(next, true);
|
|
1158
|
+
}
|
|
1159
|
+
onWheel(event) {
|
|
1160
|
+
if (!event.ctrlKey && !event.metaKey && !this.wheelZoom()) return;
|
|
1161
|
+
event.preventDefault();
|
|
1162
|
+
const frame = this.frame();
|
|
1163
|
+
const unit = event.deltaMode === 1 ? WHEEL_LINE : event.deltaMode === 2 ? frame.height : 1;
|
|
1164
|
+
const delta = Math.min(WHEEL_MAX, Math.max(-24, event.deltaY * unit));
|
|
1165
|
+
const from = this.current();
|
|
1166
|
+
const { min, max } = this.bounds();
|
|
1167
|
+
const k = clampZoom(from.k * Math.exp(-delta * WHEEL_RATE), min, max);
|
|
1168
|
+
if (k === from.k) return;
|
|
1169
|
+
this.schedule(this.bounded(zoomAround(from, k, event.clientX - frame.left, event.clientY - frame.top, frame), frame));
|
|
1170
|
+
}
|
|
1171
|
+
onKeydown(event) {
|
|
1172
|
+
if (event.target !== event.currentTarget || event.ctrlKey || event.metaKey || event.altKey) return;
|
|
1173
|
+
switch (event.key) {
|
|
1174
|
+
case "+":
|
|
1175
|
+
case "=":
|
|
1176
|
+
this.zoomIn();
|
|
1177
|
+
break;
|
|
1178
|
+
case "-":
|
|
1179
|
+
case "_":
|
|
1180
|
+
this.zoomOut();
|
|
1181
|
+
break;
|
|
1182
|
+
case "0":
|
|
1183
|
+
this.fitView(true);
|
|
1184
|
+
break;
|
|
1185
|
+
case "ArrowLeft":
|
|
1186
|
+
this.panBy(PAN_STEP, 0);
|
|
1187
|
+
break;
|
|
1188
|
+
case "ArrowRight":
|
|
1189
|
+
this.panBy(-40, 0);
|
|
1190
|
+
break;
|
|
1191
|
+
case "ArrowUp":
|
|
1192
|
+
this.panBy(0, PAN_STEP);
|
|
1193
|
+
break;
|
|
1194
|
+
case "ArrowDown":
|
|
1195
|
+
this.panBy(0, -40);
|
|
1196
|
+
break;
|
|
1197
|
+
default: return;
|
|
1198
|
+
}
|
|
1199
|
+
event.preventDefault();
|
|
1200
|
+
}
|
|
1201
|
+
onPointerDown(event, viewport) {
|
|
1202
|
+
if (event.pointerType === "mouse" && event.button !== 0) return;
|
|
1203
|
+
const target = event.target instanceof Element ? event.target.closest(INTERACTIVE) : null;
|
|
1204
|
+
if (target && target !== viewport) return;
|
|
1205
|
+
this.pointers.set(event.pointerId, {
|
|
1206
|
+
x: event.clientX,
|
|
1207
|
+
y: event.clientY
|
|
1208
|
+
});
|
|
1209
|
+
if (this.pointers.size === 2) this.startDrag(viewport);
|
|
1210
|
+
else if (this.pointers.size > 2) this.pointers.delete(event.pointerId);
|
|
1211
|
+
}
|
|
1212
|
+
onPointerMove(event, viewport) {
|
|
1213
|
+
const last = this.pointers.get(event.pointerId);
|
|
1214
|
+
if (!last) return;
|
|
1215
|
+
if (event.pointerType === "mouse" && event.buttons === 0) {
|
|
1216
|
+
this.onPointerEnd(event, viewport);
|
|
1217
|
+
return;
|
|
1218
|
+
}
|
|
1219
|
+
const dx = event.clientX - last.x;
|
|
1220
|
+
const dy = event.clientY - last.y;
|
|
1221
|
+
if (!this.dragging) {
|
|
1222
|
+
if (Math.abs(dx) < DRAG_THRESHOLD && Math.abs(dy) < DRAG_THRESHOLD) return;
|
|
1223
|
+
this.startDrag(viewport);
|
|
1224
|
+
}
|
|
1225
|
+
const frame = this.frame();
|
|
1226
|
+
const from = this.current();
|
|
1227
|
+
const point = {
|
|
1228
|
+
x: event.clientX,
|
|
1229
|
+
y: event.clientY
|
|
1230
|
+
};
|
|
1231
|
+
const other = [...this.pointers].find(([id]) => id !== event.pointerId)?.[1];
|
|
1232
|
+
this.pointers.set(event.pointerId, point);
|
|
1233
|
+
if (!other) {
|
|
1234
|
+
this.schedule(this.bounded({
|
|
1235
|
+
k: from.k,
|
|
1236
|
+
x: from.x + dx,
|
|
1237
|
+
y: from.y + dy
|
|
1238
|
+
}, frame));
|
|
1239
|
+
return;
|
|
1240
|
+
}
|
|
1241
|
+
const before = Math.hypot(last.x - other.x, last.y - other.y);
|
|
1242
|
+
const after = Math.hypot(point.x - other.x, point.y - other.y);
|
|
1243
|
+
const { min, max } = this.bounds();
|
|
1244
|
+
const k = before > 0 ? clampZoom(from.k * after / before, min, max) : from.k;
|
|
1245
|
+
const midX = (last.x + other.x) / 2;
|
|
1246
|
+
const midY = (last.y + other.y) / 2;
|
|
1247
|
+
const zoomed = zoomAround(from, k, midX - frame.left, midY - frame.top, frame);
|
|
1248
|
+
this.schedule(this.bounded({
|
|
1249
|
+
k,
|
|
1250
|
+
x: zoomed.x + dx / 2,
|
|
1251
|
+
y: zoomed.y + dy / 2
|
|
1252
|
+
}, frame));
|
|
1253
|
+
}
|
|
1254
|
+
onPointerEnd(event, viewport) {
|
|
1255
|
+
if (!this.pointers.delete(event.pointerId)) return;
|
|
1256
|
+
if (this.dragging && viewport.hasPointerCapture?.(event.pointerId)) viewport.releasePointerCapture(event.pointerId);
|
|
1257
|
+
if (this.pointers.size) return;
|
|
1258
|
+
this.dragging = false;
|
|
1259
|
+
this.panning.set(false);
|
|
1260
|
+
}
|
|
1261
|
+
startDrag(viewport) {
|
|
1262
|
+
this.dragging = true;
|
|
1263
|
+
this.panning.set(true);
|
|
1264
|
+
this.animated.set(false);
|
|
1265
|
+
for (const id of this.pointers.keys()) viewport.setPointerCapture?.(id);
|
|
809
1266
|
}
|
|
810
1267
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
811
1268
|
minVersion: "12.0.0",
|
|
812
|
-
version: "22.2.
|
|
1269
|
+
version: "22.2.6",
|
|
813
1270
|
ngImport: i0,
|
|
814
1271
|
type: WrGraph,
|
|
815
1272
|
deps: [],
|
|
@@ -817,7 +1274,7 @@ var WrGraph = class WrGraph {
|
|
|
817
1274
|
});
|
|
818
1275
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
819
1276
|
minVersion: "17.0.0",
|
|
820
|
-
version: "22.2.
|
|
1277
|
+
version: "22.2.6",
|
|
821
1278
|
type: WrGraph,
|
|
822
1279
|
isStandalone: true,
|
|
823
1280
|
selector: "wr-graph",
|
|
@@ -856,9 +1313,76 @@ var WrGraph = class WrGraph {
|
|
|
856
1313
|
isSignal: true,
|
|
857
1314
|
isRequired: false,
|
|
858
1315
|
transformFunction: null
|
|
1316
|
+
},
|
|
1317
|
+
zoomable: {
|
|
1318
|
+
classPropertyName: "zoomable",
|
|
1319
|
+
publicName: "zoomable",
|
|
1320
|
+
isSignal: true,
|
|
1321
|
+
isRequired: false,
|
|
1322
|
+
transformFunction: null
|
|
1323
|
+
},
|
|
1324
|
+
wheelZoom: {
|
|
1325
|
+
classPropertyName: "wheelZoom",
|
|
1326
|
+
publicName: "wheelZoom",
|
|
1327
|
+
isSignal: true,
|
|
1328
|
+
isRequired: false,
|
|
1329
|
+
transformFunction: null
|
|
1330
|
+
},
|
|
1331
|
+
zoom: {
|
|
1332
|
+
classPropertyName: "zoom",
|
|
1333
|
+
publicName: "zoom",
|
|
1334
|
+
isSignal: true,
|
|
1335
|
+
isRequired: false,
|
|
1336
|
+
transformFunction: null
|
|
1337
|
+
},
|
|
1338
|
+
minZoom: {
|
|
1339
|
+
classPropertyName: "minZoom",
|
|
1340
|
+
publicName: "minZoom",
|
|
1341
|
+
isSignal: true,
|
|
1342
|
+
isRequired: false,
|
|
1343
|
+
transformFunction: null
|
|
1344
|
+
},
|
|
1345
|
+
maxZoom: {
|
|
1346
|
+
classPropertyName: "maxZoom",
|
|
1347
|
+
publicName: "maxZoom",
|
|
1348
|
+
isSignal: true,
|
|
1349
|
+
isRequired: false,
|
|
1350
|
+
transformFunction: null
|
|
1351
|
+
},
|
|
1352
|
+
zoomInLabel: {
|
|
1353
|
+
classPropertyName: "zoomInLabel",
|
|
1354
|
+
publicName: "zoomInLabel",
|
|
1355
|
+
isSignal: true,
|
|
1356
|
+
isRequired: false,
|
|
1357
|
+
transformFunction: null
|
|
1358
|
+
},
|
|
1359
|
+
zoomOutLabel: {
|
|
1360
|
+
classPropertyName: "zoomOutLabel",
|
|
1361
|
+
publicName: "zoomOutLabel",
|
|
1362
|
+
isSignal: true,
|
|
1363
|
+
isRequired: false,
|
|
1364
|
+
transformFunction: null
|
|
1365
|
+
},
|
|
1366
|
+
fitLabel: {
|
|
1367
|
+
classPropertyName: "fitLabel",
|
|
1368
|
+
publicName: "fitLabel",
|
|
1369
|
+
isSignal: true,
|
|
1370
|
+
isRequired: false,
|
|
1371
|
+
transformFunction: null
|
|
859
1372
|
}
|
|
860
1373
|
},
|
|
861
|
-
|
|
1374
|
+
outputs: {
|
|
1375
|
+
zoom: "zoomChange",
|
|
1376
|
+
layoutError: "layoutError"
|
|
1377
|
+
},
|
|
1378
|
+
host: {
|
|
1379
|
+
properties: {
|
|
1380
|
+
"class.wr-graph--pending": "layoutPending()",
|
|
1381
|
+
"class.wr-graph--zoomable": "zoomable()",
|
|
1382
|
+
"class.wr-graph--panning": "panning()"
|
|
1383
|
+
},
|
|
1384
|
+
classAttribute: "wr-graph"
|
|
1385
|
+
},
|
|
862
1386
|
queries: [{
|
|
863
1387
|
propertyName: "nodeTemplate",
|
|
864
1388
|
first: true,
|
|
@@ -866,8 +1390,21 @@ var WrGraph = class WrGraph {
|
|
|
866
1390
|
descendants: true,
|
|
867
1391
|
isSignal: true
|
|
868
1392
|
}],
|
|
1393
|
+
viewQueries: [{
|
|
1394
|
+
propertyName: "viewportRef",
|
|
1395
|
+
first: true,
|
|
1396
|
+
predicate: ["viewport"],
|
|
1397
|
+
descendants: true,
|
|
1398
|
+
isSignal: true
|
|
1399
|
+
}, {
|
|
1400
|
+
propertyName: "stageRef",
|
|
1401
|
+
first: true,
|
|
1402
|
+
predicate: ["stage"],
|
|
1403
|
+
descendants: true,
|
|
1404
|
+
isSignal: true
|
|
1405
|
+
}],
|
|
869
1406
|
ngImport: i0,
|
|
870
|
-
template: "@let graph = view();\n<!-- The scroller is the one tab stop: a named group, so its label is allowed, and focusable so a keyboard can scroll it. -->\n<div
|
|
1407
|
+
template: "@let graph = view();\n<!-- The scroller is the one tab stop: a named group, so its label is allowed, and focusable so a keyboard can scroll it — or, when zoomable, zoom and pan it. -->\n<div\n #viewport\n class=\"wr-graph__viewport\"\n role=\"group\"\n tabindex=\"0\"\n [attr.aria-label]=\"label()\"\n [attr.aria-busy]=\"layoutPending() ? 'true' : null\"\n>\n <div\n #stage\n class=\"wr-graph__stage\"\n [class.wr-graph__stage--animated]=\"animated()\"\n [style.width.px]=\"graph.width\"\n [style.height.px]=\"graph.height\"\n [style.transform]=\"stageTransform()\"\n (transitionend)=\"animated.set(false)\"\n >\n <svg\n class=\"wr-graph__edges\"\n aria-hidden=\"true\"\n focusable=\"false\"\n [attr.width]=\"graph.width\"\n [attr.height]=\"graph.height\"\n >\n <defs>\n <marker\n [attr.id]=\"markerId\"\n viewBox=\"0 0 10 10\"\n refX=\"10\"\n refY=\"5\"\n markerUnits=\"userSpaceOnUse\"\n [attr.markerWidth]=\"arrowSize\"\n [attr.markerHeight]=\"arrowSize\"\n orient=\"auto\"\n >\n <polygon points=\"0,1 10,5 0,9\" />\n </marker>\n </defs>\n @for (edge of graph.edges; track edge.id) {\n <path\n class=\"wr-graph__edge\"\n [attr.d]=\"edge.d\"\n [attr.data-from]=\"edge.from\"\n [attr.data-to]=\"edge.to\"\n [attr.marker-end]=\"markerUrl\"\n />\n }\n </svg>\n <!-- Items are DIRECT children of the list: a wrapper carrying ARIA or a tabindex would break ownership. -->\n <div class=\"wr-graph__nodes\" [attr.role]=\"graph.nodes.length ? 'list' : null\">\n @for (entry of graph.nodes; track entry.node.id) {\n @let relation = relations().get(entry.node.id);\n <div\n class=\"wr-graph__node\"\n role=\"listitem\"\n [style.width.px]=\"entry.width\"\n [style.height.px]=\"entry.height\"\n [style.transform]=\"entry.transform\"\n >\n @if (nodeTemplate(); as custom) {\n <ng-container [ngTemplateOutlet]=\"custom.template\" [ngTemplateOutletContext]=\"{ $implicit: entry.node }\" />\n } @else {\n <div class=\"wr-graph__card\">{{ entry.node.label }}</div>\n }\n @if (relation) {\n <span class=\"wr-graph__sr-only\">{{ relation }}</span>\n }\n </div>\n }\n </div>\n </div>\n</div>\n<!-- After the viewport, never inside it: the buttons stay put while the drawing moves, and follow it in the tab order. -->\n@if (zoomable()) {\n <div class=\"wr-graph__controls\">\n <!-- `aria-disabled`, not `disabled`: a button that reached its bound under the keyboard keeps the focus. -->\n <button\n type=\"button\"\n class=\"wr-graph__control wr-graph__control--zoom-in\"\n [attr.aria-label]=\"zoomInText()\"\n [attr.aria-disabled]=\"atMaxZoom() ? 'true' : null\"\n (click)=\"zoomIn()\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M5 12h14\" />\n <path d=\"M12 5v14\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-graph__control wr-graph__control--zoom-out\"\n [attr.aria-label]=\"zoomOutText()\"\n [attr.aria-disabled]=\"atMinZoom() ? 'true' : null\"\n (click)=\"zoomOut()\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M5 12h14\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-graph__control wr-graph__control--fit\"\n [attr.aria-label]=\"fitText()\"\n (click)=\"fitView(true)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M8 3H5a2 2 0 0 0-2 2v3\" />\n <path d=\"M21 8V5a2 2 0 0 0-2-2h-3\" />\n <path d=\"M3 16v3a2 2 0 0 0 2 2h3\" />\n <path d=\"M16 21h3a2 2 0 0 0 2-2v-3\" />\n </svg>\n </button>\n </div>\n}\n",
|
|
871
1408
|
dependencies: [{
|
|
872
1409
|
kind: "directive",
|
|
873
1410
|
type: NgTemplateOutlet,
|
|
@@ -883,7 +1420,7 @@ var WrGraph = class WrGraph {
|
|
|
883
1420
|
};
|
|
884
1421
|
i0.ɵɵngDeclareClassMetadata({
|
|
885
1422
|
minVersion: "12.0.0",
|
|
886
|
-
version: "22.2.
|
|
1423
|
+
version: "22.2.6",
|
|
887
1424
|
ngImport: i0,
|
|
888
1425
|
type: WrGraph,
|
|
889
1426
|
decorators: [{
|
|
@@ -892,8 +1429,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
892
1429
|
selector: "wr-graph",
|
|
893
1430
|
imports: [NgTemplateOutlet],
|
|
894
1431
|
encapsulation: ViewEncapsulation.None,
|
|
895
|
-
host: {
|
|
896
|
-
|
|
1432
|
+
host: {
|
|
1433
|
+
class: "wr-graph",
|
|
1434
|
+
"[class.wr-graph--pending]": "layoutPending()",
|
|
1435
|
+
"[class.wr-graph--zoomable]": "zoomable()",
|
|
1436
|
+
"[class.wr-graph--panning]": "panning()"
|
|
1437
|
+
},
|
|
1438
|
+
template: "@let graph = view();\n<!-- The scroller is the one tab stop: a named group, so its label is allowed, and focusable so a keyboard can scroll it — or, when zoomable, zoom and pan it. -->\n<div\n #viewport\n class=\"wr-graph__viewport\"\n role=\"group\"\n tabindex=\"0\"\n [attr.aria-label]=\"label()\"\n [attr.aria-busy]=\"layoutPending() ? 'true' : null\"\n>\n <div\n #stage\n class=\"wr-graph__stage\"\n [class.wr-graph__stage--animated]=\"animated()\"\n [style.width.px]=\"graph.width\"\n [style.height.px]=\"graph.height\"\n [style.transform]=\"stageTransform()\"\n (transitionend)=\"animated.set(false)\"\n >\n <svg\n class=\"wr-graph__edges\"\n aria-hidden=\"true\"\n focusable=\"false\"\n [attr.width]=\"graph.width\"\n [attr.height]=\"graph.height\"\n >\n <defs>\n <marker\n [attr.id]=\"markerId\"\n viewBox=\"0 0 10 10\"\n refX=\"10\"\n refY=\"5\"\n markerUnits=\"userSpaceOnUse\"\n [attr.markerWidth]=\"arrowSize\"\n [attr.markerHeight]=\"arrowSize\"\n orient=\"auto\"\n >\n <polygon points=\"0,1 10,5 0,9\" />\n </marker>\n </defs>\n @for (edge of graph.edges; track edge.id) {\n <path\n class=\"wr-graph__edge\"\n [attr.d]=\"edge.d\"\n [attr.data-from]=\"edge.from\"\n [attr.data-to]=\"edge.to\"\n [attr.marker-end]=\"markerUrl\"\n />\n }\n </svg>\n <!-- Items are DIRECT children of the list: a wrapper carrying ARIA or a tabindex would break ownership. -->\n <div class=\"wr-graph__nodes\" [attr.role]=\"graph.nodes.length ? 'list' : null\">\n @for (entry of graph.nodes; track entry.node.id) {\n @let relation = relations().get(entry.node.id);\n <div\n class=\"wr-graph__node\"\n role=\"listitem\"\n [style.width.px]=\"entry.width\"\n [style.height.px]=\"entry.height\"\n [style.transform]=\"entry.transform\"\n >\n @if (nodeTemplate(); as custom) {\n <ng-container [ngTemplateOutlet]=\"custom.template\" [ngTemplateOutletContext]=\"{ $implicit: entry.node }\" />\n } @else {\n <div class=\"wr-graph__card\">{{ entry.node.label }}</div>\n }\n @if (relation) {\n <span class=\"wr-graph__sr-only\">{{ relation }}</span>\n }\n </div>\n }\n </div>\n </div>\n</div>\n<!-- After the viewport, never inside it: the buttons stay put while the drawing moves, and follow it in the tab order. -->\n@if (zoomable()) {\n <div class=\"wr-graph__controls\">\n <!-- `aria-disabled`, not `disabled`: a button that reached its bound under the keyboard keeps the focus. -->\n <button\n type=\"button\"\n class=\"wr-graph__control wr-graph__control--zoom-in\"\n [attr.aria-label]=\"zoomInText()\"\n [attr.aria-disabled]=\"atMaxZoom() ? 'true' : null\"\n (click)=\"zoomIn()\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M5 12h14\" />\n <path d=\"M12 5v14\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-graph__control wr-graph__control--zoom-out\"\n [attr.aria-label]=\"zoomOutText()\"\n [attr.aria-disabled]=\"atMinZoom() ? 'true' : null\"\n (click)=\"zoomOut()\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M5 12h14\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-graph__control wr-graph__control--fit\"\n [attr.aria-label]=\"fitText()\"\n (click)=\"fitView(true)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M8 3H5a2 2 0 0 0-2 2v3\" />\n <path d=\"M21 8V5a2 2 0 0 0-2-2h-3\" />\n <path d=\"M3 16v3a2 2 0 0 0 2 2h3\" />\n <path d=\"M16 21h3a2 2 0 0 0 2-2v-3\" />\n </svg>\n </button>\n </div>\n}\n"
|
|
897
1439
|
}]
|
|
898
1440
|
}],
|
|
899
1441
|
ctorParameters: () => [],
|
|
@@ -938,12 +1480,91 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
938
1480
|
required: false
|
|
939
1481
|
}]
|
|
940
1482
|
}],
|
|
1483
|
+
zoomable: [{
|
|
1484
|
+
type: i0.Input,
|
|
1485
|
+
args: [{
|
|
1486
|
+
isSignal: true,
|
|
1487
|
+
alias: "zoomable",
|
|
1488
|
+
required: false
|
|
1489
|
+
}]
|
|
1490
|
+
}],
|
|
1491
|
+
wheelZoom: [{
|
|
1492
|
+
type: i0.Input,
|
|
1493
|
+
args: [{
|
|
1494
|
+
isSignal: true,
|
|
1495
|
+
alias: "wheelZoom",
|
|
1496
|
+
required: false
|
|
1497
|
+
}]
|
|
1498
|
+
}],
|
|
1499
|
+
zoom: [{
|
|
1500
|
+
type: i0.Input,
|
|
1501
|
+
args: [{
|
|
1502
|
+
isSignal: true,
|
|
1503
|
+
alias: "zoom",
|
|
1504
|
+
required: false
|
|
1505
|
+
}]
|
|
1506
|
+
}, {
|
|
1507
|
+
type: i0.Output,
|
|
1508
|
+
args: ["zoomChange"]
|
|
1509
|
+
}],
|
|
1510
|
+
minZoom: [{
|
|
1511
|
+
type: i0.Input,
|
|
1512
|
+
args: [{
|
|
1513
|
+
isSignal: true,
|
|
1514
|
+
alias: "minZoom",
|
|
1515
|
+
required: false
|
|
1516
|
+
}]
|
|
1517
|
+
}],
|
|
1518
|
+
maxZoom: [{
|
|
1519
|
+
type: i0.Input,
|
|
1520
|
+
args: [{
|
|
1521
|
+
isSignal: true,
|
|
1522
|
+
alias: "maxZoom",
|
|
1523
|
+
required: false
|
|
1524
|
+
}]
|
|
1525
|
+
}],
|
|
1526
|
+
zoomInLabel: [{
|
|
1527
|
+
type: i0.Input,
|
|
1528
|
+
args: [{
|
|
1529
|
+
isSignal: true,
|
|
1530
|
+
alias: "zoomInLabel",
|
|
1531
|
+
required: false
|
|
1532
|
+
}]
|
|
1533
|
+
}],
|
|
1534
|
+
zoomOutLabel: [{
|
|
1535
|
+
type: i0.Input,
|
|
1536
|
+
args: [{
|
|
1537
|
+
isSignal: true,
|
|
1538
|
+
alias: "zoomOutLabel",
|
|
1539
|
+
required: false
|
|
1540
|
+
}]
|
|
1541
|
+
}],
|
|
1542
|
+
fitLabel: [{
|
|
1543
|
+
type: i0.Input,
|
|
1544
|
+
args: [{
|
|
1545
|
+
isSignal: true,
|
|
1546
|
+
alias: "fitLabel",
|
|
1547
|
+
required: false
|
|
1548
|
+
}]
|
|
1549
|
+
}],
|
|
1550
|
+
layoutError: [{
|
|
1551
|
+
type: i0.Output,
|
|
1552
|
+
args: ["layoutError"]
|
|
1553
|
+
}],
|
|
941
1554
|
nodeTemplate: [{
|
|
942
1555
|
type: i0.ContentChild,
|
|
943
1556
|
args: [i0.forwardRef(() => WrGraphNodeTemplate), { isSignal: true }]
|
|
1557
|
+
}],
|
|
1558
|
+
viewportRef: [{
|
|
1559
|
+
type: i0.ViewChild,
|
|
1560
|
+
args: ["viewport", { isSignal: true }]
|
|
1561
|
+
}],
|
|
1562
|
+
stageRef: [{
|
|
1563
|
+
type: i0.ViewChild,
|
|
1564
|
+
args: ["stage", { isSignal: true }]
|
|
944
1565
|
}]
|
|
945
1566
|
}
|
|
946
1567
|
});
|
|
947
|
-
export { WrGraph, WrGraphNodeTemplate };
|
|
1568
|
+
export { WrGraph, WrGraphLayout, WrGraphNodeTemplate, WrLayeredGraphLayout };
|
|
948
1569
|
|
|
949
1570
|
//# sourceMappingURL=ngwr-graph.mjs.map
|