@appsbd/vue3-appsbd-ui 1.0.3 → 1.0.5
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_AbAvatar.md +41 -51
- package/.ai/ai_ref_AbBadge.md +36 -45
- package/.ai/ai_ref_AbButton.md +52 -70
- package/.ai/ai_ref_AbCard.md +51 -70
- package/.ai/ai_ref_AbCarousel.md +36 -47
- package/.ai/ai_ref_AbChart.md +46 -87
- package/.ai/ai_ref_AbColorPicker.md +42 -55
- package/.ai/ai_ref_AbConfirmPopover.md +54 -59
- package/.ai/ai_ref_AbCustomField.md +66 -74
- package/.ai/ai_ref_AbDarkModeToggler.md +33 -42
- package/.ai/ai_ref_AbDateTimePicker.md +74 -108
- package/.ai/ai_ref_AbEasyModal.md +56 -62
- package/.ai/ai_ref_AbField.md +88 -96
- package/.ai/ai_ref_AbFileUploader.md +47 -63
- package/.ai/ai_ref_AbFilterPanel.md +67 -71
- package/.ai/ai_ref_AbFormCheck.md +58 -75
- package/.ai/ai_ref_AbImageRadioInput.md +55 -63
- package/.ai/ai_ref_AbInputField.md +66 -74
- package/.ai/ai_ref_AbInputTag.md +56 -76
- package/.ai/ai_ref_AbKbd.md +23 -35
- package/.ai/ai_ref_AbKbdGroup.md +21 -33
- package/.ai/ai_ref_AbMainLayout.md +106 -0
- package/.ai/ai_ref_AbModal.md +98 -103
- package/.ai/ai_ref_AbMultiSelect.md +78 -112
- package/.ai/ai_ref_AbNumberField.md +59 -84
- package/.ai/ai_ref_AbPinInput.md +33 -45
- package/.ai/ai_ref_AbPopover.md +54 -64
- package/.ai/ai_ref_AbPricingCard.md +56 -64
- package/.ai/ai_ref_AbPricingContainer.md +41 -49
- package/.ai/ai_ref_AbPricingTable.md +56 -72
- package/.ai/ai_ref_AbProgressbar.md +34 -44
- package/.ai/ai_ref_AbScrollbar.md +38 -48
- package/.ai/ai_ref_AbSettingsForm.md +46 -54
- package/.ai/ai_ref_AbSideMenuItem.md +47 -58
- package/.ai/ai_ref_AbSidebar.md +62 -70
- package/.ai/ai_ref_AbSkeleton.md +23 -41
- package/.ai/ai_ref_AbSlider.md +52 -71
- package/.ai/ai_ref_AbTab.md +30 -38
- package/.ai/ai_ref_AbTable.md +49 -59
- package/.ai/ai_ref_AbTabs.md +37 -47
- package/.ai/ai_ref_AbToggle.md +46 -65
- package/.ai/ai_ref_AbTooltip.md +39 -53
- package/.ai/ai_ref_AbWizard.md +64 -77
- package/.ai/ai_ref_AbWizardStep.md +36 -48
- package/.ai/ai_ref_abEventBus.md +9 -37
- package/.ai/ai_ref_abRequestParam.md +2 -17
- package/.ai/ai_ref_abTranslate.md +30 -15
- package/.ai/ai_ref_abVeeRules.md +2 -11
- package/.ai/ai_ref_global_config.md +57 -66
- package/.ai/ai_ref_useAlert.md +7 -20
- package/.ai/ai_ref_useFileValidator.md +3 -18
- package/.ai/ai_ref_useResponsive.md +6 -20
- package/.ai/ai_ref_useTheme.md +4 -15
- package/.ai/ai_ref_useToast.md +5 -17
- package/AI_REF.md +114 -0
- package/AI_REFERENCE.md +87 -1157
- package/design-system.md +403 -403
- package/dist/skins/black.css +1 -1
- package/dist/skins/black.scss +3 -3
- package/dist/skins/cyan.css +1 -1
- package/dist/skins/cyan.scss +3 -3
- package/dist/skins/default.css +1 -1
- package/dist/skins/default.scss +5 -5
- package/dist/skins/gray.css +1 -1
- package/dist/skins/gray.scss +3 -3
- package/dist/skins/green.css +1 -1
- package/dist/skins/green.scss +5 -5
- package/dist/skins/orange.css +1 -1
- package/dist/skins/orange.scss +3 -3
- package/dist/skins/pink.css +1 -1
- package/dist/skins/pink.scss +3 -3
- package/dist/skins/purple.css +1 -1
- package/dist/skins/purple.scss +3 -3
- package/dist/skins/red.css +1 -1
- package/dist/skins/red.scss +3 -3
- package/dist/skins/themes/_black.scss +18 -6
- package/dist/skins/themes/_blue.scss +18 -43
- package/dist/skins/themes/_common_variable.scss +695 -590
- package/dist/skins/themes/_cyan.scss +18 -6
- package/dist/skins/themes/_gray.scss +18 -6
- package/dist/skins/themes/_green.scss +18 -6
- package/dist/skins/themes/_grid.scss +32 -27
- package/dist/skins/themes/_orange.scss +18 -6
- package/dist/skins/themes/_pink.scss +18 -6
- package/dist/skins/themes/_purple.scss +18 -6
- package/dist/skins/themes/_red.scss +18 -6
- package/dist/skins/themes/_violet.scss +18 -6
- package/dist/skins/violet.css +1 -1
- package/dist/skins/violet.scss +3 -3
- package/dist/style.css +1 -1
- package/dist/vue3-appsbd-ui.cjs.js +145 -125
- package/dist/vue3-appsbd-ui.es.js +27822 -16778
- package/package.json +72 -66
- package/readme.md +194 -136
- package/scripts/postinstall.js +55 -0
- package/scripts/setup.js +16 -0
- package/scripts/skill-groups.js +38 -0
- package/skills/commands/generate-module.md +76 -0
- package/skills/commands/settings-form.md +175 -0
- package/skills/commands/use-appsbd-ui.md +40 -0
package/.ai/ai_ref_AbTooltip.md
CHANGED
|
@@ -1,53 +1,39 @@
|
|
|
1
|
-
# AbTooltip — AI Reference
|
|
2
|
-
|
|
3
|
-
Programmatic tooltip component.
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
| `
|
|
39
|
-
|
|
40
|
-
## Events
|
|
41
|
-
|
|
42
|
-
None.
|
|
43
|
-
|
|
44
|
-
## Slots
|
|
45
|
-
|
|
46
|
-
| Name | Description |
|
|
47
|
-
| --- | --- |
|
|
48
|
-
| `default` | Trigger element. |
|
|
49
|
-
| `content` | Tooltip body (overrides the `content` prop). |
|
|
50
|
-
|
|
51
|
-
## See also
|
|
52
|
-
|
|
53
|
-
- `v-tooltip` directive for simple string hints (`<ab-button v-tooltip="'Hello'">`).
|
|
1
|
+
# AbTooltip — AI Reference
|
|
2
|
+
|
|
3
|
+
Programmatic tooltip component. Use when you need slot-driven rich content or interactive tooltips; use the `v-tooltip` directive for simple string hints.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<template>
|
|
9
|
+
<ab-tooltip content="Save changes" placement="top">
|
|
10
|
+
<ab-button class="btn-primary"><i class="bi bi-save"></i></ab-button>
|
|
11
|
+
</ab-tooltip>
|
|
12
|
+
|
|
13
|
+
<ab-tooltip placement="bottom" interactive>
|
|
14
|
+
<ab-button class="btn-outline-secondary">Info</ab-button>
|
|
15
|
+
<template #content>
|
|
16
|
+
<strong>Pro tip</strong>
|
|
17
|
+
<p>Press <ab-kbd>⌘</ab-kbd> + <ab-kbd>S</ab-kbd> to save.</p>
|
|
18
|
+
</template>
|
|
19
|
+
</ab-tooltip>
|
|
20
|
+
</template>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| Name | Type | Default | Description |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| `content` | `String` | `""` | Tooltip text (used when `#content` slot is absent). |
|
|
28
|
+
| `placement` | `String` | `"top"` | `top`, `bottom`, `left`, `right`, or `auto-*`. |
|
|
29
|
+
| `offset` | `Number \| String` | `8` | Offset from the reference element. |
|
|
30
|
+
| `disabled` | `Boolean` | `false` | Disable the tooltip. |
|
|
31
|
+
| `arrow` | `Boolean` | `true` | Show the arrow pointer. |
|
|
32
|
+
| `interactive` | `Boolean` | `false` | Allow hovering the tooltip without it hiding. |
|
|
33
|
+
|
|
34
|
+
## Slots
|
|
35
|
+
|
|
36
|
+
| Name | Description |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `default` | Trigger element. |
|
|
39
|
+
| `content` | Tooltip body (overrides the `content` prop). |
|
package/.ai/ai_ref_AbWizard.md
CHANGED
|
@@ -1,77 +1,64 @@
|
|
|
1
|
-
# AbWizard — AI Reference
|
|
2
|
-
|
|
3
|
-
Multi-step wizard container. Hosts `AbWizardStep` children, supports horizontal
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
async
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
| `
|
|
60
|
-
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
| `finished` | — | User completed the final step. |
|
|
66
|
-
| `step-changed` | `stepIndex` | Active step changed. |
|
|
67
|
-
|
|
68
|
-
## Slots
|
|
69
|
-
|
|
70
|
-
| Name | Description |
|
|
71
|
-
| --- | --- |
|
|
72
|
-
| `default` | `<ab-wizard-step>` children. |
|
|
73
|
-
|
|
74
|
-
## Provides
|
|
75
|
-
|
|
76
|
-
- `AbWizard` injection key for step registration.
|
|
77
|
-
- `registerStepValidator(stepId, fn)` — used by `AbSettingsForm` to register per-step validators.
|
|
1
|
+
# AbWizard — AI Reference
|
|
2
|
+
|
|
3
|
+
Multi-step wizard container. Hosts `AbWizardStep` children, supports horizontal/vertical orientations, and multiple visual variants including modal-rendered wizards.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<template>
|
|
9
|
+
<ab-wizard
|
|
10
|
+
orientation="horizontal"
|
|
11
|
+
variant="circular"
|
|
12
|
+
:before-next="handleBeforeNext"
|
|
13
|
+
@finished="handleFinished"
|
|
14
|
+
@step-changed="onStepChange"
|
|
15
|
+
>
|
|
16
|
+
<ab-wizard-step title="Account" description="Basic info"><!-- step content --></ab-wizard-step>
|
|
17
|
+
<ab-wizard-step title="Profile"><!-- step content --></ab-wizard-step>
|
|
18
|
+
<ab-wizard-step title="Confirm"><!-- step content --></ab-wizard-step>
|
|
19
|
+
</ab-wizard>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
async function handleBeforeNext(currentStepIndex) {
|
|
24
|
+
return true; // return false to block navigation
|
|
25
|
+
}
|
|
26
|
+
function handleFinished() {}
|
|
27
|
+
function onStepChange(newIndex) {}
|
|
28
|
+
</script>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Props
|
|
32
|
+
|
|
33
|
+
| Name | Type | Default | Description |
|
|
34
|
+
| --- | --- | --- | --- |
|
|
35
|
+
| `beforeNext` | `Function` | `async () => true` | Hook before moving forward; return `false` to cancel. |
|
|
36
|
+
| `beforePrev` | `Function` | `async () => true` | Hook before moving back. |
|
|
37
|
+
| `beforeFinish` | `Function` | `async () => true` | Hook before `finished` fires. |
|
|
38
|
+
| `orientation` | `String` | `"horizontal"` | `horizontal` or `vertical`. |
|
|
39
|
+
| `variant` | `String` | `"default"` | `default`, `circular`, `modal`, `circular-modal`, etc. |
|
|
40
|
+
| `stepperSize` | `String` | `"md"` | `sm` or `md`. |
|
|
41
|
+
| `hideControls` | `Boolean` | `false` | Hide the built-in next/prev buttons. |
|
|
42
|
+
| `nextText` | `String` | `"Next"` | Next button label. |
|
|
43
|
+
| `prevText` | `String` | `"Back"` | Previous button label. |
|
|
44
|
+
| `finishText` | `String` | `"Finish"` | Finish button label. |
|
|
45
|
+
| `disableClose` | `Boolean` | `false` | Disable the close button (modal variants). |
|
|
46
|
+
| `modalClass` | `String` | `"modal-lg"` | Modal size class (modal variants only). |
|
|
47
|
+
|
|
48
|
+
## Events
|
|
49
|
+
|
|
50
|
+
| Event | Payload | Description |
|
|
51
|
+
| --- | --- | --- |
|
|
52
|
+
| `finished` | — | User completed the final step. |
|
|
53
|
+
| `step-changed` | `stepIndex` | Active step changed. |
|
|
54
|
+
|
|
55
|
+
## Slots
|
|
56
|
+
|
|
57
|
+
| Name | Description |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| `default` | `<ab-wizard-step>` children. |
|
|
60
|
+
|
|
61
|
+
## Provides
|
|
62
|
+
|
|
63
|
+
- `AbWizard` injection key for step registration.
|
|
64
|
+
- `registerStepValidator(stepId, fn)` — used by `AbSettingsForm` to register per-step validators.
|
|
@@ -1,48 +1,36 @@
|
|
|
1
|
-
# AbWizardStep — AI Reference
|
|
2
|
-
|
|
3
|
-
Single step inside an `AbWizard`. Declares its title, optional description, and an optional icon shown in the stepper.
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<ab-wizard-step
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
| `
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
None.
|
|
39
|
-
|
|
40
|
-
## Slots
|
|
41
|
-
|
|
42
|
-
| Name | Description |
|
|
43
|
-
| --- | --- |
|
|
44
|
-
| `default` | Step body content. |
|
|
45
|
-
|
|
46
|
-
## Provides
|
|
47
|
-
|
|
48
|
-
An `AbWizardStep` injection key so children (e.g. `AbSettingsForm`) can register themselves as step validators.
|
|
1
|
+
# AbWizardStep — AI Reference
|
|
2
|
+
|
|
3
|
+
Single step inside an `AbWizard`. Declares its title, optional description, and an optional icon shown in the stepper.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<ab-wizard>
|
|
9
|
+
<ab-wizard-step title="Account" description="Create your account" :icon="UserIcon">
|
|
10
|
+
<ab-input-field v-model="form.email" name="email" label="Email" rules="required|email" />
|
|
11
|
+
</ab-wizard-step>
|
|
12
|
+
|
|
13
|
+
<ab-wizard-step title="Confirm" disable-close>
|
|
14
|
+
Ready to submit?
|
|
15
|
+
</ab-wizard-step>
|
|
16
|
+
</ab-wizard>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Name | Type | Default | Description |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
| `title` | `String` | **required** | Step title shown in the stepper. |
|
|
24
|
+
| `description` | `String` | `""` | Step description / subtitle. |
|
|
25
|
+
| `icon` | `Object \| String \| Function` | `null` | Icon component, icon class string, or render function. |
|
|
26
|
+
| `disableClose` | `Boolean` | `false` | Disable the close button while this step is active. |
|
|
27
|
+
|
|
28
|
+
## Slots
|
|
29
|
+
|
|
30
|
+
| Name | Description |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| `default` | Step body content. |
|
|
33
|
+
|
|
34
|
+
## Provides
|
|
35
|
+
|
|
36
|
+
An `AbWizardStep` injection key so children (e.g. `AbSettingsForm`) can register themselves as step validators.
|
package/.ai/ai_ref_abEventBus.md
CHANGED
|
@@ -1,77 +1,49 @@
|
|
|
1
1
|
# abEventBus (abEmitter)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
npm install @vue3-appsbd-ui
|
|
9
|
-
```
|
|
3
|
+
Lightweight global event bus built on `tiny-emitter`. Provides a Vue 3 plugin for the `$eventBus` global property and a standalone `emitterObj` for non-component usage.
|
|
10
4
|
|
|
11
5
|
## Usage
|
|
12
6
|
|
|
13
7
|
### Standalone (Composable / Utilities)
|
|
14
8
|
|
|
15
|
-
Import `emitterObj` directly for use outside of Vue components — utilities, stores, service modules, etc.
|
|
16
|
-
|
|
17
9
|
```javascript
|
|
18
10
|
import { emitterObj } from "@vue3-appsbd-ui";
|
|
19
11
|
import { onUnmounted } from "vue";
|
|
20
12
|
|
|
21
|
-
function handler(data) {
|
|
22
|
-
console.log("Received:", data);
|
|
23
|
-
}
|
|
13
|
+
function handler(data) { console.log("Received:", data); }
|
|
24
14
|
|
|
25
|
-
// Subscribe
|
|
26
15
|
emitterObj.$on("my-event", handler);
|
|
27
|
-
|
|
28
|
-
// Emit
|
|
29
16
|
emitterObj.$emit("my-event", { message: "Hello" });
|
|
30
17
|
|
|
31
|
-
// Cleanup
|
|
32
18
|
onUnmounted(() => {
|
|
33
19
|
emitterObj.$off("my-event", handler);
|
|
34
20
|
});
|
|
35
21
|
```
|
|
36
22
|
|
|
37
|
-
### Plugin Usage (Options API
|
|
38
|
-
|
|
39
|
-
Register the event bus as a Vue plugin to access `$eventBus` from any component via `this.$eventBus`.
|
|
23
|
+
### Plugin Usage (Options API)
|
|
40
24
|
|
|
41
25
|
```javascript
|
|
42
26
|
// main.js
|
|
43
|
-
import { createApp } from "vue";
|
|
44
27
|
import abEventBus from "@vue3-appsbd-ui/libraries/abEmitter";
|
|
45
|
-
|
|
46
|
-
const app = createApp(App);
|
|
47
28
|
app.use(abEventBus);
|
|
48
|
-
app.mount("#app");
|
|
49
29
|
```
|
|
50
30
|
|
|
51
31
|
```javascript
|
|
52
32
|
// Inside any Options-API component:
|
|
53
33
|
export default {
|
|
54
|
-
mounted() {
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
beforeUnmount() {
|
|
58
|
-
this.$eventBus.$off("my-event", this.handleEvent);
|
|
59
|
-
},
|
|
34
|
+
mounted() { this.$eventBus.$on("my-event", this.handleEvent); },
|
|
35
|
+
beforeUnmount() { this.$eventBus.$off("my-event", this.handleEvent); },
|
|
60
36
|
methods: {
|
|
61
|
-
handleEvent(payload) {
|
|
62
|
-
console.log("Received:", payload);
|
|
63
|
-
}
|
|
37
|
+
handleEvent(payload) { console.log("Received:", payload); }
|
|
64
38
|
}
|
|
65
39
|
}
|
|
66
40
|
```
|
|
67
41
|
|
|
68
42
|
### One-Time Listener
|
|
69
43
|
|
|
70
|
-
Use `$once` to subscribe to an event that automatically unsubscribes after the first invocation.
|
|
71
|
-
|
|
72
44
|
```javascript
|
|
73
45
|
emitterObj.$once("init-complete", () => {
|
|
74
|
-
console.log("
|
|
46
|
+
console.log("Runs only once.");
|
|
75
47
|
});
|
|
76
48
|
```
|
|
77
49
|
|
|
@@ -82,8 +54,8 @@ emitterObj.$once("init-complete", () => {
|
|
|
82
54
|
| Method | Signature | Description |
|
|
83
55
|
|---|---|---|
|
|
84
56
|
| `$on` | `(event: string, callback: Function)` | Subscribe to an event. |
|
|
85
|
-
| `$once` | `(event: string, callback: Function)` | Subscribe
|
|
86
|
-
| `$off` | `(event: string, callback: Function)` | Unsubscribe
|
|
57
|
+
| `$once` | `(event: string, callback: Function)` | Subscribe; auto-unsubscribe after first fire. |
|
|
58
|
+
| `$off` | `(event: string, callback: Function)` | Unsubscribe (pass the same handler reference). |
|
|
87
59
|
| `$emit` | `(event: string, ...args: any[])` | Fire an event with optional payload arguments. |
|
|
88
60
|
|
|
89
61
|
### Plugin (default export)
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
# abRequestParam (Library)
|
|
2
2
|
|
|
3
|
-
Data-transfer classes
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
npm install @vue3-appsbd-ui
|
|
9
|
-
```
|
|
3
|
+
Data-transfer classes for building structured API request parameters for paginated, sorted, and filtered data queries.
|
|
10
4
|
|
|
11
5
|
## Usage
|
|
12
6
|
|
|
@@ -14,20 +8,11 @@ npm install @vue3-appsbd-ui
|
|
|
14
8
|
import abRequestParam from "@vue3-appsbd-ui/libraries/abRequestParam";
|
|
15
9
|
|
|
16
10
|
const params = new abRequestParam();
|
|
17
|
-
|
|
18
|
-
// Pagination
|
|
19
11
|
params.limit = 25;
|
|
20
12
|
params.page = 1;
|
|
21
|
-
|
|
22
|
-
// Sorting
|
|
23
13
|
params.AddSortItem("created_at", "desc");
|
|
24
|
-
|
|
25
|
-
// Filtering
|
|
26
14
|
params.AddSrcItem("status", "active", "eq");
|
|
27
15
|
params.AddSrcItem("name", "John", "like");
|
|
28
|
-
|
|
29
|
-
// Output suitable for axios or fetch payload
|
|
30
|
-
console.log(params);
|
|
31
16
|
```
|
|
32
17
|
|
|
33
18
|
## API Reference
|
|
@@ -38,7 +23,7 @@ console.log(params);
|
|
|
38
23
|
|
|
39
24
|
| Property | Type | Description |
|
|
40
25
|
|---|---|---|
|
|
41
|
-
| `data` | `any` | Arbitrary payload attached to the request
|
|
26
|
+
| `data` | `any` | Arbitrary payload attached to the request. |
|
|
42
27
|
| `limit` | `string\|number` | Number of records per page. |
|
|
43
28
|
| `page` | `string\|number` | Current page number. |
|
|
44
29
|
| `filter_prop` | `string` | Optional filter property identifier. |
|
|
@@ -1,33 +1,48 @@
|
|
|
1
1
|
# abTranslate (Library)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Localization utility wrapping `vue3-gettext`. Exposes `translateGettext` (translates + interpolates) and `translateGetMsg` (interpolates only).
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Setup
|
|
6
6
|
|
|
7
7
|
```javascript
|
|
8
|
-
|
|
8
|
+
// Option 1 — recommended: auto-registers the instance
|
|
9
|
+
import { abCreateGettext } from "@appsbd/vue3-appsbd-ui";
|
|
10
|
+
import translations from "./translations.json";
|
|
11
|
+
|
|
12
|
+
const gettext = abCreateGettext({
|
|
13
|
+
availableLanguages: { en_US: "English", bn_BD: "Bengali" },
|
|
14
|
+
defaultLanguage: "en_US",
|
|
15
|
+
translations,
|
|
16
|
+
});
|
|
17
|
+
app.use(gettext);
|
|
18
|
+
|
|
19
|
+
// Option 2 — manual registration
|
|
20
|
+
import { createGettext } from "vue3-gettext";
|
|
21
|
+
import { initTranslate } from "@appsbd/vue3-appsbd-ui";
|
|
22
|
+
|
|
23
|
+
const gettext = createGettext(options);
|
|
24
|
+
initTranslate(gettext);
|
|
9
25
|
```
|
|
10
26
|
|
|
11
27
|
## Usage
|
|
12
28
|
|
|
13
29
|
```javascript
|
|
14
|
-
import { translateGettext, translateGetMsg } from "@vue3-appsbd-ui
|
|
30
|
+
import { translateGettext, translateGetMsg } from "@appsbd/vue3-appsbd-ui";
|
|
15
31
|
|
|
16
|
-
//
|
|
17
|
-
|
|
32
|
+
// Translates the base string AND each param value
|
|
33
|
+
translateGettext("Welcome %{name}", { name: "Admin" });
|
|
34
|
+
// → "স্বাগতম প্রশাসক" (if both strings are translated)
|
|
18
35
|
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// Only interpolates without translating the base string
|
|
23
|
-
const msg = translateGetMsg("Error code: %{code}", { code: "404" });
|
|
36
|
+
// Interpolates only — does NOT translate anything
|
|
37
|
+
translateGetMsg("Error code: %{code}", { code: "404" });
|
|
38
|
+
// → "Error code: 404"
|
|
24
39
|
```
|
|
25
40
|
|
|
26
41
|
## API Reference
|
|
27
42
|
|
|
28
43
|
| Export | Signature | Description |
|
|
29
|
-
|
|
30
|
-
| `initTranslate(gettextInstance)` | `Function` | Registers the global gettext instance to be used outside of Vue components. |
|
|
44
|
+
| --- | --- | --- |
|
|
31
45
|
| `abCreateGettext(options)` | `Function` | Creates a gettext instance and auto-registers it via `initTranslate`. |
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
46
|
+
| `initTranslate(gettextInstance)` | `Function` | Registers an existing gettext instance for use outside Vue components. |
|
|
47
|
+
| `translateGettext(msg, params)` | `Function` | Translates `msg` and interpolates `params`; also translates param values. |
|
|
48
|
+
| `translateGetMsg(msg, params)` | `Function` | Interpolates `params` into `msg` without translating. |
|
package/.ai/ai_ref_abVeeRules.md
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
# abVeeRules (Library)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
npm install @vue3-appsbd-ui
|
|
9
|
-
```
|
|
3
|
+
Pre-configured VeeValidate validation rules integrated with localization via `abTranslate`.
|
|
10
4
|
|
|
11
5
|
## Usage
|
|
12
6
|
|
|
13
|
-
These rules are typically used internally by the library's `AbField` or form components, but can be imported and registered globally if needed.
|
|
14
|
-
|
|
15
7
|
```javascript
|
|
16
8
|
import { abAllRules } from "@vue3-appsbd-ui/libraries/abVeeRules";
|
|
17
9
|
import { defineRule } from "vee-validate";
|
|
18
10
|
|
|
19
|
-
// Register all custom library rules manually if needed
|
|
20
11
|
Object.keys(abAllRules).forEach(rule => {
|
|
21
12
|
defineRule(rule, abAllRules[rule]);
|
|
22
13
|
});
|
|
@@ -26,7 +17,7 @@ Object.keys(abAllRules).forEach(rule => {
|
|
|
26
17
|
|
|
27
18
|
### `abAllRules` Object
|
|
28
19
|
|
|
29
|
-
|
|
20
|
+
Validation functions conforming to VeeValidate's custom rule signature `(value, params, field)`.
|
|
30
21
|
|
|
31
22
|
Included rules:
|
|
32
23
|
- `required`: Returns translated `%{fld_name} is required`.
|