@openreachtech/furo-vue 1.3.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/LICENSE +9 -0
- package/README.ja.md +334 -0
- package/README.md +333 -0
- package/index.js +11 -0
- package/lib/assets/css/furo/0010.variables-palette-color-scale.css +298 -0
- package/lib/assets/css/furo/0020.variables-z-index.css +10 -0
- package/lib/assets/css/furo/0030.variables-semantic-color.css +178 -0
- package/lib/assets/css/furo/0035.variables-semantic-dimension.css +104 -0
- package/lib/assets/css/furo/0040.variables-component-furo.css +28 -0
- package/lib/assets/css/furo/0050.furo-editor-content.css +22 -0
- package/lib/assets/css/furo.css +15 -0
- package/lib/components/atoms/FuroAvatar/FuroAvatar.vue +135 -0
- package/lib/components/atoms/FuroAvatar/FuroAvatarContext.js +147 -0
- package/lib/components/atoms/FuroBadge/FuroBadge.vue +240 -0
- package/lib/components/atoms/FuroBadge/FuroBadgeContext.js +298 -0
- package/lib/components/atoms/FuroButton/ButtonEmitPayload.js +44 -0
- package/lib/components/atoms/FuroButton/FuroButton.vue +301 -0
- package/lib/components/atoms/FuroButton/FuroButtonContext.js +328 -0
- package/lib/components/atoms/FuroCheckbox/CheckboxEmitPayload.js +106 -0
- package/lib/components/atoms/FuroCheckbox/FuroCheckbox.vue +173 -0
- package/lib/components/atoms/FuroCheckbox/FuroCheckboxContext.js +682 -0
- package/lib/components/atoms/FuroEmailField/EmailFieldEmitPayload.js +74 -0
- package/lib/components/atoms/FuroEmailField/FuroEmailField.vue +119 -0
- package/lib/components/atoms/FuroEmailField/FuroEmailFieldContext.js +311 -0
- package/lib/components/atoms/FuroFileField/FileFieldEmitPayload.js +80 -0
- package/lib/components/atoms/FuroFileField/FuroFileField.vue +128 -0
- package/lib/components/atoms/FuroFileField/FuroFileFieldContext.js +195 -0
- package/lib/components/atoms/FuroIcon/FuroIcon.vue +74 -0
- package/lib/components/atoms/FuroIcon/FuroIconContext.js +293 -0
- package/lib/components/atoms/FuroIcon/FuroIconRegistry.js +617 -0
- package/lib/components/atoms/FuroIcon/FuroIconifyRendererContext.js +101 -0
- package/lib/components/atoms/FuroIcon/furoIconData.js +164 -0
- package/lib/components/atoms/FuroIcon/iconRenderers.js +62 -0
- package/lib/components/atoms/FuroIcon/icons.js +7 -0
- package/lib/components/atoms/FuroNumberField/FuroNumberField.vue +213 -0
- package/lib/components/atoms/FuroNumberField/FuroNumberFieldContext.js +442 -0
- package/lib/components/atoms/FuroNumberField/NumberFieldEmitPayload.js +162 -0
- package/lib/components/atoms/FuroPasswordField/FuroPasswordField.vue +119 -0
- package/lib/components/atoms/FuroPasswordField/FuroPasswordFieldContext.js +311 -0
- package/lib/components/atoms/FuroPasswordField/PasswordFieldEmitPayload.js +74 -0
- package/lib/components/atoms/FuroRadio/FuroRadio.vue +193 -0
- package/lib/components/atoms/FuroRadio/FuroRadioContext.js +557 -0
- package/lib/components/atoms/FuroRadio/RadioEmitPayload.js +72 -0
- package/lib/components/atoms/FuroSwitch/FuroSwitch.vue +165 -0
- package/lib/components/atoms/FuroSwitch/FuroSwitchContext.js +440 -0
- package/lib/components/atoms/FuroSwitch/SwitchEmitPayload.js +86 -0
- package/lib/components/atoms/FuroTextField/FuroTextField.vue +119 -0
- package/lib/components/atoms/FuroTextField/FuroTextFieldContext.js +311 -0
- package/lib/components/atoms/FuroTextField/TextFieldEmitPayload.js +83 -0
- package/lib/components/atoms/FuroTextarea/FuroTextarea.vue +121 -0
- package/lib/components/atoms/FuroTextarea/FuroTextareaContext.js +322 -0
- package/lib/components/atoms/FuroTextarea/TextareaEmitPayload.js +83 -0
- package/lib/components/atoms/FuroToggle/FuroToggle.vue +172 -0
- package/lib/components/atoms/FuroToggle/FuroToggleContext.js +410 -0
- package/lib/components/atoms/FuroToggle/ToggleEmitPayload.js +86 -0
- package/lib/components/molecules/FuroAccordion/AccordionEmitPayload.js +80 -0
- package/lib/components/molecules/FuroAccordion/FuroAccordion.vue +219 -0
- package/lib/components/molecules/FuroAccordion/FuroAccordionContext.js +547 -0
- package/lib/components/molecules/FuroAttachment/FuroAttachment.vue +376 -0
- package/lib/components/molecules/FuroAttachment/FuroAttachmentContext.js +628 -0
- package/lib/components/molecules/FuroAutocompleteField/AutocompleteEmitPayload.js +225 -0
- package/lib/components/molecules/FuroAutocompleteField/FuroAutocompleteField.vue +669 -0
- package/lib/components/molecules/FuroAutocompleteField/FuroAutocompleteFieldContext.js +1525 -0
- package/lib/components/molecules/FuroAvatarGroup/FuroAvatarGroup.vue +126 -0
- package/lib/components/molecules/FuroAvatarGroup/FuroAvatarGroupContext.js +245 -0
- package/lib/components/molecules/FuroBreadcrumb/FuroBreadcrumb.vue +219 -0
- package/lib/components/molecules/FuroBreadcrumb/FuroBreadcrumbContext.js +257 -0
- package/lib/components/molecules/FuroCollapsible/CollapsibleEmitPayload.js +69 -0
- package/lib/components/molecules/FuroCollapsible/FuroCollapsible.vue +177 -0
- package/lib/components/molecules/FuroCollapsible/FuroCollapsibleContext.js +389 -0
- package/lib/components/molecules/FuroControlBlock/FuroControlBlock.vue +149 -0
- package/lib/components/molecules/FuroControlBlock/FuroControlBlockContext.js +81 -0
- package/lib/components/molecules/FuroDatePicker/DatePickerEmitPayload.js +74 -0
- package/lib/components/molecules/FuroDatePicker/FuroDatePicker.vue +661 -0
- package/lib/components/molecules/FuroDatePicker/FuroDatePickerContext.js +1038 -0
- package/lib/components/molecules/FuroDateTimePicker/DateTimePickerEmitPayload.js +96 -0
- package/lib/components/molecules/FuroDateTimePicker/FuroDateTimePicker.vue +153 -0
- package/lib/components/molecules/FuroDateTimePicker/FuroDateTimePickerContext.js +840 -0
- package/lib/components/molecules/FuroDropdownMenu/DropdownMenuOptionSelectEmitPayload.js +100 -0
- package/lib/components/molecules/FuroDropdownMenu/FuroDropdownMenu.vue +348 -0
- package/lib/components/molecules/FuroDropdownMenu/FuroDropdownMenuContext.js +714 -0
- package/lib/components/molecules/FuroDropdownMenu/FuroDropdownMenuOptionRows.vue +222 -0
- package/lib/components/molecules/FuroEditableField/EditableEmitPayload.js +89 -0
- package/lib/components/molecules/FuroEditableField/FuroEditableField.vue +314 -0
- package/lib/components/molecules/FuroEditableField/FuroEditableFieldContext.js +1018 -0
- package/lib/components/molecules/FuroEditableField/processors/EditorCollisionProcessor.js +236 -0
- package/lib/components/molecules/FuroEditableField/processors/ObjectProcessor.js +101 -0
- package/lib/components/molecules/FuroEmptyState/FuroEmptyState.vue +124 -0
- package/lib/components/molecules/FuroEmptyState/FuroEmptyStateContext.js +42 -0
- package/lib/components/molecules/FuroErrorState/FuroErrorState.vue +125 -0
- package/lib/components/molecules/FuroErrorState/FuroErrorStateContext.js +42 -0
- package/lib/components/molecules/FuroPagination/FuroPagination.vue +246 -0
- package/lib/components/molecules/FuroPagination/FuroPaginationContext.js +489 -0
- package/lib/components/molecules/FuroPopover/FuroPopover.vue +171 -0
- package/lib/components/molecules/FuroPopover/FuroPopoverContext.js +279 -0
- package/lib/components/molecules/FuroScrollArea/FuroScrollArea.vue +181 -0
- package/lib/components/molecules/FuroScrollArea/FuroScrollAreaContext.js +149 -0
- package/lib/components/molecules/FuroSearchField/FuroSearchField.vue +155 -0
- package/lib/components/molecules/FuroSearchField/FuroSearchFieldContext.js +231 -0
- package/lib/components/molecules/FuroSectionHeader/FuroSectionHeader.vue +140 -0
- package/lib/components/molecules/FuroSectionHeader/FuroSectionHeaderContext.js +204 -0
- package/lib/components/molecules/FuroSelect/FuroSelect.vue +474 -0
- package/lib/components/molecules/FuroSelect/FuroSelectContext.js +743 -0
- package/lib/components/molecules/FuroSelect/SelectEmitPayload.js +181 -0
- package/lib/components/molecules/FuroSeparator/FuroSeparator.vue +88 -0
- package/lib/components/molecules/FuroSeparator/FuroSeparatorContext.js +40 -0
- package/lib/components/molecules/FuroSkeleton/FuroSkeleton.vue +101 -0
- package/lib/components/molecules/FuroSkeleton/FuroSkeletonContext.js +82 -0
- package/lib/components/molecules/FuroSplitter/FuroSplitter.vue +237 -0
- package/lib/components/molecules/FuroSplitter/FuroSplitterContext.js +429 -0
- package/lib/components/molecules/FuroSplitter/SplitterEmitPayload.js +69 -0
- package/lib/components/molecules/FuroTimeField/FuroTimeField.vue +251 -0
- package/lib/components/molecules/FuroTimeField/FuroTimeFieldContext.js +1138 -0
- package/lib/components/molecules/FuroTimeField/TimeFieldEmitPayload.js +74 -0
- package/lib/components/molecules/FuroToggleGroup/FuroToggleGroup.vue +211 -0
- package/lib/components/molecules/FuroToggleGroup/FuroToggleGroupContext.js +551 -0
- package/lib/components/molecules/FuroToggleGroup/ToggleGroupEmitPayload.js +80 -0
- package/lib/components/molecules/FuroToolBar/FuroToolBar.vue +91 -0
- package/lib/components/molecules/FuroToolBar/FuroToolBarContext.js +75 -0
- package/lib/components/molecules/FuroTooltip/FuroTooltip.vue +183 -0
- package/lib/components/molecules/FuroTooltip/FuroTooltipContext.js +290 -0
- package/lib/components/organisms/FuroAlertDialog/FuroAlertDialog.vue +324 -0
- package/lib/components/organisms/FuroAlertDialog/FuroAlertDialogContext.js +608 -0
- package/lib/components/organisms/FuroDialog/FuroDialog.vue +362 -0
- package/lib/components/organisms/FuroDialog/FuroDialogContext.js +535 -0
- package/lib/components/organisms/FuroDrawer/FuroDrawer.vue +618 -0
- package/lib/components/organisms/FuroDrawer/FuroDrawerContext.js +676 -0
- package/lib/components/organisms/FuroEditor/FuroEditor.vue +613 -0
- package/lib/components/organisms/FuroEditor/FuroEditorCommandContext.js +420 -0
- package/lib/components/organisms/FuroEditor/FuroEditorContext.js +2048 -0
- package/lib/components/organisms/FuroEditor/FuroEditorMentionMenu.vue +120 -0
- package/lib/components/organisms/FuroEditor/FuroEditorMentionMenuContext.js +261 -0
- package/lib/components/organisms/FuroEditor/PreserveNewlinesPasteExtension.js +267 -0
- package/lib/components/organisms/FuroEditor/build-editor-extensions.js +97 -0
- package/lib/components/organisms/FuroEditor/mention-suggestion.js +320 -0
- package/lib/components/organisms/FuroEditor/paste-link-segments.js +124 -0
- package/lib/components/organisms/FuroSidebar/FuroSidebar.vue +473 -0
- package/lib/components/organisms/FuroSidebar/FuroSidebarContext.js +1014 -0
- package/lib/components/organisms/FuroStepper/FuroStepper.vue +345 -0
- package/lib/components/organisms/FuroStepper/FuroStepperContext.js +481 -0
- package/lib/components/organisms/FuroTable/FuroTable.vue +707 -0
- package/lib/components/organisms/FuroTable/FuroTableContext.js +1965 -0
- package/lib/components/organisms/FuroTable/FuroTableRowItemContext.js +111 -0
- package/lib/components/organisms/FuroTabs/FuroTabs.vue +403 -0
- package/lib/components/organisms/FuroTabs/FuroTabsContext.js +846 -0
- package/lib/components/organisms/FuroToast/FuroToast.vue +624 -0
- package/lib/components/organisms/FuroToast/FuroToastContext.js +1089 -0
- package/lib/components/organisms/FuroToast/FuroToaster.vue +44 -0
- package/lib/components/organisms/FuroToast/FuroToasterContext.js +113 -0
- package/lib/components/organisms/FuroToast/ToastQueue.js +325 -0
- package/lib/components/organisms/FuroToast/toast.js +64 -0
- package/lib/contexts/BaseFuroContext.js +318 -0
- package/lib/contexts/BaseFuroContextAccessor.js +47 -0
- package/lib/emit-payload/BaseEmitPayload.js +91 -0
- package/lib/index.components.js +61 -0
- package/lib/index.core.js +18 -0
- package/lib/tools/TimerClerk.js +75 -0
- package/nuxt/index.js +109 -0
- package/nuxt/runtime/furo-icon-renderer.js +24 -0
- package/package.json +137 -0
- package/public/furo-vue/components.json +4619 -0
- package/public/furo-vue/llms.txt +66 -0
- package/types/furo-nuxt.d.ts +48 -0
- package/types/generated/components/atoms/FuroAvatar/FuroAvatar.vue.d.ts +74 -0
- package/types/generated/components/atoms/FuroAvatar/FuroAvatarContext.d.ts +82 -0
- package/types/generated/components/atoms/FuroBadge/FuroBadge.vue.d.ts +12 -0
- package/types/generated/components/atoms/FuroBadge/FuroBadgeContext.d.ts +160 -0
- package/types/generated/components/atoms/FuroButton/ButtonEmitPayload.d.ts +19 -0
- package/types/generated/components/atoms/FuroButton/FuroButton.vue.d.ts +53 -0
- package/types/generated/components/atoms/FuroButton/FuroButtonContext.d.ts +156 -0
- package/types/generated/components/atoms/FuroCheckbox/CheckboxEmitPayload.d.ts +55 -0
- package/types/generated/components/atoms/FuroCheckbox/FuroCheckbox.vue.d.ts +87 -0
- package/types/generated/components/atoms/FuroCheckbox/FuroCheckboxContext.d.ts +342 -0
- package/types/generated/components/atoms/FuroEmailField/EmailFieldEmitPayload.d.ts +46 -0
- package/types/generated/components/atoms/FuroEmailField/FuroEmailField.vue.d.ts +458 -0
- package/types/generated/components/atoms/FuroEmailField/FuroEmailFieldContext.d.ts +161 -0
- package/types/generated/components/atoms/FuroFileField/FileFieldEmitPayload.d.ts +46 -0
- package/types/generated/components/atoms/FuroFileField/FuroFileField.vue.d.ts +454 -0
- package/types/generated/components/atoms/FuroFileField/FuroFileFieldContext.d.ts +109 -0
- package/types/generated/components/atoms/FuroIcon/FuroIcon.vue.d.ts +14 -0
- package/types/generated/components/atoms/FuroIcon/FuroIconContext.d.ts +152 -0
- package/types/generated/components/atoms/FuroIcon/FuroIconRegistry.d.ts +457 -0
- package/types/generated/components/atoms/FuroIcon/FuroIconifyRendererContext.d.ts +65 -0
- package/types/generated/components/atoms/FuroIcon/furoIconData.d.ts +154 -0
- package/types/generated/components/atoms/FuroIcon/iconRenderers.d.ts +6 -0
- package/types/generated/components/atoms/FuroIcon/icons.d.ts +6 -0
- package/types/generated/components/atoms/FuroNumberField/FuroNumberField.vue.d.ts +500 -0
- package/types/generated/components/atoms/FuroNumberField/FuroNumberFieldContext.d.ts +243 -0
- package/types/generated/components/atoms/FuroNumberField/NumberFieldEmitPayload.d.ts +74 -0
- package/types/generated/components/atoms/FuroPasswordField/FuroPasswordField.vue.d.ts +458 -0
- package/types/generated/components/atoms/FuroPasswordField/FuroPasswordFieldContext.d.ts +161 -0
- package/types/generated/components/atoms/FuroPasswordField/PasswordFieldEmitPayload.d.ts +46 -0
- package/types/generated/components/atoms/FuroRadio/FuroRadio.vue.d.ts +96 -0
- package/types/generated/components/atoms/FuroRadio/FuroRadioContext.d.ts +290 -0
- package/types/generated/components/atoms/FuroRadio/RadioEmitPayload.d.ts +39 -0
- package/types/generated/components/atoms/FuroSwitch/FuroSwitch.vue.d.ts +74 -0
- package/types/generated/components/atoms/FuroSwitch/FuroSwitchContext.d.ts +218 -0
- package/types/generated/components/atoms/FuroSwitch/SwitchEmitPayload.d.ts +42 -0
- package/types/generated/components/atoms/FuroTextField/FuroTextField.vue.d.ts +458 -0
- package/types/generated/components/atoms/FuroTextField/FuroTextFieldContext.d.ts +161 -0
- package/types/generated/components/atoms/FuroTextField/TextFieldEmitPayload.d.ts +52 -0
- package/types/generated/components/atoms/FuroTextarea/FuroTextarea.vue.d.ts +422 -0
- package/types/generated/components/atoms/FuroTextarea/FuroTextareaContext.d.ts +161 -0
- package/types/generated/components/atoms/FuroTextarea/TextareaEmitPayload.d.ts +52 -0
- package/types/generated/components/atoms/FuroToggle/FuroToggle.vue.d.ts +51 -0
- package/types/generated/components/atoms/FuroToggle/FuroToggleContext.d.ts +191 -0
- package/types/generated/components/atoms/FuroToggle/ToggleEmitPayload.d.ts +42 -0
- package/types/generated/components/molecules/FuroAccordion/AccordionEmitPayload.d.ts +41 -0
- package/types/generated/components/molecules/FuroAccordion/FuroAccordion.vue.d.ts +133 -0
- package/types/generated/components/molecules/FuroAccordion/FuroAccordionContext.d.ts +279 -0
- package/types/generated/components/molecules/FuroAttachment/FuroAttachment.vue.d.ts +79 -0
- package/types/generated/components/molecules/FuroAttachment/FuroAttachmentContext.d.ts +363 -0
- package/types/generated/components/molecules/FuroAutocompleteField/AutocompleteEmitPayload.d.ts +129 -0
- package/types/generated/components/molecules/FuroAutocompleteField/FuroAutocompleteField.vue.d.ts +751 -0
- package/types/generated/components/molecules/FuroAutocompleteField/FuroAutocompleteFieldContext.d.ts +722 -0
- package/types/generated/components/molecules/FuroAvatarGroup/FuroAvatarGroup.vue.d.ts +84 -0
- package/types/generated/components/molecules/FuroAvatarGroup/FuroAvatarGroupContext.d.ts +150 -0
- package/types/generated/components/molecules/FuroBreadcrumb/FuroBreadcrumb.vue.d.ts +24 -0
- package/types/generated/components/molecules/FuroBreadcrumb/FuroBreadcrumbContext.d.ts +152 -0
- package/types/generated/components/molecules/FuroCollapsible/CollapsibleEmitPayload.d.ts +36 -0
- package/types/generated/components/molecules/FuroCollapsible/FuroCollapsible.vue.d.ts +98 -0
- package/types/generated/components/molecules/FuroCollapsible/FuroCollapsibleContext.d.ts +191 -0
- package/types/generated/components/molecules/FuroControlBlock/FuroControlBlock.vue.d.ts +30 -0
- package/types/generated/components/molecules/FuroControlBlock/FuroControlBlockContext.d.ts +57 -0
- package/types/generated/components/molecules/FuroDatePicker/DatePickerEmitPayload.d.ts +41 -0
- package/types/generated/components/molecules/FuroDatePicker/FuroDatePicker.vue.d.ts +456 -0
- package/types/generated/components/molecules/FuroDatePicker/FuroDatePickerContext.d.ts +516 -0
- package/types/generated/components/molecules/FuroDateTimePicker/DateTimePickerEmitPayload.d.ts +55 -0
- package/types/generated/components/molecules/FuroDateTimePicker/FuroDateTimePicker.vue.d.ts +1365 -0
- package/types/generated/components/molecules/FuroDateTimePicker/FuroDateTimePickerContext.d.ts +435 -0
- package/types/generated/components/molecules/FuroDropdownMenu/DropdownMenuOptionSelectEmitPayload.d.ts +48 -0
- package/types/generated/components/molecules/FuroDropdownMenu/FuroDropdownMenu.vue.d.ts +773 -0
- package/types/generated/components/molecules/FuroDropdownMenu/FuroDropdownMenuContext.d.ts +380 -0
- package/types/generated/components/molecules/FuroDropdownMenu/FuroDropdownMenuOptionRows.vue.d.ts +261 -0
- package/types/generated/components/molecules/FuroEditableField/EditableEmitPayload.d.ts +39 -0
- package/types/generated/components/molecules/FuroEditableField/FuroEditableField.vue.d.ts +646 -0
- package/types/generated/components/molecules/FuroEditableField/FuroEditableFieldContext.d.ts +477 -0
- package/types/generated/components/molecules/FuroEditableField/processors/EditorCollisionProcessor.d.ts +121 -0
- package/types/generated/components/molecules/FuroEditableField/processors/ObjectProcessor.d.ts +45 -0
- package/types/generated/components/molecules/FuroEmptyState/FuroEmptyState.vue.d.ts +21 -0
- package/types/generated/components/molecules/FuroEmptyState/FuroEmptyStateContext.d.ts +32 -0
- package/types/generated/components/molecules/FuroErrorState/FuroErrorState.vue.d.ts +21 -0
- package/types/generated/components/molecules/FuroErrorState/FuroErrorStateContext.d.ts +32 -0
- package/types/generated/components/molecules/FuroPagination/FuroPagination.vue.d.ts +534 -0
- package/types/generated/components/molecules/FuroPagination/FuroPaginationContext.d.ts +271 -0
- package/types/generated/components/molecules/FuroPopover/FuroPopover.vue.d.ts +513 -0
- package/types/generated/components/molecules/FuroPopover/FuroPopoverContext.d.ts +160 -0
- package/types/generated/components/molecules/FuroScrollArea/FuroScrollArea.vue.d.ts +124 -0
- package/types/generated/components/molecules/FuroScrollArea/FuroScrollAreaContext.d.ts +86 -0
- package/types/generated/components/molecules/FuroSearchField/FuroSearchField.vue.d.ts +487 -0
- package/types/generated/components/molecules/FuroSearchField/FuroSearchFieldContext.d.ts +137 -0
- package/types/generated/components/molecules/FuroSectionHeader/FuroSectionHeader.vue.d.ts +49 -0
- package/types/generated/components/molecules/FuroSectionHeader/FuroSectionHeaderContext.d.ts +121 -0
- package/types/generated/components/molecules/FuroSelect/FuroSelect.vue.d.ts +719 -0
- package/types/generated/components/molecules/FuroSelect/FuroSelectContext.d.ts +402 -0
- package/types/generated/components/molecules/FuroSelect/SelectEmitPayload.d.ts +102 -0
- package/types/generated/components/molecules/FuroSeparator/FuroSeparator.vue.d.ts +39 -0
- package/types/generated/components/molecules/FuroSeparator/FuroSeparatorContext.d.ts +31 -0
- package/types/generated/components/molecules/FuroSkeleton/FuroSkeleton.vue.d.ts +27 -0
- package/types/generated/components/molecules/FuroSkeleton/FuroSkeletonContext.d.ts +61 -0
- package/types/generated/components/molecules/FuroSplitter/FuroSplitter.vue.d.ts +139 -0
- package/types/generated/components/molecules/FuroSplitter/FuroSplitterContext.d.ts +226 -0
- package/types/generated/components/molecules/FuroSplitter/SplitterEmitPayload.d.ts +41 -0
- package/types/generated/components/molecules/FuroTimeField/FuroTimeField.vue.d.ts +498 -0
- package/types/generated/components/molecules/FuroTimeField/FuroTimeFieldContext.d.ts +555 -0
- package/types/generated/components/molecules/FuroTimeField/TimeFieldEmitPayload.d.ts +41 -0
- package/types/generated/components/molecules/FuroToggleGroup/FuroToggleGroup.vue.d.ts +70 -0
- package/types/generated/components/molecules/FuroToggleGroup/FuroToggleGroupContext.d.ts +270 -0
- package/types/generated/components/molecules/FuroToggleGroup/ToggleGroupEmitPayload.d.ts +41 -0
- package/types/generated/components/molecules/FuroToolBar/FuroToolBar.vue.d.ts +30 -0
- package/types/generated/components/molecules/FuroToolBar/FuroToolBarContext.d.ts +48 -0
- package/types/generated/components/molecules/FuroTooltip/FuroTooltip.vue.d.ts +524 -0
- package/types/generated/components/molecules/FuroTooltip/FuroTooltipContext.d.ts +166 -0
- package/types/generated/components/organisms/FuroAlertDialog/FuroAlertDialog.vue.d.ts +651 -0
- package/types/generated/components/organisms/FuroAlertDialog/FuroAlertDialogContext.d.ts +299 -0
- package/types/generated/components/organisms/FuroDialog/FuroDialog.vue.d.ts +583 -0
- package/types/generated/components/organisms/FuroDialog/FuroDialogContext.d.ts +264 -0
- package/types/generated/components/organisms/FuroDrawer/FuroDrawer.vue.d.ts +635 -0
- package/types/generated/components/organisms/FuroDrawer/FuroDrawerContext.d.ts +347 -0
- package/types/generated/components/organisms/FuroEditor/FuroEditor.vue.d.ts +2487 -0
- package/types/generated/components/organisms/FuroEditor/FuroEditorCommandContext.d.ts +192 -0
- package/types/generated/components/organisms/FuroEditor/FuroEditorContext.d.ts +904 -0
- package/types/generated/components/organisms/FuroEditor/FuroEditorMentionMenu.vue.d.ts +43 -0
- package/types/generated/components/organisms/FuroEditor/FuroEditorMentionMenuContext.d.ts +159 -0
- package/types/generated/components/organisms/FuroEditor/PreserveNewlinesPasteExtension.d.ts +43 -0
- package/types/generated/components/organisms/FuroEditor/build-editor-extensions.d.ts +22 -0
- package/types/generated/components/organisms/FuroEditor/mention-suggestion.d.ts +25 -0
- package/types/generated/components/organisms/FuroEditor/paste-link-segments.d.ts +31 -0
- package/types/generated/components/organisms/FuroSidebar/FuroSidebar.vue.d.ts +898 -0
- package/types/generated/components/organisms/FuroSidebar/FuroSidebarContext.d.ts +596 -0
- package/types/generated/components/organisms/FuroStepper/FuroStepper.vue.d.ts +589 -0
- package/types/generated/components/organisms/FuroStepper/FuroStepperContext.d.ts +266 -0
- package/types/generated/components/organisms/FuroTable/FuroTable.vue.d.ts +528 -0
- package/types/generated/components/organisms/FuroTable/FuroTableContext.d.ts +1035 -0
- package/types/generated/components/organisms/FuroTable/FuroTableRowItemContext.d.ts +62 -0
- package/types/generated/components/organisms/FuroTabs/FuroTabs.vue.d.ts +515 -0
- package/types/generated/components/organisms/FuroTabs/FuroTabsContext.d.ts +438 -0
- package/types/generated/components/organisms/FuroToast/FuroToast.vue.d.ts +725 -0
- package/types/generated/components/organisms/FuroToast/FuroToastContext.d.ts +543 -0
- package/types/generated/components/organisms/FuroToast/FuroToaster.vue.d.ts +729 -0
- package/types/generated/components/organisms/FuroToast/FuroToasterContext.d.ts +62 -0
- package/types/generated/components/organisms/FuroToast/ToastQueue.d.ts +201 -0
- package/types/generated/components/organisms/FuroToast/toast.d.ts +23 -0
- package/types/generated/contexts/BaseFuroContext.d.ts +207 -0
- package/types/generated/contexts/BaseFuroContextAccessor.d.ts +28 -0
- package/types/generated/emit-payload/BaseEmitPayload.d.ts +62 -0
- package/types/generated/index.components.d.ts +50 -0
- package/types/generated/index.core.d.ts +6 -0
- package/types/generated/tools/TimerClerk.d.ts +50 -0
- package/types/index.d.ts +12 -0
|
@@ -0,0 +1,1018 @@
|
|
|
1
|
+
import {
|
|
2
|
+
nextTick,
|
|
3
|
+
onBeforeUnmount,
|
|
4
|
+
onMounted,
|
|
5
|
+
reactive,
|
|
6
|
+
ref,
|
|
7
|
+
unref,
|
|
8
|
+
} from 'vue'
|
|
9
|
+
|
|
10
|
+
import BaseFuroContext from '../../../contexts/BaseFuroContext.js'
|
|
11
|
+
|
|
12
|
+
import EditableEmitPayload from './EditableEmitPayload.js'
|
|
13
|
+
import EditorCollisionProcessor from './processors/EditorCollisionProcessor.js'
|
|
14
|
+
import ObjectProcessor from './processors/ObjectProcessor.js'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Furo-owned parcel keys (not forwarded to Reka EditableRoot).
|
|
18
|
+
*/
|
|
19
|
+
const FURO_EDITABLE_PARCEL_KEYS = new Set([
|
|
20
|
+
'value',
|
|
21
|
+
'invalid',
|
|
22
|
+
'disabled',
|
|
23
|
+
'required',
|
|
24
|
+
'readonly',
|
|
25
|
+
'placeholder',
|
|
26
|
+
'emptyPreviewText',
|
|
27
|
+
'showActions',
|
|
28
|
+
'showEditing',
|
|
29
|
+
'showUndoChange',
|
|
30
|
+
'collisionBoundary',
|
|
31
|
+
'editLabel',
|
|
32
|
+
'undoLabel',
|
|
33
|
+
'submitLabel',
|
|
34
|
+
'cancelLabel',
|
|
35
|
+
])
|
|
36
|
+
|
|
37
|
+
const DEFAULT_EDIT_LABEL = 'Edit'
|
|
38
|
+
const DEFAULT_UNDO_LABEL = 'Undo'
|
|
39
|
+
const DEFAULT_SUBMIT_LABEL = 'Submit'
|
|
40
|
+
const DEFAULT_CANCEL_LABEL = 'Cancel'
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Context class for managing FuroEditableField component.
|
|
44
|
+
*
|
|
45
|
+
* @extends {BaseFuroContext<null, Props, EmitEventName>}
|
|
46
|
+
*/
|
|
47
|
+
export default class FuroEditableFieldContext extends BaseFuroContext {
|
|
48
|
+
/**
|
|
49
|
+
* Constructor.
|
|
50
|
+
*
|
|
51
|
+
* @param {FuroEditableFieldContextParams} params
|
|
52
|
+
*/
|
|
53
|
+
constructor ({
|
|
54
|
+
props,
|
|
55
|
+
componentContext,
|
|
56
|
+
refHash,
|
|
57
|
+
reactiveHash,
|
|
58
|
+
}) {
|
|
59
|
+
super({
|
|
60
|
+
props,
|
|
61
|
+
componentContext,
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
this.refHash = refHash
|
|
65
|
+
this.reactiveHash = reactiveHash
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Factory method.
|
|
70
|
+
*
|
|
71
|
+
* @template {X extends typeof FuroEditableFieldContext ? X : never} T, X
|
|
72
|
+
* @override
|
|
73
|
+
* @param {FuroEditableFieldContextFactoryParams} params - Parameters of this factory method.
|
|
74
|
+
* @returns {InstanceType<T>} An instance of this class.
|
|
75
|
+
* @this {T}
|
|
76
|
+
*/
|
|
77
|
+
static create ({
|
|
78
|
+
props,
|
|
79
|
+
componentContext,
|
|
80
|
+
|
|
81
|
+
refHash = this.buildRefHash(),
|
|
82
|
+
reactiveHash = this.buildReactiveHash(),
|
|
83
|
+
}) {
|
|
84
|
+
return /** @type {InstanceType<T>} */ (
|
|
85
|
+
new this({
|
|
86
|
+
props,
|
|
87
|
+
componentContext,
|
|
88
|
+
|
|
89
|
+
refHash,
|
|
90
|
+
reactiveHash,
|
|
91
|
+
})
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Build ref hash.
|
|
97
|
+
*
|
|
98
|
+
* @override
|
|
99
|
+
*/
|
|
100
|
+
static buildRefHash () {
|
|
101
|
+
return {
|
|
102
|
+
originalValueRef: ref(null),
|
|
103
|
+
|
|
104
|
+
committedValueRef: ref(null),
|
|
105
|
+
draftValueRef: ref(null),
|
|
106
|
+
|
|
107
|
+
editableRootInstanceRef: ref(null),
|
|
108
|
+
anchorElementRef: ref(null),
|
|
109
|
+
floatingEditorElementRef: ref(null),
|
|
110
|
+
|
|
111
|
+
scrollEventListenerRef: ref(null),
|
|
112
|
+
resizeEventListenerRef: ref(null),
|
|
113
|
+
editorPositionRevisionRef: ref(0),
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Build reactive hash.
|
|
119
|
+
*
|
|
120
|
+
* @override
|
|
121
|
+
*/
|
|
122
|
+
static buildReactiveHash () {
|
|
123
|
+
return {
|
|
124
|
+
statusReactive: reactive({
|
|
125
|
+
isShowEditing: false,
|
|
126
|
+
}),
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Get emit event name.
|
|
132
|
+
*
|
|
133
|
+
* @override
|
|
134
|
+
* @returns {Readonly<{
|
|
135
|
+
* COMMIT_VALUE: 'commit-value'
|
|
136
|
+
* UPDATE_EDITING_STATE: 'update-editing-state'
|
|
137
|
+
* }>}
|
|
138
|
+
*/
|
|
139
|
+
static get EMIT_EVENT_NAME () {
|
|
140
|
+
return {
|
|
141
|
+
COMMIT_VALUE: 'commit-value',
|
|
142
|
+
UPDATE_EDITING_STATE: 'update-editing-state',
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Get emit options.
|
|
148
|
+
*
|
|
149
|
+
* @returns {{
|
|
150
|
+
* 'commit-value': (payload: import('./EditableEmitPayload.js').default) => void
|
|
151
|
+
* 'update-editing-state': (editingState: EdittingState) => void
|
|
152
|
+
* }}
|
|
153
|
+
*/
|
|
154
|
+
static get EMIT_EVENT_HASH () {
|
|
155
|
+
return {
|
|
156
|
+
[this.EMIT_EVENT_NAME.COMMIT_VALUE]: payload => {},
|
|
157
|
+
[this.EMIT_EVENT_NAME.UPDATE_EDITING_STATE]: editing => {},
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* get: Constructor of `EmitPayload`
|
|
163
|
+
*
|
|
164
|
+
* @returns {typeof EditableEmitPayload}
|
|
165
|
+
*/
|
|
166
|
+
static get EmitPayloadCtor () {
|
|
167
|
+
return EditableEmitPayload
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* get: Constructor of `ObjectProcessor`.
|
|
172
|
+
*
|
|
173
|
+
* @returns {typeof ObjectProcessor}
|
|
174
|
+
*/
|
|
175
|
+
static get ObjectProcessorCtor () {
|
|
176
|
+
return ObjectProcessor
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* get: Constructor of `EditorCollisionProcessor`.
|
|
181
|
+
*
|
|
182
|
+
* @returns {typeof EditorCollisionProcessor}
|
|
183
|
+
*/
|
|
184
|
+
static get EditorCollisionProcessorCtor () {
|
|
185
|
+
return EditorCollisionProcessor
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* get: Constructor of this class.
|
|
190
|
+
*
|
|
191
|
+
* @override
|
|
192
|
+
* @returns {typeof FuroEditableFieldContext}
|
|
193
|
+
*/
|
|
194
|
+
get Ctor () {
|
|
195
|
+
return /** @type {typeof FuroEditableFieldContext} */ (
|
|
196
|
+
this.constructor
|
|
197
|
+
)
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @returns {import('vue').Ref<FuroEditableValue>}
|
|
202
|
+
*/
|
|
203
|
+
get originalValueRef () {
|
|
204
|
+
return this.refHash.originalValueRef
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @returns {import('vue').Ref<FuroEditableValue>}
|
|
209
|
+
*/
|
|
210
|
+
get committedValueRef () {
|
|
211
|
+
return this.refHash.committedValueRef
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @returns {import('vue').Ref<FuroEditableValue>}
|
|
216
|
+
*/
|
|
217
|
+
get draftValueRef () {
|
|
218
|
+
return this.refHash.draftValueRef
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @returns {import('vue').Ref<EditableRootMethods | null>}
|
|
223
|
+
*/
|
|
224
|
+
get editableRootInstanceRef () {
|
|
225
|
+
return this.refHash.editableRootInstanceRef
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @returns {import('vue').Ref<HTMLElement | null>}
|
|
230
|
+
*/
|
|
231
|
+
get anchorElementRef () {
|
|
232
|
+
return this.refHash.anchorElementRef
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @returns {import('vue').Ref<HTMLElement | null>}
|
|
237
|
+
*/
|
|
238
|
+
get floatingEditorElementRef () {
|
|
239
|
+
return this.refHash.floatingEditorElementRef
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @returns {import('vue').Ref<EventListener | null>}
|
|
244
|
+
*/
|
|
245
|
+
get scrollEventListenerRef () {
|
|
246
|
+
return this.refHash.scrollEventListenerRef
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* @returns {import('vue').Ref<EventListener | null>}
|
|
251
|
+
*/
|
|
252
|
+
get resizeEventListenerRef () {
|
|
253
|
+
return this.refHash.resizeEventListenerRef
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* @returns {import('vue').Ref<number>}
|
|
258
|
+
*/
|
|
259
|
+
get editorPositionRevisionRef () {
|
|
260
|
+
return this.refHash.editorPositionRevisionRef
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @returns {StatusReactive}
|
|
265
|
+
*/
|
|
266
|
+
get statusReactive () {
|
|
267
|
+
return this.reactiveHash.statusReactive
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Parcel passed from parent via props (merged defaults).
|
|
272
|
+
*
|
|
273
|
+
* @override
|
|
274
|
+
* @returns {FuroEditableFieldParcel}
|
|
275
|
+
*/
|
|
276
|
+
get parcel () {
|
|
277
|
+
return {
|
|
278
|
+
emptyPreviewText: '---',
|
|
279
|
+
showActions: false,
|
|
280
|
+
showEditing: false,
|
|
281
|
+
showUndoChange: false,
|
|
282
|
+
...this.props.parcel,
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Setup component context.
|
|
288
|
+
*
|
|
289
|
+
* @template {X extends FuroEditableFieldContext ? X : never} T, X
|
|
290
|
+
* @override
|
|
291
|
+
* @returns {T} - For method chaining.
|
|
292
|
+
* @this {T}
|
|
293
|
+
*/
|
|
294
|
+
setupComponent () {
|
|
295
|
+
onMounted(() => {
|
|
296
|
+
this.statusReactive.isShowEditing = this.parcel.showEditing ?? false
|
|
297
|
+
this.originalValueRef.value = this.parcel.value ?? null
|
|
298
|
+
})
|
|
299
|
+
|
|
300
|
+
onBeforeUnmount(() => {
|
|
301
|
+
this.teardownEditingScrollListener()
|
|
302
|
+
this.teardownEditingResizeListener()
|
|
303
|
+
})
|
|
304
|
+
|
|
305
|
+
// Sync internal value from parcel.
|
|
306
|
+
this.watch(
|
|
307
|
+
() => this.parcel.value,
|
|
308
|
+
parcelValue => {
|
|
309
|
+
this.committedValueRef.value = parcelValue ?? null
|
|
310
|
+
this.draftValueRef.value = parcelValue ?? null
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
immediate: true,
|
|
314
|
+
}
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
this.watch(
|
|
318
|
+
() => this.statusReactive.isShowEditing,
|
|
319
|
+
isShowEditing => {
|
|
320
|
+
if (!isShowEditing) {
|
|
321
|
+
this.teardownEditingScrollListener()
|
|
322
|
+
this.teardownEditingResizeListener()
|
|
323
|
+
|
|
324
|
+
return
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
this.setupEditingScrollListener()
|
|
328
|
+
this.setupEditingResizeListener()
|
|
329
|
+
this.scheduleEditorPositionRevision()
|
|
330
|
+
}
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
return this
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Cancel editing on scroll.
|
|
338
|
+
*
|
|
339
|
+
* @param {{
|
|
340
|
+
* scrollEvent: Event
|
|
341
|
+
* }} params - Parameters.
|
|
342
|
+
*/
|
|
343
|
+
cancelEditingOnScroll ({
|
|
344
|
+
scrollEvent,
|
|
345
|
+
}) {
|
|
346
|
+
if (
|
|
347
|
+
!this.statusReactive.isShowEditing
|
|
348
|
+
|| !this.floatingEditorElementRef.value
|
|
349
|
+
) {
|
|
350
|
+
return
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (
|
|
354
|
+
scrollEvent.target instanceof Node
|
|
355
|
+
&& this.floatingEditorElementRef.value.contains(scrollEvent.target)
|
|
356
|
+
) {
|
|
357
|
+
return
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
this.editableRootInstanceRef.value?.cancel()
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Setup scroll listener while editing.
|
|
365
|
+
*/
|
|
366
|
+
setupEditingScrollListener () {
|
|
367
|
+
this.scrollEventListenerRef.value = scrollEvent =>
|
|
368
|
+
this.cancelEditingOnScroll({
|
|
369
|
+
scrollEvent,
|
|
370
|
+
})
|
|
371
|
+
|
|
372
|
+
window.addEventListener(
|
|
373
|
+
'scroll',
|
|
374
|
+
this.scrollEventListenerRef.value,
|
|
375
|
+
true
|
|
376
|
+
)
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Teardown scroll listener while editing.
|
|
381
|
+
*/
|
|
382
|
+
teardownEditingScrollListener () {
|
|
383
|
+
if (!this.scrollEventListenerRef.value) {
|
|
384
|
+
return
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
window.removeEventListener(
|
|
388
|
+
'scroll',
|
|
389
|
+
this.scrollEventListenerRef.value,
|
|
390
|
+
true
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
this.scrollEventListenerRef.value = null
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Setup resize listener while editing.
|
|
398
|
+
*/
|
|
399
|
+
setupEditingResizeListener () {
|
|
400
|
+
this.resizeEventListenerRef.value = () => {
|
|
401
|
+
this.incrementEditorPositionRevision()
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
window.addEventListener(
|
|
405
|
+
'resize',
|
|
406
|
+
this.resizeEventListenerRef.value
|
|
407
|
+
)
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Teardown resize listener while editing.
|
|
412
|
+
*/
|
|
413
|
+
teardownEditingResizeListener () {
|
|
414
|
+
if (!this.resizeEventListenerRef.value) {
|
|
415
|
+
return
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
window.removeEventListener(
|
|
419
|
+
'resize',
|
|
420
|
+
this.resizeEventListenerRef.value
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
this.resizeEventListenerRef.value = null
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Increment editor position revision to trigger style recalculation.
|
|
428
|
+
*/
|
|
429
|
+
incrementEditorPositionRevision () {
|
|
430
|
+
this.editorPositionRevisionRef.value += 1
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Schedule editor position revision after layout is ready.
|
|
435
|
+
*/
|
|
436
|
+
scheduleEditorPositionRevision () {
|
|
437
|
+
nextTick(() => {
|
|
438
|
+
requestAnimationFrame(() => {
|
|
439
|
+
this.incrementEditorPositionRevision()
|
|
440
|
+
})
|
|
441
|
+
})
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Whether action triggers are shown.
|
|
446
|
+
*
|
|
447
|
+
* @returns {boolean}
|
|
448
|
+
*/
|
|
449
|
+
shouldShowActionButtons () {
|
|
450
|
+
return Object.hasOwn(this.slots, 'edit-trigger')
|
|
451
|
+
|| Object.hasOwn(this.slots, 'submit-trigger')
|
|
452
|
+
|| Object.hasOwn(this.slots, 'cancel-trigger')
|
|
453
|
+
|| Boolean(this.parcel.showActions)
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Whether the field is invalid.
|
|
458
|
+
*
|
|
459
|
+
* @returns {boolean}
|
|
460
|
+
*/
|
|
461
|
+
isInvalid () {
|
|
462
|
+
return Boolean(this.parcel?.invalid)
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Whether the field is disabled.
|
|
467
|
+
*
|
|
468
|
+
* @returns {boolean}
|
|
469
|
+
*/
|
|
470
|
+
isDisabled () {
|
|
471
|
+
return Boolean(this.parcel?.disabled)
|
|
472
|
+
|| this.hasBooleanAttribute({ name: 'disabled' })
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Whether the field is readonly.
|
|
477
|
+
*
|
|
478
|
+
* @returns {boolean}
|
|
479
|
+
*/
|
|
480
|
+
isReadonly () {
|
|
481
|
+
return Boolean(this.parcel?.readonly)
|
|
482
|
+
|| this.hasBooleanAttribute({ name: 'readonly' })
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Whether the field is required.
|
|
487
|
+
*
|
|
488
|
+
* @returns {boolean}
|
|
489
|
+
*/
|
|
490
|
+
isRequired () {
|
|
491
|
+
return Boolean(this.parcel?.required)
|
|
492
|
+
|| this.hasBooleanAttribute({ name: 'required' })
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Extract the accessible name of the edit trigger.
|
|
497
|
+
*
|
|
498
|
+
* @returns {string}
|
|
499
|
+
*/
|
|
500
|
+
extractEditLabel () {
|
|
501
|
+
return this.parcel?.editLabel
|
|
502
|
+
?? DEFAULT_EDIT_LABEL
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Extract the accessible name of the undo control.
|
|
507
|
+
*
|
|
508
|
+
* @returns {string}
|
|
509
|
+
*/
|
|
510
|
+
extractUndoLabel () {
|
|
511
|
+
return this.parcel?.undoLabel
|
|
512
|
+
?? DEFAULT_UNDO_LABEL
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Extract the accessible name of the submit control.
|
|
517
|
+
*
|
|
518
|
+
* @returns {string}
|
|
519
|
+
*/
|
|
520
|
+
extractSubmitLabel () {
|
|
521
|
+
return this.parcel?.submitLabel
|
|
522
|
+
?? DEFAULT_SUBMIT_LABEL
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Extract the accessible name of the cancel control.
|
|
527
|
+
*
|
|
528
|
+
* @returns {string}
|
|
529
|
+
*/
|
|
530
|
+
extractCancelLabel () {
|
|
531
|
+
return this.parcel?.cancelLabel
|
|
532
|
+
?? DEFAULT_CANCEL_LABEL
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Extract placeholder forwarded to Reka EditableRoot.
|
|
537
|
+
*
|
|
538
|
+
* @returns {FuroEditableFieldParcel['placeholder']}
|
|
539
|
+
*/
|
|
540
|
+
extractPlaceholder () {
|
|
541
|
+
if (this.parcel?.placeholder) {
|
|
542
|
+
return this.parcel.placeholder
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
return (/** @type {import('vue').InputHTMLAttributes} */ (this.attrs))
|
|
546
|
+
.placeholder
|
|
547
|
+
?? ''
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Extract root attributes forwarded to Reka EditableRoot.
|
|
552
|
+
*
|
|
553
|
+
* @returns {Props['parcel']}
|
|
554
|
+
*/
|
|
555
|
+
extractRootAttributes () {
|
|
556
|
+
const parcelEntries = Object.entries(this.parcel)
|
|
557
|
+
|
|
558
|
+
const parcelFilteredEntries = Object.fromEntries(
|
|
559
|
+
parcelEntries.filter(([key]) => !FURO_EDITABLE_PARCEL_KEYS.has(key))
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
return {
|
|
563
|
+
...this.attrs,
|
|
564
|
+
...parcelFilteredEntries,
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Whether the value is empty.
|
|
570
|
+
*
|
|
571
|
+
* @returns {boolean}
|
|
572
|
+
*/
|
|
573
|
+
hasEmptyValue () {
|
|
574
|
+
if (Array.isArray(this.committedValueRef.value)) {
|
|
575
|
+
return this.committedValueRef.value.length === 0
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (
|
|
579
|
+
this.committedValueRef.value
|
|
580
|
+
&& typeof this.committedValueRef.value === 'object'
|
|
581
|
+
) {
|
|
582
|
+
return Object.keys(this.committedValueRef.value).length === 0
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
return this.committedValueRef.value === null
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Resolve preview label text.
|
|
590
|
+
*
|
|
591
|
+
* @returns {string}
|
|
592
|
+
*/
|
|
593
|
+
resolvePreviewText () {
|
|
594
|
+
if (
|
|
595
|
+
this.committedValueRef.value
|
|
596
|
+
&& typeof this.committedValueRef.value === 'object'
|
|
597
|
+
) {
|
|
598
|
+
return JSON.stringify(this.committedValueRef.value)
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return String(this.committedValueRef.value)
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Build custom event.
|
|
606
|
+
*
|
|
607
|
+
* @param {{
|
|
608
|
+
* name?: string
|
|
609
|
+
* value?: FuroEditableValue
|
|
610
|
+
* }} [params] - Parameters.
|
|
611
|
+
* @returns {import('./EditableEmitPayload.js').EditableRawEvent}
|
|
612
|
+
*/
|
|
613
|
+
buildCustomEvent ({
|
|
614
|
+
name = this.EMIT_EVENT_NAME.COMMIT_VALUE,
|
|
615
|
+
value = this.committedValueRef.value,
|
|
616
|
+
} = {}) {
|
|
617
|
+
return new CustomEvent(
|
|
618
|
+
name,
|
|
619
|
+
{
|
|
620
|
+
detail: {
|
|
621
|
+
target: null,
|
|
622
|
+
value,
|
|
623
|
+
},
|
|
624
|
+
})
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Build payload.
|
|
629
|
+
*
|
|
630
|
+
* @param {{
|
|
631
|
+
* rawEvent?: import('./EditableEmitPayload.js').EditableRawEvent
|
|
632
|
+
* }} [params] - Parameters.
|
|
633
|
+
* @returns {InstanceType<typeof EditableEmitPayload>}
|
|
634
|
+
*/
|
|
635
|
+
buildEmitPayload ({
|
|
636
|
+
rawEvent = this.buildCustomEvent(),
|
|
637
|
+
} = {}) {
|
|
638
|
+
return this.Ctor.EmitPayloadCtor.create({
|
|
639
|
+
rawEvent,
|
|
640
|
+
})
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Respond to submit committed value event (blur / enter dismiss).
|
|
645
|
+
*
|
|
646
|
+
* @param {{
|
|
647
|
+
* value?: FuroEditableValue
|
|
648
|
+
* }} [params] - Parameters.
|
|
649
|
+
* @throws {Error} When not implemented.
|
|
650
|
+
*/
|
|
651
|
+
onSubmitCommittedValue ({
|
|
652
|
+
value = this.draftValueRef.value,
|
|
653
|
+
} = {}) {
|
|
654
|
+
this.committedValueRef.value = value ?? this.draftValueRef.value ?? null
|
|
655
|
+
|
|
656
|
+
this.emit(
|
|
657
|
+
this.EMIT_EVENT_NAME.COMMIT_VALUE,
|
|
658
|
+
this.buildEmitPayload()
|
|
659
|
+
)
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Respond to Reka update state event.
|
|
664
|
+
*
|
|
665
|
+
* @param {{
|
|
666
|
+
* editingState: EdittingState
|
|
667
|
+
* }} params - Parameters.
|
|
668
|
+
* @throws {Error} When not implemented.
|
|
669
|
+
*/
|
|
670
|
+
onUpdateEditingState ({
|
|
671
|
+
editingState,
|
|
672
|
+
}) {
|
|
673
|
+
this.statusReactive.isShowEditing = editingState === 'edit'
|
|
674
|
+
|
|
675
|
+
this.emit(
|
|
676
|
+
this.EMIT_EVENT_NAME.UPDATE_EDITING_STATE,
|
|
677
|
+
editingState
|
|
678
|
+
)
|
|
679
|
+
|
|
680
|
+
if (
|
|
681
|
+
editingState === 'edit'
|
|
682
|
+
) {
|
|
683
|
+
nextTick(() => {
|
|
684
|
+
requestAnimationFrame(() => {
|
|
685
|
+
/** @type {HTMLElement | null} */(
|
|
686
|
+
this.floatingEditorElementRef.value
|
|
687
|
+
?.querySelector('input, textarea')
|
|
688
|
+
)
|
|
689
|
+
?.focus()
|
|
690
|
+
})
|
|
691
|
+
})
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Update internal value.
|
|
697
|
+
*
|
|
698
|
+
* @param {{
|
|
699
|
+
* value: FuroEditableValue
|
|
700
|
+
* }} params - Parameters.
|
|
701
|
+
*/
|
|
702
|
+
updateDraftValue ({
|
|
703
|
+
value,
|
|
704
|
+
}) {
|
|
705
|
+
this.draftValueRef.value = value ?? null
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Build slot props.
|
|
710
|
+
*
|
|
711
|
+
* @param {{
|
|
712
|
+
* defaultSlotProps: DefaultEditableRootSlotProps
|
|
713
|
+
* }} params - Parameters.
|
|
714
|
+
* @returns {FuroEditableSlotProps}
|
|
715
|
+
*/
|
|
716
|
+
buildSlotProps ({
|
|
717
|
+
defaultSlotProps,
|
|
718
|
+
}) {
|
|
719
|
+
return {
|
|
720
|
+
...defaultSlotProps,
|
|
721
|
+
committedValue: this.committedValueRef.value,
|
|
722
|
+
draftValue: this.draftValueRef.value,
|
|
723
|
+
updateDraftValue: this.updateDraftValue.bind(this),
|
|
724
|
+
undoChange: this.onUndoChange.bind(this),
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Extract editor position elements.
|
|
730
|
+
*
|
|
731
|
+
* @returns {{
|
|
732
|
+
* anchorElement: HTMLElement
|
|
733
|
+
* floatingEditorElement: HTMLElement
|
|
734
|
+
* } | null}
|
|
735
|
+
*/
|
|
736
|
+
extractEditorPositionElements () {
|
|
737
|
+
const anchorElement = this.anchorElementRef.value
|
|
738
|
+
const floatingEditorElement = this.floatingEditorElementRef.value
|
|
739
|
+
|
|
740
|
+
if (
|
|
741
|
+
!anchorElement
|
|
742
|
+
|| !floatingEditorElement
|
|
743
|
+
) {
|
|
744
|
+
return null
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
return {
|
|
748
|
+
anchorElement,
|
|
749
|
+
floatingEditorElement,
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Extract collision boundary element.
|
|
755
|
+
*
|
|
756
|
+
* @returns {HTMLElement | null}
|
|
757
|
+
*/
|
|
758
|
+
extractCollisionBoundaryElement () {
|
|
759
|
+
const {
|
|
760
|
+
collisionBoundary,
|
|
761
|
+
} = this.parcel
|
|
762
|
+
|
|
763
|
+
if (!collisionBoundary) {
|
|
764
|
+
return null
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
return unref(collisionBoundary) ?? null
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Generate editor style.
|
|
772
|
+
*
|
|
773
|
+
* @returns {import('vue').CSSProperties}
|
|
774
|
+
*/
|
|
775
|
+
generateEditorPositionStyle () {
|
|
776
|
+
if (!this.statusReactive.isShowEditing) {
|
|
777
|
+
return {}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
return this.buildEditorPositionStyle({
|
|
781
|
+
editorPositionRevision: this.editorPositionRevisionRef.value,
|
|
782
|
+
})
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Build editor position style.
|
|
787
|
+
*
|
|
788
|
+
* @param {{
|
|
789
|
+
* editorPositionRevision: number
|
|
790
|
+
* }} params - Parameters.
|
|
791
|
+
* @returns {import('vue').CSSProperties}
|
|
792
|
+
*/
|
|
793
|
+
buildEditorPositionStyle ({
|
|
794
|
+
editorPositionRevision,
|
|
795
|
+
}) {
|
|
796
|
+
if (editorPositionRevision < 0) {
|
|
797
|
+
return {}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
const editorPositionElements = this.extractEditorPositionElements()
|
|
801
|
+
|
|
802
|
+
if (!editorPositionElements) {
|
|
803
|
+
return {}
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
const {
|
|
807
|
+
anchorElement,
|
|
808
|
+
floatingEditorElement,
|
|
809
|
+
} = editorPositionElements
|
|
810
|
+
const collisionBoundaryElement = this.extractCollisionBoundaryElement()
|
|
811
|
+
|
|
812
|
+
return this.Ctor.EditorCollisionProcessorCtor.create({
|
|
813
|
+
anchorRect: anchorElement.getBoundingClientRect(),
|
|
814
|
+
boundaryRect: collisionBoundaryElement?.getBoundingClientRect(),
|
|
815
|
+
editorWidth: floatingEditorElement.offsetWidth,
|
|
816
|
+
editorHeight: floatingEditorElement.offsetHeight,
|
|
817
|
+
})
|
|
818
|
+
.generateEditorPositionStyle()
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* Whether the original value has changed.
|
|
823
|
+
*
|
|
824
|
+
* @returns {boolean}
|
|
825
|
+
*/
|
|
826
|
+
hasOriginalValueChanged () {
|
|
827
|
+
if (
|
|
828
|
+
Array.isArray(this.originalValueRef.value)
|
|
829
|
+
&& Array.isArray(this.committedValueRef.value)
|
|
830
|
+
) {
|
|
831
|
+
return this.originalValueRef.value.some((value, index) =>
|
|
832
|
+
!this.Ctor.ObjectProcessorCtor.create({
|
|
833
|
+
leftValue: value,
|
|
834
|
+
rightValue: this.committedValueRef.value[index],
|
|
835
|
+
})
|
|
836
|
+
.areDeepEqual()
|
|
837
|
+
)
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
if (
|
|
841
|
+
typeof this.originalValueRef.value === 'object'
|
|
842
|
+
&& typeof this.committedValueRef.value === 'object'
|
|
843
|
+
) {
|
|
844
|
+
return !this.Ctor.ObjectProcessorCtor.create({
|
|
845
|
+
leftValue: this.originalValueRef.value,
|
|
846
|
+
rightValue: this.committedValueRef.value,
|
|
847
|
+
})
|
|
848
|
+
.areDeepEqual()
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
return String(this.originalValueRef.value) !== String(this.committedValueRef.value)
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* Undo change.
|
|
856
|
+
*/
|
|
857
|
+
onUndoChange () {
|
|
858
|
+
this.draftValueRef.value = this.originalValueRef.value ?? null
|
|
859
|
+
this.committedValueRef.value = this.originalValueRef.value ?? null
|
|
860
|
+
|
|
861
|
+
this.emit(
|
|
862
|
+
this.EMIT_EVENT_NAME.COMMIT_VALUE,
|
|
863
|
+
this.buildEmitPayload()
|
|
864
|
+
)
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Whether the undo change button should be shown.
|
|
869
|
+
*
|
|
870
|
+
* @returns {boolean}
|
|
871
|
+
*/
|
|
872
|
+
shouldShowUndoChange () {
|
|
873
|
+
return this.hasOriginalValueChanged()
|
|
874
|
+
&& Boolean(this.parcel?.showUndoChange)
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* @typedef {'commit-value' | 'update:value' | 'update:state'} EmitEventName
|
|
880
|
+
*/
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* @typedef {*} FuroEditableValue
|
|
884
|
+
*/
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* @typedef {{
|
|
888
|
+
* value?: FuroEditableValue
|
|
889
|
+
* invalid?: boolean
|
|
890
|
+
* disabled?: boolean
|
|
891
|
+
* required?: boolean
|
|
892
|
+
* readonly?: boolean
|
|
893
|
+
* placeholder?: string
|
|
894
|
+
* emptyPreviewText?: string
|
|
895
|
+
* showActions?: boolean
|
|
896
|
+
* showEditing?: boolean
|
|
897
|
+
* showUndoChange?: boolean
|
|
898
|
+
* submitMode?: 'blur' | 'enter' | 'both' | 'none'
|
|
899
|
+
* activationMode?: 'dblclick' | 'focus' | 'none'
|
|
900
|
+
* collisionBoundary?: import('vue').Ref<HTMLElement | null> | HTMLElement | null
|
|
901
|
+
* editLabel?: string
|
|
902
|
+
* undoLabel?: string
|
|
903
|
+
* submitLabel?: string
|
|
904
|
+
* cancelLabel?: string
|
|
905
|
+
* }} FuroEditableFieldParcel
|
|
906
|
+
*/
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* @typedef {{
|
|
910
|
+
* parcel?: FuroEditableFieldParcel & import('vue').Attrs | null
|
|
911
|
+
* }} Props
|
|
912
|
+
*/
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* @typedef {{
|
|
916
|
+
* isShowEditing: boolean
|
|
917
|
+
* }} StatusReactive
|
|
918
|
+
*/
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* @typedef {{
|
|
922
|
+
* statusReactive: StatusReactive
|
|
923
|
+
* }} ReactiveHash
|
|
924
|
+
*/
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* @typedef {{
|
|
928
|
+
* submit: () => void
|
|
929
|
+
* cancel: () => void
|
|
930
|
+
* edit: () => void
|
|
931
|
+
* }} EditableRootMethods
|
|
932
|
+
*/
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* @typedef {{
|
|
936
|
+
* originalValueRef: import('vue').Ref<FuroEditableValue>
|
|
937
|
+
* committedValueRef: import('vue').Ref<FuroEditableValue>
|
|
938
|
+
* draftValueRef: import('vue').Ref<FuroEditableValue>
|
|
939
|
+
* editableRootInstanceRef: import('vue').Ref<EditableRootMethods | null>
|
|
940
|
+
* anchorElementRef: import('vue').Ref<HTMLElement | null>
|
|
941
|
+
* floatingEditorElementRef: import('vue').Ref<HTMLElement | null>
|
|
942
|
+
* scrollEventListenerRef: import('vue').Ref<EventListener | null>
|
|
943
|
+
* resizeEventListenerRef: import('vue').Ref<EventListener | null>
|
|
944
|
+
* editorPositionRevisionRef: import('vue').Ref<number>
|
|
945
|
+
* }} RefHash
|
|
946
|
+
*/
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* @typedef {import('../../../contexts/BaseFuroContext.js').BaseFuroContextParams & {
|
|
950
|
+
* props: Props
|
|
951
|
+
* componentContext: ComponentContext
|
|
952
|
+
* refHash: RefHash
|
|
953
|
+
* reactiveHash: ReactiveHash
|
|
954
|
+
* }} FuroEditableFieldContextParams
|
|
955
|
+
*/
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* @typedef {Omit<FuroEditableFieldContextParams, 'refHash' | 'reactiveHash'> & {
|
|
959
|
+
* refHash?: FuroEditableFieldContextParams['refHash']
|
|
960
|
+
* reactiveHash?: FuroEditableFieldContextParams['reactiveHash']
|
|
961
|
+
* }} FuroEditableFieldContextFactoryParams
|
|
962
|
+
*/
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* @typedef {'cancel' | 'submit' | 'edit'} EdittingState
|
|
966
|
+
*/
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* @typedef {typeof FuroEditableFieldContext.EMIT_EVENT_HASH} FuroEditableFieldEmitHash
|
|
970
|
+
*/
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* @typedef {{
|
|
974
|
+
* isEditing: boolean
|
|
975
|
+
* modelValue: string | null | undefined
|
|
976
|
+
* isEmpty: boolean
|
|
977
|
+
* submit: () => void
|
|
978
|
+
* cancel: () => void
|
|
979
|
+
* edit: () => void
|
|
980
|
+
* }} DefaultEditableRootSlotProps
|
|
981
|
+
*/
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* @typedef {DefaultEditableRootSlotProps & {
|
|
985
|
+
* committedValue: FuroEditableValue
|
|
986
|
+
* draftValue: FuroEditableValue
|
|
987
|
+
* updateDraftValue: ({
|
|
988
|
+
* value
|
|
989
|
+
* }: {
|
|
990
|
+
* value: FuroEditableValue
|
|
991
|
+
* }) => void
|
|
992
|
+
* undoChange: () => void
|
|
993
|
+
* }} FuroEditableSlotProps
|
|
994
|
+
*/
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* @typedef {import('vue').SlotsType<{
|
|
998
|
+
* preview: FuroEditableSlotProps
|
|
999
|
+
* editor: FuroEditableSlotProps
|
|
1000
|
+
* 'edit-trigger': FuroEditableSlotProps
|
|
1001
|
+
* 'submit-trigger': FuroEditableSlotProps
|
|
1002
|
+
* 'cancel-trigger': FuroEditableSlotProps
|
|
1003
|
+
* 'undo-trigger': FuroEditableSlotProps
|
|
1004
|
+
* }>} FuroEditableFieldSlots
|
|
1005
|
+
*/
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* @typedef {import('vue').SetupContext<FuroEditableFieldEmitHash, FuroEditableFieldSlots>} ComponentContext
|
|
1009
|
+
*/
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* @typedef {(
|
|
1013
|
+
* props: Props,
|
|
1014
|
+
* componentContext: ComponentContext
|
|
1015
|
+
* ) => {
|
|
1016
|
+
* context: FuroEditableFieldContext
|
|
1017
|
+
* }} FuroEditableFieldSetup
|
|
1018
|
+
*/
|