@aleph-alpha/settings-kit 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +465 -15
- package/dist/SkLayout.vue_vue_type_script_setup_true_lang-ZjV2AMdR.js +51 -0
- package/dist/SkLayoutPage-DGbCpQFm.js +2545 -0
- package/dist/UseFileConvertor-DN6cCXNi.js +50 -0
- package/dist/components/SkField/SkField.vue.d.ts +28 -0
- package/dist/components/SkField/SkField.vue.d.ts.map +1 -0
- package/dist/components/SkField/index.d.ts +2 -0
- package/dist/components/SkField/index.d.ts.map +1 -0
- package/dist/components/SkGroup/SkGroup.vue.d.ts +29 -0
- package/dist/components/SkGroup/SkGroup.vue.d.ts.map +1 -0
- package/dist/components/SkGroup/index.d.ts +2 -0
- package/dist/components/SkGroup/index.d.ts.map +1 -0
- package/dist/components/SkItem/SkItem.vue.d.ts +22 -0
- package/dist/components/SkItem/SkItem.vue.d.ts.map +1 -0
- package/dist/components/SkItem/index.d.ts +2 -0
- package/dist/components/SkItem/index.d.ts.map +1 -0
- package/dist/components/SkLayout/SkLayout.vue.d.ts +53 -0
- package/dist/components/SkLayout/SkLayout.vue.d.ts.map +1 -0
- package/dist/components/SkLayout/SkLayoutPage.d.ts +23 -0
- package/dist/components/SkLayout/SkLayoutPage.d.ts.map +1 -0
- package/dist/components/SkLayout/context.d.ts +61 -0
- package/dist/components/SkLayout/context.d.ts.map +1 -0
- package/dist/components/SkLayout/index.d.ts +5 -0
- package/dist/components/SkLayout/index.d.ts.map +1 -0
- package/dist/components/SkPage/SkPage.vue.d.ts +35 -0
- package/dist/components/SkPage/SkPage.vue.d.ts.map +1 -0
- package/dist/components/SkPage/index.d.ts +2 -0
- package/dist/components/SkPage/index.d.ts.map +1 -0
- package/dist/components/SkSection/SkSection.vue.d.ts +29 -0
- package/dist/components/SkSection/SkSection.vue.d.ts.map +1 -0
- package/dist/components/SkSection/index.d.ts +2 -0
- package/dist/components/SkSection/index.d.ts.map +1 -0
- package/dist/components/controls/SkActionsControl/SkActionsControl.vue.d.ts +37 -0
- package/dist/components/controls/SkActionsControl/SkActionsControl.vue.d.ts.map +1 -0
- package/dist/components/controls/SkActionsControl/index.d.ts +2 -0
- package/dist/components/controls/SkActionsControl/index.d.ts.map +1 -0
- package/dist/components/controls/SkCheckboxControl/SkCheckboxControl.vue.d.ts +35 -0
- package/dist/components/controls/SkCheckboxControl/SkCheckboxControl.vue.d.ts.map +1 -0
- package/dist/components/controls/SkCheckboxControl/index.d.ts +2 -0
- package/dist/components/controls/SkCheckboxControl/index.d.ts.map +1 -0
- package/dist/components/controls/SkColorControl/SkColorControl.vue.d.ts +35 -0
- package/dist/components/controls/SkColorControl/SkColorControl.vue.d.ts.map +1 -0
- package/dist/components/controls/SkColorControl/index.d.ts +2 -0
- package/dist/components/controls/SkColorControl/index.d.ts.map +1 -0
- package/dist/components/controls/SkFileUpload/SkFilePlaceholder.vue.d.ts +11 -0
- package/dist/components/controls/SkFileUpload/SkFilePlaceholder.vue.d.ts.map +1 -0
- package/dist/components/controls/SkFileUpload/SkFileUpload.vue.d.ts +46 -0
- package/dist/components/controls/SkFileUpload/SkFileUpload.vue.d.ts.map +1 -0
- package/dist/components/controls/SkFileUpload/index.d.ts +2 -0
- package/dist/components/controls/SkFileUpload/index.d.ts.map +1 -0
- package/dist/components/controls/SkPeriodControl/SkPeriodControl.vue.d.ts +35 -0
- package/dist/components/controls/SkPeriodControl/SkPeriodControl.vue.d.ts.map +1 -0
- package/dist/components/controls/SkPeriodControl/index.d.ts +2 -0
- package/dist/components/controls/SkPeriodControl/index.d.ts.map +1 -0
- package/dist/components/controls/SkSelectControl/SkSelectControl.vue.d.ts +40 -0
- package/dist/components/controls/SkSelectControl/SkSelectControl.vue.d.ts.map +1 -0
- package/dist/components/controls/SkSelectControl/index.d.ts +2 -0
- package/dist/components/controls/SkSelectControl/index.d.ts.map +1 -0
- package/dist/components/controls/SkTelControl/SKTelPrefixControl.vue.d.ts +16 -0
- package/dist/components/controls/SkTelControl/SKTelPrefixControl.vue.d.ts.map +1 -0
- package/dist/components/controls/SkTelControl/SkTelControl.vue.d.ts +35 -0
- package/dist/components/controls/SkTelControl/SkTelControl.vue.d.ts.map +1 -0
- package/dist/components/controls/SkTelControl/index.d.ts +4 -0
- package/dist/components/controls/SkTelControl/index.d.ts.map +1 -0
- package/dist/components/controls/SkTelControl/prefixes.d.ts +26 -0
- package/dist/components/controls/SkTelControl/prefixes.d.ts.map +1 -0
- package/dist/components/controls/SkTextControl/SkTextControl.vue.d.ts +45 -0
- package/dist/components/controls/SkTextControl/SkTextControl.vue.d.ts.map +1 -0
- package/dist/components/controls/SkTextControl/index.d.ts +2 -0
- package/dist/components/controls/SkTextControl/index.d.ts.map +1 -0
- package/dist/components/controls/SkUnsupportedControl/SkUnsupportedControl.vue.d.ts +8 -0
- package/dist/components/controls/SkUnsupportedControl/SkUnsupportedControl.vue.d.ts.map +1 -0
- package/dist/components/controls/storyEventLog.d.ts +33 -0
- package/dist/components/controls/storyEventLog.d.ts.map +1 -0
- package/dist/components/index.d.ts +7 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +12 -2
- package/dist/composables/UseFileConvertor/UseFileConvertor.d.ts +7 -0
- package/dist/composables/UseFileConvertor/UseFileConvertor.d.ts.map +1 -0
- package/dist/composables/index.d.ts +14 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/useFieldInheritance/useFieldInheritance.d.ts +24 -0
- package/dist/composables/useFieldInheritance/useFieldInheritance.d.ts.map +1 -0
- package/dist/composables/useFieldValidator/useFieldValidator.d.ts +50 -0
- package/dist/composables/useFieldValidator/useFieldValidator.d.ts.map +1 -0
- package/dist/composables/useSettingField/useSettingField.d.ts +24 -0
- package/dist/composables/useSettingField/useSettingField.d.ts.map +1 -0
- package/dist/composables/useSettingsForm/useSettingsForm.d.ts +12 -0
- package/dist/composables/useSettingsForm/useSettingsForm.d.ts.map +1 -0
- package/dist/composables/useSettingsLayout/useSettingsLayout.d.ts +71 -0
- package/dist/composables/useSettingsLayout/useSettingsLayout.d.ts.map +1 -0
- package/dist/composables/useSettingsLocale/useSettingsLocale.d.ts +38 -0
- package/dist/composables/useSettingsLocale/useSettingsLocale.d.ts.map +1 -0
- package/dist/composables/useStateManager/useStateManager.d.ts +10 -0
- package/dist/composables/useStateManager/useStateManager.d.ts.map +1 -0
- package/dist/core/controls/controlDefinitions.d.ts +33 -0
- package/dist/core/controls/controlDefinitions.d.ts.map +1 -0
- package/dist/core/controls/index.d.ts +26 -0
- package/dist/core/controls/index.d.ts.map +1 -0
- package/dist/core/index.d.ts +18 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/layout/index.d.ts +8 -0
- package/dist/core/layout/index.d.ts.map +1 -0
- package/dist/core/layout/navigation.d.ts +33 -0
- package/dist/core/layout/navigation.d.ts.map +1 -0
- package/dist/core/layout/resolve.d.ts +41 -0
- package/dist/core/layout/resolve.d.ts.map +1 -0
- package/dist/core/layout/types.d.ts +160 -0
- package/dist/core/layout/types.d.ts.map +1 -0
- package/dist/core/layout/validate.d.ts +26 -0
- package/dist/core/layout/validate.d.ts.map +1 -0
- package/dist/core/types.d.ts +541 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/useControlModel.d.ts +13 -0
- package/dist/core/useControlModel.d.ts.map +1 -0
- package/dist/core/utils/a11y.d.ts +25 -0
- package/dist/core/utils/a11y.d.ts.map +1 -0
- package/dist/core/utils/cast.d.ts +8 -0
- package/dist/core/utils/cast.d.ts.map +1 -0
- package/dist/core/utils/consts.d.ts +978 -0
- package/dist/core/utils/consts.d.ts.map +1 -0
- package/dist/core/utils/kitMessages.d.ts +165 -0
- package/dist/core/utils/kitMessages.d.ts.map +1 -0
- package/dist/core/utils/localizedText.d.ts +10 -0
- package/dist/core/utils/localizedText.d.ts.map +1 -0
- package/dist/core/utils/useName.d.ts +7 -0
- package/dist/core/utils/useName.d.ts.map +1 -0
- package/dist/core/validate/constraints.d.ts +20 -0
- package/dist/core/validate/constraints.d.ts.map +1 -0
- package/dist/core/validate/rules.d.ts +29 -0
- package/dist/core/validate/rules.d.ts.map +1 -0
- package/dist/index-BQ6z6MK4.js +214 -0
- package/dist/index-BXs-0JdT.js +168 -0
- package/dist/index-BynIH0EE.js +92 -0
- package/dist/index-C-WLhRod.js +100 -0
- package/dist/index-CFMv8jSO.js +4 -0
- package/dist/index-CGYERet5.js +373 -0
- package/dist/index-KAbhkO1J.js +81 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -3
- package/dist/service/index.d.ts +2 -0
- package/dist/service/index.d.ts.map +1 -0
- package/dist/shell/SkShell.vue.d.ts +80 -0
- package/dist/shell/SkShell.vue.d.ts.map +1 -0
- package/dist/shell/SkShellFrame.vue.d.ts +46 -0
- package/dist/shell/SkShellFrame.vue.d.ts.map +1 -0
- package/dist/shell/SkShellNav.vue.d.ts +19 -0
- package/dist/shell/SkShellNav.vue.d.ts.map +1 -0
- package/dist/shell/history.d.ts +9 -0
- package/dist/shell/history.d.ts.map +1 -0
- package/dist/shell/index.d.ts +12 -0
- package/dist/shell/index.d.ts.map +1 -0
- package/dist/shell/index.js +848 -0
- package/dist/shell/labels.d.ts +25 -0
- package/dist/shell/labels.d.ts.map +1 -0
- package/dist/shell/location.d.ts +18 -0
- package/dist/shell/location.d.ts.map +1 -0
- package/dist/shell/routes.d.ts +19 -0
- package/dist/shell/routes.d.ts.map +1 -0
- package/dist/shell/useMediaQuery.d.ts +4 -0
- package/dist/shell/useMediaQuery.d.ts.map +1 -0
- package/dist/shell/useShellLocation.d.ts +37 -0
- package/dist/shell/useShellLocation.d.ts.map +1 -0
- package/package.json +42 -23
- package/dist/SettingToggleUnit.vue_vue_type_script_setup_true_lang-BM7-6aXj.js +0 -61
- package/dist/components/SettingToggleUnit/SettingToggleUnit.vue.d.ts +0 -16
- package/dist/components/SettingToggleUnit/SettingToggleUnit.vue.d.ts.map +0 -1
- package/dist/components/SettingToggleUnit/index.d.ts +0 -3
- package/dist/components/SettingToggleUnit/index.d.ts.map +0 -1
- package/dist/components/SettingToggleUnit/types.d.ts +0 -11
- package/dist/components/SettingToggleUnit/types.d.ts.map +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderSlot, createElementVNode, normalizeStyle, unref, normalizeClass, withDirectives, mergeProps, isRef, vModelText, createVNode, mergeDefaults } from "vue";
|
|
2
|
+
import { UiInput } from "@aleph-alpha/ui-library";
|
|
3
|
+
import { N as useControlModel, I as useSettingsLocale, O as useName, P as useA11yAttrs, Q as skBaseControlDefaults } from "./SkLayoutPage-DGbCpQFm.js";
|
|
4
|
+
const _hoisted_1 = { class: "flex items-center gap-2" };
|
|
5
|
+
const _hoisted_2 = ["id", "name", "disabled", "required"];
|
|
6
|
+
const _hoisted_3 = { class: "flex flex-col grow gap-2" };
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
...{
|
|
9
|
+
name: "SkColorControl",
|
|
10
|
+
inheritAttrs: false
|
|
11
|
+
},
|
|
12
|
+
__name: "SkColorControl",
|
|
13
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
14
|
+
modelValue: {},
|
|
15
|
+
id: {},
|
|
16
|
+
name: {},
|
|
17
|
+
placeholder: {},
|
|
18
|
+
disabled: { type: Boolean },
|
|
19
|
+
inheriting: { type: Boolean },
|
|
20
|
+
required: { type: Boolean },
|
|
21
|
+
label: {},
|
|
22
|
+
tooltip: {},
|
|
23
|
+
errors: {}
|
|
24
|
+
}, {
|
|
25
|
+
...skBaseControlDefaults
|
|
26
|
+
}),
|
|
27
|
+
emits: ["update:modelValue", "change"],
|
|
28
|
+
setup(__props, { emit: __emit }) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const emit = __emit;
|
|
31
|
+
const model = useControlModel(props, emit, "#000000");
|
|
32
|
+
const { message } = useSettingsLocale();
|
|
33
|
+
const controlName = useName(props?.name ?? props?.id);
|
|
34
|
+
const a11yAttrs = useA11yAttrs([
|
|
35
|
+
"aria-label",
|
|
36
|
+
"aria-labelledby",
|
|
37
|
+
"aria-describedby",
|
|
38
|
+
"aria-invalid",
|
|
39
|
+
"aria-required",
|
|
40
|
+
"aria-errormessage"
|
|
41
|
+
]);
|
|
42
|
+
const hexA11yAttrs = computed(() => ({
|
|
43
|
+
...a11yAttrs.value,
|
|
44
|
+
"aria-label": a11yAttrs.value["aria-label"] ? message("color.hexValue", { label: a11yAttrs.value["aria-label"] }) : message("color.hexValueDefault"),
|
|
45
|
+
"aria-labelledby": void 0
|
|
46
|
+
}));
|
|
47
|
+
function onChange(event) {
|
|
48
|
+
emit("change", event.target.value);
|
|
49
|
+
}
|
|
50
|
+
return (_ctx, _cache) => {
|
|
51
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
52
|
+
renderSlot(_ctx.$slots, "label"),
|
|
53
|
+
createElementVNode("div", _hoisted_1, [
|
|
54
|
+
createElementVNode("label", {
|
|
55
|
+
class: normalizeClass(["ui-focus-ring-within size-9 shrink-0 cursor-pointer rounded-full border border-input self-start", { "pointer-events-none opacity-50": __props.disabled }]),
|
|
56
|
+
style: normalizeStyle({ backgroundColor: unref(model) })
|
|
57
|
+
}, [
|
|
58
|
+
withDirectives(createElementVNode("input", mergeProps({
|
|
59
|
+
id: __props.id,
|
|
60
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null)
|
|
61
|
+
}, unref(a11yAttrs), {
|
|
62
|
+
type: "color",
|
|
63
|
+
name: `${unref(controlName)}-color`,
|
|
64
|
+
disabled: __props.disabled,
|
|
65
|
+
required: __props.required,
|
|
66
|
+
class: "sr-only",
|
|
67
|
+
onChange
|
|
68
|
+
}), null, 16, _hoisted_2), [
|
|
69
|
+
[vModelText, unref(model)]
|
|
70
|
+
])
|
|
71
|
+
], 6),
|
|
72
|
+
createElementVNode("div", _hoisted_3, [
|
|
73
|
+
createVNode(unref(UiInput), mergeProps({
|
|
74
|
+
modelValue: unref(model),
|
|
75
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(model) ? model.value = $event : null)
|
|
76
|
+
}, hexA11yAttrs.value, {
|
|
77
|
+
class: "grow",
|
|
78
|
+
name: `${unref(controlName)}-input`,
|
|
79
|
+
placeholder: __props.placeholder,
|
|
80
|
+
disabled: __props.disabled,
|
|
81
|
+
onChange
|
|
82
|
+
}), null, 16, ["modelValue", "name", "placeholder", "disabled"]),
|
|
83
|
+
renderSlot(_ctx.$slots, "error")
|
|
84
|
+
])
|
|
85
|
+
])
|
|
86
|
+
], 64);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
_sfc_main as SkColorControl
|
|
92
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderSlot, createVNode, unref, withCtx, mergeProps, renderList, createBlock, createTextVNode, toDisplayString, mergeDefaults } from "vue";
|
|
2
|
+
import { UiSelect, UiSelectTrigger, UiSelectValue, UiSelectContent, UiSelectItem } from "@aleph-alpha/ui-library";
|
|
3
|
+
import { I as useSettingsLocale, N as useControlModel, O as useName, P as useA11yAttrs, Q as skBaseControlDefaults } from "./SkLayoutPage-DGbCpQFm.js";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
...{
|
|
6
|
+
name: "SkSelectControl",
|
|
7
|
+
inheritAttrs: false
|
|
8
|
+
},
|
|
9
|
+
__name: "SkSelectControl",
|
|
10
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
11
|
+
options: {},
|
|
12
|
+
modelValue: {},
|
|
13
|
+
id: {},
|
|
14
|
+
name: {},
|
|
15
|
+
placeholder: {},
|
|
16
|
+
disabled: { type: Boolean },
|
|
17
|
+
inheriting: { type: Boolean },
|
|
18
|
+
required: { type: Boolean },
|
|
19
|
+
label: {},
|
|
20
|
+
tooltip: {},
|
|
21
|
+
errors: {}
|
|
22
|
+
}, {
|
|
23
|
+
...skBaseControlDefaults,
|
|
24
|
+
options: () => []
|
|
25
|
+
}),
|
|
26
|
+
emits: ["update:modelValue", "change"],
|
|
27
|
+
setup(__props, { emit: __emit }) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const emit = __emit;
|
|
30
|
+
const { resolveText } = useSettingsLocale();
|
|
31
|
+
const resolvedOptions = computed(
|
|
32
|
+
() => props.options.map((option) => ({
|
|
33
|
+
value: option.value,
|
|
34
|
+
label: resolveText(option.label),
|
|
35
|
+
disabled: option.disabled
|
|
36
|
+
}))
|
|
37
|
+
);
|
|
38
|
+
const model = useControlModel(props, emit);
|
|
39
|
+
function pick(next) {
|
|
40
|
+
const value = Array.isArray(next) ? next[0] : next;
|
|
41
|
+
model.value = value;
|
|
42
|
+
emit("change", value);
|
|
43
|
+
}
|
|
44
|
+
const controlName = useName(props?.name ?? props?.id);
|
|
45
|
+
const a11yAttrs = useA11yAttrs([
|
|
46
|
+
"aria-label",
|
|
47
|
+
"aria-labelledby",
|
|
48
|
+
"aria-describedby",
|
|
49
|
+
"aria-invalid",
|
|
50
|
+
"aria-required",
|
|
51
|
+
"aria-errormessage"
|
|
52
|
+
]);
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
55
|
+
renderSlot(_ctx.$slots, "label"),
|
|
56
|
+
createVNode(unref(UiSelect), {
|
|
57
|
+
"model-value": unref(model),
|
|
58
|
+
name: unref(controlName),
|
|
59
|
+
disabled: __props.disabled,
|
|
60
|
+
required: __props.required,
|
|
61
|
+
"onUpdate:modelValue": pick
|
|
62
|
+
}, {
|
|
63
|
+
default: withCtx(() => [
|
|
64
|
+
createVNode(unref(UiSelectTrigger), mergeProps({ id: __props.id }, unref(a11yAttrs), {
|
|
65
|
+
class: "w-full",
|
|
66
|
+
disabled: __props.disabled
|
|
67
|
+
}), {
|
|
68
|
+
default: withCtx(() => [
|
|
69
|
+
createVNode(unref(UiSelectValue), { placeholder: __props.placeholder }, null, 8, ["placeholder"])
|
|
70
|
+
]),
|
|
71
|
+
_: 1
|
|
72
|
+
}, 16, ["id", "disabled"]),
|
|
73
|
+
createVNode(unref(UiSelectContent), null, {
|
|
74
|
+
default: withCtx(() => [
|
|
75
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(resolvedOptions.value, (option) => {
|
|
76
|
+
return openBlock(), createBlock(unref(UiSelectItem), {
|
|
77
|
+
key: option.value,
|
|
78
|
+
value: option.value,
|
|
79
|
+
disabled: option.disabled
|
|
80
|
+
}, {
|
|
81
|
+
default: withCtx(() => [
|
|
82
|
+
createTextVNode(toDisplayString(option.label), 1)
|
|
83
|
+
]),
|
|
84
|
+
_: 2
|
|
85
|
+
}, 1032, ["value", "disabled"]);
|
|
86
|
+
}), 128))
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
})
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
}, 8, ["model-value", "name", "disabled", "required"]),
|
|
93
|
+
renderSlot(_ctx.$slots, "error")
|
|
94
|
+
], 64);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
export {
|
|
99
|
+
_sfc_main as SkSelectControl
|
|
100
|
+
};
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import { defineAsyncComponent, defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, toDisplayString, normalizeStyle, createCommentVNode, nextTick, createElementBlock, Fragment, renderSlot, mergeProps, mergeDefaults } from "vue";
|
|
2
|
+
import { UiDropdownMenu, UiDropdownMenuTrigger, UiInputGroupButton, UiIcon, UiDropdownMenuContent, UiListbox, UiListboxFilter, UiDropdownMenuSeparator, UiListboxContent, UiListboxVirtualizer, UiDropdownMenuItem, UiInputGroup, UiInputGroupAddon, UiInputGroupInput } from "@aleph-alpha/ui-library";
|
|
3
|
+
import { U as skCountries, I as useSettingsLocale, N as useControlModel, O as useName, P as useA11yAttrs, Q as skBaseControlDefaults } from "./SkLayoutPage-DGbCpQFm.js";
|
|
4
|
+
import { ChevronDownIcon, SearchIcon, CheckIcon } from "@aleph-alpha/ui-library/icons";
|
|
5
|
+
function getCountryFlag(code) {
|
|
6
|
+
const country = skCountries[code];
|
|
7
|
+
if (!country) {
|
|
8
|
+
throw new Error(`No flag icon for country code "${code}"`);
|
|
9
|
+
}
|
|
10
|
+
return defineAsyncComponent(async () => {
|
|
11
|
+
const icons = await import("@aleph-alpha/ui-library/icons");
|
|
12
|
+
const icon = icons[country.flag];
|
|
13
|
+
if (!icon) {
|
|
14
|
+
throw new Error(`No flag icon for country code "${code}"`);
|
|
15
|
+
}
|
|
16
|
+
return icon;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const englishNames = new Intl.DisplayNames(["en"], { type: "region" });
|
|
20
|
+
function createCountryNames(locales) {
|
|
21
|
+
let names = englishNames;
|
|
22
|
+
try {
|
|
23
|
+
names = new Intl.DisplayNames(
|
|
24
|
+
[...new Set([...locales, "en"].filter((l) => !!l))],
|
|
25
|
+
{ type: "region" }
|
|
26
|
+
);
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
return (code) => names.of(code) ?? code;
|
|
30
|
+
}
|
|
31
|
+
const dialPrefixes = Object.entries(skCountries).map(
|
|
32
|
+
([code, country]) => ({
|
|
33
|
+
code,
|
|
34
|
+
dialCode: country.number,
|
|
35
|
+
icon: getCountryFlag(code)
|
|
36
|
+
})
|
|
37
|
+
);
|
|
38
|
+
const prefixByCode = new Map(
|
|
39
|
+
dialPrefixes.map((prefix) => [prefix.code, prefix])
|
|
40
|
+
);
|
|
41
|
+
function findPrefixByCode(code) {
|
|
42
|
+
return prefixByCode.get(code);
|
|
43
|
+
}
|
|
44
|
+
const germany = findPrefixByCode("DE");
|
|
45
|
+
if (!germany) {
|
|
46
|
+
throw new Error("skCountries must contain the DE default prefix");
|
|
47
|
+
}
|
|
48
|
+
const defaultPrefix = germany;
|
|
49
|
+
const prefixesByDialCodeLength = [...dialPrefixes].sort(
|
|
50
|
+
(a, b) => b.dialCode.length - a.dialCode.length
|
|
51
|
+
);
|
|
52
|
+
function normalizeTel(value) {
|
|
53
|
+
return value.replace(/[\s().-]/g, "");
|
|
54
|
+
}
|
|
55
|
+
function parseTel(value) {
|
|
56
|
+
const normalized = normalizeTel(value);
|
|
57
|
+
if (!normalized.startsWith("+")) {
|
|
58
|
+
return { national: value };
|
|
59
|
+
}
|
|
60
|
+
const prefix = prefixesByDialCodeLength.find(
|
|
61
|
+
(candidate) => normalized.startsWith(candidate.dialCode)
|
|
62
|
+
);
|
|
63
|
+
if (!prefix) {
|
|
64
|
+
return { national: value };
|
|
65
|
+
}
|
|
66
|
+
return { prefix, national: normalized.slice(prefix.dialCode.length) };
|
|
67
|
+
}
|
|
68
|
+
function composeTel(dialCode, national) {
|
|
69
|
+
const digits = normalizeTel(national).replace(/\D/g, "").replace(/^0+/, "");
|
|
70
|
+
return digits ? `${dialCode}${digits}` : "";
|
|
71
|
+
}
|
|
72
|
+
const _hoisted_1 = { class: "tabular-nums body-m-regular !font-medium text-content-on-surface-primary" };
|
|
73
|
+
const _hoisted_2 = { class: "flex items-center gap-2 px-3" };
|
|
74
|
+
const _hoisted_3 = { class: "flex-1 body-s-regular text-content-on-surface-primary" };
|
|
75
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
76
|
+
...{
|
|
77
|
+
name: "SkTelPrefixControl"
|
|
78
|
+
},
|
|
79
|
+
__name: "SKTelPrefixControl",
|
|
80
|
+
props: {
|
|
81
|
+
modelValue: { default: void 0 },
|
|
82
|
+
disabled: { type: Boolean, default: false }
|
|
83
|
+
},
|
|
84
|
+
emits: ["update:modelValue"],
|
|
85
|
+
setup(__props, { emit: __emit }) {
|
|
86
|
+
const props = __props;
|
|
87
|
+
const emit = __emit;
|
|
88
|
+
const open = ref(false);
|
|
89
|
+
const internalCode = ref(defaultPrefix.code);
|
|
90
|
+
const prefixCode = computed({
|
|
91
|
+
get: () => props.modelValue ?? internalCode.value,
|
|
92
|
+
set: (value) => {
|
|
93
|
+
internalCode.value = value;
|
|
94
|
+
emit("update:modelValue", value);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
const { message, locale, fallbackLocale } = useSettingsLocale();
|
|
98
|
+
const countryName = computed(
|
|
99
|
+
() => createCountryNames([locale.value, fallbackLocale.value])
|
|
100
|
+
);
|
|
101
|
+
const selectedPrefix = computed(
|
|
102
|
+
() => findPrefixByCode(prefixCode.value) ?? defaultPrefix
|
|
103
|
+
);
|
|
104
|
+
const prefixCodes = dialPrefixes.map((prefix) => prefix.code);
|
|
105
|
+
const query = ref("");
|
|
106
|
+
const filteredCodes = computed(() => {
|
|
107
|
+
const q = query.value.trim().toLowerCase();
|
|
108
|
+
if (!q) return prefixCodes;
|
|
109
|
+
return dialPrefixes.filter(
|
|
110
|
+
(prefix) => countryName.value(prefix.code).toLowerCase().includes(q) || prefix.dialCode.includes(q)
|
|
111
|
+
).map((prefix) => prefix.code);
|
|
112
|
+
});
|
|
113
|
+
function prefixFor(code) {
|
|
114
|
+
return findPrefixByCode(code) ?? defaultPrefix;
|
|
115
|
+
}
|
|
116
|
+
function selectPrefix(code) {
|
|
117
|
+
prefixCode.value = code;
|
|
118
|
+
}
|
|
119
|
+
const trigger = ref(null);
|
|
120
|
+
const filter = ref(null);
|
|
121
|
+
const menuStyle = ref();
|
|
122
|
+
const alignOffset = ref(0);
|
|
123
|
+
watch(open, (isOpen) => {
|
|
124
|
+
if (!isOpen) return;
|
|
125
|
+
query.value = "";
|
|
126
|
+
const triggerEl = trigger.value?.$el;
|
|
127
|
+
const groupEl = triggerEl?.closest('[data-slot="input-group"]');
|
|
128
|
+
if (!triggerEl || !groupEl) return;
|
|
129
|
+
const groupRect = groupEl.getBoundingClientRect();
|
|
130
|
+
if (groupRect.width > 0) {
|
|
131
|
+
menuStyle.value = { width: `${groupRect.width}px` };
|
|
132
|
+
alignOffset.value = groupRect.left - triggerEl.getBoundingClientRect().left;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
function focusFilter(event) {
|
|
136
|
+
event.preventDefault();
|
|
137
|
+
void nextTick(() => {
|
|
138
|
+
filter.value?.$el?.focus();
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return (_ctx, _cache) => {
|
|
142
|
+
return openBlock(), createBlock(unref(UiDropdownMenu), {
|
|
143
|
+
open: open.value,
|
|
144
|
+
"onUpdate:open": _cache[2] || (_cache[2] = ($event) => open.value = $event)
|
|
145
|
+
}, {
|
|
146
|
+
default: withCtx(() => [
|
|
147
|
+
createVNode(unref(UiDropdownMenuTrigger), { "as-child": "" }, {
|
|
148
|
+
default: withCtx(() => [
|
|
149
|
+
createVNode(unref(UiInputGroupButton), {
|
|
150
|
+
ref_key: "trigger",
|
|
151
|
+
ref: trigger,
|
|
152
|
+
disabled: __props.disabled,
|
|
153
|
+
"aria-label": unref(message)("tel.countryCode", {
|
|
154
|
+
country: countryName.value(selectedPrefix.value.code),
|
|
155
|
+
dialCode: selectedPrefix.value.dialCode
|
|
156
|
+
})
|
|
157
|
+
}, {
|
|
158
|
+
default: withCtx(() => [
|
|
159
|
+
createVNode(unref(UiIcon), {
|
|
160
|
+
name: selectedPrefix.value.icon,
|
|
161
|
+
size: 16,
|
|
162
|
+
class: "shrink-0"
|
|
163
|
+
}, null, 8, ["name"]),
|
|
164
|
+
createElementVNode("span", _hoisted_1, toDisplayString(selectedPrefix.value.dialCode), 1),
|
|
165
|
+
createVNode(unref(UiIcon), {
|
|
166
|
+
name: unref(ChevronDownIcon),
|
|
167
|
+
class: "shrink-0 text-content-on-surface-primary"
|
|
168
|
+
}, null, 8, ["name"])
|
|
169
|
+
]),
|
|
170
|
+
_: 1
|
|
171
|
+
}, 8, ["disabled", "aria-label"])
|
|
172
|
+
]),
|
|
173
|
+
_: 1
|
|
174
|
+
}),
|
|
175
|
+
createVNode(unref(UiDropdownMenuContent), {
|
|
176
|
+
align: "start",
|
|
177
|
+
"align-offset": alignOffset.value,
|
|
178
|
+
style: normalizeStyle(menuStyle.value),
|
|
179
|
+
class: "!p-0 !shadow-md",
|
|
180
|
+
onOpenAutoFocus: focusFilter
|
|
181
|
+
}, {
|
|
182
|
+
default: withCtx(() => [
|
|
183
|
+
createVNode(unref(UiListbox), {
|
|
184
|
+
modelValue: prefixCode.value,
|
|
185
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => prefixCode.value = $event),
|
|
186
|
+
"highlight-on-hover": ""
|
|
187
|
+
}, {
|
|
188
|
+
default: withCtx(() => [
|
|
189
|
+
createElementVNode("div", _hoisted_2, [
|
|
190
|
+
createVNode(unref(UiIcon), {
|
|
191
|
+
name: unref(SearchIcon),
|
|
192
|
+
size: 16,
|
|
193
|
+
class: "text-content-on-surface-muted shrink-0"
|
|
194
|
+
}, null, 8, ["name"]),
|
|
195
|
+
createVNode(unref(UiListboxFilter), {
|
|
196
|
+
ref_key: "filter",
|
|
197
|
+
ref: filter,
|
|
198
|
+
modelValue: query.value,
|
|
199
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => query.value = $event),
|
|
200
|
+
placeholder: unref(message)("tel.search"),
|
|
201
|
+
"aria-label": unref(message)("tel.searchCountry"),
|
|
202
|
+
class: "px-0"
|
|
203
|
+
}, null, 8, ["modelValue", "placeholder", "aria-label"])
|
|
204
|
+
]),
|
|
205
|
+
createVNode(unref(UiDropdownMenuSeparator)),
|
|
206
|
+
createVNode(unref(UiListboxContent), {
|
|
207
|
+
"aria-label": unref(message)("tel.countryCodes")
|
|
208
|
+
}, {
|
|
209
|
+
default: withCtx(() => [
|
|
210
|
+
createVNode(unref(UiListboxVirtualizer), {
|
|
211
|
+
options: filteredCodes.value,
|
|
212
|
+
"estimate-size": 36,
|
|
213
|
+
"text-content": (code) => countryName.value(code)
|
|
214
|
+
}, {
|
|
215
|
+
default: withCtx(({ option }) => [
|
|
216
|
+
createVNode(unref(UiDropdownMenuItem), {
|
|
217
|
+
class: "px-3 py-2",
|
|
218
|
+
"text-value": countryName.value(option),
|
|
219
|
+
onSelect: ($event) => selectPrefix(option)
|
|
220
|
+
}, {
|
|
221
|
+
default: withCtx(() => [
|
|
222
|
+
createVNode(unref(UiIcon), {
|
|
223
|
+
size: "s",
|
|
224
|
+
name: prefixFor(option).icon
|
|
225
|
+
}, null, 8, ["name"]),
|
|
226
|
+
createElementVNode("span", _hoisted_3, toDisplayString(countryName.value(option)) + " (" + toDisplayString(prefixFor(option).dialCode) + ")", 1),
|
|
227
|
+
option === prefixCode.value ? (openBlock(), createBlock(unref(UiIcon), {
|
|
228
|
+
key: 0,
|
|
229
|
+
name: unref(CheckIcon),
|
|
230
|
+
size: "s",
|
|
231
|
+
class: "shrink-0"
|
|
232
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
233
|
+
]),
|
|
234
|
+
_: 2
|
|
235
|
+
}, 1032, ["text-value", "onSelect"])
|
|
236
|
+
]),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 8, ["options", "text-content"])
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
}, 8, ["aria-label"])
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
}, 8, ["modelValue"])
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
}, 8, ["align-offset", "style"])
|
|
248
|
+
]),
|
|
249
|
+
_: 1
|
|
250
|
+
}, 8, ["open"]);
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
255
|
+
...{
|
|
256
|
+
name: "SkTelControl",
|
|
257
|
+
inheritAttrs: false
|
|
258
|
+
},
|
|
259
|
+
__name: "SkTelControl",
|
|
260
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
261
|
+
modelValue: {},
|
|
262
|
+
id: {},
|
|
263
|
+
name: {},
|
|
264
|
+
placeholder: {},
|
|
265
|
+
disabled: { type: Boolean },
|
|
266
|
+
inheriting: { type: Boolean },
|
|
267
|
+
required: { type: Boolean },
|
|
268
|
+
label: {},
|
|
269
|
+
tooltip: {},
|
|
270
|
+
errors: {}
|
|
271
|
+
}, {
|
|
272
|
+
...skBaseControlDefaults
|
|
273
|
+
}),
|
|
274
|
+
emits: ["update:modelValue", "change"],
|
|
275
|
+
setup(__props, { emit: __emit }) {
|
|
276
|
+
const props = __props;
|
|
277
|
+
const emit = __emit;
|
|
278
|
+
const model = useControlModel(props, emit, "");
|
|
279
|
+
const controlName = useName(props?.name ?? props?.id);
|
|
280
|
+
const a11yAttrs = useA11yAttrs([
|
|
281
|
+
"aria-label",
|
|
282
|
+
"aria-labelledby",
|
|
283
|
+
"aria-describedby",
|
|
284
|
+
"aria-invalid",
|
|
285
|
+
"aria-required",
|
|
286
|
+
"aria-errormessage"
|
|
287
|
+
]);
|
|
288
|
+
const prefixCode = ref(defaultPrefix.code);
|
|
289
|
+
const nationalNumber = ref("");
|
|
290
|
+
const selectedDialCode = computed(
|
|
291
|
+
() => (findPrefixByCode(prefixCode.value) ?? defaultPrefix).dialCode
|
|
292
|
+
);
|
|
293
|
+
const composedTel = computed(
|
|
294
|
+
() => composeTel(selectedDialCode.value, nationalNumber.value)
|
|
295
|
+
);
|
|
296
|
+
watch(
|
|
297
|
+
() => model.value ?? "",
|
|
298
|
+
(value) => {
|
|
299
|
+
if (value === composedTel.value) return;
|
|
300
|
+
const { prefix, national } = parseTel(value);
|
|
301
|
+
if (prefix) {
|
|
302
|
+
prefixCode.value = prefix.code;
|
|
303
|
+
}
|
|
304
|
+
nationalNumber.value = national;
|
|
305
|
+
},
|
|
306
|
+
{ immediate: true }
|
|
307
|
+
);
|
|
308
|
+
function handleNationalInput(value) {
|
|
309
|
+
const { prefix, national } = parseTel(value);
|
|
310
|
+
if (prefix) {
|
|
311
|
+
prefixCode.value = prefix.code;
|
|
312
|
+
}
|
|
313
|
+
nationalNumber.value = national;
|
|
314
|
+
model.value = composedTel.value;
|
|
315
|
+
}
|
|
316
|
+
function handlePrefixChange() {
|
|
317
|
+
model.value = composedTel.value;
|
|
318
|
+
emit("change", composedTel.value);
|
|
319
|
+
}
|
|
320
|
+
const nationalInput = computed({
|
|
321
|
+
get: () => nationalNumber.value,
|
|
322
|
+
set: (value) => handleNationalInput(String(value ?? ""))
|
|
323
|
+
});
|
|
324
|
+
return (_ctx, _cache) => {
|
|
325
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
326
|
+
renderSlot(_ctx.$slots, "label"),
|
|
327
|
+
createVNode(unref(UiInputGroup), null, {
|
|
328
|
+
default: withCtx(() => [
|
|
329
|
+
createVNode(unref(UiInputGroupAddon), { align: "inline-start" }, {
|
|
330
|
+
default: withCtx(() => [
|
|
331
|
+
createVNode(_sfc_main$1, {
|
|
332
|
+
modelValue: prefixCode.value,
|
|
333
|
+
"onUpdate:modelValue": [
|
|
334
|
+
_cache[0] || (_cache[0] = ($event) => prefixCode.value = $event),
|
|
335
|
+
handlePrefixChange
|
|
336
|
+
],
|
|
337
|
+
disabled: __props.disabled
|
|
338
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
339
|
+
]),
|
|
340
|
+
_: 1
|
|
341
|
+
}),
|
|
342
|
+
createVNode(unref(UiInputGroupInput), mergeProps({
|
|
343
|
+
id: __props.id,
|
|
344
|
+
modelValue: nationalInput.value,
|
|
345
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => nationalInput.value = $event)
|
|
346
|
+
}, unref(a11yAttrs), {
|
|
347
|
+
type: "tel",
|
|
348
|
+
name: unref(controlName),
|
|
349
|
+
placeholder: __props.placeholder,
|
|
350
|
+
disabled: __props.disabled,
|
|
351
|
+
required: __props.required,
|
|
352
|
+
onChange: _cache[2] || (_cache[2] = ($event) => emit("change", composedTel.value))
|
|
353
|
+
}), null, 16, ["id", "modelValue", "name", "placeholder", "disabled", "required"])
|
|
354
|
+
]),
|
|
355
|
+
_: 1
|
|
356
|
+
}),
|
|
357
|
+
renderSlot(_ctx.$slots, "error")
|
|
358
|
+
], 64);
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
export {
|
|
363
|
+
_sfc_main as SkTelControl,
|
|
364
|
+
_sfc_main$1 as SkTelPrefixControl,
|
|
365
|
+
composeTel,
|
|
366
|
+
createCountryNames,
|
|
367
|
+
defaultPrefix,
|
|
368
|
+
dialPrefixes,
|
|
369
|
+
findPrefixByCode,
|
|
370
|
+
getCountryFlag,
|
|
371
|
+
normalizeTel,
|
|
372
|
+
parseTel
|
|
373
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderSlot, createElementVNode, mergeProps, unref, renderList, createBlock, withCtx, createTextVNode, toDisplayString, mergeDefaults } from "vue";
|
|
2
|
+
import { UiButton } from "@aleph-alpha/ui-library";
|
|
3
|
+
import { P as useA11yAttrs, I as useSettingsLocale, Q as skBaseControlDefaults } from "./SkLayoutPage-DGbCpQFm.js";
|
|
4
|
+
const _hoisted_1 = ["id", "aria-label"];
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
...{
|
|
7
|
+
name: "SkActionsControl",
|
|
8
|
+
inheritAttrs: false
|
|
9
|
+
},
|
|
10
|
+
__name: "SkActionsControl",
|
|
11
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
12
|
+
options: {},
|
|
13
|
+
modelValue: {},
|
|
14
|
+
id: {},
|
|
15
|
+
name: {},
|
|
16
|
+
placeholder: {},
|
|
17
|
+
disabled: { type: Boolean },
|
|
18
|
+
inheriting: { type: Boolean },
|
|
19
|
+
required: { type: Boolean },
|
|
20
|
+
label: {},
|
|
21
|
+
tooltip: {},
|
|
22
|
+
errors: {}
|
|
23
|
+
}, {
|
|
24
|
+
...skBaseControlDefaults,
|
|
25
|
+
options: () => []
|
|
26
|
+
}),
|
|
27
|
+
emits: ["action"],
|
|
28
|
+
setup(__props, { emit: __emit }) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const emit = __emit;
|
|
31
|
+
const a11yAttrs = useA11yAttrs([
|
|
32
|
+
"aria-label",
|
|
33
|
+
"aria-labelledby",
|
|
34
|
+
"aria-describedby",
|
|
35
|
+
"aria-errormessage"
|
|
36
|
+
]);
|
|
37
|
+
const { resolveText } = useSettingsLocale();
|
|
38
|
+
const buttons = computed(
|
|
39
|
+
() => props.options.map((option, index) => ({
|
|
40
|
+
method: option.value,
|
|
41
|
+
label: resolveText(option.label),
|
|
42
|
+
disabled: props.disabled || option.disabled === true,
|
|
43
|
+
// The last option is the primary action; the ones before it are quiet.
|
|
44
|
+
variant: index === props.options.length - 1 ? "default" : "ghost",
|
|
45
|
+
type: index === props.options.length - 1 ? "submit" : "button"
|
|
46
|
+
}))
|
|
47
|
+
);
|
|
48
|
+
function press(method) {
|
|
49
|
+
emit("action", method);
|
|
50
|
+
}
|
|
51
|
+
return (_ctx, _cache) => {
|
|
52
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
53
|
+
renderSlot(_ctx.$slots, "label"),
|
|
54
|
+
createElementVNode("div", mergeProps({
|
|
55
|
+
id: __props.id,
|
|
56
|
+
role: "group",
|
|
57
|
+
"aria-label": unref(a11yAttrs)["aria-labelledby"] ? void 0 : __props.label || void 0
|
|
58
|
+
}, unref(a11yAttrs), { class: "flex flex-wrap justify-end gap-2" }), [
|
|
59
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(buttons.value, (button, index) => {
|
|
60
|
+
return openBlock(), createBlock(unref(UiButton), {
|
|
61
|
+
key: `${index}-${button.method}`,
|
|
62
|
+
type: button.type,
|
|
63
|
+
variant: button.variant,
|
|
64
|
+
disabled: button.disabled,
|
|
65
|
+
onClick: ($event) => press(button.method)
|
|
66
|
+
}, {
|
|
67
|
+
default: withCtx(() => [
|
|
68
|
+
createTextVNode(toDisplayString(button.label), 1)
|
|
69
|
+
]),
|
|
70
|
+
_: 2
|
|
71
|
+
}, 1032, ["type", "variant", "disabled", "onClick"]);
|
|
72
|
+
}), 128))
|
|
73
|
+
], 16, _hoisted_1),
|
|
74
|
+
renderSlot(_ctx.$slots, "error")
|
|
75
|
+
], 64);
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
export {
|
|
80
|
+
_sfc_main as SkActionsControl
|
|
81
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export type { SettingUnit, ToggleSettingUnit } from './types';
|
|
2
2
|
export { defineSettingUnit, createToggleUnit } from './generators';
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
3
|
+
export { defaultBlocks, provideSkLayoutContext, SkField, SkGroup, SkItem, SkLayout, SkLayoutPage, skLayoutContextKey, SkPage, SkSection, } from './components';
|
|
4
|
+
export type { ProvideSkLayoutContextOptions, SkLayoutActionEvent, SkLayoutBlocks, SkLayoutContext, } from './components';
|
|
5
|
+
export { createStateManager, settingsFormSessionKey, useFieldInheritance, useFieldValidator, UseFileConvertor, useFileConvertor, provideSettingsLocale, useSettingField, useSettingsForm, useSettingsFormSession, useSettingsLayout, useSettingsLocale, useStateManager, } from './composables';
|
|
6
|
+
export type { FieldInheritanceModel, SettingsLayoutModel, SettingsLocale, SettingsLocaleOptions, UseFieldValidatorOptions, UseFieldValidatorReturn, UseSettingFieldOptions, UseSettingsLayoutOptions, } from './composables';
|
|
7
|
+
export { byOrder, checkFieldConstraints, evaluateCondition, evaluateFieldRules, evaluateRuleStates, keysOf, layoutIdSegment, layoutPageId, resolveConstraintMessage, resolveLayout, resolveLocalizedText, toNavigation, validateFieldRules, validateLayout, } from './core';
|
|
8
|
+
export { createFieldInput, provideControls, resolveControlDefinition, resolveFieldControl, skControlRegistryKey, useControlRegistry, } from './core/controls';
|
|
9
|
+
export type { ControlDefinition, ControlKind, ControlPropsContext, ControlRegistry, } from './core/controls';
|
|
10
|
+
export type { SettingFieldHandle, SettingFieldStoreState, SettingsArea, SettingsAreaOptions, SettingsAreaStatus, StateManager, StateManagerOptions, SkFieldProps, SkFieldEmits, SkBaseControlProps, SkBaseControlEmits, SkActionControlEmits, AnySettingField, SettingField, SettingFieldType, SettingFieldValue, SettingValueByType, BuiltinSettingFieldControl, SettingFieldControl, SettingFieldConstraints, SettingFieldIssue, SettingFieldIssueSource, ReportedFieldIssue, SettingFieldOption, SettingFieldPresentation, SettingFieldModel, SettingFieldRule, SettingFieldRuleEffect, SettingFieldCondition, SettingFieldConditionLeaf, SettingFieldRuleState, SettingFieldSessionState, SettingFieldState, SettingsFormSession, SettingsFormSessionOptions, SettingsSaveResult, StandardSchemaIssue, StandardSchemaResult, StandardSchemaV1, LocalizedText, KitMessageKey, KitMessageOverrides, LayoutCategory, LayoutGridSettings, LayoutGroup, LayoutIssue, LayoutIssueCode, LayoutItem, LayoutNavigationNode, LayoutNavigationOptions, LayoutNodeKind, LayoutPage, LayoutPagePresentation, LayoutPresentation, LayoutSection, LayoutSidebarMode, ResolveLayoutOptions, ResolveLayoutSource, ResolvedCategory, ResolvedGroup, ResolvedItem, ResolvedLayout, ResolvedLayoutNode, ResolvedPage, ResolvedSection, SettingsLayout, } from './core';
|
|
5
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAInE,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,OAAO,EACP,OAAO,EACP,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,MAAM,EACN,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,6BAA6B,EAC7B,mBAAmB,EACnB,cAAc,EACd,eAAe,GAChB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,OAAO,EACP,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,EACN,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,cAAc,GACf,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,UAAU,EACV,sBAAsB,EACtB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,cAAc,GACf,MAAM,QAAQ,CAAC"}
|