bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.74
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/README.md +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +31 -5
- package/dist/ai/BbBadge.md +4 -4
- package/dist/ai/BbCalendar.md +4 -3
- package/dist/ai/BbColorPalette.md +8 -9
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +4 -3
- package/dist/ai/BbDialog.md +14 -4
- package/dist/ai/BbDropdown.md +23 -10
- package/dist/ai/BbDropdownButton.md +2 -2
- package/dist/ai/BbForm.md +4 -1
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +5 -3
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbTable.md +43 -19
- package/dist/ai/BbTimePicker.md +4 -3
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/changelog.json +56 -4
- package/dist/ai/components.json +54 -18
- package/dist/ai/guides/design-tokens.md +20 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/v2-to-v3.md +24 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +3 -0
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbColorPalette.json +3 -3
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +3 -3
- package/dist/ai/manifest/components/BbDialog.tree.json +5 -1
- package/dist/ai/manifest/components/BbDropdown.json +3 -3
- package/dist/ai/manifest/components/BbDropdown.tree.json +3 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -1
- package/dist/ai/manifest/components/BbTable.tree.json +12 -6
- package/dist/ai/manifest/components/BbTimePicker.json +3 -3
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -0
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +66 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +2 -0
- package/dist/ai/source/BbBreadcrumbs.md +4 -1
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbColorPalette.md +41 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +53 -22
- package/dist/ai/source/BbDatePickerInput.md +32 -8
- package/dist/ai/source/BbDialog.md +31 -1
- package/dist/ai/source/BbDropdown.md +52 -24
- package/dist/ai/source/BbDropdownGroup.md +17 -21
- package/dist/ai/source/BbForm.md +73 -6
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +5 -6
- package/dist/ai/source/BbOffCanvas.md +34 -1
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +7 -5
- package/dist/ai/source/BbTable.md +54 -6
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +50 -15
- package/dist/ai/source/BbTimePickerInput.md +30 -7
- package/dist/ai/source/BbToast.md +14 -0
- package/dist/ai/source/BbToastPortal.md +16 -4
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +4 -1
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +197 -192
- package/dist/components/BbColorPalette/types.d.ts +1 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +145 -139
- package/dist/components/BbDatePicker/types.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +337 -335
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +253 -245
- package/dist/components/BbDialog/leaveGhost.js +33 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +11 -3
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +119 -120
- package/dist/components/BbDropdown/types.d.ts +8 -17
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +385 -377
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +10 -12
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +231 -231
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbTimePicker/types.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +214 -213
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +5 -0
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/i18n/currencyDigits.js +58 -0
- package/dist/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/index.d.ts +34 -30
- package/dist/llms-full.txt +860 -129
- package/dist/llms.txt +3 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +3 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/utilities/functions/hash.js +97 -64
- package/dist/utilities/functions/isEqual.js +33 -25
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +8 -4
- package/llms.txt +3 -1
- package/package.json +1 -2
- package/scripts/README.md +1 -1
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +54 -6
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +5 -2
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +17 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BbToastPortalSlots } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Registers named content that any toast can render by passing
|
|
4
4
|
* `portal: '<name>'`. Mount it anywhere in the app (it renders nothing itself);
|
|
@@ -17,9 +17,7 @@ type __VLS_Props = {
|
|
|
17
17
|
/** The name a toast passes as `portal: '<name>'` to render this content. */
|
|
18
18
|
name: string;
|
|
19
19
|
};
|
|
20
|
-
type __VLS_Slots =
|
|
21
|
-
default?: (scope: BbToastPortalContext) => unknown;
|
|
22
|
-
};
|
|
20
|
+
type __VLS_Slots = BbToastPortalSlots;
|
|
23
21
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
22
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
23
|
declare const _default: typeof __VLS_export;
|
|
@@ -79,6 +79,11 @@ export type BbToastPortalContext<P = any> = {
|
|
|
79
79
|
data: P;
|
|
80
80
|
close: () => void;
|
|
81
81
|
};
|
|
82
|
+
/** BbToastPortal's slots; index it for one slot's type: `BbToastPortalSlots<MyData>['default']`. */
|
|
83
|
+
export type BbToastPortalSlots<P = any> = {
|
|
84
|
+
/** The toast's body, rendered per toast with its own context. */
|
|
85
|
+
default?: (scope: BbToastPortalContext<P>) => unknown;
|
|
86
|
+
};
|
|
82
87
|
/**
|
|
83
88
|
* Props for the `<BbToast>` host (the "Toaster").
|
|
84
89
|
*
|
package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -5,7 +5,7 @@ import r from "../WarningIcon/WarningIcon.vue.js";
|
|
|
5
5
|
import i from "../ClearableButton/ClearableButton.vue.js";
|
|
6
6
|
import { Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, mergeProps as p, normalizeClass as m, onBeforeUnmount as h, openBlock as g, ref as _, renderSlot as v, withCtx as y, withModifiers as b } from "vue";
|
|
7
7
|
// src/components/CommonFieldInput/CommonFieldInput.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var x = /*@__PURE__*/ f({
|
|
8
|
+
var x = "a[href], button, input, textarea, select, summary, [role=\"button\"], [role=\"link\"], [contenteditable]:not([contenteditable=\"false\"])", S = /*@__PURE__*/ f({
|
|
9
9
|
__name: "CommonFieldInput",
|
|
10
10
|
props: {
|
|
11
11
|
"append:icon": {},
|
|
@@ -28,47 +28,47 @@ var x = /*@__PURE__*/ f({
|
|
|
28
28
|
variant: { default: "outline" }
|
|
29
29
|
},
|
|
30
30
|
emits: ["click:clear", "container:click"],
|
|
31
|
-
setup(f, { emit:
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
setup(f, { emit: S }) {
|
|
32
|
+
let C = f, w = S, T = _(), E = _(!1), D = _(!1), O = null, k = o(() => !!C.hasWarnings && !C.hasErrors), A = () => {
|
|
33
|
+
O !== null && clearTimeout(O), O = setTimeout(() => {
|
|
34
|
+
E.value = !0;
|
|
35
35
|
}, 150);
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
let e =
|
|
40
|
-
return !!
|
|
41
|
-
}),
|
|
36
|
+
}, j = () => {
|
|
37
|
+
O !== null && (clearTimeout(O), O = null), E.value = !1;
|
|
38
|
+
}, M = o(() => {
|
|
39
|
+
let e = C.hasValue ?? !0;
|
|
40
|
+
return !!C.clearable && e && !C.disabled && !C.readonly;
|
|
41
|
+
}), N = o(() => M.value && (E.value || D.value || !!C.active));
|
|
42
42
|
h(() => {
|
|
43
|
-
|
|
43
|
+
O !== null && clearTimeout(O);
|
|
44
44
|
});
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
if (!
|
|
49
|
-
let t = e.target;
|
|
50
|
-
t
|
|
51
|
-
},
|
|
45
|
+
let P = (e) => {
|
|
46
|
+
T.value?.contains(e.relatedTarget) || (D.value = !1);
|
|
47
|
+
}, F = () => T.value?.querySelector("input,textarea") ?? null, I = (e) => {
|
|
48
|
+
if (!T.value || C.preventFocus || C.disabled) return;
|
|
49
|
+
let t = e.target?.closest?.(x);
|
|
50
|
+
t && t !== T.value && T.value.contains(t) || (F()?.focus(), w("container:click"));
|
|
51
|
+
}, L = o(() => {
|
|
52
52
|
let e = {
|
|
53
|
-
onClick:
|
|
53
|
+
onClick: I,
|
|
54
54
|
onFocusin: () => {
|
|
55
|
-
|
|
55
|
+
D.value = !0;
|
|
56
56
|
},
|
|
57
|
-
onFocusout:
|
|
58
|
-
onPointerenter:
|
|
59
|
-
onPointerleave:
|
|
57
|
+
onFocusout: P,
|
|
58
|
+
onPointerenter: A,
|
|
59
|
+
onPointerleave: j
|
|
60
60
|
};
|
|
61
|
-
return
|
|
62
|
-
}),
|
|
63
|
-
|
|
61
|
+
return C.passthrough?.box ? p(e, C.passthrough.box) : e;
|
|
62
|
+
}), R = () => {
|
|
63
|
+
M.value && (w("click:clear"), F()?.focus());
|
|
64
64
|
};
|
|
65
65
|
return (o, h) => (g(), l("span", { class: m(["bb-field-input", {
|
|
66
66
|
"bb-field-input--active": f.active,
|
|
67
|
-
"bb-field-input--clearable":
|
|
67
|
+
"bb-field-input--clearable": M.value,
|
|
68
68
|
"bb-field-input--compact": f.compact,
|
|
69
69
|
"bb-field-input--disabled": f.disabled,
|
|
70
70
|
"bb-field-input--errors": f.hasErrors,
|
|
71
|
-
"bb-field-input--warnings":
|
|
71
|
+
"bb-field-input--warnings": k.value,
|
|
72
72
|
"bb-field-input--loading": f.loading,
|
|
73
73
|
"bb-field-input--readonly": f.readonly,
|
|
74
74
|
[`bb-field-input--${f.variant}`]: f.variant !== "none"
|
|
@@ -76,9 +76,9 @@ var x = /*@__PURE__*/ f({
|
|
|
76
76
|
v(o.$slots, "prepend:outer"),
|
|
77
77
|
u("span", p({
|
|
78
78
|
ref_key: "container",
|
|
79
|
-
ref:
|
|
79
|
+
ref: T,
|
|
80
80
|
class: "bb-field-input__box"
|
|
81
|
-
},
|
|
81
|
+
}, L.value), [
|
|
82
82
|
v(o.$slots, "prepend", {}, () => [o.$slots.prefix ? (g(), l("span", p({
|
|
83
83
|
key: 0,
|
|
84
84
|
class: "bb-field-input__prefix"
|
|
@@ -89,19 +89,19 @@ var x = /*@__PURE__*/ f({
|
|
|
89
89
|
icon: o.$props["prepend:icon"]
|
|
90
90
|
}, f.passthrough?.icon), null, 16, ["icon"])) : c("", !0),
|
|
91
91
|
v(o.$slots, "default"),
|
|
92
|
-
u("span", { class: m(["bb-field-input__icon-spacer", { "bb-field-input__icon-spacer--reserved":
|
|
92
|
+
u("span", { class: m(["bb-field-input__icon-spacer", { "bb-field-input__icon-spacer--reserved": C.reserveAppendSpace }]) }, [d(a, {
|
|
93
93
|
appear: "",
|
|
94
94
|
name: "bb-field-input-icon"
|
|
95
95
|
}, {
|
|
96
|
-
default: y(() => [
|
|
96
|
+
default: y(() => [N.value ? (g(), s(i, p({
|
|
97
97
|
key: "clear",
|
|
98
98
|
class: "bb-field-input__clear",
|
|
99
|
-
onClick:
|
|
99
|
+
onClick: R,
|
|
100
100
|
onMousedown: h[0] ||= b(() => {}, ["prevent"])
|
|
101
101
|
}, f.passthrough?.clear), null, 16)) : f.loading ? (g(), s(t, p({
|
|
102
102
|
key: "spinner",
|
|
103
103
|
class: "bb-field-input__spinner"
|
|
104
|
-
}, f.passthrough?.spinner), null, 16)) : f.hasErrors ? (g(), s(n, { key: "error" })) :
|
|
104
|
+
}, f.passthrough?.spinner), null, 16)) : f.hasErrors ? (g(), s(n, { key: "error" })) : k.value ? (g(), s(r, { key: "warning" })) : o.$props["append:icon"] ? (g(), s(e, p({
|
|
105
105
|
key: "icon",
|
|
106
106
|
class: "bb-field-input__append-icon",
|
|
107
107
|
icon: o.$props["append:icon"]
|
|
@@ -117,4 +117,4 @@ var x = /*@__PURE__*/ f({
|
|
|
117
117
|
], 2));
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
|
-
export {
|
|
120
|
+
export { S as default };
|
|
@@ -55,8 +55,8 @@ var k = /*@__PURE__*/ f({
|
|
|
55
55
|
}) : k.bubbleAttrs), U = c(() => {
|
|
56
56
|
let e = R.value, t = z.value;
|
|
57
57
|
return [
|
|
58
|
-
...k.disableFlip ? [] : [ne()],
|
|
59
58
|
ie(k.offset),
|
|
59
|
+
...k.disableFlip ? [] : [ne({ padding: k.padding })],
|
|
60
60
|
ae({
|
|
61
61
|
padding: k.padding,
|
|
62
62
|
...e ? { boundary: e } : {}
|
|
@@ -2,7 +2,7 @@ import { useLocale as e } from "../../composables/useLocale.js";
|
|
|
2
2
|
import { computed as t, watch as n } from "vue";
|
|
3
3
|
// src/components/CommonTimeSelector/useMeridiem.ts
|
|
4
4
|
var r = () => {
|
|
5
|
-
let { t: r } = e(), i = t(() => r("datePickerInput.meridiemAm").value), a = t(() => r("datePickerInput.meridiemPm").value), o = (e) => e === "PM" ? a.value : i.value, s = (e) => !!e && (e === a.value || e === "
|
|
5
|
+
let { t: r } = e(), i = t(() => r("datePickerInput.meridiemAm").value), a = t(() => r("datePickerInput.meridiemPm").value), o = (e) => e === "PM" ? a.value : i.value, s = (e) => e.replace(/[.\s]/g, "").toLowerCase(), c = (e) => !!e && (e === a.value || s(e) === s(a.value) || s(e) === "pm"), l = t(() => {
|
|
6
6
|
let e = {
|
|
7
7
|
a: i.value,
|
|
8
8
|
p: a.value
|
|
@@ -16,21 +16,21 @@ var r = () => {
|
|
|
16
16
|
am: i,
|
|
17
17
|
pm: a,
|
|
18
18
|
label: o,
|
|
19
|
-
isPm:
|
|
20
|
-
keys:
|
|
19
|
+
isPm: c,
|
|
20
|
+
keys: l,
|
|
21
21
|
fieldSpec: t(() => ({
|
|
22
22
|
kind: "enum",
|
|
23
23
|
maxLength: Math.max(i.value.length, a.value.length) * 2,
|
|
24
24
|
enum: {
|
|
25
25
|
values: [i.value, a.value],
|
|
26
|
-
keys:
|
|
26
|
+
keys: l.value
|
|
27
27
|
},
|
|
28
28
|
sizerMin: i.value.length >= a.value.length ? i.value : a.value,
|
|
29
29
|
label: "AM/PM"
|
|
30
30
|
})),
|
|
31
31
|
match: (e, t) => {
|
|
32
|
-
let n =
|
|
33
|
-
return
|
|
32
|
+
let n = s(t && e.startsWith(t) ? e.slice(t.length) : e);
|
|
33
|
+
return n ? n.endsWith(s(a.value)) || n === "pm" ? a.value : n.endsWith(s(i.value)) || n === "am" ? i.value : l.value[n[n.length - 1]] ?? null : null;
|
|
34
34
|
},
|
|
35
35
|
onRelabel: (e) => n([i, a], ([t, n], [r, i]) => {
|
|
36
36
|
r !== t && e(r, t), i !== n && e(i, n);
|
|
@@ -3,6 +3,7 @@ import { getCurrentScope as e, inject as t, onScopeDispose as n, provide as r, s
|
|
|
3
3
|
var a = Symbol.for("bitboss-ui:form-submit-lock"), o = Symbol.for("bitboss-ui:overlay-submit-guard"), s = () => {
|
|
4
4
|
let e = i([]), t = {
|
|
5
5
|
saving: () => e.value.some((e) => e.locked()),
|
|
6
|
+
pending: () => e.value.some((e) => e.pending()),
|
|
6
7
|
forms: () => e.value,
|
|
7
8
|
onSubmitted: null
|
|
8
9
|
};
|
|
@@ -18,7 +19,7 @@ var a = Symbol.for("bitboss-ui:form-submit-lock"), o = Symbol.for("bitboss-ui:ov
|
|
|
18
19
|
r(o, null);
|
|
19
20
|
}, l = (r) => {
|
|
20
21
|
let i = t(o, null);
|
|
21
|
-
if (!i) return
|
|
22
|
+
if (!i) return null;
|
|
22
23
|
let a = i.register(r);
|
|
23
24
|
return e() && n(a), (e) => i.submitted(r, e);
|
|
24
25
|
};
|
|
@@ -206,20 +206,24 @@ var g = Symbol("abort"), _ = (e) => (typeof e == "object" || typeof e == "functi
|
|
|
206
206
|
completed: !1,
|
|
207
207
|
reason: j ?? "hide"
|
|
208
208
|
}), j = null;
|
|
209
|
-
}, { flush: "sync" })
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
209
|
+
}, { flush: "sync" });
|
|
210
|
+
let R = !1;
|
|
211
|
+
a() && u(() => {
|
|
212
|
+
R = !0, P && P.for === A && A || L({
|
|
213
|
+
completed: !1,
|
|
214
|
+
reason: "unmounted"
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
let z = b.enabled === !1 ? o(F, null) : null, B = (e) => {
|
|
218
|
+
z ? z.record(e) : j = e;
|
|
219
|
+
}, V = (e, t) => {
|
|
216
220
|
let n = {
|
|
217
221
|
completed: !0,
|
|
218
222
|
value: t
|
|
219
223
|
};
|
|
220
|
-
e?.resolve(n), e?.onSettled?.(n), A || (N = n, b.model.value = !1);
|
|
221
|
-
},
|
|
222
|
-
if (
|
|
224
|
+
e?.resolve(n), e?.onSettled?.(n), A || (N = n, R || (b.model.value = !1));
|
|
225
|
+
}, H = (e) => {
|
|
226
|
+
if (z) return z.complete(e);
|
|
223
227
|
if (P) return P.promise;
|
|
224
228
|
let t = A, n = [b.onComplete?.(), t?.onComplete].filter((e) => typeof e == "function");
|
|
225
229
|
A = null;
|
|
@@ -238,7 +242,7 @@ var g = Symbol("abort"), _ = (e) => (typeof e == "object" || typeof e == "functi
|
|
|
238
242
|
return a(), Promise.reject(e);
|
|
239
243
|
}
|
|
240
244
|
if (o === g) return a(), Promise.resolve();
|
|
241
|
-
if (!_(o) || A || !b.model.value) return
|
|
245
|
+
if (!_(o) || A || !b.model.value) return V(t, e), Promise.resolve();
|
|
242
246
|
A = t, M.value = !0;
|
|
243
247
|
let s = {
|
|
244
248
|
for: t,
|
|
@@ -248,39 +252,45 @@ var g = Symbol("abort"), _ = (e) => (typeof e == "object" || typeof e == "functi
|
|
|
248
252
|
if (await t === !1) return g;
|
|
249
253
|
for (; r < n.length;) if (await n[r++](e) === !1) return g;
|
|
250
254
|
})(o).then((n) => {
|
|
251
|
-
P === s && (I(), A === t && n
|
|
255
|
+
P === s && (I(), A === t && (n === g ? R && L({
|
|
256
|
+
completed: !1,
|
|
257
|
+
reason: "unmounted"
|
|
258
|
+
}) : (A = null, V(t, e))));
|
|
252
259
|
}, (e) => {
|
|
253
|
-
if (P === s) throw I(),
|
|
260
|
+
if (P === s) throw I(), R && A === t && L({
|
|
261
|
+
completed: !1,
|
|
262
|
+
reason: "unmounted"
|
|
263
|
+
}), e;
|
|
254
264
|
}), P = s, s.promise;
|
|
255
265
|
};
|
|
256
266
|
b.enabled !== !1 && d(F, {
|
|
257
|
-
record:
|
|
258
|
-
complete:
|
|
267
|
+
record: B,
|
|
268
|
+
complete: H
|
|
259
269
|
});
|
|
260
|
-
let
|
|
261
|
-
if (
|
|
270
|
+
let U = b.enabled === !1 ? null : x(y, C?.appContext), W = C ? S(C) : null, K = b.enabled === !1 ? null : t(), q = !!K && K.family === y && n(K, W), J = !!K && K.family === y && !K.surface && (K.expectedIds.size ? K.expectedIds.has(m(b.id) ?? "") : q);
|
|
271
|
+
if (K && !J && q && !K.surface) {
|
|
262
272
|
let e = m(b.id);
|
|
263
|
-
e &&
|
|
273
|
+
e && K.strayIds.add(e);
|
|
264
274
|
}
|
|
265
|
-
let
|
|
275
|
+
let Y = r(() => J ? K.domId : m(b.id) ?? ""), X = (e) => {
|
|
266
276
|
b.model.value = !0;
|
|
267
277
|
};
|
|
268
|
-
if (
|
|
278
|
+
if (U) {
|
|
269
279
|
let e = null;
|
|
270
|
-
|
|
280
|
+
X = (t) => {
|
|
271
281
|
e ? e.show(void 0, t) : b.model.value = !0;
|
|
272
282
|
};
|
|
273
283
|
let t = () => {
|
|
274
284
|
if (!e) return;
|
|
275
|
-
let t =
|
|
276
|
-
t?.delete(e), t && !t.size &&
|
|
285
|
+
let t = U.byId.get(e.id);
|
|
286
|
+
t?.delete(e), t && !t.size && U.byId.delete(e.id), e = null, U.version.value++;
|
|
277
287
|
}, n = (n) => {
|
|
278
288
|
t(), n && (e = {
|
|
279
289
|
id: n,
|
|
280
|
-
owner:
|
|
290
|
+
owner: W,
|
|
281
291
|
element: b.element,
|
|
282
|
-
domId: () =>
|
|
283
|
-
openingRoot:
|
|
292
|
+
domId: () => Y.value,
|
|
293
|
+
openingRoot: K?.instance ?? null,
|
|
284
294
|
open: () => b.model.value,
|
|
285
295
|
data: () => E.value,
|
|
286
296
|
show(e, t, n, r) {
|
|
@@ -298,7 +308,7 @@ var g = Symbol("abort"), _ = (e) => (typeof e == "object" || typeof e == "functi
|
|
|
298
308
|
onComplete: n,
|
|
299
309
|
onSettled: r,
|
|
300
310
|
result: a
|
|
301
|
-
}, E.value = T(e), O = t, k =
|
|
311
|
+
}, E.value = T(e), O = t && b.element()?.contains(t) ? null : t, k = O ? G(O) : [], b.model.value = !0;
|
|
302
312
|
let o = A;
|
|
303
313
|
return s(() => {
|
|
304
314
|
A === o && !b.model.value && L({
|
|
@@ -308,45 +318,45 @@ var g = Symbol("abort"), _ = (e) => (typeof e == "object" || typeof e == "functi
|
|
|
308
318
|
}), a;
|
|
309
319
|
},
|
|
310
320
|
hide() {
|
|
311
|
-
|
|
321
|
+
B("hide"), b.model.value = !1;
|
|
312
322
|
},
|
|
313
|
-
complete:
|
|
323
|
+
complete: H,
|
|
314
324
|
reset: D
|
|
315
|
-
},
|
|
325
|
+
}, U.byId.has(n) || U.byId.set(n, /* @__PURE__ */ new Set()), U.byId.get(n).add(e), U.version.value++);
|
|
316
326
|
};
|
|
317
|
-
if (n(m(b.id)), h(() => m(b.id), n),
|
|
327
|
+
if (n(m(b.id)), h(() => m(b.id), n), J && e) {
|
|
318
328
|
let t = e, n = {
|
|
319
329
|
id: () => m(b.id),
|
|
320
330
|
show: (e, n, r, i) => t.show(e, n, r, i),
|
|
321
331
|
dismiss(e) {
|
|
322
|
-
|
|
332
|
+
B(e), b.model.value = !1;
|
|
323
333
|
},
|
|
324
334
|
data: () => E.value,
|
|
325
|
-
complete: (e) =>
|
|
335
|
+
complete: (e) => H(e),
|
|
326
336
|
reset: () => D()
|
|
327
337
|
};
|
|
328
|
-
|
|
329
|
-
|
|
338
|
+
K.surface = n, a() && u(() => {
|
|
339
|
+
K.surface === n && (K.surface = null);
|
|
330
340
|
});
|
|
331
341
|
}
|
|
332
|
-
C && (c(() =>
|
|
342
|
+
C && (c(() => U.version.value++), l(() => U.version.value++)), a() && u(t);
|
|
333
343
|
}
|
|
334
344
|
return {
|
|
335
345
|
data: E,
|
|
336
|
-
domId:
|
|
337
|
-
onDemand:
|
|
338
|
-
record:
|
|
339
|
-
complete:
|
|
346
|
+
domId: Y,
|
|
347
|
+
onDemand: J,
|
|
348
|
+
record: B,
|
|
349
|
+
complete: H,
|
|
340
350
|
completing: M,
|
|
341
351
|
closingResult: () => N ?? {
|
|
342
352
|
completed: !1,
|
|
343
353
|
reason: "hide"
|
|
344
354
|
},
|
|
345
355
|
reset: D,
|
|
346
|
-
show: (e) =>
|
|
356
|
+
show: (e) => X(e),
|
|
347
357
|
afterHidden() {
|
|
348
358
|
if (b.model.value) return;
|
|
349
|
-
E.value = w(),
|
|
359
|
+
E.value = w(), J && K.settled && K.hidden();
|
|
350
360
|
let e = O, t = k;
|
|
351
361
|
if (O = null, k = [], !e || typeof document > "u") return;
|
|
352
362
|
let n = document.activeElement, r = b.element();
|
|
@@ -6,15 +6,19 @@ var i = (i) => {
|
|
|
6
6
|
if (!(t instanceof HTMLElement)) return;
|
|
7
7
|
let n = e(i.value);
|
|
8
8
|
n && (a.value = n.contains(t));
|
|
9
|
-
}, s = (
|
|
10
|
-
|
|
9
|
+
}, s = (t) => {
|
|
10
|
+
let n = e(i.value);
|
|
11
|
+
t.target instanceof HTMLElement && n && t.target !== n && t.target.contains(n) || o(t.target);
|
|
11
12
|
}, c = (e) => {
|
|
12
13
|
o(e.target);
|
|
13
14
|
};
|
|
14
15
|
return t(() => {
|
|
15
|
-
document.addEventListener("focusin", s, { passive: !0 }), document.addEventListener("click", c, {
|
|
16
|
+
document.addEventListener("focusin", s, { passive: !0 }), document.addEventListener("click", c, {
|
|
17
|
+
passive: !0,
|
|
18
|
+
capture: !0
|
|
19
|
+
});
|
|
16
20
|
}), n(() => {
|
|
17
|
-
document.removeEventListener("focusin", s), document.removeEventListener("click", c);
|
|
21
|
+
document.removeEventListener("focusin", s), document.removeEventListener("click", c, { capture: !0 });
|
|
18
22
|
}), { active: a };
|
|
19
23
|
};
|
|
20
24
|
export { i as useActiveInactiveState };
|
|
@@ -22,9 +22,9 @@ var h = {
|
|
|
22
22
|
reason: "unmounted"
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
|
-
let w = (e, t) => {
|
|
26
|
-
let { promise:
|
|
27
|
-
return C.add(
|
|
25
|
+
let w = (e, t, r) => {
|
|
26
|
+
let { promise: i, cancel: a } = n(() => v.value, (n) => n.show(e, r, t), () => S("show"));
|
|
27
|
+
return C.add(a), i.then(() => C.delete(a)), i;
|
|
28
28
|
};
|
|
29
29
|
return {
|
|
30
30
|
isReady: u(() => !!v.value),
|
|
@@ -35,8 +35,8 @@ var h = {
|
|
|
35
35
|
completed: !1,
|
|
36
36
|
reason: e
|
|
37
37
|
});
|
|
38
|
-
let r = n?.onComplete;
|
|
39
|
-
return v.value ? v.value.show(t,
|
|
38
|
+
let r = n?.onComplete, i = document.activeElement, a = i instanceof HTMLElement && i !== document.body ? i : null;
|
|
39
|
+
return v.value ? v.value.show(t, a, r) : _ ? w(t, r, a) : (S("show"), Promise.resolve({
|
|
40
40
|
completed: !1,
|
|
41
41
|
reason: "missing"
|
|
42
42
|
}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { hasVnodeListener as e } from "../utilities/functions/hasVnodeListener.js";
|
|
2
|
+
import { computed as t, getCurrentInstance as n, shallowRef as r, watch as i } from "vue";
|
|
3
|
+
// src/composables/useOwnModel.ts
|
|
4
|
+
function a(a, o, s, c) {
|
|
5
|
+
let l = n(), u = `update:${o}`, d = r(a[o]);
|
|
6
|
+
return i(() => a[o], (e) => d.value = e), {
|
|
7
|
+
model: t(() => {
|
|
8
|
+
let t = e(l, u) ? a[o] : d.value;
|
|
9
|
+
return t === void 0 ? c() : t;
|
|
10
|
+
}),
|
|
11
|
+
set: (e) => {
|
|
12
|
+
d.value = e, s(u, e);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export { a as useOwnModel };
|
|
@@ -80,12 +80,12 @@ var s = (e, t) => {
|
|
|
80
80
|
o.value = x.value[r][i];
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
let s = n(o.value).replace(/\D/g, "");
|
|
84
|
-
s = s.slice(0, a.maxLength);
|
|
85
|
-
let
|
|
86
|
-
L(a, s) && (s =
|
|
87
|
-
let
|
|
88
|
-
!
|
|
83
|
+
let s = n(o.value).replace(/\D/g, ""), c = t instanceof InputEvent && t.inputType === "insertText" ? n(t.data ?? "").replace(/\D/g, "") : "";
|
|
84
|
+
s.length > a.maxLength && c && (s = c), s = s.slice(0, a.maxLength);
|
|
85
|
+
let l = x.value[r][i];
|
|
86
|
+
L(a, s) && (s = l), x.value[r][i] = s, o.value = v(s);
|
|
87
|
+
let u = s.length === a.maxLength;
|
|
88
|
+
!u && s.length === 1 && a.autoAdvanceFrom !== void 0 && parseInt(s, 10) >= a.autoAdvanceFrom && (s = s.padStart(a.padTo ?? a.maxLength, "0"), x.value[r][i] = s, o.value = v(s), u = !0), D(e), u && N(e), f();
|
|
89
89
|
}, z = (t, n) => {
|
|
90
90
|
let r = n.target, i = m(t.field), a = i.enum;
|
|
91
91
|
if (a) {
|
|
@@ -143,6 +143,30 @@ var s = (e, t) => {
|
|
|
143
143
|
n > 0 && n < c && (s = e, c = n);
|
|
144
144
|
}
|
|
145
145
|
return s;
|
|
146
|
+
}, V = (e, t) => {
|
|
147
|
+
let n = h()[0], r = h().every((e) => !x.value[e.segment][e.field]), i = t?.relatedTarget, a = i instanceof Element && k(i);
|
|
148
|
+
if (r && !a && (e.segment !== n.segment || e.field !== n.field)) {
|
|
149
|
+
requestAnimationFrame(() => A(n));
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
let o = S[g(e)];
|
|
153
|
+
o && o.value && (o.select(), U(o));
|
|
154
|
+
}, H = null, U = (e) => {
|
|
155
|
+
H?.();
|
|
156
|
+
let t = e.value, n = new AbortController(), { signal: r } = n, i = () => {
|
|
157
|
+
n.abort(), H === i && (H = null);
|
|
158
|
+
};
|
|
159
|
+
H = i;
|
|
160
|
+
let a = (n) => {
|
|
161
|
+
n.type === "click" && (document.addEventListener("selectionchange", a, { signal: r }), setTimeout(i, 50)), document.activeElement === e && e.value === t && e.selectionStart === e.selectionEnd && e.select();
|
|
162
|
+
};
|
|
163
|
+
e.addEventListener("pointerup", a, { signal: r }), e.addEventListener("mouseup", a, { signal: r }), e.addEventListener("click", a, { signal: r });
|
|
164
|
+
for (let t of [
|
|
165
|
+
"keydown",
|
|
166
|
+
"input",
|
|
167
|
+
"blur",
|
|
168
|
+
"paste"
|
|
169
|
+
]) e.addEventListener(t, i, { signal: r });
|
|
146
170
|
};
|
|
147
171
|
return {
|
|
148
172
|
fields: x,
|
|
@@ -163,20 +187,7 @@ var s = (e, t) => {
|
|
|
163
187
|
segmentStatus: I,
|
|
164
188
|
onFieldInput: R,
|
|
165
189
|
onFieldKeydown: z,
|
|
166
|
-
onFieldFocus:
|
|
167
|
-
let t = h()[0];
|
|
168
|
-
if (h().every((e) => !x.value[e.segment][e.field]) && (e.segment !== t.segment || e.field !== t.field)) {
|
|
169
|
-
requestAnimationFrame(() => A(t));
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
let n = S[g(e)];
|
|
173
|
-
if (n && n.value) {
|
|
174
|
-
let e = n.value;
|
|
175
|
-
requestAnimationFrame(() => {
|
|
176
|
-
document.activeElement === n && n.value === e && n.select();
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
},
|
|
190
|
+
onFieldFocus: V,
|
|
180
191
|
onFieldBlur: (e) => {
|
|
181
192
|
let { segment: t, field: n } = e, r = m(n);
|
|
182
193
|
if (r.padTo) {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/i18n/currencyDigits.ts
|
|
2
|
+
var e = {
|
|
3
|
+
ADP: 0,
|
|
4
|
+
AFN: 0,
|
|
5
|
+
ALL: 0,
|
|
6
|
+
BHD: 3,
|
|
7
|
+
BIF: 0,
|
|
8
|
+
BYR: 0,
|
|
9
|
+
CLF: 4,
|
|
10
|
+
CLP: 0,
|
|
11
|
+
COP: 0,
|
|
12
|
+
DJF: 0,
|
|
13
|
+
ESP: 0,
|
|
14
|
+
GNF: 0,
|
|
15
|
+
HUF: 0,
|
|
16
|
+
IDR: 0,
|
|
17
|
+
IQD: 0,
|
|
18
|
+
IRR: 0,
|
|
19
|
+
ISK: 0,
|
|
20
|
+
ITL: 0,
|
|
21
|
+
JOD: 3,
|
|
22
|
+
JPY: 0,
|
|
23
|
+
KMF: 0,
|
|
24
|
+
KPW: 0,
|
|
25
|
+
KRW: 0,
|
|
26
|
+
KWD: 3,
|
|
27
|
+
LAK: 0,
|
|
28
|
+
LBP: 0,
|
|
29
|
+
LUF: 0,
|
|
30
|
+
LYD: 3,
|
|
31
|
+
MGA: 0,
|
|
32
|
+
MGF: 0,
|
|
33
|
+
MMK: 0,
|
|
34
|
+
MRO: 0,
|
|
35
|
+
OMR: 3,
|
|
36
|
+
PKR: 0,
|
|
37
|
+
PYG: 0,
|
|
38
|
+
RWF: 0,
|
|
39
|
+
SLL: 0,
|
|
40
|
+
SOS: 0,
|
|
41
|
+
STD: 0,
|
|
42
|
+
SYP: 0,
|
|
43
|
+
TMM: 0,
|
|
44
|
+
TND: 3,
|
|
45
|
+
TRL: 0,
|
|
46
|
+
UGX: 0,
|
|
47
|
+
UYI: 0,
|
|
48
|
+
UYW: 4,
|
|
49
|
+
VND: 0,
|
|
50
|
+
VUV: 0,
|
|
51
|
+
XAF: 0,
|
|
52
|
+
XOF: 0,
|
|
53
|
+
XPF: 0,
|
|
54
|
+
YER: 0,
|
|
55
|
+
ZMK: 0,
|
|
56
|
+
ZWD: 0
|
|
57
|
+
};
|
|
58
|
+
export { e as CURRENCY_DIGITS };
|