@tapcart/mobile-components 0.8.7 → 0.8.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/dist/components/libs/sort-filter/custom-search.d.ts +1 -1
- package/dist/components/ui/Input/input.d.ts +1 -1
- package/dist/components/ui/Input/types.d.ts +2 -2
- package/dist/components/ui/Input/useInput.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/libs/cache/CartLocalStorage.d.ts +0 -15
- package/dist/components/libs/cache/CartLocalStorage.d.ts.map +0 -1
- package/dist/components/libs/cache/CartLocalStorage.js +0 -34
- package/dist/components/libs/cache/index.d.ts +0 -1
- package/dist/components/libs/cache/index.d.ts.map +0 -1
- package/dist/components/libs/cache/index.js +0 -1
- package/dist/components/ui/swipeable-list.d.ts +0 -4
- package/dist/components/ui/swipeable-list.d.ts.map +0 -1
- package/dist/components/ui/swipeable-list.js +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KMP } from "./kmp";
|
|
2
|
-
import { FilterCategory } from "
|
|
2
|
+
import { FilterCategory } from "../../../components/libs/sort-filter/search-integration";
|
|
3
3
|
import { ReadonlyURLSearchParams } from "next/navigation";
|
|
4
4
|
import { Integration } from "app-studio-types";
|
|
5
5
|
export declare class CustomSearch extends KMP {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputProps } from "
|
|
1
|
+
import { InputProps } from "../../../components/ui/Input/types";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
4
4
|
export { Input };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { VariantProps } from "class-variance-authority";
|
|
3
|
-
import { inputVariants } from "
|
|
4
|
-
import { Color, TextStyle } from "
|
|
3
|
+
import { inputVariants } from "../../../components/ui/Input/useInput";
|
|
4
|
+
import { Color, TextStyle } from "../../../lib/utils";
|
|
5
5
|
export type BorderSides = ("all" | "bottom" | "left" | "right" | "top")[];
|
|
6
6
|
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange">, VariantProps<typeof inputVariants> {
|
|
7
7
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { InputProps } from "
|
|
2
|
+
import { InputProps } from "../../../components/ui/Input/types";
|
|
3
3
|
export declare const DEFAULT_ICON_SIZE = 20;
|
|
4
4
|
export declare const DEFAULT_X_PADDING = 12;
|
|
5
5
|
export declare const DEFAULT_Y_PADDING = 8;
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import AppStudioCache from "./AppStudioCache";
|
|
2
|
-
type CartCache = {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
};
|
|
5
|
-
export default class CartLocalStorage extends AppStudioCache {
|
|
6
|
-
adapter: string;
|
|
7
|
-
cachePrefix: string;
|
|
8
|
-
getCacheKey(): string;
|
|
9
|
-
constructor();
|
|
10
|
-
getCache(): CartCache | null;
|
|
11
|
-
setCacheItem(cart: CartCache): CartCache | null;
|
|
12
|
-
clearCache(): void;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=CartLocalStorage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartLocalStorage.d.ts","sourceRoot":"","sources":["../../../../components/libs/cache/CartLocalStorage.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAE7C,KAAK,SAAS,GAAG;IAEf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB,CAAA;AAED,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAc;IAC1D,OAAO,EAAE,MAAM,CAAuB;IACtC,WAAW,EAAE,MAAM,CAAY;IAE/B,WAAW;;IASX,QAAQ,IAAI,SAAS,GAAG,IAAI;IAa5B,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IAM/C,UAAU;CAGX"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import AppStudioCache from "./AppStudioCache";
|
|
2
|
-
export default class CartLocalStorage extends AppStudioCache {
|
|
3
|
-
getCacheKey() {
|
|
4
|
-
return `${this.cachePrefix}`;
|
|
5
|
-
}
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.adapter = "local-storage-cart";
|
|
9
|
-
this.cachePrefix = "as-cart";
|
|
10
|
-
console.log(this.adapter, this.cachePrefix);
|
|
11
|
-
}
|
|
12
|
-
getCache() {
|
|
13
|
-
const value = localStorage.getItem(this.getCacheKey());
|
|
14
|
-
try {
|
|
15
|
-
if (value) {
|
|
16
|
-
const parsedValue = JSON.parse(value);
|
|
17
|
-
return parsedValue;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
// ignore invalid JSON error and return null
|
|
22
|
-
}
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
setCacheItem(cart) {
|
|
26
|
-
if (!cart)
|
|
27
|
-
return this.getCache();
|
|
28
|
-
localStorage.setItem(this.getCacheKey(), JSON.stringify(cart));
|
|
29
|
-
return cart;
|
|
30
|
-
}
|
|
31
|
-
clearCache() {
|
|
32
|
-
localStorage.removeItem(this.getCacheKey());
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/libs/cache/index.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { LeadingActions, SwipeableList, SwipeableListItem, SwipeAction, TrailingActions, Type as ListType } from "react-swipeable-list";
|
|
2
|
-
import "react-swipeable-list/dist/styles.css";
|
|
3
|
-
export { LeadingActions, SwipeableList, SwipeableListItem, SwipeAction, TrailingActions, ListType, };
|
|
4
|
-
//# sourceMappingURL=swipeable-list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"swipeable-list.d.ts","sourceRoot":"","sources":["../../../components/ui/swipeable-list.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,IAAI,IAAI,QAAQ,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,sCAAsC,CAAA;AAE7C,OAAO,EACL,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,QAAQ,GACT,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { LeadingActions, SwipeableList, SwipeableListItem, SwipeAction, TrailingActions, Type as ListType, } from "react-swipeable-list";
|
|
3
|
-
import "react-swipeable-list/dist/styles.css";
|
|
4
|
-
export { LeadingActions, SwipeableList, SwipeableListItem, SwipeAction, TrailingActions, ListType, };
|