@maropost-ui/liquidsky-ui 0.0.8
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/README.md +182 -0
- package/dist/AppDialogWrapper-CNldRmy-.js +5 -0
- package/dist/AppDialogWrapper-CNldRmy-.js.map +1 -0
- package/dist/AppMultiCellValue-H5eP9IvV.js +5 -0
- package/dist/AppMultiCellValue-H5eP9IvV.js.map +1 -0
- package/dist/AppPriceDisplay-BbxtY7SY.js +5 -0
- package/dist/AppPriceDisplay-BbxtY7SY.js.map +1 -0
- package/dist/AppTooltip-nmMkVWSP.js +5 -0
- package/dist/AppTooltip-nmMkVWSP.js.map +1 -0
- package/dist/components/AppDropdown/index.d.ts +11 -0
- package/dist/components/AppDropdown/index.d.ts.map +1 -0
- package/dist/components/AppDropdown/useDropdownData.d.ts +22 -0
- package/dist/components/AppDropdown/useDropdownData.d.ts.map +1 -0
- package/dist/components/AppDropdown/useDropdownSearch.d.ts +16 -0
- package/dist/components/AppDropdown/useDropdownSearch.d.ts.map +1 -0
- package/dist/components/AppDropdown/useDropdownSelection.d.ts +17 -0
- package/dist/components/AppDropdown/useDropdownSelection.d.ts.map +1 -0
- package/dist/components/TheUnifiedNavigation/index.d.ts +6 -0
- package/dist/components/TheUnifiedNavigation/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +36 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/composables/index.d.ts +11 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/toRefs.d.ts +18 -0
- package/dist/composables/toRefs.d.ts.map +1 -0
- package/dist/composables/useBackNavigation.d.ts +33 -0
- package/dist/composables/useBackNavigation.d.ts.map +1 -0
- package/dist/composables/useClipboard.d.ts +48 -0
- package/dist/composables/useClipboard.d.ts.map +1 -0
- package/dist/composables/useDebounce.d.ts +38 -0
- package/dist/composables/useDebounce.d.ts.map +1 -0
- package/dist/composables/useEmoji.d.ts +26 -0
- package/dist/composables/useEmoji.d.ts.map +1 -0
- package/dist/composables/useQueryFilters.d.ts +52 -0
- package/dist/composables/useQueryFilters.d.ts.map +1 -0
- package/dist/composables/useRefHistory.d.ts +56 -0
- package/dist/composables/useRefHistory.d.ts.map +1 -0
- package/dist/composables/useSearch.d.ts +65 -0
- package/dist/composables/useSearch.d.ts.map +1 -0
- package/dist/composables/useUnitConversion.d.ts +8 -0
- package/dist/composables/useUnitConversion.d.ts.map +1 -0
- package/dist/composables/useValidation.d.ts +54 -0
- package/dist/composables/useValidation.d.ts.map +1 -0
- package/dist/directives/Clipboard.d.ts +29 -0
- package/dist/directives/Clipboard.d.ts.map +1 -0
- package/dist/directives/TooltipOverflowCheck.d.ts +12 -0
- package/dist/directives/TooltipOverflowCheck.d.ts.map +1 -0
- package/dist/directives/index.d.ts +3 -0
- package/dist/directives/index.d.ts.map +1 -0
- package/dist/index.css +5 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31887 -0
- package/dist/index.js.map +1 -0
- package/dist/types/AlertModalProps.d.ts +26 -0
- package/dist/types/AlertModalProps.d.ts.map +1 -0
- package/dist/types/AppClipboardProps.d.ts +12 -0
- package/dist/types/AppClipboardProps.d.ts.map +1 -0
- package/dist/types/AppConfirmationDialogProps.d.ts +21 -0
- package/dist/types/AppConfirmationDialogProps.d.ts.map +1 -0
- package/dist/types/AppDataTableProps.d.ts +152 -0
- package/dist/types/AppDataTableProps.d.ts.map +1 -0
- package/dist/types/AppDialogWrapperProps.d.ts +11 -0
- package/dist/types/AppDialogWrapperProps.d.ts.map +1 -0
- package/dist/types/AppDrawerWrapperProps.d.ts +12 -0
- package/dist/types/AppDrawerWrapperProps.d.ts.map +1 -0
- package/dist/types/AppDropdownProps.d.ts +62 -0
- package/dist/types/AppDropdownProps.d.ts.map +1 -0
- package/dist/types/AppMultiCellValueProps.d.ts +5 -0
- package/dist/types/AppMultiCellValueProps.d.ts.map +1 -0
- package/dist/types/AppSnackbarProps.d.ts +8 -0
- package/dist/types/AppSnackbarProps.d.ts.map +1 -0
- package/dist/types/AppTableActionMenuProps.d.ts +30 -0
- package/dist/types/AppTableActionMenuProps.d.ts.map +1 -0
- package/dist/types/AppsDropdownProps.d.ts +54 -0
- package/dist/types/AppsDropdownProps.d.ts.map +1 -0
- package/dist/types/NotificationIconProps.d.ts +31 -0
- package/dist/types/NotificationIconProps.d.ts.map +1 -0
- package/dist/types/SearchBarProps.d.ts +20 -0
- package/dist/types/SearchBarProps.d.ts.map +1 -0
- package/dist/types/SecondaryNavBarProps.d.ts +14 -0
- package/dist/types/SecondaryNavBarProps.d.ts.map +1 -0
- package/dist/types/TheNavigationProps.d.ts +52 -0
- package/dist/types/TheNavigationProps.d.ts.map +1 -0
- package/dist/types/TheNotificationDrawerProps.d.ts +41 -0
- package/dist/types/TheNotificationDrawerProps.d.ts.map +1 -0
- package/dist/types/TheOnboardingScreenChecklistsProps.d.ts +39 -0
- package/dist/types/TheOnboardingScreenChecklistsProps.d.ts.map +1 -0
- package/dist/types/TheTimezoneProps.d.ts +19 -0
- package/dist/types/TheTimezoneProps.d.ts.map +1 -0
- package/dist/types/TheUserDropdownProps.d.ts +9 -0
- package/dist/types/TheUserDropdownProps.d.ts.map +1 -0
- package/dist/types/UnifiedNavigationProps.d.ts +28 -0
- package/dist/types/UnifiedNavigationProps.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/router.d.ts +36 -0
- package/dist/types/router.d.ts.map +1 -0
- package/dist/types/unitTypes.d.ts +19 -0
- package/dist/types/unitTypes.d.ts.map +1 -0
- package/dist/utils/capitalizeWords.d.ts +13 -0
- package/dist/utils/capitalizeWords.d.ts.map +1 -0
- package/dist/utils/commonFunctions.d.ts +39 -0
- package/dist/utils/commonFunctions.d.ts.map +1 -0
- package/dist/utils/numberUtils.d.ts +44 -0
- package/dist/utils/numberUtils.d.ts.map +1 -0
- package/dist/vuetify.d.ts +191 -0
- package/dist/vuetify.d.ts.map +1 -0
- package/package.json +70 -0
package/README.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# @liquidsky/ui
|
|
2
|
+
# 0.0.8
|
|
3
|
+
A shared UI component library, composables, and utilities for Vue 3 + Vuetify applications. This package provides reusable components and common functionality to accelerate development across multiple frontend applications.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://vuejs.org/)
|
|
8
|
+
[](https://vuetifyjs.com/)
|
|
9
|
+
[](https://router.vuejs.org/)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- **🎨 UI Components**: Pre-built, accessible Vue components built with Vuetify
|
|
15
|
+
- **🔧 Composables**: Reusable Vue 3 composition API functions
|
|
16
|
+
- **📦 Directives**: Custom Vue directives for enhanced functionality
|
|
17
|
+
- **📝 TypeScript Support**: Full TypeScript definitions and type safety
|
|
18
|
+
- **📖 Documentation**: Auto-generated component documentation
|
|
19
|
+
|
|
20
|
+
## Peer Dependencies
|
|
21
|
+
|
|
22
|
+
The following packages are required as peer dependencies:
|
|
23
|
+
|
|
24
|
+
- `vue` (^3.5.11) - Vue.js framework
|
|
25
|
+
- `vue-router` (^4.4.5) - Vue router
|
|
26
|
+
- `date-fns-tz` (^3.2.0) - Date utilities with timezone support
|
|
27
|
+
- `lz-string` (^1.5.0) - String compression library
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Quick Start
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install @liquidsky/ui
|
|
34
|
+
```
|
|
35
|
+
```typescript
|
|
36
|
+
import { AppBreadcrumb } from '@liquidsky/ui'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## @liquidsky/ui Local Development Guide
|
|
40
|
+
Use these methods to test @liquidsky/ui changes in your consuming project (e.g., commerce-frontend or commerce-backoffice) without publishing to npm. Both leverage npm's linking and packaging features for rapid iteration in your app workflow.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### 🚀 Method 1: npm link (Recommended for Active Development)
|
|
45
|
+
Creates a symlink for instant hot-reloading of changes.
|
|
46
|
+
|
|
47
|
+
> **Note:** This method does **not** work well with Webpack. If you are using Vite, this is the preferred approach. Otherwise, use Method 2.
|
|
48
|
+
|
|
49
|
+
#### Steps:
|
|
50
|
+
|
|
51
|
+
1. **Clone the repository:**
|
|
52
|
+
```bash
|
|
53
|
+
git clone <repo-url> liquidsky-frontend
|
|
54
|
+
cd liquidsky-frontend
|
|
55
|
+
git checkout main
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
2. **Install dependencies and build the package:**
|
|
59
|
+
```bash
|
|
60
|
+
npm install
|
|
61
|
+
npm run dev
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
3. **Create a local npm link:**
|
|
65
|
+
```bash
|
|
66
|
+
npm link
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
4. **In your consuming project (e.g., `commerce-frontend`):**
|
|
70
|
+
```bash
|
|
71
|
+
cd /path/to/your/consuming-project
|
|
72
|
+
npm link @liquidsky/ui
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Now, any changes you make in the `liquidsky-frontend` package will be reflected in your consuming project after rebuilding the library. This is useful for rapid development and testing across multiple projects locally.
|
|
76
|
+
|
|
77
|
+
### 📦 Method 2: Local npm pack (For Stable Builds)
|
|
78
|
+
Generates a distributable .tgz file for one-off installs.
|
|
79
|
+
|
|
80
|
+
#### Step 1: Clone and build the library
|
|
81
|
+
```bash
|
|
82
|
+
git clone <repo-url> liquidsky-frontend
|
|
83
|
+
cd liquidsky-frontend
|
|
84
|
+
git checkout main
|
|
85
|
+
npm install
|
|
86
|
+
npm run build
|
|
87
|
+
```
|
|
88
|
+
#### Step 2: Create package
|
|
89
|
+
```bash
|
|
90
|
+
npm pack
|
|
91
|
+
Creates liquidsky-ui-<version>.tgz.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Step 3: Install in consuming project
|
|
95
|
+
```bash
|
|
96
|
+
cd /path/to/commerce-backoffice # or your project
|
|
97
|
+
npm install ../../path/to/liquidsky-frontend/liquidsky-ui-<version>.tgz
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Documentation
|
|
101
|
+
|
|
102
|
+
This package features automated Storybook documentation that stays synchronized with your components and keeps docs always up-to-date with your code.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Start Storybook dev server (recommended for development)
|
|
106
|
+
npm run storybook
|
|
107
|
+
|
|
108
|
+
# Build Storybook for static deployment
|
|
109
|
+
npm run storybook:build
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Default URL: http://localhost:6006
|
|
113
|
+
|
|
114
|
+
### 📂 Story Organization
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
stories/
|
|
118
|
+
├── custom-components/ # Component stories
|
|
119
|
+
│ ├── AppBreadcrumbs.stories.ts
|
|
120
|
+
│ └── AppDropdown.stories.tsx
|
|
121
|
+
├── composables/ # Composables stories
|
|
122
|
+
|── Directive
|
|
123
|
+
|── vuetify-components # All vuetify component stories
|
|
124
|
+
├── utils/ # Utility stories
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Best Practices for Auto-Documentation
|
|
128
|
+
|
|
129
|
+
### 1. Use JSDoc Comments
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
/**
|
|
133
|
+
* @description Search functionality composable with route integration
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* const { keyword, submitSearch } = useSearch()
|
|
137
|
+
* submitSearch()
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
export function useSearch(): SearchInterface
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 2. Document Component Props
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
export interface SearchBarProps {
|
|
147
|
+
/** Search placeholder text */
|
|
148
|
+
placeholder?: string
|
|
149
|
+
/** Enable automatic route integration */
|
|
150
|
+
useRouteIntegration?: boolean
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### 3. Provide Usage Examples
|
|
155
|
+
|
|
156
|
+
```vue
|
|
157
|
+
<!--
|
|
158
|
+
Usage Example:
|
|
159
|
+
<TheSearchBar
|
|
160
|
+
placeholder="Search products..."
|
|
161
|
+
@search="handleSearch"
|
|
162
|
+
/>
|
|
163
|
+
-->
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### 4. Use TypeScript Types
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
// Explicit return types help documentation
|
|
170
|
+
export function useValidation(): ValidationInterface {
|
|
171
|
+
// ...
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Contributing
|
|
176
|
+
|
|
177
|
+
1. Follow the existing code style and patterns
|
|
178
|
+
2. Add JSDoc comments for new functions and components
|
|
179
|
+
3. Update this README when adding new features
|
|
180
|
+
4. Ensure all components are properly typed with TypeScript
|
|
181
|
+
|
|
182
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppDialogWrapper-CNldRmy-.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppMultiCellValue-H5eP9IvV.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppPriceDisplay-BbxtY7SY.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppTooltip-nmMkVWSP.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as AppDropdown } from './AppDropdown.vue';
|
|
2
|
+
export { default as DropdownItem } from './DropdownItem.vue';
|
|
3
|
+
export { default as DropdownChip } from './DropdownChip.vue';
|
|
4
|
+
export { default as DropdownLoading } from './DropdownLoading.vue';
|
|
5
|
+
export { default as DropdownNoData } from './DropdownNoData.vue';
|
|
6
|
+
export { default as DropdownAppendItem } from './DropdownAppendItem.vue';
|
|
7
|
+
export { default as CreateNewItem } from './CreateNewItem.vue';
|
|
8
|
+
export { default as useDropdownSearch } from './useDropdownSearch';
|
|
9
|
+
export { default as useDropdownData } from './useDropdownData';
|
|
10
|
+
export { default as useDropdownSelection } from './useDropdownSelection';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AppDropdown/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
import type { AppDropdownService, DataFetcher } from "../../types/AppDropdownProps";
|
|
3
|
+
/**
|
|
4
|
+
* Composable for managing dropdown data fetching, pagination, and loading states
|
|
5
|
+
*/
|
|
6
|
+
export default function useDropdownData<T = any>(dataFetcher?: DataFetcher<T>, service?: AppDropdownService<T>, customParams?: Record<string, any>, exclude?: number[], compactItem?: (item: T) => T, attrs?: Record<string, any>, search?: Ref<string>, defaultItems?: Ref<T[]>, model?: Ref<T | T[] | undefined>, onToggleSelectAll?: () => void): {
|
|
7
|
+
isLoading: Ref<number, number>;
|
|
8
|
+
items: Ref<T[], T[]>;
|
|
9
|
+
page: Ref<number, number>;
|
|
10
|
+
hasItems: Ref<boolean, boolean>;
|
|
11
|
+
isFetching: Ref<boolean, boolean>;
|
|
12
|
+
totalItems: Ref<number, number>;
|
|
13
|
+
allItems: import("vue").ComputedRef<T[]>;
|
|
14
|
+
isLoadMoreEnabled: import("vue").ComputedRef<boolean>;
|
|
15
|
+
isExisting: import("vue").ComputedRef<boolean>;
|
|
16
|
+
fetchItems: () => Promise<void>;
|
|
17
|
+
loadMoreItems: () => Promise<void>;
|
|
18
|
+
onIntersect: (isIntersecting: boolean) => void;
|
|
19
|
+
onFocusHandler: (isFocused: boolean) => void;
|
|
20
|
+
handleClearSelection: () => void;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=useDropdownData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDropdownData.d.ts","sourceRoot":"","sources":["../../../src/components/AppDropdown/useDropdownData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAErD,OAAO,KAAK,EAGV,kBAAkB,EAClB,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,CAAC,GAAG,GAAG,EAC7C,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EAC5B,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC/B,YAAY,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EACtC,OAAO,GAAE,MAAM,EAAO,EACtB,WAAW,GAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAe,EACzC,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAC/B,MAAM,GAAE,GAAG,CAAC,MAAM,CAAW,EAC7B,YAAY,GAAE,GAAG,CAAC,CAAC,EAAE,CAAW,EAChC,KAAK,GAAE,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAkB,EAChD,iBAAiB,GAAE,MAAM,IAAe;;;;;;;;;;;;kCA0MH,OAAO;gCAST,OAAO;;EAgC3C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Composable for managing dropdown search functionality with debouncing and emoji filtering
|
|
4
|
+
*
|
|
5
|
+
* @returns Object containing search state and handlers
|
|
6
|
+
*/
|
|
7
|
+
export default function useDropdownSearch(): {
|
|
8
|
+
search: Ref<string, string>;
|
|
9
|
+
isSelecting: Ref<boolean, boolean>;
|
|
10
|
+
handleItemSelection: () => void;
|
|
11
|
+
createDebouncedSearchHandler: (page: Ref<number>, hasItems: Ref<boolean>, fetchItems: () => void) => import("../../composables/useDebounce").DebouncedFunction<[]> & {
|
|
12
|
+
cancel: () => void;
|
|
13
|
+
};
|
|
14
|
+
stripEmojis: (value: string | null | undefined) => string;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=useDropdownSearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDropdownSearch.d.ts","sourceRoot":"","sources":["../../../src/components/AppDropdown/useDropdownSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAO,MAAM,KAAK,CAAC;AAI/B;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB;;;+BAYP,IAAI;yCAa5B,GAAG,CAAC,MAAM,CAAC,YACP,GAAG,CAAC,OAAO,CAAC,cACV,MAAM,IAAI;;;;EAkCzB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Composable for managing dropdown item selection, title resolution, and chip management
|
|
4
|
+
*/
|
|
5
|
+
export default function useDropdownSelection<T = any>(model: Ref<T | T[] | undefined>, attrs?: Record<string, any>, defaultItems?: Ref<T[]>, search?: Ref<string>, modelSelectAll?: Ref<{
|
|
6
|
+
select_all: boolean;
|
|
7
|
+
ids: T[];
|
|
8
|
+
}>, totalItems?: Ref<number>, maxVisibleChips?: number): {
|
|
9
|
+
chipCollapsableText: import("vue").ComputedRef<string>;
|
|
10
|
+
removeItem: (itemIndex: number) => void;
|
|
11
|
+
isItemSelected: (item: T) => boolean;
|
|
12
|
+
getItemTitle: (itemArg: any) => string;
|
|
13
|
+
getIsSelected: (slotProps: any, slotItem: any) => boolean;
|
|
14
|
+
getListItemProps: (slotProps: any) => any;
|
|
15
|
+
createNewItem: () => void;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useDropdownSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDropdownSelection.d.ts","sourceRoot":"","sources":["../../../src/components/AppDropdown/useDropdownSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAI9C;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,CAAC,GAAG,GAAG,EAClD,KAAK,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,EAC/B,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAC/B,YAAY,GAAE,GAAG,CAAC,CAAC,EAAE,CAAW,EAChC,MAAM,GAAE,GAAG,CAAC,MAAM,CAAW,EAC7B,cAAc,GAAE,GAAG,CAAC;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,CAAC,EAAE,CAAA;CAAE,CAAuC,EAC5F,UAAU,GAAE,GAAG,CAAC,MAAM,CAAU,EAChC,eAAe,GAAE,MAAU;;4BAkBI,MAAM;2BAWP,CAAC,KAAG,OAAO;4BAyBV,GAAG,KAAG,MAAM;+BAuCT,GAAG,YAAY,GAAG,KAAG,OAAO;kCAYzB,GAAG;;EAuCzC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as TheUnifiedNavigation } from './TheUnifiedNavigation.vue';
|
|
2
|
+
export { default as UnifiedNavigationBlock } from './UnifiedNavigationBlock.vue';
|
|
3
|
+
export { default as NavigationToggleButton } from './NavigationToggleButton.vue';
|
|
4
|
+
export { default as SubMenuDialog } from './SubMenuDialog.vue';
|
|
5
|
+
export { default as UnifiedNavigationNode } from './UnifiedNavigationNode.vue';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TheUnifiedNavigation/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAG5E,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAChF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAChF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export { default as AppBreadcrumb } from "./AppBreadcrumb.vue";
|
|
2
|
+
export { default as AppClipboard } from "./AppClipboard.vue";
|
|
3
|
+
export { default as AppConfirmationDialog } from "./AppConfirmationDialog.vue";
|
|
4
|
+
export { default as AppDataTable } from "./AppDataTable/AppDataTable.vue";
|
|
5
|
+
export { default as DataTableFilter } from "./AppDataTable/DataTableFilter.vue";
|
|
6
|
+
export { default as DataTableLocalSearch } from "./AppDataTable/DataTableLocalSearch.vue";
|
|
7
|
+
export { default as SavedFilterDialog } from "./AppDataTable/SavedFilterDialog.vue";
|
|
8
|
+
export { default as AppDialogWrapper } from "./AppDialogWrapper.vue";
|
|
9
|
+
export { default as AppDrawerWrapper } from "./AppDrawerWrapper.vue";
|
|
10
|
+
export { default as AppDropdown } from "./AppDropdown/AppDropdown.vue";
|
|
11
|
+
export { default as AppExpandableList } from "./AppExpandableList.vue";
|
|
12
|
+
export { default as AppFilterButton } from "./AppFilterButton.vue";
|
|
13
|
+
export { default as AppMultiCellValue } from "./AppMultiCellValue.vue";
|
|
14
|
+
export { default as AppNumberInput } from "./AppNumberInput.vue";
|
|
15
|
+
export { default as AppNumber } from "./AppNumber.vue";
|
|
16
|
+
export { default as AppPageTitle } from "./AppPageTitle.vue";
|
|
17
|
+
export { default as AppPriceDisplay } from "./AppPriceDisplay.vue";
|
|
18
|
+
export { default as AppSnackbar } from "./AppSnackbar.vue";
|
|
19
|
+
export { default as AppTableActionMenu } from "./AppTableActionMenu.vue";
|
|
20
|
+
export { default as AppTooltip } from "./AppTooltip.vue";
|
|
21
|
+
export { default as AppGridTable } from "./AppGridTable.vue";
|
|
22
|
+
export { default as TheAccountDropdown } from "./TheAccountDropdown.vue";
|
|
23
|
+
export { default as TheAppsDropdown } from "./TheAppsDropdown.vue";
|
|
24
|
+
export { default as TheHeader } from "./TheHeader.vue";
|
|
25
|
+
export { default as TheNavigation } from "./TheNavigation.vue";
|
|
26
|
+
export { default as TheNotificationDrawer } from "./TheNotificationDrawer.vue";
|
|
27
|
+
export { default as TheNotificationIcon } from "./TheNotificationIcon.vue";
|
|
28
|
+
export { default as TheSearchBar } from "./TheSearchBar.vue";
|
|
29
|
+
export { default as TheSecondaryNavigation } from "./TheSecondaryNavigation.vue";
|
|
30
|
+
export { default as TheTimezone } from "./TheTimezone/TheTimezone.vue";
|
|
31
|
+
export { default as TheUserDropdown } from "./TheUserDropdown.vue";
|
|
32
|
+
export { TheUnifiedNavigation } from "./TheUnifiedNavigation";
|
|
33
|
+
export { default as AlertModal } from "./AlertModal.vue";
|
|
34
|
+
export { default as TheOnboardingBanner } from "./TheOnboardingBanner.vue";
|
|
35
|
+
export { default as TheOnboardingScreenChecklists } from "./TheOnboardingScreenChecklists.vue";
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEpF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as useBackNavigation } from "./useBackNavigation";
|
|
2
|
+
export { default as useQueryFilters } from "./useQueryFilters";
|
|
3
|
+
export { default as useRefHistory } from "./useRefHistory";
|
|
4
|
+
export { default as useSearch } from "./useSearch";
|
|
5
|
+
export { default as useValidation } from "./useValidation";
|
|
6
|
+
export { default as useClipboard } from "./useClipboard";
|
|
7
|
+
export { default as useDebounce } from "./useDebounce";
|
|
8
|
+
export { default as useEmoji } from "./useEmoji";
|
|
9
|
+
export { default as toRefs } from "./toRefs";
|
|
10
|
+
export { default as useUnitConversion } from "./useUnitConversion";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { MaybeRef, MaybeRefOrGetter, ToRefs } from 'vue';
|
|
2
|
+
export interface ToRefsOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Replace the original ref with a copy on property update.
|
|
5
|
+
*
|
|
6
|
+
* @default true
|
|
7
|
+
*/
|
|
8
|
+
replaceRef?: MaybeRefOrGetter<boolean>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Extended `toRefs` that also accepts refs of an object.
|
|
12
|
+
*
|
|
13
|
+
* @see https://vueuse.org/toRefs
|
|
14
|
+
* @param objectRef A ref or normal object or array.
|
|
15
|
+
* @param options Options
|
|
16
|
+
*/
|
|
17
|
+
export default function toRefs<T extends object>(objectRef: MaybeRef<T>, options?: ToRefsOptions): ToRefs<T>;
|
|
18
|
+
//# sourceMappingURL=toRefs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toRefs.d.ts","sourceRoot":"","sources":["../../src/composables/toRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AAG7D,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;CACvC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,CAAC,SAAS,MAAM,EAC7C,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,EACtB,OAAO,GAAE,aAAkB,GAC1B,MAAM,CAAC,CAAC,CAAC,CAqCX"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
2
|
+
/**
|
|
3
|
+
* @description
|
|
4
|
+
* A Vue composable that provides intelligent back navigation functionality with smart fallback handling.
|
|
5
|
+
*
|
|
6
|
+
* This composable solves the common problem of users getting stuck when there's no browser history
|
|
7
|
+
* to go back to. It automatically detects if meaningful navigation history exists and either:
|
|
8
|
+
* - Goes back one step in the browser history if available
|
|
9
|
+
* - Falls back to the specified route if no history exists
|
|
10
|
+
*
|
|
11
|
+
* Perfect for use in breadcrumbs, back buttons, or any navigation component that needs
|
|
12
|
+
* reliable back functionality.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```vue
|
|
16
|
+
* <template>
|
|
17
|
+
* <v-btn @click="navigateBackOrFallback({ name: 'Dashboard' })">
|
|
18
|
+
* <v-icon>mdi-arrow-left</v-icon>
|
|
19
|
+
* Back
|
|
20
|
+
* </v-btn>
|
|
21
|
+
* </template>
|
|
22
|
+
*
|
|
23
|
+
* <script setup>
|
|
24
|
+
* import { useBackNavigation } from '@liquidsky/ui'
|
|
25
|
+
*
|
|
26
|
+
* const { navigateBackOrFallback } = useBackNavigation()
|
|
27
|
+
* </script>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export default function useBackNavigation(): {
|
|
31
|
+
navigateBackOrFallback: (fallbackRoute: RouteLocationRaw) => void;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=useBackNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBackNavigation.d.ts","sourceRoot":"","sources":["../../src/composables/useBackNavigation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB;4CAcQ,gBAAgB;EAchE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
interface UseClipboardOptions {
|
|
3
|
+
duration?: number;
|
|
4
|
+
legacy?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @description
|
|
8
|
+
* A Vue composable for copying text to the clipboard with modern Clipboard API support
|
|
9
|
+
* and legacy fallback for older browsers.
|
|
10
|
+
*
|
|
11
|
+
* This composable provides a reactive interface for clipboard operations with:
|
|
12
|
+
* - Modern Clipboard API support when available
|
|
13
|
+
* - Legacy fallback using `document.execCommand`for older browsers
|
|
14
|
+
* - Permission checking for clipboard operations
|
|
15
|
+
* - Reactive state management for success/error feedback
|
|
16
|
+
* - Automatic timeout-based state reset
|
|
17
|
+
*
|
|
18
|
+
* @param options - Configuration options for the composable
|
|
19
|
+
* @returns Object containing reactive state and methods for clipboard operations
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
```js
|
|
23
|
+
import { useClipboard } from '@liquidsky/ui'
|
|
24
|
+
|
|
25
|
+
const { copy, copied, error, isSupported } = useClipboard({ duration: 2000 })
|
|
26
|
+
|
|
27
|
+
// Copy text to clipboard
|
|
28
|
+
await copy('Hello World!')
|
|
29
|
+
|
|
30
|
+
// Check if copy was successful
|
|
31
|
+
if (copied.value) {
|
|
32
|
+
console.log('Text copied successfully!')
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Handle errors
|
|
36
|
+
if (error.value) {
|
|
37
|
+
console.error('Copy failed:', error.value.message)
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
*/
|
|
41
|
+
export default function useClipboard(options?: UseClipboardOptions): {
|
|
42
|
+
copied: Ref<boolean, boolean>;
|
|
43
|
+
error: Ref<Error | null, Error | null>;
|
|
44
|
+
copy: (text: string) => Promise<void>;
|
|
45
|
+
isSupported: import("vue").ComputedRef<boolean | undefined>;
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=useClipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../src/composables/useClipboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAE7C,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,OAAO,GAAE,mBAAwB;;;iBAkC1C,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;;EAuDjD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type DebouncedFunction<TArgs extends any[]> = (...args: TArgs) => void;
|
|
2
|
+
/**
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
* useDebounce - A composable utility for debouncing function calls in Vue.
|
|
6
|
+
*
|
|
7
|
+
* This composable returns a debounced version of the provided function, ensuring that
|
|
8
|
+
* the function is only executed after a specified period of inactivity (`waitMs`).
|
|
9
|
+
* Useful for optimizing performance in scenarios such as search input, resize events,
|
|
10
|
+
* or any situation where you want to limit how often a function is called in response
|
|
11
|
+
* to rapid, repeated events.
|
|
12
|
+
*
|
|
13
|
+
* The returned debounced function is stable (does not change between renders) and
|
|
14
|
+
* includes a `.cancel()` method to clear any pending invocation.
|
|
15
|
+
*
|
|
16
|
+
* @param fn - The function to debounce.
|
|
17
|
+
* @param waitMs - The number of milliseconds to wait after the last call before invoking `fn`.
|
|
18
|
+
* @returns A debounced function with a `cancel` method.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import useDebounce from '@liquidsky/ui'
|
|
23
|
+
*
|
|
24
|
+
* const debouncedSearch = useDebounce((query) => {
|
|
25
|
+
* fetchResults(query)
|
|
26
|
+
* }, 300)
|
|
27
|
+
*
|
|
28
|
+
* // Usage in a component:
|
|
29
|
+
* debouncedSearch('hello')
|
|
30
|
+
*
|
|
31
|
+
* // To cancel a pending call:
|
|
32
|
+
* debouncedSearch.cancel()
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export default function useDebounce<TArgs extends any[] = any[]>(fn: (...args: TArgs) => void, waitMs: number): DebouncedFunction<TArgs> & {
|
|
36
|
+
cancel: () => void;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=useDebounce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../../src/composables/useDebounce.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,SAAS,GAAG,EAAE,GAAG,GAAG,EAAE,EAC7D,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,IAAI,EAC5B,MAAM,EAAE,MAAM;YAIwC,MAAM,IAAI;EAkBjE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
/**
|
|
3
|
+
* @description
|
|
4
|
+
* A Vue composable providing utility functions for working with emoji characters in strings.
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Detects if a string contains any emoji characters.
|
|
8
|
+
* - Removes all emoji characters from a string.
|
|
9
|
+
*
|
|
10
|
+
* Useful for input validation, sanitizing user content, or any scenario where emoji handling is required.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```js
|
|
14
|
+
* import useEmoji from '@liquidsky/ui'
|
|
15
|
+
*
|
|
16
|
+
* const { containsEmoji, stripEmojis } = useEmoji()
|
|
17
|
+
*
|
|
18
|
+
* containsEmoji('Hello 👋') // true
|
|
19
|
+
* stripEmojis('Hello 👋 World 🌍!') // 'Hello World !'
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export default function useEmoji(): {
|
|
23
|
+
containsEmoji: (value: string | null | undefined) => boolean;
|
|
24
|
+
stripEmojis: (value: string | null | undefined) => string;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=useEmoji.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEmoji.d.ts","sourceRoot":"","sources":["../../src/composables/useEmoji.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ;2BAIA,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,OAAO;yBASrC,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAAM;EAU/D"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
export interface FilterLogic {
|
|
3
|
+
data: Ref<Record<string, any>>;
|
|
4
|
+
filterData: Ref<Record<string, any>>;
|
|
5
|
+
appliedFilters: Ref<Record<string, any>>;
|
|
6
|
+
cancelFilter: (additionalParams?: object) => void;
|
|
7
|
+
applyFilter: (additionalParams?: object) => void;
|
|
8
|
+
decompress: (text: any) => string;
|
|
9
|
+
compress: (text: any) => string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* A composable function to manage query filters, including synchronization
|
|
14
|
+
* with Vue Router's query parameters for filtering and clearing filters.
|
|
15
|
+
*
|
|
16
|
+
* @returns {FilterLogic} Returns an object with the following properties:
|
|
17
|
+
* - `data`: Ref<Object> - Reactive object to store filter data
|
|
18
|
+
* - `filterData`: Ref<Object> - Reactive object to store filter data
|
|
19
|
+
* - `appliedFilters`: Ref<Object> - Reactive object to store applied filters
|
|
20
|
+
* - `cancelFilter`: Function - Function to cancel the filter
|
|
21
|
+
* - `applyFilter`: Function - Function to apply the filter
|
|
22
|
+
* - `compress`: Function - Function to compress the filter
|
|
23
|
+
* - `decompress`: Function - Function to decompress the filter
|
|
24
|
+
*
|
|
25
|
+
* Basic usage
|
|
26
|
+
* ```js
|
|
27
|
+
* import { useQueryFilters } from '@liquidsky/ui'
|
|
28
|
+
*
|
|
29
|
+
* const { data, filterData, appliedFilters, cancelFilter, applyFilter, compress, decompress } = useQueryFilters()
|
|
30
|
+
*
|
|
31
|
+
* // Use in template
|
|
32
|
+
* // <input v-model="data.keyword" @keyup.enter="applyFilter" />
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* With event handlers
|
|
36
|
+
* ```js
|
|
37
|
+
* const { data, filterData, appliedFilters, cancelFilter, applyFilter, compress, decompress } = useQueryFilters()
|
|
38
|
+
*
|
|
39
|
+
* // Handle filter application
|
|
40
|
+
* const handleFilter = () => {
|
|
41
|
+
* applyFilter()
|
|
42
|
+
* }
|
|
43
|
+
*
|
|
44
|
+
* // Handle filter cancellation
|
|
45
|
+
* const handleCancel = () => {
|
|
46
|
+
* cancelFilter()
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export default function useQueryFilters(): FilterLogic;
|
|
52
|
+
//# sourceMappingURL=useQueryFilters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useQueryFilters.d.ts","sourceRoot":"","sources":["../../src/composables/useQueryFilters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,GAAG,EAAY,MAAM,KAAK,CAAA;AAGpD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;IAC9B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;IACpC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;IACxC,YAAY,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACjD,WAAW,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD,UAAU,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,MAAM,CAAA;IACjC,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,MAAM,CAAA;CAChC;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,IAAI,WAAW,CAqGrD"}
|