@limetech/lime-elements 40.12.3 → 40.13.1
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/CHANGELOG.md +18 -0
- package/dist/cjs/drag-to-reorder-BP5YkPuu.js +3092 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-3d-hover-effect-glow.cjs.entry.js +1 -1
- package/dist/cjs/limel-action-bar_3.cjs.entry.js +4 -4
- package/dist/cjs/limel-ai-avatar.cjs.entry.js +2 -2
- package/dist/cjs/limel-badge.cjs.entry.js +2 -2
- package/dist/cjs/limel-banner.cjs.entry.js +1 -1
- package/dist/cjs/limel-breadcrumbs_6.cjs.entry.js +6 -6
- package/dist/cjs/limel-button-group.cjs.entry.js +1 -1
- package/dist/cjs/limel-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-callout.cjs.entry.js +2 -2
- package/dist/cjs/limel-card.cjs.entry.js +1 -1
- package/dist/cjs/limel-chart.cjs.entry.js +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip-set.cjs.entry.js +2 -2
- package/dist/cjs/limel-chip_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-circular-progress.cjs.entry.js +1 -1
- package/dist/cjs/limel-code-diff.cjs.entry.js +2 -2
- package/dist/cjs/limel-code-editor.cjs.entry.js +2 -2
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +2 -2
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js +2 -2
- package/dist/cjs/limel-color-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
- package/dist/cjs/limel-dock.cjs.entry.js +3 -3
- package/dist/cjs/{limel-scroller.cjs.entry.js → limel-drag-handle_2.cjs.entry.js} +40 -2
- package/dist/cjs/limel-email-viewer.cjs.entry.js +2 -2
- package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-file-viewer.cjs.entry.js +65 -56
- package/dist/cjs/limel-file.cjs.entry.js +2 -2
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +2 -2
- package/dist/cjs/limel-flex-container.cjs.entry.js +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +539 -3171
- package/dist/cjs/limel-grid.cjs.entry.js +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +1 -1
- package/dist/cjs/limel-help-content.cjs.entry.js +1 -1
- package/dist/cjs/limel-help.cjs.entry.js +2 -2
- package/dist/cjs/limel-helper-line_3.cjs.entry.js +4 -4
- package/dist/cjs/limel-hotkey_4.cjs.entry.js +5 -5
- package/dist/cjs/limel-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-icon.cjs.entry.js +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +2 -2
- package/dist/cjs/limel-list-item.cjs.entry.js +3 -3
- package/dist/cjs/limel-markdown.cjs.entry.js +1 -1
- package/dist/cjs/limel-masonry-layout.cjs.entry.js +1 -1
- package/dist/cjs/limel-menu-item-meta.cjs.entry.js +1 -1
- package/dist/cjs/limel-pagination-jump.cjs.entry.js +1 -1
- package/dist/cjs/limel-pagination.cjs.entry.js +2 -2
- package/dist/cjs/limel-picker.cjs.entry.js +2 -2
- package/dist/cjs/limel-popover_2.cjs.entry.js +2 -2
- package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +2 -2
- package/dist/cjs/limel-radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/limel-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-resize-handle.cjs.entry.js +43 -2
- package/dist/cjs/limel-select.cjs.entry.js +1 -1
- package/dist/cjs/limel-shortcut.cjs.entry.js +1 -1
- package/dist/cjs/limel-side-panel.cjs.entry.js +16 -6
- package/dist/cjs/limel-slider.cjs.entry.js +4 -4
- package/dist/cjs/limel-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/limel-split-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-switch.cjs.entry.js +1 -1
- package/dist/cjs/limel-tab-bar.cjs.entry.js +120 -16
- package/dist/cjs/limel-tab-panel.cjs.entry.js +7 -1
- package/dist/cjs/limel-table.cjs.entry.js +3 -3
- package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +4 -4
- package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{translations-DDyw5Zzz.js → translations-CLSqfR3x.js} +56 -0
- package/dist/collection/components/3d-hover-effect-glow/3d-hover-effect-glow.js +1 -1
- package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js +1 -1
- package/dist/collection/components/action-bar/action-bar.js +2 -2
- package/dist/collection/components/ai-avatar/ai-avatar.js +1 -1
- package/dist/collection/components/badge/badge.js +2 -2
- package/dist/collection/components/banner/banner.js +1 -1
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +1 -1
- package/dist/collection/components/button/button.js +2 -2
- package/dist/collection/components/button-group/button-group.js +1 -1
- package/dist/collection/components/callout/callout.js +1 -1
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/chip/chip.js +1 -1
- package/dist/collection/components/chip-set/chip-set.js +1 -1
- package/dist/collection/components/circular-progress/circular-progress.js +1 -1
- package/dist/collection/components/code-diff/code-diff.js +1 -1
- package/dist/collection/components/code-editor/code-editor.js +1 -1
- package/dist/collection/components/collapsible-section/collapsible-section.js +1 -1
- package/dist/collection/components/color-picker/color-picker-palette.js +2 -2
- package/dist/collection/components/color-picker/color-picker.js +1 -1
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +1 -1
- package/dist/collection/components/dialog/dialog.js +2 -2
- package/dist/collection/components/dock/dock.js +2 -2
- package/dist/collection/components/drag-handle/drag-handle.js +1 -1
- package/dist/collection/components/email-viewer/email-viewer.js +1 -1
- package/dist/collection/components/file/file.js +1 -1
- package/dist/collection/components/file-dropzone/file-dropzone.js +1 -1
- package/dist/collection/components/file-input/file-input.js +1 -1
- package/dist/collection/components/flex-container/flex-container.js +1 -1
- package/dist/collection/components/form/form.css +59 -0
- package/dist/collection/components/form/form.js +49 -2
- package/dist/collection/components/form/show-field.js +116 -0
- package/dist/collection/components/form/templates/array-field-collapsible-item.js +1 -0
- package/dist/collection/components/form/templates/array-field-item.js +5 -0
- package/dist/collection/components/form/templates/array-field.js +20 -158
- package/dist/collection/components/form/templates/field.js +17 -0
- package/dist/collection/components/grid/grid.js +1 -1
- package/dist/collection/components/header/header.js +1 -1
- package/dist/collection/components/help/help-content.js +1 -1
- package/dist/collection/components/help/help.js +2 -2
- package/dist/collection/components/helper-line/helper-line.js +2 -2
- package/dist/collection/components/hotkey/hotkey.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +2 -2
- package/dist/collection/components/input-field/input-field.js +1 -1
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list-item/list-item.js +2 -2
- package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.js +1 -1
- package/dist/collection/components/markdown/markdown.js +1 -1
- package/dist/collection/components/masonry-layout/masonry-layout.js +1 -1
- package/dist/collection/components/menu/menu.js +1 -1
- package/dist/collection/components/menu-list/menu-list.js +1 -1
- package/dist/collection/components/menu-surface/menu-surface.js +1 -1
- package/dist/collection/components/notched-outline/notched-outline.js +1 -1
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/picker/picker.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover-surface/popover-surface.js +1 -1
- package/dist/collection/components/portal/portal.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button.js +2 -2
- package/dist/collection/components/resize-handle/resize-handle.css +35 -33
- package/dist/collection/components/resize-handle/resize-handle.js +86 -4
- package/dist/collection/components/scroller/scroller.js +2 -2
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/shortcut/shortcut.js +1 -1
- package/dist/collection/components/side-panel/side-panel.js +44 -27
- package/dist/collection/components/slider/slider.js +3 -3
- package/dist/collection/components/snackbar/snackbar.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-button/split-button.js +2 -2
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tab-bar/tab-bar.css +68 -22
- package/dist/collection/components/tab-bar/tab-bar.js +131 -4
- package/dist/collection/components/tab-bar/tabs.js +23 -0
- package/dist/collection/components/tab-panel/tab-panel.js +54 -1
- package/dist/collection/components/table/table.js +2 -2
- package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +3 -3
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/tooltip/tooltip-content.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/translations/da.js +7 -0
- package/dist/collection/translations/de.js +7 -0
- package/dist/collection/translations/en.js +7 -0
- package/dist/collection/translations/fi.js +7 -0
- package/dist/collection/translations/fr.js +7 -0
- package/dist/collection/translations/nl.js +7 -0
- package/dist/collection/translations/no.js +7 -0
- package/dist/collection/translations/sv.js +7 -0
- package/dist/collection/util/drag-to-reorder.js +116 -0
- package/dist/esm/{_baseForOwn-D5j7fHlv.js → _baseForOwn-vKFWmmaS.js} +1 -1
- package/dist/esm/{_baseIsEqual-CyF4P8uM.js → _baseIsEqual-B_JRErB0.js} +1 -1
- package/dist/esm/{_baseIteratee-CpbczHY1.js → _baseIteratee-CVz7aes3.js} +1 -1
- package/dist/esm/{_baseSet-Cw2IE6ZF.js → _baseSet-BUAq8NGm.js} +1 -1
- package/dist/esm/{cloneDeep-DAbOtbs8.js → cloneDeep-Bcll-3f8.js} +1 -1
- package/dist/esm/drag-to-reorder-BXmXIwCa.js +3086 -0
- package/dist/esm/{isEqual-CE83yS8T.js → isEqual-C-pK6AAU.js} +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-3d-hover-effect-glow.entry.js +1 -1
- package/dist/esm/limel-action-bar_3.entry.js +4 -4
- package/dist/esm/limel-ai-avatar.entry.js +2 -2
- package/dist/esm/limel-badge.entry.js +2 -2
- package/dist/esm/limel-banner.entry.js +1 -1
- package/dist/esm/limel-breadcrumbs_6.entry.js +6 -6
- package/dist/esm/limel-button-group.entry.js +1 -1
- package/dist/esm/limel-button.entry.js +2 -2
- package/dist/esm/limel-callout.entry.js +2 -2
- package/dist/esm/limel-card.entry.js +1 -1
- package/dist/esm/limel-chart.entry.js +1 -1
- package/dist/esm/limel-checkbox.entry.js +1 -1
- package/dist/esm/limel-chip-set.entry.js +4 -4
- package/dist/esm/limel-chip_2.entry.js +2 -2
- package/dist/esm/limel-circular-progress.entry.js +1 -1
- package/dist/esm/limel-code-diff.entry.js +2 -2
- package/dist/esm/limel-code-editor.entry.js +2 -2
- package/dist/esm/limel-collapsible-section.entry.js +2 -2
- package/dist/esm/limel-color-picker-palette.entry.js +2 -2
- package/dist/esm/limel-color-picker.entry.js +1 -1
- package/dist/esm/limel-dialog.entry.js +4 -4
- package/dist/esm/limel-dock.entry.js +3 -3
- package/dist/esm/{limel-scroller.entry.js → limel-drag-handle_2.entry.js} +40 -3
- package/dist/esm/limel-email-viewer.entry.js +2 -2
- package/dist/esm/limel-file-dropzone_2.entry.js +5 -5
- package/dist/esm/limel-file-viewer.entry.js +65 -56
- package/dist/esm/limel-file.entry.js +2 -2
- package/dist/esm/limel-flatpickr-adapter.entry.js +2 -2
- package/dist/esm/limel-flex-container.entry.js +1 -1
- package/dist/esm/limel-form.entry.js +536 -3168
- package/dist/esm/limel-grid.entry.js +1 -1
- package/dist/esm/limel-header.entry.js +1 -1
- package/dist/esm/limel-help-content.entry.js +1 -1
- package/dist/esm/limel-help.entry.js +2 -2
- package/dist/esm/limel-helper-line_3.entry.js +4 -4
- package/dist/esm/limel-hotkey_4.entry.js +5 -5
- package/dist/esm/limel-icon-button.entry.js +1 -1
- package/dist/esm/limel-icon.entry.js +1 -1
- package/dist/esm/limel-info-tile.entry.js +2 -2
- package/dist/esm/limel-list-item.entry.js +3 -3
- package/dist/esm/limel-markdown.entry.js +1 -1
- package/dist/esm/limel-masonry-layout.entry.js +1 -1
- package/dist/esm/limel-menu-item-meta.entry.js +1 -1
- package/dist/esm/limel-pagination-jump.entry.js +1 -1
- package/dist/esm/limel-pagination.entry.js +2 -2
- package/dist/esm/limel-picker.entry.js +2 -2
- package/dist/esm/limel-popover_2.entry.js +2 -2
- package/dist/esm/limel-profile-picture.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +5 -5
- package/dist/esm/limel-radio-button-group.entry.js +1 -1
- package/dist/esm/limel-radio-button.entry.js +2 -2
- package/dist/esm/limel-resize-handle.entry.js +43 -2
- package/dist/esm/limel-select.entry.js +1 -1
- package/dist/esm/limel-shortcut.entry.js +1 -1
- package/dist/esm/limel-side-panel.entry.js +16 -6
- package/dist/esm/limel-slider.entry.js +4 -4
- package/dist/esm/limel-snackbar.entry.js +3 -3
- package/dist/esm/limel-split-button.entry.js +2 -2
- package/dist/esm/limel-switch.entry.js +1 -1
- package/dist/esm/limel-tab-bar.entry.js +117 -13
- package/dist/esm/limel-tab-panel.entry.js +7 -1
- package/dist/esm/limel-table.entry.js +7 -7
- package/dist/esm/limel-text-editor-link-menu.entry.js +4 -4
- package/dist/esm/limel-text-editor.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{translations-UrIr-5_D.js → translations-Drl5LNAD.js} +56 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-35bc5ed2.entry.js → p-01de145c.entry.js} +1 -1
- package/dist/lime-elements/{p-3ee121fa.entry.js → p-026eed2d.entry.js} +1 -1
- package/dist/lime-elements/{p-9ff6a455.entry.js → p-068b141b.entry.js} +1 -1
- package/dist/lime-elements/{p-9168793f.entry.js → p-09f8f883.entry.js} +1 -1
- package/dist/lime-elements/p-1066a057.entry.js +1 -0
- package/dist/lime-elements/{p-95322502.entry.js → p-1663fa9d.entry.js} +1 -1
- package/dist/lime-elements/{p-def7b38f.entry.js → p-17aa9235.entry.js} +1 -1
- package/dist/lime-elements/{p-910807cb.entry.js → p-19426c76.entry.js} +1 -1
- package/dist/lime-elements/{p-622660dd.entry.js → p-1d6014ed.entry.js} +1 -1
- package/dist/lime-elements/p-2370ff51.entry.js +1 -0
- package/dist/lime-elements/{p-0f18981d.entry.js → p-242f1032.entry.js} +1 -1
- package/dist/lime-elements/{p-828558cf.entry.js → p-27d375f3.entry.js} +1 -1
- package/dist/lime-elements/{p-2ba9d62f.entry.js → p-300f80e7.entry.js} +1 -1
- package/dist/lime-elements/{p-9ca18ba5.entry.js → p-3b4f6329.entry.js} +1 -1
- package/dist/lime-elements/{p-2528f75e.entry.js → p-3de45ea6.entry.js} +2 -2
- package/dist/lime-elements/{p-675a7469.entry.js → p-3f447d22.entry.js} +1 -1
- package/dist/lime-elements/{p-780dae0b.entry.js → p-3fa66fb1.entry.js} +1 -1
- package/dist/lime-elements/{p-09390c6a.entry.js → p-41172b62.entry.js} +1 -1
- package/dist/lime-elements/{p-d5144955.entry.js → p-41fb6e88.entry.js} +1 -1
- package/dist/lime-elements/{p-f4c9940e.entry.js → p-44ec1f22.entry.js} +1 -1
- package/dist/lime-elements/{p-268b4da1.entry.js → p-4a272ac2.entry.js} +1 -1
- package/dist/lime-elements/{p-e25bfb2c.entry.js → p-4a381bc6.entry.js} +1 -1
- package/dist/lime-elements/p-56fe13ef.entry.js +1 -0
- package/dist/lime-elements/p-5d623004.entry.js +1 -0
- package/dist/lime-elements/{p-8a59698f.entry.js → p-5ea07cbe.entry.js} +1 -1
- package/dist/lime-elements/p-600466a9.entry.js +1 -0
- package/dist/lime-elements/{p-657bfa36.entry.js → p-62b6e235.entry.js} +1 -1
- package/dist/lime-elements/p-64540beb.entry.js +1 -0
- package/dist/lime-elements/{p-1020ca20.entry.js → p-674680f9.entry.js} +1 -1
- package/dist/lime-elements/{p-d79d777e.entry.js → p-67536ac3.entry.js} +1 -1
- package/dist/lime-elements/{p-dd075353.entry.js → p-6770cf06.entry.js} +1 -1
- package/dist/lime-elements/{p-887eea11.entry.js → p-7375fac2.entry.js} +1 -1
- package/dist/lime-elements/{p-fb15f608.entry.js → p-7829198d.entry.js} +1 -1
- package/dist/lime-elements/{p-abed5afd.entry.js → p-82672504.entry.js} +1 -1
- package/dist/lime-elements/{p-24e5d420.entry.js → p-8339d921.entry.js} +1 -1
- package/dist/lime-elements/{p-33ed0c68.entry.js → p-87c9f4de.entry.js} +1 -1
- package/dist/lime-elements/{p-7a290372.entry.js → p-89316964.entry.js} +1 -1
- package/dist/lime-elements/{p-527e9c95.entry.js → p-8a9361a2.entry.js} +1 -1
- package/dist/lime-elements/{p-46bf8b22.entry.js → p-8e78fd4f.entry.js} +1 -1
- package/dist/lime-elements/{p-db1f9eba.entry.js → p-8f133cd6.entry.js} +1 -1
- package/dist/lime-elements/{p-ff4a8b89.entry.js → p-90198515.entry.js} +1 -1
- package/dist/lime-elements/{p-236743f1.entry.js → p-95ca7426.entry.js} +1 -1
- package/dist/lime-elements/{p-55b56742.entry.js → p-9aa921a2.entry.js} +1 -1
- package/dist/lime-elements/{p-540b2b24.entry.js → p-9bbf2612.entry.js} +1 -1
- package/dist/lime-elements/{p-a449ca04.entry.js → p-9d354eca.entry.js} +1 -1
- package/dist/lime-elements/{p-68542e00.entry.js → p-9e9187ce.entry.js} +1 -1
- package/dist/lime-elements/p-B26k4gw8.js +1 -0
- package/dist/lime-elements/p-BAqAt5It.js +1 -0
- package/dist/lime-elements/p-Cu9Ji1iJ.js +1 -0
- package/dist/lime-elements/{p-BY5NjPj8.js → p-D9Ezd43A.js} +1 -1
- package/dist/lime-elements/{p-nVemxylR.js → p-DFu1q54T.js} +1 -1
- package/dist/lime-elements/p-DdnBHYb-.js +7 -0
- package/dist/lime-elements/{p-B6-3WXAv.js → p-DeIIlp6m.js} +1 -1
- package/dist/lime-elements/p-Dq0uNStc.js +1 -0
- package/dist/lime-elements/{p-4a7df81a.entry.js → p-aac603af.entry.js} +1 -1
- package/dist/lime-elements/{p-5473eb74.entry.js → p-aee75ad1.entry.js} +1 -1
- package/dist/lime-elements/{p-4882acaa.entry.js → p-afbe54e6.entry.js} +1 -1
- package/dist/lime-elements/{p-a78aaf37.entry.js → p-b5ebcbfc.entry.js} +1 -1
- package/dist/lime-elements/{p-07916acc.entry.js → p-be8950a6.entry.js} +2 -2
- package/dist/lime-elements/p-c8cb4912.entry.js +16 -0
- package/dist/lime-elements/{p-de4d261a.entry.js → p-dd065596.entry.js} +1 -1
- package/dist/lime-elements/{p-0c2ce99b.entry.js → p-ddabfac0.entry.js} +1 -1
- package/dist/lime-elements/{p-d3475514.entry.js → p-de3cf7d8.entry.js} +1 -1
- package/dist/lime-elements/{p-458c131f.entry.js → p-e13e0001.entry.js} +2 -2
- package/dist/lime-elements/p-e2971111.entry.js +1 -0
- package/dist/lime-elements/{p-ecded772.entry.js → p-e332bb9b.entry.js} +1 -1
- package/dist/lime-elements/{p-54631dbf.entry.js → p-e50acec1.entry.js} +1 -1
- package/dist/lime-elements/{p-074275f4.entry.js → p-e9b1e0bd.entry.js} +1 -1
- package/dist/lime-elements/p-ec531ecb.entry.js +1 -0
- package/dist/lime-elements/{p-90286e5c.entry.js → p-f0bf3fd1.entry.js} +1 -1
- package/dist/lime-elements/p-f1ac7608.entry.js +1 -0
- package/dist/lime-elements/{p-c12fbc91.entry.js → p-f455150b.entry.js} +1 -1
- package/dist/types/components/form/form.d.ts +15 -0
- package/dist/types/components/form/show-field.d.ts +9 -0
- package/dist/types/components/form/templates/array-context.d.ts +4 -0
- package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +5 -0
- package/dist/types/components/form/templates/array-field.d.ts +3 -13
- package/dist/types/components/form/templates/field.d.ts +1 -0
- package/dist/types/components/form/templates/object-field.d.ts +2 -2
- package/dist/types/components/resize-handle/resize-handle.d.ts +31 -2
- package/dist/types/components/side-panel/side-panel.d.ts +11 -4
- package/dist/types/components/tab-bar/tab-bar.d.ts +25 -0
- package/dist/types/components/tab-bar/tab.types.d.ts +18 -0
- package/dist/types/components/tab-bar/tabs.d.ts +12 -1
- package/dist/types/components/tab-panel/tab-panel.d.ts +18 -1
- package/dist/types/components.d.ts +143 -18
- package/dist/types/translations/da.d.ts +7 -0
- package/dist/types/translations/de.d.ts +7 -0
- package/dist/types/translations/en.d.ts +7 -0
- package/dist/types/translations/fi.d.ts +7 -0
- package/dist/types/translations/fr.d.ts +7 -0
- package/dist/types/translations/nl.d.ts +7 -0
- package/dist/types/translations/no.d.ts +7 -0
- package/dist/types/translations/sv.d.ts +7 -0
- package/dist/types/util/drag-to-reorder.d.ts +65 -0
- package/package.json +4 -4
- package/dist/cjs/isArrayLikeObject-U2Ddbw4n.js +0 -326
- package/dist/cjs/limel-drag-handle.cjs.entry.js +0 -42
- package/dist/esm/isArrayLikeObject-CJB8HbtH.js +0 -321
- package/dist/esm/limel-drag-handle.entry.js +0 -40
- package/dist/lime-elements/p-26813b2c.entry.js +0 -1
- package/dist/lime-elements/p-49eb2f64.entry.js +0 -13
- package/dist/lime-elements/p-4f58c6b3.entry.js +0 -1
- package/dist/lime-elements/p-646731b6.entry.js +0 -1
- package/dist/lime-elements/p-8d567e42.entry.js +0 -1
- package/dist/lime-elements/p-9b384d62.entry.js +0 -1
- package/dist/lime-elements/p-BQeIv4aA.js +0 -1
- package/dist/lime-elements/p-COdirXg1.js +0 -1
- package/dist/lime-elements/p-ORUNaKm-.js +0 -1
- package/dist/lime-elements/p-a317f2fa.entry.js +0 -1
- package/dist/lime-elements/p-a5246373.entry.js +0 -1
- package/dist/lime-elements/p-b609552e.entry.js +0 -1
- package/dist/lime-elements/p-bf849dc9.entry.js +0 -1
- package/dist/lime-elements/p-d7e5a4a7.entry.js +0 -1
- package/dist/lime-elements/p-pk5KIdKH.js +0 -1
- package/dist/lime-elements/p-w3yKYfBQ.js +0 -1
|
@@ -20,7 +20,8 @@ import { ArrayField as CustomArrayField } from "./fields/array-field";
|
|
|
20
20
|
import { ObjectField as CustomObjectField } from "./fields/object-field";
|
|
21
21
|
import { widgets } from "./widgets";
|
|
22
22
|
import { rjsfValidator } from "./validator";
|
|
23
|
-
import { mapValues } from "lodash-es";
|
|
23
|
+
import { isEqual, mapValues } from "lodash-es";
|
|
24
|
+
import { showField } from "./show-field";
|
|
24
25
|
/**
|
|
25
26
|
* @exampleComponent limel-example-form
|
|
26
27
|
* @exampleComponent limel-example-nested-form
|
|
@@ -38,6 +39,7 @@ import { mapValues } from "lodash-es";
|
|
|
38
39
|
* @exampleComponent limel-example-form-row-layout
|
|
39
40
|
* @exampleComponent limel-example-builtin-field-types-form
|
|
40
41
|
* @exampleComponent limel-example-code-editor-form
|
|
42
|
+
* @exampleComponent limel-example-form-highlighted-field
|
|
41
43
|
*/
|
|
42
44
|
export class Form {
|
|
43
45
|
constructor() {
|
|
@@ -66,6 +68,13 @@ export class Form {
|
|
|
66
68
|
}
|
|
67
69
|
componentDidLoad() {
|
|
68
70
|
this.initialize();
|
|
71
|
+
this.showHighlightedField();
|
|
72
|
+
}
|
|
73
|
+
handleHighlightedFieldChange(newPath, oldPath) {
|
|
74
|
+
// A host that renders again passes an equal path in a new array.
|
|
75
|
+
if (!isEqual(newPath, oldPath)) {
|
|
76
|
+
this.showHighlightedField();
|
|
77
|
+
}
|
|
69
78
|
}
|
|
70
79
|
initialize() {
|
|
71
80
|
if (this.initialized || !this.host.shadowRoot.querySelector('.root')) {
|
|
@@ -87,7 +96,7 @@ export class Form {
|
|
|
87
96
|
this.initialized = false;
|
|
88
97
|
}
|
|
89
98
|
render() {
|
|
90
|
-
return h("div", { key: '
|
|
99
|
+
return h("div", { key: 'e57ab791f09cd1e8271437e91822ffabcfe2a118', class: "root" });
|
|
91
100
|
}
|
|
92
101
|
reactRender() {
|
|
93
102
|
if (!this.root) {
|
|
@@ -134,6 +143,13 @@ export class Form {
|
|
|
134
143
|
},
|
|
135
144
|
}, []));
|
|
136
145
|
}
|
|
146
|
+
showHighlightedField() {
|
|
147
|
+
if (!this.highlightedField) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const root = this.host.shadowRoot.querySelector('.root');
|
|
151
|
+
void showField(root, this.highlightedField);
|
|
152
|
+
}
|
|
137
153
|
handleChange(event) {
|
|
138
154
|
this.change.emit(event.formData);
|
|
139
155
|
}
|
|
@@ -386,6 +402,31 @@ export class Form {
|
|
|
386
402
|
"reflect": false,
|
|
387
403
|
"attribute": "reveal-errors",
|
|
388
404
|
"defaultValue": "false"
|
|
405
|
+
},
|
|
406
|
+
"highlightedField": {
|
|
407
|
+
"type": "unknown",
|
|
408
|
+
"mutable": false,
|
|
409
|
+
"complexType": {
|
|
410
|
+
"original": "Array<string | number>",
|
|
411
|
+
"resolved": "(string | number)[]",
|
|
412
|
+
"references": {
|
|
413
|
+
"Array": {
|
|
414
|
+
"location": "global",
|
|
415
|
+
"id": "global::Array"
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"required": false,
|
|
420
|
+
"optional": true,
|
|
421
|
+
"docs": {
|
|
422
|
+
"tags": [{
|
|
423
|
+
"name": "beta",
|
|
424
|
+
"text": undefined
|
|
425
|
+
}],
|
|
426
|
+
"text": "The path in the value of a field to take the user to, such as\n`['heroes', 2, 'name']`. When it changes, the form opens the sections\nand list items the field is in, scrolls it into view, focuses it and\nbriefly highlights it.\n\nIf the path goes further than the form can show, such as into a custom\ncomponent, the closest field above the end of the path is shown. To show\nthe same field again, set it to `undefined` first."
|
|
427
|
+
},
|
|
428
|
+
"getter": false,
|
|
429
|
+
"setter": false
|
|
389
430
|
}
|
|
390
431
|
};
|
|
391
432
|
}
|
|
@@ -430,4 +471,10 @@ export class Form {
|
|
|
430
471
|
}];
|
|
431
472
|
}
|
|
432
473
|
static get elementRef() { return "host"; }
|
|
474
|
+
static get watchers() {
|
|
475
|
+
return [{
|
|
476
|
+
"propName": "highlightedField",
|
|
477
|
+
"methodName": "handleHighlightedFieldChange"
|
|
478
|
+
}];
|
|
479
|
+
}
|
|
433
480
|
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { flushSync } from "react-dom";
|
|
2
|
+
import { toSchemaPath } from "./templates/object-field";
|
|
3
|
+
import { getFocusTarget } from "../../util/get-focus-target";
|
|
4
|
+
const HIGHLIGHT_CLASS = 'limel-form-field--highlighted';
|
|
5
|
+
const STABLE_FRAMES = 3;
|
|
6
|
+
const MAX_SETTLE_MS = 2000;
|
|
7
|
+
const MAX_RENDER_FRAMES = 30;
|
|
8
|
+
/**
|
|
9
|
+
* Open what is closed above a field, scroll it into view, focus it and
|
|
10
|
+
* highlight it.
|
|
11
|
+
*
|
|
12
|
+
* @param root - the element the form is rendered in
|
|
13
|
+
* @param path - the path of the field in the value of the form
|
|
14
|
+
*/
|
|
15
|
+
export async function showField(root, path) {
|
|
16
|
+
if (!(await waitUntilRendered(root, path))) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
let target;
|
|
20
|
+
for (let depth = 1; depth <= path.length; depth++) {
|
|
21
|
+
const element = findByPath(root, path.slice(0, depth));
|
|
22
|
+
if (!element) {
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
target = element;
|
|
26
|
+
openSectionsAround(root, element);
|
|
27
|
+
}
|
|
28
|
+
if (!target) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
// The components inside the field have to be drawn, and the sections
|
|
32
|
+
// around it opened, before the field is where it will stay.
|
|
33
|
+
const focusTarget = await getFocusTarget(target);
|
|
34
|
+
await waitForLayoutToSettle(target);
|
|
35
|
+
target.scrollIntoView({
|
|
36
|
+
block: 'center',
|
|
37
|
+
behavior: prefersReducedMotion() ? 'instant' : 'smooth',
|
|
38
|
+
});
|
|
39
|
+
focusTarget === null || focusTarget === void 0 ? void 0 : focusTarget.focus({ preventScroll: true });
|
|
40
|
+
await waitForLayoutToSettle(target);
|
|
41
|
+
highlight(target);
|
|
42
|
+
}
|
|
43
|
+
function findByPath(root, path) {
|
|
44
|
+
const schemaPath = toSchemaPath(path.map(String));
|
|
45
|
+
return root.querySelector(`[data-schema-path="${CSS.escape(schemaPath)}"]`);
|
|
46
|
+
}
|
|
47
|
+
// The form is drawn a moment after its value or schema is set, so give it a few
|
|
48
|
+
// frames to show the start of the path.
|
|
49
|
+
async function waitUntilRendered(root, path) {
|
|
50
|
+
for (let frame = 0; frame < MAX_RENDER_FRAMES; frame++) {
|
|
51
|
+
if (findByPath(root, path.slice(0, 1))) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
await nextFrame();
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
function openSectionsAround(root, element) {
|
|
59
|
+
for (let node = element; node && node !== root; node = node.parentElement) {
|
|
60
|
+
if (isClosedSection(node)) {
|
|
61
|
+
open(node);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function isClosedSection(element) {
|
|
66
|
+
return (element.tagName === 'LIMEL-COLLAPSIBLE-SECTION' &&
|
|
67
|
+
!element.isOpen);
|
|
68
|
+
}
|
|
69
|
+
// A collapsed list item renders its fields only once its section says it has
|
|
70
|
+
// been opened, and they have to be in place before the next step is looked up.
|
|
71
|
+
function open(section) {
|
|
72
|
+
section.isOpen = true;
|
|
73
|
+
flushSync(() => {
|
|
74
|
+
section.dispatchEvent(new CustomEvent('open'));
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
// Wait until the field has a size and has stayed in place for a few frames, so
|
|
78
|
+
// it is not scrolled to while the form still grows, nor flashed while scrolling.
|
|
79
|
+
async function waitForLayoutToSettle(element) {
|
|
80
|
+
let previous = '';
|
|
81
|
+
let stableFrames = 0;
|
|
82
|
+
const deadline = performance.now() + MAX_SETTLE_MS;
|
|
83
|
+
while (performance.now() < deadline) {
|
|
84
|
+
await nextFrame();
|
|
85
|
+
const { top, height } = element.getBoundingClientRect();
|
|
86
|
+
const current = `${top}:${height}`;
|
|
87
|
+
const isStill = height > 0 && current === previous;
|
|
88
|
+
stableFrames = isStill ? stableFrames + 1 : 0;
|
|
89
|
+
if (stableFrames === STABLE_FRAMES) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
previous = current;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function highlight(element) {
|
|
96
|
+
// Removed for a frame first, so showing the same field again restarts it.
|
|
97
|
+
element.classList.remove(HIGHLIGHT_CLASS);
|
|
98
|
+
const removeHighlight = (event) => {
|
|
99
|
+
// Animations of what the field holds end here too.
|
|
100
|
+
if (event.animationName !== 'highlight-field-shadow') {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
element.classList.remove(HIGHLIGHT_CLASS);
|
|
104
|
+
element.removeEventListener('animationend', removeHighlight);
|
|
105
|
+
};
|
|
106
|
+
requestAnimationFrame(() => {
|
|
107
|
+
element.classList.add(HIGHLIGHT_CLASS);
|
|
108
|
+
element.addEventListener('animationend', removeHighlight);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function prefersReducedMotion() {
|
|
112
|
+
return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
113
|
+
}
|
|
114
|
+
function nextFrame() {
|
|
115
|
+
return new Promise((resolve) => requestAnimationFrame(() => resolve()));
|
|
116
|
+
}
|
|
@@ -54,6 +54,7 @@ export class CollapsibleItemTemplate extends React.Component {
|
|
|
54
54
|
this.section = section;
|
|
55
55
|
},
|
|
56
56
|
'is-open': this.state.isOpen,
|
|
57
|
+
'data-schema-path': this.props.schemaPath,
|
|
57
58
|
'data-reorder-id': String(this.props.index),
|
|
58
59
|
'data-reorderable': this.props.allowItemReorder
|
|
59
60
|
? 'true'
|
|
@@ -3,6 +3,7 @@ import { isObjectType } from "../schema";
|
|
|
3
3
|
import { CollapsibleItemTemplate } from "./array-field-collapsible-item";
|
|
4
4
|
import { SimpleItemTemplate } from "./array-field-simple-item";
|
|
5
5
|
import { ArrayFieldContext, ArrayItemErrorsContext } from "./array-context";
|
|
6
|
+
import { toSchemaPath } from "./object-field";
|
|
6
7
|
export const ArrayFieldItemTemplate = (props) => {
|
|
7
8
|
const arrayContext = useContext(ArrayFieldContext);
|
|
8
9
|
const itemErrors = useContext(ArrayItemErrorsContext);
|
|
@@ -26,6 +27,10 @@ export const ArrayFieldItemTemplate = (props) => {
|
|
|
26
27
|
allowItemReorder: allowItemReorder,
|
|
27
28
|
errorSchema: itemErrors === null || itemErrors === void 0 ? void 0 : itemErrors[props.index],
|
|
28
29
|
revealErrors: (formContext === null || formContext === void 0 ? void 0 : formContext.revealErrors) === true,
|
|
30
|
+
schemaPath: toSchemaPath([
|
|
31
|
+
...arrayContext.schemaPath,
|
|
32
|
+
String(props.index),
|
|
33
|
+
]),
|
|
29
34
|
}, props.children);
|
|
30
35
|
}
|
|
31
36
|
return React.createElement(SimpleItemTemplate, {
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { renderDescription, renderTitle } from "./common";
|
|
3
|
-
import
|
|
3
|
+
import { toSchemaPath } from "./object-field";
|
|
4
|
+
import { DragToReorder } from "../../../util/drag-to-reorder";
|
|
4
5
|
import { ArrayFieldContext } from "./array-context";
|
|
5
6
|
export const ARRAY_REORDER_EVENT = 'arrayReorder';
|
|
6
|
-
const DRAG_HANDLE_SELECTOR = '[data-drag-handle]';
|
|
7
7
|
const DRAGGABLE_ITEM_SELECTOR = '.array-item[data-reorderable="true"]';
|
|
8
|
-
const DEFAULT_CONTAINER_CLASS = 'has-an-item-which-is-being-dragged';
|
|
9
|
-
const DEFAULT_DROP_ELEVATION_CLASS = 'is-elevated';
|
|
10
|
-
const DROP_ELEVATION_DURATION = 1000;
|
|
11
|
-
const TOUCH_DRAG_DELAY_MS = 200; // Adds a short hold on touch (long-press) so scroll gestures do not reorder items.
|
|
12
8
|
export class ArrayFieldTemplate extends React.Component {
|
|
13
9
|
constructor(props) {
|
|
14
10
|
super(props);
|
|
@@ -21,68 +17,28 @@ export class ArrayFieldTemplate extends React.Component {
|
|
|
21
17
|
if (this.container === element) {
|
|
22
18
|
return;
|
|
23
19
|
}
|
|
24
|
-
this.
|
|
20
|
+
this.dragToReorder.teardown();
|
|
25
21
|
this.container = element !== null && element !== void 0 ? element : undefined;
|
|
26
22
|
this.setupDragController();
|
|
27
23
|
};
|
|
28
|
-
this.
|
|
29
|
-
if (!this.canReorderItems()) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
this.dragSnapshot = [...this.state.order];
|
|
33
|
-
this.draggedItemIndex = this.getReorderId(event.item);
|
|
34
|
-
if (this.container) {
|
|
35
|
-
this.container.classList.add(DEFAULT_CONTAINER_CLASS);
|
|
36
|
-
}
|
|
37
|
-
if (event.item instanceof HTMLElement) {
|
|
38
|
-
this.applyDropElevation(event.item);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
this.handleSortEnd = (event) => {
|
|
24
|
+
this.handleReorder = ({ order, fromIndex, toIndex, }) => {
|
|
42
25
|
var _a;
|
|
43
|
-
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
if (this.container) {
|
|
47
|
-
this.container.classList.remove(DEFAULT_CONTAINER_CLASS);
|
|
48
|
-
}
|
|
49
|
-
const snapshot = this.dragSnapshot;
|
|
50
|
-
const draggedItemIndex = this.draggedItemIndex;
|
|
51
|
-
this.dragSnapshot = undefined;
|
|
52
|
-
this.draggedItemIndex = undefined;
|
|
53
|
-
if (event.item instanceof HTMLElement) {
|
|
54
|
-
this.dropElevationTarget = event.item;
|
|
55
|
-
}
|
|
56
|
-
const finalOrder = this.readOrderFromDom();
|
|
57
|
-
if (!this.arraysEqual(this.state.order, finalOrder)) {
|
|
58
|
-
this.setState({ order: finalOrder });
|
|
59
|
-
}
|
|
60
|
-
if (snapshot === undefined ||
|
|
61
|
-
draggedItemIndex === undefined ||
|
|
62
|
-
!(event.item instanceof HTMLElement)) {
|
|
63
|
-
this.scheduleDropElevationRemoval();
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const fromPosition = snapshot.indexOf(draggedItemIndex);
|
|
67
|
-
const toPosition = finalOrder.indexOf(draggedItemIndex);
|
|
68
|
-
if (fromPosition === -1 ||
|
|
69
|
-
toPosition === -1 ||
|
|
70
|
-
fromPosition === toPosition) {
|
|
71
|
-
this.scheduleDropElevationRemoval();
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
26
|
+
this.setState({ order: order.map(Number) });
|
|
74
27
|
(_a = this.container) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new CustomEvent(ARRAY_REORDER_EVENT, {
|
|
75
28
|
bubbles: true,
|
|
76
|
-
detail: { fromIndex
|
|
29
|
+
detail: { fromIndex, toIndex },
|
|
77
30
|
}));
|
|
78
|
-
this.scheduleDropElevationRemoval();
|
|
79
31
|
};
|
|
80
32
|
this.state = {
|
|
81
33
|
order: this.extractIndices(props.items),
|
|
82
34
|
};
|
|
35
|
+
this.dragToReorder = new DragToReorder({
|
|
36
|
+
draggable: DRAGGABLE_ITEM_SELECTOR,
|
|
37
|
+
onReorder: this.handleReorder,
|
|
38
|
+
});
|
|
83
39
|
}
|
|
84
40
|
componentWillUnmount() {
|
|
85
|
-
this.
|
|
41
|
+
this.dragToReorder.teardown();
|
|
86
42
|
}
|
|
87
43
|
componentDidMount() {
|
|
88
44
|
this.setupDragController();
|
|
@@ -151,47 +107,10 @@ export class ArrayFieldTemplate extends React.Component {
|
|
|
151
107
|
}
|
|
152
108
|
setupDragController() {
|
|
153
109
|
if (!this.container || !this.canReorderItems()) {
|
|
154
|
-
this.
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
const reorderableItems = this.container.querySelectorAll(`:scope > ${DRAGGABLE_ITEM_SELECTOR}`);
|
|
158
|
-
if (reorderableItems.length < 2) {
|
|
159
|
-
this.teardownDragController();
|
|
110
|
+
this.dragToReorder.teardown();
|
|
160
111
|
return;
|
|
161
112
|
}
|
|
162
|
-
|
|
163
|
-
this.sortable.option('handle', DRAG_HANDLE_SELECTOR);
|
|
164
|
-
this.sortable.option('draggable', DRAGGABLE_ITEM_SELECTOR);
|
|
165
|
-
this.sortable.option('disabled', false);
|
|
166
|
-
this.sortable.option('delay', TOUCH_DRAG_DELAY_MS);
|
|
167
|
-
this.sortable.option('delayOnTouchOnly', true);
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
this.sortable = Sortable.create(this.container, {
|
|
171
|
-
animation: 150,
|
|
172
|
-
handle: DRAG_HANDLE_SELECTOR,
|
|
173
|
-
draggable: DRAGGABLE_ITEM_SELECTOR,
|
|
174
|
-
delay: TOUCH_DRAG_DELAY_MS,
|
|
175
|
-
delayOnTouchOnly: true,
|
|
176
|
-
onStart: this.handleSortStart,
|
|
177
|
-
onEnd: this.handleSortEnd,
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
teardownDragController() {
|
|
181
|
-
if (this.sortable) {
|
|
182
|
-
this.sortable.destroy();
|
|
183
|
-
this.sortable = undefined;
|
|
184
|
-
}
|
|
185
|
-
this.clearDropElevationTimer();
|
|
186
|
-
if (this.dropElevationTarget) {
|
|
187
|
-
this.dropElevationTarget.classList.remove(DEFAULT_DROP_ELEVATION_CLASS);
|
|
188
|
-
this.dropElevationTarget = undefined;
|
|
189
|
-
}
|
|
190
|
-
if (this.container) {
|
|
191
|
-
this.container.classList.remove(DEFAULT_CONTAINER_CLASS);
|
|
192
|
-
}
|
|
193
|
-
this.dragSnapshot = undefined;
|
|
194
|
-
this.draggedItemIndex = undefined;
|
|
113
|
+
this.dragToReorder.setup(this.container);
|
|
195
114
|
}
|
|
196
115
|
canReorderItems() {
|
|
197
116
|
if (this.props.disabled || this.props.readonly) {
|
|
@@ -201,67 +120,6 @@ export class ArrayFieldTemplate extends React.Component {
|
|
|
201
120
|
const limeOptions = (schema === null || schema === void 0 ? void 0 : schema.lime) || {};
|
|
202
121
|
return limeOptions.allowItemReorder !== false;
|
|
203
122
|
}
|
|
204
|
-
readOrderFromDom() {
|
|
205
|
-
if (!this.container) {
|
|
206
|
-
return [];
|
|
207
|
-
}
|
|
208
|
-
// Only read the order of the direct children of this array field.
|
|
209
|
-
// Nested array fields may render `.array-item` elements inside items,
|
|
210
|
-
// and those must not affect the parent order.
|
|
211
|
-
const items = [...this.container.children].filter((element) => {
|
|
212
|
-
var _a, _b;
|
|
213
|
-
return Boolean((_b = (_a = element === null || element === void 0 ? void 0 : element.classList) === null || _a === void 0 ? void 0 : _a.contains) === null || _b === void 0 ? void 0 : _b.call(_a, 'array-item'));
|
|
214
|
-
});
|
|
215
|
-
const order = [];
|
|
216
|
-
for (const element of items) {
|
|
217
|
-
const index = this.getReorderId(element);
|
|
218
|
-
if (index !== undefined) {
|
|
219
|
-
order.push(index);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return order;
|
|
223
|
-
}
|
|
224
|
-
getReorderId(element) {
|
|
225
|
-
var _a;
|
|
226
|
-
if (!element) {
|
|
227
|
-
return undefined;
|
|
228
|
-
}
|
|
229
|
-
const value = (_a = element === null || element === void 0 ? void 0 : element.dataset) === null || _a === void 0 ? void 0 : _a.reorderId;
|
|
230
|
-
if (value === undefined) {
|
|
231
|
-
return undefined;
|
|
232
|
-
}
|
|
233
|
-
const parsed = Number.parseInt(value, 10);
|
|
234
|
-
return Number.isNaN(parsed) ? undefined : parsed;
|
|
235
|
-
}
|
|
236
|
-
applyDropElevation(item) {
|
|
237
|
-
if (this.dropElevationTarget && this.dropElevationTarget !== item) {
|
|
238
|
-
this.dropElevationTarget.classList.remove(DEFAULT_DROP_ELEVATION_CLASS);
|
|
239
|
-
}
|
|
240
|
-
this.clearDropElevationTimer();
|
|
241
|
-
item.classList.add(DEFAULT_DROP_ELEVATION_CLASS);
|
|
242
|
-
this.dropElevationTarget = item;
|
|
243
|
-
}
|
|
244
|
-
scheduleDropElevationRemoval() {
|
|
245
|
-
if (!this.dropElevationTarget) {
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
const target = this.dropElevationTarget;
|
|
249
|
-
this.clearDropElevationTimer();
|
|
250
|
-
this.dropElevationTimeout = setTimeout(() => {
|
|
251
|
-
target.classList.remove(DEFAULT_DROP_ELEVATION_CLASS);
|
|
252
|
-
if (this.dropElevationTarget === target) {
|
|
253
|
-
this.dropElevationTarget = undefined;
|
|
254
|
-
}
|
|
255
|
-
this.dropElevationTimeout = undefined;
|
|
256
|
-
}, DROP_ELEVATION_DURATION);
|
|
257
|
-
}
|
|
258
|
-
clearDropElevationTimer() {
|
|
259
|
-
if (this.dropElevationTimeout === undefined) {
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
clearTimeout(this.dropElevationTimeout);
|
|
263
|
-
this.dropElevationTimeout = undefined;
|
|
264
|
-
}
|
|
265
123
|
arraysEqual(a, b) {
|
|
266
124
|
if (a.length !== b.length) {
|
|
267
125
|
return false;
|
|
@@ -279,17 +137,21 @@ export class ArrayFieldTemplate extends React.Component {
|
|
|
279
137
|
return (items !== null && items !== void 0 ? items : []).map((_, index) => index);
|
|
280
138
|
}
|
|
281
139
|
getContextValue() {
|
|
282
|
-
var _a;
|
|
140
|
+
var _a, _b, _c;
|
|
283
141
|
const schema = this.props.schema;
|
|
284
142
|
const formData = ((_a = this.props.formData) !== null && _a !== void 0 ? _a : []);
|
|
143
|
+
const schemaPath = ((_c = (_b = this.props.fieldPathId) === null || _b === void 0 ? void 0 : _b.path) !== null && _c !== void 0 ? _c : []).map(String);
|
|
144
|
+
const path = toSchemaPath(schemaPath);
|
|
285
145
|
if (this.cachedContextValue &&
|
|
286
146
|
this.cachedSchema === schema &&
|
|
287
|
-
this.cachedFormData === formData
|
|
147
|
+
this.cachedFormData === formData &&
|
|
148
|
+
this.cachedPath === path) {
|
|
288
149
|
return this.cachedContextValue;
|
|
289
150
|
}
|
|
290
151
|
this.cachedSchema = schema;
|
|
291
152
|
this.cachedFormData = formData;
|
|
292
|
-
this.
|
|
153
|
+
this.cachedPath = path;
|
|
154
|
+
this.cachedContextValue = { arraySchema: schema, formData, schemaPath };
|
|
293
155
|
return this.cachedContextValue;
|
|
294
156
|
}
|
|
295
157
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { isObjectType } from "../schema";
|
|
3
|
+
import { toSchemaPath } from "./object-field";
|
|
4
|
+
import { isCustomObjectSchema } from "../fields/field-helpers";
|
|
3
5
|
export const FieldTemplate = (props) => {
|
|
4
6
|
let classNames = props.classNames;
|
|
5
7
|
const colSpan = getColSpan(props.schema);
|
|
@@ -17,8 +19,23 @@ export const FieldTemplate = (props) => {
|
|
|
17
19
|
return React.createElement('div', {
|
|
18
20
|
className: classNames,
|
|
19
21
|
style: style,
|
|
22
|
+
'data-schema-path': getFieldSchemaPath(props),
|
|
20
23
|
}, props.children);
|
|
21
24
|
};
|
|
25
|
+
// An object marks its own layout wrapper, unless a component or the code
|
|
26
|
+
// editor draws it instead. It lets a host find the element of one field by its path.
|
|
27
|
+
function getFieldSchemaPath(props) {
|
|
28
|
+
var _a;
|
|
29
|
+
if (isObjectType(props.schema) && hasOwnLayout(props.schema)) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
const path = (_a = props.fieldPathId) === null || _a === void 0 ? void 0 : _a.path;
|
|
33
|
+
return path ? toSchemaPath(path.map(String)) : undefined;
|
|
34
|
+
}
|
|
35
|
+
function hasOwnLayout(schema) {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
return !((_b = (_a = schema.lime) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.name) && !isCustomObjectSchema(schema);
|
|
38
|
+
}
|
|
22
39
|
function getColSpan(schema) {
|
|
23
40
|
var _a;
|
|
24
41
|
const layout = (_a = schema.lime) === null || _a === void 0 ? void 0 : _a.layout;
|
|
@@ -12,7 +12,7 @@ export class Grid {
|
|
|
12
12
|
console.warn('limel-grid is deprecated, please use CSS instead: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout');
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return h("slot", { key: '
|
|
15
|
+
return h("slot", { key: '3b806c24a8ef43720ed744030f791878c592bc1a' });
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "limel-grid"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -61,7 +61,7 @@ export class Header {
|
|
|
61
61
|
this.subheadingDivider = '·';
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
|
-
return (h(Host, { key: '
|
|
64
|
+
return (h(Host, { key: '772b80728f03fc7a51ae6b2b8892c0417c4dfc56' }, h("div", { key: '87516edb431b0d65fdebd59b422b62e953f316a7', class: "information" }, this.renderIcon(), h("div", { key: 'fc6dbd30d144dafb66e6f1d2899dfe849835d923', class: "headings" }, h("h1", { key: 'af693c740d006353f6328459ecbc372dfa204398', class: "heading", title: this.heading }, this.heading), h("h2", { key: '2b0e5ed7b7df45ec645057083610ef88ab404b75', class: "subheading", title: this.subheading }, this.subheading, this.renderSupportingText()))), h("slot", { key: '88d461f901a4daa28a269aeaa2efb3a39f4f610c', name: "actions" }, h("slot", { key: '4a9ade9ab15cc333b9555a8fadad9147145619f9' }))));
|
|
65
65
|
}
|
|
66
66
|
renderIcon() {
|
|
67
67
|
var _a, _b, _c, _d, _e;
|
|
@@ -19,7 +19,7 @@ export class HelpContent {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: 'dc61745d8db673bafa3179ec2075ac40d26c265e' }, h("limel-markdown", { key: '81b4c0871a566e55119abeebe42e26c45d16ab68', value: this.value }), this.renderReadMoreLink()));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "limel-help-content"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -41,9 +41,9 @@ export class HelpComponent {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: '7dbdb1d1a250fd4655c4cf9f9a711f9f82d128e0' }, h("limel-popover", { key: '4a0bce2e74a621ffc392cabfb4d3f3817bfb14cf', open: this.isOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("button", { key: '22a0c7b7002973d95dba6e8cfef34b73ddc779e6', slot: "trigger", type: "button", onClick: this.openPopover, class: {
|
|
45
45
|
'is-open': this.isOpen,
|
|
46
|
-
} }, this.trigger), h("limel-help-content", { key: '
|
|
46
|
+
} }, this.trigger), h("limel-help-content", { key: '86cb41721ed8e9eb2b5c0dc6eb930c2b0a412a6e', value: this.value, readMoreLink: this.readMoreLink }))));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "limel-help"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -50,9 +50,9 @@ export class HelperLine {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
|
-
return (h(Host, { key: '
|
|
53
|
+
return (h(Host, { key: '67896281429efb2375427383aa6c7046096ad203', tabIndex: -1, class: {
|
|
54
54
|
invalid: this.invalid,
|
|
55
|
-
}, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, h("div", { key: '
|
|
55
|
+
}, style: this.hasContent() ? {} : { display: 'none' }, "aria-hidden": !this.hasContent() }, h("div", { key: '7fbf830b9edd0b2aeb36539ddbc8c2b472acc4eb' }, this.renderHelperText(), this.renderCharacterCounter())));
|
|
56
56
|
}
|
|
57
57
|
static get is() { return "limel-helper-line"; }
|
|
58
58
|
static get originalStyleUrls() {
|
|
@@ -30,7 +30,7 @@ export class Hotkey {
|
|
|
30
30
|
const parts = tokenizeHotkeyString(this.value);
|
|
31
31
|
const displayParts = parts.map((part) => formatDisplayToken(part, this.isApple));
|
|
32
32
|
const ariaLabel = getHotkeyAriaLabel(this.value, this.isApple);
|
|
33
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: '9c75664311ac5138a87c1c5bb58c48a40ec44dc5', "aria-label": ariaLabel || undefined }, displayParts.map(({ display, isGlyph }, index) => (h("kbd", { key: `${parts[index]}-${index}`, class: isGlyph ? 'is-glyph' : undefined }, h("span", null, display))))));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "limel-hotkey"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -50,7 +50,7 @@ export class Icon {
|
|
|
50
50
|
this.loadIcon(this.name);
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
|
-
return h("div", { key: '
|
|
53
|
+
return h("div", { key: '0f09232e65b213e57673054707f6bdb400000fd6', class: "container" });
|
|
54
54
|
}
|
|
55
55
|
updateAccessibility() {
|
|
56
56
|
if (!this.internals) {
|
|
@@ -52,7 +52,7 @@ export class IconButton {
|
|
|
52
52
|
if (this.host.hasAttribute('tabindex')) {
|
|
53
53
|
buttonAttributes.tabindex = this.host.getAttribute('tabindex');
|
|
54
54
|
}
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '0df9ac9a4c51f8062cdd7a6fa91204ea0e3b78f7', onClick: this.filterClickWhenDisabled }, h("button", Object.assign({ key: '3ebf706164e779db253d82d38c4aab3ddf33e770', "aria-label": this.label, disabled: this.disabled, id: this.tooltipId }, buttonAttributes), this.renderIcon(), this.renderTooltip(this.tooltipId))));
|
|
56
56
|
}
|
|
57
57
|
renderIcon() {
|
|
58
58
|
var _a, _b;
|
|
@@ -127,9 +127,9 @@ export class InfoTile {
|
|
|
127
127
|
this.checkProps((_d = this === null || this === void 0 ? void 0 : this.link) === null || _d === void 0 ? void 0 : _d.title);
|
|
128
128
|
const link = this.disabled ? '#' : (_e = this.link) === null || _e === void 0 ? void 0 : _e.href;
|
|
129
129
|
const rel = getRel((_f = this.link) === null || _f === void 0 ? void 0 : _f.target, (_g = this.link) === null || _g === void 0 ? void 0 : _g.rel);
|
|
130
|
-
return (h(Host, { key: '
|
|
130
|
+
return (h(Host, { key: '549c508fdd747f3883afe97efd8eba297d75bc33', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, class: { 'has-primary-slot-content': this.hasPrimarySlot } }, h("a", { key: '3a04537d79c62bce556b0b46bf5f1f3a011ba280', title: (_h = this.link) === null || _h === void 0 ? void 0 : _h.title, href: link, target: (_j = this.link) === null || _j === void 0 ? void 0 : _j.target, rel: rel, tabindex: "0", "aria-label": extendedAriaLabel, "aria-disabled": this.disabled, "aria-busy": this.loading ? 'true' : 'false', "aria-live": "polite", class: {
|
|
131
131
|
'is-clickable': !!((_k = this.link) === null || _k === void 0 ? void 0 : _k.href) && !this.disabled,
|
|
132
|
-
} }, this.renderIcon(), this.renderProgress(), h("slot", { key: '
|
|
132
|
+
} }, this.renderIcon(), this.renderProgress(), h("slot", { key: '10b2f70309046c0f811a2af8fadedb86d53a4e10', name: "primary", onSlotchange: this.updateHasPrimarySlotContent }), h("div", { key: '0c3e378b14d23909e1b957704d6c846d1d6a20c3', class: "value-group" }, this.renderPrefix(), h("div", { key: '0cf56fce6179d34ebd047a16492935542fc7c6ed', class: "value-and-suffix" }, this.renderValue(), this.renderSuffix()), this.renderSpinner()), this.renderLabel(), h("limel-3d-hover-effect-glow", { key: 'b239b27230d6e0fe766517f4c7aba9176a6fdf1e' })), this.renderNotification()));
|
|
133
133
|
}
|
|
134
134
|
checkProps(propValue) {
|
|
135
135
|
return propValue ? propValue + ' ' : '';
|
|
@@ -599,7 +599,7 @@ export class InputField {
|
|
|
599
599
|
if (this.renderAutocompleteList()) {
|
|
600
600
|
properties['aria-controls'] = this.portalId;
|
|
601
601
|
}
|
|
602
|
-
return (h(Host, { key: '
|
|
602
|
+
return (h(Host, { key: 'ed9c0ff9c44e672a33ff2c17cc6adf4ae8f518cd' }, h("limel-notched-outline", { key: 'ae6dc84f39a46175309ef4fe834f3e91910f6b99', labelId: this.inputId, labelElementId: this.labelElementId, label: this.label, required: this.required, invalid: this.invalid || this.isInvalid(), disabled: this.disabled, readonly: this.readonly, hasValue: !!this.value, hasLeadingIcon: !!this.leadingIcon }, h("label", { key: 'c0ddb03c7c0c64b0002f2ed44db932fe77513ca8', slot: "content", class: this.getContainerClassList() }, this.renderLeadingIcon(), this.renderPrefix(), this.renderFormattedNumber(), this.renderInput(properties), this.renderSuffix(), this.renderTextarea(properties), this.renderTrailingLinkOrButton())), this.renderHelperLine(), this.renderAutocompleteList()));
|
|
603
603
|
}
|
|
604
604
|
valueWatcher(newValue) {
|
|
605
605
|
if (!this.mdcTextField || this.changeWaiting) {
|
|
@@ -194,7 +194,7 @@ export class List {
|
|
|
194
194
|
maxLinesSecondaryText = 1;
|
|
195
195
|
}
|
|
196
196
|
const html = this.listRenderer.render(this.items, this.config);
|
|
197
|
-
return (h(Host, { key: '
|
|
197
|
+
return (h(Host, { key: 'c0b436d0236fd177e789d43518eb193d5e5e7bbf', style: {
|
|
198
198
|
'--maxLinesSecondaryText': `${maxLinesSecondaryText}`,
|
|
199
199
|
} }, html));
|
|
200
200
|
}
|
|
@@ -158,9 +158,9 @@ export class ListItemComponent {
|
|
|
158
158
|
// also keep for `menuitem` for visual state consistency
|
|
159
159
|
ariaProps['aria-selected'] = this.selected ? 'true' : 'false';
|
|
160
160
|
}
|
|
161
|
-
return (h(Host, Object.assign({ key: '
|
|
161
|
+
return (h(Host, Object.assign({ key: 'c546782bb0418b47bffe81e5532c2f1ac3971c82', role: this.getHostRole(), class: {
|
|
162
162
|
'has-primary-component': !!((_a = this.primaryComponent) === null || _a === void 0 ? void 0 : _a.name),
|
|
163
|
-
} }, ariaProps), this.renderRadioButton(), this.renderCheckbox(), this.renderIcon(), this.renderImage(), this.renderPrimaryComponent(), h("div", { key: '
|
|
163
|
+
} }, ariaProps), this.renderRadioButton(), this.renderCheckbox(), this.renderIcon(), this.renderImage(), this.renderPrimaryComponent(), h("div", { key: '16b10f373ce8c8508a0ef680acea777c9f6aeac6', class: "text" }, this.renderLabel(), this.renderDescription()), this.renderActionMenu(this.actions)));
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
166
|
* Returns a stable reference for the provided actions array to avoid
|