@vendure/admin-ui 2.1.4 → 2.2.0-next.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.
Files changed (36) hide show
  1. package/catalog/components/product-list/product-list.component.d.ts +1 -1
  2. package/catalog/components/product-variant-list/product-variant-list.component.d.ts +1 -1
  3. package/core/common/utilities/custom-field-default-value.d.ts +1 -1
  4. package/core/common/version.d.ts +1 -1
  5. package/core/components/app-shell/app-shell.component.d.ts +1 -0
  6. package/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.d.ts +9 -3
  7. package/core/core.module.d.ts +1 -1
  8. package/core/providers/i18n/i18n.service.d.ts +6 -0
  9. package/core/shared/components/order-state-label/order-state-label.component.d.ts +1 -1
  10. package/core/shared/dynamic-form-inputs/default-form-inputs.d.ts +1 -1
  11. package/esm2022/core/common/utilities/configurable-operation-utils.mjs +1 -1
  12. package/esm2022/core/common/version.mjs +2 -2
  13. package/esm2022/core/components/app-shell/app-shell.component.mjs +15 -10
  14. package/esm2022/core/components/ui-language-switcher-dialog/ui-language-switcher-dialog.component.mjs +42 -273
  15. package/esm2022/core/core.module.mjs +13 -5
  16. package/esm2022/core/providers/i18n/i18n.service.mjs +11 -1
  17. package/esm2022/core/providers/localization/localization.service.mjs +4 -4
  18. package/esm2022/core/shared/components/asset-preview/asset-preview.component.mjs +3 -3
  19. package/esm2022/core/shared/components/configurable-input/configurable-input.component.mjs +1 -1
  20. package/esm2022/core/shared/components/datetime-picker/datetime-picker.service.mjs +1 -1
  21. package/esm2022/marketing/components/promotion-detail/promotion-detail.component.mjs +8 -8
  22. package/esm2022/react/react-hooks/use-query.mjs +61 -1
  23. package/esm2022/settings/components/payment-method-detail/payment-method-detail.component.mjs +8 -8
  24. package/fesm2022/vendure-admin-ui-core.mjs +66 -276
  25. package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
  26. package/fesm2022/vendure-admin-ui-marketing.mjs +7 -7
  27. package/fesm2022/vendure-admin-ui-marketing.mjs.map +1 -1
  28. package/fesm2022/vendure-admin-ui-react.mjs +61 -1
  29. package/fesm2022/vendure-admin-ui-react.mjs.map +1 -1
  30. package/fesm2022/vendure-admin-ui-settings.mjs +7 -7
  31. package/fesm2022/vendure-admin-ui-settings.mjs.map +1 -1
  32. package/package.json +14 -14
  33. package/react/react-hooks/use-query.d.ts +59 -0
  34. package/settings/components/stock-location-list/stock-location-list.component.d.ts +1 -1
  35. package/static/i18n-messages/fa.json +1 -1
  36. package/static/vendure-ui-config.json +260 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendure/admin-ui",
3
- "version": "2.1.4",
3
+ "version": "2.2.0-next.0",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "@angular/animations": "^16.2.2",
@@ -23,7 +23,7 @@
23
23
  "@ng-select/ng-select": "^11.1.1",
24
24
  "@ngx-translate/core": "^15.0.0",
25
25
  "@ngx-translate/http-loader": "^8.0.0",
26
- "@vendure/common": "^2.1.4",
26
+ "@vendure/common": "2.2.0-next.0",
27
27
  "@webcomponents/custom-elements": "^1.6.0",
28
28
  "apollo-angular": "^5.0.0",
29
29
  "apollo-upload-client": "^17.0.0",
@@ -77,12 +77,6 @@
77
77
  "esm": "./esm2022/core/vendure-admin-ui-core.mjs",
78
78
  "default": "./fesm2022/vendure-admin-ui-core.mjs"
79
79
  },
80
- "./dashboard": {
81
- "types": "./dashboard/index.d.ts",
82
- "esm2022": "./esm2022/dashboard/vendure-admin-ui-dashboard.mjs",
83
- "esm": "./esm2022/dashboard/vendure-admin-ui-dashboard.mjs",
84
- "default": "./fesm2022/vendure-admin-ui-dashboard.mjs"
85
- },
86
80
  "./customer": {
87
81
  "types": "./customer/index.d.ts",
88
82
  "esm2022": "./esm2022/customer/vendure-admin-ui-customer.mjs",
@@ -101,24 +95,30 @@
101
95
  "esm": "./esm2022/login/vendure-admin-ui-login.mjs",
102
96
  "default": "./fesm2022/vendure-admin-ui-login.mjs"
103
97
  },
98
+ "./dashboard": {
99
+ "types": "./dashboard/index.d.ts",
100
+ "esm2022": "./esm2022/dashboard/vendure-admin-ui-dashboard.mjs",
101
+ "esm": "./esm2022/dashboard/vendure-admin-ui-dashboard.mjs",
102
+ "default": "./fesm2022/vendure-admin-ui-dashboard.mjs"
103
+ },
104
104
  "./order": {
105
105
  "types": "./order/index.d.ts",
106
106
  "esm2022": "./esm2022/order/vendure-admin-ui-order.mjs",
107
107
  "esm": "./esm2022/order/vendure-admin-ui-order.mjs",
108
108
  "default": "./fesm2022/vendure-admin-ui-order.mjs"
109
109
  },
110
- "./react": {
111
- "types": "./react/index.d.ts",
112
- "esm2022": "./esm2022/react/vendure-admin-ui-react.mjs",
113
- "esm": "./esm2022/react/vendure-admin-ui-react.mjs",
114
- "default": "./fesm2022/vendure-admin-ui-react.mjs"
115
- },
116
110
  "./settings": {
117
111
  "types": "./settings/index.d.ts",
118
112
  "esm2022": "./esm2022/settings/vendure-admin-ui-settings.mjs",
119
113
  "esm": "./esm2022/settings/vendure-admin-ui-settings.mjs",
120
114
  "default": "./fesm2022/vendure-admin-ui-settings.mjs"
121
115
  },
116
+ "./react": {
117
+ "types": "./react/index.d.ts",
118
+ "esm2022": "./esm2022/react/vendure-admin-ui-react.mjs",
119
+ "esm": "./esm2022/react/vendure-admin-ui-react.mjs",
120
+ "default": "./fesm2022/vendure-admin-ui-react.mjs"
121
+ },
122
122
  "./system": {
123
123
  "types": "./system/index.d.ts",
124
124
  "esm2022": "./esm2022/system/vendure-admin-ui-system.mjs",
@@ -42,6 +42,65 @@ export declare function useQuery<T, V extends Record<string, any> = Record<strin
42
42
  readonly error: string | undefined;
43
43
  readonly refetch: (variables?: V) => Promise<T>;
44
44
  };
45
+ /**
46
+ * @description
47
+ * A React hook which allows you to execute a GraphQL query.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * import { useLazyQuery } from '\@vendure/admin-ui/react';
52
+ * import { gql } from 'graphql-tag';
53
+ *
54
+ * const GET_PRODUCT = gql`
55
+ * query GetProduct($id: ID!) {
56
+ * product(id: $id) {
57
+ * id
58
+ * name
59
+ * description
60
+ * }
61
+ * }`;
62
+ * type ProductResponse = {
63
+ * product: {
64
+ * name: string
65
+ * description: string
66
+ * }
67
+ * }
68
+ *
69
+ * export const MyComponent = () => {
70
+ * const [getProduct, { data, loading, error }] = useLazyQuery<ProductResponse>(GET_PRODUCT);
71
+ *
72
+ * const handleClick = () => {
73
+ * getProduct({
74
+ * id: '1',
75
+ * }).then(result => {
76
+ * // do something with the result
77
+ * });
78
+ * };
79
+ *
80
+ * if (loading) return <div>Loading...</div>;
81
+ * if (error) return <div>Error! { error }</div>;
82
+ *
83
+ * return (
84
+ * <div>
85
+ * <button onClick={handleClick}>Get product</button>
86
+ * {data && (
87
+ * <div>
88
+ * <h1>{data.product.name}</h1>
89
+ * <p>{data.product.description}</p>
90
+ * </div>)}
91
+ * </div>
92
+ * );
93
+ * };
94
+ * ```
95
+ *
96
+ * @since 2.2.0
97
+ * @docsCategory react-hooks
98
+ */
99
+ export declare function useLazyQuery<T, V extends Record<string, any> = Record<string, any>>(query: DocumentNode | TypedDocumentNode<T, V>): [(variables?: V) => Promise<T>, {
100
+ data: T | undefined;
101
+ loading: boolean;
102
+ error: string | undefined;
103
+ }];
45
104
  /**
46
105
  * @description
47
106
  * A React hook which allows you to execute a GraphQL mutation.
@@ -5,7 +5,7 @@ export declare const GET_STOCK_LOCATION_LIST: import("apollo-angular").TypedDocu
5
5
  export declare class StockLocationListComponent extends TypedBaseListComponent<typeof GetStockLocationListDocument, 'stockLocations'> implements OnInit {
6
6
  readonly customFields: import("@vendure/admin-ui/core").CustomFieldConfig[];
7
7
  readonly filters: import("@vendure/admin-ui/core").DataTableFilterCollection<import("@vendure/admin-ui/core").StockLocationFilterParameter>;
8
- readonly sorts: import("@vendure/admin-ui/core").DataTableSortCollection<import("@vendure/admin-ui/core").StockLocationSortParameter, ["name" | "description" | "id" | "createdAt" | "updatedAt"]>;
8
+ readonly sorts: import("@vendure/admin-ui/core").DataTableSortCollection<import("@vendure/admin-ui/core").StockLocationSortParameter, ["name" | "description" | "createdAt" | "id" | "updatedAt"]>;
9
9
  constructor();
10
10
  static ɵfac: i0.ɵɵFactoryDeclaration<StockLocationListComponent, never>;
11
11
  static ɵcmp: i0.ɵɵComponentDeclaration<StockLocationListComponent, "vdr-stock-location-list", never, {}, {}, never, never, false, never>;
@@ -174,7 +174,7 @@
174
174
  "stock-levels": "سطح انبار",
175
175
  "stock-location": "انبار",
176
176
  "stock-locations": "انبارها",
177
- "stock-on-hand": "انبار",
177
+ "stock-on-hand": "موجودی انبار",
178
178
  "tax-category": "دسته بندی مالیاتی",
179
179
  "taxes": "مالیات ها",
180
180
  "track-inventory": "فروش براساس موجودی انبار",
@@ -6,15 +6,16 @@
6
6
  "authTokenHeaderKey": "vendure-auth-token",
7
7
  "channelTokenKey": "vendure-token",
8
8
  "defaultLanguage": "en",
9
+ "defaultLocale": "US",
9
10
  "availableLanguages": [
10
11
  "he",
11
12
  "ar",
13
+ "de",
12
14
  "en",
13
15
  "es",
14
- "zh_Hant",
15
- "zh_Hans",
16
16
  "pl",
17
- "de",
17
+ "zh_Hans",
18
+ "zh_Hant",
18
19
  "pt_BR",
19
20
  "pt_PT",
20
21
  "cs",
@@ -26,8 +27,262 @@
26
27
  "ne",
27
28
  "hr"
28
29
  ],
30
+ "availableLocales": [
31
+ "AF",
32
+ "AL",
33
+ "DZ",
34
+ "AS",
35
+ "AD",
36
+ "AO",
37
+ "AI",
38
+ "AQ",
39
+ "AG",
40
+ "AR",
41
+ "AM",
42
+ "AW",
43
+ "AU",
44
+ "AT",
45
+ "AZ",
46
+ "BS",
47
+ "BH",
48
+ "BD",
49
+ "BB",
50
+ "BY",
51
+ "BE",
52
+ "BZ",
53
+ "BJ",
54
+ "BM",
55
+ "BT",
56
+ "BO",
57
+ "BQ",
58
+ "BA",
59
+ "BW",
60
+ "BV",
61
+ "BR",
62
+ "IO",
63
+ "BN",
64
+ "BG",
65
+ "BF",
66
+ "BI",
67
+ "CV",
68
+ "KH",
69
+ "CM",
70
+ "CA",
71
+ "KY",
72
+ "CF",
73
+ "TD",
74
+ "CL",
75
+ "CN",
76
+ "CX",
77
+ "CC",
78
+ "CO",
79
+ "KM",
80
+ "CD",
81
+ "CG",
82
+ "CK",
83
+ "CR",
84
+ "HR",
85
+ "CU",
86
+ "CW",
87
+ "CY",
88
+ "CZ",
89
+ "CI",
90
+ "DK",
91
+ "DJ",
92
+ "DM",
93
+ "DO",
94
+ "EC",
95
+ "EG",
96
+ "SV",
97
+ "GQ",
98
+ "ER",
99
+ "EE",
100
+ "SZ",
101
+ "ET",
102
+ "FK",
103
+ "FO",
104
+ "FJ",
105
+ "FI",
106
+ "FR",
107
+ "GF",
108
+ "PF",
109
+ "TF",
110
+ "GA",
111
+ "GM",
112
+ "GE",
113
+ "DE",
114
+ "GH",
115
+ "GI",
116
+ "GR",
117
+ "GL",
118
+ "GD",
119
+ "GP",
120
+ "GU",
121
+ "GT",
122
+ "GG",
123
+ "GN",
124
+ "GW",
125
+ "GY",
126
+ "HT",
127
+ "HM",
128
+ "VA",
129
+ "HN",
130
+ "HK",
131
+ "HU",
132
+ "IS",
133
+ "IN",
134
+ "ID",
135
+ "IR",
136
+ "IQ",
137
+ "IE",
138
+ "IM",
139
+ "IL",
140
+ "IT",
141
+ "JM",
142
+ "JP",
143
+ "JE",
144
+ "JO",
145
+ "KZ",
146
+ "KE",
147
+ "KI",
148
+ "KP",
149
+ "KR",
150
+ "KW",
151
+ "KG",
152
+ "LA",
153
+ "LV",
154
+ "LB",
155
+ "LS",
156
+ "LR",
157
+ "LY",
158
+ "LI",
159
+ "LT",
160
+ "LU",
161
+ "MO",
162
+ "MG",
163
+ "MW",
164
+ "MY",
165
+ "MV",
166
+ "ML",
167
+ "MT",
168
+ "MH",
169
+ "MQ",
170
+ "MR",
171
+ "MU",
172
+ "YT",
173
+ "MX",
174
+ "FM",
175
+ "MD",
176
+ "MC",
177
+ "MN",
178
+ "ME",
179
+ "MS",
180
+ "MA",
181
+ "MZ",
182
+ "MM",
183
+ "NA",
184
+ "NR",
185
+ "NP",
186
+ "NL",
187
+ "NC",
188
+ "NZ",
189
+ "NI",
190
+ "NE",
191
+ "NG",
192
+ "NU",
193
+ "NF",
194
+ "MK",
195
+ "MP",
196
+ "NO",
197
+ "OM",
198
+ "PK",
199
+ "PW",
200
+ "PS",
201
+ "PA",
202
+ "PG",
203
+ "PY",
204
+ "PE",
205
+ "PH",
206
+ "PN",
207
+ "PL",
208
+ "PT",
209
+ "PR",
210
+ "QA",
211
+ "RO",
212
+ "RU",
213
+ "RW",
214
+ "RE",
215
+ "BL",
216
+ "SH",
217
+ "KN",
218
+ "LC",
219
+ "MF",
220
+ "PM",
221
+ "VC",
222
+ "WS",
223
+ "SM",
224
+ "ST",
225
+ "SA",
226
+ "SN",
227
+ "RS",
228
+ "SC",
229
+ "SL",
230
+ "SG",
231
+ "SX",
232
+ "SK",
233
+ "SI",
234
+ "SB",
235
+ "SO",
236
+ "ZA",
237
+ "GS",
238
+ "SS",
239
+ "ES",
240
+ "LK",
241
+ "SD",
242
+ "SR",
243
+ "SJ",
244
+ "SE",
245
+ "CH",
246
+ "SY",
247
+ "TW",
248
+ "TJ",
249
+ "TZ",
250
+ "TH",
251
+ "TL",
252
+ "TG",
253
+ "TK",
254
+ "TO",
255
+ "TT",
256
+ "TN",
257
+ "TR",
258
+ "TM",
259
+ "TC",
260
+ "TV",
261
+ "UG",
262
+ "UA",
263
+ "AE",
264
+ "GB",
265
+ "UM",
266
+ "US",
267
+ "UY",
268
+ "UZ",
269
+ "VU",
270
+ "VE",
271
+ "VN",
272
+ "VG",
273
+ "VI",
274
+ "WF",
275
+ "EH",
276
+ "YE",
277
+ "ZM",
278
+ "ZW",
279
+ "AX"
280
+ ],
29
281
  "brand": "",
30
282
  "hideVendureBranding": false,
31
283
  "hideVersion": false,
32
- "cancellationReasons": ["order.cancel-reason-customer-request", "order.cancel-reason-not-available"]
33
- }
284
+ "cancellationReasons": [
285
+ "order.cancel-reason-customer-request",
286
+ "order.cancel-reason-not-available"
287
+ ]
288
+ }