@atscript/vue-aooth 0.1.78 → 0.1.80
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/as-copy-CxLJdyxe.mjs +277 -0
- package/dist/as-copy-USMxrTlI.cjs +282 -0
- package/dist/as-copy.cjs +2 -0
- package/dist/as-copy.d.cts +14 -0
- package/dist/as-copy.d.mts +15 -0
- package/dist/as-copy.mjs +2 -0
- package/dist/{as-password-rules-DkFih-lL.cjs → as-password-rules-DBoLmROR.cjs} +8 -15
- package/dist/{as-password-rules-f9ouYgev.mjs → as-password-rules-DuKe47j8.mjs} +9 -16
- package/dist/as-password-rules.cjs +1 -1
- package/dist/as-password-rules.mjs +1 -1
- package/dist/as-qr-code-BoEy7mvV.cjs +293 -0
- package/dist/as-qr-code-U4sjF5lD.mjs +288 -0
- package/dist/as-qr-code.cjs +2 -0
- package/dist/as-qr-code.d.cts +16 -0
- package/dist/as-qr-code.d.mts +17 -0
- package/dist/as-qr-code.mjs +2 -0
- package/dist/index.cjs +5 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.mts +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +25 -7
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
let vue = require("vue");
|
|
2
|
+
let _atscript_vue_form = require("@atscript/vue-form");
|
|
3
|
+
//#region src/components/as-qr-code.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
const _hoisted_1 = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "as-qr-code-stack"
|
|
7
|
+
};
|
|
8
|
+
const _hoisted_2 = ["innerHTML"];
|
|
9
|
+
const _hoisted_3 = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "as-qr-code-secret"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/components/as-qr-code.vue
|
|
15
|
+
var as_qr_code_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
16
|
+
__name: "as-qr-code",
|
|
17
|
+
props: {
|
|
18
|
+
onBlur: {
|
|
19
|
+
type: Function,
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
error: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: false
|
|
25
|
+
},
|
|
26
|
+
model: {
|
|
27
|
+
type: Object,
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
value: {
|
|
31
|
+
type: null,
|
|
32
|
+
required: false
|
|
33
|
+
},
|
|
34
|
+
label: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false
|
|
37
|
+
},
|
|
38
|
+
description: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: false
|
|
41
|
+
},
|
|
42
|
+
hint: {
|
|
43
|
+
type: String,
|
|
44
|
+
required: false
|
|
45
|
+
},
|
|
46
|
+
placeholder: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: false
|
|
49
|
+
},
|
|
50
|
+
prefixIcon: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: false
|
|
53
|
+
},
|
|
54
|
+
suffixIcon: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: false
|
|
57
|
+
},
|
|
58
|
+
class: {
|
|
59
|
+
type: [Object, String],
|
|
60
|
+
required: false
|
|
61
|
+
},
|
|
62
|
+
style: {
|
|
63
|
+
type: [Object, String],
|
|
64
|
+
required: false
|
|
65
|
+
},
|
|
66
|
+
optional: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
required: false,
|
|
69
|
+
skipCheck: true
|
|
70
|
+
},
|
|
71
|
+
onToggleOptional: {
|
|
72
|
+
type: Function,
|
|
73
|
+
required: false
|
|
74
|
+
},
|
|
75
|
+
required: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
required: false,
|
|
78
|
+
skipCheck: true
|
|
79
|
+
},
|
|
80
|
+
readonly: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
required: false,
|
|
83
|
+
skipCheck: true
|
|
84
|
+
},
|
|
85
|
+
type: {
|
|
86
|
+
type: String,
|
|
87
|
+
required: true
|
|
88
|
+
},
|
|
89
|
+
formAction: {
|
|
90
|
+
type: Object,
|
|
91
|
+
required: false
|
|
92
|
+
},
|
|
93
|
+
name: {
|
|
94
|
+
type: String,
|
|
95
|
+
required: false
|
|
96
|
+
},
|
|
97
|
+
field: {
|
|
98
|
+
type: Object,
|
|
99
|
+
required: false
|
|
100
|
+
},
|
|
101
|
+
options: {
|
|
102
|
+
type: Array,
|
|
103
|
+
required: false
|
|
104
|
+
},
|
|
105
|
+
maxLength: {
|
|
106
|
+
type: Number,
|
|
107
|
+
required: false
|
|
108
|
+
},
|
|
109
|
+
autocomplete: {
|
|
110
|
+
type: String,
|
|
111
|
+
required: false
|
|
112
|
+
},
|
|
113
|
+
title: {
|
|
114
|
+
type: String,
|
|
115
|
+
required: false
|
|
116
|
+
},
|
|
117
|
+
level: {
|
|
118
|
+
type: Number,
|
|
119
|
+
required: false
|
|
120
|
+
},
|
|
121
|
+
onRemove: {
|
|
122
|
+
type: Function,
|
|
123
|
+
required: false
|
|
124
|
+
},
|
|
125
|
+
canRemove: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
required: false
|
|
128
|
+
},
|
|
129
|
+
removeLabel: {
|
|
130
|
+
type: String,
|
|
131
|
+
required: false
|
|
132
|
+
},
|
|
133
|
+
arrayIndex: {
|
|
134
|
+
type: Number,
|
|
135
|
+
required: false
|
|
136
|
+
},
|
|
137
|
+
path: {
|
|
138
|
+
type: String,
|
|
139
|
+
required: true
|
|
140
|
+
},
|
|
141
|
+
valueHelp: {
|
|
142
|
+
type: Object,
|
|
143
|
+
required: false
|
|
144
|
+
},
|
|
145
|
+
singularLabel: {
|
|
146
|
+
type: String,
|
|
147
|
+
required: false
|
|
148
|
+
},
|
|
149
|
+
inputId: {
|
|
150
|
+
type: String,
|
|
151
|
+
required: true
|
|
152
|
+
},
|
|
153
|
+
errorId: {
|
|
154
|
+
type: String,
|
|
155
|
+
required: true
|
|
156
|
+
},
|
|
157
|
+
descId: {
|
|
158
|
+
type: String,
|
|
159
|
+
required: true
|
|
160
|
+
},
|
|
161
|
+
ariaDescribedBy: {
|
|
162
|
+
type: String,
|
|
163
|
+
required: false
|
|
164
|
+
},
|
|
165
|
+
currencyCode: {
|
|
166
|
+
type: String,
|
|
167
|
+
required: false
|
|
168
|
+
},
|
|
169
|
+
unitCode: {
|
|
170
|
+
type: String,
|
|
171
|
+
required: false
|
|
172
|
+
},
|
|
173
|
+
precisionScale: {
|
|
174
|
+
type: Number,
|
|
175
|
+
required: false
|
|
176
|
+
},
|
|
177
|
+
prefix: {
|
|
178
|
+
type: String,
|
|
179
|
+
required: false
|
|
180
|
+
},
|
|
181
|
+
suffix: {
|
|
182
|
+
type: String,
|
|
183
|
+
required: false
|
|
184
|
+
},
|
|
185
|
+
scale: {
|
|
186
|
+
type: Number,
|
|
187
|
+
required: false
|
|
188
|
+
},
|
|
189
|
+
hasAdornment: {
|
|
190
|
+
type: Boolean,
|
|
191
|
+
required: false
|
|
192
|
+
},
|
|
193
|
+
disabled: {
|
|
194
|
+
type: Boolean,
|
|
195
|
+
required: false
|
|
196
|
+
},
|
|
197
|
+
hidden: {
|
|
198
|
+
type: Boolean,
|
|
199
|
+
required: false
|
|
200
|
+
},
|
|
201
|
+
size: {
|
|
202
|
+
type: Number,
|
|
203
|
+
required: false,
|
|
204
|
+
default: 192
|
|
205
|
+
},
|
|
206
|
+
errorCorrection: {
|
|
207
|
+
type: String,
|
|
208
|
+
required: false,
|
|
209
|
+
default: "M"
|
|
210
|
+
},
|
|
211
|
+
manualSecret: {
|
|
212
|
+
type: Boolean,
|
|
213
|
+
required: false,
|
|
214
|
+
default: true
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
setup(__props) {
|
|
218
|
+
const props = __props;
|
|
219
|
+
const uri = (0, vue.computed)(() => props.value ?? props.model?.value);
|
|
220
|
+
const svg = (0, vue.ref)();
|
|
221
|
+
const error = (0, vue.ref)();
|
|
222
|
+
const secret = (0, vue.ref)();
|
|
223
|
+
let qrcodeModulePromise;
|
|
224
|
+
function loadQrcode() {
|
|
225
|
+
qrcodeModulePromise ??= import("qrcode");
|
|
226
|
+
return qrcodeModulePromise;
|
|
227
|
+
}
|
|
228
|
+
const SECRET_RE = /[?&]secret=([^&]+)/;
|
|
229
|
+
function extractSecret(value) {
|
|
230
|
+
const m = SECRET_RE.exec(value);
|
|
231
|
+
return m ? decodeURIComponent(m[1]) : void 0;
|
|
232
|
+
}
|
|
233
|
+
let renderToken = 0;
|
|
234
|
+
(0, vue.watch)(uri, async (value) => {
|
|
235
|
+
const token = ++renderToken;
|
|
236
|
+
error.value = void 0;
|
|
237
|
+
if (!value) {
|
|
238
|
+
svg.value = void 0;
|
|
239
|
+
secret.value = void 0;
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
secret.value = extractSecret(value);
|
|
243
|
+
let lib;
|
|
244
|
+
try {
|
|
245
|
+
const mod = await loadQrcode();
|
|
246
|
+
lib = mod.default ?? mod;
|
|
247
|
+
} catch (err) {
|
|
248
|
+
if (token !== renderToken) return;
|
|
249
|
+
svg.value = void 0;
|
|
250
|
+
secret.value = void 0;
|
|
251
|
+
console.error("[AsQrCode] qrcode peer dependency is not installed", err);
|
|
252
|
+
error.value = "Install the optional 'qrcode' dependency to render QR codes.";
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
try {
|
|
256
|
+
const out = await lib.toString(value, {
|
|
257
|
+
type: "svg",
|
|
258
|
+
margin: 0,
|
|
259
|
+
width: props.size,
|
|
260
|
+
errorCorrectionLevel: props.errorCorrection
|
|
261
|
+
});
|
|
262
|
+
if (token !== renderToken) return;
|
|
263
|
+
svg.value = out;
|
|
264
|
+
} catch (err) {
|
|
265
|
+
if (token !== renderToken) return;
|
|
266
|
+
svg.value = void 0;
|
|
267
|
+
secret.value = void 0;
|
|
268
|
+
console.error("[AsQrCode] failed to render QR code", err);
|
|
269
|
+
error.value = "Failed to render QR code.";
|
|
270
|
+
}
|
|
271
|
+
}, { immediate: true });
|
|
272
|
+
return (_ctx, _cache) => {
|
|
273
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_atscript_vue_form.AsFieldShell), (0, vue.mergeProps)(_ctx.$props, {
|
|
274
|
+
"field-class": "as-qr-code",
|
|
275
|
+
error: error.value
|
|
276
|
+
}), {
|
|
277
|
+
default: (0, vue.withCtx)(() => [uri.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, [svg.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
278
|
+
key: 0,
|
|
279
|
+
class: "as-qr-code-svg",
|
|
280
|
+
innerHTML: svg.value
|
|
281
|
+
}, null, 8, _hoisted_2)) : (0, vue.createCommentVNode)("v-if", true), __props.manualSecret && secret.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3, (0, vue.toDisplayString)(secret.value), 1)) : (0, vue.createCommentVNode)("v-if", true)])) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
282
|
+
_: 1
|
|
283
|
+
}, 16, ["error"]);
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
//#endregion
|
|
288
|
+
Object.defineProperty(exports, "as_qr_code_default", {
|
|
289
|
+
enumerable: true,
|
|
290
|
+
get: function() {
|
|
291
|
+
return as_qr_code_default;
|
|
292
|
+
}
|
|
293
|
+
});
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, ref, toDisplayString, unref, watch, withCtx } from "vue";
|
|
2
|
+
import { AsFieldShell } from "@atscript/vue-form";
|
|
3
|
+
//#region src/components/as-qr-code.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
const _hoisted_1 = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "as-qr-code-stack"
|
|
7
|
+
};
|
|
8
|
+
const _hoisted_2 = ["innerHTML"];
|
|
9
|
+
const _hoisted_3 = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "as-qr-code-secret"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/components/as-qr-code.vue
|
|
15
|
+
var as_qr_code_default = /* @__PURE__ */ defineComponent({
|
|
16
|
+
__name: "as-qr-code",
|
|
17
|
+
props: {
|
|
18
|
+
onBlur: {
|
|
19
|
+
type: Function,
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
error: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: false
|
|
25
|
+
},
|
|
26
|
+
model: {
|
|
27
|
+
type: Object,
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
value: {
|
|
31
|
+
type: null,
|
|
32
|
+
required: false
|
|
33
|
+
},
|
|
34
|
+
label: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false
|
|
37
|
+
},
|
|
38
|
+
description: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: false
|
|
41
|
+
},
|
|
42
|
+
hint: {
|
|
43
|
+
type: String,
|
|
44
|
+
required: false
|
|
45
|
+
},
|
|
46
|
+
placeholder: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: false
|
|
49
|
+
},
|
|
50
|
+
prefixIcon: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: false
|
|
53
|
+
},
|
|
54
|
+
suffixIcon: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: false
|
|
57
|
+
},
|
|
58
|
+
class: {
|
|
59
|
+
type: [Object, String],
|
|
60
|
+
required: false
|
|
61
|
+
},
|
|
62
|
+
style: {
|
|
63
|
+
type: [Object, String],
|
|
64
|
+
required: false
|
|
65
|
+
},
|
|
66
|
+
optional: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
required: false,
|
|
69
|
+
skipCheck: true
|
|
70
|
+
},
|
|
71
|
+
onToggleOptional: {
|
|
72
|
+
type: Function,
|
|
73
|
+
required: false
|
|
74
|
+
},
|
|
75
|
+
required: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
required: false,
|
|
78
|
+
skipCheck: true
|
|
79
|
+
},
|
|
80
|
+
readonly: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
required: false,
|
|
83
|
+
skipCheck: true
|
|
84
|
+
},
|
|
85
|
+
type: {
|
|
86
|
+
type: String,
|
|
87
|
+
required: true
|
|
88
|
+
},
|
|
89
|
+
formAction: {
|
|
90
|
+
type: Object,
|
|
91
|
+
required: false
|
|
92
|
+
},
|
|
93
|
+
name: {
|
|
94
|
+
type: String,
|
|
95
|
+
required: false
|
|
96
|
+
},
|
|
97
|
+
field: {
|
|
98
|
+
type: Object,
|
|
99
|
+
required: false
|
|
100
|
+
},
|
|
101
|
+
options: {
|
|
102
|
+
type: Array,
|
|
103
|
+
required: false
|
|
104
|
+
},
|
|
105
|
+
maxLength: {
|
|
106
|
+
type: Number,
|
|
107
|
+
required: false
|
|
108
|
+
},
|
|
109
|
+
autocomplete: {
|
|
110
|
+
type: String,
|
|
111
|
+
required: false
|
|
112
|
+
},
|
|
113
|
+
title: {
|
|
114
|
+
type: String,
|
|
115
|
+
required: false
|
|
116
|
+
},
|
|
117
|
+
level: {
|
|
118
|
+
type: Number,
|
|
119
|
+
required: false
|
|
120
|
+
},
|
|
121
|
+
onRemove: {
|
|
122
|
+
type: Function,
|
|
123
|
+
required: false
|
|
124
|
+
},
|
|
125
|
+
canRemove: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
required: false
|
|
128
|
+
},
|
|
129
|
+
removeLabel: {
|
|
130
|
+
type: String,
|
|
131
|
+
required: false
|
|
132
|
+
},
|
|
133
|
+
arrayIndex: {
|
|
134
|
+
type: Number,
|
|
135
|
+
required: false
|
|
136
|
+
},
|
|
137
|
+
path: {
|
|
138
|
+
type: String,
|
|
139
|
+
required: true
|
|
140
|
+
},
|
|
141
|
+
valueHelp: {
|
|
142
|
+
type: Object,
|
|
143
|
+
required: false
|
|
144
|
+
},
|
|
145
|
+
singularLabel: {
|
|
146
|
+
type: String,
|
|
147
|
+
required: false
|
|
148
|
+
},
|
|
149
|
+
inputId: {
|
|
150
|
+
type: String,
|
|
151
|
+
required: true
|
|
152
|
+
},
|
|
153
|
+
errorId: {
|
|
154
|
+
type: String,
|
|
155
|
+
required: true
|
|
156
|
+
},
|
|
157
|
+
descId: {
|
|
158
|
+
type: String,
|
|
159
|
+
required: true
|
|
160
|
+
},
|
|
161
|
+
ariaDescribedBy: {
|
|
162
|
+
type: String,
|
|
163
|
+
required: false
|
|
164
|
+
},
|
|
165
|
+
currencyCode: {
|
|
166
|
+
type: String,
|
|
167
|
+
required: false
|
|
168
|
+
},
|
|
169
|
+
unitCode: {
|
|
170
|
+
type: String,
|
|
171
|
+
required: false
|
|
172
|
+
},
|
|
173
|
+
precisionScale: {
|
|
174
|
+
type: Number,
|
|
175
|
+
required: false
|
|
176
|
+
},
|
|
177
|
+
prefix: {
|
|
178
|
+
type: String,
|
|
179
|
+
required: false
|
|
180
|
+
},
|
|
181
|
+
suffix: {
|
|
182
|
+
type: String,
|
|
183
|
+
required: false
|
|
184
|
+
},
|
|
185
|
+
scale: {
|
|
186
|
+
type: Number,
|
|
187
|
+
required: false
|
|
188
|
+
},
|
|
189
|
+
hasAdornment: {
|
|
190
|
+
type: Boolean,
|
|
191
|
+
required: false
|
|
192
|
+
},
|
|
193
|
+
disabled: {
|
|
194
|
+
type: Boolean,
|
|
195
|
+
required: false
|
|
196
|
+
},
|
|
197
|
+
hidden: {
|
|
198
|
+
type: Boolean,
|
|
199
|
+
required: false
|
|
200
|
+
},
|
|
201
|
+
size: {
|
|
202
|
+
type: Number,
|
|
203
|
+
required: false,
|
|
204
|
+
default: 192
|
|
205
|
+
},
|
|
206
|
+
errorCorrection: {
|
|
207
|
+
type: String,
|
|
208
|
+
required: false,
|
|
209
|
+
default: "M"
|
|
210
|
+
},
|
|
211
|
+
manualSecret: {
|
|
212
|
+
type: Boolean,
|
|
213
|
+
required: false,
|
|
214
|
+
default: true
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
setup(__props) {
|
|
218
|
+
const props = __props;
|
|
219
|
+
const uri = computed(() => props.value ?? props.model?.value);
|
|
220
|
+
const svg = ref();
|
|
221
|
+
const error = ref();
|
|
222
|
+
const secret = ref();
|
|
223
|
+
let qrcodeModulePromise;
|
|
224
|
+
function loadQrcode() {
|
|
225
|
+
qrcodeModulePromise ??= import("qrcode");
|
|
226
|
+
return qrcodeModulePromise;
|
|
227
|
+
}
|
|
228
|
+
const SECRET_RE = /[?&]secret=([^&]+)/;
|
|
229
|
+
function extractSecret(value) {
|
|
230
|
+
const m = SECRET_RE.exec(value);
|
|
231
|
+
return m ? decodeURIComponent(m[1]) : void 0;
|
|
232
|
+
}
|
|
233
|
+
let renderToken = 0;
|
|
234
|
+
watch(uri, async (value) => {
|
|
235
|
+
const token = ++renderToken;
|
|
236
|
+
error.value = void 0;
|
|
237
|
+
if (!value) {
|
|
238
|
+
svg.value = void 0;
|
|
239
|
+
secret.value = void 0;
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
secret.value = extractSecret(value);
|
|
243
|
+
let lib;
|
|
244
|
+
try {
|
|
245
|
+
const mod = await loadQrcode();
|
|
246
|
+
lib = mod.default ?? mod;
|
|
247
|
+
} catch (err) {
|
|
248
|
+
if (token !== renderToken) return;
|
|
249
|
+
svg.value = void 0;
|
|
250
|
+
secret.value = void 0;
|
|
251
|
+
console.error("[AsQrCode] qrcode peer dependency is not installed", err);
|
|
252
|
+
error.value = "Install the optional 'qrcode' dependency to render QR codes.";
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
try {
|
|
256
|
+
const out = await lib.toString(value, {
|
|
257
|
+
type: "svg",
|
|
258
|
+
margin: 0,
|
|
259
|
+
width: props.size,
|
|
260
|
+
errorCorrectionLevel: props.errorCorrection
|
|
261
|
+
});
|
|
262
|
+
if (token !== renderToken) return;
|
|
263
|
+
svg.value = out;
|
|
264
|
+
} catch (err) {
|
|
265
|
+
if (token !== renderToken) return;
|
|
266
|
+
svg.value = void 0;
|
|
267
|
+
secret.value = void 0;
|
|
268
|
+
console.error("[AsQrCode] failed to render QR code", err);
|
|
269
|
+
error.value = "Failed to render QR code.";
|
|
270
|
+
}
|
|
271
|
+
}, { immediate: true });
|
|
272
|
+
return (_ctx, _cache) => {
|
|
273
|
+
return openBlock(), createBlock(unref(AsFieldShell), mergeProps(_ctx.$props, {
|
|
274
|
+
"field-class": "as-qr-code",
|
|
275
|
+
error: error.value
|
|
276
|
+
}), {
|
|
277
|
+
default: withCtx(() => [uri.value ? (openBlock(), createElementBlock("div", _hoisted_1, [svg.value ? (openBlock(), createElementBlock("div", {
|
|
278
|
+
key: 0,
|
|
279
|
+
class: "as-qr-code-svg",
|
|
280
|
+
innerHTML: svg.value
|
|
281
|
+
}, null, 8, _hoisted_2)) : createCommentVNode("v-if", true), __props.manualSecret && secret.value ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(secret.value), 1)) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true)]),
|
|
282
|
+
_: 1
|
|
283
|
+
}, 16, ["error"]);
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
//#endregion
|
|
288
|
+
export { as_qr_code_default as t };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as vue from "vue";
|
|
2
|
+
import { TAsComponentProps } from "@atscript/vue-form";
|
|
3
|
+
|
|
4
|
+
//#region src/components/as-qr-code.vue.d.ts
|
|
5
|
+
type __VLS_Props = TAsComponentProps<string | undefined> & {
|
|
6
|
+
size?: number;
|
|
7
|
+
errorCorrection?: "L" | "M" | "Q" | "H";
|
|
8
|
+
manualSecret?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
size: number;
|
|
12
|
+
errorCorrection: "L" | "M" | "Q" | "H";
|
|
13
|
+
manualSecret: boolean;
|
|
14
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as vue from "vue";
|
|
2
|
+
import { TAsComponentProps } from "@atscript/vue-form";
|
|
3
|
+
|
|
4
|
+
//#region src/components/as-qr-code.vue.d.ts
|
|
5
|
+
type __VLS_Props = TAsComponentProps<string | undefined> & {
|
|
6
|
+
size?: number;
|
|
7
|
+
errorCorrection?: "L" | "M" | "Q" | "H";
|
|
8
|
+
manualSecret?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
size: number;
|
|
12
|
+
errorCorrection: "L" | "M" | "Q" | "H";
|
|
13
|
+
manualSecret: boolean;
|
|
14
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { _default as default };
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_as_consent_array = require("./as-consent-array-B8gtVvew.cjs");
|
|
3
|
-
const
|
|
3
|
+
const require_as_copy = require("./as-copy-USMxrTlI.cjs");
|
|
4
|
+
const require_as_password_rules = require("./as-password-rules-DBoLmROR.cjs");
|
|
5
|
+
const require_as_qr_code = require("./as-qr-code-BoEy7mvV.cjs");
|
|
4
6
|
exports.AsConsentArray = require_as_consent_array.as_consent_array_default;
|
|
7
|
+
exports.AsCopy = require_as_copy.as_copy_default;
|
|
5
8
|
exports.AsPasswordRules = require_as_password_rules.as_password_rules_default;
|
|
9
|
+
exports.AsQrCode = require_as_qr_code.as_qr_code_default;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import _default from "./as-consent-array.cjs";
|
|
2
|
-
import _default$1 from "./as-
|
|
3
|
-
|
|
2
|
+
import _default$1 from "./as-copy.cjs";
|
|
3
|
+
import _default$2 from "./as-password-rules.cjs";
|
|
4
|
+
import _default$3 from "./as-qr-code.cjs";
|
|
5
|
+
export { _default as AsConsentArray, _default$1 as AsCopy, _default$2 as AsPasswordRules, _default$3 as AsQrCode };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import _default from "./as-consent-array.mjs";
|
|
2
|
-
import _default$1 from "./as-
|
|
3
|
-
|
|
2
|
+
import _default$1 from "./as-copy.mjs";
|
|
3
|
+
import _default$2 from "./as-password-rules.mjs";
|
|
4
|
+
import _default$3 from "./as-qr-code.mjs";
|
|
5
|
+
export { _default as AsConsentArray, _default$1 as AsCopy, _default$2 as AsPasswordRules, _default$3 as AsQrCode };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { t as as_consent_array_default } from "./as-consent-array-C1GpSvgX.mjs";
|
|
2
|
-
import { t as
|
|
3
|
-
|
|
2
|
+
import { t as as_copy_default } from "./as-copy-CxLJdyxe.mjs";
|
|
3
|
+
import { t as as_password_rules_default } from "./as-password-rules-DuKe47j8.mjs";
|
|
4
|
+
import { t as as_qr_code_default } from "./as-qr-code-U4sjF5lD.mjs";
|
|
5
|
+
export { as_consent_array_default as AsConsentArray, as_copy_default as AsCopy, as_password_rules_default as AsPasswordRules, as_qr_code_default as AsQrCode };
|