ngwr 16.6.0 → 16.7.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/avatar/styles/_index.scss +39 -0
- package/button/styles/_index.scss +45 -2
- package/copy-value/styles/_index.scss +4 -0
- package/dropdown/styles/_index.scss +17 -0
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- 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 +4 -3
- package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
- 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 +171 -6
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-breadcrumbs.mjs +9 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +26 -6
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +3 -3
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +5 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
- 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 +9 -9
- package/fesm2022/ngwr-charts-core.mjs +6 -6
- package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
- 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.mjs +3 -3
- package/fesm2022/ngwr-charts-meter-group.mjs +3 -3
- package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
- 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.mjs +6 -6
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-comment.mjs +7 -6
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +12 -12
- 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 +35 -0
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +102 -53
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +3 -3
- package/fesm2022/ngwr-date.mjs +40 -16
- 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 +19 -18
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +181 -18
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +18 -18
- package/fesm2022/ngwr-dropdown-testing.mjs +5 -1
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +59 -16
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +6 -5
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +7 -6
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +5 -0
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +68 -13
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +18 -16
- 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 +100 -11
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +6 -2
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +6 -2
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +6 -2
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +6 -2
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +6 -2
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +6 -2
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +6 -2
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +6 -2
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +6 -2
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +6 -2
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +6 -2
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-kk.mjs +520 -0
- package/fesm2022/ngwr-i18n-kk.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-ko.mjs +6 -2
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +6 -2
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +6 -2
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +6 -2
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +6 -2
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +6 -2
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +6 -2
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +6 -2
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +6 -2
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +6 -2
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +6 -2
- 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 +8 -4
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +3 -3
- package/fesm2022/ngwr-input-otp.mjs +3 -3
- package/fesm2022/ngwr-input.mjs +15 -15
- 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 +16 -15
- package/fesm2022/ngwr-load-state.mjs.map +1 -1
- 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 +9 -9
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination-testing.mjs +3 -0
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +32 -5
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +27 -27
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +7 -6
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +115 -15
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +75 -10
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- 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.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form.mjs +10 -6
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +232 -7
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select.mjs +28 -19
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar-testing.mjs +17 -1
- package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +66 -11
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +3 -3
- package/fesm2022/ngwr-sortable-list.mjs +11 -11
- 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 +6 -6
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table-router.mjs +89 -0
- package/fesm2022/ngwr-table-router.mjs.map +1 -0
- package/fesm2022/ngwr-table-testing.mjs +5 -0
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +268 -42
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +9 -5
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +8 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +60 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +15 -15
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +7 -6
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +4 -3
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +30 -2
- 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 +18 -13
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +16 -0
- package/graph/styles/_index.scss +48 -0
- package/i18n/ar.json +4 -2
- package/i18n/cs.json +4 -2
- package/i18n/de.json +4 -2
- package/i18n/en.json +4 -2
- package/i18n/es.json +4 -2
- package/i18n/fr.json +4 -2
- package/i18n/he.json +4 -2
- package/i18n/hi.json +4 -2
- package/i18n/id.json +4 -2
- package/i18n/it.json +4 -2
- package/i18n/ja.json +4 -2
- package/i18n/kk.json +567 -0
- package/i18n/ko.json +4 -2
- package/i18n/nl.json +4 -2
- package/i18n/pl.json +4 -2
- package/i18n/pt.json +4 -2
- package/i18n/ru.json +4 -2
- package/i18n/sv.json +4 -2
- package/i18n/tr.json +4 -2
- package/i18n/uk.json +4 -2
- package/i18n/vi.json +4 -2
- package/i18n/zh-TW.json +4 -2
- package/i18n/zh.json +4 -2
- package/llms-full.txt +29 -18
- package/llms.txt +4 -1
- package/package.json +15 -7
- package/pagination/styles/_index.scss +6 -0
- package/popover/styles/_index.scss +4 -2
- package/progress/styles/_index.scss +64 -0
- package/schematics/use/symbol-map.json +5 -0
- package/sidebar/styles/_index.scss +58 -6
- package/skills/ngwr/SKILL.md +7 -6
- package/skills/ngwr/references/catalog.md +6 -4
- package/table/styles/_index.scss +121 -32
- package/tabs/styles/_index.scss +9 -0
- package/theme/styles/_focus.scss +3 -1
- package/tour/styles/_index.scss +3 -2
- package/types/ngwr-avatar.d.ts +39 -0
- package/types/ngwr-button.d.ts +12 -0
- package/types/ngwr-date-picker-testing.d.ts +22 -0
- package/types/ngwr-date-picker.d.ts +78 -17
- package/types/ngwr-date.d.ts +51 -0
- package/types/ngwr-directives.d.ts +45 -0
- package/types/ngwr-dropdown-testing.d.ts +8 -1
- package/types/ngwr-dropdown.d.ts +29 -0
- package/types/ngwr-file-upload-testing.d.ts +10 -0
- package/types/ngwr-file-upload.d.ts +55 -1
- package/types/ngwr-form.d.ts +3 -1
- package/types/ngwr-graph-testing.d.ts +28 -1
- package/types/ngwr-graph.d.ts +53 -3
- package/types/ngwr-i18n-kk.d.ts +3 -0
- package/types/ngwr-image-cropper.d.ts +6 -0
- package/types/ngwr-pagination-testing.d.ts +8 -0
- package/types/ngwr-pagination.d.ts +16 -0
- package/types/ngwr-popover.d.ts +39 -0
- package/types/ngwr-progress.d.ts +63 -1
- package/types/ngwr-scroll.d.ts +86 -0
- package/types/ngwr-select.d.ts +31 -12
- package/types/ngwr-sidebar-testing.d.ts +21 -7
- package/types/ngwr-sidebar.d.ts +66 -4
- package/types/ngwr-table-router.d.ts +49 -0
- package/types/ngwr-table-testing.d.ts +7 -0
- package/types/ngwr-table.d.ts +184 -6
- package/types/ngwr-tabs-router.d.ts +1 -1
- package/types/ngwr-tabs-testing.d.ts +5 -1
- package/types/ngwr-tabs.d.ts +34 -1
- package/types/ngwr-utils.d.ts +13 -0
- package/types/ngwr-version.d.ts +1 -1
package/fesm2022/ngwr-graph.mjs
CHANGED
|
@@ -15,7 +15,7 @@ var WrGraphNodeTemplate = class WrGraphNodeTemplate {
|
|
|
15
15
|
template = inject(TemplateRef);
|
|
16
16
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
17
17
|
minVersion: "12.0.0",
|
|
18
|
-
version: "22.
|
|
18
|
+
version: "22.3.0",
|
|
19
19
|
ngImport: i0,
|
|
20
20
|
type: WrGraphNodeTemplate,
|
|
21
21
|
deps: [],
|
|
@@ -23,7 +23,7 @@ var WrGraphNodeTemplate = class WrGraphNodeTemplate {
|
|
|
23
23
|
});
|
|
24
24
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
25
25
|
minVersion: "14.0.0",
|
|
26
|
-
version: "22.
|
|
26
|
+
version: "22.3.0",
|
|
27
27
|
type: WrGraphNodeTemplate,
|
|
28
28
|
isStandalone: true,
|
|
29
29
|
selector: "ng-template[wrGraphNode]",
|
|
@@ -32,7 +32,7 @@ var WrGraphNodeTemplate = class WrGraphNodeTemplate {
|
|
|
32
32
|
};
|
|
33
33
|
i0.ɵɵngDeclareClassMetadata({
|
|
34
34
|
minVersion: "12.0.0",
|
|
35
|
-
version: "22.
|
|
35
|
+
version: "22.3.0",
|
|
36
36
|
ngImport: i0,
|
|
37
37
|
type: WrGraphNodeTemplate,
|
|
38
38
|
decorators: [{
|
|
@@ -749,6 +749,11 @@ var WrGraph = class WrGraph {
|
|
|
749
749
|
...ngDevMode ? { debugName: "maxZoom" } : /* istanbul ignore next */ {},
|
|
750
750
|
transform: wrNumAttr(DEFAULT_MAX_ZOOM)
|
|
751
751
|
});
|
|
752
|
+
selectable = input(false, {
|
|
753
|
+
...ngDevMode ? { debugName: "selectable" } : /* istanbul ignore next */ {},
|
|
754
|
+
transform: booleanAttribute
|
|
755
|
+
});
|
|
756
|
+
selected = model(null, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
752
757
|
zoomInLabel = input(null, ...ngDevMode ? [{ debugName: "zoomInLabel" }] : /* istanbul ignore next */ []);
|
|
753
758
|
zoomOutLabel = input(null, ...ngDevMode ? [{ debugName: "zoomOutLabel" }] : /* istanbul ignore next */ []);
|
|
754
759
|
fitLabel = input(null, ...ngDevMode ? [{ debugName: "fitLabel" }] : /* istanbul ignore next */ []);
|
|
@@ -764,6 +769,8 @@ var WrGraph = class WrGraph {
|
|
|
764
769
|
stageRef = viewChild("stage", ...ngDevMode ? [{ debugName: "stageRef" }] : /* istanbul ignore next */ []);
|
|
765
770
|
markerId = `wr-graph-${graphUid++}-arrow`;
|
|
766
771
|
markerUrl = `url(#${this.markerId})`;
|
|
772
|
+
linkedMarkerId = `${this.markerId}-linked`;
|
|
773
|
+
linkedMarkerUrl = `url(#${this.linkedMarkerId})`;
|
|
767
774
|
arrowSize = ARROW_SIZE;
|
|
768
775
|
engine = inject(WrGraphLayout, { optional: true }) ?? new WrLayeredGraphLayout();
|
|
769
776
|
dir = inject(Directionality, { optional: true });
|
|
@@ -944,6 +951,7 @@ var WrGraph = class WrGraph {
|
|
|
944
951
|
frameId = null;
|
|
945
952
|
pointers = /* @__PURE__ */ new Map();
|
|
946
953
|
dragging = false;
|
|
954
|
+
dragged = false;
|
|
947
955
|
pinchFrom = null;
|
|
948
956
|
relations = computed(() => {
|
|
949
957
|
const { nodes } = this.placed();
|
|
@@ -977,6 +985,24 @@ var WrGraph = class WrGraph {
|
|
|
977
985
|
}
|
|
978
986
|
return text;
|
|
979
987
|
}, ...ngDevMode ? [{ debugName: "relations" }] : /* istanbul ignore next */ []);
|
|
988
|
+
highlight = computed(() => {
|
|
989
|
+
const id = this.selectable() ? this.selected() : null;
|
|
990
|
+
const { nodes, edges } = this.placed();
|
|
991
|
+
if (id === null || !nodes.some((placed) => placed.node.id === id)) return null;
|
|
992
|
+
const marks = /* @__PURE__ */ new Map();
|
|
993
|
+
const lit = /* @__PURE__ */ new Set();
|
|
994
|
+
for (const { edge } of edges) {
|
|
995
|
+
if (edge.from !== id && edge.to !== id) continue;
|
|
996
|
+
lit.add(edge.id);
|
|
997
|
+
marks.set(edge.from, "linked");
|
|
998
|
+
marks.set(edge.to, "linked");
|
|
999
|
+
}
|
|
1000
|
+
marks.set(id, "selected");
|
|
1001
|
+
return {
|
|
1002
|
+
nodes: marks,
|
|
1003
|
+
edges: lit
|
|
1004
|
+
};
|
|
1005
|
+
}, ...ngDevMode ? [{ debugName: "highlight" }] : /* istanbul ignore next */ []);
|
|
980
1006
|
constructor() {
|
|
981
1007
|
if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("graph");
|
|
982
1008
|
effect((onCleanup) => {
|
|
@@ -1087,6 +1113,28 @@ var WrGraph = class WrGraph {
|
|
|
1087
1113
|
this.moved = true;
|
|
1088
1114
|
this.commit(IDENTITY);
|
|
1089
1115
|
}
|
|
1116
|
+
onNodeClick(event, id) {
|
|
1117
|
+
const dragged = this.dragged;
|
|
1118
|
+
this.dragged = false;
|
|
1119
|
+
if (dragged) return;
|
|
1120
|
+
if ((event.target instanceof Element ? event.target.closest(INTERACTIVE) : null) !== event.currentTarget) return;
|
|
1121
|
+
this.toggle(id);
|
|
1122
|
+
}
|
|
1123
|
+
onNodeKeydown(event, id) {
|
|
1124
|
+
if (event.target !== event.currentTarget || event.ctrlKey || event.metaKey || event.altKey) return;
|
|
1125
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
1126
|
+
event.preventDefault();
|
|
1127
|
+
this.toggle(id);
|
|
1128
|
+
}
|
|
1129
|
+
onEscape(event) {
|
|
1130
|
+
if (!this.selectable() || this.selected() === null) return;
|
|
1131
|
+
event.preventDefault();
|
|
1132
|
+
event.stopPropagation();
|
|
1133
|
+
this.selected.set(null);
|
|
1134
|
+
}
|
|
1135
|
+
toggle(id) {
|
|
1136
|
+
this.selected.update((selected) => selected === id ? null : id);
|
|
1137
|
+
}
|
|
1090
1138
|
zoomIn() {
|
|
1091
1139
|
this.zoomBy(ZOOM_STEP);
|
|
1092
1140
|
}
|
|
@@ -1268,8 +1316,9 @@ var WrGraph = class WrGraph {
|
|
|
1268
1316
|
}
|
|
1269
1317
|
onPointerDown(event, viewport) {
|
|
1270
1318
|
if (event.pointerType === "mouse" && event.button !== 0) return;
|
|
1319
|
+
this.dragged = false;
|
|
1271
1320
|
const target = event.target instanceof Element ? event.target.closest(INTERACTIVE) : null;
|
|
1272
|
-
if (target && target !== viewport) return;
|
|
1321
|
+
if (target && target !== viewport && !target.classList.contains("wr-graph__select")) return;
|
|
1273
1322
|
this.pointers.set(event.pointerId, {
|
|
1274
1323
|
x: event.clientX,
|
|
1275
1324
|
y: event.clientY
|
|
@@ -1325,16 +1374,18 @@ var WrGraph = class WrGraph {
|
|
|
1325
1374
|
if (this.pointers.size) return;
|
|
1326
1375
|
this.dragging = false;
|
|
1327
1376
|
this.panning.set(false);
|
|
1377
|
+
if (this.dragged) setTimeout(() => this.dragged = false);
|
|
1328
1378
|
}
|
|
1329
1379
|
startDrag(viewport) {
|
|
1330
1380
|
this.dragging = true;
|
|
1381
|
+
this.dragged = true;
|
|
1331
1382
|
this.panning.set(true);
|
|
1332
1383
|
this.animated.set(false);
|
|
1333
1384
|
for (const id of this.pointers.keys()) viewport.setPointerCapture?.(id);
|
|
1334
1385
|
}
|
|
1335
1386
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1336
1387
|
minVersion: "12.0.0",
|
|
1337
|
-
version: "22.
|
|
1388
|
+
version: "22.3.0",
|
|
1338
1389
|
ngImport: i0,
|
|
1339
1390
|
type: WrGraph,
|
|
1340
1391
|
deps: [],
|
|
@@ -1342,7 +1393,7 @@ var WrGraph = class WrGraph {
|
|
|
1342
1393
|
});
|
|
1343
1394
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1344
1395
|
minVersion: "17.0.0",
|
|
1345
|
-
version: "22.
|
|
1396
|
+
version: "22.3.0",
|
|
1346
1397
|
type: WrGraph,
|
|
1347
1398
|
isStandalone: true,
|
|
1348
1399
|
selector: "wr-graph",
|
|
@@ -1417,6 +1468,20 @@ var WrGraph = class WrGraph {
|
|
|
1417
1468
|
isRequired: false,
|
|
1418
1469
|
transformFunction: null
|
|
1419
1470
|
},
|
|
1471
|
+
selectable: {
|
|
1472
|
+
classPropertyName: "selectable",
|
|
1473
|
+
publicName: "selectable",
|
|
1474
|
+
isSignal: true,
|
|
1475
|
+
isRequired: false,
|
|
1476
|
+
transformFunction: null
|
|
1477
|
+
},
|
|
1478
|
+
selected: {
|
|
1479
|
+
classPropertyName: "selected",
|
|
1480
|
+
publicName: "selected",
|
|
1481
|
+
isSignal: true,
|
|
1482
|
+
isRequired: false,
|
|
1483
|
+
transformFunction: null
|
|
1484
|
+
},
|
|
1420
1485
|
zoomInLabel: {
|
|
1421
1486
|
classPropertyName: "zoomInLabel",
|
|
1422
1487
|
publicName: "zoomInLabel",
|
|
@@ -1441,13 +1506,16 @@ var WrGraph = class WrGraph {
|
|
|
1441
1506
|
},
|
|
1442
1507
|
outputs: {
|
|
1443
1508
|
zoom: "zoomChange",
|
|
1509
|
+
selected: "selectedChange",
|
|
1444
1510
|
layoutError: "layoutError"
|
|
1445
1511
|
},
|
|
1446
1512
|
host: {
|
|
1513
|
+
listeners: { "keydown.escape": "onEscape($event)" },
|
|
1447
1514
|
properties: {
|
|
1448
1515
|
"class.wr-graph--pending": "layoutPending()",
|
|
1449
1516
|
"class.wr-graph--zoomable": "zoomable()",
|
|
1450
|
-
"class.wr-graph--panning": "panning()"
|
|
1517
|
+
"class.wr-graph--panning": "panning()",
|
|
1518
|
+
"class.wr-graph--selectable": "selectable()"
|
|
1451
1519
|
},
|
|
1452
1520
|
classAttribute: "wr-graph"
|
|
1453
1521
|
},
|
|
@@ -1472,7 +1540,7 @@ var WrGraph = class WrGraph {
|
|
|
1472
1540
|
isSignal: true
|
|
1473
1541
|
}],
|
|
1474
1542
|
ngImport: i0,
|
|
1475
|
-
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 <!-- `refX` is the triangle's base: the line ends there and the arrowhead alone reaches the node. -->\n <marker\n [attr.id]=\"markerId\"\n viewBox=\"0 0 10 10\"\n refX=\"0\"\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
|
|
1543
|
+
template: "@let graph = view();\n@let lit = highlight();\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 <!-- `refX` is the triangle's base: the line ends there and the arrowhead alone reaches the node. -->\n <marker\n [attr.id]=\"markerId\"\n viewBox=\"0 0 10 10\"\n refX=\"0\"\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 @if (selectable()) {\n <marker\n class=\"wr-graph__arrow wr-graph__arrow--linked\"\n [attr.id]=\"linkedMarkerId\"\n viewBox=\"0 0 10 10\"\n refX=\"0\"\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 }\n </defs>\n @for (edge of graph.edges; track edge.id) {\n @let linked = !!lit?.edges.has(edge.id);\n <path\n class=\"wr-graph__edge\"\n [class.wr-graph__edge--linked]=\"linked\"\n [class.wr-graph__edge--dimmed]=\"lit && !linked\"\n [attr.d]=\"edge.d\"\n [attr.data-from]=\"edge.from\"\n [attr.data-to]=\"edge.to\"\n [attr.marker-end]=\"linked ? linkedMarkerUrl : 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 @let mark = lit?.nodes.get(entry.node.id);\n <div\n class=\"wr-graph__node\"\n role=\"listitem\"\n [class.wr-graph__node--selected]=\"mark === 'selected'\"\n [class.wr-graph__node--linked]=\"mark === 'linked'\"\n [class.wr-graph__node--dimmed]=\"lit && !mark\"\n [style.width.px]=\"entry.width\"\n [style.height.px]=\"entry.height\"\n [style.transform]=\"entry.transform\"\n >\n <ng-template #content>\n @if (nodeTemplate(); as custom) {\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.node }\"\n />\n } @else {\n <div class=\"wr-graph__card\">{{ entry.node.label }}</div>\n }\n </ng-template>\n <!-- The button sits INSIDE the item, which keeps the list's ownership, and the relation sentence stays beside it. -->\n @if (selectable()) {\n <div\n class=\"wr-graph__select\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-pressed]=\"mark === 'selected'\"\n (click)=\"onNodeClick($event, entry.node.id)\"\n (keydown)=\"onNodeKeydown($event, entry.node.id)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" />\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",
|
|
1476
1544
|
dependencies: [{
|
|
1477
1545
|
kind: "directive",
|
|
1478
1546
|
type: NgTemplateOutlet,
|
|
@@ -1488,7 +1556,7 @@ var WrGraph = class WrGraph {
|
|
|
1488
1556
|
};
|
|
1489
1557
|
i0.ɵɵngDeclareClassMetadata({
|
|
1490
1558
|
minVersion: "12.0.0",
|
|
1491
|
-
version: "22.
|
|
1559
|
+
version: "22.3.0",
|
|
1492
1560
|
ngImport: i0,
|
|
1493
1561
|
type: WrGraph,
|
|
1494
1562
|
decorators: [{
|
|
@@ -1501,9 +1569,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1501
1569
|
class: "wr-graph",
|
|
1502
1570
|
"[class.wr-graph--pending]": "layoutPending()",
|
|
1503
1571
|
"[class.wr-graph--zoomable]": "zoomable()",
|
|
1504
|
-
"[class.wr-graph--panning]": "panning()"
|
|
1572
|
+
"[class.wr-graph--panning]": "panning()",
|
|
1573
|
+
"[class.wr-graph--selectable]": "selectable()",
|
|
1574
|
+
"(keydown.escape)": "onEscape($event)"
|
|
1505
1575
|
},
|
|
1506
|
-
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 <!-- `refX` is the triangle's base: the line ends there and the arrowhead alone reaches the node. -->\n <marker\n [attr.id]=\"markerId\"\n viewBox=\"0 0 10 10\"\n refX=\"0\"\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
|
|
1576
|
+
template: "@let graph = view();\n@let lit = highlight();\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 <!-- `refX` is the triangle's base: the line ends there and the arrowhead alone reaches the node. -->\n <marker\n [attr.id]=\"markerId\"\n viewBox=\"0 0 10 10\"\n refX=\"0\"\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 @if (selectable()) {\n <marker\n class=\"wr-graph__arrow wr-graph__arrow--linked\"\n [attr.id]=\"linkedMarkerId\"\n viewBox=\"0 0 10 10\"\n refX=\"0\"\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 }\n </defs>\n @for (edge of graph.edges; track edge.id) {\n @let linked = !!lit?.edges.has(edge.id);\n <path\n class=\"wr-graph__edge\"\n [class.wr-graph__edge--linked]=\"linked\"\n [class.wr-graph__edge--dimmed]=\"lit && !linked\"\n [attr.d]=\"edge.d\"\n [attr.data-from]=\"edge.from\"\n [attr.data-to]=\"edge.to\"\n [attr.marker-end]=\"linked ? linkedMarkerUrl : 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 @let mark = lit?.nodes.get(entry.node.id);\n <div\n class=\"wr-graph__node\"\n role=\"listitem\"\n [class.wr-graph__node--selected]=\"mark === 'selected'\"\n [class.wr-graph__node--linked]=\"mark === 'linked'\"\n [class.wr-graph__node--dimmed]=\"lit && !mark\"\n [style.width.px]=\"entry.width\"\n [style.height.px]=\"entry.height\"\n [style.transform]=\"entry.transform\"\n >\n <ng-template #content>\n @if (nodeTemplate(); as custom) {\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.node }\"\n />\n } @else {\n <div class=\"wr-graph__card\">{{ entry.node.label }}</div>\n }\n </ng-template>\n <!-- The button sits INSIDE the item, which keeps the list's ownership, and the relation sentence stays beside it. -->\n @if (selectable()) {\n <div\n class=\"wr-graph__select\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-pressed]=\"mark === 'selected'\"\n (click)=\"onNodeClick($event, entry.node.id)\"\n (keydown)=\"onNodeKeydown($event, entry.node.id)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" />\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"
|
|
1507
1577
|
}]
|
|
1508
1578
|
}],
|
|
1509
1579
|
ctorParameters: () => [],
|
|
@@ -1591,6 +1661,25 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1591
1661
|
required: false
|
|
1592
1662
|
}]
|
|
1593
1663
|
}],
|
|
1664
|
+
selectable: [{
|
|
1665
|
+
type: i0.Input,
|
|
1666
|
+
args: [{
|
|
1667
|
+
isSignal: true,
|
|
1668
|
+
alias: "selectable",
|
|
1669
|
+
required: false
|
|
1670
|
+
}]
|
|
1671
|
+
}],
|
|
1672
|
+
selected: [{
|
|
1673
|
+
type: i0.Input,
|
|
1674
|
+
args: [{
|
|
1675
|
+
isSignal: true,
|
|
1676
|
+
alias: "selected",
|
|
1677
|
+
required: false
|
|
1678
|
+
}]
|
|
1679
|
+
}, {
|
|
1680
|
+
type: i0.Output,
|
|
1681
|
+
args: ["selectedChange"]
|
|
1682
|
+
}],
|
|
1594
1683
|
zoomInLabel: [{
|
|
1595
1684
|
type: i0.Input,
|
|
1596
1685
|
args: [{
|