@embedpdf/plugin-form 2.14.4 → 3.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +192 -21
- package/dist/index.cjs +1416 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +277 -0
- package/dist/index.d.ts +277 -1
- package/dist/index.js +1398 -1779
- package/dist/index.js.map +1 -1
- package/package.json +24 -61
- package/dist/lib/actions.d.ts +0 -33
- package/dist/lib/form-plugin.d.ts +0 -59
- package/dist/lib/handlers/checkbox.handler.d.ts +0 -3
- package/dist/lib/handlers/combobox.handler.d.ts +0 -3
- package/dist/lib/handlers/index.d.ts +0 -5
- package/dist/lib/handlers/listbox.handler.d.ts +0 -3
- package/dist/lib/handlers/radio-button.handler.d.ts +0 -3
- package/dist/lib/handlers/text-field.handler.d.ts +0 -3
- package/dist/lib/index.d.ts +0 -10
- package/dist/lib/manifest.d.ts +0 -4
- package/dist/lib/reducer.d.ts +0 -6
- package/dist/lib/tools.d.ts +0 -457
- package/dist/lib/types.d.ts +0 -98
- package/dist/preact/adapter.d.ts +0 -13
- package/dist/preact/annotation.d.ts +0 -1
- package/dist/preact/core.d.ts +0 -1
- package/dist/preact/index.cjs +0 -2
- package/dist/preact/index.cjs.map +0 -1
- package/dist/preact/index.d.ts +0 -1
- package/dist/preact/index.js +0 -1359
- package/dist/preact/index.js.map +0 -1
- package/dist/react/adapter.d.ts +0 -6
- package/dist/react/annotation.d.ts +0 -1
- package/dist/react/core.d.ts +0 -1
- package/dist/react/index.cjs +0 -2
- package/dist/react/index.cjs.map +0 -1
- package/dist/react/index.d.ts +0 -1
- package/dist/react/index.js +0 -1358
- package/dist/react/index.js.map +0 -1
- package/dist/shared/components/annotations/form-checkbox.d.ts +0 -12
- package/dist/shared/components/annotations/form-combobox.d.ts +0 -12
- package/dist/shared/components/annotations/form-listbox.d.ts +0 -12
- package/dist/shared/components/annotations/form-radio-button.d.ts +0 -12
- package/dist/shared/components/annotations/form-text-field.d.ts +0 -12
- package/dist/shared/components/fields/checkbox.d.ts +0 -2
- package/dist/shared/components/fields/combobox.d.ts +0 -2
- package/dist/shared/components/fields/listbox.d.ts +0 -2
- package/dist/shared/components/fields/push-button.d.ts +0 -2
- package/dist/shared/components/fields/radio-button.d.ts +0 -2
- package/dist/shared/components/fields/style.d.ts +0 -6
- package/dist/shared/components/fields/text.d.ts +0 -2
- package/dist/shared/components/fill-mode/combobox-fill-mode.d.ts +0 -3
- package/dist/shared/components/fill-mode/listbox-fill-mode.d.ts +0 -3
- package/dist/shared/components/fill-mode/push-button-fill-mode.d.ts +0 -3
- package/dist/shared/components/fill-mode/radio-button-fill-mode.d.ts +0 -3
- package/dist/shared/components/fill-mode/text-fill-mode.d.ts +0 -3
- package/dist/shared/components/fill-mode/toggle-fill-mode.d.ts +0 -3
- package/dist/shared/components/form-renderer-registration.d.ts +0 -5
- package/dist/shared/components/form-renderers.d.ts +0 -9
- package/dist/shared/components/index.d.ts +0 -2
- package/dist/shared/components/render-widget.d.ts +0 -12
- package/dist/shared/components/types.d.ts +0 -42
- package/dist/shared/hooks/index.d.ts +0 -1
- package/dist/shared/hooks/use-form-widget-state.d.ts +0 -12
- package/dist/shared/hooks/use-form.d.ts +0 -16
- package/dist/shared/index.d.ts +0 -4
- package/dist/shared-preact/components/annotations/form-checkbox.d.ts +0 -12
- package/dist/shared-preact/components/annotations/form-combobox.d.ts +0 -12
- package/dist/shared-preact/components/annotations/form-listbox.d.ts +0 -12
- package/dist/shared-preact/components/annotations/form-radio-button.d.ts +0 -12
- package/dist/shared-preact/components/annotations/form-text-field.d.ts +0 -12
- package/dist/shared-preact/components/fields/checkbox.d.ts +0 -2
- package/dist/shared-preact/components/fields/combobox.d.ts +0 -2
- package/dist/shared-preact/components/fields/listbox.d.ts +0 -2
- package/dist/shared-preact/components/fields/push-button.d.ts +0 -2
- package/dist/shared-preact/components/fields/radio-button.d.ts +0 -2
- package/dist/shared-preact/components/fields/style.d.ts +0 -6
- package/dist/shared-preact/components/fields/text.d.ts +0 -2
- package/dist/shared-preact/components/fill-mode/combobox-fill-mode.d.ts +0 -3
- package/dist/shared-preact/components/fill-mode/listbox-fill-mode.d.ts +0 -3
- package/dist/shared-preact/components/fill-mode/push-button-fill-mode.d.ts +0 -3
- package/dist/shared-preact/components/fill-mode/radio-button-fill-mode.d.ts +0 -3
- package/dist/shared-preact/components/fill-mode/text-fill-mode.d.ts +0 -3
- package/dist/shared-preact/components/fill-mode/toggle-fill-mode.d.ts +0 -3
- package/dist/shared-preact/components/form-renderer-registration.d.ts +0 -5
- package/dist/shared-preact/components/form-renderers.d.ts +0 -9
- package/dist/shared-preact/components/index.d.ts +0 -2
- package/dist/shared-preact/components/render-widget.d.ts +0 -12
- package/dist/shared-preact/components/types.d.ts +0 -42
- package/dist/shared-preact/hooks/index.d.ts +0 -1
- package/dist/shared-preact/hooks/use-form-widget-state.d.ts +0 -12
- package/dist/shared-preact/hooks/use-form.d.ts +0 -16
- package/dist/shared-preact/index.d.ts +0 -4
- package/dist/shared-react/components/annotations/form-checkbox.d.ts +0 -12
- package/dist/shared-react/components/annotations/form-combobox.d.ts +0 -12
- package/dist/shared-react/components/annotations/form-listbox.d.ts +0 -12
- package/dist/shared-react/components/annotations/form-radio-button.d.ts +0 -12
- package/dist/shared-react/components/annotations/form-text-field.d.ts +0 -12
- package/dist/shared-react/components/fields/checkbox.d.ts +0 -2
- package/dist/shared-react/components/fields/combobox.d.ts +0 -2
- package/dist/shared-react/components/fields/listbox.d.ts +0 -2
- package/dist/shared-react/components/fields/push-button.d.ts +0 -2
- package/dist/shared-react/components/fields/radio-button.d.ts +0 -2
- package/dist/shared-react/components/fields/style.d.ts +0 -6
- package/dist/shared-react/components/fields/text.d.ts +0 -2
- package/dist/shared-react/components/fill-mode/combobox-fill-mode.d.ts +0 -3
- package/dist/shared-react/components/fill-mode/listbox-fill-mode.d.ts +0 -3
- package/dist/shared-react/components/fill-mode/push-button-fill-mode.d.ts +0 -3
- package/dist/shared-react/components/fill-mode/radio-button-fill-mode.d.ts +0 -3
- package/dist/shared-react/components/fill-mode/text-fill-mode.d.ts +0 -3
- package/dist/shared-react/components/fill-mode/toggle-fill-mode.d.ts +0 -3
- package/dist/shared-react/components/form-renderer-registration.d.ts +0 -5
- package/dist/shared-react/components/form-renderers.d.ts +0 -9
- package/dist/shared-react/components/index.d.ts +0 -2
- package/dist/shared-react/components/render-widget.d.ts +0 -12
- package/dist/shared-react/components/types.d.ts +0 -42
- package/dist/shared-react/hooks/index.d.ts +0 -1
- package/dist/shared-react/hooks/use-form-widget-state.d.ts +0 -12
- package/dist/shared-react/hooks/use-form.d.ts +0 -16
- package/dist/shared-react/index.d.ts +0 -4
- package/dist/svelte/components/FormRendererRegistration.svelte.d.ts +0 -18
- package/dist/svelte/components/RenderWidget.svelte.d.ts +0 -11
- package/dist/svelte/components/annotations/FormCheckbox.svelte.d.ts +0 -5
- package/dist/svelte/components/annotations/FormCombobox.svelte.d.ts +0 -5
- package/dist/svelte/components/annotations/FormListbox.svelte.d.ts +0 -5
- package/dist/svelte/components/annotations/FormRadioButton.svelte.d.ts +0 -5
- package/dist/svelte/components/annotations/FormTextField.svelte.d.ts +0 -5
- package/dist/svelte/components/fields/ComboboxField.svelte.d.ts +0 -4
- package/dist/svelte/components/fields/ListboxField.svelte.d.ts +0 -4
- package/dist/svelte/components/fields/TextField.svelte.d.ts +0 -4
- package/dist/svelte/components/fill-mode/ComboboxFillMode.svelte.d.ts +0 -5
- package/dist/svelte/components/fill-mode/ListboxFillMode.svelte.d.ts +0 -5
- package/dist/svelte/components/fill-mode/RadioButtonFillMode.svelte.d.ts +0 -5
- package/dist/svelte/components/fill-mode/TextFillMode.svelte.d.ts +0 -5
- package/dist/svelte/components/fill-mode/ToggleFillMode.svelte.d.ts +0 -5
- package/dist/svelte/components/form-renderers.d.ts +0 -9
- package/dist/svelte/components/previews/CheckboxPreview.svelte.d.ts +0 -9
- package/dist/svelte/components/previews/ListboxPreview.svelte.d.ts +0 -9
- package/dist/svelte/components/previews/RadioButtonPreview.svelte.d.ts +0 -9
- package/dist/svelte/components/previews/TextFieldPreview.svelte.d.ts +0 -9
- package/dist/svelte/hooks/index.d.ts +0 -2
- package/dist/svelte/hooks/use-form-widget-state.svelte.d.ts +0 -12
- package/dist/svelte/hooks/use-form.svelte.d.ts +0 -14
- package/dist/svelte/index.cjs +0 -2
- package/dist/svelte/index.cjs.map +0 -1
- package/dist/svelte/index.d.ts +0 -3
- package/dist/svelte/index.js +0 -1567
- package/dist/svelte/index.js.map +0 -1
- package/dist/vue/components/annotations/form-checkbox.vue.d.ts +0 -6
- package/dist/vue/components/annotations/form-combobox.vue.d.ts +0 -6
- package/dist/vue/components/annotations/form-listbox.vue.d.ts +0 -6
- package/dist/vue/components/annotations/form-radio-button.vue.d.ts +0 -6
- package/dist/vue/components/annotations/form-text-field.vue.d.ts +0 -6
- package/dist/vue/components/fields/combobox-field.vue.d.ts +0 -4
- package/dist/vue/components/fields/listbox-field.vue.d.ts +0 -4
- package/dist/vue/components/fields/style.d.ts +0 -6
- package/dist/vue/components/fields/text-field.vue.d.ts +0 -4
- package/dist/vue/components/fill-mode/combobox-fill-mode.vue.d.ts +0 -6
- package/dist/vue/components/fill-mode/listbox-fill-mode.vue.d.ts +0 -6
- package/dist/vue/components/fill-mode/radio-button-fill-mode.vue.d.ts +0 -6
- package/dist/vue/components/fill-mode/text-fill-mode.vue.d.ts +0 -6
- package/dist/vue/components/fill-mode/toggle-fill-mode.vue.d.ts +0 -6
- package/dist/vue/components/form-renderer-registration.vue.d.ts +0 -13
- package/dist/vue/components/form-renderers.d.ts +0 -3
- package/dist/vue/components/previews/checkbox-preview.vue.d.ts +0 -10
- package/dist/vue/components/previews/listbox-preview.vue.d.ts +0 -10
- package/dist/vue/components/previews/radio-button-preview.vue.d.ts +0 -10
- package/dist/vue/components/previews/text-field-preview.vue.d.ts +0 -10
- package/dist/vue/components/render-widget.vue.d.ts +0 -15
- package/dist/vue/hooks/index.d.ts +0 -2
- package/dist/vue/hooks/use-form-widget-state.d.ts +0 -12
- package/dist/vue/hooks/use-form.d.ts +0 -12
- package/dist/vue/index.cjs +0 -2
- package/dist/vue/index.cjs.map +0 -1
- package/dist/vue/index.d.ts +0 -3
- package/dist/vue/index.js +0 -1643
- package/dist/vue/index.js.map +0 -1
package/dist/svelte/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/svelte/components/annotations/FormTextField.svelte","../../src/svelte/components/annotations/FormCheckbox.svelte","../../src/svelte/components/annotations/FormRadioButton.svelte","../../src/svelte/components/annotations/FormCombobox.svelte","../../src/svelte/components/annotations/FormListbox.svelte","../../src/svelte/hooks/use-form.svelte.ts","../../src/svelte/hooks/use-form-widget-state.svelte.ts","../../src/svelte/components/RenderWidget.svelte","../../src/svelte/components/fields/TextField.svelte","../../src/svelte/components/fill-mode/TextFillMode.svelte","../../src/svelte/components/fill-mode/ToggleFillMode.svelte","../../src/svelte/components/fill-mode/RadioButtonFillMode.svelte","../../src/svelte/components/fields/ComboboxField.svelte","../../src/svelte/components/fill-mode/ComboboxFillMode.svelte","../../src/svelte/components/fields/ListboxField.svelte","../../src/svelte/components/fill-mode/ListboxFillMode.svelte","../../src/svelte/components/previews/TextFieldPreview.svelte","../../src/svelte/components/previews/CheckboxPreview.svelte","../../src/svelte/components/previews/RadioButtonPreview.svelte","../../src/svelte/components/previews/ListboxPreview.svelte","../../src/svelte/components/form-renderers.ts","../../src/svelte/components/FormRendererRegistration.svelte","../../src/svelte/index.ts"],"sourcesContent":["<script lang=\"ts\">\n import type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\n import type { PdfWidgetAnnoObject, PdfTextWidgetAnnoField } from '@embedpdf/models';\n import {\n PDF_FORM_FIELD_TYPE,\n PDF_FORM_FIELD_FLAG,\n standardFontCssProperties,\n } from '@embedpdf/models';\n\n let {\n annotation,\n currentObject,\n isSelected,\n scale,\n pageIndex,\n onClick,\n }: AnnotationRendererProps<PdfWidgetAnnoObject> = $props();\n\n let isHovered = $state(false);\n\n const object = $derived(currentObject);\n const field = $derived(object.field);\n const isTextField = $derived(field.type === PDF_FORM_FIELD_TYPE.TEXTFIELD);\n const value = $derived(isTextField ? (field as PdfTextWidgetAnnoField).value : '');\n const isComb = $derived(\n isTextField &&\n !!(field.flag & PDF_FORM_FIELD_FLAG.TEXT_COMB) &&\n !!(field as PdfTextWidgetAnnoField).maxLen,\n );\n const isMultiline = $derived(isTextField && !!(field.flag & PDF_FORM_FIELD_FLAG.TEXT_MULTIPLINE));\n const maxLen = $derived(isTextField ? (field as PdfTextWidgetAnnoField).maxLen : undefined);\n const borderWidth = $derived((object.strokeWidth ?? 1) * scale);\n const fontCss = $derived(standardFontCssProperties(object.fontFamily));\n const fontSize = $derived((object.fontSize ?? 12) * scale);\n const fontColor = $derived(object.fontColor ?? '#000000');\n\n const cellWidth = $derived(isComb && maxLen ? (object.rect.size.width * scale) / maxLen : 0);\n const chars = $derived((value ?? '').split(''));\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n onpointerdown={(e) => {\n if (!isSelected) onClick?.(e);\n }}\n onmouseenter={() => (isHovered = true)}\n onmouseleave={() => (isHovered = false)}\n style:position=\"absolute\"\n style:inset=\"0\"\n style:background={object.color ?? 'rgba(255, 255, 255, 0.9)'}\n style:border=\"{borderWidth}px solid {object.strokeColor ?? 'rgba(0, 0, 0, 0.2)'}\"\n style:outline={isHovered || isSelected ? '1px solid rgba(66, 133, 244, 0.5)' : 'none'}\n style:outline-offset=\"-1px\"\n style:box-sizing=\"border-box\"\n style:pointer-events=\"auto\"\n style:cursor={isSelected ? 'move' : 'pointer'}\n style:display=\"flex\"\n style:align-items={isMultiline ? 'flex-start' : 'center'}\n style:overflow=\"hidden\"\n style:padding={!isComb ? `${borderWidth}px ${borderWidth}px` : undefined}\n>\n {#if isComb && maxLen}\n <div style=\"position: relative; width: 100%; height: 100%;\">\n {#each Array.from({ length: maxLen }) as _, i}\n <span\n style:position=\"absolute\"\n style:top=\"0\"\n style:left=\"{i * cellWidth}px\"\n style:width=\"{cellWidth}px\"\n style:height=\"100%\"\n style:display=\"flex\"\n style:align-items=\"center\"\n style:justify-content=\"center\"\n style:border-right={i < maxLen - 1\n ? `1px solid ${object.strokeColor ?? 'rgba(0, 0, 0, 0.2)'}`\n : 'none'}\n style:box-sizing=\"border-box\"\n style:font-size=\"{fontSize}px\"\n style:font-family={fontCss.fontFamily}\n style:font-weight={fontCss.fontWeight}\n style:font-style={fontCss.fontStyle}\n style:color={fontColor}\n style:line-height=\"1.2\">{chars[i] || ''}</span\n >\n {/each}\n </div>\n {:else}\n <span\n style:font-size=\"{fontSize}px\"\n style:font-family={fontCss.fontFamily}\n style:font-weight={fontCss.fontWeight}\n style:font-style={fontCss.fontStyle}\n style:color={fontColor}\n style:line-height=\"1.2\"\n style:display=\"block\"\n style:width=\"100%\"\n style:white-space={isMultiline ? 'pre-wrap' : 'nowrap'}\n style:word-break={isMultiline ? 'break-word' : 'normal'}\n style:overflow-wrap={isMultiline ? 'break-word' : 'normal'}\n style:overflow=\"hidden\"\n style:text-overflow={isMultiline ? 'clip' : 'ellipsis'}>{value}</span\n >\n {/if}\n</div>\n","<script lang=\"ts\">\n import type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\n import type { PdfWidgetAnnoObject } from '@embedpdf/models';\n import { isWidgetChecked } from '@embedpdf/models';\n\n let {\n annotation,\n currentObject,\n isSelected,\n scale,\n onClick,\n }: AnnotationRendererProps<PdfWidgetAnnoObject> = $props();\n\n let isHovered = $state(false);\n\n const object = $derived(currentObject);\n const isChecked = $derived(isWidgetChecked(object));\n const borderWidth = $derived((object.strokeWidth ?? 1) * scale);\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n onpointerdown={(e) => {\n if (!isSelected) onClick?.(e);\n }}\n onmouseenter={() => (isHovered = true)}\n onmouseleave={() => (isHovered = false)}\n style:position=\"absolute\"\n style:inset=\"0\"\n style:background={object.color ?? '#FFFFFF'}\n style:border=\"{borderWidth}px solid {object.strokeColor ?? '#000000'}\"\n style:outline={isHovered || isSelected ? '1px solid rgba(66, 133, 244, 0.5)' : 'none'}\n style:outline-offset=\"-1px\"\n style:box-sizing=\"border-box\"\n style:pointer-events=\"auto\"\n style:cursor={isSelected ? 'move' : 'pointer'}\n style:display=\"flex\"\n style:align-items=\"center\"\n style:justify-content=\"center\"\n>\n {#if isChecked}\n <svg viewBox=\"0 0 100 100\" style=\"width: 100%; height: 100%;\">\n <path\n d=\"M28 48C27.45 50.21 29.45 63.13 30 67C30.55 69.21 34.58 72 39 72C44.52 71.45 76.55 32.55 76 32C77.1 31.45 76 25 76 25C74.34 22.24 68 25.45 68 26C68 26 43.55 53 43 53C41.34 53 40.55 41.1 40 40C33.37 36.69 29.1 45.79 28 48Z\"\n fill=\"#000000\"\n />\n </svg>\n {/if}\n</div>\n","<script lang=\"ts\">\n import type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\n import type { PdfWidgetAnnoObject } from '@embedpdf/models';\n import { isWidgetChecked } from '@embedpdf/models';\n\n let {\n annotation,\n currentObject,\n isSelected,\n scale,\n onClick,\n }: AnnotationRendererProps<PdfWidgetAnnoObject> = $props();\n\n let isHovered = $state(false);\n\n const object = $derived(currentObject);\n const isChecked = $derived(isWidgetChecked(object));\n const borderWidth = $derived((object.strokeWidth ?? 1) * scale);\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n onpointerdown={(e) => {\n if (!isSelected) onClick?.(e);\n }}\n onmouseenter={() => (isHovered = true)}\n onmouseleave={() => (isHovered = false)}\n style:position=\"absolute\"\n style:inset=\"0\"\n style:background={object.color ?? '#FFFFFF'}\n style:border=\"{borderWidth}px solid {object.strokeColor ?? '#000000'}\"\n style:border-radius=\"50%\"\n style:outline={isHovered || isSelected ? '1px solid rgba(66, 133, 244, 0.5)' : 'none'}\n style:outline-offset=\"-1px\"\n style:box-sizing=\"border-box\"\n style:pointer-events=\"auto\"\n style:cursor={isSelected ? 'move' : 'pointer'}\n style:display=\"flex\"\n style:align-items=\"center\"\n style:justify-content=\"center\"\n>\n {#if isChecked}\n <div\n style:width=\"50%\"\n style:height=\"50%\"\n style:border-radius=\"50%\"\n style:background=\"#000000\"\n ></div>\n {/if}\n</div>\n","<script lang=\"ts\">\n import type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\n import type { PdfWidgetAnnoObject } from '@embedpdf/models';\n import { PDF_FORM_FIELD_TYPE, standardFontCssProperties } from '@embedpdf/models';\n\n let {\n annotation,\n currentObject,\n isSelected,\n scale,\n onClick,\n }: AnnotationRendererProps<PdfWidgetAnnoObject> = $props();\n\n let isHovered = $state(false);\n\n const object = $derived(currentObject);\n const field = $derived(object.field);\n const options = $derived(field.type === PDF_FORM_FIELD_TYPE.COMBOBOX ? field.options : []);\n const selectedLabel = $derived(options.find((o) => o.isSelected)?.label ?? '');\n const borderWidth = $derived((object.strokeWidth ?? 1) * scale);\n const fontSize = $derived((object.fontSize ?? 12) * scale);\n const fontCss = $derived(standardFontCssProperties(object.fontFamily));\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n onpointerdown={(e) => {\n if (!isSelected) onClick?.(e);\n }}\n onmouseenter={() => (isHovered = true)}\n onmouseleave={() => (isHovered = false)}\n style:position=\"absolute\"\n style:inset=\"0\"\n style:background={object.color ?? '#FFFFFF'}\n style:border=\"{borderWidth}px solid {object.strokeColor ?? '#000000'}\"\n style:outline={isHovered || isSelected ? '1px solid rgba(66, 133, 244, 0.5)' : 'none'}\n style:outline-offset=\"-1px\"\n style:box-sizing=\"border-box\"\n style:pointer-events=\"auto\"\n style:cursor={isSelected ? 'move' : 'pointer'}\n style:display=\"flex\"\n style:align-items=\"center\"\n style:overflow=\"hidden\"\n>\n <span\n style:flex=\"1\"\n style:padding=\"0 {4 * scale}px\"\n style:font-size=\"{fontSize}px\"\n style:font-family={fontCss.fontFamily}\n style:font-weight={fontCss.fontWeight}\n style:font-style={fontCss.fontStyle}\n style:color={object.fontColor ?? '#000000'}\n style:white-space=\"nowrap\"\n style:overflow=\"hidden\"\n style:text-overflow=\"ellipsis\">{selectedLabel}</span\n >\n <div\n style:width=\"{13 * scale}px\"\n style:min-width=\"{13 * scale}px\"\n style:height=\"100%\"\n style:display=\"flex\"\n style:align-items=\"center\"\n style:justify-content=\"center\"\n style:border-left=\"1px solid {object.strokeColor ?? '#000000'}\"\n >\n <svg\n viewBox=\"0 0 10 6\"\n style=\"width: {8 * scale}px; height: {5 * scale}px;\"\n fill=\"currentColor\"\n >\n <path d=\"M0 0 L5 6 L10 0 Z\" />\n </svg>\n </div>\n</div>\n","<script lang=\"ts\">\n import type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\n import type { PdfWidgetAnnoObject } from '@embedpdf/models';\n import { PDF_FORM_FIELD_TYPE, standardFontCssProperties } from '@embedpdf/models';\n\n let {\n annotation,\n currentObject,\n isSelected,\n scale,\n onClick,\n }: AnnotationRendererProps<PdfWidgetAnnoObject> = $props();\n\n let isHovered = $state(false);\n\n const object = $derived(currentObject);\n const field = $derived(object.field);\n const options = $derived(field.type === PDF_FORM_FIELD_TYPE.LISTBOX ? field.options : []);\n const borderWidth = $derived((object.strokeWidth ?? 1) * scale);\n const fontSize = $derived((object.fontSize ?? 12) * scale);\n const lineHeight = $derived(fontSize * 1.2);\n const fontCss = $derived(standardFontCssProperties(object.fontFamily));\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n onpointerdown={(e) => {\n if (!isSelected) onClick?.(e);\n }}\n onmouseenter={() => (isHovered = true)}\n onmouseleave={() => (isHovered = false)}\n style:position=\"absolute\"\n style:inset=\"0\"\n style:background={object.color ?? '#FFFFFF'}\n style:border=\"{borderWidth}px solid {object.strokeColor ?? '#000000'}\"\n style:outline={isHovered || isSelected ? '1px solid rgba(66, 133, 244, 0.5)' : 'none'}\n style:outline-offset=\"-1px\"\n style:box-sizing=\"border-box\"\n style:pointer-events=\"auto\"\n style:cursor={isSelected ? 'move' : 'pointer'}\n style:overflow=\"hidden\"\n style:display=\"flex\"\n style:flex-direction=\"column\"\n>\n {#each options as opt}\n <div\n style:padding=\"0 {4 * scale}px\"\n style:font-size=\"{fontSize}px\"\n style:line-height=\"{lineHeight}px\"\n style:font-family={fontCss.fontFamily}\n style:font-weight={fontCss.fontWeight}\n style:font-style={fontCss.fontStyle}\n style:color={opt.isSelected ? '#FFFFFF' : (object.fontColor ?? '#000000')}\n style:background={opt.isSelected ? 'rgba(0, 51, 113, 1)' : 'transparent'}\n style:white-space=\"nowrap\"\n style:overflow=\"hidden\"\n style:text-overflow=\"ellipsis\"\n >\n {opt.label}\n </div>\n {/each}\n</div>\n","import { useCapability, usePlugin } from '@embedpdf/core/svelte';\nimport { FormPlugin, FormDocumentState, initialDocumentState } from '@embedpdf/plugin-form';\n\nexport const useFormPlugin = () => usePlugin<FormPlugin>(FormPlugin.id);\nexport const useFormCapability = () => useCapability<FormPlugin>(FormPlugin.id);\n\nexport const useFormDocumentState = (getDocumentId: () => string) => {\n const formCapability = useFormCapability();\n let state = $state<FormDocumentState>({ ...initialDocumentState });\n const documentId = $derived(getDocumentId());\n\n $effect(() => {\n if (!formCapability.provides || !documentId) {\n state = { ...initialDocumentState };\n return;\n }\n\n const scope = formCapability.provides.forDocument(documentId);\n state = scope.getState();\n\n return scope.onStateChange((newState) => {\n state = newState;\n });\n });\n\n return {\n get state() {\n return state;\n },\n };\n};\n","import { PDF_FORM_FIELD_FLAG, PdfWidgetAnnoField, PdfWidgetAnnoObject } from '@embedpdf/models';\nimport type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\nimport { deepToRaw } from '@embedpdf/utils/svelte';\nimport { useFormCapability } from './use-form.svelte';\n\nexport function useFormWidgetState(props: AnnotationRendererProps<PdfWidgetAnnoObject>) {\n const formCapability = useFormCapability();\n let renderKey = $state(0);\n\n const scope = $derived(formCapability.provides?.forDocument(props.documentId) ?? null);\n const annotation = $derived(props.currentObject);\n const field = $derived(annotation.field);\n const scale = $derived(props.scale);\n const pageIndex = $derived(props.pageIndex);\n const isReadOnly = $derived(!!(field.flag & PDF_FORM_FIELD_FLAG.READONLY));\n\n $effect(() => {\n if (!scope) return;\n const id = annotation.id;\n return scope.onFieldValueChange((event) => {\n if (event.annotationId === id) {\n renderKey++;\n }\n });\n });\n\n function handleChangeField(newField: PdfWidgetAnnoField) {\n if (!scope) return;\n scope.setFormFieldValues(pageIndex, deepToRaw(annotation), deepToRaw(newField));\n }\n\n return {\n get annotation() {\n return annotation;\n },\n get field() {\n return field;\n },\n get scale() {\n return scale;\n },\n get pageIndex() {\n return pageIndex;\n },\n get scope() {\n return scope;\n },\n handleChangeField,\n get renderKey() {\n return renderKey;\n },\n get isReadOnly() {\n return isReadOnly;\n },\n };\n}\n","<script lang=\"ts\">\n import type { PdfWidgetAnnoObject } from '@embedpdf/models';\n import { ignore, PdfErrorCode } from '@embedpdf/models';\n import { useFormCapability } from '../hooks/use-form.svelte';\n import { deepToRaw } from '@embedpdf/utils/svelte';\n\n interface RenderWidgetProps {\n pageIndex: number;\n annotation: PdfWidgetAnnoObject;\n scaleFactor?: number;\n renderKey?: number;\n style?: string;\n }\n\n let {\n pageIndex,\n annotation,\n scaleFactor = 1,\n renderKey = 0,\n style = '',\n }: RenderWidgetProps = $props();\n\n const formCapability = useFormCapability();\n let imageUrl = $state<string | null>(null);\n let prevUrl: string | null = null;\n\n $effect(() => {\n if (!formCapability.provides) return;\n\n const { width, height } = annotation.rect.size;\n const id = annotation.id;\n const sf = scaleFactor;\n const rk = renderKey;\n const pi = pageIndex;\n\n const task = formCapability.provides.renderWidget({\n pageIndex: pi,\n annotation: deepToRaw(annotation),\n options: {\n scaleFactor: sf,\n dpr: window.devicePixelRatio,\n },\n });\n\n task.wait((blob) => {\n const url = URL.createObjectURL(blob);\n if (prevUrl) {\n URL.revokeObjectURL(prevUrl);\n }\n prevUrl = url;\n imageUrl = url;\n }, ignore);\n\n return () => {\n task.abort({\n code: PdfErrorCode.Cancelled,\n message: 'canceled render task',\n });\n if (prevUrl) {\n URL.revokeObjectURL(prevUrl);\n prevUrl = null;\n }\n };\n });\n</script>\n\n{#if imageUrl}\n <img src={imageUrl} alt=\"\" style=\"width: 100%; height: 100%; display: block; {style}\" />\n{/if}\n","<script lang=\"ts\">\n import { PDF_FORM_FIELD_FLAG, standardFontCssProperties } from '@embedpdf/models';\n import type { TextFieldProps } from '../../../shared/components/types';\n import { useIOSZoomPrevention } from '@embedpdf/plugin-annotation/svelte';\n\n let {\n annotation,\n scale,\n isEditable,\n onChangeField,\n onFocus,\n onBlur,\n inputRef,\n syncExternalValue = true,\n }: TextFieldProps = $props();\n\n const field = $derived(annotation.field);\n const flag = $derived(field.flag);\n const name = $derived(field.name);\n const value = $derived(field.value);\n\n let localValue = $state(value);\n\n $effect(() => {\n if (!syncExternalValue) return;\n localValue = value;\n });\n\n function changeValue(evt: Event) {\n const newValue = (evt.target as HTMLInputElement).value;\n localValue = newValue;\n onChangeField?.({ ...field, value: newValue });\n }\n\n const bw = $derived((annotation.strokeWidth ?? 0) * scale);\n const fontCss = $derived(standardFontCssProperties(annotation.fontFamily));\n const computedFontPx = $derived(annotation.fontSize * scale);\n\n const ios = useIOSZoomPrevention(\n () => computedFontPx,\n () => true,\n );\n\n const isDisabled = $derived(!isEditable || !!(flag & PDF_FORM_FIELD_FLAG.READONLY));\n const isRequired = $derived(!!(flag & PDF_FORM_FIELD_FLAG.REQUIRED));\n const isPassword = $derived(!!(flag & PDF_FORM_FIELD_FLAG.TEXT_PASSWORD));\n const isMultipleLine = $derived(!!(flag & PDF_FORM_FIELD_FLAG.TEXT_MULTIPLINE));\n const isComb = $derived(!!(flag & PDF_FORM_FIELD_FLAG.TEXT_COMB));\n const maxLen = $derived(field.maxLen);\n\n const cellWidth = $derived(isComb && maxLen ? (annotation.rect.size.width * scale) / maxLen : 0);\n const chars = $derived((localValue || '').split(''));\n const caretIndex = $derived(chars.length);\n\n let caretVisible = $state(true);\n let caretInterval: ReturnType<typeof setInterval> | undefined;\n\n $effect(() => {\n const _ci = caretIndex;\n caretVisible = true;\n clearInterval(caretInterval);\n caretInterval = setInterval(() => {\n caretVisible = !caretVisible;\n }, 530);\n return () => clearInterval(caretInterval);\n });\n\n function refAction(node: HTMLElement) {\n inputRef?.(node);\n return { destroy: () => inputRef?.(null) };\n }\n</script>\n\n{#snippet combContent()}\n <div\n style:position=\"relative\"\n style:width=\"100%\"\n style:height=\"100%\"\n style:border-radius=\"0\"\n style:box-sizing=\"border-box\"\n style:border-style=\"solid\"\n style:background-color={annotation.color ?? 'transparent'}\n style:border-color={annotation.strokeColor ?? 'transparent'}\n style:border-width=\"{bw}px\"\n >\n <input\n use:refAction\n required={isRequired}\n disabled={isDisabled}\n type={isPassword ? 'password' : 'text'}\n {name}\n aria-label={name}\n value={localValue}\n maxlength={maxLen}\n onfocus={onFocus}\n oninput={changeValue}\n onblur={onBlur}\n style:position=\"absolute\"\n style:top=\"0\"\n style:left=\"0\"\n style:width=\"100%\"\n style:height=\"100%\"\n style:opacity=\"0\"\n style:padding=\"0\"\n style:margin=\"0\"\n style:border=\"none\"\n style:z-index=\"1\"\n />\n {#each Array.from({ length: maxLen }) as _, i}\n <span\n style:position=\"absolute\"\n style:top=\"0\"\n style:height=\"100%\"\n style:display=\"flex\"\n style:align-items=\"center\"\n style:justify-content=\"center\"\n style:pointer-events=\"none\"\n style:left=\"{i * cellWidth}px\"\n style:width=\"{cellWidth}px\"\n style:color={annotation.fontColor}\n style:font-family={fontCss.fontFamily}\n style:font-weight={fontCss.fontWeight}\n style:font-style={fontCss.fontStyle}\n style:font-size=\"{ios.adjustedFontPx}px\">{chars[i] || ''}</span\n >\n {/each}\n {#if caretIndex < maxLen}\n <span\n style:position=\"absolute\"\n style:top=\"15%\"\n style:height=\"70%\"\n style:width=\"1px\"\n style:background-color=\"black\"\n style:pointer-events=\"none\"\n style:left=\"{caretIndex * cellWidth + cellWidth / 2}px\"\n style:opacity={caretVisible ? 1 : 0}\n ></span>\n {/if}\n </div>\n{/snippet}\n\n{#snippet textareaContent()}\n <textarea\n use:refAction\n required={isRequired}\n disabled={isDisabled}\n {name}\n aria-label={name}\n value={localValue}\n maxlength={maxLen}\n onfocus={onFocus}\n oninput={changeValue}\n onblur={onBlur}\n style:background-color={annotation.color ?? 'transparent'}\n style:border-color={annotation.strokeColor ?? 'transparent'}\n style:border-width=\"{bw}px\"\n style:color={annotation.fontColor}\n style:font-family={fontCss.fontFamily}\n style:font-weight={fontCss.fontWeight}\n style:font-style={fontCss.fontStyle}\n style:font-size=\"{ios.adjustedFontPx}px\"\n style:padding=\"{bw}px\"\n style:position=\"absolute\"\n style:top=\"0\"\n style:left=\"0\"\n style:width=\"100%\"\n style:height=\"100%\"\n style:margin=\"0\"\n style:border-radius=\"0\"\n style:outline=\"none\"\n style:box-sizing=\"border-box\"\n style:border-style=\"solid\"\n style:resize=\"none\"\n style:line-height=\"1.14\"\n ></textarea>\n{/snippet}\n\n{#snippet inputContent()}\n <input\n use:refAction\n required={isRequired}\n disabled={isDisabled}\n type={isPassword ? 'password' : 'text'}\n {name}\n aria-label={name}\n value={localValue}\n maxlength={maxLen}\n onfocus={onFocus}\n oninput={changeValue}\n onblur={onBlur}\n style:background-color={annotation.color ?? 'transparent'}\n style:border-color={annotation.strokeColor ?? 'transparent'}\n style:border-width=\"{bw}px\"\n style:color={annotation.fontColor}\n style:font-family={fontCss.fontFamily}\n style:font-weight={fontCss.fontWeight}\n style:font-style={fontCss.fontStyle}\n style:font-size=\"{ios.adjustedFontPx}px\"\n style:padding=\"{bw}px\"\n style:position=\"absolute\"\n style:top=\"0\"\n style:left=\"0\"\n style:width=\"100%\"\n style:height=\"100%\"\n style:margin=\"0\"\n style:border-radius=\"0\"\n style:outline=\"none\"\n style:box-sizing=\"border-box\"\n style:border-style=\"solid\"\n />\n{/snippet}\n\n{#if isComb && maxLen}\n {#if ios.wrapperStyle}\n <div style={ios.wrapperStyle}>\n {@render combContent()}\n </div>\n {:else}\n {@render combContent()}\n {/if}\n{:else if isMultipleLine}\n {#if ios.wrapperStyle}\n <div style={ios.wrapperStyle}>\n {@render textareaContent()}\n </div>\n {:else}\n {@render textareaContent()}\n {/if}\n{:else if ios.wrapperStyle}\n <div style={ios.wrapperStyle}>\n {@render inputContent()}\n </div>\n{:else}\n {@render inputContent()}\n{/if}\n","<script lang=\"ts\">\n import type { PdfWidgetAnnoObject } from '@embedpdf/models';\n import type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\n import { useFormWidgetState } from '../../hooks/use-form-widget-state.svelte';\n import { useFormDocumentState } from '../../hooks/use-form.svelte';\n import RenderWidget from '../RenderWidget.svelte';\n import TextField from '../fields/TextField.svelte';\n import type { TextFieldProps } from '../../../shared/components/types';\n\n let props: AnnotationRendererProps<PdfWidgetAnnoObject> = $props();\n const widgetState = useFormWidgetState(props);\n const formDocState = useFormDocumentState(() => props.documentId);\n\n let editing = $state(false);\n let inputEl: HTMLElement | null = null;\n\n const isFocused = $derived(formDocState.state.selectedFieldId === widgetState.annotation.id);\n\n $effect(() => {\n if (isFocused && inputEl && document.activeElement !== inputEl) {\n inputEl.focus();\n }\n });\n\n function handleFocus() {\n if (widgetState.isReadOnly) return;\n widgetState.scope?.selectField(widgetState.annotation.id);\n editing = true;\n }\n\n function handleBlur() {\n editing = false;\n if (widgetState.scope?.getSelectedFieldId() === widgetState.annotation.id) {\n widgetState.scope?.deselectField();\n }\n }\n\n function handleInputRef(el: HTMLElement | null) {\n inputEl = el;\n }\n</script>\n\n<div\n style=\"width: 100%; height: 100%; overflow: hidden; position: relative; pointer-events: auto; outline: none;\"\n>\n <RenderWidget\n pageIndex={widgetState.pageIndex}\n annotation={widgetState.annotation}\n scaleFactor={widgetState.scale}\n renderKey={widgetState.renderKey}\n style=\"position: absolute; inset: 0; pointer-events: none; visibility: {editing\n ? 'hidden'\n : 'visible'};\"\n />\n <div style=\"position: absolute; inset: 0; z-index: 1; opacity: {editing ? 1 : 0};\">\n <TextField\n annotation={widgetState.annotation as TextFieldProps['annotation']}\n scale={widgetState.scale}\n pageIndex={widgetState.pageIndex}\n isEditable={true}\n onChangeField={widgetState.handleChangeField}\n syncExternalValue={!editing}\n onFocus={handleFocus}\n onBlur={handleBlur}\n inputRef={handleInputRef}\n />\n </div>\n</div>\n","<script lang=\"ts\">\n import type { PdfWidgetAnnoObject } from '@embedpdf/models';\n import { isWidgetChecked } from '@embedpdf/models';\n import type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\n import { useFormWidgetState } from '../../hooks/use-form-widget-state.svelte';\n import { useFormDocumentState } from '../../hooks/use-form.svelte';\n import RenderWidget from '../RenderWidget.svelte';\n\n let props: AnnotationRendererProps<PdfWidgetAnnoObject> = $props();\n const widgetState = useFormWidgetState(props);\n const formDocState = useFormDocumentState(() => props.documentId);\n\n let wrapperEl: HTMLDivElement;\n\n const isFocused = $derived(formDocState.state.selectedFieldId === widgetState.annotation.id);\n\n $effect(() => {\n if (isFocused && wrapperEl && document.activeElement !== wrapperEl) {\n wrapperEl.focus();\n }\n });\n\n function toggle() {\n if (widgetState.isReadOnly) return;\n const checked = isWidgetChecked(widgetState.annotation);\n const newValue = checked ? 'Off' : (widgetState.annotation.exportValue ?? 'Yes');\n widgetState.handleChangeField({ ...widgetState.field, value: newValue });\n }\n\n function handleClick() {\n if (widgetState.isReadOnly) return;\n widgetState.scope?.selectField(widgetState.annotation.id);\n toggle();\n }\n\n function handleFocus() {\n if (widgetState.isReadOnly) return;\n widgetState.scope?.selectField(widgetState.annotation.id);\n }\n\n function handleBlur() {\n if (widgetState.scope?.getSelectedFieldId() === widgetState.annotation.id) {\n widgetState.scope?.deselectField();\n }\n }\n\n function handleKeyDown(e: KeyboardEvent) {\n if (e.key === ' ' || e.key === 'Enter') {\n e.preventDefault();\n toggle();\n }\n }\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n bind:this={wrapperEl}\n tabindex={widgetState.isReadOnly ? -1 : 0}\n onclick={handleClick}\n onfocus={handleFocus}\n onblur={handleBlur}\n onkeydown={handleKeyDown}\n style=\"width: 100%; height: 100%; overflow: hidden; cursor: {widgetState.isReadOnly\n ? 'default'\n : 'pointer'}; pointer-events: auto; outline: {isFocused\n ? '2px solid rgba(66, 133, 244, 0.8)'\n : 'none'}; outline-offset: -2px;\"\n>\n <RenderWidget\n pageIndex={widgetState.pageIndex}\n annotation={widgetState.annotation}\n scaleFactor={widgetState.scale}\n renderKey={widgetState.renderKey}\n style=\"pointer-events: none;\"\n />\n</div>\n","<script lang=\"ts\">\n import type { PdfWidgetAnnoObject } from '@embedpdf/models';\n import { isWidgetChecked } from '@embedpdf/models';\n import type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\n import { useFormWidgetState } from '../../hooks/use-form-widget-state.svelte';\n import { useFormDocumentState } from '../../hooks/use-form.svelte';\n import RenderWidget from '../RenderWidget.svelte';\n\n let props: AnnotationRendererProps<PdfWidgetAnnoObject> = $props();\n const widgetState = useFormWidgetState(props);\n const formDocState = useFormDocumentState(() => props.documentId);\n\n let wrapperEl: HTMLDivElement;\n\n const isFocused = $derived(formDocState.state.selectedFieldId === widgetState.annotation.id);\n\n $effect(() => {\n if (isFocused && wrapperEl && document.activeElement !== wrapperEl) {\n wrapperEl.focus();\n }\n });\n\n function selectRadio() {\n if (widgetState.isReadOnly) return;\n if (!isWidgetChecked(widgetState.annotation) && widgetState.annotation.exportValue) {\n widgetState.handleChangeField({\n ...widgetState.field,\n value: widgetState.annotation.exportValue,\n });\n }\n }\n\n function handleClick() {\n if (widgetState.isReadOnly) return;\n widgetState.scope?.selectField(widgetState.annotation.id);\n selectRadio();\n }\n\n function handleFocus() {\n if (widgetState.isReadOnly) return;\n widgetState.scope?.selectField(widgetState.annotation.id);\n }\n\n function handleBlur() {\n if (widgetState.scope?.getSelectedFieldId() === widgetState.annotation.id) {\n widgetState.scope?.deselectField();\n }\n }\n\n function handleKeyDown(e: KeyboardEvent) {\n if (e.key === ' ' || e.key === 'Enter') {\n e.preventDefault();\n selectRadio();\n }\n }\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n bind:this={wrapperEl}\n tabindex={widgetState.isReadOnly ? -1 : 0}\n onclick={handleClick}\n onfocus={handleFocus}\n onblur={handleBlur}\n onkeydown={handleKeyDown}\n style=\"width: 100%; height: 100%; overflow: hidden; cursor: {widgetState.isReadOnly\n ? 'default'\n : 'pointer'}; pointer-events: auto; outline: {isFocused\n ? '2px solid rgba(66, 133, 244, 0.8)'\n : 'none'}; outline-offset: -2px;\"\n>\n <RenderWidget\n pageIndex={widgetState.pageIndex}\n annotation={widgetState.annotation}\n scaleFactor={widgetState.scale}\n renderKey={widgetState.renderKey}\n style=\"pointer-events: none;\"\n />\n</div>\n","<script lang=\"ts\">\n import { PDF_FORM_FIELD_FLAG } from '@embedpdf/models';\n import type { ComboboxFieldProps } from '../../../shared/components/types';\n\n let { annotation, isEditable, onChangeField, onFocus, onBlur, inputRef }: ComboboxFieldProps =\n $props();\n\n const field = $derived(annotation.field);\n const flag = $derived(field.flag);\n const options = $derived(field.options);\n const name = $derived(field.alternateName || field.name);\n const isDisabled = $derived(!isEditable || !!(flag & PDF_FORM_FIELD_FLAG.READONLY));\n const isRequired = $derived(!!(flag & PDF_FORM_FIELD_FLAG.REQUIRED));\n const selectedValue = $derived(options.find((o) => o.isSelected)?.label ?? '');\n\n function handleChange(evt: Event) {\n const select = evt.target as HTMLSelectElement;\n const updatedOptions = options.map((opt, i) => ({\n ...opt,\n isSelected: i === select.selectedIndex,\n }));\n onChangeField?.({ ...field, options: updatedOptions });\n }\n\n function refAction(node: HTMLElement) {\n inputRef?.(node);\n return { destroy: () => inputRef?.(null) };\n }\n</script>\n\n<select\n use:refAction\n required={isRequired}\n disabled={isDisabled}\n value={selectedValue}\n {name}\n aria-label={name}\n onfocus={onFocus}\n onchange={handleChange}\n onblur={onBlur}\n style:position=\"absolute\"\n style:inset=\"0\"\n style:display=\"block\"\n style:z-index=\"1\"\n style:width=\"100%\"\n style:height=\"100%\"\n style:min-width=\"100%\"\n style:min-height=\"100%\"\n style:padding=\"0\"\n style:margin=\"0\"\n style:border=\"0\"\n style:border-radius=\"0\"\n style:background=\"transparent\"\n style:outline=\"none\"\n style:box-sizing=\"border-box\"\n style:appearance=\"none\"\n style:-webkit-appearance=\"none\"\n style:pointer-events=\"auto\"\n style:cursor=\"inherit\"\n style:opacity=\"0\"\n>\n {#each options as option}\n <option value={option.label}>\n {option.label}\n </option>\n {/each}\n</select>\n","<script lang=\"ts\">\n import type { PdfWidgetAnnoObject } from '@embedpdf/models';\n import type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\n import { useFormWidgetState } from '../../hooks/use-form-widget-state.svelte';\n import { useFormDocumentState } from '../../hooks/use-form.svelte';\n import RenderWidget from '../RenderWidget.svelte';\n import ComboboxField from '../fields/ComboboxField.svelte';\n import type { ComboboxFieldProps } from '../../../shared/components/types';\n\n let props: AnnotationRendererProps<PdfWidgetAnnoObject> = $props();\n const widgetState = useFormWidgetState(props);\n const formDocState = useFormDocumentState(() => props.documentId);\n const comboboxAnnotation = $derived(widgetState.annotation as ComboboxFieldProps['annotation']);\n\n let wrapperEl: HTMLDivElement;\n let selectEl: HTMLElement | null = null;\n\n const isFocused = $derived(formDocState.state.selectedFieldId === widgetState.annotation.id);\n\n $effect(() => {\n if (isFocused && selectEl && document.activeElement !== selectEl) {\n selectEl.focus();\n }\n });\n\n function handleFocus() {\n if (widgetState.isReadOnly) return;\n widgetState.scope?.selectField(widgetState.annotation.id);\n }\n\n function handleBlur() {\n requestAnimationFrame(() => {\n if (wrapperEl?.contains(document.activeElement)) return;\n if (widgetState.scope?.getSelectedFieldId() === widgetState.annotation.id) {\n widgetState.scope?.deselectField();\n }\n });\n }\n\n function selectInputRef(el: HTMLElement | null) {\n selectEl = el;\n }\n</script>\n\n<div\n bind:this={wrapperEl}\n style=\"width: 100%; height: 100%; overflow: hidden; position: relative; cursor: {widgetState.isReadOnly\n ? 'default'\n : 'pointer'}; pointer-events: auto; outline: {isFocused\n ? '2px solid rgba(66, 133, 244, 0.8)'\n : 'none'}; outline-offset: -2px;\"\n>\n <RenderWidget\n pageIndex={widgetState.pageIndex}\n annotation={widgetState.annotation}\n scaleFactor={widgetState.scale}\n renderKey={widgetState.renderKey}\n style=\"position: absolute; inset: 0; pointer-events: none;\"\n />\n <ComboboxField\n annotation={comboboxAnnotation}\n scale={widgetState.scale}\n pageIndex={widgetState.pageIndex}\n isEditable={true}\n onChangeField={widgetState.handleChangeField}\n onFocus={handleFocus}\n onBlur={handleBlur}\n inputRef={selectInputRef}\n />\n</div>\n","<script lang=\"ts\">\n import { PDF_FORM_FIELD_FLAG, standardFontCssProperties } from '@embedpdf/models';\n import type { ListboxFieldProps } from '../../../shared/components/types';\n\n let { annotation, scale, isEditable, onChangeField, onBlur, inputRef }: ListboxFieldProps =\n $props();\n\n const field = $derived(annotation.field);\n const flag = $derived(field.flag);\n const options = $derived(field.options);\n const isDisabled = $derived(!isEditable || !!(flag & PDF_FORM_FIELD_FLAG.READONLY));\n const isMultipleChoice = $derived(!!(flag & PDF_FORM_FIELD_FLAG.CHOICE_MULTL_SELECT));\n\n const bw = $derived((annotation.strokeWidth ?? 0) * scale);\n const fontSize = $derived((annotation.fontSize ?? 12) * scale);\n const lineHeight = $derived(fontSize * 1.2);\n const fontCss = $derived(standardFontCssProperties(annotation.fontFamily));\n\n function handleOptionClick(clickedIndex: number) {\n if (isDisabled) return;\n const updatedOptions = options.map((opt, i) => ({\n ...opt,\n isSelected: isMultipleChoice\n ? i === clickedIndex\n ? !opt.isSelected\n : opt.isSelected\n : i === clickedIndex,\n }));\n onChangeField?.({ ...field, options: updatedOptions });\n }\n\n function refAction(node: HTMLElement) {\n inputRef?.(node);\n return { destroy: () => inputRef?.(null) };\n }\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n use:refAction\n onblur={onBlur}\n style:position=\"absolute\"\n style:top=\"0\"\n style:left=\"0\"\n style:width=\"100%\"\n style:height=\"100%\"\n style:background={annotation.color ?? '#FFFFFF'}\n style:border-style=\"solid\"\n style:border-color={annotation.strokeColor ?? '#000000'}\n style:border-width=\"{bw}px\"\n style:box-sizing=\"border-box\"\n style:overflow=\"auto\"\n style:display=\"flex\"\n style:flex-direction=\"column\"\n style:outline=\"none\"\n>\n {#each options as opt, i}\n <!-- svelte-ignore a11y_click_events_have_key_events -->\n <div\n role=\"option\"\n aria-selected={opt.isSelected}\n onclick={() => handleOptionClick(i)}\n style:padding=\"0 {4 * scale}px\"\n style:font-size=\"{fontSize}px\"\n style:line-height=\"{lineHeight}px\"\n style:font-family={fontCss.fontFamily}\n style:font-weight={fontCss.fontWeight}\n style:font-style={fontCss.fontStyle}\n style:color={opt.isSelected ? '#FFFFFF' : (annotation.fontColor ?? '#000000')}\n style:background={opt.isSelected ? 'rgba(0, 51, 113, 1)' : 'transparent'}\n style:white-space=\"nowrap\"\n style:overflow=\"hidden\"\n style:text-overflow=\"ellipsis\"\n style:cursor={isDisabled ? 'default' : 'pointer'}\n >\n {opt.label}\n </div>\n {/each}\n</div>\n","<script lang=\"ts\">\n import type { PdfWidgetAnnoObject } from '@embedpdf/models';\n import type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';\n import { useFormWidgetState } from '../../hooks/use-form-widget-state.svelte';\n import { useFormDocumentState } from '../../hooks/use-form.svelte';\n import RenderWidget from '../RenderWidget.svelte';\n import ListboxField from '../fields/ListboxField.svelte';\n import type { ListboxFieldProps } from '../../../shared/components/types';\n\n let props: AnnotationRendererProps<PdfWidgetAnnoObject> = $props();\n const widgetState = useFormWidgetState(props);\n const formDocState = useFormDocumentState(() => props.documentId);\n\n let editing = $state(false);\n let wrapperEl: HTMLDivElement;\n\n const isFocused = $derived(formDocState.state.selectedFieldId === widgetState.annotation.id);\n\n $effect(() => {\n if (isFocused && wrapperEl && !wrapperEl.contains(document.activeElement)) {\n wrapperEl.focus();\n }\n });\n\n function handleFocus() {\n if (widgetState.isReadOnly) return;\n widgetState.scope?.selectField(widgetState.annotation.id);\n editing = true;\n }\n\n function handleBlur() {\n requestAnimationFrame(() => {\n if (wrapperEl?.contains(document.activeElement)) return;\n editing = false;\n if (widgetState.scope?.getSelectedFieldId() === widgetState.annotation.id) {\n widgetState.scope?.deselectField();\n }\n });\n }\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div\n bind:this={wrapperEl}\n tabindex={widgetState.isReadOnly ? -1 : 0}\n onfocus={handleFocus}\n onblur={handleBlur}\n style=\"width: 100%; height: 100%; overflow: hidden; cursor: {widgetState.isReadOnly\n ? 'default'\n : 'pointer'}; pointer-events: auto; outline: {isFocused && !editing\n ? '2px solid rgba(66, 133, 244, 0.8)'\n : 'none'}; outline-offset: -2px;\"\n>\n <ListboxField\n annotation={widgetState.annotation as ListboxFieldProps['annotation']}\n scale={widgetState.scale}\n pageIndex={widgetState.pageIndex}\n isEditable={true}\n onChangeField={widgetState.handleChangeField}\n />\n {#if !editing}\n <RenderWidget\n pageIndex={widgetState.pageIndex}\n annotation={widgetState.annotation}\n scaleFactor={widgetState.scale}\n renderKey={widgetState.renderKey}\n style=\"pointer-events: none;\"\n />\n {/if}\n</div>\n","<script lang=\"ts\">\n import type { Rect } from '@embedpdf/models';\n\n let { bounds, scale }: { data: unknown; bounds: Rect; scale: number } = $props();\n</script>\n\n<div\n style:position=\"absolute\"\n style:left=\"0\"\n style:top=\"0\"\n style:width=\"{bounds.size.width * scale}px\"\n style:height=\"{bounds.size.height * scale}px\"\n style:border=\"1px dashed rgba(66, 133, 244, 0.6)\"\n style:background-color=\"rgba(255, 255, 255, 0.9)\"\n style:box-sizing=\"border-box\"\n style:display=\"flex\"\n style:align-items=\"center\"\n style:padding=\"0 {2 * scale}px\"\n style:overflow=\"hidden\"\n></div>\n","<script lang=\"ts\">\n import type { Rect } from '@embedpdf/models';\n\n let { bounds, scale }: { data: unknown; bounds: Rect; scale: number } = $props();\n</script>\n\n<div\n style:position=\"absolute\"\n style:left=\"0\"\n style:top=\"0\"\n style:width=\"{bounds.size.width * scale}px\"\n style:height=\"{bounds.size.height * scale}px\"\n style:border=\"1px dashed rgba(66, 133, 244, 0.6)\"\n style:background-color=\"rgba(255, 255, 255, 0.9)\"\n style:box-sizing=\"border-box\"\n style:display=\"flex\"\n style:align-items=\"center\"\n style:justify-content=\"center\"\n></div>\n","<script lang=\"ts\">\n import type { Rect } from '@embedpdf/models';\n\n let { bounds, scale }: { data: unknown; bounds: Rect; scale: number } = $props();\n</script>\n\n<div\n style:position=\"absolute\"\n style:left=\"0\"\n style:top=\"0\"\n style:width=\"{bounds.size.width * scale}px\"\n style:height=\"{bounds.size.height * scale}px\"\n style:border=\"1px dashed rgba(66, 133, 244, 0.6)\"\n style:background-color=\"rgba(255, 255, 255, 0.9)\"\n style:border-radius=\"50%\"\n style:box-sizing=\"border-box\"\n style:display=\"flex\"\n style:align-items=\"center\"\n style:justify-content=\"center\"\n></div>\n","<script lang=\"ts\">\n import type { Rect } from '@embedpdf/models';\n\n let { bounds, scale }: { data: unknown; bounds: Rect; scale: number } = $props();\n</script>\n\n<div\n style:position=\"absolute\"\n style:left=\"0\"\n style:top=\"0\"\n style:width=\"{bounds.size.width * scale}px\"\n style:height=\"{bounds.size.height * scale}px\"\n style:border=\"1px dashed rgba(66, 133, 244, 0.6)\"\n style:background-color=\"rgba(255, 255, 255, 0.9)\"\n style:box-sizing=\"border-box\"\n style:display=\"flex\"\n style:flex-direction=\"column\"\n style:overflow=\"hidden\"\n></div>\n","import {\n PdfAnnotationSubtype,\n PdfWidgetAnnoObject,\n PDF_FORM_FIELD_TYPE,\n type Rect,\n type PdfStandardFont,\n} from '@embedpdf/models';\nimport { createRenderer, type BoxedAnnotationRenderer } from '@embedpdf/plugin-annotation/svelte';\nimport FormTextField from './annotations/FormTextField.svelte';\nimport FormCheckbox from './annotations/FormCheckbox.svelte';\nimport FormRadioButton from './annotations/FormRadioButton.svelte';\nimport FormCombobox from './annotations/FormCombobox.svelte';\nimport FormListbox from './annotations/FormListbox.svelte';\nimport TextFillMode from './fill-mode/TextFillMode.svelte';\nimport ToggleFillMode from './fill-mode/ToggleFillMode.svelte';\nimport RadioButtonFillMode from './fill-mode/RadioButtonFillMode.svelte';\nimport ComboboxFillMode from './fill-mode/ComboboxFillMode.svelte';\nimport ListboxFillMode from './fill-mode/ListboxFillMode.svelte';\nimport TextFieldPreview from './previews/TextFieldPreview.svelte';\nimport CheckboxPreview from './previews/CheckboxPreview.svelte';\nimport RadioButtonPreview from './previews/RadioButtonPreview.svelte';\nimport ListboxPreview from './previews/ListboxPreview.svelte';\n\nexport interface WidgetPreviewData {\n rect: Rect;\n fontFamily?: PdfStandardFont;\n fontSize?: number;\n fontColor?: string;\n}\n\nexport const formRenderers: BoxedAnnotationRenderer[] = [\n createRenderer<PdfWidgetAnnoObject, WidgetPreviewData>({\n id: 'formTextField',\n matches: (a): a is PdfWidgetAnnoObject =>\n a.type === PdfAnnotationSubtype.WIDGET && a.field?.type === PDF_FORM_FIELD_TYPE.TEXTFIELD,\n component: FormTextField,\n renderPreview: TextFieldPreview,\n interactionDefaults: { isDraggable: false, isResizable: true, isRotatable: false },\n useAppearanceStream: false,\n renderLocked: TextFillMode,\n }),\n createRenderer<PdfWidgetAnnoObject, WidgetPreviewData>({\n id: 'formCheckbox',\n matches: (a): a is PdfWidgetAnnoObject =>\n a.type === PdfAnnotationSubtype.WIDGET && a.field?.type === PDF_FORM_FIELD_TYPE.CHECKBOX,\n component: FormCheckbox,\n renderPreview: CheckboxPreview,\n interactionDefaults: { isDraggable: false, isResizable: true, isRotatable: false },\n useAppearanceStream: false,\n renderLocked: ToggleFillMode,\n }),\n createRenderer<PdfWidgetAnnoObject, WidgetPreviewData>({\n id: 'formRadioButton',\n matches: (a): a is PdfWidgetAnnoObject =>\n a.type === PdfAnnotationSubtype.WIDGET && a.field?.type === PDF_FORM_FIELD_TYPE.RADIOBUTTON,\n component: FormRadioButton,\n renderPreview: RadioButtonPreview,\n interactionDefaults: { isDraggable: false, isResizable: true, isRotatable: false },\n useAppearanceStream: false,\n renderLocked: RadioButtonFillMode,\n }),\n createRenderer<PdfWidgetAnnoObject, WidgetPreviewData>({\n id: 'formCombobox',\n matches: (a): a is PdfWidgetAnnoObject =>\n a.type === PdfAnnotationSubtype.WIDGET && a.field?.type === PDF_FORM_FIELD_TYPE.COMBOBOX,\n component: FormCombobox,\n renderPreview: TextFieldPreview,\n interactionDefaults: { isDraggable: false, isResizable: true, isRotatable: false },\n useAppearanceStream: false,\n renderLocked: ComboboxFillMode,\n }),\n createRenderer<PdfWidgetAnnoObject, WidgetPreviewData>({\n id: 'formListbox',\n matches: (a): a is PdfWidgetAnnoObject =>\n a.type === PdfAnnotationSubtype.WIDGET && a.field?.type === PDF_FORM_FIELD_TYPE.LISTBOX,\n component: FormListbox,\n renderPreview: ListboxPreview,\n interactionDefaults: { isDraggable: false, isResizable: true, isRotatable: false },\n useAppearanceStream: false,\n renderLocked: ListboxFillMode,\n }),\n];\n","<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { getRendererRegistry } from '@embedpdf/plugin-annotation/svelte';\n import { formRenderers } from './form-renderers';\n\n const registry = getRendererRegistry();\n\n onMount(() => {\n if (!registry) return;\n return registry.register(formRenderers);\n });\n</script>\n","import { createPluginPackage } from '@embedpdf/core';\nimport { FormPluginPackage as BaseFormPluginPackage } from '@embedpdf/plugin-form';\nimport FormRendererRegistration from './components/FormRendererRegistration.svelte';\n\nexport * from './hooks';\n\nexport * from '@embedpdf/plugin-form';\n\nexport const FormPluginPackage = createPluginPackage(BaseFormPluginPackage)\n .addUtility(FormRendererRegistration)\n .build();\n"],"names":["root","root_1","$$anchor","root_2","root_3","BaseFormPluginPackage"],"mappings":";;;;;;;;;;;;;;;0CAAA;;MAkBM,YAAY,EAAA,MAAO,KAAK;QAEtB,SAAM,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-annotation/vue';
|
|
2
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
3
|
-
type __VLS_Props = AnnotationRendererProps<PdfWidgetAnnoObject>;
|
|
4
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';
|
|
2
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
3
|
-
type __VLS_Props = AnnotationRendererProps<PdfWidgetAnnoObject>;
|
|
4
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';
|
|
2
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
3
|
-
type __VLS_Props = AnnotationRendererProps<PdfWidgetAnnoObject>;
|
|
4
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';
|
|
2
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
3
|
-
type __VLS_Props = AnnotationRendererProps<PdfWidgetAnnoObject>;
|
|
4
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';
|
|
2
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
3
|
-
type __VLS_Props = AnnotationRendererProps<PdfWidgetAnnoObject>;
|
|
4
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ComboboxFieldProps } from '../../../shared-vue/components/types';
|
|
2
|
-
declare const __VLS_export: import('vue').DefineComponent<ComboboxFieldProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ComboboxFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
declare const _default: typeof __VLS_export;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ListboxFieldProps } from '../../../shared-vue/components/types';
|
|
2
|
-
declare const __VLS_export: import('vue').DefineComponent<ListboxFieldProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ListboxFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
declare const _default: typeof __VLS_export;
|
|
4
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'vue';
|
|
2
|
-
export declare const checkboxStyle: CSSProperties;
|
|
3
|
-
export declare const inputStyle: CSSProperties;
|
|
4
|
-
export declare const selectStyle: CSSProperties;
|
|
5
|
-
export declare const textareaStyle: CSSProperties;
|
|
6
|
-
export declare const buttonStyle: CSSProperties;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { TextFieldProps } from '../../../shared-vue/components/types';
|
|
2
|
-
declare const __VLS_export: import('vue').DefineComponent<TextFieldProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TextFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
-
declare const _default: typeof __VLS_export;
|
|
4
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
2
|
-
import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';
|
|
3
|
-
type __VLS_Props = AnnotationRendererProps<PdfWidgetAnnoObject>;
|
|
4
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
2
|
-
import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';
|
|
3
|
-
type __VLS_Props = AnnotationRendererProps<PdfWidgetAnnoObject>;
|
|
4
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
2
|
-
import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';
|
|
3
|
-
type __VLS_Props = AnnotationRendererProps<PdfWidgetAnnoObject>;
|
|
4
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
2
|
-
import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';
|
|
3
|
-
type __VLS_Props = AnnotationRendererProps<PdfWidgetAnnoObject>;
|
|
4
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
2
|
-
import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';
|
|
3
|
-
type __VLS_Props = AnnotationRendererProps<PdfWidgetAnnoObject>;
|
|
4
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
declare const _default: typeof __VLS_export;
|
|
6
|
-
export default _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare var __VLS_1: {};
|
|
2
|
-
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof __VLS_1) => any;
|
|
4
|
-
};
|
|
5
|
-
declare const __VLS_base: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
-
declare const _default: typeof __VLS_export;
|
|
8
|
-
export default _default;
|
|
9
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
-
new (): {
|
|
11
|
-
$slots: S;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Rect } from '@embedpdf/models';
|
|
2
|
-
import { WidgetPreviewData } from '../types';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
data: WidgetPreviewData;
|
|
5
|
-
bounds: Rect;
|
|
6
|
-
scale: number;
|
|
7
|
-
};
|
|
8
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
-
declare const _default: typeof __VLS_export;
|
|
10
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Rect } from '@embedpdf/models';
|
|
2
|
-
import { WidgetPreviewData } from '../types';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
data: WidgetPreviewData;
|
|
5
|
-
bounds: Rect;
|
|
6
|
-
scale: number;
|
|
7
|
-
};
|
|
8
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
-
declare const _default: typeof __VLS_export;
|
|
10
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Rect } from '@embedpdf/models';
|
|
2
|
-
import { WidgetPreviewData } from '../types';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
data: WidgetPreviewData;
|
|
5
|
-
bounds: Rect;
|
|
6
|
-
scale: number;
|
|
7
|
-
};
|
|
8
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
-
declare const _default: typeof __VLS_export;
|
|
10
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Rect } from '@embedpdf/models';
|
|
2
|
-
import { WidgetPreviewData } from '../types';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
data: WidgetPreviewData;
|
|
5
|
-
bounds: Rect;
|
|
6
|
-
scale: number;
|
|
7
|
-
};
|
|
8
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
-
declare const _default: typeof __VLS_export;
|
|
10
|
-
export default _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
pageIndex: number;
|
|
4
|
-
annotation: PdfWidgetAnnoObject;
|
|
5
|
-
scaleFactor?: number;
|
|
6
|
-
renderKey?: number;
|
|
7
|
-
style?: Record<string, string>;
|
|
8
|
-
};
|
|
9
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
-
style: Record<string, string>;
|
|
11
|
-
scaleFactor: number;
|
|
12
|
-
renderKey: number;
|
|
13
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const _default: typeof __VLS_export;
|
|
15
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PdfWidgetAnnoField, PdfWidgetAnnoObject } from '@embedpdf/models';
|
|
2
|
-
import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';
|
|
3
|
-
export declare function useFormWidgetState(props: AnnotationRendererProps<PdfWidgetAnnoObject>): {
|
|
4
|
-
annotation: import('vue').ComputedRef<PdfWidgetAnnoObject>;
|
|
5
|
-
field: import('vue').ComputedRef<PdfWidgetAnnoField>;
|
|
6
|
-
scale: import('vue').ComputedRef<number>;
|
|
7
|
-
pageIndex: import('vue').ComputedRef<number>;
|
|
8
|
-
scope: import('vue').ComputedRef<import('../../lib/index.ts').FormScope | null>;
|
|
9
|
-
handleChangeField: (newField: PdfWidgetAnnoField) => void;
|
|
10
|
-
renderKey: import('vue').Ref<number, number>;
|
|
11
|
-
isReadOnly: import('vue').ComputedRef<boolean>;
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
-
import { FormPlugin, FormDocumentState } from '../../lib/index.ts';
|
|
3
|
-
export declare const useFormPlugin: () => import('@embedpdf/core/vue').PluginState<FormPlugin>;
|
|
4
|
-
export declare const useFormCapability: () => import('@embedpdf/core/vue').CapabilityState<Readonly<import('../../lib/index.ts').FormCapability>>;
|
|
5
|
-
export declare const useFormDocumentState: (documentId: MaybeRefOrGetter<string>) => {
|
|
6
|
-
state: import('vue').Ref<{
|
|
7
|
-
selectedFieldId: string | null;
|
|
8
|
-
}, FormDocumentState | {
|
|
9
|
-
selectedFieldId: string | null;
|
|
10
|
-
}>;
|
|
11
|
-
provides: import('vue').ComputedRef<import('../../lib/index.ts').FormScope | null>;
|
|
12
|
-
};
|
package/dist/vue/index.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core"),n=require("@embedpdf/plugin-form"),t=require("vue"),l=require("@embedpdf/plugin-annotation/vue"),o=require("@embedpdf/models"),a=require("@embedpdf/core/vue"),i=require("@embedpdf/utils/vue"),r={key:0,style:{position:"relative",width:"100%",height:"100%"}},u=t.defineComponent({__name:"form-text-field",props:{annotation:{},currentObject:{},isSelected:{type:Boolean},isEditing:{type:Boolean},scale:{},pageIndex:{},documentId:{},onClick:{type:Function},appearanceActive:{type:Boolean}},setup(e){const n=e,l=t.ref(!1),a=t.computed(()=>n.currentObject),i=t.computed(()=>a.value.field),u=t.computed(()=>i.value.type===o.PDF_FORM_FIELD_TYPE.TEXTFIELD),d=t.computed(()=>u.value?i.value.value:""),c=t.computed(()=>u.value&&!!(i.value.flag&o.PDF_FORM_FIELD_FLAG.TEXT_COMB)&&!!i.value.maxLen),s=t.computed(()=>u.value&&!!(i.value.flag&o.PDF_FORM_FIELD_FLAG.TEXT_MULTIPLINE)),p=t.computed(()=>u.value?i.value.maxLen:void 0),v=t.computed(()=>(a.value.strokeWidth??1)*n.scale),m=t.computed(()=>o.standardFontCssProperties(a.value.fontFamily)),f=t.computed(()=>(a.value.fontSize??12)*n.scale),y=t.computed(()=>a.value.fontColor??"#000000"),g=t.computed(()=>c.value&&p.value?a.value.rect.size.width*n.scale/p.value:0),b=t.computed(()=>(d.value??"").split(""));return(e,o)=>(t.openBlock(),t.createElementBlock("div",{onPointerdown:o[0]||(o[0]=e=>{var t;n.isSelected||null==(t=n.onClick)||t.call(n,e)}),onMouseenter:o[1]||(o[1]=e=>l.value=!0),onMouseleave:o[2]||(o[2]=e=>l.value=!1),style:t.normalizeStyle({position:"absolute",inset:"0",background:a.value.color??"rgba(255, 255, 255, 0.9)",border:`${v.value}px solid ${a.value.strokeColor??"rgba(0, 0, 0, 0.2)"}`,outline:l.value||n.isSelected?"1px solid rgba(66, 133, 244, 0.5)":"none",outlineOffset:"-1px",boxSizing:"border-box",pointerEvents:"auto",cursor:n.isSelected?"move":"pointer",display:"flex",alignItems:s.value?"flex-start":"center",overflow:"hidden",padding:c.value?void 0:`${v.value}px ${v.value}px`})},[c.value&&p.value?(t.openBlock(),t.createElementBlock("div",r,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Array.from({length:p.value}),(e,n)=>(t.openBlock(),t.createElementBlock("span",{key:n,style:t.normalizeStyle({position:"absolute",top:"0",left:n*g.value+"px",width:`${g.value}px`,height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderRight:n<p.value-1?`1px solid ${a.value.strokeColor??"rgba(0, 0, 0, 0.2)"}`:"none",boxSizing:"border-box",fontSize:`${f.value}px`,fontFamily:m.value.fontFamily,fontWeight:m.value.fontWeight,fontStyle:m.value.fontStyle,color:y.value,lineHeight:"1.2"})},t.toDisplayString(b.value[n]||""),5))),128))])):(t.openBlock(),t.createElementBlock("span",{key:1,style:t.normalizeStyle({fontSize:`${f.value}px`,fontFamily:m.value.fontFamily,fontWeight:m.value.fontWeight,fontStyle:m.value.fontStyle,color:y.value,lineHeight:"1.2",display:"block",width:"100%",whiteSpace:s.value?"pre-wrap":"nowrap",wordBreak:s.value?"break-word":"normal",overflowWrap:s.value?"break-word":"normal",overflow:"hidden",textOverflow:s.value?"clip":"ellipsis"})},t.toDisplayString(d.value),5))],36))}}),d={key:0,viewBox:"0 0 100 100",style:{width:"100%",height:"100%"}},c=t.defineComponent({__name:"form-checkbox",props:{annotation:{},currentObject:{},isSelected:{type:Boolean},isEditing:{type:Boolean},scale:{},pageIndex:{},documentId:{},onClick:{type:Function},appearanceActive:{type:Boolean}},setup(e){const n=e,l=t.ref(!1),a=t.computed(()=>n.currentObject),i=t.computed(()=>o.isWidgetChecked(a.value)),r=t.computed(()=>(a.value.strokeWidth??1)*n.scale);return(e,o)=>(t.openBlock(),t.createElementBlock("div",{onPointerdown:o[0]||(o[0]=e=>{var t;n.isSelected||null==(t=n.onClick)||t.call(n,e)}),onMouseenter:o[1]||(o[1]=e=>l.value=!0),onMouseleave:o[2]||(o[2]=e=>l.value=!1),style:t.normalizeStyle({position:"absolute",inset:"0",background:a.value.color??"#FFFFFF",border:`${r.value}px solid ${a.value.strokeColor??"#000000"}`,outline:l.value||n.isSelected?"1px solid rgba(66, 133, 244, 0.5)":"none",outlineOffset:"-1px",boxSizing:"border-box",pointerEvents:"auto",cursor:n.isSelected?"move":"pointer",display:"flex",alignItems:"center",justifyContent:"center"})},[i.value?(t.openBlock(),t.createElementBlock("svg",d,[...o[3]||(o[3]=[t.createElementVNode("path",{d:"M28 48C27.45 50.21 29.45 63.13 30 67C30.55 69.21 34.58 72 39 72C44.52 71.45 76.55 32.55 76 32C77.1 31.45 76 25 76 25C74.34 22.24 68 25.45 68 26C68 26 43.55 53 43 53C41.34 53 40.55 41.1 40 40C33.37 36.69 29.1 45.79 28 48Z",fill:"#000000"},null,-1)])])):t.createCommentVNode("",!0)],36))}}),s={key:0,style:{width:"50%",height:"50%",borderRadius:"50%",background:"#000000"}},p=t.defineComponent({__name:"form-radio-button",props:{annotation:{},currentObject:{},isSelected:{type:Boolean},isEditing:{type:Boolean},scale:{},pageIndex:{},documentId:{},onClick:{type:Function},appearanceActive:{type:Boolean}},setup(e){const n=e,l=t.ref(!1),a=t.computed(()=>n.currentObject),i=t.computed(()=>o.isWidgetChecked(a.value)),r=t.computed(()=>(a.value.strokeWidth??1)*n.scale);return(e,o)=>(t.openBlock(),t.createElementBlock("div",{onPointerdown:o[0]||(o[0]=e=>{var t;n.isSelected||null==(t=n.onClick)||t.call(n,e)}),onMouseenter:o[1]||(o[1]=e=>l.value=!0),onMouseleave:o[2]||(o[2]=e=>l.value=!1),style:t.normalizeStyle({position:"absolute",inset:"0",background:a.value.color??"#FFFFFF",border:`${r.value}px solid ${a.value.strokeColor??"#000000"}`,borderRadius:"50%",outline:l.value||n.isSelected?"1px solid rgba(66, 133, 244, 0.5)":"none",outlineOffset:"-1px",boxSizing:"border-box",pointerEvents:"auto",cursor:n.isSelected?"move":"pointer",display:"flex",alignItems:"center",justifyContent:"center"})},[i.value?(t.openBlock(),t.createElementBlock("div",s)):t.createCommentVNode("",!0)],36))}}),v=t.defineComponent({__name:"form-combobox",props:{annotation:{},currentObject:{},isSelected:{type:Boolean},isEditing:{type:Boolean},scale:{},pageIndex:{},documentId:{},onClick:{type:Function},appearanceActive:{type:Boolean}},setup(e){const n=e,l=t.ref(!1),a=t.computed(()=>n.currentObject),i=t.computed(()=>a.value.field),r=t.computed(()=>i.value.type===o.PDF_FORM_FIELD_TYPE.COMBOBOX?i.value.options:[]),u=t.computed(()=>{var e;return(null==(e=r.value.find(e=>e.isSelected))?void 0:e.label)??""}),d=t.computed(()=>(a.value.strokeWidth??1)*n.scale),c=t.computed(()=>(a.value.fontSize??12)*n.scale),s=t.computed(()=>o.standardFontCssProperties(a.value.fontFamily));return(e,o)=>(t.openBlock(),t.createElementBlock("div",{onPointerdown:o[0]||(o[0]=e=>{var t;n.isSelected||null==(t=n.onClick)||t.call(n,e)}),onMouseenter:o[1]||(o[1]=e=>l.value=!0),onMouseleave:o[2]||(o[2]=e=>l.value=!1),style:t.normalizeStyle({position:"absolute",inset:"0",background:a.value.color??"#FFFFFF",border:`${d.value}px solid ${a.value.strokeColor??"#000000"}`,outline:l.value||n.isSelected?"1px solid rgba(66, 133, 244, 0.5)":"none",outlineOffset:"-1px",boxSizing:"border-box",pointerEvents:"auto",cursor:n.isSelected?"move":"pointer",display:"flex",alignItems:"center",overflow:"hidden"})},[t.createElementVNode("span",{style:t.normalizeStyle({flex:"1",padding:`0 ${4*n.scale}px`,fontSize:`${c.value}px`,fontFamily:s.value.fontFamily,fontWeight:s.value.fontWeight,fontStyle:s.value.fontStyle,color:a.value.fontColor??"#000000",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})},t.toDisplayString(u.value),5),t.createElementVNode("div",{style:t.normalizeStyle({width:13*n.scale+"px",minWidth:13*n.scale+"px",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderLeft:`1px solid ${a.value.strokeColor??"#000000"}`})},[(t.openBlock(),t.createElementBlock("svg",{viewBox:"0 0 10 6",style:t.normalizeStyle({width:8*n.scale+"px",height:5*n.scale+"px"}),fill:"currentColor"},[...o[3]||(o[3]=[t.createElementVNode("path",{d:"M0 0 L5 6 L10 0 Z"},null,-1)])],4))],4)],36))}}),m=t.defineComponent({__name:"form-listbox",props:{annotation:{},currentObject:{},isSelected:{type:Boolean},isEditing:{type:Boolean},scale:{},pageIndex:{},documentId:{},onClick:{type:Function},appearanceActive:{type:Boolean}},setup(e){const n=e,l=t.ref(!1),a=t.computed(()=>n.currentObject),i=t.computed(()=>a.value.field),r=t.computed(()=>i.value.type===o.PDF_FORM_FIELD_TYPE.LISTBOX?i.value.options:[]),u=t.computed(()=>(a.value.strokeWidth??1)*n.scale),d=t.computed(()=>(a.value.fontSize??12)*n.scale),c=t.computed(()=>1.2*d.value),s=t.computed(()=>o.standardFontCssProperties(a.value.fontFamily));return(e,o)=>(t.openBlock(),t.createElementBlock("div",{onPointerdown:o[0]||(o[0]=e=>{var t;n.isSelected||null==(t=n.onClick)||t.call(n,e)}),onMouseenter:o[1]||(o[1]=e=>l.value=!0),onMouseleave:o[2]||(o[2]=e=>l.value=!1),style:t.normalizeStyle({position:"absolute",inset:"0",background:a.value.color??"#FFFFFF",border:`${u.value}px solid ${a.value.strokeColor??"#000000"}`,outline:l.value||n.isSelected?"1px solid rgba(66, 133, 244, 0.5)":"none",outlineOffset:"-1px",boxSizing:"border-box",pointerEvents:"auto",cursor:n.isSelected?"move":"pointer",overflow:"hidden",display:"flex",flexDirection:"column"})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,(e,l)=>(t.openBlock(),t.createElementBlock("div",{key:l,style:t.normalizeStyle({padding:`0 ${4*n.scale}px`,fontSize:`${d.value}px`,lineHeight:`${c.value}px`,fontFamily:s.value.fontFamily,fontWeight:s.value.fontWeight,fontStyle:s.value.fontStyle,color:e.isSelected?"#FFFFFF":a.value.fontColor??"#000000",background:e.isSelected?"rgba(0, 51, 113, 1)":"transparent",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})},t.toDisplayString(e.label),5))),128))],36))}}),f=()=>a.useCapability(n.FormPlugin.id),y=e=>{const{provides:l}=f(),o=t.ref({...n.initialDocumentState});return t.watch([l,()=>t.toValue(e)],([e,t],l,a)=>{if(e&&t){const n=e.forDocument(t);o.value=n.getState();a(n.onStateChange(e=>{o.value=e}))}else o.value={...n.initialDocumentState}},{immediate:!0}),{state:o,provides:t.computed(()=>{var n;return(null==(n=l.value)?void 0:n.forDocument(t.toValue(e)))??null})}};function g(e){const{provides:n}=f(),l=t.ref(0),a=t.computed(()=>{var t;return(null==(t=n.value)?void 0:t.forDocument(e.documentId))??null}),i=t.computed(()=>e.currentObject),r=t.computed(()=>i.value.field),u=t.computed(()=>e.scale),d=t.computed(()=>e.pageIndex),c=t.computed(()=>!!(r.value.flag&o.PDF_FORM_FIELD_FLAG.READONLY));return t.watchEffect(e=>{const n=a.value;if(!n)return;const t=i.value.id;e(n.onFieldValueChange(e=>{e.annotationId===t&&l.value++}))}),{annotation:i,field:r,scale:u,pageIndex:d,scope:a,handleChangeField:function(e){const n=a.value;n&&n.setFormFieldValues(d.value,i.value,e)},renderKey:l,isReadOnly:c}}const b=["src"],F=t.defineComponent({__name:"render-widget",props:{pageIndex:{},annotation:{},scaleFactor:{default:1},renderKey:{default:0},style:{default:()=>({})}},setup(e){const n=e,{provides:l}=f(),a=t.ref(null);let r=null;const u=t.computed(()=>n.annotation.id),d=t.computed(()=>n.annotation.rect.size.width),c=t.computed(()=>n.annotation.rect.size.height);return t.watch(()=>[n.pageIndex,n.scaleFactor,n.renderKey,u.value,d.value,c.value,l.value],(e,t,u)=>{const d=l.value;if(!d)return;const c=d.renderWidget({pageIndex:n.pageIndex,annotation:i.deepToRaw(n.annotation),options:{scaleFactor:n.scaleFactor,dpr:window.devicePixelRatio}});c.wait(e=>{const n=URL.createObjectURL(e);r&&URL.revokeObjectURL(r),r=n,a.value=n},o.ignore),u(()=>{c.abort({code:o.PdfErrorCode.Cancelled,message:"canceled render task"}),r&&(URL.revokeObjectURL(r),r=null)})},{immediate:!0}),(n,l)=>a.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:a.value,alt:"",style:t.normalizeStyle({width:"100%",height:"100%",display:"block",...e.style})},null,12,b)):t.createCommentVNode("",!0)}}),x={position:"absolute",top:0,left:0,padding:0,margin:0,width:"100%",height:"100%",borderRadius:0,outline:"none",boxSizing:"border-box"},h=x,k={...x,cursor:"inherit"},E={...x,resize:"none",lineHeight:1.14},B=["required","disabled","type","name","aria-label","value","maxlength"],S=["required","disabled","type","name","aria-label","value","maxlength"],C=["required","disabled","name","aria-label","value","maxlength"],I=["required","disabled","name","aria-label","value","maxlength"],w=["required","disabled","type","name","aria-label","value","maxlength"],_=["required","disabled","type","name","aria-label","value","maxlength"],O=t.defineComponent({__name:"text-field",props:{scale:{},pageIndex:{},isEditable:{type:Boolean},onChangeField:{type:Function},onFocus:{type:Function},onBlur:{type:Function},inputRef:{type:Function},syncExternalValue:{type:Boolean},annotation:{}},setup(e){const n=e,a=t.computed(()=>n.annotation.field),i=t.computed(()=>a.value.flag),r=t.computed(()=>a.value.name),u=t.computed(()=>a.value.value),d=t.ref(u.value);function c(e){var t;const l=e.target.value;d.value=l,null==(t=n.onChangeField)||t.call(n,{...a.value,value:l})}t.watch(u,e=>{n.syncExternalValue&&(d.value=e)});const s=t.computed(()=>(n.annotation.strokeWidth??0)*n.scale),p=t.computed(()=>o.standardFontCssProperties(n.annotation.fontFamily)),v=t.computed(()=>n.annotation.fontSize*n.scale),m=l.useIOSZoomPrevention(v,!0),f=t.computed(()=>({backgroundColor:n.annotation.color??"transparent",borderStyle:"solid",borderColor:n.annotation.strokeColor??"transparent",borderWidth:`${s.value}px`,color:n.annotation.fontColor,...p.value,fontSize:`${m.value.adjustedFontPx}px`,padding:`${s.value}px ${s.value}px`})),y=t.computed(()=>!n.isEditable||!!(i.value&o.PDF_FORM_FIELD_FLAG.READONLY)),g=t.computed(()=>!!(i.value&o.PDF_FORM_FIELD_FLAG.REQUIRED)),b=t.computed(()=>!!(i.value&o.PDF_FORM_FIELD_FLAG.TEXT_PASSWORD)),F=t.computed(()=>!!(i.value&o.PDF_FORM_FIELD_FLAG.TEXT_MULTIPLINE)),x=t.computed(()=>!!(i.value&o.PDF_FORM_FIELD_FLAG.TEXT_COMB)),k=t.computed(()=>a.value.maxLen),O=t.computed(()=>x.value&&k.value?n.annotation.rect.size.width*n.scale/k.value:0),R=t.computed(()=>(d.value||"").split("")),z=t.computed(()=>R.value.length),D=t.ref(!0);let L;t.watch(z,()=>{D.value=!0,clearInterval(L),L=setInterval(()=>{D.value=!D.value},530)},{immediate:!0});const P=t.computed(()=>({position:"relative",width:"100%",height:"100%",borderRadius:0,boxSizing:"border-box",backgroundColor:n.annotation.color??"transparent",borderStyle:"solid",borderColor:n.annotation.strokeColor??"transparent",borderWidth:`${s.value}px`})),A=t.computed(()=>({color:n.annotation.fontColor,...p.value,fontSize:`${m.value.adjustedFontPx}px`}));function M(e){var t;null==(t=n.inputRef)||t.call(n,e)}return(e,l)=>x.value&&k.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.unref(m).wrapperStyle?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(t.unref(m).wrapperStyle)},[t.createElementVNode("div",{style:t.normalizeStyle(P.value)},[t.createElementVNode("input",{ref:M,required:g.value,disabled:y.value,type:b.value?"password":"text",name:r.value,"aria-label":r.value,value:d.value,maxlength:k.value,onFocus:l[0]||(l[0]=e=>{var t;return null==(t=n.onFocus)?void 0:t.call(n)}),onInput:c,onBlur:l[1]||(l[1]=e=>{var t;return null==(t=n.onBlur)?void 0:t.call(n)}),style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0,padding:0,margin:0,border:"none",zIndex:1}},null,40,B),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Array.from({length:k.value}),(e,n)=>(t.openBlock(),t.createElementBlock("span",{key:n,style:t.normalizeStyle({...A.value,position:"absolute",top:0,height:"100%",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",left:n*O.value+"px",width:`${O.value}px`})},t.toDisplayString(R.value[n]||""),5))),128)),z.value<k.value?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle({position:"absolute",top:"15%",height:"70%",width:"1px",backgroundColor:"black",pointerEvents:"none",left:z.value*O.value+O.value/2+"px",opacity:D.value?1:0})},null,4)):t.createCommentVNode("",!0)],4)],4)):(t.openBlock(),t.createElementBlock("div",{key:1,style:t.normalizeStyle(P.value)},[t.createElementVNode("input",{ref:M,required:g.value,disabled:y.value,type:b.value?"password":"text",name:r.value,"aria-label":r.value,value:d.value,maxlength:k.value,onFocus:l[2]||(l[2]=e=>{var t;return null==(t=n.onFocus)?void 0:t.call(n)}),onInput:c,onBlur:l[3]||(l[3]=e=>{var t;return null==(t=n.onBlur)?void 0:t.call(n)}),style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0,padding:0,margin:0,border:"none",zIndex:1}},null,40,S),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Array.from({length:k.value}),(e,n)=>(t.openBlock(),t.createElementBlock("span",{key:n,style:t.normalizeStyle({...A.value,position:"absolute",top:0,height:"100%",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",left:n*O.value+"px",width:`${O.value}px`})},t.toDisplayString(R.value[n]||""),5))),128)),z.value<k.value?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle({position:"absolute",top:"15%",height:"70%",width:"1px",backgroundColor:"black",pointerEvents:"none",left:z.value*O.value+O.value/2+"px",opacity:D.value?1:0})},null,4)):t.createCommentVNode("",!0)],4))],64)):F.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(m).wrapperStyle?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(t.unref(m).wrapperStyle)},[t.createElementVNode("textarea",{ref:M,required:g.value,disabled:y.value,name:r.value,"aria-label":r.value,value:d.value,maxlength:k.value,onFocus:l[4]||(l[4]=e=>{var t;return null==(t=n.onFocus)?void 0:t.call(n)}),onInput:c,onBlur:l[5]||(l[5]=e=>{var t;return null==(t=n.onBlur)?void 0:t.call(n)}),style:t.normalizeStyle({...t.unref(E),...f.value})},null,44,C)],4)):(t.openBlock(),t.createElementBlock("textarea",{key:1,ref:M,required:g.value,disabled:y.value,name:r.value,"aria-label":r.value,value:d.value,maxlength:k.value,onFocus:l[6]||(l[6]=e=>{var t;return null==(t=n.onFocus)?void 0:t.call(n)}),onInput:c,onBlur:l[7]||(l[7]=e=>{var t;return null==(t=n.onBlur)?void 0:t.call(n)}),style:t.normalizeStyle({...t.unref(E),...f.value})},null,44,I))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.unref(m).wrapperStyle?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(t.unref(m).wrapperStyle)},[t.createElementVNode("input",{ref:M,required:g.value,disabled:y.value,type:b.value?"password":"text",name:r.value,"aria-label":r.value,value:d.value,maxlength:k.value,onFocus:l[8]||(l[8]=e=>{var t;return null==(t=n.onFocus)?void 0:t.call(n)}),onInput:c,onBlur:l[9]||(l[9]=e=>{var t;return null==(t=n.onBlur)?void 0:t.call(n)}),style:t.normalizeStyle({...t.unref(h),...f.value})},null,44,w)],4)):(t.openBlock(),t.createElementBlock("input",{key:1,ref:M,required:g.value,disabled:y.value,type:b.value?"password":"text",name:r.value,"aria-label":r.value,value:d.value,maxlength:k.value,onFocus:l[10]||(l[10]=e=>{var t;return null==(t=n.onFocus)?void 0:t.call(n)}),onInput:c,onBlur:l[11]||(l[11]=e=>{var t;return null==(t=n.onBlur)?void 0:t.call(n)}),style:t.normalizeStyle({...t.unref(h),...f.value})},null,44,_))],64))}}),R={style:{width:"100%",height:"100%",overflow:"hidden",position:"relative",pointerEvents:"auto",outline:"none"}},z=t.defineComponent({__name:"text-fill-mode",props:{annotation:{},currentObject:{},isSelected:{type:Boolean},isEditing:{type:Boolean},scale:{},pageIndex:{},documentId:{},onClick:{type:Function},appearanceActive:{type:Boolean}},setup(e){const n=e,l=g(n),{state:o}=y(()=>n.documentId),a=t.ref(!1),i=t.ref(null),r=t.computed(()=>o.value.selectedFieldId===l.annotation.value.id);function u(){var e;l.isReadOnly.value||(null==(e=l.scope.value)||e.selectField(l.annotation.value.id),a.value=!0)}function d(){var e,n;a.value=!1,(null==(e=l.scope.value)?void 0:e.getSelectedFieldId())===l.annotation.value.id&&(null==(n=l.scope.value)||n.deselectField())}function c(e){i.value=e}return t.watch(r,e=>{e&&i.value&&document.activeElement!==i.value&&i.value.focus()}),(e,n)=>(t.openBlock(),t.createElementBlock("div",R,[t.createVNode(F,{pageIndex:t.unref(l).pageIndex.value,annotation:t.unref(l).annotation.value,scaleFactor:t.unref(l).scale.value,renderKey:t.unref(l).renderKey.value,style:t.normalizeStyle({position:"absolute",inset:"0",pointerEvents:"none",visibility:a.value?"hidden":"visible"})},null,8,["pageIndex","annotation","scaleFactor","renderKey","style"]),t.createElementVNode("div",{style:t.normalizeStyle({position:"absolute",inset:"0",zIndex:1,opacity:a.value?1:0})},[t.createVNode(O,{annotation:t.unref(l).annotation.value,scale:t.unref(l).scale.value,pageIndex:t.unref(l).pageIndex.value,isEditable:!0,onChangeField:t.unref(l).handleChangeField,syncExternalValue:!a.value,onFocus:u,onBlur:d,inputRef:c},null,8,["annotation","scale","pageIndex","onChangeField","syncExternalValue"])],4)]))}}),D=["tabindex"],L=t.defineComponent({__name:"toggle-fill-mode",props:{annotation:{},currentObject:{},isSelected:{type:Boolean},isEditing:{type:Boolean},scale:{},pageIndex:{},documentId:{},onClick:{type:Function},appearanceActive:{type:Boolean}},setup(e){const n=e,l=g(n),{state:a}=y(()=>n.documentId),i=t.ref(null),r=t.computed(()=>a.value.selectedFieldId===l.annotation.value.id);function u(){if(l.isReadOnly.value)return;const e=o.isWidgetChecked(l.annotation.value)?"Off":l.annotation.value.exportValue??"Yes";l.handleChangeField({...l.field.value,value:e})}function d(){var e;l.isReadOnly.value||(null==(e=l.scope.value)||e.selectField(l.annotation.value.id),u())}function c(){var e;l.isReadOnly.value||null==(e=l.scope.value)||e.selectField(l.annotation.value.id)}function s(){var e,n;(null==(e=l.scope.value)?void 0:e.getSelectedFieldId())===l.annotation.value.id&&(null==(n=l.scope.value)||n.deselectField())}function p(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),u())}return t.watch(r,e=>{e&&i.value&&document.activeElement!==i.value&&i.value.focus()}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"wrapperEl",ref:i,tabindex:t.unref(l).isReadOnly.value?-1:0,onClick:d,onFocus:c,onBlur:s,onKeydown:p,style:t.normalizeStyle({width:"100%",height:"100%",overflow:"hidden",cursor:t.unref(l).isReadOnly.value?"default":"pointer",pointerEvents:"auto",outline:r.value?"2px solid rgba(66, 133, 244, 0.8)":"none",outlineOffset:"-2px"})},[t.createVNode(F,{pageIndex:t.unref(l).pageIndex.value,annotation:t.unref(l).annotation.value,scaleFactor:t.unref(l).scale.value,renderKey:t.unref(l).renderKey.value,style:{pointerEvents:"none"}},null,8,["pageIndex","annotation","scaleFactor","renderKey"])],44,D))}}),P=["tabindex"],A=t.defineComponent({__name:"radio-button-fill-mode",props:{annotation:{},currentObject:{},isSelected:{type:Boolean},isEditing:{type:Boolean},scale:{},pageIndex:{},documentId:{},onClick:{type:Function},appearanceActive:{type:Boolean}},setup(e){const n=e,l=g(n),{state:a}=y(()=>n.documentId),i=t.ref(null),r=t.computed(()=>a.value.selectedFieldId===l.annotation.value.id);function u(){l.isReadOnly.value||!o.isWidgetChecked(l.annotation.value)&&l.annotation.value.exportValue&&l.handleChangeField({...l.field.value,value:l.annotation.value.exportValue})}function d(){var e;l.isReadOnly.value||(null==(e=l.scope.value)||e.selectField(l.annotation.value.id),u())}function c(){var e;l.isReadOnly.value||null==(e=l.scope.value)||e.selectField(l.annotation.value.id)}function s(){var e,n;(null==(e=l.scope.value)?void 0:e.getSelectedFieldId())===l.annotation.value.id&&(null==(n=l.scope.value)||n.deselectField())}function p(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),u())}return t.watch(r,e=>{e&&i.value&&document.activeElement!==i.value&&i.value.focus()}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"wrapperEl",ref:i,tabindex:t.unref(l).isReadOnly.value?-1:0,onClick:d,onFocus:c,onBlur:s,onKeydown:p,style:t.normalizeStyle({width:"100%",height:"100%",overflow:"hidden",cursor:t.unref(l).isReadOnly.value?"default":"pointer",pointerEvents:"auto",outline:r.value?"2px solid rgba(66, 133, 244, 0.8)":"none",outlineOffset:"-2px"})},[t.createVNode(F,{pageIndex:t.unref(l).pageIndex.value,annotation:t.unref(l).annotation.value,scaleFactor:t.unref(l).scale.value,renderKey:t.unref(l).renderKey.value,style:{pointerEvents:"none"}},null,8,["pageIndex","annotation","scaleFactor","renderKey"])],44,P))}}),M=["required","disabled","name","aria-label"],T=["value","selected"],V=t.defineComponent({__name:"combobox-field",props:{scale:{},pageIndex:{},isEditable:{type:Boolean},onChangeField:{type:Function},onFocus:{type:Function},onBlur:{type:Function},inputRef:{type:Function},syncExternalValue:{type:Boolean},annotation:{}},setup(e){const n=e,l=t.computed(()=>n.annotation.field),a=t.computed(()=>l.value.flag),i=t.computed(()=>l.value.options),r=t.computed(()=>l.value.alternateName||l.value.name),u=t.computed(()=>!n.isEditable||!!(a.value&o.PDF_FORM_FIELD_FLAG.READONLY)),d=t.computed(()=>!!(a.value&o.PDF_FORM_FIELD_FLAG.REQUIRED)),c=t.computed(()=>i.value.findIndex(e=>e.isSelected));function s(e){var t;const o=e.target,a=i.value.map((e,n)=>({...e,isSelected:n===o.selectedIndex}));null==(t=n.onChangeField)||t.call(n,{...l.value,options:a})}function p(e){var t;null==(t=n.inputRef)||t.call(n,e)}return(e,l)=>(t.openBlock(),t.createElementBlock("select",{ref:p,required:d.value,disabled:u.value,name:r.value,"aria-label":r.value,onChange:s,onBlur:l[0]||(l[0]=e=>{var t;return null==(t=n.onBlur)?void 0:t.call(n)}),style:t.normalizeStyle({...t.unref(k),opacity:0})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(e,n)=>(t.openBlock(),t.createElementBlock("option",{key:n,value:e.label,selected:n===c.value},t.toDisplayString(e.label),9,T))),128))],44,M))}}),$=t.defineComponent({__name:"combobox-fill-mode",props:{annotation:{},currentObject:{},isSelected:{type:Boolean},isEditing:{type:Boolean},scale:{},pageIndex:{},documentId:{},onClick:{type:Function},appearanceActive:{type:Boolean}},setup(e){const n=e,l=g(n),{state:o}=y(()=>n.documentId),a=t.ref(null),i=t.ref(null),r=t.computed(()=>o.value.selectedFieldId===l.annotation.value.id);function u(){var e;null==(e=l.scope.value)||e.selectField(l.annotation.value.id)}function d(){requestAnimationFrame(()=>{var e,n,t;(null==(e=a.value)?void 0:e.contains(document.activeElement))||(null==(n=l.scope.value)?void 0:n.getSelectedFieldId())===l.annotation.value.id&&(null==(t=l.scope.value)||t.deselectField())})}function c(e){i.value=e}return t.watch(r,e=>{e&&a.value&&!a.value.contains(document.activeElement)&&(i.value??a.value).focus()}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"wrapperEl",ref:a,onFocus:u,onBlur:d,style:t.normalizeStyle({width:"100%",height:"100%",overflow:"hidden",cursor:t.unref(l).isReadOnly.value?"default":"pointer",pointerEvents:"auto",outline:r.value?"2px solid rgba(66, 133, 244, 0.8)":"none",outlineOffset:"-2px"})},[t.createVNode(F,{pageIndex:t.unref(l).pageIndex.value,annotation:t.unref(l).annotation.value,scaleFactor:t.unref(l).scale.value,renderKey:t.unref(l).renderKey.value,style:{pointerEvents:"none"}},null,8,["pageIndex","annotation","scaleFactor","renderKey"]),t.createVNode(V,{annotation:t.unref(l).annotation.value,scale:t.unref(l).scale.value,pageIndex:t.unref(l).pageIndex.value,isEditable:!0,onChangeField:t.unref(l).handleChangeField,inputRef:c},null,8,["annotation","scale","pageIndex","onChangeField"])],36))}}),W=["onClick"],j=t.defineComponent({__name:"listbox-field",props:{scale:{},pageIndex:{},isEditable:{type:Boolean},onChangeField:{type:Function},onFocus:{type:Function},onBlur:{type:Function},inputRef:{type:Function},syncExternalValue:{type:Boolean},annotation:{}},setup(e){const n=e,l=t.computed(()=>n.annotation.field),a=t.computed(()=>l.value.flag),i=t.computed(()=>l.value.options),r=t.computed(()=>!n.isEditable||!!(a.value&o.PDF_FORM_FIELD_FLAG.READONLY)),u=t.computed(()=>!!(a.value&o.PDF_FORM_FIELD_FLAG.CHOICE_MULTL_SELECT)),d=t.computed(()=>(n.annotation.strokeWidth??0)*n.scale),c=t.computed(()=>(n.annotation.fontSize??12)*n.scale),s=t.computed(()=>1.2*c.value),p=t.computed(()=>o.standardFontCssProperties(n.annotation.fontFamily)),v=t.computed(()=>({position:"absolute",top:0,left:0,width:"100%",height:"100%",background:n.annotation.color??"#FFFFFF",borderStyle:"solid",borderColor:n.annotation.strokeColor??"#000000",borderWidth:`${d.value}px`,boxSizing:"border-box",overflow:"auto",display:"flex",flexDirection:"column",outline:"none"}));function m(e){var t;null==(t=n.inputRef)||t.call(n,e)}return(e,o)=>(t.openBlock(),t.createElementBlock("div",{ref:m,onBlur:o[0]||(o[0]=e=>{var t;return null==(t=n.onBlur)?void 0:t.call(n)}),style:t.normalizeStyle(v.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(e,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,onClick:e=>function(e){var t;if(r.value)return;const o=i.value.map((n,t)=>({...n,isSelected:u.value?t===e?!n.isSelected:n.isSelected:t===e}));null==(t=n.onChangeField)||t.call(n,{...l.value,options:o})}(o),style:t.normalizeStyle({padding:`0 ${4*n.scale}px`,fontSize:`${c.value}px`,lineHeight:`${s.value}px`,fontFamily:p.value.fontFamily,fontWeight:p.value.fontWeight,fontStyle:p.value.fontStyle,color:e.isSelected?"#FFFFFF":n.annotation.fontColor??"#000000",background:e.isSelected?"rgba(0, 51, 113, 1)":"transparent",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:r.value?"default":"pointer"})},t.toDisplayString(e.label),13,W))),128))],36))}}),N=["tabindex"],q=t.defineComponent({__name:"listbox-fill-mode",props:{annotation:{},currentObject:{},isSelected:{type:Boolean},isEditing:{type:Boolean},scale:{},pageIndex:{},documentId:{},onClick:{type:Function},appearanceActive:{type:Boolean}},setup(e){const n=e,l=g(n),{state:o}=y(()=>n.documentId),a=t.ref(!1),i=t.ref(null),r=t.computed(()=>o.value.selectedFieldId===l.annotation.value.id);function u(){var e;l.isReadOnly.value||(null==(e=l.scope.value)||e.selectField(l.annotation.value.id),a.value=!0)}function d(){requestAnimationFrame(()=>{var e,n,t;(null==(e=i.value)?void 0:e.contains(document.activeElement))||(a.value=!1,(null==(n=l.scope.value)?void 0:n.getSelectedFieldId())===l.annotation.value.id&&(null==(t=l.scope.value)||t.deselectField()))})}return t.watch(r,e=>{e&&i.value&&!i.value.contains(document.activeElement)&&i.value.focus()}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"wrapperEl",ref:i,tabindex:t.unref(l).isReadOnly.value?-1:0,onFocus:u,onBlur:d,style:t.normalizeStyle({width:"100%",height:"100%",overflow:"hidden",cursor:t.unref(l).isReadOnly.value?"default":"pointer",pointerEvents:"auto",outline:r.value&&!a.value?"2px solid rgba(66, 133, 244, 0.8)":"none",outlineOffset:"-2px"})},[t.createVNode(j,{annotation:t.unref(l).annotation.value,scale:t.unref(l).scale.value,pageIndex:t.unref(l).pageIndex.value,isEditable:!0,onChangeField:t.unref(l).handleChangeField},null,8,["annotation","scale","pageIndex","onChangeField"]),a.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(F,{key:0,pageIndex:t.unref(l).pageIndex.value,annotation:t.unref(l).annotation.value,scaleFactor:t.unref(l).scale.value,renderKey:t.unref(l).renderKey.value,style:{pointerEvents:"none"}},null,8,["pageIndex","annotation","scaleFactor","renderKey"]))],44,N))}}),K=t.defineComponent({__name:"text-field-preview",props:{data:{},bounds:{},scale:{}},setup(e){const n=e,l=t.computed(()=>({position:"absolute",left:0,top:0,width:n.bounds.size.width*n.scale+"px",height:n.bounds.size.height*n.scale+"px",border:"1px dashed rgba(66, 133, 244, 0.6)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxSizing:"border-box",display:"flex",alignItems:"center",padding:`0 ${2*n.scale}px`,overflow:"hidden"}));return(e,n)=>(t.openBlock(),t.createElementBlock("div",{style:t.normalizeStyle(l.value)},null,4))}}),G=t.defineComponent({__name:"checkbox-preview",props:{data:{},bounds:{},scale:{}},setup(e){const n=e,l=t.computed(()=>({position:"absolute",left:0,top:0,width:n.bounds.size.width*n.scale+"px",height:n.bounds.size.height*n.scale+"px",border:"1px dashed rgba(66, 133, 244, 0.6)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}));return(e,n)=>(t.openBlock(),t.createElementBlock("div",{style:t.normalizeStyle(l.value)},null,4))}}),U=t.defineComponent({__name:"radio-button-preview",props:{data:{},bounds:{},scale:{}},setup(e){const n=e,l=t.computed(()=>({position:"absolute",left:0,top:0,width:n.bounds.size.width*n.scale+"px",height:n.bounds.size.height*n.scale+"px",border:"1px dashed rgba(66, 133, 244, 0.6)",backgroundColor:"rgba(255, 255, 255, 0.9)",borderRadius:"50%",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}));return(e,n)=>(t.openBlock(),t.createElementBlock("div",{style:t.normalizeStyle(l.value)},null,4))}}),Y=t.defineComponent({__name:"listbox-preview",props:{data:{},bounds:{},scale:{}},setup(e){const n=e,l=t.computed(()=>({position:"absolute",left:0,top:0,width:n.bounds.size.width*n.scale+"px",height:n.bounds.size.height*n.scale+"px",border:"1px dashed rgba(66, 133, 244, 0.6)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxSizing:"border-box",display:"flex",flexDirection:"column",overflow:"hidden"}));return(e,n)=>(t.openBlock(),t.createElementBlock("div",{style:t.normalizeStyle(l.value)},null,4))}}),X=[l.createRenderer({id:"formTextField",matches:e=>{var n;return e.type===o.PdfAnnotationSubtype.WIDGET&&(null==(n=e.field)?void 0:n.type)===o.PDF_FORM_FIELD_TYPE.TEXTFIELD},component:u,renderPreview:K,interactionDefaults:{isDraggable:!1,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,renderLocked:z}),l.createRenderer({id:"formCheckbox",matches:e=>{var n;return e.type===o.PdfAnnotationSubtype.WIDGET&&(null==(n=e.field)?void 0:n.type)===o.PDF_FORM_FIELD_TYPE.CHECKBOX},component:c,renderPreview:G,interactionDefaults:{isDraggable:!1,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,renderLocked:L}),l.createRenderer({id:"formRadioButton",matches:e=>{var n;return e.type===o.PdfAnnotationSubtype.WIDGET&&(null==(n=e.field)?void 0:n.type)===o.PDF_FORM_FIELD_TYPE.RADIOBUTTON},component:p,renderPreview:U,interactionDefaults:{isDraggable:!1,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,renderLocked:A}),l.createRenderer({id:"formCombobox",matches:e=>{var n;return e.type===o.PdfAnnotationSubtype.WIDGET&&(null==(n=e.field)?void 0:n.type)===o.PDF_FORM_FIELD_TYPE.COMBOBOX},component:v,renderPreview:K,interactionDefaults:{isDraggable:!1,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,renderLocked:$}),l.createRenderer({id:"formListbox",matches:e=>{var n;return e.type===o.PdfAnnotationSubtype.WIDGET&&(null==(n=e.field)?void 0:n.type)===o.PDF_FORM_FIELD_TYPE.LISTBOX},component:m,renderPreview:Y,interactionDefaults:{isDraggable:!1,isResizable:!0,isRotatable:!1},useAppearanceStream:!1,renderLocked:q})],H=t.defineComponent({__name:"form-renderer-registration",setup:e=>(l.useRegisterRenderers(X),(e,n)=>t.renderSlot(e.$slots,"default"))}),Z=e.createPluginPackage(n.FormPluginPackage).addUtility(H).build();exports.FormPluginPackage=Z,exports.useFormCapability=f,exports.useFormDocumentState=y,exports.useFormPlugin=()=>a.usePlugin(n.FormPlugin.id),exports.useFormWidgetState=g,Object.keys(n).forEach(e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|