@shwfed/config 3.0.14 → 3.0.15
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/module.json +1 -1
- package/dist/module.mjs +20 -1
- package/dist/runtime/components/actions/ai-l1.md +1 -1
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/prompt.md +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.d.ts +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.js +2 -2
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.d.vue.ts +8 -8
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.vue.d.ts +8 -8
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/prompt.md +1 -1
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/runtime.vue +1 -1
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/schema.d.ts +2 -4
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/schema.js +1 -1
- package/dist/runtime/components/actions/components/trigger-row-scope.vue +6 -3
- package/dist/runtime/components/actions/utils/steps.d.ts +1 -1
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.d.vue.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.vue.d.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.d.vue.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.vue.d.ts +18 -18
- package/dist/runtime/components/config/index.d.vue.ts +2 -2
- package/dist/runtime/components/config/index.vue.d.ts +2 -2
- package/dist/runtime/components/config/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/prompt.md +1 -1
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/RichTextEditor.d.vue.ts +33 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/RichTextEditor.vue +269 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/RichTextEditor.vue.d.ts +33 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/config.d.vue.ts +107 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/config.vue +370 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/config.vue.d.ts +107 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/extensions.d.ts +27 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/extensions.js +83 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/features.d.ts +21 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/features.js +16 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/indent.d.ts +26 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/indent.js +64 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/prompt.md +33 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/runtime.vue +121 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/schema.d.ts +133 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/schema.js +65 -0
- package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/runtime.js +16 -4
- package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/schema.js +10 -3
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/schema.js +2 -2
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/schema.js +1 -1
- package/dist/runtime/components/operations/utils/resolve.d.ts +1 -1
- package/dist/runtime/components/operations/utils/step-vars.d.ts +16 -4
- package/dist/runtime/components/operations/utils/step-vars.js +14 -1
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +10 -10
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +10 -10
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/prompt.md +1 -1
- package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +8 -4
- package/dist/runtime/components/ui/calendar/Calendar.vue +39 -10
- package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +8 -4
- package/dist/runtime/components/ui/date-picker/DatePicker.vue +3 -1
- package/dist/runtime/components/ui/date-picker/DatePickerDatePanel.vue +6 -0
- package/dist/runtime/components/ui/date-picker/DatePickerDateTimePanel.vue +6 -0
- package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue +7 -9
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePicker.vue +10 -7
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +3 -5
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue +28 -26
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +3 -5
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
- package/dist/runtime/components/ui/expression-editor/picker-entries.js +1 -1
- package/dist/runtime/components/ui/expression-editor/step-chip-extension.js +1 -1
- package/dist/runtime/components/ui/expression-editor/step-refs.js +1 -1
- package/dist/runtime/components/ui/range-calendar/RangeCalendar.d.vue.ts +5 -5
- package/dist/runtime/components/ui/range-calendar/RangeCalendar.vue +22 -5
- package/dist/runtime/components/ui/range-calendar/RangeCalendar.vue.d.ts +5 -5
- package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue +0 -1
- package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue +0 -1
- package/dist/runtime/share/event-bus.d.ts +16 -0
- package/dist/runtime/share/event-bus.js +18 -13
- package/dist/runtime/share/idempotency-key.d.ts +18 -0
- package/dist/runtime/share/idempotency-key.js +9 -0
- package/dist/runtime/utils/cel-context.d.ts +3 -2
- package/dist/runtime/utils/cel-context.js +1 -0
- package/package.json +8 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { Icon } from "@iconify/vue";
|
|
3
3
|
import { format as formatDate, isValid, parse as parseDate } from "date-fns";
|
|
4
|
-
import { computed, ref, watch } from "vue";
|
|
4
|
+
import { computed, nextTick, ref, watch } from "vue";
|
|
5
5
|
import { cn } from "../../../utils/cn";
|
|
6
6
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../input-group";
|
|
7
7
|
defineOptions({ name: "UiDatePickerInput", inheritAttrs: false });
|
|
@@ -39,20 +39,18 @@ watch(
|
|
|
39
39
|
},
|
|
40
40
|
{ immediate: true }
|
|
41
41
|
);
|
|
42
|
-
function commit() {
|
|
42
|
+
async function commit() {
|
|
43
43
|
const text = draft.value.trim();
|
|
44
44
|
if (!text) {
|
|
45
45
|
if (props.modelValue !== void 0) {
|
|
46
46
|
emits("update:modelValue", void 0);
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
} else {
|
|
49
|
+
const parsed = parseDate(text, props.format, props.modelValue ?? /* @__PURE__ */ new Date());
|
|
50
|
+
if (isValid(parsed)) emits("update:modelValue", parsed);
|
|
49
51
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
syncFromModel();
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
emits("update:modelValue", parsed);
|
|
52
|
+
await nextTick();
|
|
53
|
+
syncFromModel();
|
|
56
54
|
}
|
|
57
55
|
function onFocus(event) {
|
|
58
56
|
focused.value = true;
|
|
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
28
28
|
"onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
30
|
size: "sm" | "md" | "lg";
|
|
31
|
-
clearable: boolean;
|
|
32
31
|
clearIcon: string;
|
|
32
|
+
clearable: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
22
22
|
size: "sm" | "md" | "lg";
|
|
23
23
|
granularity: "hour" | "minute" | "second";
|
|
24
24
|
hourCycle: 12 | 24;
|
|
25
|
-
clearable: boolean;
|
|
26
25
|
clearIcon: string;
|
|
26
|
+
clearable: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
22
22
|
size: "sm" | "md" | "lg";
|
|
23
23
|
granularity: "hour" | "minute" | "second";
|
|
24
24
|
hourCycle: 12 | 24;
|
|
25
|
-
clearable: boolean;
|
|
26
25
|
clearIcon: string;
|
|
26
|
+
clearable: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -129,11 +129,15 @@ function emitRange(start, end) {
|
|
|
129
129
|
stringValue.value = next;
|
|
130
130
|
emits("change", next);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
function commitFromInput(start, end) {
|
|
133
|
+
const isRefused = (d) => props.disabledDate?.(nativeToDateValue(d, props.type)) ?? false;
|
|
134
|
+
if (start && isRefused(start)) return;
|
|
135
|
+
if (end && isRefused(end)) return;
|
|
136
|
+
if (start && end && start > end) {
|
|
137
|
+
emitRange(end, start);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
emitRange(start, end);
|
|
137
141
|
}
|
|
138
142
|
function setStartTime(time) {
|
|
139
143
|
emitRange(time ? timeToNative(time) : void 0, endNative.value);
|
|
@@ -250,8 +254,7 @@ function onInputBlur(event, side) {
|
|
|
250
254
|
:open="open"
|
|
251
255
|
:size="props.size"
|
|
252
256
|
:class="props.inputClass"
|
|
253
|
-
@
|
|
254
|
-
@update:end-value="setEnd"
|
|
257
|
+
@commit="commitFromInput"
|
|
255
258
|
@focus="onInputFocus"
|
|
256
259
|
@blur="onInputBlur"
|
|
257
260
|
@clear="clearAll"
|
|
@@ -19,18 +19,16 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
19
19
|
clear: () => any;
|
|
20
20
|
blur: (args_0: FocusEvent, args_1: "end" | "start") => any;
|
|
21
21
|
focus: (args_0: FocusEvent, args_1: "end" | "start") => any;
|
|
22
|
-
|
|
23
|
-
"update:endValue": (args_0: Date | undefined) => any;
|
|
22
|
+
commit: (args_0: Date | undefined, args_1: Date | undefined) => any;
|
|
24
23
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
24
|
onClear?: (() => any) | undefined;
|
|
26
25
|
onBlur?: ((args_0: FocusEvent, args_1: "end" | "start") => any) | undefined;
|
|
27
26
|
onFocus?: ((args_0: FocusEvent, args_1: "end" | "start") => any) | undefined;
|
|
28
|
-
|
|
29
|
-
"onUpdate:endValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
27
|
+
onCommit?: ((args_0: Date | undefined, args_1: Date | undefined) => any) | undefined;
|
|
30
28
|
}>, {
|
|
31
29
|
size: "sm" | "md" | "lg";
|
|
32
|
-
clearable: boolean;
|
|
33
30
|
clearIcon: string;
|
|
31
|
+
clearable: boolean;
|
|
34
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
33
|
declare const _default: typeof __VLS_export;
|
|
36
34
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { Icon } from "@iconify/vue";
|
|
3
3
|
import { format as formatDate, isValid, parse as parseDate } from "date-fns";
|
|
4
|
-
import { computed, ref, watch } from "vue";
|
|
4
|
+
import { computed, nextTick, ref, useTemplateRef, watch } from "vue";
|
|
5
5
|
import { cn } from "../../../utils/cn";
|
|
6
6
|
import { InputGroupButton } from "../input-group";
|
|
7
7
|
defineOptions({ name: "UiDateRangePickerInput", inheritAttrs: false });
|
|
@@ -29,7 +29,8 @@ const sizeClass = computed(() => ({
|
|
|
29
29
|
const inputTextClass = computed(() => ({ sm: "text-xs", md: "text-sm", lg: "text-base" })[props.size]);
|
|
30
30
|
const clearButtonSizeClass = computed(() => props.size === "sm" ? "size-4" : "");
|
|
31
31
|
const clearIconSizeClass = computed(() => props.size === "sm" ? "size-3" : "");
|
|
32
|
-
const emits = defineEmits(["
|
|
32
|
+
const emits = defineEmits(["commit", "focus", "blur", "clear"]);
|
|
33
|
+
const rootEl = useTemplateRef("root-el");
|
|
33
34
|
const startDraft = ref("");
|
|
34
35
|
const endDraft = ref("");
|
|
35
36
|
const focusedSide = ref(null);
|
|
@@ -53,25 +54,21 @@ watch(
|
|
|
53
54
|
},
|
|
54
55
|
{ immediate: true }
|
|
55
56
|
);
|
|
56
|
-
function
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
if (side === "start") emits("update:startValue", parsed);
|
|
74
|
-
else emits("update:endValue", parsed);
|
|
57
|
+
function parseDraft(text, fallback) {
|
|
58
|
+
const trimmed = text.trim();
|
|
59
|
+
if (!trimmed) return void 0;
|
|
60
|
+
const parsed = parseDate(trimmed, props.format, fallback ?? /* @__PURE__ */ new Date());
|
|
61
|
+
return isValid(parsed) ? parsed : void 0;
|
|
62
|
+
}
|
|
63
|
+
async function commit() {
|
|
64
|
+
emits(
|
|
65
|
+
"commit",
|
|
66
|
+
parseDraft(startDraft.value, props.startValue),
|
|
67
|
+
parseDraft(endDraft.value, props.endValue)
|
|
68
|
+
);
|
|
69
|
+
await nextTick();
|
|
70
|
+
syncStart();
|
|
71
|
+
syncEnd();
|
|
75
72
|
}
|
|
76
73
|
function onFocus(event, side) {
|
|
77
74
|
focusedSide.value = side;
|
|
@@ -79,14 +76,17 @@ function onFocus(event, side) {
|
|
|
79
76
|
}
|
|
80
77
|
function onBlur(event, side) {
|
|
81
78
|
focusedSide.value = null;
|
|
82
|
-
commit(side);
|
|
83
79
|
emits("blur", event, side);
|
|
84
80
|
}
|
|
81
|
+
function onFocusOut(event) {
|
|
82
|
+
const next = event.relatedTarget;
|
|
83
|
+
if (next instanceof Node && rootEl.value?.contains(next)) return;
|
|
84
|
+
void commit();
|
|
85
|
+
}
|
|
85
86
|
function onClear() {
|
|
86
87
|
startDraft.value = "";
|
|
87
88
|
endDraft.value = "";
|
|
88
|
-
emits("
|
|
89
|
-
emits("update:endValue", void 0);
|
|
89
|
+
emits("commit", void 0, void 0);
|
|
90
90
|
emits("clear");
|
|
91
91
|
}
|
|
92
92
|
const showClear = computed(
|
|
@@ -97,6 +97,7 @@ const hasValue = computed(() => props.startValue !== void 0 || props.endValue !=
|
|
|
97
97
|
|
|
98
98
|
<template>
|
|
99
99
|
<div
|
|
100
|
+
ref="root-el"
|
|
100
101
|
v-bind="$attrs"
|
|
101
102
|
data-slot="date-range-picker-input"
|
|
102
103
|
:data-disabled="props.disabled ? 'true' : void 0"
|
|
@@ -111,6 +112,7 @@ const hasValue = computed(() => props.startValue !== void 0 || props.endValue !=
|
|
|
111
112
|
sizeClass,
|
|
112
113
|
props.class
|
|
113
114
|
)"
|
|
115
|
+
@focusout="onFocusOut"
|
|
114
116
|
>
|
|
115
117
|
<Icon
|
|
116
118
|
v-if="props.prefixIcon"
|
|
@@ -131,7 +133,7 @@ const hasValue = computed(() => props.startValue !== void 0 || props.endValue !=
|
|
|
131
133
|
)"
|
|
132
134
|
@focus="(e) => onFocus(e, 'start')"
|
|
133
135
|
@blur="(e) => onBlur(e, 'start')"
|
|
134
|
-
@keydown.enter.prevent="commit(
|
|
136
|
+
@keydown.enter.prevent="commit()"
|
|
135
137
|
>
|
|
136
138
|
<Icon
|
|
137
139
|
v-if="props.rangeSeparatorIcon"
|
|
@@ -153,7 +155,7 @@ const hasValue = computed(() => props.startValue !== void 0 || props.endValue !=
|
|
|
153
155
|
)"
|
|
154
156
|
@focus="(e) => onFocus(e, 'end')"
|
|
155
157
|
@blur="(e) => onBlur(e, 'end')"
|
|
156
|
-
@keydown.enter.prevent="commit(
|
|
158
|
+
@keydown.enter.prevent="commit()"
|
|
157
159
|
>
|
|
158
160
|
<InputGroupButton
|
|
159
161
|
v-if="showClear"
|
|
@@ -19,18 +19,16 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
19
19
|
clear: () => any;
|
|
20
20
|
blur: (args_0: FocusEvent, args_1: "end" | "start") => any;
|
|
21
21
|
focus: (args_0: FocusEvent, args_1: "end" | "start") => any;
|
|
22
|
-
|
|
23
|
-
"update:endValue": (args_0: Date | undefined) => any;
|
|
22
|
+
commit: (args_0: Date | undefined, args_1: Date | undefined) => any;
|
|
24
23
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
24
|
onClear?: (() => any) | undefined;
|
|
26
25
|
onBlur?: ((args_0: FocusEvent, args_1: "end" | "start") => any) | undefined;
|
|
27
26
|
onFocus?: ((args_0: FocusEvent, args_1: "end" | "start") => any) | undefined;
|
|
28
|
-
|
|
29
|
-
"onUpdate:endValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
27
|
+
onCommit?: ((args_0: Date | undefined, args_1: Date | undefined) => any) | undefined;
|
|
30
28
|
}>, {
|
|
31
29
|
size: "sm" | "md" | "lg";
|
|
32
|
-
clearable: boolean;
|
|
33
30
|
clearIcon: string;
|
|
31
|
+
clearable: boolean;
|
|
34
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
33
|
declare const _default: typeof __VLS_export;
|
|
36
34
|
export default _default;
|
|
@@ -26,9 +26,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
26
26
|
size: "sm" | "md" | "lg";
|
|
27
27
|
granularity: "hour" | "minute" | "second";
|
|
28
28
|
hourCycle: 12 | 24;
|
|
29
|
-
clearable: boolean;
|
|
30
|
-
clearIcon: string;
|
|
31
29
|
rangeSeparatorIcon: string;
|
|
30
|
+
clearIcon: string;
|
|
31
|
+
clearable: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
34
34
|
export default _default;
|
|
@@ -26,9 +26,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
26
26
|
size: "sm" | "md" | "lg";
|
|
27
27
|
granularity: "hour" | "minute" | "second";
|
|
28
28
|
hourCycle: 12 | 24;
|
|
29
|
-
clearable: boolean;
|
|
30
|
-
clearIcon: string;
|
|
31
29
|
rangeSeparatorIcon: string;
|
|
30
|
+
clearIcon: string;
|
|
31
|
+
clearable: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
34
34
|
export default _default;
|
|
@@ -39,7 +39,7 @@ export function buildStepEntries(roster) {
|
|
|
39
39
|
return roster.filter((step) => step.valid).map((step) => ({
|
|
40
40
|
id: `step:${step.id}`,
|
|
41
41
|
group: "step",
|
|
42
|
-
insert: `${STEPS_VAR}[
|
|
42
|
+
insert: `${STEPS_VAR}[${JSON.stringify(step.id)}]`,
|
|
43
43
|
display: step.label,
|
|
44
44
|
label: "\u524D\u5E8F\u6B65\u9AA4",
|
|
45
45
|
type: "dyn",
|
|
@@ -76,7 +76,7 @@ const chipPlugin = ViewPlugin.fromClass(
|
|
|
76
76
|
{
|
|
77
77
|
decorations: (plugin) => plugin.decorations,
|
|
78
78
|
// Atomic so the caret steps over a chip and Backspace removes the whole
|
|
79
|
-
// `steps[
|
|
79
|
+
// `steps["id"]` at once — matching the scope/selection chips' feel.
|
|
80
80
|
provide: (plugin) => EditorView.atomicRanges.of((view) => view.plugin(plugin)?.decorations ?? Decoration.none)
|
|
81
81
|
}
|
|
82
82
|
);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { RangeCalendarRootProps } from 'reka-ui';
|
|
1
|
+
import type { DateValue, RangeCalendarRootProps } from 'reka-ui';
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
3
|
type __VLS_Props = RangeCalendarRootProps & {
|
|
4
4
|
class?: HTMLAttributes['class'];
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
"update:modelValue": (date: import("reka-ui").DateRange) => any;
|
|
8
|
-
"update:placeholder": (date:
|
|
8
|
+
"update:placeholder": (date: DateValue) => any;
|
|
9
9
|
"update:validModelValue": (date: import("reka-ui").DateRange) => any;
|
|
10
|
-
"update:startValue": (date:
|
|
10
|
+
"update:startValue": (date: DateValue | undefined) => any;
|
|
11
11
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
12
|
"onUpdate:modelValue"?: ((date: import("reka-ui").DateRange) => any) | undefined;
|
|
13
|
-
"onUpdate:placeholder"?: ((date:
|
|
13
|
+
"onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
|
|
14
14
|
"onUpdate:validModelValue"?: ((date: import("reka-ui").DateRange) => any) | undefined;
|
|
15
|
-
"onUpdate:startValue"?: ((date:
|
|
15
|
+
"onUpdate:startValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
16
16
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
|
18
18
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { Icon } from "@iconify/vue";
|
|
2
3
|
import { reactiveOmit, useNavigatorLanguage } from "@vueuse/core";
|
|
3
4
|
import { RangeCalendarRoot, useForwardPropsEmits } from "reka-ui";
|
|
4
5
|
import { computed } from "vue";
|
|
@@ -55,12 +56,28 @@ const locale = computed(() => props.locale ?? i18nLocale.value ?? navLocale.lang
|
|
|
55
56
|
:locale="locale"
|
|
56
57
|
>
|
|
57
58
|
<RangeCalendarHeader>
|
|
58
|
-
<
|
|
59
|
+
<nav class="w-full flex items-center gap-1 absolute top-1/2 -translate-y-1/2 transform-gpu inset-x-0 justify-between z-10">
|
|
60
|
+
<div class="flex items-center gap-0.5">
|
|
61
|
+
<RangeCalendarPrevButton
|
|
62
|
+
:prev-page="(d) => d.subtract({ years: 1 })"
|
|
63
|
+
data-slot="range-calendar-prev-year-button"
|
|
64
|
+
>
|
|
65
|
+
<Icon icon="fluent:chevron-double-left-20-regular" />
|
|
66
|
+
</RangeCalendarPrevButton>
|
|
67
|
+
<RangeCalendarPrevButton />
|
|
68
|
+
</div>
|
|
69
|
+
<div class="flex items-center gap-0.5">
|
|
70
|
+
<RangeCalendarNextButton />
|
|
71
|
+
<RangeCalendarNextButton
|
|
72
|
+
:next-page="(d) => d.add({ years: 1 })"
|
|
73
|
+
data-slot="range-calendar-next-year-button"
|
|
74
|
+
>
|
|
75
|
+
<Icon icon="fluent:chevron-double-right-20-regular" />
|
|
76
|
+
</RangeCalendarNextButton>
|
|
77
|
+
</div>
|
|
78
|
+
</nav>
|
|
59
79
|
|
|
60
|
-
<
|
|
61
|
-
<RangeCalendarPrevButton />
|
|
62
|
-
<RangeCalendarNextButton />
|
|
63
|
-
</div>
|
|
80
|
+
<RangeCalendarHeading />
|
|
64
81
|
</RangeCalendarHeader>
|
|
65
82
|
|
|
66
83
|
<div class="flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0">
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { RangeCalendarRootProps } from 'reka-ui';
|
|
1
|
+
import type { DateValue, RangeCalendarRootProps } from 'reka-ui';
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
3
|
type __VLS_Props = RangeCalendarRootProps & {
|
|
4
4
|
class?: HTMLAttributes['class'];
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
"update:modelValue": (date: import("reka-ui").DateRange) => any;
|
|
8
|
-
"update:placeholder": (date:
|
|
8
|
+
"update:placeholder": (date: DateValue) => any;
|
|
9
9
|
"update:validModelValue": (date: import("reka-ui").DateRange) => any;
|
|
10
|
-
"update:startValue": (date:
|
|
10
|
+
"update:startValue": (date: DateValue | undefined) => any;
|
|
11
11
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
12
|
"onUpdate:modelValue"?: ((date: import("reka-ui").DateRange) => any) | undefined;
|
|
13
|
-
"onUpdate:placeholder"?: ((date:
|
|
13
|
+
"onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
|
|
14
14
|
"onUpdate:validModelValue"?: ((date: import("reka-ui").DateRange) => any) | undefined;
|
|
15
|
-
"onUpdate:startValue"?: ((date:
|
|
15
|
+
"onUpdate:startValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
16
16
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
|
18
18
|
export default _default;
|
|
@@ -25,6 +25,22 @@ export type ChainStep = Readonly<{
|
|
|
25
25
|
* address a later expression could reference it by.
|
|
26
26
|
*/
|
|
27
27
|
publish: (output: unknown) => void;
|
|
28
|
+
/**
|
|
29
|
+
* This step's idempotency key for THIS run — lazily minted, then memoized.
|
|
30
|
+
*
|
|
31
|
+
* The coordinate is (run × step), not run alone: a chain may hold several
|
|
32
|
+
* request steps hitting different endpoints, and a server that dedupes on
|
|
33
|
+
* the key would answer request 2 with request 1's cached response — silently,
|
|
34
|
+
* with a 200 and a plausible body. Each `ChainStep` is already built per
|
|
35
|
+
* (run, trigger) inside `dispatchTriggers`, so per-instance minting IS that
|
|
36
|
+
* coordinate. Note this needs no `trigger.id`, so unlike `publish` it works
|
|
37
|
+
* on legacy rows too.
|
|
38
|
+
*
|
|
39
|
+
* Memoized so a step that reads the key twice — once into a CEL expression,
|
|
40
|
+
* once onto the request header — sends one value, not two. Lazy so a step
|
|
41
|
+
* that never asks costs nothing.
|
|
42
|
+
*/
|
|
43
|
+
idempotencyKey: () => string;
|
|
28
44
|
}>;
|
|
29
45
|
/** A descendant button asking an ancestor instance to run an operation. */
|
|
30
46
|
export type OpRequest = Readonly<{
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { computed, inject, provide, shallowRef } from "vue";
|
|
2
2
|
import { Effect, Schema } from "effect";
|
|
3
|
+
import { mintIdempotencyKey } from "./idempotency-key.js";
|
|
3
4
|
export const Trigger = Schema.Struct({
|
|
4
5
|
// Additive + optional like `compatibilityDate`/`params` below, so every
|
|
5
6
|
// pre-existing `{ target, operation }` trigger keeps loading. Minted by the
|
|
6
7
|
// trigger editor on add; it is the address under which this step's output is
|
|
7
|
-
// published for later steps (`steps[
|
|
8
|
+
// published for later steps (`steps["<id>"]`), so it must survive reorders —
|
|
8
9
|
// which the list index, the only other row identity, does not.
|
|
9
10
|
id: Schema.optional(Schema.UUID.annotations({
|
|
10
|
-
description: '\u89E6\u53D1\u884C\u7684\u7A33\u5B9A\u6807\u8BC6\uFF0C\u540E\u7EED\u6B65\u9AA4\u7ECF steps[
|
|
11
|
+
description: '\u89E6\u53D1\u884C\u7684\u7A33\u5B9A\u6807\u8BC6\uFF0C\u540E\u7EED\u6B65\u9AA4\u7ECF steps["<id>"] \u5F15\u7528\u672C\u6B65\u8F93\u51FA'
|
|
11
12
|
})),
|
|
12
13
|
target: Schema.UUID.annotations({
|
|
13
14
|
description: "\u76EE\u6807\u7956\u5148\u5B9E\u4F8B\u7684 ID"
|
|
@@ -59,18 +60,22 @@ export function dispatchTriggers(channel, triggers, cel, outputs) {
|
|
|
59
60
|
const chainOutputs = outputs ?? {};
|
|
60
61
|
return Effect.forEach(
|
|
61
62
|
triggers,
|
|
62
|
-
(trigger) =>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
(trigger) => {
|
|
64
|
+
let key;
|
|
65
|
+
return channel.dispatch({
|
|
66
|
+
target: trigger.target,
|
|
67
|
+
operation: trigger.operation,
|
|
68
|
+
params: trigger.params,
|
|
69
|
+
cel,
|
|
70
|
+
step: {
|
|
71
|
+
outputs: () => chainOutputs,
|
|
72
|
+
publish: (output) => {
|
|
73
|
+
if (trigger.id) chainOutputs[trigger.id] = output;
|
|
74
|
+
},
|
|
75
|
+
idempotencyKey: () => key ??= mintIdempotencyKey()
|
|
71
76
|
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
77
|
+
});
|
|
78
|
+
},
|
|
74
79
|
{ discard: true }
|
|
75
80
|
);
|
|
76
81
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mint a fresh idempotency key — one opaque UUID identifying a single logical
|
|
3
|
+
* request intent, carried to the server as `Idempotency-Key`.
|
|
4
|
+
*
|
|
5
|
+
* `crypto.randomUUID()` is a **secure-context-only** API: on a plain-HTTP LAN
|
|
6
|
+
* deployment it is `undefined`. `crypto.getRandomValues` carries no such
|
|
7
|
+
* restriction, so it backs the fallback — 16 random bytes rendered in the
|
|
8
|
+
* canonical 8-4-4-4-12 layout with the v4 version/variant bits set, because a
|
|
9
|
+
* server that accepts an `Idempotency-Key` commonly validates the shape.
|
|
10
|
+
*
|
|
11
|
+
* `Math.random()` is deliberately NOT a fallback: two tabs seeded alike would
|
|
12
|
+
* mint the same key, and a repeated key silently merges two distinct intents —
|
|
13
|
+
* the exact failure this whole mechanism exists to prevent. If neither crypto
|
|
14
|
+
* API is present we would rather throw than hand out a weak key.
|
|
15
|
+
*/
|
|
16
|
+
export declare function mintIdempotencyKey(): string;
|
|
17
|
+
/** The header under which a request carries its idempotency key. */
|
|
18
|
+
export declare const IDEMPOTENCY_KEY_HEADER = "Idempotency-Key";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function mintIdempotencyKey() {
|
|
2
|
+
if (typeof crypto.randomUUID === "function") return crypto.randomUUID();
|
|
3
|
+
const bytes = crypto.getRandomValues(new Uint8Array(16));
|
|
4
|
+
bytes[6] = bytes[6] & 15 | 64;
|
|
5
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
6
|
+
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
7
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
8
|
+
}
|
|
9
|
+
export const IDEMPOTENCY_KEY_HEADER = "Idempotency-Key";
|
|
@@ -25,6 +25,7 @@ export declare const SCOPE_ADDRESS_VAR = "__scopes__";
|
|
|
25
25
|
export declare const SELECTIONS_VAR = "selections";
|
|
26
26
|
export declare const OPTIONS_VAR = "options";
|
|
27
27
|
export declare const STEPS_VAR = "steps";
|
|
28
|
+
export declare const IDEMPOTENCY_KEY_VAR = "idempotencyKey";
|
|
28
29
|
export type ScopeAccessor = Record<string, () => unknown>;
|
|
29
30
|
export declare function provideCELContext(context: CELContext): void;
|
|
30
31
|
export declare function injectCELContext(): CELContext;
|
|
@@ -123,10 +124,10 @@ export declare function useSelectionRoster(): Ref<ReadonlyArray<SelectionFieldRe
|
|
|
123
124
|
* surfaces it. Unlike a selection field a trigger row has no designer-given
|
|
124
125
|
* name, so `label` is its position —「第 N 步」— computed live from the row's
|
|
125
126
|
* current index and thus following drag-and-drop reorders for free (the
|
|
126
|
-
* persisted reference is `steps[
|
|
127
|
+
* persisted reference is `steps["<id>"]`; the label is never stored).
|
|
127
128
|
*/
|
|
128
129
|
export type StepRef = Readonly<{
|
|
129
|
-
/** Trigger-row uuid keyed into `steps[
|
|
130
|
+
/** Trigger-row uuid keyed into `steps["<id>"]` — the publish address. */
|
|
130
131
|
id: string;
|
|
131
132
|
/** Position label,「第 N 步」, derived from the row's current index. */
|
|
132
133
|
label: string;
|
|
@@ -12,6 +12,7 @@ export const SCOPE_ADDRESS_VAR = "__scopes__";
|
|
|
12
12
|
export const SELECTIONS_VAR = "selections";
|
|
13
13
|
export const OPTIONS_VAR = "options";
|
|
14
14
|
export const STEPS_VAR = "steps";
|
|
15
|
+
export const IDEMPOTENCY_KEY_VAR = "idempotencyKey";
|
|
15
16
|
const CEL_CONTEXT_KEY = Symbol("cel-context");
|
|
16
17
|
export function provideCELContext(context) {
|
|
17
18
|
const parent = injectLocal(CEL_CONTEXT_KEY, {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shwfed/config",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.15",
|
|
4
4
|
"description": "Configurable UI for SHWFED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -57,6 +57,13 @@
|
|
|
57
57
|
"@tailwindcss/vite": "^4.3.0",
|
|
58
58
|
"@tanstack/vue-table": "^8.21.3",
|
|
59
59
|
"@tanstack/vue-virtual": "^3.13.24",
|
|
60
|
+
"@tiptap/core": "3.28.0",
|
|
61
|
+
"@tiptap/extension-list": "3.28.0",
|
|
62
|
+
"@tiptap/extension-text-align": "3.28.0",
|
|
63
|
+
"@tiptap/extensions": "^3.28.0",
|
|
64
|
+
"@tiptap/pm": "^3.28.0",
|
|
65
|
+
"@tiptap/starter-kit": "^3.28.0",
|
|
66
|
+
"@tiptap/vue-3": "^3.28.0",
|
|
60
67
|
"@unovis/ts": "^1.6.5",
|
|
61
68
|
"@unovis/vue": "^1.6.5",
|
|
62
69
|
"@vueuse/core": "^14.3.0",
|