@grafikr/shopify-typescript 1.0.1 → 1.0.4

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
@@ -2,6 +2,15 @@ import ProductJSON from '../type/Product';
2
2
  import ProductObject from '../type/object/Product';
3
3
 
4
4
  export default interface Shopify {
5
+ CountryProvinceSelector: (country_domid: string, province_domid: string, options?: {
6
+ hideElement: string
7
+ }) => void
8
+ postLink: (path: string, options?: {
9
+ method?: string
10
+ parameters?: object
11
+ }) => void
12
+ addListener: (target: HTMLElement, eventName: string, callback: CallableFunction) => void
13
+ setSelectorByValue: (selector: HTMLSelectElement, value: any) => number
5
14
  Image: {
6
15
  switchImage: CallableFunction
7
16
  getSizedImageUrl: (src: string, size: string) => string
@@ -12,7 +21,7 @@ export default interface Shopify {
12
21
  OptionSelectors: (selector: string, config: {
13
22
  product: ProductJSON | ProductObject
14
23
  onVariantSelected: CallableFunction
15
- enableHistoryState: boolean
24
+ enableHistoryState?: boolean
16
25
  }) => void
17
26
  OptionSelectorsFromDOM: FunctionConstructor
18
27
  loadFeatures: (features: any[], callback: CallableFunction) => void
@@ -27,4 +36,5 @@ export default interface Shopify {
27
36
  formatMoney: (price: string | number, format: string) => string
28
37
  money_format: string
29
38
  shop: string
39
+ designMode: true | undefined
30
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafikr/shopify-typescript",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "lint": "node_modules/.bin/eslint . --ext .js,.ts",
@@ -9,9 +9,9 @@
9
9
  "devDependencies": {
10
10
  "@typescript-eslint/eslint-plugin": "^5.0.0",
11
11
  "@typescript-eslint/parser": "^5.0.0",
12
- "eslint": "^7.0.0",
13
- "eslint-config-airbnb-base": "^14.0.0",
14
- "eslint-config-airbnb-typescript": "^14.0.0",
12
+ "eslint": "^8.4.0",
13
+ "eslint-config-airbnb-base": "^15.0.0",
14
+ "eslint-config-airbnb-typescript": "^16.1.0",
15
15
  "eslint-plugin-import": "^2.0.0",
16
16
  "typescript": "^4.0.0"
17
17
  },
package/type/LineItem.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export default interface Item {
2
2
  id: number
3
- properties: { [key: string]: string | boolean } | null
3
+ properties: { [key: string]: any } | null
4
4
  quantity: number
5
5
  variant_id: number
6
6
  key: string