@appsbd/vue3-appsbd-ui 1.0.1 → 1.0.3

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.
Files changed (52) hide show
  1. package/.ai/ai_ref_AbAvatar.md +9 -1
  2. package/.ai/ai_ref_AbBadge.md +6 -5
  3. package/.ai/ai_ref_AbButton.md +8 -8
  4. package/.ai/ai_ref_AbCarousel.md +47 -47
  5. package/.ai/ai_ref_AbConfirmPopover.md +59 -59
  6. package/.ai/ai_ref_AbDarkModeToggler.md +42 -42
  7. package/.ai/ai_ref_AbEasyModal.md +62 -62
  8. package/.ai/ai_ref_AbFileUploader.md +63 -63
  9. package/.ai/ai_ref_AbFilterPanel.md +71 -71
  10. package/.ai/ai_ref_AbFormCheck.md +75 -75
  11. package/.ai/ai_ref_AbImageRadioInput.md +63 -63
  12. package/.ai/ai_ref_AbKbd.md +35 -35
  13. package/.ai/ai_ref_AbKbdGroup.md +33 -33
  14. package/.ai/ai_ref_AbModal.md +103 -103
  15. package/.ai/ai_ref_AbMultiSelect.md +1 -0
  16. package/.ai/ai_ref_AbNumberField.md +84 -84
  17. package/.ai/ai_ref_AbPopover.md +64 -64
  18. package/.ai/ai_ref_AbPricingCard.md +64 -64
  19. package/.ai/ai_ref_AbPricingContainer.md +49 -49
  20. package/.ai/ai_ref_AbPricingTable.md +72 -72
  21. package/.ai/ai_ref_AbProgressbar.md +44 -44
  22. package/.ai/ai_ref_AbScrollbar.md +48 -48
  23. package/.ai/ai_ref_AbSettingsForm.md +54 -54
  24. package/.ai/ai_ref_AbSideMenuItem.md +58 -58
  25. package/.ai/ai_ref_AbSidebar.md +70 -70
  26. package/.ai/ai_ref_AbSkeleton.md +41 -41
  27. package/.ai/ai_ref_AbSlider.md +71 -71
  28. package/.ai/ai_ref_AbTab.md +38 -38
  29. package/.ai/ai_ref_AbTable.md +59 -59
  30. package/.ai/ai_ref_AbTabs.md +47 -47
  31. package/.ai/ai_ref_AbToggle.md +65 -65
  32. package/.ai/ai_ref_AbTooltip.md +53 -53
  33. package/.ai/ai_ref_AbWizard.md +77 -77
  34. package/.ai/ai_ref_AbWizardStep.md +48 -48
  35. package/.ai/ai_ref_abEventBus.md +94 -0
  36. package/.ai/ai_ref_abRequestParam.md +55 -0
  37. package/.ai/ai_ref_abTranslate.md +33 -0
  38. package/.ai/ai_ref_abVeeRules.md +42 -0
  39. package/.ai/ai_ref_useAlert.md +63 -0
  40. package/.ai/ai_ref_useFileValidator.md +46 -0
  41. package/.ai/ai_ref_useResponsive.md +55 -0
  42. package/.ai/ai_ref_useTheme.md +39 -0
  43. package/.ai/ai_ref_useToast.md +42 -0
  44. package/AI_REFERENCE.md +160 -134
  45. package/design-system.md +403 -403
  46. package/dist/skins/red.scss +3 -3
  47. package/dist/skins/themes/_red.scss +6 -6
  48. package/dist/style.css +1 -1
  49. package/dist/vue3-appsbd-ui.cjs.js +58 -58
  50. package/dist/vue3-appsbd-ui.es.js +5449 -5342
  51. package/package.json +1 -1
  52. package/readme.md +136 -136
@@ -1,65 +1,65 @@
1
- # AbToggle — AI Reference
2
-
3
- Accessible switch/toggle control. Supports title + description layout and custom `trueValue` / `falseValue` values (defaults to `"Y"` / `"N"`).
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <ab-toggle
14
- v-model="settings.notifications"
15
- name="notifications"
16
- title="Email notifications"
17
- description="Receive weekly digest emails."
18
- />
19
-
20
- <!-- Boolean values -->
21
- <ab-toggle
22
- v-model="isActive"
23
- name="active"
24
- :true-value="true"
25
- :false-value="false"
26
- label="Active"
27
- />
28
- </template>
29
- ```
30
-
31
- ## Props
32
-
33
- | Name | Type | Default | Description |
34
- | --- | --- | --- | --- |
35
- | `modelValue` | `any` | — | v-model binding. |
36
- | `label` | `String \| null` | `null` | Field label (above the toggle). |
37
- | `val` | `any` | `"N"` | Initial value when `modelValue` is empty. |
38
- | `name` | `String` | **required** | VeeValidate field name. |
39
- | `containerClass` | `String` | `"mb-3"` | Wrapper class. |
40
- | `size` | `String` | `"md"` | Toggle size. |
41
- | `trueValue` | `any` | `"Y"` | Value when checked. |
42
- | `falseValue` | `any` | `"N"` | Value when unchecked. |
43
- | `title` | `String \| null` | `null` | Title next to the toggle. |
44
- | `description` | `String \| null` | `null` | Description under the title. |
45
- | `hints` | `String \| null` | `null` | Helper text. |
46
-
47
- ## Events
48
-
49
- | Event | Payload | Description |
50
- | --- | --- | --- |
51
- | `update:modelValue` | `value` | v-model sync. |
52
-
53
- ## Slots
54
-
55
- | Name | Description |
56
- | --- | --- |
57
- | `label` | Custom label. |
58
- | `title` | Custom title. |
59
- | `description` | Custom description. |
60
- | `descriptionContainer` | Wraps the entire title + description block. |
61
- | `hints` | Custom hints. |
62
-
63
- ## v-model
64
-
65
- Yes.
1
+ # AbToggle — AI Reference
2
+
3
+ Accessible switch/toggle control. Supports title + description layout and custom `trueValue` / `falseValue` values (defaults to `"Y"` / `"N"`).
4
+
5
+ ## Installation
6
+
7
+ Globally registered by the plugin.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <template>
13
+ <ab-toggle
14
+ v-model="settings.notifications"
15
+ name="notifications"
16
+ title="Email notifications"
17
+ description="Receive weekly digest emails."
18
+ />
19
+
20
+ <!-- Boolean values -->
21
+ <ab-toggle
22
+ v-model="isActive"
23
+ name="active"
24
+ :true-value="true"
25
+ :false-value="false"
26
+ label="Active"
27
+ />
28
+ </template>
29
+ ```
30
+
31
+ ## Props
32
+
33
+ | Name | Type | Default | Description |
34
+ | --- | --- | --- | --- |
35
+ | `modelValue` | `any` | — | v-model binding. |
36
+ | `label` | `String \| null` | `null` | Field label (above the toggle). |
37
+ | `val` | `any` | `"N"` | Initial value when `modelValue` is empty. |
38
+ | `name` | `String` | **required** | VeeValidate field name. |
39
+ | `containerClass` | `String` | `"mb-3"` | Wrapper class. |
40
+ | `size` | `String` | `"md"` | Toggle size. |
41
+ | `trueValue` | `any` | `"Y"` | Value when checked. |
42
+ | `falseValue` | `any` | `"N"` | Value when unchecked. |
43
+ | `title` | `String \| null` | `null` | Title next to the toggle. |
44
+ | `description` | `String \| null` | `null` | Description under the title. |
45
+ | `hints` | `String \| null` | `null` | Helper text. |
46
+
47
+ ## Events
48
+
49
+ | Event | Payload | Description |
50
+ | --- | --- | --- |
51
+ | `update:modelValue` | `value` | v-model sync. |
52
+
53
+ ## Slots
54
+
55
+ | Name | Description |
56
+ | --- | --- |
57
+ | `label` | Custom label. |
58
+ | `title` | Custom title. |
59
+ | `description` | Custom description. |
60
+ | `descriptionContainer` | Wraps the entire title + description block. |
61
+ | `hints` | Custom hints. |
62
+
63
+ ## v-model
64
+
65
+ Yes.
@@ -1,53 +1,53 @@
1
- # AbTooltip — AI Reference
2
-
3
- Programmatic tooltip component. Complements the `v-tooltip` directive — use this when you need slot-driven rich content or interactive tooltips.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <!-- Simple -->
14
- <ab-tooltip content="Save changes" placement="top">
15
- <ab-button class="btn-primary"><i class="bi bi-save"></i></ab-button>
16
- </ab-tooltip>
17
-
18
- <!-- Rich content -->
19
- <ab-tooltip placement="bottom" interactive>
20
- <ab-button class="btn-outline-secondary">Info</ab-button>
21
- <template #content>
22
- <strong>Pro tip</strong>
23
- <p>Press <ab-kbd>⌘</ab-kbd> + <ab-kbd>S</ab-kbd> to save.</p>
24
- </template>
25
- </ab-tooltip>
26
- </template>
27
- ```
28
-
29
- ## Props
30
-
31
- | Name | Type | Default | Description |
32
- | --- | --- | --- | --- |
33
- | `content` | `String` | `""` | Tooltip text (used when `#content` slot is absent). |
34
- | `placement` | `String` | `"top"` | `top`, `bottom`, `left`, `right`, or `auto-*`. |
35
- | `offset` | `Number \| String` | `8` | Offset from the reference element. |
36
- | `disabled` | `Boolean` | `false` | Disable the tooltip. |
37
- | `arrow` | `Boolean` | `true` | Show the arrow pointer. |
38
- | `interactive` | `Boolean` | `false` | Allow hovering the tooltip without it hiding. |
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. Complements the `v-tooltip` directive — use this when you need slot-driven rich content or interactive tooltips.
4
+
5
+ ## Installation
6
+
7
+ Globally registered by the plugin.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <template>
13
+ <!-- Simple -->
14
+ <ab-tooltip content="Save changes" placement="top">
15
+ <ab-button class="btn-primary"><i class="bi bi-save"></i></ab-button>
16
+ </ab-tooltip>
17
+
18
+ <!-- Rich content -->
19
+ <ab-tooltip placement="bottom" interactive>
20
+ <ab-button class="btn-outline-secondary">Info</ab-button>
21
+ <template #content>
22
+ <strong>Pro tip</strong>
23
+ <p>Press <ab-kbd>⌘</ab-kbd> + <ab-kbd>S</ab-kbd> to save.</p>
24
+ </template>
25
+ </ab-tooltip>
26
+ </template>
27
+ ```
28
+
29
+ ## Props
30
+
31
+ | Name | Type | Default | Description |
32
+ | --- | --- | --- | --- |
33
+ | `content` | `String` | `""` | Tooltip text (used when `#content` slot is absent). |
34
+ | `placement` | `String` | `"top"` | `top`, `bottom`, `left`, `right`, or `auto-*`. |
35
+ | `offset` | `Number \| String` | `8` | Offset from the reference element. |
36
+ | `disabled` | `Boolean` | `false` | Disable the tooltip. |
37
+ | `arrow` | `Boolean` | `true` | Show the arrow pointer. |
38
+ | `interactive` | `Boolean` | `false` | Allow hovering the tooltip without it hiding. |
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,77 +1,77 @@
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
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <ab-wizard
14
- orientation="horizontal"
15
- variant="circular"
16
- :before-next="handleBeforeNext"
17
- @finished="handleFinished"
18
- @step-changed="onStepChange"
19
- >
20
- <ab-wizard-step title="Account" description="Basic info">
21
- <!-- step content -->
22
- </ab-wizard-step>
23
-
24
- <ab-wizard-step title="Profile">
25
- <!-- step content -->
26
- </ab-wizard-step>
27
-
28
- <ab-wizard-step title="Confirm">
29
- <!-- step content -->
30
- </ab-wizard-step>
31
- </ab-wizard>
32
- </template>
33
-
34
- <script setup>
35
- async function handleBeforeNext(currentStepIndex) {
36
- // Return false to block navigation
37
- return true;
38
- }
39
- function handleFinished() { /* all steps done */ }
40
- function onStepChange(newIndex) { /* active step changed */ }
41
- </script>
42
- ```
43
-
44
- ## Props
45
-
46
- | Name | Type | Default | Description |
47
- | --- | --- | --- | --- |
48
- | `beforeNext` | `Function` | `async () => true` | Hook before moving forward; return `false` to cancel. |
49
- | `beforePrev` | `Function` | `async () => true` | Hook before moving back. |
50
- | `beforeFinish` | `Function` | `async () => true` | Hook before `finished` fires. |
51
- | `orientation` | `String` | `"horizontal"` | `horizontal` or `vertical`. |
52
- | `variant` | `String` | `"default"` | `default`, `circular`, `modal`, `circular-modal`, etc. |
53
- | `stepperSize` | `String` | `"md"` | `sm` or `md`. |
54
- | `hideControls` | `Boolean` | `false` | Hide the built-in next/prev buttons. |
55
- | `nextText` | `String` | `"Next"` | Next button label. |
56
- | `prevText` | `String` | `"Back"` | Previous button label. |
57
- | `finishText` | `String` | `"Finish"` | Finish button label. |
58
- | `disableClose` | `Boolean` | `false` | Disable the close button (modal variants). |
59
- | `modalClass` | `String` | `"modal-lg"` | Modal size class (modal variants only). |
60
-
61
- ## Events
62
-
63
- | Event | Payload | Description |
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
+ ## Installation
6
+
7
+ Globally registered by the plugin.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <template>
13
+ <ab-wizard
14
+ orientation="horizontal"
15
+ variant="circular"
16
+ :before-next="handleBeforeNext"
17
+ @finished="handleFinished"
18
+ @step-changed="onStepChange"
19
+ >
20
+ <ab-wizard-step title="Account" description="Basic info">
21
+ <!-- step content -->
22
+ </ab-wizard-step>
23
+
24
+ <ab-wizard-step title="Profile">
25
+ <!-- step content -->
26
+ </ab-wizard-step>
27
+
28
+ <ab-wizard-step title="Confirm">
29
+ <!-- step content -->
30
+ </ab-wizard-step>
31
+ </ab-wizard>
32
+ </template>
33
+
34
+ <script setup>
35
+ async function handleBeforeNext(currentStepIndex) {
36
+ // Return false to block navigation
37
+ return true;
38
+ }
39
+ function handleFinished() { /* all steps done */ }
40
+ function onStepChange(newIndex) { /* active step changed */ }
41
+ </script>
42
+ ```
43
+
44
+ ## Props
45
+
46
+ | Name | Type | Default | Description |
47
+ | --- | --- | --- | --- |
48
+ | `beforeNext` | `Function` | `async () => true` | Hook before moving forward; return `false` to cancel. |
49
+ | `beforePrev` | `Function` | `async () => true` | Hook before moving back. |
50
+ | `beforeFinish` | `Function` | `async () => true` | Hook before `finished` fires. |
51
+ | `orientation` | `String` | `"horizontal"` | `horizontal` or `vertical`. |
52
+ | `variant` | `String` | `"default"` | `default`, `circular`, `modal`, `circular-modal`, etc. |
53
+ | `stepperSize` | `String` | `"md"` | `sm` or `md`. |
54
+ | `hideControls` | `Boolean` | `false` | Hide the built-in next/prev buttons. |
55
+ | `nextText` | `String` | `"Next"` | Next button label. |
56
+ | `prevText` | `String` | `"Back"` | Previous button label. |
57
+ | `finishText` | `String` | `"Finish"` | Finish button label. |
58
+ | `disableClose` | `Boolean` | `false` | Disable the close button (modal variants). |
59
+ | `modalClass` | `String` | `"modal-lg"` | Modal size class (modal variants only). |
60
+
61
+ ## Events
62
+
63
+ | Event | Payload | Description |
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,48 +1,48 @@
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
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <ab-wizard>
13
- <ab-wizard-step
14
- title="Account"
15
- description="Create your account"
16
- :icon="UserIcon"
17
- >
18
- <ab-input-field v-model="form.email" name="email" label="Email" rules="required|email" />
19
- </ab-wizard-step>
20
-
21
- <ab-wizard-step title="Confirm" disable-close>
22
- Ready to submit?
23
- </ab-wizard-step>
24
- </ab-wizard>
25
- ```
26
-
27
- ## Props
28
-
29
- | Name | Type | Default | Description |
30
- | --- | --- | --- | --- |
31
- | `title` | `String` | **required** | Step title shown in the stepper. |
32
- | `description` | `String` | `""` | Step description / subtitle. |
33
- | `icon` | `Object \| String \| Function` | `null` | Icon component, icon class string, or render function. |
34
- | `disableClose` | `Boolean` | `false` | Disable the close button while this step is active. |
35
-
36
- ## Events
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
+ ## Installation
6
+
7
+ Globally registered by the plugin.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <ab-wizard>
13
+ <ab-wizard-step
14
+ title="Account"
15
+ description="Create your account"
16
+ :icon="UserIcon"
17
+ >
18
+ <ab-input-field v-model="form.email" name="email" label="Email" rules="required|email" />
19
+ </ab-wizard-step>
20
+
21
+ <ab-wizard-step title="Confirm" disable-close>
22
+ Ready to submit?
23
+ </ab-wizard-step>
24
+ </ab-wizard>
25
+ ```
26
+
27
+ ## Props
28
+
29
+ | Name | Type | Default | Description |
30
+ | --- | --- | --- | --- |
31
+ | `title` | `String` | **required** | Step title shown in the stepper. |
32
+ | `description` | `String` | `""` | Step description / subtitle. |
33
+ | `icon` | `Object \| String \| Function` | `null` | Icon component, icon class string, or render function. |
34
+ | `disableClose` | `Boolean` | `false` | Disable the close button while this step is active. |
35
+
36
+ ## Events
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.
@@ -0,0 +1,94 @@
1
+ # abEventBus (abEmitter)
2
+
3
+ A lightweight, global event bus built on top of `tiny-emitter`. Provides a Vue 3 plugin for the `$eventBus` global property and a standalone `emitterObj` for non-component usage.
4
+
5
+ ## Installation
6
+
7
+ ```javascript
8
+ npm install @vue3-appsbd-ui
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Standalone (Composable / Utilities)
14
+
15
+ Import `emitterObj` directly for use outside of Vue components — utilities, stores, service modules, etc.
16
+
17
+ ```javascript
18
+ import { emitterObj } from "@vue3-appsbd-ui";
19
+ import { onUnmounted } from "vue";
20
+
21
+ function handler(data) {
22
+ console.log("Received:", data);
23
+ }
24
+
25
+ // Subscribe
26
+ emitterObj.$on("my-event", handler);
27
+
28
+ // Emit
29
+ emitterObj.$emit("my-event", { message: "Hello" });
30
+
31
+ // Cleanup
32
+ onUnmounted(() => {
33
+ emitterObj.$off("my-event", handler);
34
+ });
35
+ ```
36
+
37
+ ### Plugin Usage (Options API or `this` context)
38
+
39
+ Register the event bus as a Vue plugin to access `$eventBus` from any component via `this.$eventBus`.
40
+
41
+ ```javascript
42
+ // main.js
43
+ import { createApp } from "vue";
44
+ import abEventBus from "@vue3-appsbd-ui/libraries/abEmitter";
45
+
46
+ const app = createApp(App);
47
+ app.use(abEventBus);
48
+ app.mount("#app");
49
+ ```
50
+
51
+ ```javascript
52
+ // Inside any Options-API component:
53
+ export default {
54
+ mounted() {
55
+ this.$eventBus.$on("my-event", this.handleEvent);
56
+ },
57
+ beforeUnmount() {
58
+ this.$eventBus.$off("my-event", this.handleEvent);
59
+ },
60
+ methods: {
61
+ handleEvent(payload) {
62
+ console.log("Received:", payload);
63
+ }
64
+ }
65
+ }
66
+ ```
67
+
68
+ ### One-Time Listener
69
+
70
+ Use `$once` to subscribe to an event that automatically unsubscribes after the first invocation.
71
+
72
+ ```javascript
73
+ emitterObj.$once("init-complete", () => {
74
+ console.log("Initialization done — this runs only once.");
75
+ });
76
+ ```
77
+
78
+ ## API Reference
79
+
80
+ ### `emitterObj` Methods
81
+
82
+ | Method | Signature | Description |
83
+ |---|---|---|
84
+ | `$on` | `(event: string, callback: Function)` | Subscribe to an event. |
85
+ | `$once` | `(event: string, callback: Function)` | Subscribe to an event; auto-unsubscribe after first fire. |
86
+ | `$off` | `(event: string, callback: Function)` | Unsubscribe from an event (pass the same handler reference). |
87
+ | `$emit` | `(event: string, ...args: any[])` | Fire an event with optional payload arguments. |
88
+
89
+ ### Plugin (default export)
90
+
91
+ | Property | Type | Description |
92
+ |---|---|---|
93
+ | `emitterObj` | `Object` | Direct reference to the emitter wrapper. |
94
+ | `install(app)` | `Function` | Vue plugin install hook — registers `$eventBus` on `globalProperties`. |
@@ -0,0 +1,55 @@
1
+ # abRequestParam (Library)
2
+
3
+ Data-transfer classes used to build structured API request parameters for paginated, sorted, and filtered data queries.
4
+
5
+ ## Installation
6
+
7
+ ```javascript
8
+ npm install @vue3-appsbd-ui
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```javascript
14
+ import abRequestParam from "@vue3-appsbd-ui/libraries/abRequestParam";
15
+
16
+ const params = new abRequestParam();
17
+
18
+ // Pagination
19
+ params.limit = 25;
20
+ params.page = 1;
21
+
22
+ // Sorting
23
+ params.AddSortItem("created_at", "desc");
24
+
25
+ // Filtering
26
+ params.AddSrcItem("status", "active", "eq");
27
+ params.AddSrcItem("name", "John", "like");
28
+
29
+ // Output suitable for axios or fetch payload
30
+ console.log(params);
31
+ ```
32
+
33
+ ## API Reference
34
+
35
+ ### `abRequestParam` Class
36
+
37
+ **Properties**
38
+
39
+ | Property | Type | Description |
40
+ |---|---|---|
41
+ | `data` | `any` | Arbitrary payload attached to the request (e.g. form data). |
42
+ | `limit` | `string\|number` | Number of records per page. |
43
+ | `page` | `string\|number` | Current page number. |
44
+ | `filter_prop` | `string` | Optional filter property identifier. |
45
+ | `sort_by` | `abSortParam[]` | Array of sort descriptors. |
46
+ | `src_by` | `abSrcParam[]` | Array of filter/search descriptors. |
47
+ | `group_by` | `string[]` | Array of property names to group results by. |
48
+ | `force` | `boolean` | Forces the server to bypass cache. |
49
+
50
+ **Methods**
51
+
52
+ | Method | Signature | Description |
53
+ |---|---|---|
54
+ | `AddSortItem(prop, ord)` | `Function` | Appends a sort rule. `ord` defaults to `'asc'`, accepts `'asc' \| 'desc'`. |
55
+ | `AddSrcItem(prop, val, opr)` | `Function` | Appends a search rule. `opr` defaults to `'eq'`, accepts `'eq', 'neq', 'gt', 'gte', 'lt', 'lte', 'like', 'in'`. |
@@ -0,0 +1,33 @@
1
+ # abTranslate (Library)
2
+
3
+ A localization utility wrapping `vue3-gettext`. Exposes helper methods `translateGettext` and `translateGetMsg` that automatically interpolate parameters and translate strings, falling back safely if gettext isn't initialized.
4
+
5
+ ## Installation
6
+
7
+ ```javascript
8
+ npm install @vue3-appsbd-ui
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```javascript
14
+ import { translateGettext, translateGetMsg } from "@vue3-appsbd-ui/libraries/abTranslate";
15
+
16
+ // Simple translation
17
+ const greeting = translateGettext("Hello World");
18
+
19
+ // Translation with interpolation (assuming vue3-gettext translates "Welcome %{name}")
20
+ const welcome = translateGettext("Welcome %{name}", { name: "John" });
21
+
22
+ // Only interpolates without translating the base string
23
+ const msg = translateGetMsg("Error code: %{code}", { code: "404" });
24
+ ```
25
+
26
+ ## API Reference
27
+
28
+ | Export | Signature | Description |
29
+ |---|---|---|
30
+ | `initTranslate(gettextInstance)` | `Function` | Registers the global gettext instance to be used outside of Vue components. |
31
+ | `abCreateGettext(options)` | `Function` | Creates a gettext instance and auto-registers it via `initTranslate`. |
32
+ | `translateGettext(msg, params)` | `Function` | Translates a string `msg` and interpolates any variables provided in `params` object. |
33
+ | `translateGetMsg(msg, params)` | `Function` | Interpolates the `params` into `msg` but does not translate the base string. |