@grafikr/shopify-typescript 1.0.3 → 1.1.0
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/global/Shopify.ts
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
import ProductJSON from '../type/Product';
|
|
2
2
|
import ProductObject from '../type/object/Product';
|
|
3
|
+
import Image from './modules/Image';
|
|
4
|
+
import CustomerPrivacy from './modules/customerPrivacy';
|
|
3
5
|
|
|
4
6
|
export default interface Shopify {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
7
|
+
CountryProvinceSelector?: (country_domid: string, province_domid: string, options?: {
|
|
8
|
+
hideElement: string
|
|
9
|
+
}) => void
|
|
10
|
+
postLink?: (path: string, options?: {
|
|
11
|
+
method?: string
|
|
12
|
+
parameters?: object
|
|
13
|
+
}) => void
|
|
14
|
+
addListener?: (target: HTMLElement, eventName: string, callback: CallableFunction) => void
|
|
15
|
+
setSelectorByValue?: (selector: HTMLSelectElement, value: any) => number
|
|
16
|
+
Image?: Image
|
|
17
|
+
OptionSelectors?: (selector: string, config: {
|
|
13
18
|
product: ProductJSON | ProductObject
|
|
14
19
|
onVariantSelected: CallableFunction
|
|
15
|
-
enableHistoryState
|
|
20
|
+
enableHistoryState?: boolean
|
|
16
21
|
}) => void
|
|
17
|
-
OptionSelectorsFromDOM
|
|
22
|
+
OptionSelectorsFromDOM?: FunctionConstructor
|
|
18
23
|
loadFeatures: (features: any[], callback: CallableFunction) => void
|
|
19
|
-
customerPrivacy?:
|
|
24
|
+
customerPrivacy?: CustomerPrivacy
|
|
20
25
|
currency: {
|
|
21
26
|
active: string
|
|
22
27
|
rate: string
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default interface CustomerPrivacy {
|
|
2
|
+
getCCPAConsent(): string
|
|
3
|
+
getRegulation(): string
|
|
4
|
+
getShopPrefs(): {
|
|
5
|
+
limit: string[]
|
|
6
|
+
}
|
|
7
|
+
getTrackingConsent(): string
|
|
8
|
+
isRegulationEnforced(): boolean
|
|
9
|
+
setCCPAConsent(consented: boolean, callback: CallableFunction): void
|
|
10
|
+
setTrackingConsent(consented: boolean, callback: CallableFunction): void
|
|
11
|
+
shouldShowCCPABanner(): boolean
|
|
12
|
+
shouldShowGDPRBanner(): boolean
|
|
13
|
+
userCanBeTracked(): boolean
|
|
14
|
+
userDataCanBeSold(): boolean
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafikr/shopify-typescript",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "node_modules/.bin/eslint . --ext .js,.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@typescript-eslint/parser": "^5.0.0",
|
|
12
12
|
"eslint": "^8.4.0",
|
|
13
13
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
14
|
-
"eslint-config-airbnb-typescript": "^
|
|
14
|
+
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
15
15
|
"eslint-plugin-import": "^2.0.0",
|
|
16
16
|
"typescript": "^4.0.0"
|
|
17
17
|
},
|
package/type/object/Variant.ts
CHANGED
package/type/search/Article.ts
CHANGED