@wow-two-beta/fe 0.0.32 → 0.0.33
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/dist/chunks/Alert.vue_vue_type_script_setup_true_lang-CoLxB2dM.js +155 -0
- package/dist/chunks/Alert.vue_vue_type_script_setup_true_lang-CoLxB2dM.js.map +1 -0
- package/dist/chunks/{FieldHelperText.vue_vue_type_script_setup_true_lang-B-G5rNMG.js → ColorSwatchPreview.vue_vue_type_script_setup_true_lang-Btd7KUEw.js} +70 -230
- package/dist/chunks/ColorSwatchPreview.vue_vue_type_script_setup_true_lang-Btd7KUEw.js.map +1 -0
- package/dist/chunks/{ErrorBoundary.vue_vue_type_script_setup_true_lang-Dv9wOZmk.js → ErrorBoundary.vue_vue_type_script_setup_true_lang-E72RRrNG.js} +87 -233
- package/dist/chunks/ErrorBoundary.vue_vue_type_script_setup_true_lang-E72RRrNG.js.map +1 -0
- package/dist/chunks/FieldHelperText.vue_vue_type_script_setup_true_lang-2IDI_JgQ.js +216 -0
- package/dist/chunks/FieldHelperText.vue_vue_type_script_setup_true_lang-2IDI_JgQ.js.map +1 -0
- package/dist/chunks/{KanbanCard.vue_vue_type_script_setup_true_lang-DKgIhFwh.js → KanbanCard.vue_vue_type_script_setup_true_lang-BrQFyOiU.js} +177 -223
- package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-BrQFyOiU.js.map +1 -0
- package/dist/chunks/MasonryLayout.vue_vue_type_script_setup_true_lang-BmWwoZrv.js.map +1 -1
- package/dist/chunks/TypedConfirmField.vue_vue_type_script_setup_true_lang-DXCZlnlM.js +447 -0
- package/dist/chunks/TypedConfirmField.vue_vue_type_script_setup_true_lang-DXCZlnlM.js.map +1 -0
- package/dist/chunks/{LightboxModal.vue_vue_type_script_setup_true_lang-CP7Or4sf.js → TypedConfirmModal.vue_vue_type_script_setup_true_lang-CoIaH_xx.js} +299 -108
- package/dist/chunks/TypedConfirmModal.vue_vue_type_script_setup_true_lang-CoIaH_xx.js.map +1 -0
- package/dist/chunks/{MentionInput.vue_vue_type_script_setup_true_lang-D8Ja7QjX.js → UseTypedConfirmation-CvY2T4Up.js} +331 -582
- package/dist/chunks/UseTypedConfirmation-CvY2T4Up.js.map +1 -0
- package/dist/foundation/http/ApiDecoderExtensions.d.ts +22 -0
- package/dist/foundation/http/ApiFailureExtensions.d.ts +22 -0
- package/dist/foundation/http/ProblemDetailsExtensions.d.ts +31 -0
- package/dist/foundation/http/index.d.ts +3 -0
- package/dist/foundation/http/index.js +93 -2
- package/dist/foundation/http/index.js.map +1 -1
- package/dist/index.js +632 -627
- package/dist/index.js.map +1 -1
- package/dist/presentation/display/index.js +158 -157
- package/dist/presentation/display/index.js.map +1 -1
- package/dist/presentation/feedback/index.js +43 -42
- package/dist/presentation/feedback/index.js.map +1 -1
- package/dist/presentation/forms/index.d.ts +1 -0
- package/dist/presentation/forms/index.js +139 -137
- package/dist/presentation/forms/tagsInput/TagsInput.vue.d.ts +1 -1
- package/dist/presentation/forms/typedConfirmField/TypedConfirmField.vue.d.ts +61 -0
- package/dist/presentation/forms/typedConfirmField/UseTypedConfirmation.d.ts +32 -0
- package/dist/presentation/forms/typedConfirmField/index.d.ts +2 -0
- package/dist/presentation/overlays/index.d.ts +1 -0
- package/dist/presentation/overlays/index.js +6 -5
- package/dist/presentation/overlays/typedConfirmModal/TypedConfirmModal.vue.d.ts +64 -0
- package/dist/presentation/overlays/typedConfirmModal/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunks/ErrorBoundary.vue_vue_type_script_setup_true_lang-Dv9wOZmk.js.map +0 -1
- package/dist/chunks/FieldHelperText.vue_vue_type_script_setup_true_lang-B-G5rNMG.js.map +0 -1
- package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-DKgIhFwh.js.map +0 -1
- package/dist/chunks/LightboxModal.vue_vue_type_script_setup_true_lang-CP7Or4sf.js.map +0 -1
- package/dist/chunks/ListboxPicker.variants-hiMcl66_.js +0 -44
- package/dist/chunks/ListboxPicker.variants-hiMcl66_.js.map +0 -1
- package/dist/chunks/MentionInput.vue_vue_type_script_setup_true_lang-D8Ja7QjX.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { _, _ as _2, I, a, b, c, L, d, e } from "../../chunks/TypedConfirmField.vue_vue_type_script_setup_true_lang-DXCZlnlM.js";
|
|
2
|
+
import { _ as _3 } from "../../chunks/PointControl.vue_vue_type_script_setup_true_lang-akWl2-sE.js";
|
|
3
|
+
import { A, _ as _4, B, a as a2, b as b2, C, c as c2, d as d2, e as e2, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, D, E, F, G, H, I as I2, J, K, L as L2, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, $, a0, a1, a2 as a22, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2 as b22, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV } from "../../chunks/UseTypedConfirmation-CvY2T4Up.js";
|
|
4
|
+
import { _ as _5, C as C2 } from "../../chunks/ColorSwatchPreview.vue_vue_type_script_setup_true_lang-Btd7KUEw.js";
|
|
4
5
|
import { ImageEditRecipeExtensions } from "../../domain/imageEditing/index.js";
|
|
5
|
-
import { L as L2 } from "../../chunks/ListboxPicker.variants-hiMcl66_.js";
|
|
6
6
|
export {
|
|
7
7
|
A as AddressCountries,
|
|
8
|
-
|
|
8
|
+
_4 as AddressEditor,
|
|
9
9
|
B as BuiltInFonts,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
a2 as CalendarPicker,
|
|
11
|
+
b2 as CascaderPicker,
|
|
12
12
|
C as CategoryDisplays,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
c2 as CategoryNavVariant,
|
|
14
|
+
d2 as CategoryOrder,
|
|
15
|
+
e2 as CenterEmojiSize,
|
|
16
16
|
f as CenterEmojiSizeDisplays,
|
|
17
17
|
g as ChatComposerInput,
|
|
18
18
|
h as CheckboxField,
|
|
19
19
|
i as CheckboxGroup,
|
|
20
20
|
j as CheckboxGroupKey,
|
|
21
|
-
|
|
21
|
+
_5 as CheckboxInput,
|
|
22
22
|
C2 as CheckboxInputVariant,
|
|
23
23
|
k as ChoiceCard,
|
|
24
24
|
l as CodeEditor,
|
|
@@ -41,10 +41,10 @@ export {
|
|
|
41
41
|
F as CronFieldKind,
|
|
42
42
|
G as CronInput,
|
|
43
43
|
H as CurrencyInput,
|
|
44
|
-
|
|
44
|
+
I2 as DataGridEditor,
|
|
45
45
|
J as DataGridEditorCellType,
|
|
46
46
|
K as DataGridEditorColumnAlign,
|
|
47
|
-
|
|
47
|
+
L2 as DateInput,
|
|
48
48
|
M as DatePicker,
|
|
49
49
|
N as DateRangePicker,
|
|
50
50
|
O as DateTimeInput,
|
|
@@ -62,134 +62,136 @@ export {
|
|
|
62
62
|
$ as EmojiEmptyLabels,
|
|
63
63
|
a0 as EmojiPicker,
|
|
64
64
|
a1 as EmojiPickerPopover,
|
|
65
|
-
|
|
65
|
+
a22 as EmojiPickerSizes,
|
|
66
66
|
a3 as EmojiRecentsKey,
|
|
67
67
|
a4 as EmojiSizePicker,
|
|
68
68
|
a5 as EmojiTileShape,
|
|
69
69
|
a6 as ExactNumberInput,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
_ as Field,
|
|
71
|
+
a7 as FilePicker,
|
|
72
|
+
a8 as FileRejectionReason,
|
|
73
|
+
a9 as FileUploadPicker,
|
|
74
|
+
aa as FontPicker,
|
|
75
|
+
_2 as FormField,
|
|
76
|
+
ab as GradientKind,
|
|
77
|
+
ac as GradientPicker,
|
|
78
|
+
ad as IconPicker,
|
|
79
|
+
ae as ImageCropEditor,
|
|
80
80
|
ImageEditRecipeExtensions,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
81
|
+
af as ImageEditor,
|
|
82
|
+
I as InputBorder,
|
|
83
|
+
a as InputRing,
|
|
84
|
+
b as InputSize,
|
|
85
|
+
c as InputState,
|
|
86
|
+
ag as JsonEditor,
|
|
87
|
+
ah as JsonEditorMode,
|
|
88
|
+
ai as KeyboardShortcutPicker,
|
|
89
|
+
aj as KnobInput,
|
|
90
|
+
ak as KnobInputTone,
|
|
91
|
+
al as LabeledField,
|
|
92
|
+
am as ListboxPicker,
|
|
93
|
+
an as ListboxPickerEmpty,
|
|
94
|
+
ao as ListboxPickerGroup,
|
|
95
|
+
ap as ListboxPickerIndicator,
|
|
96
|
+
aq as ListboxPickerItem,
|
|
97
|
+
L as ListboxPickerItemState,
|
|
98
|
+
ar as ListboxPickerSeparator,
|
|
99
|
+
as as MarkdownEditor,
|
|
100
|
+
at as MarkdownEditorView,
|
|
101
|
+
au as MaskedInput,
|
|
102
|
+
av as MentionInput,
|
|
103
|
+
aw as MonthPicker,
|
|
104
|
+
ax as MultiSelectPicker,
|
|
105
|
+
ay as MultiSelectPickerContent,
|
|
106
|
+
az as MultiSelectPickerItem,
|
|
107
|
+
aA as MultiSelectPickerTags,
|
|
108
|
+
aB as MultiSelectPickerTrigger,
|
|
109
|
+
aC as NodeEditor,
|
|
110
|
+
aD as NumberInput,
|
|
111
|
+
aE as OptionTileGroupField,
|
|
112
|
+
aF as OptionTilePicker,
|
|
113
|
+
aG as PasswordInput,
|
|
114
|
+
aH as PercentInput,
|
|
115
|
+
aI as PhoneCountries,
|
|
116
|
+
aJ as PhoneInput,
|
|
117
|
+
aK as PickerElement,
|
|
118
|
+
aL as PinInput,
|
|
119
|
+
aM as PinInputType,
|
|
120
|
+
_3 as PointControl,
|
|
121
|
+
aN as RadioField,
|
|
122
|
+
aO as RadioGroup,
|
|
123
|
+
aP as RadioGroupKey,
|
|
124
|
+
aQ as RadioInput,
|
|
125
|
+
aR as RangeCalendarPicker,
|
|
126
|
+
aS as RangeSliderInput,
|
|
127
|
+
aT as RangeSliderInputSize,
|
|
128
|
+
aU as RatingPicker,
|
|
129
|
+
aV as RatingPickerSize,
|
|
130
|
+
aW as RatingStep,
|
|
131
|
+
aX as ReactionPicker,
|
|
132
|
+
aY as RecentCategory,
|
|
133
|
+
aZ as RecurrenceEditor,
|
|
134
|
+
a_ as RecurrenceEndMode,
|
|
135
|
+
a$ as RecurrenceFreq,
|
|
136
|
+
b0 as RecurrenceWeekday,
|
|
137
|
+
b1 as SearchInput,
|
|
138
|
+
b22 as SegmentedPicker,
|
|
139
|
+
b3 as SelectPicker,
|
|
140
|
+
b4 as SelectPickerContent,
|
|
141
|
+
b5 as SelectPickerItem,
|
|
142
|
+
b6 as SelectPickerSize,
|
|
143
|
+
b7 as SelectPickerTrigger,
|
|
144
|
+
b8 as SelectPickerValue,
|
|
145
|
+
b9 as SignatureFormat,
|
|
146
|
+
ba as SignatureInput,
|
|
147
|
+
bb as SliderInput,
|
|
148
|
+
bc as SortableGroup,
|
|
149
|
+
bd as SortableGroupHandle,
|
|
150
|
+
be as SortableGroupItem,
|
|
151
|
+
bf as SortableGroupMoveButton,
|
|
152
|
+
bg as SubmitTrigger,
|
|
153
|
+
bh as SwitchField,
|
|
154
|
+
bi as SwitchInput,
|
|
155
|
+
bj as TagsInput,
|
|
156
|
+
bk as TelInput,
|
|
157
|
+
bl as TextAreaInput,
|
|
158
|
+
d as TextInput,
|
|
159
|
+
bm as TimeInput,
|
|
160
|
+
bn as TimePicker,
|
|
161
|
+
bo as TimezonePicker,
|
|
162
|
+
bp as ToggleGroup,
|
|
163
|
+
bq as ToggleGroupKey,
|
|
164
|
+
br as ToggleGroupVariant,
|
|
165
|
+
bs as ToggleInput,
|
|
166
|
+
bt as ToggleInputElement,
|
|
167
|
+
bu as ToggleInputVariant,
|
|
168
|
+
bv as ToggleItemRole,
|
|
169
|
+
bw as ToggleMode,
|
|
170
|
+
bx as TransferPicker,
|
|
171
|
+
by as TreeSelectPicker,
|
|
172
|
+
e as TypedConfirmField,
|
|
173
|
+
bz as UrlInput,
|
|
174
|
+
bA as WizardForm,
|
|
175
|
+
bB as WizardFormFooter,
|
|
176
|
+
bC as WizardFormStep,
|
|
177
|
+
bD as WizardFormSteps,
|
|
178
|
+
bE as YearPicker,
|
|
179
|
+
bF as controlGroupVariants,
|
|
180
|
+
bG as gradientToCss,
|
|
181
|
+
bH as optionTileGroupVariants,
|
|
182
|
+
bI as optionTileVariants,
|
|
183
|
+
bJ as resolveElementSize,
|
|
184
|
+
bK as selectTriggerVariants,
|
|
185
|
+
bL as toggleButtonVariants,
|
|
186
|
+
bM as useCheckboxGroup,
|
|
187
|
+
bN as useComboboxContext,
|
|
188
|
+
bO as useEditableContext,
|
|
189
|
+
bP as useEmojiPicker,
|
|
190
|
+
bQ as useMultiSelectContext,
|
|
191
|
+
bR as useRadioGroup,
|
|
192
|
+
bS as useSortableItem,
|
|
193
|
+
bT as useSortableRoot,
|
|
194
|
+
bU as useTypedConfirmation,
|
|
195
|
+
bV as useWizard
|
|
194
196
|
};
|
|
195
197
|
//# sourceMappingURL=index.js.map
|
|
@@ -67,8 +67,8 @@ declare const _default: import('vue').DefineComponent<TagsInputProps, {
|
|
|
67
67
|
readonly isDisabled: boolean;
|
|
68
68
|
readonly isReadOnly: boolean;
|
|
69
69
|
readonly readonly: boolean;
|
|
70
|
-
readonly readOnly: boolean;
|
|
71
70
|
readonly validate: (tag: string) => boolean;
|
|
71
|
+
readonly readOnly: boolean;
|
|
72
72
|
readonly canAddDuplicates: boolean;
|
|
73
73
|
readonly allowsDuplicates: boolean;
|
|
74
74
|
readonly tagVariant: TagVariant;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** Defines props for the field where a reader types a target's ID to enable a dangerous action. */
|
|
2
|
+
export interface TypedConfirmFieldProps {
|
|
3
|
+
/** The exact text the reader types — the target's ID or name. Case and whitespace count. */
|
|
4
|
+
readonly expected: string;
|
|
5
|
+
/** The typed text, controlled. The `v-model` binding target; send it as the API's `confirm`. */
|
|
6
|
+
readonly modelValue?: string;
|
|
7
|
+
/** The initial typed text when uncontrolled. Default `''`. */
|
|
8
|
+
readonly defaultValue?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The label template; `{expected}` marks where the expected text shows as code. Default
|
|
11
|
+
* `"Type {expected} to confirm"`, localized. The `label` slot is the rich override.
|
|
12
|
+
*/
|
|
13
|
+
readonly label?: string;
|
|
14
|
+
/** The helper beneath the input, hidden while an error shows. The `helper` slot is the rich override. */
|
|
15
|
+
readonly helper?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The error once the reader leaves the input holding other text; `{expected}` marks the expected text. Default
|
|
18
|
+
* `"Type {expected} exactly as shown."`, localized.
|
|
19
|
+
*/
|
|
20
|
+
readonly mismatchError?: string;
|
|
21
|
+
/** The error that replaces the mismatch error — a refusal the API sent back, say. */
|
|
22
|
+
readonly error?: string;
|
|
23
|
+
/** The announcement once the typed text matches. Default `"The text matches."`, localized. */
|
|
24
|
+
readonly matchedLabel?: string;
|
|
25
|
+
/** The required state. Default `true`. */
|
|
26
|
+
readonly isRequired?: boolean;
|
|
27
|
+
/** The disabled state. */
|
|
28
|
+
readonly isDisabled?: boolean;
|
|
29
|
+
/** Keeps the typed text and focus but blocks changes — set it while the confirmed action runs. */
|
|
30
|
+
readonly isReadOnly?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare const _default: __VLS_WithSlots<import('vue').DefineComponent<TypedConfirmFieldProps, {
|
|
33
|
+
el: import('vue').ComputedRef<HTMLInputElement | null>;
|
|
34
|
+
isConfirmed: import('vue').ComputedRef<boolean>;
|
|
35
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
36
|
+
"update:modelValue": (value: string) => any;
|
|
37
|
+
}, string, import('vue').PublicProps, Readonly<TypedConfirmFieldProps> & Readonly<{
|
|
38
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
readonly label: string;
|
|
41
|
+
readonly error: string;
|
|
42
|
+
readonly helper: string;
|
|
43
|
+
readonly isDisabled: boolean;
|
|
44
|
+
readonly isRequired: boolean;
|
|
45
|
+
readonly isReadOnly: boolean;
|
|
46
|
+
readonly defaultValue: string;
|
|
47
|
+
readonly modelValue: string;
|
|
48
|
+
readonly mismatchError: string;
|
|
49
|
+
readonly matchedLabel: string;
|
|
50
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
51
|
+
/** The rich override for the `label` prop. */
|
|
52
|
+
label?(): unknown;
|
|
53
|
+
/** The rich override for the `helper` prop. */
|
|
54
|
+
helper?(): unknown;
|
|
55
|
+
}>;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
/** Defines the options of a typed confirmation. */
|
|
3
|
+
export interface UseTypedConfirmationOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the action asks for the typed confirmation now — a prod target, say. Default `true`. While `false`,
|
|
6
|
+
* `isConfirmed` is `true` and `confirm` is `undefined`.
|
|
7
|
+
*/
|
|
8
|
+
readonly isNeeded?: MaybeRefOrGetter<boolean>;
|
|
9
|
+
}
|
|
10
|
+
/** Defines the live state of a typed confirmation and the operation over it. */
|
|
11
|
+
export interface TypedConfirmationControls {
|
|
12
|
+
/** The typed text — bind it to `TypedConfirmField`'s `v-model`. */
|
|
13
|
+
readonly typed: Ref<string>;
|
|
14
|
+
/** Whether the action asks for the typed confirmation now. */
|
|
15
|
+
readonly isNeeded: ComputedRef<boolean>;
|
|
16
|
+
/** Whether the action may run: no confirmation is needed, or the typed text equals the expected text exactly. */
|
|
17
|
+
readonly isConfirmed: ComputedRef<boolean>;
|
|
18
|
+
/** The value for the API's `confirm` member: the typed text while needed, else `undefined`. */
|
|
19
|
+
readonly confirm: ComputedRef<string | undefined>;
|
|
20
|
+
/** Clears the typed text — call it when the dialog opens again. */
|
|
21
|
+
readonly reset: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Holds the text a reader types to confirm a dangerous action on `expected`, and clears it whenever `expected`
|
|
25
|
+
* changes, so text typed for one target never confirms another.
|
|
26
|
+
* ```ts
|
|
27
|
+
* const { typed, isConfirmed, confirm } = useTypedConfirmation(() => target.value, { isNeeded: () => isProd.value });
|
|
28
|
+
* // <TypedConfirmField v-if="isProd" v-model="typed" :expected="target" />, then Deploy :is-disabled="!isConfirmed"
|
|
29
|
+
* await start({ target: target.value, ...(confirm.value ? { confirm: confirm.value } : {}) });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function useTypedConfirmation(expected: MaybeRefOrGetter<string>, options?: UseTypedConfirmationOptions): TypedConfirmationControls;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P, _ } from "../../chunks/TourPopover.vue_vue_type_script_setup_true_lang-BlajHcdp.js";
|
|
2
|
-
import { _ as _2, a, b, c, d, e, f, c as c2, d as d2, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p, q, r, h as h2, s, t, u, r as r2, h as h3, s as s2, t as t2, v, w, x, y, z, A, r as r3, h as h4, s as s3, t as t3, u as u2, B, C, D, E, F } from "../../chunks/
|
|
2
|
+
import { _ as _2, a, b, c, d, e, f, c as c2, d as d2, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p, q, r, h as h2, s, t, u, r as r2, h as h3, s as s2, t as t2, v, w, x, y, z, A, r as r3, h as h4, s as s3, t as t3, u as u2, B, C, D, E, F, G } from "../../chunks/TypedConfirmModal.vue_vue_type_script_setup_true_lang-CoIaH_xx.js";
|
|
3
3
|
import { _ as _3, B as B2 } from "../../chunks/BackdropOverlay.vue_vue_type_script_setup_true_lang-BsjQoWDM.js";
|
|
4
4
|
import { _ as _4, a as a2, b as b2, c as c3, _ as _5, b as b3, _ as _6, a as a3, b as b4, c as c4, M, d as d3, e as e3, _ as _7 } from "../../chunks/OverlayCloseButton.vue_vue_type_script_setup_true_lang-D0f_usZ9.js";
|
|
5
5
|
import { _ as _8, a as a4, D as D2 } from "../../chunks/DrawerContent.vue_vue_type_script_setup_true_lang-ClhduLMN.js";
|
|
@@ -74,9 +74,10 @@ export {
|
|
|
74
74
|
b5 as PopoverTrigger,
|
|
75
75
|
_10 as Tooltip,
|
|
76
76
|
_ as TourPopover,
|
|
77
|
-
C as
|
|
78
|
-
D as
|
|
79
|
-
E as
|
|
80
|
-
F as
|
|
77
|
+
C as TypedConfirmModal,
|
|
78
|
+
D as commandPaletteContextKey,
|
|
79
|
+
E as defaultFilter,
|
|
80
|
+
F as useBottomSheet,
|
|
81
|
+
G as useCommandPaletteContext
|
|
81
82
|
};
|
|
82
83
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ColorTone } from '../../../foundation/styles';
|
|
2
|
+
/** Defines props for the blocking dialog that runs a dangerous action once the reader types its target's ID. */
|
|
3
|
+
export interface TypedConfirmModalProps {
|
|
4
|
+
/** The open state, controlled. The `v-model:open` binding target. */
|
|
5
|
+
readonly open?: boolean;
|
|
6
|
+
/** The initial open state when uncontrolled. Default `false`. */
|
|
7
|
+
readonly defaultOpen?: boolean;
|
|
8
|
+
/** The question the dialog asks — it names the dialog. */
|
|
9
|
+
readonly title: string;
|
|
10
|
+
/** The consequence spelled out under the title. The `description` slot is the rich override. */
|
|
11
|
+
readonly description?: string;
|
|
12
|
+
/** The exact text the reader types to enable the action — the target's ID or name. */
|
|
13
|
+
readonly expected: string;
|
|
14
|
+
/** The field's label template; `{expected}` marks the expected text. Default `TypedConfirmField`'s. */
|
|
15
|
+
readonly label?: string;
|
|
16
|
+
/** The helper beneath the field. */
|
|
17
|
+
readonly helper?: string;
|
|
18
|
+
/** The refusal shown under the field — the reason the API gave for the last failed confirm. */
|
|
19
|
+
readonly error?: string;
|
|
20
|
+
/** The confirm button text. Default `"Confirm"`, localized. */
|
|
21
|
+
readonly confirmLabel?: string;
|
|
22
|
+
/** The cancel button text. Default `"Cancel"`, localized. */
|
|
23
|
+
readonly cancelLabel?: string;
|
|
24
|
+
/** The confirm button tone. Default `danger`. */
|
|
25
|
+
readonly tone?: ColorTone;
|
|
26
|
+
/**
|
|
27
|
+
* Runs with the typed text once the reader confirms — send it as the API's `confirm`. Returning a promise keeps the
|
|
28
|
+
* dialog open with a busy confirm button until it settles. The dialog closes on success and stays open, emitting
|
|
29
|
+
* `error`, when it throws, rejects or settles to a failed `Result`.
|
|
30
|
+
*
|
|
31
|
+
* Kept a PROP, not an emit: the dialog awaits what it RETURNS, which an emit cannot carry. `@confirm` binds it all
|
|
32
|
+
* the same.
|
|
33
|
+
*/
|
|
34
|
+
readonly onConfirm?: (typed: string) => unknown;
|
|
35
|
+
}
|
|
36
|
+
declare const _default: __VLS_WithSlots<import('vue').DefineComponent<TypedConfirmModalProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
37
|
+
error: (error: unknown) => any;
|
|
38
|
+
cancel: () => any;
|
|
39
|
+
"update:open": (open: boolean) => any;
|
|
40
|
+
}, string, import('vue').PublicProps, Readonly<TypedConfirmModalProps> & Readonly<{
|
|
41
|
+
onError?: ((error: unknown) => any) | undefined;
|
|
42
|
+
onCancel?: (() => any) | undefined;
|
|
43
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
44
|
+
}>, {
|
|
45
|
+
readonly open: boolean;
|
|
46
|
+
readonly tone: ColorTone;
|
|
47
|
+
readonly label: string;
|
|
48
|
+
readonly error: string;
|
|
49
|
+
readonly helper: string;
|
|
50
|
+
readonly description: string;
|
|
51
|
+
readonly defaultOpen: boolean;
|
|
52
|
+
readonly onConfirm: (typed: string) => unknown;
|
|
53
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
54
|
+
/** What the reader weighs before confirming — facts, risks, a reason field — above the typed field. */
|
|
55
|
+
default?(): unknown;
|
|
56
|
+
/** The rich override for the `description` prop. */
|
|
57
|
+
description?(): unknown;
|
|
58
|
+
}>;
|
|
59
|
+
export default _default;
|
|
60
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
61
|
+
new (): {
|
|
62
|
+
$slots: S;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TypedConfirmModal, type TypedConfirmModalProps } from './TypedConfirmModal.vue';
|
package/package.json
CHANGED