@appsbd/vue3-appsbd-ui 1.0.24 → 1.0.25
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/.ai/ai_ref_AbDropdownMenu.md +1 -1
- package/.ai/ai_ref_AbFilterPanel.md +10 -1
- package/.ai/ai_ref_AbInputField.md +8 -0
- package/.ai/ai_ref_AbSettingsForm.md +24 -3
- package/CHANGELOG.md +17 -1
- package/dist/style.css +1 -1
- package/dist/vue3-appsbd-ui.cjs.js +76 -76
- package/dist/vue3-appsbd-ui.es.js +9077 -8956
- package/package.json +1 -1
|
@@ -58,7 +58,7 @@ Slot mode:
|
|
|
58
58
|
| --- | --- | --- | --- |
|
|
59
59
|
| `modelValue` | `Boolean` | `false` | `v-model` open state. |
|
|
60
60
|
| `target` | `Object \| String` | `null` | Element, component instance or CSS selector to attach to. Optional if `toggle($event)` / `show(el)` is used. |
|
|
61
|
-
| `items` | `Array` | `[]` | `{ label, value?, icon?, color?, disabled?, show?, onClick?(item, event) }`, `{ divider: true }` or `{ header: "Text" }`. `color` is a Bootstrap theme color name. `show: false` hides an item. Ignored when the default slot is used. |
|
|
61
|
+
| `items` | `Array` | `[]` | `{ label, value?, icon?, color?, disabled?, show?, onClick?(item, event), children?, open? }`, `{ divider: true }` or `{ header: "Text" }`. `children` (same item shape, any depth) renders a collapsible sub tree like the sidebar (indent + vertical line + curved connectors); clicking the parent only toggles it (no `select`, menu stays open), `open: true` starts it expanded. `color` is a Bootstrap theme color name. `show: false` hides an item. Ignored when the default slot is used. |
|
|
62
62
|
| `placement` | `String` | `"bottom-start"` | `bottom-end`, `top-start`, …; flips when out of room. |
|
|
63
63
|
| `offset` | `Number \| String` | `4` | Gap (px) between the element and the menu. |
|
|
64
64
|
| `width` | `Number \| String` | `null` | Fixed width (number = px). When unset, `minWidth` / `matchWidth` apply. |
|
|
@@ -10,6 +10,12 @@ Standard-search, advance-search, and quick-advance field layouts are all plain f
|
|
|
10
10
|
|
|
11
11
|
The standard-mode property-selector (and the scan field it swaps for) isn't part of `filterOptions` — it's not tied to one field, it lists all of them — so it has no `width`/`minWidth`/`maxWidth` key to set. It's also the only item in its row until a property is picked (or whenever `showScanFld` is on), so without sizing it it'll stretch to fill the row the same way an unsized `filterOptions` field would. Use the panel-level `propertySelectWidth`/`propertySelectMinWidth`/`propertySelectMaxWidth` props for that slot instead.
|
|
12
12
|
|
|
13
|
+
## Variations (modes)
|
|
14
|
+
|
|
15
|
+
Pick exactly one with `variant` (recommended): `"standard"` (property select + value input), `"single"`, `"advance"`, `"quick-advance"`, `"builder"`. `variant` overrides the legacy `isSingle` / `isAdvance` / `isQuickAdvance` / `isBuilderFilter` booleans, so mode props can never conflict. With no `variant` and none of those booleans, the panel is **standard**.
|
|
16
|
+
|
|
17
|
+
Props that only apply to one variation: standard — `defaultFilterId`, `alwaysShowValueField`, `propertySelectWidth`/`MinWidth`/`MaxWidth`; standard & single — `canScan`, `scanProps`, `showScanFld`; single — `isAutoSearch`; advance — `advanceContainerClass`; quick-advance — `isQuickAdvanceAutoSearch`, `mobileBuilder` (on <768px quick-advance turns into the builder layout); builder — `isBuilderAutoSearch`. `isAllowed` and `showDrGroupText` are declared but currently unused. Props from another variation are ignored.
|
|
18
|
+
|
|
13
19
|
## Usage
|
|
14
20
|
|
|
15
21
|
```vue
|
|
@@ -41,7 +47,8 @@ function handleSearch(data) {
|
|
|
41
47
|
|
|
42
48
|
| Name | Type | Default | Description |
|
|
43
49
|
| -------------------------- | --------- | --------------- | ---------------------------------------------------------- |
|
|
44
|
-
| `
|
|
50
|
+
| `variant` | `String` | `undefined` | Picks the variation: `"standard"` \| `"single"` \| `"advance"` \| `"quick-advance"` \| `"builder"`. When set, it **overrides** `isSingle` / `isAdvance` / `isQuickAdvance` / `isBuilderFilter` — only that variation is active and the other mode booleans are treated as `false`. When unset, the boolean props below decide (old behaviour; no mode prop set = standard). |
|
|
51
|
+
| `isAdvance` | `Boolean` | `false` | Show all filters in an expanded layout. Ignored when `variant` is set. |
|
|
45
52
|
| `isQuickAdvance` | `Boolean` | `false` | Quick advance mode. |
|
|
46
53
|
| `isBuilderFilter` | `Boolean` | `false` | Shopify-style "+" add-filter builder — see mode description above. |
|
|
47
54
|
| `isBuilderAutoSearch` | `Boolean` | `false` | In `isBuilderFilter` mode, automatically fire `searchFilter` on Apply/Remove chip (no Search button). Default is `false` (shows Search button). |
|
|
@@ -55,12 +62,14 @@ function handleSearch(data) {
|
|
|
55
62
|
| `showDrGroupText` | `Boolean` | `true` | Show date-range group label. |
|
|
56
63
|
| `dateFormat` | `String` | `"MMM DD,YYYY"` | Date display format. |
|
|
57
64
|
| `isSearchable` | `Boolean` | `false` | Allow searching within option lists. |
|
|
65
|
+
| `alwaysShowValueField` | `Boolean` | `false` | Standard mode only: show the value input even before a property is chosen (placeholder "Enter value", prefix "Value"; choosing a property swaps in that property's prefix/placeholder). Search stays disabled until both a property and a value are filled. |
|
|
58
66
|
| `isMaxDate` | `Boolean` | `true` | Limit date pickers to today as max. |
|
|
59
67
|
| `size` | `String` | `"xs"` | Control size. |
|
|
60
68
|
| `advanceContainerClass` | `String` | `""` | Extra class on each field's flex-item wrapper in advance mode (base sizing is `flex: 1 1 240px`, wraps as needed — not a Bootstrap grid). To fix a single field's width instead, use that field's own `width` prop (`AbInputField`/`AbMultiSelect`/`AbDateTimePicker`). |
|
|
61
69
|
| `propertySelectWidth` | `String` \| `Number` | `undefined` | Width of the standard-mode property-selector / scan-field slot (number = px). Applied as `min(<value>, 100%)`, so it shrinks on small screens instead of overflowing. |
|
|
62
70
|
| `propertySelectMinWidth` | `String` \| `Number` | `undefined` | `min-width` of that same slot (same `min(<value>, 100%)` clamp). |
|
|
63
71
|
| `propertySelectMaxWidth` | `String` \| `Number` | `undefined` | `max-width` of that same slot — it's the only item in its row until a property is picked (or in scan mode), so it stretches to fill it without one (same `min(<value>, 100%)` clamp). |
|
|
72
|
+
| `mobileBuilder` | `Boolean` | `true` | Quick-advance only: on screens narrower than 768px the panel renders as the builder filter (`+` button, chips, popover editor) using the same `filterOptions`; `isQuickAdvanceAutoSearch` then acts as the builder's auto-search. Wider screens, and every other variation, are unaffected. Set `false` to keep the quick layout on mobile. |
|
|
64
73
|
| `isQuickAdvanceAutoSearch` | `Boolean` | `false` | Fire search automatically on field change (quick advance). |
|
|
65
74
|
| `defaultFilterId` | `String` \| `Number` | `""` | Pre-selects a default filter property in standard search mode (when `!isSingle && !isAdvance && !isQuickAdvance`). |
|
|
66
75
|
|
|
@@ -131,6 +131,14 @@ Not a dedicated prop — pass the native `readonly` attribute (it falls through
|
|
|
131
131
|
<ab-input-field v-model="accountId" name="account_id" label="Account ID" readonly />
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
+
## Textarea mode
|
|
135
|
+
|
|
136
|
+
Not a dedicated prop or component — pass the `as` attribute (it falls through to VeeValidate's `<Field>` via `$attrs`, like `disabled`/`readonly`). `as="textarea"` renders a native `<textarea>` instead of `<input>`, with the same label, `rules`, `hints`, `size`, prefix/postfix slots and validation error as a normal field. Other textarea attributes (`rows`, `cols`) fall through the same way; `type` is ignored by the textarea. `v-model` works unchanged.
|
|
137
|
+
|
|
138
|
+
```vue
|
|
139
|
+
<ab-input-field v-model="description" name="description" label="Description" as="textarea" rows="4" rules="required" />
|
|
140
|
+
```
|
|
141
|
+
|
|
134
142
|
## Events
|
|
135
143
|
|
|
136
144
|
| Event | Payload | Description |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AbSettingsForm — AI Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Settings-style form wrapper around VeeValidate's `<Form>`. Runs the fields' validation rules first, then calls `onSubmit` with the form values. While `onSubmit` runs the form shows a sending state (`is_sending`: submit buttons disabled + spinner). When nested inside an `AbWizardStep`, it auto-registers itself as the wizard step's validator — returning `false` from `onSubmit` blocks the wizard from advancing.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -29,11 +29,32 @@ async function validateProfile(values) {
|
|
|
29
29
|
</script>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
Standalone (no wizard) — submit with a `type="submit"` button:
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
<ab-settings-form :on-submit="save">
|
|
36
|
+
<ab-card body-class="apbd-loading-target">
|
|
37
|
+
<template #body>
|
|
38
|
+
<ab-input-field v-model="form.name" name="name" label="Name" rules="required" />
|
|
39
|
+
</template>
|
|
40
|
+
<template #footer>
|
|
41
|
+
<ab-button class="btn-primary" type="submit">Save</ab-button>
|
|
42
|
+
</template>
|
|
43
|
+
</ab-card>
|
|
44
|
+
</ab-settings-form>
|
|
45
|
+
```
|
|
46
|
+
|
|
32
47
|
## Props
|
|
33
48
|
|
|
34
49
|
| Name | Type | Default | Description |
|
|
35
50
|
| --- | --- | --- | --- |
|
|
36
|
-
| `onSubmit` | `Function` | `() => {}` | Called
|
|
51
|
+
| `onSubmit` | `Function` | `() => {}` | Called as `onSubmit(values)` (`values` = the VeeValidate form values keyed by field `name`) only after every field's `rules` pass. May be `async` — the sending state lasts until the returned Promise settles. In a wizard step, returning `false` or throwing blocks progression to the next step (a throw is also logged with `console.error`). Standalone, the return value is ignored. |
|
|
52
|
+
|
|
53
|
+
## Behavior
|
|
54
|
+
|
|
55
|
+
- **Validation first** — `onSubmit` never runs while any field is invalid (standalone: VeeValidate blocks the submit; in a wizard: the step validator checks `validate()` before calling it).
|
|
56
|
+
- **Sending state** — while `onSubmit` runs the form gets the `apbd-form-sending` class: every `button[type=submit]` inside becomes non-clickable, semi-transparent and shows a spinner, and any `.apbd-loading-target` element gets an animated skeleton overlay (e.g. `AbCard` `body-class="apbd-loading-target"`). Fields themselves are not disabled. The class is removed when `onSubmit` finishes, even if it throws.
|
|
57
|
+
- **Wizard background** — inside an `AbWizard` with a custom `backgroundColor`, the form becomes transparent (`apbd-settings-form-transparent`) so the wizard background shows through. Standalone, or with the default wizard background, nothing changes.
|
|
37
58
|
|
|
38
59
|
## Slots
|
|
39
60
|
|
|
@@ -43,4 +64,4 @@ async function validateProfile(values) {
|
|
|
43
64
|
|
|
44
65
|
## Notes
|
|
45
66
|
|
|
46
|
-
Standalone use (outside a wizard) is supported — the component works as a plain VeeValidate `<Form>` wrapper.
|
|
67
|
+
Standalone use (outside a wizard) is supported — the component works as a plain VeeValidate `<Form>` wrapper with the sending state above.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@appsbd/vue3-appsbd-ui` are documented here. Format loosely follows [Keep a Changelog](https://keepachangelog.com/).
|
|
4
4
|
|
|
5
|
-
## [1.0.
|
|
5
|
+
## [1.0.25] - Unreleased
|
|
6
|
+
|
|
7
|
+
- **Added**: `AbDropdownMenu` item `children` (+ optional `open`) — an item can now have sub items rendered as a collapsible sidebar-style tree (indented, vertical line with curved connectors, rotating chevron), nested to any depth. Clicking a parent only expands/collapses it (no `select`, menu stays open); leaf items behave as before. See `.ai/ai_ref_AbDropdownMenu.md`.
|
|
8
|
+
- **Added**: `AbFilterPanel` `alwaysShowValueField` (`Boolean`, default `false`) — standard-mode variation that shows both the property select and the value input from the start (before, the value input only appeared after a property was chosen). Choosing a property swaps the value input's prefix/placeholder to that property's; Search is disabled until both fields have data. See `.ai/ai_ref_AbFilterPanel.md`.
|
|
9
|
+
- **Added**: `AbFilterPanel` `variant` (`"standard"` | `"single"` | `"advance"` | `"quick-advance"` | `"builder"`, default unset) — picks the variation with one prop. When set it overrides `isSingle` / `isAdvance` / `isQuickAdvance` / `isBuilderFilter`, so only that variation is active and the other mode booleans are forced off. The boolean props still work unchanged when `variant` is unset. See `.ai/ai_ref_AbFilterPanel.md`.
|
|
10
|
+
- **Added**: `AbFilterPanel` `mobileBuilder` (`Boolean`, default `true`) — in quick-advance mode, screens narrower than 768px now render the builder filter (`+` button, chips, popover editor) from the same `filterOptions`; `isQuickAdvanceAutoSearch` acts as its auto-search and fields that already have a value show as chips. Wider screens and every other variation are unchanged. Set `:mobile-builder="false"` to keep the quick layout on mobile. See `.ai/ai_ref_AbFilterPanel.md`.
|
|
11
|
+
- **Docs**: `AbFilterPanel` playground page — a sizes example (`xs` … `xxl`, with full code) for every variation: Standard (existing "Sizes"), Single, Advance, Quick Advance and Builder Filter.
|
|
12
|
+
- **Fixed**: `AbFilterPanel` builder filter — on narrow screens a long value (e.g. a "Date Between" range like `২৪/১০/২০২৬ ↔ ২৬/১০/২০২৬`) was cut off inside the popover's input. The input's font size now shrinks automatically (down to 9px) only when the text doesn't fit, and returns to normal when it does.
|
|
13
|
+
- **Fixed**: `AbPopover` — when the popover's content changed size after opening (e.g. the `AbFilterPanel` builder popover switching from the property list to the wider value editor), it was not repositioned and could run off the right edge of a mobile screen. It now re-measures whenever its content resizes, and keeps itself inside the visible viewport width (scrollbar excluded).
|
|
14
|
+
- **Fixed**: `AbFilterPanel` builder filter — the `+` (add filter) button now matches the height of the chips, Search/Reset buttons and inputs for every `size` (it stays square).
|
|
15
|
+
- **Fixed**: `AbSettingsForm` — `onSubmit` was called with no arguments (both standalone and inside an `AbWizardStep`), so `onSubmit(values)` always got `undefined`. It now receives the form values. Standalone, `is_sending` is also reset if `onSubmit` throws (before, the form stayed in its sending state). See `.ai/ai_ref_AbSettingsForm.md`.
|
|
16
|
+
- **Fixed**: `AbSettingsForm` — the component's internal `name` was `AbForm`; it is now `AbSettingsForm`, so Vue devtools and `<KeepAlive include="AbSettingsForm">` match its real name.
|
|
17
|
+
- **Docs**: `AbSettingsForm` playground page — new "Submitted Values" and "Inside a Wizard" examples (live preview + full code), the Simple Example code is now `v-pre`, and the Usage code is properly indented and uses `onSubmit(values)`.
|
|
18
|
+
- **Docs**: `AbSettingsForm` AI reference and playground API table — `onSubmit(values)`, async handling, the sending state (`apbd-form-sending` / `.apbd-loading-target`), wizard blocking on `false`/throw, and the wizard background override.
|
|
19
|
+
- **Docs**: `AbInputField` AI reference — documented that passing `as="textarea"` renders a native `<textarea>` (with the same label, rules, hints and validation; `rows`/`cols` fall through). See `.ai/ai_ref_AbInputField.md`.
|
|
20
|
+
|
|
21
|
+
## [1.0.24] - 2026-10-27
|
|
6
22
|
|
|
7
23
|
- **Added**: `AbDropdownMenu` component — a standalone dropdown menu (no trigger of its own) that attaches to whatever opens it: an `AbButton`, `AbActionButton`, an icon, an avatar, any element. Open it from the trigger with `menu.toggle($event)` / `menu.show(elementOrEvent)` / `menu.hide()` (template ref), with `v-model` plus a `target` (element, component instance or CSS selector). Build the menu from an `items` array (`{ label, value?, icon?, color?, disabled?, show?, onClick? }`, `{ divider: true }`, `{ header }`; reported through `select` and/or each item's `onClick`) or put anything in the default slot (`{ close }`; style with `.apbd-dropdown-item` / `-divider` / `-header`). Width: fixed with `width`, otherwise at least as wide as the element it is attached to (`matchWidth`, default `true`) and never narrower than `minWidth` (default `160`). Closes on item click (`closeOnSelect`), outside click (`closeOnClickOutside`) and `Esc`. Also `placement` (default `"bottom-start"`), `offset`, `contentClass`, `bordered` (a separator line under every item except the last), and `static` (render the menu inline, always visible, instead of a popup). See `.ai/ai_ref_AbDropdownMenu.md`.
|
|
8
24
|
- **Fixed**: `AbMultiSelect` — focusing the search input (Tab key, a label, or code such as modal autofocus) no longer opens the dropdown by itself. Previously the next click on the field hit the open/close toggle and closed it, so the dropdown looked like it would not open. It now opens on click, typing, `ArrowDown` or `Enter`, like the rest of the keyboard handling. See `.ai/ai_ref_AbMultiSelect.md`.
|