@atscript/vue-form 0.1.85 → 0.1.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{as-action-Dx3RVCnH.mjs → as-action-BoZtbaXt.mjs} +17 -3
- package/dist/{as-action-Weju622Z.cjs → as-action-lLooKipk.cjs} +16 -2
- package/dist/as-action.cjs +1 -1
- package/dist/as-action.d.cts +1 -1
- package/dist/as-action.d.mts +1 -1
- package/dist/as-action.mjs +1 -1
- package/dist/{as-action.vue-CFGXoM5O.d.cts → as-action.vue-BCbopk0S.d.cts} +13 -1
- package/dist/{as-action.vue-0qaIjTnF.d.mts → as-action.vue-BtQX09n-.d.mts} +13 -1
- package/dist/{as-form-BWf2QGoS.cjs → as-form-BpcP_wIF.cjs} +11 -1
- package/dist/{as-form-D6zQF-19.mjs → as-form-Cb5orGFC.mjs} +11 -1
- package/dist/as-form.cjs +1 -1
- package/dist/as-form.mjs +1 -1
- package/dist/{as-iterator-CNMdEj9a.mjs → as-iterator-B0Jf2zn4.mjs} +5 -1
- package/dist/{as-iterator-0kW5UmOg.cjs → as-iterator-WKkr9lwG.cjs} +5 -1
- package/dist/as-iterator.cjs +1 -1
- package/dist/as-iterator.d.cts +8 -1
- package/dist/as-iterator.d.mts +8 -1
- package/dist/as-iterator.mjs +1 -1
- package/dist/{as-object-CAIUl3li.cjs → as-object-D6AHBb5w.cjs} +6 -2
- package/dist/{as-object-mBh0KLy2.mjs → as-object-Dl3ranqm.mjs} +6 -2
- package/dist/as-object.cjs +1 -1
- package/dist/as-object.mjs +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +4 -4
- package/package.json +4 -4
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, toDisplayString, vShow, withDirectives } from "vue";
|
|
1
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, toDisplayString, vShow, withDirectives } from "vue";
|
|
2
|
+
//#region src/components/defaults/as-action.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
const _hoisted_1 = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "as-action-text"
|
|
6
|
+
};
|
|
2
7
|
//#endregion
|
|
3
8
|
//#region src/components/defaults/as-action.vue
|
|
4
9
|
var as_action_default = /* @__PURE__ */ defineComponent({
|
|
@@ -186,16 +191,25 @@ var as_action_default = /* @__PURE__ */ defineComponent({
|
|
|
186
191
|
hidden: {
|
|
187
192
|
type: Boolean,
|
|
188
193
|
required: false
|
|
194
|
+
},
|
|
195
|
+
text: {
|
|
196
|
+
type: String,
|
|
197
|
+
required: false
|
|
198
|
+
},
|
|
199
|
+
align: {
|
|
200
|
+
type: String,
|
|
201
|
+
required: false
|
|
189
202
|
}
|
|
190
203
|
},
|
|
191
204
|
emits: ["action"],
|
|
192
205
|
setup(__props, { emit: __emit }) {
|
|
193
206
|
const emit = __emit;
|
|
194
207
|
return (_ctx, _cache) => {
|
|
195
|
-
return
|
|
208
|
+
return openBlock(), createElementBlock(Fragment, null, [createCommentVNode(" `as-action-field` is the flex row; alignment (`as-action-{left,center,\n right}`) is safelisted in the ui-styles preset since the static extractor\n can't see this interpolated class. The link styling lives directly on the\n <button> (as `as-field-action-link`) so `:hover`/`:focus` bind to the\n button alone — not the whole row. "), withDirectives(createElementVNode("div", { class: normalizeClass(["as-action-field", [_ctx.$props.class, `as-action-${__props.align ?? "left"}`]]) }, [__props.text ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(__props.text), 1)) : createCommentVNode("v-if", true), createElementVNode("button", {
|
|
196
209
|
type: "button",
|
|
210
|
+
class: "as-field-action-link",
|
|
197
211
|
onClick: _cache[0] || (_cache[0] = ($event) => __props.formAction && emit("action", __props.formAction.id))
|
|
198
|
-
}, toDisplayString(__props.formAction?.label), 1)], 2)
|
|
212
|
+
}, toDisplayString(__props.formAction?.label), 1)], 2), [[vShow, !__props.hidden]])], 2112);
|
|
199
213
|
};
|
|
200
214
|
}
|
|
201
215
|
});
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
let vue = require("vue");
|
|
2
|
+
//#region src/components/defaults/as-action.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
const _hoisted_1 = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "as-action-text"
|
|
6
|
+
};
|
|
2
7
|
//#endregion
|
|
3
8
|
//#region src/components/defaults/as-action.vue
|
|
4
9
|
var as_action_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -186,16 +191,25 @@ var as_action_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
186
191
|
hidden: {
|
|
187
192
|
type: Boolean,
|
|
188
193
|
required: false
|
|
194
|
+
},
|
|
195
|
+
text: {
|
|
196
|
+
type: String,
|
|
197
|
+
required: false
|
|
198
|
+
},
|
|
199
|
+
align: {
|
|
200
|
+
type: String,
|
|
201
|
+
required: false
|
|
189
202
|
}
|
|
190
203
|
},
|
|
191
204
|
emits: ["action"],
|
|
192
205
|
setup(__props, { emit: __emit }) {
|
|
193
206
|
const emit = __emit;
|
|
194
207
|
return (_ctx, _cache) => {
|
|
195
|
-
return (0, vue.
|
|
208
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [(0, vue.createCommentVNode)(" `as-action-field` is the flex row; alignment (`as-action-{left,center,\n right}`) is safelisted in the ui-styles preset since the static extractor\n can't see this interpolated class. The link styling lives directly on the\n <button> (as `as-field-action-link`) so `:hover`/`:focus` bind to the\n button alone — not the whole row. "), (0, vue.withDirectives)((0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)(["as-action-field", [_ctx.$props.class, `as-action-${__props.align ?? "left"}`]]) }, [__props.text ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_1, (0, vue.toDisplayString)(__props.text), 1)) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createElementVNode)("button", {
|
|
196
209
|
type: "button",
|
|
210
|
+
class: "as-field-action-link",
|
|
197
211
|
onClick: _cache[0] || (_cache[0] = ($event) => __props.formAction && emit("action", __props.formAction.id))
|
|
198
|
-
}, (0, vue.toDisplayString)(__props.formAction?.label), 1)], 2)
|
|
212
|
+
}, (0, vue.toDisplayString)(__props.formAction?.label), 1)], 2), [[vue.vShow, !__props.hidden]])], 2112);
|
|
199
213
|
};
|
|
200
214
|
}
|
|
201
215
|
});
|
package/dist/as-action.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_action = require("./as-action-
|
|
1
|
+
const require_as_action = require("./as-action-lLooKipk.cjs");
|
|
2
2
|
module.exports = require_as_action.as_action_default;
|
package/dist/as-action.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-action.vue-
|
|
1
|
+
import { t as _default } from "./as-action.vue-BCbopk0S.cjs";
|
|
2
2
|
export = _default;
|
package/dist/as-action.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-action.vue-
|
|
1
|
+
import { t as _default } from "./as-action.vue-BtQX09n-.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-action.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_action_default } from "./as-action-
|
|
1
|
+
import { t as as_action_default } from "./as-action-BoZtbaXt.mjs";
|
|
2
2
|
export { as_action_default as default };
|
|
@@ -2,7 +2,19 @@ import { o as TAsComponentProps } from "./types-BYfe1QEF.cjs";
|
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/defaults/as-action.vue.d.ts
|
|
5
|
-
type __VLS_Props = TAsComponentProps
|
|
5
|
+
type __VLS_Props = TAsComponentProps & {
|
|
6
|
+
/**
|
|
7
|
+
* Text rendered before the action link, e.g. "Already have an account?".
|
|
8
|
+
* Supplied via `@ui.form.attr 'text', '...'` (attrs flow onto the component
|
|
9
|
+
* as props).
|
|
10
|
+
*/
|
|
11
|
+
text?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Horizontal alignment of the action row. Supplied via
|
|
14
|
+
* `@ui.form.attr 'align', 'left' | 'center' | 'right'`. Defaults to left.
|
|
15
|
+
*/
|
|
16
|
+
align?: "left" | "center" | "right";
|
|
17
|
+
};
|
|
6
18
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
7
19
|
action: (name: string) => any;
|
|
8
20
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
@@ -2,7 +2,19 @@ import { o as TAsComponentProps } from "./types-CV9ss4UN.mjs";
|
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/defaults/as-action.vue.d.ts
|
|
5
|
-
type __VLS_Props = TAsComponentProps
|
|
5
|
+
type __VLS_Props = TAsComponentProps & {
|
|
6
|
+
/**
|
|
7
|
+
* Text rendered before the action link, e.g. "Already have an account?".
|
|
8
|
+
* Supplied via `@ui.form.attr 'text', '...'` (attrs flow onto the component
|
|
9
|
+
* as props).
|
|
10
|
+
*/
|
|
11
|
+
text?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Horizontal alignment of the action row. Supplied via
|
|
14
|
+
* `@ui.form.attr 'align', 'left' | 'center' | 'right'`. Defaults to left.
|
|
15
|
+
*/
|
|
16
|
+
align?: "left" | "center" | "right";
|
|
17
|
+
};
|
|
6
18
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
7
19
|
action: (name: string) => any;
|
|
8
20
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
@@ -2,6 +2,7 @@ const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
|
|
|
2
2
|
const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-jdMRxjBE.cjs");
|
|
3
3
|
const require_use_as_value_help = require("./use-as-value-help-uANI3zWa.cjs");
|
|
4
4
|
const require_as_field = require("./as-field--sdVpUAw.cjs");
|
|
5
|
+
const require_as_iterator = require("./as-iterator-WKkr9lwG.cjs");
|
|
5
6
|
let vue = require("vue");
|
|
6
7
|
let _atscript_ui = require("@atscript/ui");
|
|
7
8
|
//#region src/composables/use-as-external-errors.ts
|
|
@@ -277,6 +278,10 @@ const _hoisted_3 = { class: "as-form-error-message" };
|
|
|
277
278
|
const _hoisted_4 = ["disabled"];
|
|
278
279
|
const _hoisted_5 = {
|
|
279
280
|
key: 2,
|
|
281
|
+
class: "as-form-grid"
|
|
282
|
+
};
|
|
283
|
+
const _hoisted_6 = {
|
|
284
|
+
key: 3,
|
|
280
285
|
class: "as-form-overlay"
|
|
281
286
|
};
|
|
282
287
|
//#endregion
|
|
@@ -407,6 +412,11 @@ var as_form_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
407
412
|
class: "as-submit-btn",
|
|
408
413
|
disabled: (0, vue.unref)(form).submitDisabled.value
|
|
409
414
|
}, (0, vue.toDisplayString)((0, vue.unref)(form).submitText.value), 9, _hoisted_4)]) : (0, vue.createCommentVNode)("v-if", true),
|
|
415
|
+
(0, vue.createCommentVNode)(" `@ui.form.pushDown` fields render in their own grid below submit. "),
|
|
416
|
+
__props.def.pushDownFields.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_5, [(0, vue.createVNode)(require_as_iterator.as_iterator_default, {
|
|
417
|
+
def: __props.def,
|
|
418
|
+
fields: __props.def.pushDownFields
|
|
419
|
+
}, null, 8, ["def", "fields"])])) : (0, vue.createCommentVNode)("v-if", true),
|
|
410
420
|
(0, vue.renderSlot)(_ctx.$slots, "form.footer", {
|
|
411
421
|
disabled: (0, vue.unref)(form).submitDisabled.value,
|
|
412
422
|
clearErrors: (0, vue.unref)(form).clearErrors,
|
|
@@ -414,7 +424,7 @@ var as_form_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
414
424
|
setErrors: (0, vue.unref)(form).setErrors,
|
|
415
425
|
formContext: __props.formContext
|
|
416
426
|
}),
|
|
417
|
-
__props.loading ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
427
|
+
__props.loading ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_6, [(0, vue.renderSlot)(_ctx.$slots, "form.loading", {}, () => [_cache[2] || (_cache[2] = (0, vue.createElementVNode)("span", {
|
|
418
428
|
class: "as-form-overlay-icon",
|
|
419
429
|
"aria-hidden": "true"
|
|
420
430
|
}, null, -1))])])) : (0, vue.createCommentVNode)("v-if", true)
|
|
@@ -2,6 +2,7 @@ import { a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_STATE_KEY, f as HID
|
|
|
2
2
|
import { n as provideAsNestedSectionsStore, r as useAsNestedSectionsStore, t as DESCENDANT_ERROR_COUNTS_KEY } from "./use-as-nested-sections-store-lhi0z5z1.mjs";
|
|
3
3
|
import { t as CLIENT_FACTORY_KEY } from "./use-as-value-help-CBykDEjZ.mjs";
|
|
4
4
|
import { t as as_field_default } from "./as-field-CryuaPPU.mjs";
|
|
5
|
+
import { t as as_iterator_default } from "./as-iterator-B0Jf2zn4.mjs";
|
|
5
6
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, openBlock, provide, reactive, ref, renderSlot, toDisplayString, toRaw, toValue, unref, watch, watchEffect, withModifiers } from "vue";
|
|
6
7
|
import { UI_FORM_ACTION, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_SUBMIT_TEXT, WF_ACTION_WITH_DATA, buildDescendantErrorCounts, getFieldMeta, getFormValidator, iteratePathAncestors, mergeErrorMaps, resolveFormProp } from "@atscript/ui";
|
|
7
8
|
//#region src/composables/use-as-external-errors.ts
|
|
@@ -277,6 +278,10 @@ const _hoisted_3 = { class: "as-form-error-message" };
|
|
|
277
278
|
const _hoisted_4 = ["disabled"];
|
|
278
279
|
const _hoisted_5 = {
|
|
279
280
|
key: 2,
|
|
281
|
+
class: "as-form-grid"
|
|
282
|
+
};
|
|
283
|
+
const _hoisted_6 = {
|
|
284
|
+
key: 3,
|
|
280
285
|
class: "as-form-overlay"
|
|
281
286
|
};
|
|
282
287
|
//#endregion
|
|
@@ -407,6 +412,11 @@ var as_form_default = /* @__PURE__ */ defineComponent({
|
|
|
407
412
|
class: "as-submit-btn",
|
|
408
413
|
disabled: unref(form).submitDisabled.value
|
|
409
414
|
}, toDisplayString(unref(form).submitText.value), 9, _hoisted_4)]) : createCommentVNode("v-if", true),
|
|
415
|
+
createCommentVNode(" `@ui.form.pushDown` fields render in their own grid below submit. "),
|
|
416
|
+
__props.def.pushDownFields.length ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(as_iterator_default, {
|
|
417
|
+
def: __props.def,
|
|
418
|
+
fields: __props.def.pushDownFields
|
|
419
|
+
}, null, 8, ["def", "fields"])])) : createCommentVNode("v-if", true),
|
|
410
420
|
renderSlot(_ctx.$slots, "form.footer", {
|
|
411
421
|
disabled: unref(form).submitDisabled.value,
|
|
412
422
|
clearErrors: unref(form).clearErrors,
|
|
@@ -414,7 +424,7 @@ var as_form_default = /* @__PURE__ */ defineComponent({
|
|
|
414
424
|
setErrors: unref(form).setErrors,
|
|
415
425
|
formContext: __props.formContext
|
|
416
426
|
}),
|
|
417
|
-
__props.loading ? (openBlock(), createElementBlock("div",
|
|
427
|
+
__props.loading ? (openBlock(), createElementBlock("div", _hoisted_6, [renderSlot(_ctx.$slots, "form.loading", {}, () => [_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
418
428
|
class: "as-form-overlay-icon",
|
|
419
429
|
"aria-hidden": "true"
|
|
420
430
|
}, null, -1))])])) : createCommentVNode("v-if", true)
|
package/dist/as-form.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_form = require("./as-form-
|
|
1
|
+
const require_as_form = require("./as-form-BpcP_wIF.cjs");
|
|
2
2
|
module.exports = require_as_form.as_form_default;
|
package/dist/as-form.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_form_default } from "./as-form-
|
|
1
|
+
import { t as as_form_default } from "./as-form-Cb5orGFC.mjs";
|
|
2
2
|
export { as_form_default as default };
|
|
@@ -25,6 +25,10 @@ var as_iterator_default = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
removeLabel: {
|
|
26
26
|
type: String,
|
|
27
27
|
required: false
|
|
28
|
+
},
|
|
29
|
+
fields: {
|
|
30
|
+
type: Array,
|
|
31
|
+
required: false
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
setup(__props) {
|
|
@@ -35,7 +39,7 @@ var as_iterator_default = /* @__PURE__ */ defineComponent({
|
|
|
35
39
|
return parentPrefix.value;
|
|
36
40
|
}));
|
|
37
41
|
return (_ctx, _cache) => {
|
|
38
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(__props.def.fields, (f) => {
|
|
42
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(__props.fields ?? __props.def.fields, (f) => {
|
|
39
43
|
return openBlock(), createBlock(as_field_default, {
|
|
40
44
|
key: f.path ?? f.name,
|
|
41
45
|
field: f,
|
|
@@ -25,6 +25,10 @@ var as_iterator_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
25
25
|
removeLabel: {
|
|
26
26
|
type: String,
|
|
27
27
|
required: false
|
|
28
|
+
},
|
|
29
|
+
fields: {
|
|
30
|
+
type: Array,
|
|
31
|
+
required: false
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
setup(__props) {
|
|
@@ -35,7 +39,7 @@ var as_iterator_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
35
39
|
return parentPrefix.value;
|
|
36
40
|
}));
|
|
37
41
|
return (_ctx, _cache) => {
|
|
38
|
-
return (0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.def.fields, (f) => {
|
|
42
|
+
return (0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.fields ?? __props.def.fields, (f) => {
|
|
39
43
|
return (0, vue.openBlock)(), (0, vue.createBlock)(require_as_field.as_field_default, {
|
|
40
44
|
key: f.path ?? f.name,
|
|
41
45
|
field: f,
|
package/dist/as-iterator.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_iterator = require("./as-iterator-
|
|
1
|
+
const require_as_iterator = require("./as-iterator-WKkr9lwG.cjs");
|
|
2
2
|
module.exports = require_as_iterator.as_iterator_default;
|
package/dist/as-iterator.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
|
-
import { FormDef } from "@atscript/ui";
|
|
2
|
+
import { FormDef, FormFieldDef } from "@atscript/ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/as-iterator.vue.d.ts
|
|
5
5
|
type __VLS_Props = {
|
|
@@ -8,6 +8,13 @@ type __VLS_Props = {
|
|
|
8
8
|
onRemove?: () => void;
|
|
9
9
|
canRemove?: boolean;
|
|
10
10
|
removeLabel?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Explicit field list to render. Defaults to `def.fields`. Used to render a
|
|
13
|
+
* precomputed partition of the same FormDef — `def.mainFields` (above submit)
|
|
14
|
+
* vs `def.pushDownFields` (below submit) — so each field renders exactly once
|
|
15
|
+
* across the two grids without re-scanning per frame.
|
|
16
|
+
*/
|
|
17
|
+
fields?: FormFieldDef[];
|
|
11
18
|
};
|
|
12
19
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
13
20
|
declare const _default: typeof __VLS_export;
|
package/dist/as-iterator.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
|
-
import { FormDef } from "@atscript/ui";
|
|
2
|
+
import { FormDef, FormFieldDef } from "@atscript/ui";
|
|
3
3
|
|
|
4
4
|
//#region src/components/as-iterator.vue.d.ts
|
|
5
5
|
type __VLS_Props = {
|
|
@@ -8,6 +8,13 @@ type __VLS_Props = {
|
|
|
8
8
|
onRemove?: () => void;
|
|
9
9
|
canRemove?: boolean;
|
|
10
10
|
removeLabel?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Explicit field list to render. Defaults to `def.fields`. Used to render a
|
|
13
|
+
* precomputed partition of the same FormDef — `def.mainFields` (above submit)
|
|
14
|
+
* vs `def.pushDownFields` (below submit) — so each field renders exactly once
|
|
15
|
+
* across the two grids without re-scanning per frame.
|
|
16
|
+
*/
|
|
17
|
+
fields?: FormFieldDef[];
|
|
11
18
|
};
|
|
12
19
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
13
20
|
declare const _default: typeof __VLS_export;
|
package/dist/as-iterator.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_iterator_default } from "./as-iterator-
|
|
1
|
+
import { t as as_iterator_default } from "./as-iterator-B0Jf2zn4.mjs";
|
|
2
2
|
export { as_iterator_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
|
|
2
|
-
const require_as_iterator = require("./as-iterator-
|
|
2
|
+
const require_as_iterator = require("./as-iterator-WKkr9lwG.cjs");
|
|
3
3
|
const require_as_collapsible = require("./as-collapsible-B0rlXU0x.cjs");
|
|
4
4
|
const require_as_variant_picker = require("./as-variant-picker-JlEhh7YO.cjs");
|
|
5
5
|
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-C85F2VoU.cjs");
|
|
@@ -226,10 +226,14 @@ var as_object_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
226
226
|
return isRoot.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [
|
|
227
227
|
__props.title ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("h2", _hoisted_1, (0, vue.toDisplayString)(__props.title), 1)) : (0, vue.createCommentVNode)("v-if", true),
|
|
228
228
|
__props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_2, (0, vue.toDisplayString)(__props.description), 1)) : (0, vue.createCommentVNode)("v-if", true),
|
|
229
|
+
(0, vue.createCommentVNode)(" Root grid renders the above-submit partition; `@ui.form.pushDown`\n fields go to AsForm's below-submit grid via `def.pushDownFields`. "),
|
|
229
230
|
objectDef.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
230
231
|
key: 2,
|
|
231
232
|
class: (0, vue.normalizeClass)(["as-form-grid", _ctx.$props.class])
|
|
232
|
-
}, [(0, vue.createVNode)(require_as_iterator.as_iterator_default, {
|
|
233
|
+
}, [(0, vue.createVNode)(require_as_iterator.as_iterator_default, {
|
|
234
|
+
def: objectDef.value,
|
|
235
|
+
fields: objectDef.value.mainFields
|
|
236
|
+
}, null, 8, ["def", "fields"])], 2)) : (0, vue.createCommentVNode)("v-if", true)
|
|
233
237
|
], 64)) : ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_collapsible.as_collapsible_default, {
|
|
234
238
|
key: 1,
|
|
235
239
|
ref_key: "collapsibleRef",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as useAsUnionVariant } from "./use-form-context-bAj7UoSe.mjs";
|
|
2
|
-
import { t as as_iterator_default } from "./as-iterator-
|
|
2
|
+
import { t as as_iterator_default } from "./as-iterator-B0Jf2zn4.mjs";
|
|
3
3
|
import { t as as_collapsible_default } from "./as-collapsible-DQOxKGGj.mjs";
|
|
4
4
|
import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-B3GLhKyt.mjs";
|
|
5
5
|
import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-CQctXLZI.mjs";
|
|
@@ -226,10 +226,14 @@ var as_object_default = /* @__PURE__ */ defineComponent({
|
|
|
226
226
|
return isRoot.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
227
227
|
__props.title ? (openBlock(), createElementBlock("h2", _hoisted_1, toDisplayString(__props.title), 1)) : createCommentVNode("v-if", true),
|
|
228
228
|
__props.description ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(__props.description), 1)) : createCommentVNode("v-if", true),
|
|
229
|
+
createCommentVNode(" Root grid renders the above-submit partition; `@ui.form.pushDown`\n fields go to AsForm's below-submit grid via `def.pushDownFields`. "),
|
|
229
230
|
objectDef.value ? (openBlock(), createElementBlock("div", {
|
|
230
231
|
key: 2,
|
|
231
232
|
class: normalizeClass(["as-form-grid", _ctx.$props.class])
|
|
232
|
-
}, [createVNode(as_iterator_default, {
|
|
233
|
+
}, [createVNode(as_iterator_default, {
|
|
234
|
+
def: objectDef.value,
|
|
235
|
+
fields: objectDef.value.mainFields
|
|
236
|
+
}, null, 8, ["def", "fields"])], 2)) : createCommentVNode("v-if", true)
|
|
233
237
|
], 64)) : (openBlock(), createBlock(as_collapsible_default, {
|
|
234
238
|
key: 1,
|
|
235
239
|
ref_key: "collapsibleRef",
|
package/dist/as-object.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_object = require("./as-object-
|
|
1
|
+
const require_as_object = require("./as-object-D6AHBb5w.cjs");
|
|
2
2
|
module.exports = require_as_object.as_object_default;
|
package/dist/as-object.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_object_default } from "./as-object-
|
|
1
|
+
import { t as as_object_default } from "./as-object-Dl3ranqm.mjs";
|
|
2
2
|
export { as_object_default as default };
|
package/dist/index.cjs
CHANGED
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
|
|
3
3
|
const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-jdMRxjBE.cjs");
|
|
4
4
|
const require_use_as_value_help = require("./use-as-value-help-uANI3zWa.cjs");
|
|
5
|
-
const require_as_form = require("./as-form-
|
|
5
|
+
const require_as_form = require("./as-form-BpcP_wIF.cjs");
|
|
6
6
|
const require_as_field = require("./as-field--sdVpUAw.cjs");
|
|
7
7
|
const require_use_as_locale = require("./use-as-locale-C4z5stwD.cjs");
|
|
8
|
-
const require_as_iterator = require("./as-iterator-
|
|
8
|
+
const require_as_iterator = require("./as-iterator-WKkr9lwG.cjs");
|
|
9
9
|
const require_focus_after_toggle = require("./focus-after-toggle-CWxiPZWi.cjs");
|
|
10
10
|
const require_as_collapsible = require("./as-collapsible-B0rlXU0x.cjs");
|
|
11
11
|
const require_as_field_shell = require("./as-field-shell-zeno02I1.cjs");
|
|
@@ -16,9 +16,9 @@ const require_as_multi_select = require("./as-multi-select-D7XGZS3L.cjs");
|
|
|
16
16
|
const require_as_radio = require("./as-radio-CdK8gCkN.cjs");
|
|
17
17
|
const require_as_checkbox = require("./as-checkbox-Cva4XHFW.cjs");
|
|
18
18
|
const require_as_paragraph = require("./as-paragraph-BA-c863H.cjs");
|
|
19
|
-
const require_as_action = require("./as-action-
|
|
19
|
+
const require_as_action = require("./as-action-lLooKipk.cjs");
|
|
20
20
|
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-C85F2VoU.cjs");
|
|
21
|
-
const require_as_object = require("./as-object-
|
|
21
|
+
const require_as_object = require("./as-object-D6AHBb5w.cjs");
|
|
22
22
|
const require_as_array = require("./as-array-CIwvhCCk.cjs");
|
|
23
23
|
const require_as_union = require("./as-union-Cz5cm7BP.cjs");
|
|
24
24
|
const require_as_tuple = require("./as-tuple-Co8__kEm.cjs");
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import _default$3 from "./as-collapsible.cjs";
|
|
|
3
3
|
import _default$7 from "./as-field.cjs";
|
|
4
4
|
import { a as TFormRule, i as TFormFieldRegistration, n as _default$9, o as TFormState, r as TFormFieldCallbacks } from "./as-form.vue-BfX0Qgl9.cjs";
|
|
5
5
|
import _default$11 from "./as-iterator.cjs";
|
|
6
|
-
import { t as _default } from "./as-action.vue-
|
|
6
|
+
import { t as _default } from "./as-action.vue-BCbopk0S.cjs";
|
|
7
7
|
import { t as _default$1 } from "./as-array.vue-Ci4xO292.cjs";
|
|
8
8
|
import { t as _default$2 } from "./as-checkbox.vue-DqIm0ms2.cjs";
|
|
9
9
|
import { t as _default$4 } from "./as-date.vue-SdlJH5fn.cjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import _default$3 from "./as-collapsible.mjs";
|
|
|
3
3
|
import _default$7 from "./as-field.mjs";
|
|
4
4
|
import { a as TFormRule, i as TFormFieldRegistration, n as _default$9, o as TFormState, r as TFormFieldCallbacks } from "./as-form.vue-DmW9OzBV.mjs";
|
|
5
5
|
import _default$11 from "./as-iterator.mjs";
|
|
6
|
-
import { t as _default } from "./as-action.vue-
|
|
6
|
+
import { t as _default } from "./as-action.vue-BtQX09n-.mjs";
|
|
7
7
|
import { t as _default$1 } from "./as-array.vue-I42wuF6e.mjs";
|
|
8
8
|
import { t as _default$2 } from "./as-checkbox.vue-BoY72SV8.mjs";
|
|
9
9
|
import { t as _default$4 } from "./as-date.vue-BfSVrED7.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { m as PATH_PREFIX_KEY, n as useAsUnionVariant, s as DISMISS_EXTERNAL_AT_KEY, t as formatIndexedLabelParts } from "./use-form-context-bAj7UoSe.mjs";
|
|
2
2
|
import { n as provideAsNestedSectionsStore, r as useAsNestedSectionsStore } from "./use-as-nested-sections-store-lhi0z5z1.mjs";
|
|
3
3
|
import { n as useAsValueHelp } from "./use-as-value-help-CBykDEjZ.mjs";
|
|
4
|
-
import { i as useAsExternalErrors, n as useAsForm, r as useAsState, t as as_form_default } from "./as-form-
|
|
4
|
+
import { i as useAsExternalErrors, n as useAsForm, r as useAsState, t as as_form_default } from "./as-form-Cb5orGFC.mjs";
|
|
5
5
|
import { n as useAsData, r as useAsField, t as as_field_default } from "./as-field-CryuaPPU.mjs";
|
|
6
6
|
import { n as useAsLocale, t as provideAsLocale } from "./use-as-locale-BrFdAgnU.mjs";
|
|
7
|
-
import { t as as_iterator_default } from "./as-iterator-
|
|
7
|
+
import { t as as_iterator_default } from "./as-iterator-B0Jf2zn4.mjs";
|
|
8
8
|
import { n as focusNewFocusableAfter, r as useAsFocusFirstAfter, t as focusFirstAfter } from "./focus-after-toggle-Dtl3P6CS.mjs";
|
|
9
9
|
import { t as as_collapsible_default } from "./as-collapsible-DQOxKGGj.mjs";
|
|
10
10
|
import { t as as_field_shell_default } from "./as-field-shell-D0mNXfQZ.mjs";
|
|
@@ -15,9 +15,9 @@ import { t as as_multi_select_default } from "./as-multi-select-DGipqqGz.mjs";
|
|
|
15
15
|
import { t as as_radio_default } from "./as-radio-DBW6XzlW.mjs";
|
|
16
16
|
import { n as useAsTriStateCheckbox, t as as_checkbox_default } from "./as-checkbox-dN1K-rJ_.mjs";
|
|
17
17
|
import { t as as_paragraph_default } from "./as-paragraph-GIGj6UgL.mjs";
|
|
18
|
-
import { t as as_action_default } from "./as-action-
|
|
18
|
+
import { t as as_action_default } from "./as-action-BoZtbaXt.mjs";
|
|
19
19
|
import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-CQctXLZI.mjs";
|
|
20
|
-
import { t as as_object_default } from "./as-object-
|
|
20
|
+
import { t as as_object_default } from "./as-object-Dl3ranqm.mjs";
|
|
21
21
|
import { n as useAsArray, t as as_array_default } from "./as-array-DNJOnZ2j.mjs";
|
|
22
22
|
import { n as useAsTypeMap, r as useAsUnion, t as as_union_default } from "./as-union-B5OFQLJX.mjs";
|
|
23
23
|
import { n as useAsTuple, t as as_tuple_default } from "./as-tuple-NwaomSYF.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/vue-form",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.87",
|
|
4
4
|
"description": "Type-driven form rendering for Atscript with Vue 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"access": "public"
|
|
158
158
|
},
|
|
159
159
|
"dependencies": {
|
|
160
|
-
"@atscript/ui": "^0.1.
|
|
160
|
+
"@atscript/ui": "^0.1.87"
|
|
161
161
|
},
|
|
162
162
|
"devDependencies": {
|
|
163
163
|
"@atscript/core": "^0.1.68",
|
|
@@ -173,13 +173,13 @@
|
|
|
173
173
|
"vue": "^3",
|
|
174
174
|
"vue-tsc": "~3.2.9",
|
|
175
175
|
"vunor": "^0.2.1",
|
|
176
|
-
"@atscript/ui-fns": "^0.1.
|
|
176
|
+
"@atscript/ui-fns": "^0.1.87"
|
|
177
177
|
},
|
|
178
178
|
"peerDependencies": {
|
|
179
179
|
"@atscript/db-client": "^0.1.95",
|
|
180
180
|
"reka-ui": "^2.9.8",
|
|
181
181
|
"vue": "^3",
|
|
182
|
-
"@atscript/ui-fns": "^0.1.
|
|
182
|
+
"@atscript/ui-fns": "^0.1.87"
|
|
183
183
|
},
|
|
184
184
|
"scripts": {
|
|
185
185
|
"build": "node ../../scripts/gen-exports.mjs && vp pack",
|