@revolist/ui 4.0.3-rc → 4.0.3
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/MIGRATION.md +36 -0
- package/OWNERSHIP.md +32 -32
- package/README.md +136 -78
- package/_button.scss +6 -2
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/{calendar-xpZ0v3xf.js → calendar-CgXQgkga.js} +19 -19
- package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
- package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
- package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
- package/_chunks/choice-chips-SkllS5Kl.js +126 -0
- package/_chunks/{color-palette-D8vyPfld.js → color-palette-DMJUChWC.js} +20 -22
- package/_chunks/color-picker-BpCTuIdm.js +143 -0
- package/_chunks/{component-C_T2VN5u.js → component-CfeHXgIw.js} +279 -264
- package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-BKd7U8OW.js} +0 -8
- package/_chunks/configurator-actions-DnStE6Yl.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/{control-AHKXD5Eu.js → control-Dcrjsunl.js} +42 -17
- package/_chunks/controls-B_6NJarZ.js +650 -0
- package/_chunks/{date-control-DrVFX13g.js → date-control-C4h4m75W.js} +1 -1
- package/_chunks/{date-time-qIhp5vaX.js → date-time-CTOSbzb0.js} +317 -278
- package/_chunks/dialog.parts-3w5FR06n.js +131 -0
- package/_chunks/{duration-CL68Em0o.js → duration-Bf2OS1V5.js} +5 -5
- package/_chunks/editor-popup-ByU7qiub.js +82 -0
- package/_chunks/field-configurator-D5dZRhDe.js +288 -0
- package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-Bk4O_T7T.js} +1 -1
- package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
- package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
- package/_chunks/minus-BOAR3A1C.js +4 -0
- package/_chunks/mount-BRdcG60g.js +267 -0
- package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
- package/_chunks/native-control-B_fVA5bL.js +649 -0
- package/_chunks/{number-input-BKwA5FnM.js → number-input-CmM6_2vR.js} +7 -7
- package/_chunks/{picker-h1P5RUgp.js → picker-DTqET-2W.js} +2 -2
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
- package/_chunks/{popup-CT2uD3go.js → popup-C35Isk7p.js} +115 -104
- package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-C-6wcb9U.js} +1 -1
- package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-DIl1gkV6.js} +1 -1
- package/_chunks/request-trail-DrhdpWiH.js +762 -0
- package/_chunks/rich-text-BnilBbhU.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -0
- package/_chunks/selection-list-tooltips-C5oMJe26.js +42 -0
- package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
- package/_chunks/tooltip-D4xkio5G.js +54 -0
- package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
- package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
- package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
- package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
- package/_dialog.scss +57 -22
- package/_form.scss +71 -21
- package/_legend.scss +25 -7
- package/_shared/data-query/index.d.ts +2 -2
- package/_shared/data-query/load-options.d.ts +2 -2
- package/_variables.scss +34 -32
- package/_view-switcher.scss +6 -0
- package/activity-message.d.ts +1 -1
- package/ai/_chat.scss +35 -3
- package/ai/_style.scss +76 -16
- package/ai/chat.d.ts +3 -1
- package/ai/components.d.ts +16 -3
- package/ai/index.d.ts +1 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +30 -6
- package/ai/request-trail.d.ts +9 -3
- package/ai/results/_style.scss +83 -0
- package/ai/results/index.d.ts +11 -0
- package/ai/results/metrics.d.ts +5 -0
- package/ai/results/table.d.ts +5 -0
- package/ai/results/text.d.ts +5 -0
- package/ai/results/types.d.ts +29 -0
- package/ai/transcript.d.ts +2 -0
- package/ai/translations.d.ts +1 -1
- package/angular/angular.d.ts +1 -1
- package/angular/angular.js +13 -7
- package/assignee/assignee.scss +28 -6
- package/assignee/index.js +2 -2
- package/avatar/avatar.style.scss +23 -6
- package/avatar/index.d.ts +25 -2
- package/avatar/index.js +33 -32
- package/badge.d.ts +1 -1
- package/badge.view.d.ts +8 -0
- package/brush-range/_brush-range.scss +55 -49
- package/brush-range/component.d.ts +1 -3
- package/brush-range/component.js +27 -27
- package/buttons/delete-button.style.scss +6 -2
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.style.scss +1 -1
- package/buttons/svg-button.d.ts +1 -1
- package/buttons/svg-button.js +16 -16
- package/calendar/_calendar.scss +21 -25
- package/calendar/calendar.js +1 -1
- package/calendar/header.js +1 -2
- package/calendar/index.js +2 -2
- package/cell-input.scss +3 -7
- package/cell-visuals/badge.style.scss +6 -3
- package/cell-visuals/bar-chart.style.scss +2 -1
- package/cell-visuals/column-type.style.css +12 -0
- package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
- package/cell-visuals/progress-line.style.scss +1 -4
- package/cell-visuals/sparkline.style.scss +2 -1
- package/cell-visuals/timeline.style.css +4 -2
- package/checkbox/checkbox.scss +6 -24
- package/choice-chips/index.d.ts +3 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-palette.style.scss +88 -25
- package/color-palette/color-picker.js +2 -2
- package/color-palette/color-picker.style.scss +23 -10
- package/color-palette/common-palettes.d.ts +1 -1
- package/color-palette/common-palettes.js +1 -1
- package/color-palette/native.d.ts +15 -2
- package/component-catalog.d.ts +9 -7
- package/configurator-actions.d.ts +67 -0
- package/configurator-actions.js +1 -0
- package/configurator-aggregation-list.d.ts +14 -0
- package/configurator-aggregation-list.js +63 -0
- package/configurator-drop-zone.d.ts +39 -0
- package/configurator-drop-zone.js +66 -0
- package/configurator-field-icon.d.ts +10 -0
- package/configurator-field-icon.js +1 -0
- package/configurator-focus.d.ts +4 -0
- package/configurator-focus.js +39 -0
- package/configurator-sections.d.ts +42 -0
- package/configurator-sections.js +71 -0
- package/control-presentation.d.ts +8 -2
- package/control-presentation.js +25 -20
- package/controls.d.ts +12 -2
- package/controls.js +4 -3
- package/core/editor-popup-position.d.ts +6 -2
- package/core/editor-popup.d.ts +4 -0
- package/core/editor-popup.js +1 -1
- package/core/popover-controller.d.ts +35 -0
- package/core/popup-ownership.d.ts +2 -0
- package/core/selection-list-tooltips.d.ts +2 -0
- package/core/title-tooltip.d.ts +2 -0
- package/core/tooltip-session.d.ts +29 -0
- package/core/tooltip-surface.d.ts +13 -0
- package/core/tooltip-text.d.ts +6 -0
- package/core/tooltip.d.ts +35 -0
- package/core/top-layer-popup.d.ts +4 -0
- package/core/top-layer-popup.js +1 -23
- package/date-time/attach.d.ts +1 -1
- package/date-time/date-control.d.ts +1 -1
- package/date-time/field.d.ts +3 -2
- package/date-time/index.js +1 -1
- package/date-time/style.scss +239 -36
- package/date-time/time-selection.d.ts +3 -1
- package/date-time/types.d.ts +5 -1
- package/dialog/dialog-action-footer.d.ts +17 -2
- package/dialog/dialog.dom.d.ts +15 -2
- package/dialog/dialog.dom.js +9 -9
- package/dialog/dialog.parts.d.ts +1 -1
- package/dialog/dialog.parts.js +1 -1
- package/distribution-chart/_distribution-chart.scss +113 -77
- package/distribution-chart/area-chart.js +1 -1
- package/distribution-chart/bar-chart.js +1 -1
- package/distribution-chart/chart-frame.d.ts +1 -1
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/line-chart.js +1 -1
- package/dropdown/content.js +1 -1
- package/dropdown/control.js +1 -1
- package/dropdown/dropdown.types.d.ts +1 -1
- package/dropdown/editor-dropdown.style.scss +19 -9
- package/dropdown/index.js +2 -2
- package/dropdown/lookup-field.d.ts +5 -0
- package/dropdown/lookup-field.js +2 -1
- package/dropdown/popup.d.ts +2 -2
- package/dropdown/popup.js +1 -1
- package/duration/index.js +1 -1
- package/editor-actions.js +1 -1
- package/editor-layout/index.d.ts +4 -4
- package/editor-layout/index.js +39 -34
- package/editor-layout/style.scss +82 -18
- package/field-configurator.d.ts +39 -1
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/filter/filters/slider/_single-slider.scss +57 -38
- package/filter/filters/slider/_slider.scss +41 -33
- package/filter/filters/slider/control.js +2 -0
- package/filter/filters/slider/runtime.js +49 -22
- package/filter/filters/slider/single.js +1 -1
- package/filter-badge.js +1 -1
- package/filter-controls.d.ts +0 -1
- package/filter-controls.js +5 -6
- package/form-controls/index.d.ts +10 -2
- package/form-controls/index.js +7 -7
- package/form-controls/presentation.d.ts +1 -1
- package/form-controls/presentation.js +12 -12
- package/formatting/index.d.ts +1 -1
- package/formatting/index.js +22 -21
- package/formatting/styles.scss +14 -57
- package/framework.js +227 -224
- package/history-controls.js +27 -1
- package/icon-toolbar.d.ts +62 -0
- package/icon-toolbar.js +1 -0
- package/icons/icon.d.ts +1 -1
- package/legend.d.ts +1 -1
- package/masked-input/index.js +1 -1
- package/native-control.d.ts +1 -2
- package/native-control.js +1 -1
- package/native-controls.d.ts +54 -2
- package/native-styles.css +1 -1
- package/native-styles.scss +6 -2
- package/native.d.ts +3 -3
- package/native.js +46 -43
- package/number-input/index.d.ts +1 -1
- package/number-input/index.js +1 -1
- package/package.json +71 -2
- package/pagination.js +11 -11
- package/pdf-viewer/header.d.ts +1 -1
- package/pdf-viewer/index.d.ts +2 -2
- package/pdf-viewer/index.js +1 -1
- package/pdf-viewer/search-bar.d.ts +1 -1
- package/pdf-viewer/status.d.ts +1 -1
- package/pdf-viewer/style.scss +203 -42
- package/pickers.d.ts +5 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +13 -10
- package/preact.js +109 -64
- package/progress/_bar.scss +9 -3
- package/progress/_circular.scss +2 -1
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +4 -2
- package/react-control.d.ts +2 -0
- package/react-control.js +2 -2
- package/react.d.ts +7 -8
- package/react.js +67 -66
- package/reorder-list.d.ts +1 -1
- package/reorder-list.js +1 -1
- package/reorder-list.scss +59 -17
- package/resource-picker/resource-picker-popup.js +1 -1
- package/resource-picker/resource-picker.js +74 -72
- package/resource-picker/resource-picker.scss +62 -34
- package/rich-text/engine.d.ts +1 -0
- package/rich-text/format-html.d.ts +2 -0
- package/rich-text/index.d.ts +4 -0
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +2 -0
- package/rich-text/style.scss +293 -44
- package/rich-text/syntax.d.ts +5 -0
- package/rich-text/toolbar.d.ts +1 -1
- package/rich-text/translations.d.ts +2 -0
- package/search-input/index.js +1 -1
- package/search-input/native.d.ts +21 -2
- package/select.d.ts +3 -1
- package/select.js +1 -1
- package/selection-list.d.ts +1 -0
- package/selection-list.js +3 -1
- package/status-feedback/exit-snapshot.js +4 -4
- package/status-feedback/popover.js +4 -4
- package/status-feedback/status-feedback.scss +124 -35
- package/styles/_activity-message.scss +24 -7
- package/styles/_alert.scss +78 -17
- package/styles/_cell-editor-frame.scss +11 -0
- package/styles/_compositions.scss +400 -80
- package/styles/_control.scss +30 -8
- package/styles/_disclosure.scss +15 -5
- package/styles/_editor-counter.scss +16 -6
- package/styles/_editor-slider.scss +8 -4
- package/styles/_field-configurator.scss +321 -23
- package/styles/_fields-grid.scss +49 -0
- package/styles/_filter-controls.scss +10 -2
- package/styles/_icon-action.scss +48 -15
- package/styles/_loading.scss +12 -3
- package/styles/_motion.scss +32 -9
- package/styles/_palette.scss +0 -24
- package/styles/_primitives.scss +369 -110
- package/styles/_theme.scss +130 -86
- package/styles/_thresholds.scss +28 -25
- package/styles/_time-grid.scss +8 -3
- package/styles/_tokens.scss +6 -1
- package/styles/configurator-actions.scss +241 -0
- package/styles/pagination.css +213 -0
- package/styles/{legacy-rating.css → rating.css} +8 -3
- package/styles.css +1 -1
- package/styles.scss +3 -5
- package/surfaces.d.ts +38 -2
- package/surfaces.js +37 -134
- package/svelte/UiComponent.svelte +44 -11
- package/svelte.d.ts +1 -1
- package/svelte.js +3 -3
- package/switch/index.js +15 -14
- package/time-grid.d.ts +0 -1
- package/time-grid.js +38 -37
- package/timeline-track/_style.scss +96 -24
- package/timeline-track/index.js +2 -2
- package/ui.css +1 -1
- package/view-switcher.d.ts +23 -0
- package/vue.d.ts +29 -32
- package/vue.js +116 -121
- package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
- package/_chunks/choice-chips-CHQTUdLs.js +0 -110
- package/_chunks/color-picker-CudqPYZo.js +0 -138
- package/_chunks/control-tooltip-uscKfAnV.js +0 -100
- package/_chunks/controls-DsNi8V8I.js +0 -630
- package/_chunks/dialog.parts-CKGkC5zP.js +0 -134
- package/_chunks/editor-popup-WDdtVDNA.js +0 -81
- package/_chunks/history-controls-B3u3INEK.js +0 -27
- package/_chunks/mount-DQ1cpppK.js +0 -257
- package/_chunks/native-control-C_yok8_-.js +0 -605
- package/_chunks/request-trail-DSlFix6i.js +0 -618
- package/_chunks/rich-text-CH7gIqOS.js +0 -636
- package/avatar/index.view.d.ts +0 -25
- package/color-palette/native.view.d.ts +0 -15
- package/control-presentation.view.d.ts +0 -8
- package/dialog/dialog-action-footer.view.d.ts +0 -20
- package/dialog/dialog.dom.view.d.ts +0 -15
- package/form-controls/index.view.d.ts +0 -10
- package/formatting/control-tooltip.d.ts +0 -27
- package/native-controls.view.d.ts +0 -54
- package/search-input/native.view.d.ts +0 -21
- package/styles/legacy-pagination.css +0 -112
- package/surfaces.view.d.ts +0 -63
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
import { c as e, i as t } from "./preact.module-BBM36DnO.js";
|
|
2
2
|
import { i as n, n as r, r as i, t as a } from "./hooks.module-CG3gN83z.js";
|
|
3
3
|
import { t as o } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { t as A } from "./
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
4
|
+
import { createControlId as s } from "../core/control-id.js";
|
|
5
|
+
import { n as c, t as l } from "./popover-controller-D-AvKQ7B.js";
|
|
6
|
+
import { SvgIcon as u } from "../icons/icon.js";
|
|
7
|
+
import { l as d, n as f } from "./native-control-B_fVA5bL.js";
|
|
8
|
+
import { n as p } from "./popup-C35Isk7p.js";
|
|
9
|
+
import { t as m } from "./chevron-down-GbplLa6s.js";
|
|
10
|
+
import { D as h, F as g, I as _, R as v, b as y, g as b, l as x, p as S, t as C } from "./controls-B_6NJarZ.js";
|
|
11
|
+
import { n as w, t as T } from "./chevron-right-CM3ljziP.js";
|
|
12
|
+
import { t as E } from "./xmark-DD_PBvZI.js";
|
|
13
|
+
import { t as D } from "./tooltip-text-BXsUEmBH.js";
|
|
14
|
+
import { DialogController as O, attachMenuKeyboard as k } from "../surfaces.js";
|
|
15
|
+
import { t as A } from "./rotate-right-Iha5ScJ1.js";
|
|
16
|
+
import { t as j } from "./chevron-up-BLuNMPDn.js";
|
|
17
|
+
import { avatarTemplate as M } from "../avatar/index.js";
|
|
18
|
+
import { renderProgressBar as ee } from "../progress/bar.js";
|
|
19
|
+
import { t as te } from "./plus-CbGRkIGl.js";
|
|
20
|
+
import { t as ne } from "./minus-BOAR3A1C.js";
|
|
21
|
+
import { SearchInput as re } from "../search-input/index.js";
|
|
19
22
|
import { s as N } from "./iso-B0YHBK7m.js";
|
|
20
23
|
import { f as P, h as F, o as I } from "./model-mPO2tG2f.js";
|
|
21
|
-
import { n as L, t as R } from "./date-control-
|
|
22
|
-
import { t as z } from "./calendar-
|
|
23
|
-
import { t as B } from "./
|
|
24
|
+
import { n as L, t as R } from "./date-control-C4h4m75W.js";
|
|
25
|
+
import { t as z } from "./calendar-CgXQgkga.js";
|
|
26
|
+
import { t as B } from "./magnifying-glass-CvrTDSkB.js";
|
|
27
|
+
import { t as V } from "./controller-hRBm_Lfz.js";
|
|
24
28
|
//#region src/pickers.tsx
|
|
25
|
-
function
|
|
26
|
-
return /* @__PURE__ */ o(
|
|
29
|
+
function H(e) {
|
|
30
|
+
return /* @__PURE__ */ o(d, {
|
|
27
31
|
...e,
|
|
28
32
|
className: `rv-combobox ${e.className ?? ""}`,
|
|
29
33
|
config: {
|
|
@@ -33,8 +37,8 @@ function V(e) {
|
|
|
33
37
|
}
|
|
34
38
|
});
|
|
35
39
|
}
|
|
36
|
-
function
|
|
37
|
-
return /* @__PURE__ */ o(
|
|
40
|
+
function U(e) {
|
|
41
|
+
return /* @__PURE__ */ o(d, {
|
|
38
42
|
...e,
|
|
39
43
|
className: `rv-multi-select ${e.className ?? ""}`,
|
|
40
44
|
config: {
|
|
@@ -43,50 +47,61 @@ function H(e) {
|
|
|
43
47
|
}
|
|
44
48
|
});
|
|
45
49
|
}
|
|
46
|
-
function
|
|
47
|
-
return j(e, t);
|
|
48
|
-
}
|
|
49
|
-
function te(t) {
|
|
50
|
+
function ie(t) {
|
|
50
51
|
return M(e, t);
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
function ae(t) {
|
|
54
|
+
return ee(e, t);
|
|
55
|
+
}
|
|
56
|
+
function W({ open: e, anchor: t, appendTo: n, closeOnOutside: r, closeOnEscape: s, onClose: c, children: u, label: d, className: f = "", role: p = "dialog" }) {
|
|
57
|
+
let m = a(null), h = a(c);
|
|
58
|
+
h.current = c;
|
|
59
|
+
let g = a({
|
|
60
|
+
closeOnOutside: r,
|
|
61
|
+
closeOnEscape: s
|
|
62
|
+
}).current;
|
|
63
|
+
return g.closeOnOutside = r, g.closeOnEscape = s, i(() => {
|
|
64
|
+
if (!e || !t || !m.current) return;
|
|
65
|
+
let r = m.current, i = new l(), a = !0;
|
|
57
66
|
i.open({
|
|
58
67
|
anchor: t,
|
|
59
68
|
appendTo: n,
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
get closeOnOutside() {
|
|
70
|
+
return g.closeOnOutside;
|
|
71
|
+
},
|
|
72
|
+
get closeOnEscape() {
|
|
73
|
+
return g.closeOnEscape;
|
|
74
|
+
},
|
|
75
|
+
content: m.current,
|
|
76
|
+
display: p === "menu" ? "grid" : void 0,
|
|
62
77
|
onClose: () => {
|
|
63
|
-
a &&
|
|
78
|
+
a && h.current();
|
|
64
79
|
}
|
|
65
80
|
});
|
|
66
|
-
let o =
|
|
81
|
+
let o = p === "menu" ? k(r, () => i.close(), g) : void 0;
|
|
67
82
|
return () => {
|
|
68
83
|
a = !1, o?.(), i.destroy(), r.hidden = !0;
|
|
69
84
|
};
|
|
70
85
|
}, [
|
|
71
86
|
e,
|
|
72
87
|
t,
|
|
73
|
-
|
|
88
|
+
p,
|
|
74
89
|
n
|
|
75
90
|
]), /* @__PURE__ */ o("div", {
|
|
76
|
-
ref:
|
|
77
|
-
class: `rv-popover ${
|
|
78
|
-
role:
|
|
79
|
-
"aria-label":
|
|
91
|
+
ref: m,
|
|
92
|
+
class: `rv-popover ${p === "menu" ? "rv-menu " : ""}${f}`,
|
|
93
|
+
role: p,
|
|
94
|
+
"aria-label": d,
|
|
80
95
|
hidden: !e,
|
|
81
|
-
children: e ?
|
|
96
|
+
children: e ? u : null
|
|
82
97
|
});
|
|
83
98
|
}
|
|
84
|
-
function
|
|
99
|
+
function oe({ text: e, children: t }) {
|
|
85
100
|
let n = a(null);
|
|
86
101
|
return i(() => {
|
|
87
102
|
let t = n.current;
|
|
88
103
|
if (!t) return;
|
|
89
|
-
let r = new
|
|
104
|
+
let r = new c(), i, a = () => {
|
|
90
105
|
let n = t.querySelector("button, input, a[href], [tabindex]") ?? t;
|
|
91
106
|
n !== i && (r.bind(n, e), i = n);
|
|
92
107
|
};
|
|
@@ -106,7 +121,7 @@ function ne({ text: e, children: t }) {
|
|
|
106
121
|
children: t
|
|
107
122
|
});
|
|
108
123
|
}
|
|
109
|
-
function G({ open: e, title: r, closeLabel: s, onClose: c, children: l, footer:
|
|
124
|
+
function G({ open: e, title: r, closeLabel: s, onClose: c, children: l, footer: u, draggable: d, returnFocus: f }) {
|
|
110
125
|
let m = a(null), h = a(c);
|
|
111
126
|
h.current = c;
|
|
112
127
|
let [g, _] = n();
|
|
@@ -115,11 +130,11 @@ function G({ open: e, title: r, closeLabel: s, onClose: c, children: l, footer:
|
|
|
115
130
|
_(void 0);
|
|
116
131
|
return;
|
|
117
132
|
}
|
|
118
|
-
let t = new
|
|
133
|
+
let t = new O(m.current.ownerDocument), n = !0, i = t.open({
|
|
119
134
|
title: r,
|
|
120
135
|
closeLabel: s,
|
|
121
|
-
draggable:
|
|
122
|
-
returnFocus:
|
|
136
|
+
draggable: d,
|
|
137
|
+
returnFocus: f,
|
|
123
138
|
surfaceClass: "rv-ui-dialog",
|
|
124
139
|
onClose: () => {
|
|
125
140
|
_(void 0), n && h.current();
|
|
@@ -135,25 +150,25 @@ function G({ open: e, title: r, closeLabel: s, onClose: c, children: l, footer:
|
|
|
135
150
|
e,
|
|
136
151
|
r,
|
|
137
152
|
s,
|
|
138
|
-
|
|
139
|
-
|
|
153
|
+
d,
|
|
154
|
+
f
|
|
140
155
|
]), /* @__PURE__ */ o(t, { children: [
|
|
141
156
|
/* @__PURE__ */ o("span", {
|
|
142
157
|
ref: m,
|
|
143
158
|
hidden: !0
|
|
144
159
|
}),
|
|
145
|
-
g &&
|
|
146
|
-
g &&
|
|
160
|
+
g && p(l, g.body),
|
|
161
|
+
g && u && p(u, g.footer)
|
|
147
162
|
] });
|
|
148
163
|
}
|
|
149
|
-
function
|
|
164
|
+
function se({ onConfirm: e, confirmLabel: n, cancelLabel: r, pending: i, ...a }) {
|
|
150
165
|
return /* @__PURE__ */ o(G, {
|
|
151
166
|
...a,
|
|
152
|
-
footer: /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(
|
|
167
|
+
footer: /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(C, {
|
|
153
168
|
disabled: i,
|
|
154
169
|
onClick: a.onClose,
|
|
155
170
|
children: r
|
|
156
|
-
}), /* @__PURE__ */ o(
|
|
171
|
+
}), /* @__PURE__ */ o(C, {
|
|
157
172
|
variant: "primary",
|
|
158
173
|
disabled: i,
|
|
159
174
|
onClick: e,
|
|
@@ -161,55 +176,55 @@ function re({ onConfirm: e, confirmLabel: n, cancelLabel: r, pending: i, ...a })
|
|
|
161
176
|
})] })
|
|
162
177
|
});
|
|
163
178
|
}
|
|
164
|
-
function
|
|
165
|
-
let [
|
|
179
|
+
function ce({ value: e, onChange: t, label: r, openLabel: a, disabled: c, readOnly: l, ...d }) {
|
|
180
|
+
let [f, p] = n(!1), [m, h] = n(null), [g, _] = n(e && N(e) ? e : F()), [v, y] = n(P(g, d.calendarSystem)), [b] = n(() => s("rv-date-picker"));
|
|
166
181
|
return i(() => {
|
|
167
|
-
(c || l) &&
|
|
182
|
+
(c || l) && p(!1);
|
|
168
183
|
}, [c, l]), /* @__PURE__ */ o("div", {
|
|
169
184
|
class: "rv-date-picker",
|
|
170
185
|
children: [
|
|
171
186
|
/* @__PURE__ */ o(R, {
|
|
172
187
|
label: r,
|
|
173
188
|
value: e ?? "",
|
|
174
|
-
minDate:
|
|
175
|
-
maxDate:
|
|
189
|
+
minDate: d.minDate,
|
|
190
|
+
maxDate: d.maxDate,
|
|
176
191
|
disabled: c,
|
|
177
192
|
readOnly: l,
|
|
178
193
|
onChange: (e) => {
|
|
179
|
-
typeof e != "string" || c || l || e && (
|
|
194
|
+
typeof e != "string" || c || l || e && (d.minDate && e < d.minDate || d.maxDate && e > d.maxDate) || (!e || N(e)) && t(e || void 0);
|
|
180
195
|
}
|
|
181
196
|
}),
|
|
182
|
-
/* @__PURE__ */ o(
|
|
183
|
-
ref:
|
|
197
|
+
/* @__PURE__ */ o(C, {
|
|
198
|
+
ref: h,
|
|
184
199
|
"aria-label": a,
|
|
185
200
|
"aria-haspopup": "dialog",
|
|
186
|
-
"aria-expanded":
|
|
201
|
+
"aria-expanded": f,
|
|
187
202
|
"aria-controls": b,
|
|
188
203
|
disabled: c || l,
|
|
189
204
|
onClick: () => {
|
|
190
|
-
e && N(e) && (
|
|
205
|
+
e && N(e) && (_(e), y(P(e, d.calendarSystem))), p(!f);
|
|
191
206
|
},
|
|
192
|
-
children: /* @__PURE__ */ o(
|
|
207
|
+
children: /* @__PURE__ */ o(u, { svg: L })
|
|
193
208
|
}),
|
|
194
209
|
/* @__PURE__ */ o(W, {
|
|
195
|
-
open:
|
|
196
|
-
anchor:
|
|
197
|
-
onClose: () =>
|
|
210
|
+
open: f,
|
|
211
|
+
anchor: m,
|
|
212
|
+
onClose: () => p(!1),
|
|
198
213
|
label: r,
|
|
199
214
|
children: /* @__PURE__ */ o("div", {
|
|
200
215
|
id: b,
|
|
201
216
|
children: /* @__PURE__ */ o(z, {
|
|
202
|
-
...
|
|
203
|
-
month:
|
|
204
|
-
focusedDate:
|
|
217
|
+
...d,
|
|
218
|
+
month: v,
|
|
219
|
+
focusedDate: g,
|
|
205
220
|
selection: e ? {
|
|
206
221
|
from: e,
|
|
207
222
|
to: e
|
|
208
223
|
} : void 0,
|
|
209
224
|
onMonthChange: y,
|
|
210
|
-
onFocusedDateChange:
|
|
225
|
+
onFocusedDateChange: _,
|
|
211
226
|
onSelect: (e) => {
|
|
212
|
-
t(e),
|
|
227
|
+
t(e), p(!1), m?.focus();
|
|
213
228
|
}
|
|
214
229
|
})
|
|
215
230
|
})
|
|
@@ -217,13 +232,13 @@ function ie({ value: e, onChange: t, label: r, openLabel: a, disabled: c, readOn
|
|
|
217
232
|
]
|
|
218
233
|
});
|
|
219
234
|
}
|
|
220
|
-
function
|
|
221
|
-
let [
|
|
235
|
+
function le({ value: e, onChange: t, label: r, fromLabel: a, toLabel: c, openLabel: l, disabled: d, readOnly: f, ...p }) {
|
|
236
|
+
let [m, h] = n(!1), [g, _] = n(null), [v, y] = n(), [b, x] = n(e?.from ?? F()), [S, w] = n(P(b, p.calendarSystem)), [T] = n(() => s("rv-date-picker"));
|
|
222
237
|
i(() => {
|
|
223
|
-
(
|
|
224
|
-
}, [
|
|
238
|
+
(d || f) && (h(!1), y(void 0));
|
|
239
|
+
}, [d, f]);
|
|
225
240
|
let E = (n, r) => {
|
|
226
|
-
if (
|
|
241
|
+
if (d || f || !N(r) || p.minDate && r < p.minDate || p.maxDate && r > p.maxDate) return;
|
|
227
242
|
let i = r;
|
|
228
243
|
t(I(n === "from" ? i : e?.from ?? i, n === "to" ? i : e?.to ?? i));
|
|
229
244
|
};
|
|
@@ -235,10 +250,10 @@ function ae({ value: e, onChange: t, label: r, fromLabel: a, toLabel: c, openLab
|
|
|
235
250
|
/* @__PURE__ */ o(R, {
|
|
236
251
|
label: a,
|
|
237
252
|
value: e?.from ?? "",
|
|
238
|
-
disabled:
|
|
239
|
-
readOnly:
|
|
240
|
-
minDate:
|
|
241
|
-
maxDate:
|
|
253
|
+
disabled: d,
|
|
254
|
+
readOnly: f,
|
|
255
|
+
minDate: p.minDate,
|
|
256
|
+
maxDate: p.maxDate,
|
|
242
257
|
onChange: (e) => {
|
|
243
258
|
typeof e == "string" && E("from", e);
|
|
244
259
|
}
|
|
@@ -246,44 +261,44 @@ function ae({ value: e, onChange: t, label: r, fromLabel: a, toLabel: c, openLab
|
|
|
246
261
|
/* @__PURE__ */ o(R, {
|
|
247
262
|
label: c,
|
|
248
263
|
value: e?.to ?? "",
|
|
249
|
-
disabled:
|
|
250
|
-
readOnly:
|
|
251
|
-
minDate:
|
|
252
|
-
maxDate:
|
|
264
|
+
disabled: d,
|
|
265
|
+
readOnly: f,
|
|
266
|
+
minDate: p.minDate,
|
|
267
|
+
maxDate: p.maxDate,
|
|
253
268
|
onChange: (e) => {
|
|
254
269
|
typeof e == "string" && E("to", e);
|
|
255
270
|
}
|
|
256
271
|
}),
|
|
257
|
-
/* @__PURE__ */ o(
|
|
258
|
-
ref:
|
|
259
|
-
disabled:
|
|
272
|
+
/* @__PURE__ */ o(C, {
|
|
273
|
+
ref: _,
|
|
274
|
+
disabled: d || f,
|
|
260
275
|
"aria-label": l,
|
|
261
276
|
"aria-haspopup": "dialog",
|
|
262
|
-
"aria-expanded":
|
|
277
|
+
"aria-expanded": m,
|
|
263
278
|
"aria-controls": T,
|
|
264
279
|
onClick: () => {
|
|
265
|
-
y(void 0), e && (x(e.from), w(P(e.from,
|
|
280
|
+
y(void 0), e && (x(e.from), w(P(e.from, p.calendarSystem))), h(!m);
|
|
266
281
|
},
|
|
267
|
-
children: /* @__PURE__ */ o(
|
|
282
|
+
children: /* @__PURE__ */ o(u, { svg: L })
|
|
268
283
|
}),
|
|
269
284
|
/* @__PURE__ */ o(W, {
|
|
270
|
-
open:
|
|
271
|
-
anchor:
|
|
285
|
+
open: m,
|
|
286
|
+
anchor: g,
|
|
272
287
|
onClose: () => {
|
|
273
|
-
|
|
288
|
+
h(!1), y(void 0);
|
|
274
289
|
},
|
|
275
290
|
label: r,
|
|
276
291
|
children: /* @__PURE__ */ o("div", {
|
|
277
292
|
id: T,
|
|
278
293
|
children: /* @__PURE__ */ o(z, {
|
|
279
|
-
...
|
|
294
|
+
...p,
|
|
280
295
|
month: S,
|
|
281
296
|
focusedDate: b,
|
|
282
|
-
selection:
|
|
297
|
+
selection: v ? I(v, b) : e,
|
|
283
298
|
onMonthChange: w,
|
|
284
299
|
onFocusedDateChange: x,
|
|
285
300
|
onSelect: (e) => {
|
|
286
|
-
|
|
301
|
+
v ? (t(I(v, e)), y(void 0), h(!1), g?.focus()) : y(e);
|
|
287
302
|
}
|
|
288
303
|
})
|
|
289
304
|
})
|
|
@@ -362,28 +377,28 @@ function X(e, t) {
|
|
|
362
377
|
//#endregion
|
|
363
378
|
//#region src/pdf-viewer/icons.ts
|
|
364
379
|
var Z = {
|
|
365
|
-
previous:
|
|
366
|
-
next:
|
|
380
|
+
previous: w,
|
|
381
|
+
next: T,
|
|
367
382
|
document: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M96 0C60.7 0 32 28.7 32 64l0 384c0 35.3 28.7 64 64 64l80 0 0-112c0-35.3 28.7-64 64-64l176 0 0-165.5c0-17-6.7-33.3-18.7-45.3L290.7 18.7C278.7 6.7 262.5 0 245.5 0L96 0zM357.5 176L264 176c-13.3 0-24-10.7-24-24L240 58.5 357.5 176zM240 380c-11 0-20 9-20 20l0 128c0 11 9 20 20 20s20-9 20-20l0-28 12 0c33.1 0 60-26.9 60-60s-26.9-60-60-60l-32 0zm32 80l-12 0 0-40 12 0c11 0 20 9 20 20s-9 20-20 20zm96-80c-11 0-20 9-20 20l0 128c0 11 9 20 20 20l32 0c28.7 0 52-23.3 52-52l0-64c0-28.7-23.3-52-52-52l-32 0zm20 128l0-88 12 0c6.6 0 12 5.4 12 12l0 64c0 6.6-5.4 12-12 12l-12 0zm88-108l0 128c0 11 9 20 20 20s20-9 20-20l0-44 28 0c11 0 20-9 20-20s-9-20-20-20l-28 0 0-24 28 0c11 0 20-9 20-20s-9-20-20-20l-48 0c-11 0-20 9-20 20z\"/></svg>",
|
|
368
383
|
open: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M56 225.6L32.4 296.2 32.4 96c0-35.3 28.7-64 64-64l138.7 0c13.8 0 27.3 4.5 38.4 12.8l38.4 28.8c5.5 4.2 12.3 6.4 19.2 6.4l117.3 0c35.3 0 64 28.7 64 64l0 16-365.4 0c-41.3 0-78 26.4-91.1 65.6zM477.8 448L99 448c-32.8 0-55.9-32.1-45.5-63.2l48-144C108 221.2 126.4 208 147 208l378.8 0c32.8 0 55.9 32.1 45.5 63.2l-48 144c-6.5 19.6-24.9 32.8-45.5 32.8z\"/></svg>",
|
|
369
|
-
search:
|
|
370
|
-
minus:
|
|
371
|
-
plus:
|
|
372
|
-
rotate:
|
|
384
|
+
search: B,
|
|
385
|
+
minus: ne,
|
|
386
|
+
plus: te,
|
|
387
|
+
rotate: A,
|
|
373
388
|
download: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M256 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 210.7-41.4-41.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 242.7 256 32zM64 320c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-46.9 0-56.6 56.6c-31.2 31.2-81.9 31.2-113.1 0L110.9 320 64 320zm304 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z\"/></svg>",
|
|
374
389
|
print: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M64 64C64 28.7 92.7 0 128 0L341.5 0c17 0 33.3 6.7 45.3 18.7l42.5 42.5c12 12 18.7 28.3 18.7 45.3l0 37.5-384 0 0-80zM0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 96c0 17.7-14.3 32-32 32l-32 0 0 64c0 35.3-28.7 64-64 64l-256 0c-35.3 0-64-28.7-64-64l0-64-32 0c-17.7 0-32-14.3-32-32l0-96zM128 416l0 32 256 0 0-96-256 0 0 64zM456 272a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z\"/></svg>",
|
|
375
|
-
close:
|
|
376
|
-
up:
|
|
377
|
-
down:
|
|
390
|
+
close: E,
|
|
391
|
+
up: j,
|
|
392
|
+
down: m,
|
|
378
393
|
more: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 128 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z\"/></svg>"
|
|
379
394
|
};
|
|
380
395
|
//#endregion
|
|
381
396
|
//#region src/pdf-viewer/toolbar.tsx
|
|
382
397
|
function Q(e) {
|
|
383
|
-
let { controller: r, state:
|
|
384
|
-
let t =
|
|
398
|
+
let { controller: r, state: s } = e, c = J(e.text), l = Y(e.config), p = s.status === "ready", m = (e) => l.buttons?.[e] !== !1, h = (e) => {
|
|
399
|
+
let t = l.buttons?.[e];
|
|
385
400
|
return t === !1 ? {} : t ?? {};
|
|
386
|
-
},
|
|
401
|
+
}, v = (t) => X(e.config, t), [x, w] = n(!1), T = a(null), E = a(null), [D, O] = n(String(s.page || "")), k = Number.isFinite(l.zoomStep) && l.zoomStep > 1 ? l.zoomStep : 1.25, A = [...new Set((l.zoomLevels ?? [
|
|
387
402
|
"page-width",
|
|
388
403
|
"page-fit",
|
|
389
404
|
.5,
|
|
@@ -395,22 +410,22 @@ function Q(e) {
|
|
|
395
410
|
3,
|
|
396
411
|
5
|
|
397
412
|
]).filter((e) => e === "page-width" || e === "page-fit" || typeof e == "number" && Number.isFinite(e) && e >= .25 && e <= 5))];
|
|
398
|
-
A.includes(
|
|
399
|
-
O(String(
|
|
400
|
-
}, [
|
|
413
|
+
A.includes(s.zoom) || A.push(s.zoom), i(() => {
|
|
414
|
+
O(String(s.page || ""));
|
|
415
|
+
}, [s.page, r]), i(() => {
|
|
401
416
|
w(!1);
|
|
402
417
|
}, [
|
|
403
418
|
e.config,
|
|
404
|
-
|
|
419
|
+
p,
|
|
405
420
|
r
|
|
406
421
|
]), i(() => {
|
|
407
|
-
if (!
|
|
422
|
+
if (!x) return;
|
|
408
423
|
E.current?.querySelector("[role=\"menuitem\"]:not(:disabled)")?.focus();
|
|
409
424
|
let e = T.current, t = new ResizeObserver(() => {
|
|
410
425
|
e && !e.getClientRects().length && w(!1);
|
|
411
426
|
});
|
|
412
427
|
return e && t.observe(e), () => t.disconnect();
|
|
413
|
-
}, [
|
|
428
|
+
}, [x]);
|
|
414
429
|
let j = () => {
|
|
415
430
|
w(!1), T.current?.focus({ preventScroll: !0 });
|
|
416
431
|
}, M = () => {
|
|
@@ -424,88 +439,88 @@ function Q(e) {
|
|
|
424
439
|
"rotate",
|
|
425
440
|
"download",
|
|
426
441
|
"print"
|
|
427
|
-
].some(
|
|
428
|
-
label:
|
|
429
|
-
className: `rv-pdf-viewer__toolbar rv-toolbar--surface ${
|
|
442
|
+
].some(v) ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(g, {
|
|
443
|
+
label: c.toolbar,
|
|
444
|
+
className: `rv-pdf-viewer__toolbar rv-toolbar--surface ${l.className ?? ""}`,
|
|
430
445
|
children: [
|
|
431
|
-
|
|
446
|
+
v("open") && /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(C, {
|
|
432
447
|
variant: "ghost",
|
|
433
448
|
size: "compact",
|
|
434
|
-
...
|
|
435
|
-
title:
|
|
436
|
-
"aria-label":
|
|
449
|
+
...h("open"),
|
|
450
|
+
title: h("open").title ?? c.open,
|
|
451
|
+
"aria-label": c.open,
|
|
437
452
|
onClick: () => e.onOpen(),
|
|
438
|
-
children: [/* @__PURE__ */ o(
|
|
453
|
+
children: [/* @__PURE__ */ o(u, { svg: Z.open }), /* @__PURE__ */ o("span", {
|
|
439
454
|
class: "rv-pdf-viewer__open-label",
|
|
440
|
-
children:
|
|
455
|
+
children: c.open
|
|
441
456
|
})]
|
|
442
457
|
}) }),
|
|
443
|
-
|
|
444
|
-
label:
|
|
445
|
-
children: /* @__PURE__ */ o(
|
|
446
|
-
page:
|
|
447
|
-
pageCount:
|
|
458
|
+
v("navigation") && (l.boundaryButtons || m("previous") || m("next") || l.showPageInput !== !1 || l.showPageCount !== !1) && /* @__PURE__ */ o(_, {
|
|
459
|
+
label: c.page,
|
|
460
|
+
children: /* @__PURE__ */ o(y, {
|
|
461
|
+
page: s.page - 1,
|
|
462
|
+
pageCount: s.pageCount,
|
|
448
463
|
onChange: (e) => r.goToPage(e + 1),
|
|
449
|
-
label:
|
|
450
|
-
previousLabel:
|
|
451
|
-
nextLabel:
|
|
452
|
-
firstLabel:
|
|
453
|
-
lastLabel:
|
|
464
|
+
label: c.page,
|
|
465
|
+
previousLabel: c.previous,
|
|
466
|
+
nextLabel: c.next,
|
|
467
|
+
firstLabel: c.first,
|
|
468
|
+
lastLabel: c.last,
|
|
454
469
|
variant: "icons",
|
|
455
|
-
disabled: !
|
|
456
|
-
boundaryButtons:
|
|
470
|
+
disabled: !p,
|
|
471
|
+
boundaryButtons: l.boundaryButtons,
|
|
457
472
|
buttons: {
|
|
458
|
-
first:
|
|
459
|
-
previous:
|
|
460
|
-
next:
|
|
461
|
-
last:
|
|
473
|
+
first: l.buttons?.first,
|
|
474
|
+
previous: l.buttons?.previous,
|
|
475
|
+
next: l.buttons?.next,
|
|
476
|
+
last: l.buttons?.last
|
|
462
477
|
},
|
|
463
|
-
children: [
|
|
478
|
+
children: [l.showPageInput !== !1 && /* @__PURE__ */ o(f, {
|
|
464
479
|
class: "rv-pdf-viewer__page-input",
|
|
465
480
|
type: "number",
|
|
466
481
|
min: 1,
|
|
467
|
-
max:
|
|
468
|
-
disabled: !
|
|
469
|
-
"aria-label":
|
|
482
|
+
max: s.pageCount || 1,
|
|
483
|
+
disabled: !p,
|
|
484
|
+
"aria-label": c.page,
|
|
470
485
|
value: D,
|
|
471
486
|
onInput: (e) => O(e.currentTarget.value),
|
|
472
487
|
onChange: M,
|
|
473
488
|
onKeyDown: (e) => {
|
|
474
|
-
e.key === "Enter" && (e.preventDefault(), M()), e.key === "Escape" && (e.preventDefault(), O(String(
|
|
489
|
+
e.key === "Enter" && (e.preventDefault(), M()), e.key === "Escape" && (e.preventDefault(), O(String(s.page)));
|
|
475
490
|
}
|
|
476
|
-
}),
|
|
491
|
+
}), l.showPageCount !== !1 && /* @__PURE__ */ o("span", {
|
|
477
492
|
class: "rv-pdf-viewer__page-count",
|
|
478
|
-
children: q(
|
|
479
|
-
of:
|
|
480
|
-
pages:
|
|
493
|
+
children: q(c.pageCount, {
|
|
494
|
+
of: c.of,
|
|
495
|
+
pages: s.pageCount
|
|
481
496
|
})
|
|
482
497
|
})]
|
|
483
498
|
})
|
|
484
499
|
}),
|
|
485
|
-
|
|
486
|
-
label:
|
|
500
|
+
v("zoom") && (m("zoomOut") || m("zoomIn") || l.showZoomSelect !== !1) && /* @__PURE__ */ o(_, {
|
|
501
|
+
label: c.zoom,
|
|
487
502
|
children: [
|
|
488
|
-
|
|
489
|
-
...
|
|
490
|
-
label:
|
|
503
|
+
m("zoomOut") && /* @__PURE__ */ o(S, {
|
|
504
|
+
...h("zoomOut"),
|
|
505
|
+
label: c.zoomOut,
|
|
491
506
|
icon: Z.minus,
|
|
492
507
|
size: "compact",
|
|
493
|
-
disabled: !
|
|
494
|
-
onClick: () => r.setZoom(
|
|
508
|
+
disabled: !p || s.scale <= .25 || !!h("zoomOut").disabled,
|
|
509
|
+
onClick: () => r.setZoom(s.scale / k)
|
|
495
510
|
}),
|
|
496
|
-
|
|
511
|
+
l.showZoomSelect !== !1 && /* @__PURE__ */ o("div", {
|
|
497
512
|
class: "rv-pdf-viewer__zoom-select",
|
|
498
|
-
children: /* @__PURE__ */ o(
|
|
513
|
+
children: /* @__PURE__ */ o(d, {
|
|
499
514
|
className: "rv-select",
|
|
500
515
|
config: {
|
|
501
|
-
ariaLabel:
|
|
516
|
+
ariaLabel: c.zoom,
|
|
502
517
|
portalTarget: e.appendTo
|
|
503
518
|
},
|
|
504
|
-
disabled: !
|
|
505
|
-
value: String(
|
|
519
|
+
disabled: !p,
|
|
520
|
+
value: String(s.zoom),
|
|
506
521
|
source: A.map((e) => ({
|
|
507
522
|
value: String(e),
|
|
508
|
-
label: e === "page-width" ?
|
|
523
|
+
label: e === "page-width" ? c.fitWidth : e === "page-fit" ? c.fitPage : q(c.zoomPercentage, { percent: Math.round(e * 100) })
|
|
509
524
|
})),
|
|
510
525
|
onChange: (e) => {
|
|
511
526
|
let t = String(e);
|
|
@@ -513,111 +528,111 @@ function Q(e) {
|
|
|
513
528
|
}
|
|
514
529
|
})
|
|
515
530
|
}),
|
|
516
|
-
|
|
517
|
-
...
|
|
518
|
-
label:
|
|
531
|
+
m("zoomIn") && /* @__PURE__ */ o(S, {
|
|
532
|
+
...h("zoomIn"),
|
|
533
|
+
label: c.zoomIn,
|
|
519
534
|
icon: Z.plus,
|
|
520
535
|
size: "compact",
|
|
521
|
-
disabled: !
|
|
522
|
-
onClick: () => r.setZoom(
|
|
536
|
+
disabled: !p || s.scale >= 5 || !!h("zoomIn").disabled,
|
|
537
|
+
onClick: () => r.setZoom(s.scale * k)
|
|
523
538
|
})
|
|
524
539
|
]
|
|
525
540
|
}),
|
|
526
|
-
|
|
527
|
-
...
|
|
528
|
-
label:
|
|
541
|
+
v("search") && /* @__PURE__ */ o(_, { children: m("search") && /* @__PURE__ */ o(S, {
|
|
542
|
+
...h("search"),
|
|
543
|
+
label: c.search,
|
|
529
544
|
icon: Z.search,
|
|
530
545
|
size: "compact",
|
|
531
|
-
disabled: !
|
|
546
|
+
disabled: !p || !!h("search").disabled,
|
|
532
547
|
"aria-expanded": e.searchOpen,
|
|
533
548
|
"aria-controls": e.searchId,
|
|
534
549
|
"aria-keyshortcuts": "Control+f Meta+f",
|
|
535
550
|
onClick: (t) => e.onToggleSearch(t.currentTarget)
|
|
536
551
|
}) }),
|
|
537
|
-
(
|
|
552
|
+
(v("rotate") || v("download") || v("print")) && /* @__PURE__ */ o(_, {
|
|
538
553
|
className: "rv-pdf-viewer__actions rv-pdf-viewer__desktop-actions",
|
|
539
554
|
children: [
|
|
540
|
-
|
|
541
|
-
...
|
|
542
|
-
label:
|
|
555
|
+
v("rotate") && /* @__PURE__ */ o(S, {
|
|
556
|
+
...h("rotate"),
|
|
557
|
+
label: c.rotate,
|
|
543
558
|
icon: Z.rotate,
|
|
544
559
|
size: "compact",
|
|
545
|
-
disabled: !
|
|
560
|
+
disabled: !p || !!h("rotate").disabled,
|
|
546
561
|
onClick: () => r.rotate()
|
|
547
562
|
}),
|
|
548
|
-
|
|
549
|
-
...
|
|
550
|
-
label:
|
|
563
|
+
v("download") && /* @__PURE__ */ o(S, {
|
|
564
|
+
...h("download"),
|
|
565
|
+
label: c.download,
|
|
551
566
|
icon: Z.download,
|
|
552
567
|
size: "compact",
|
|
553
|
-
disabled: !
|
|
568
|
+
disabled: !p || !!h("download").disabled,
|
|
554
569
|
onClick: () => void r.download()
|
|
555
570
|
}),
|
|
556
|
-
|
|
557
|
-
...
|
|
558
|
-
label:
|
|
571
|
+
v("print") && /* @__PURE__ */ o(S, {
|
|
572
|
+
...h("print"),
|
|
573
|
+
label: c.print,
|
|
559
574
|
icon: Z.print,
|
|
560
575
|
size: "compact",
|
|
561
|
-
disabled: !
|
|
562
|
-
busy:
|
|
576
|
+
disabled: !p || s.printing || !!h("print").disabled,
|
|
577
|
+
busy: s.printing,
|
|
563
578
|
onClick: () => void r.print()
|
|
564
579
|
})
|
|
565
580
|
]
|
|
566
581
|
}),
|
|
567
|
-
(
|
|
582
|
+
(v("rotate") || v("download") || v("print")) && /* @__PURE__ */ o(_, {
|
|
568
583
|
className: "rv-pdf-viewer__more",
|
|
569
|
-
children: /* @__PURE__ */ o(
|
|
584
|
+
children: /* @__PURE__ */ o(C, {
|
|
570
585
|
ref: T,
|
|
571
586
|
variant: "ghost",
|
|
572
587
|
size: "compact",
|
|
573
588
|
className: "rv-btn-icon",
|
|
574
|
-
title:
|
|
575
|
-
"aria-label":
|
|
589
|
+
title: c.more,
|
|
590
|
+
"aria-label": c.more,
|
|
576
591
|
"aria-haspopup": "menu",
|
|
577
|
-
"aria-expanded":
|
|
578
|
-
disabled: !
|
|
579
|
-
onClick: () => w(!
|
|
592
|
+
"aria-expanded": x,
|
|
593
|
+
disabled: !p,
|
|
594
|
+
onClick: () => w(!x),
|
|
580
595
|
onKeyDown: (e) => {
|
|
581
596
|
e.key === "ArrowDown" && (e.preventDefault(), w(!0));
|
|
582
597
|
},
|
|
583
|
-
children: /* @__PURE__ */ o(
|
|
598
|
+
children: /* @__PURE__ */ o(u, { svg: Z.more })
|
|
584
599
|
})
|
|
585
600
|
})
|
|
586
601
|
]
|
|
587
602
|
}), /* @__PURE__ */ o(W, {
|
|
588
|
-
open:
|
|
603
|
+
open: x,
|
|
589
604
|
anchor: T.current,
|
|
590
605
|
appendTo: e.appendTo,
|
|
591
606
|
onClose: () => w(!1),
|
|
592
607
|
role: "menu",
|
|
593
|
-
label:
|
|
608
|
+
label: c.more,
|
|
594
609
|
children: /* @__PURE__ */ o("div", {
|
|
595
610
|
ref: E,
|
|
596
611
|
class: "rv-pdf-viewer__menu",
|
|
597
612
|
children: [
|
|
598
|
-
|
|
599
|
-
className:
|
|
600
|
-
disabled: !!
|
|
613
|
+
v("rotate") && /* @__PURE__ */ o(b, {
|
|
614
|
+
className: h("rotate").className,
|
|
615
|
+
disabled: !!h("rotate").disabled,
|
|
601
616
|
onClick: () => {
|
|
602
617
|
r.rotate(), j();
|
|
603
618
|
},
|
|
604
|
-
children: [/* @__PURE__ */ o(
|
|
619
|
+
children: [/* @__PURE__ */ o(u, { svg: Z.rotate }), c.rotate]
|
|
605
620
|
}),
|
|
606
|
-
|
|
607
|
-
className:
|
|
608
|
-
disabled: !!
|
|
621
|
+
v("download") && /* @__PURE__ */ o(b, {
|
|
622
|
+
className: h("download").className,
|
|
623
|
+
disabled: !!h("download").disabled,
|
|
609
624
|
onClick: () => {
|
|
610
625
|
r.download(), j();
|
|
611
626
|
},
|
|
612
|
-
children: [/* @__PURE__ */ o(
|
|
627
|
+
children: [/* @__PURE__ */ o(u, { svg: Z.download }), c.download]
|
|
613
628
|
}),
|
|
614
|
-
|
|
615
|
-
className:
|
|
616
|
-
disabled:
|
|
629
|
+
v("print") && /* @__PURE__ */ o(b, {
|
|
630
|
+
className: h("print").className,
|
|
631
|
+
disabled: s.printing || !!h("print").disabled,
|
|
617
632
|
onClick: () => {
|
|
618
633
|
r.print(), j();
|
|
619
634
|
},
|
|
620
|
-
children: [/* @__PURE__ */ o(
|
|
635
|
+
children: [/* @__PURE__ */ o(u, { svg: Z.print }), c.print]
|
|
621
636
|
})
|
|
622
637
|
]
|
|
623
638
|
})
|
|
@@ -625,10 +640,10 @@ function Q(e) {
|
|
|
625
640
|
}
|
|
626
641
|
//#endregion
|
|
627
642
|
//#region src/pdf-viewer/search-bar.tsx
|
|
628
|
-
function
|
|
629
|
-
let
|
|
643
|
+
function ue({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: s }) {
|
|
644
|
+
let c = n.status === "ready";
|
|
630
645
|
return i(() => {
|
|
631
|
-
|
|
646
|
+
s.current?.focus();
|
|
632
647
|
}, []), /* @__PURE__ */ o("div", {
|
|
633
648
|
id: e,
|
|
634
649
|
class: "rv-pdf-viewer__search",
|
|
@@ -637,13 +652,13 @@ function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }
|
|
|
637
652
|
onKeyDown: (e) => {
|
|
638
653
|
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), a());
|
|
639
654
|
},
|
|
640
|
-
children: [/* @__PURE__ */ o(
|
|
641
|
-
icon: /* @__PURE__ */ o(
|
|
642
|
-
inputRef:
|
|
655
|
+
children: [/* @__PURE__ */ o(re, {
|
|
656
|
+
icon: /* @__PURE__ */ o(u, { svg: Z.search }),
|
|
657
|
+
inputRef: s,
|
|
643
658
|
"aria-label": r.search,
|
|
644
659
|
placeholder: r.search,
|
|
645
660
|
value: n.query,
|
|
646
|
-
disabled: !
|
|
661
|
+
disabled: !c,
|
|
647
662
|
onValueChange: (e) => t.search(e),
|
|
648
663
|
onKeyDown: (e) => {
|
|
649
664
|
e.key === "Enter" && (e.preventDefault(), t.search(n.query, e.shiftKey, !0));
|
|
@@ -660,21 +675,21 @@ function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }
|
|
|
660
675
|
matches: r.matches
|
|
661
676
|
}) : r.noMatches : ""
|
|
662
677
|
}),
|
|
663
|
-
/* @__PURE__ */ o(
|
|
678
|
+
/* @__PURE__ */ o(S, {
|
|
664
679
|
label: r.previousMatch,
|
|
665
680
|
icon: Z.up,
|
|
666
681
|
size: "compact",
|
|
667
|
-
disabled: !
|
|
682
|
+
disabled: !c || !n.matchCount,
|
|
668
683
|
onClick: () => t.search(n.query, !0, !0)
|
|
669
684
|
}),
|
|
670
|
-
/* @__PURE__ */ o(
|
|
685
|
+
/* @__PURE__ */ o(S, {
|
|
671
686
|
label: r.nextMatch,
|
|
672
687
|
icon: Z.down,
|
|
673
688
|
size: "compact",
|
|
674
|
-
disabled: !
|
|
689
|
+
disabled: !c || !n.matchCount,
|
|
675
690
|
onClick: () => t.search(n.query, !1, !0)
|
|
676
691
|
}),
|
|
677
|
-
/* @__PURE__ */ o(
|
|
692
|
+
/* @__PURE__ */ o(S, {
|
|
678
693
|
label: r.closeSearch,
|
|
679
694
|
icon: Z.close,
|
|
680
695
|
size: "compact",
|
|
@@ -686,15 +701,15 @@ function oe({ id: e, controller: t, state: n, text: r, onClose: a, inputRef: c }
|
|
|
686
701
|
}
|
|
687
702
|
//#endregion
|
|
688
703
|
//#region src/pdf-viewer/header.tsx
|
|
689
|
-
function
|
|
704
|
+
function de({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
|
|
690
705
|
let a = e.status === "ready";
|
|
691
706
|
return /* @__PURE__ */ o("header", {
|
|
692
707
|
class: "rv-pdf-viewer__header",
|
|
693
708
|
children: [
|
|
694
|
-
i && /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(
|
|
709
|
+
i && /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(u, {
|
|
695
710
|
svg: Z.document,
|
|
696
711
|
className: "rv-svg-icon rv-pdf-viewer__document-icon"
|
|
697
|
-
}), /* @__PURE__ */ o(
|
|
712
|
+
}), /* @__PURE__ */ o(D, {
|
|
698
713
|
class: "rv-pdf-viewer__filename",
|
|
699
714
|
title: e.fileName,
|
|
700
715
|
children: e.fileName
|
|
@@ -708,7 +723,7 @@ function se({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
|
|
|
708
723
|
pages: e.pageCount
|
|
709
724
|
}) : ""
|
|
710
725
|
}),
|
|
711
|
-
e.printing && /* @__PURE__ */ o(
|
|
726
|
+
e.printing && /* @__PURE__ */ o(C, {
|
|
712
727
|
variant: "ghost",
|
|
713
728
|
size: "compact",
|
|
714
729
|
onClick: () => r(),
|
|
@@ -719,24 +734,24 @@ function se({ state: e, text: n, onCancelPrint: r, showDetails: i = !0 }) {
|
|
|
719
734
|
}
|
|
720
735
|
//#endregion
|
|
721
736
|
//#region src/pdf-viewer/status.tsx
|
|
722
|
-
function
|
|
723
|
-
return e.status === "loading" ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(
|
|
737
|
+
function fe({ state: e, text: n, controller: r, canOpen: i, onOpen: a }) {
|
|
738
|
+
return e.status === "loading" ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ o(h, { label: n.loading }), /* @__PURE__ */ o("span", { children: n.loading })] }) : e.status === "error" ? /* @__PURE__ */ o(v, {
|
|
724
739
|
tone: "danger",
|
|
725
740
|
title: n.error,
|
|
726
741
|
description: n.errorDescription,
|
|
727
|
-
actions: /* @__PURE__ */ o(t, { children: [r.canRetry && /* @__PURE__ */ o(
|
|
742
|
+
actions: /* @__PURE__ */ o(t, { children: [r.canRetry && /* @__PURE__ */ o(C, {
|
|
728
743
|
size: "compact",
|
|
729
744
|
onClick: () => void r.retry(),
|
|
730
745
|
children: n.retry
|
|
731
|
-
}), i && /* @__PURE__ */ o(
|
|
746
|
+
}), i && /* @__PURE__ */ o(C, {
|
|
732
747
|
size: "compact",
|
|
733
748
|
onClick: () => a(),
|
|
734
749
|
children: n.open
|
|
735
750
|
})] })
|
|
736
|
-
}) : /* @__PURE__ */ o(
|
|
751
|
+
}) : /* @__PURE__ */ o(x, {
|
|
737
752
|
title: n.empty,
|
|
738
753
|
description: n.emptyHint,
|
|
739
|
-
children: i && /* @__PURE__ */ o(
|
|
754
|
+
children: i && /* @__PURE__ */ o(C, {
|
|
740
755
|
variant: "primary",
|
|
741
756
|
onClick: () => a(),
|
|
742
757
|
children: n.open
|
|
@@ -745,8 +760,8 @@ function ce({ state: e, text: n, controller: r, canOpen: i, onOpen: a }) {
|
|
|
745
760
|
}
|
|
746
761
|
//#endregion
|
|
747
762
|
//#region src/pdf-viewer/component.tsx
|
|
748
|
-
function
|
|
749
|
-
let t = r(() => new
|
|
763
|
+
function pe(e) {
|
|
764
|
+
let t = r(() => new V(e), [
|
|
750
765
|
e.workerSrc,
|
|
751
766
|
e.documentOptions,
|
|
752
767
|
e.initialPage,
|
|
@@ -759,13 +774,13 @@ function le(e) {
|
|
|
759
774
|
});
|
|
760
775
|
}
|
|
761
776
|
function $(e) {
|
|
762
|
-
let { controller: t } = e, [r,
|
|
763
|
-
let t =
|
|
777
|
+
let { controller: t } = e, [r, c] = n(t.snapshot), [l, u] = n(!1), [d] = n(() => s("rv-pdf-search")), p = a(null), m = a(null), h = a(null), g = a(null), _ = a(null), y = J(e.text), b = r.status === "ready", x = Y(e.toolbar).buttons, S = (e) => {
|
|
778
|
+
let t = x?.[e];
|
|
764
779
|
return t !== !1 && !t?.disabled;
|
|
765
|
-
},
|
|
766
|
-
t.setCallbacks(e), t.setPrintTitle(
|
|
767
|
-
let n = t.subscribe(
|
|
768
|
-
return t.attach(
|
|
780
|
+
}, C = X(e.toolbar, "search") && S("search"), w = X(e.toolbar, "open") && S("open");
|
|
781
|
+
t.setCallbacks(e), t.setPrintTitle(y.printDocument), i(() => {
|
|
782
|
+
let n = t.subscribe(c);
|
|
783
|
+
return t.attach(h.current).catch(() => {}), e.onReady?.(t), () => {
|
|
769
784
|
n(), t.destroy();
|
|
770
785
|
};
|
|
771
786
|
}, [t]), i(() => {
|
|
@@ -777,87 +792,87 @@ function $(e) {
|
|
|
777
792
|
]);
|
|
778
793
|
let T = () => {
|
|
779
794
|
t.clearSearch(), u(!1);
|
|
780
|
-
let e =
|
|
781
|
-
e?.isConnected && !e.hasAttribute("disabled") ? e.focus({ preventScroll: !0 }) :
|
|
795
|
+
let e = p.current;
|
|
796
|
+
e?.isConnected && !e.hasAttribute("disabled") ? e.focus({ preventScroll: !0 }) : h.current?.focus({ preventScroll: !0 });
|
|
782
797
|
}, E = (e) => {
|
|
783
|
-
|
|
798
|
+
l || (p.current = e), u(!0), _.current?.focus();
|
|
784
799
|
};
|
|
785
800
|
i(() => {
|
|
786
|
-
|
|
787
|
-
}, [
|
|
801
|
+
C || (t.clearSearch(), u(!1), l && h.current?.focus({ preventScroll: !0 }));
|
|
802
|
+
}, [C, t]);
|
|
788
803
|
let D = {
|
|
789
804
|
controller: t,
|
|
790
805
|
state: r,
|
|
791
|
-
text:
|
|
806
|
+
text: y,
|
|
792
807
|
config: e.toolbar,
|
|
793
|
-
searchOpen:
|
|
808
|
+
searchOpen: l,
|
|
794
809
|
searchId: d,
|
|
795
|
-
appendTo:
|
|
810
|
+
appendTo: m.current ?? void 0,
|
|
796
811
|
onOpen: () => g.current?.click(),
|
|
797
|
-
onToggleSearch: (e) =>
|
|
812
|
+
onToggleSearch: (e) => l ? T() : E(e)
|
|
798
813
|
};
|
|
799
814
|
return /* @__PURE__ */ o("section", {
|
|
800
|
-
ref:
|
|
815
|
+
ref: m,
|
|
801
816
|
class: `rv-pdf-viewer ${e.className ?? ""}`,
|
|
802
817
|
style: { height: e.height ?? 640 },
|
|
803
|
-
"aria-label":
|
|
818
|
+
"aria-label": y.viewer,
|
|
804
819
|
onKeyDown: (e) => {
|
|
805
|
-
(e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "f" &&
|
|
820
|
+
(e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "f" && b && C && (e.preventDefault(), E(e.target));
|
|
806
821
|
},
|
|
807
822
|
children: [
|
|
808
|
-
(e.showHeader !== !1 || r.printing) && /* @__PURE__ */ o(
|
|
823
|
+
(e.showHeader !== !1 || r.printing) && /* @__PURE__ */ o(de, {
|
|
809
824
|
showDetails: e.showHeader !== !1,
|
|
810
825
|
state: r,
|
|
811
|
-
text:
|
|
826
|
+
text: y,
|
|
812
827
|
onCancelPrint: () => t.cancelPrint()
|
|
813
828
|
}),
|
|
814
829
|
e.toolbar !== !1 && (e.renderToolbar ? e.renderToolbar(t, r, D) : /* @__PURE__ */ o(Q, { ...D })),
|
|
815
|
-
/* @__PURE__ */ o(
|
|
830
|
+
/* @__PURE__ */ o(f, {
|
|
816
831
|
ref: g,
|
|
817
832
|
type: "file",
|
|
818
833
|
accept: "application/pdf,.pdf",
|
|
819
834
|
hidden: !0,
|
|
820
|
-
"aria-label":
|
|
835
|
+
"aria-label": y.open,
|
|
821
836
|
onChange: (e) => {
|
|
822
837
|
let n = e.currentTarget.files?.[0];
|
|
823
838
|
e.currentTarget.value = "", n && t.load(n);
|
|
824
839
|
}
|
|
825
840
|
}),
|
|
826
|
-
|
|
841
|
+
l && C && /* @__PURE__ */ o(ue, {
|
|
827
842
|
inputRef: _,
|
|
828
843
|
id: d,
|
|
829
844
|
controller: t,
|
|
830
845
|
state: r,
|
|
831
|
-
text:
|
|
846
|
+
text: y,
|
|
832
847
|
onClose: T
|
|
833
848
|
}),
|
|
834
849
|
/* @__PURE__ */ o("div", {
|
|
835
850
|
class: "rv-pdf-viewer__body",
|
|
836
851
|
"aria-busy": r.status === "loading",
|
|
837
852
|
children: [/* @__PURE__ */ o("div", {
|
|
838
|
-
ref:
|
|
853
|
+
ref: h,
|
|
839
854
|
class: "rv-pdf-viewer__viewport",
|
|
840
855
|
tabIndex: 0,
|
|
841
856
|
role: "region",
|
|
842
|
-
"aria-label":
|
|
843
|
-
}), !
|
|
857
|
+
"aria-label": y.pages
|
|
858
|
+
}), !b && /* @__PURE__ */ o("div", {
|
|
844
859
|
class: "rv-pdf-viewer__status",
|
|
845
|
-
children: e.renderStatus ? e.renderStatus(r) : /* @__PURE__ */ o(
|
|
860
|
+
children: e.renderStatus ? e.renderStatus(r) : /* @__PURE__ */ o(fe, {
|
|
846
861
|
state: r,
|
|
847
|
-
text:
|
|
862
|
+
text: y,
|
|
848
863
|
controller: t,
|
|
849
864
|
canOpen: w,
|
|
850
865
|
onOpen: D.onOpen
|
|
851
866
|
})
|
|
852
867
|
})]
|
|
853
868
|
}),
|
|
854
|
-
|
|
869
|
+
b && r.error && /* @__PURE__ */ o(v, {
|
|
855
870
|
className: "rv-pdf-viewer__error",
|
|
856
871
|
tone: "danger",
|
|
857
|
-
description:
|
|
872
|
+
description: y.operationError
|
|
858
873
|
})
|
|
859
874
|
]
|
|
860
875
|
});
|
|
861
876
|
}
|
|
862
877
|
//#endregion
|
|
863
|
-
export {
|
|
878
|
+
export { ie as a, ce as c, U as d, W as f, K as i, le as l, oe as m, $ as n, H as o, ae as p, Q as r, se as s, pe as t, G as u };
|