@vendure/dashboard 3.7.4-master-202609060211 → 3.7.4-master-202609090211

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.
@@ -1,5 +1,5 @@
1
- import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, b as ParentPanel, C as ContentView, Q as QueryDevtoolsContext } from "./AP7HFJJL-BJdLqnVW.js";
2
- import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./main-9UGYMBwq.js";
1
+ import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, b as ParentPanel, C as ContentView, Q as QueryDevtoolsContext } from "./AP7HFJJL-C5T1-SoG.js";
2
+ import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./main-BnHyVdxB.js";
3
3
  var DevtoolsPanelComponent = (props) => {
4
4
  const [localStore, setLocalStore] = createLocalStorage({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,4 +1,4 @@
1
- import { b as createContext, d as createSignal, o as onMount, e as createEffect, c as createMemo, a as createComponent, P as Portal, m as memo, S as Show, t as template, i as insert, f as createRenderEffect, h as className, j as clearDelegatedEvents, k as delegateEvents, u as useContext, l as onCleanup, s as sortFns, n as mutationSortFns, p as on, q as setAttribute, r as getSidedProp, v as use, w as convertRemToPixels, x as createUniqueId, y as batch, z as getQueryStatusLabel, A as getMutationStatusColor, B as getQueryStatusColor, C as getQueryStatusColorByLabel, D as displayValue, F as For, E as untrack, $ as $TRACK, G as useTransition, H as spread, I as mergeProps, J as createRoot, K as serialize, L as Index, M as updateNestedDataByPath, N as addEventListener, O as stringify, Q as Match, R as Switch, T as deleteNestedDataByPath, U as splitProps, V as Dynamic, W as createComputed } from "./main-9UGYMBwq.js";
1
+ import { b as createContext, d as createSignal, o as onMount, e as createEffect, c as createMemo, a as createComponent, P as Portal, m as memo, S as Show, t as template, i as insert, f as createRenderEffect, h as className, j as clearDelegatedEvents, k as delegateEvents, u as useContext, l as onCleanup, s as sortFns, n as mutationSortFns, p as on, q as setAttribute, r as getSidedProp, v as use, w as convertRemToPixels, x as createUniqueId, y as batch, z as getQueryStatusLabel, A as getMutationStatusColor, B as getQueryStatusColor, C as getQueryStatusColorByLabel, D as displayValue, F as For, E as untrack, $ as $TRACK, G as useTransition, H as spread, I as mergeProps, J as createRoot, K as serialize, L as Index, M as updateNestedDataByPath, N as addEventListener, O as stringify, Q as Match, R as Switch, T as deleteNestedDataByPath, U as splitProps, V as Dynamic, W as createComputed } from "./main-BnHyVdxB.js";
2
2
  var isNonNullable = (i2) => i2 != null;
3
3
  var filterNonNullable = (arr) => arr.filter(isNonNullable);
4
4
  function chain(callbacks) {
@@ -1,5 +1,5 @@
1
- import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./AP7HFJJL-BJdLqnVW.js";
2
- import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./main-9UGYMBwq.js";
1
+ import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./AP7HFJJL-C5T1-SoG.js";
2
+ import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./main-BnHyVdxB.js";
3
3
  var DevtoolsComponent = (props) => {
4
4
  const [localStore, setLocalStore] = createLocalStorage({
5
5
  prefix: "TanstackQueryDevtools"
@@ -2934,7 +2934,7 @@ var TanstackQueryDevtools = class {
2934
2934
  if (this.#Component) {
2935
2935
  Devtools = this.#Component;
2936
2936
  } else {
2937
- Devtools = lazy(() => import("./WDYDFRGG-CplI2xmz.js"));
2937
+ Devtools = lazy(() => import("./WDYDFRGG-B7YN1qB0.js"));
2938
2938
  this.#Component = Devtools;
2939
2939
  }
2940
2940
  setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
@@ -3072,7 +3072,7 @@ var TanstackQueryDevtoolsPanel = class {
3072
3072
  if (this.#Component) {
3073
3073
  Devtools = this.#Component;
3074
3074
  } else {
3075
- Devtools = lazy(() => import("./2SSKDMRQ-rQCpZsiI.js"));
3075
+ Devtools = lazy(() => import("./2SSKDMRQ-B1rA10ds.js"));
3076
3076
  this.#Component = Devtools;
3077
3077
  }
3078
3078
  setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
@@ -7012,20 +7012,16 @@ function PromotionListPage() {
7012
7012
  endsAt: true
7013
7013
  }, onSearchTermChange: (searchTerm) => {
7014
7014
  return searchTerm ? {
7015
- name: {
7016
- contains: searchTerm
7017
- },
7018
- couponCode: {
7019
- contains: searchTerm
7020
- }
7015
+ _or: [{
7016
+ name: {
7017
+ contains: searchTerm
7018
+ }
7019
+ }, {
7020
+ couponCode: {
7021
+ contains: searchTerm
7022
+ }
7023
+ }]
7021
7024
  } : {};
7022
- }, transformVariables: (variables) => {
7023
- return {
7024
- options: {
7025
- ...variables.options,
7026
- filterOperator: "OR"
7027
- }
7028
- };
7029
7025
  }, customizeColumns: {
7030
7026
  name: {
7031
7027
  cell: ({
@@ -7834,15 +7830,19 @@ function ProductListPage$1() {
7834
7830
  }
7835
7831
  }, onSearchTermChange: (searchTerm) => {
7836
7832
  return searchTerm ? {
7837
- name: {
7838
- contains: searchTerm
7839
- },
7840
- slug: {
7841
- contains: searchTerm
7842
- },
7843
- sku: {
7844
- contains: searchTerm
7845
- }
7833
+ _or: [{
7834
+ name: {
7835
+ contains: searchTerm
7836
+ }
7837
+ }, {
7838
+ slug: {
7839
+ contains: searchTerm
7840
+ }
7841
+ }, {
7842
+ sku: {
7843
+ contains: searchTerm
7844
+ }
7845
+ }]
7846
7846
  } : {};
7847
7847
  }, additionalColumns: {
7848
7848
  facetValueId: {
@@ -7862,13 +7862,6 @@ function ProductListPage$1() {
7862
7862
  ),
7863
7863
  component: FacetValueFacetedFilter
7864
7864
  }
7865
- }, transformVariables: (variables) => {
7866
- return {
7867
- options: {
7868
- ...variables.options,
7869
- filterOperator: "OR"
7870
- }
7871
- };
7872
7865
  }, defaultSort: [{
7873
7866
  id: "updatedAt",
7874
7867
  desc: true
@@ -8252,20 +8245,16 @@ function ProductListPage() {
8252
8245
  }
8253
8246
  }, onSearchTermChange: (searchTerm) => {
8254
8247
  return searchTerm ? {
8255
- name: {
8256
- contains: searchTerm
8257
- },
8258
- sku: {
8259
- contains: searchTerm
8260
- }
8248
+ _or: [{
8249
+ name: {
8250
+ contains: searchTerm
8251
+ }
8252
+ }, {
8253
+ sku: {
8254
+ contains: searchTerm
8255
+ }
8256
+ }]
8261
8257
  } : {};
8262
- }, transformVariables: (variables) => {
8263
- return {
8264
- options: {
8265
- ...variables.options,
8266
- filterOperator: "OR"
8267
- }
8268
- };
8269
8258
  }, route: Route$F });
8270
8259
  }
8271
8260
  const paymentMethodItemFragment = graphql(`
@@ -10340,23 +10329,20 @@ function CustomerListPage() {
10340
10329
  id: "NihQNk"
10341
10330
  } }), pageId: "customer-list", listQuery: customerListDocument, onSearchTermChange: (searchTerm) => {
10342
10331
  return searchTerm ? {
10343
- lastName: {
10344
- contains: searchTerm
10345
- },
10346
- emailAddress: {
10347
- contains: searchTerm
10348
- },
10349
- phoneNumber: {
10350
- contains: searchTerm
10351
- }
10332
+ _or: [{
10333
+ lastName: {
10334
+ contains: searchTerm
10335
+ }
10336
+ }, {
10337
+ emailAddress: {
10338
+ contains: searchTerm
10339
+ }
10340
+ }, {
10341
+ phoneNumber: {
10342
+ contains: searchTerm
10343
+ }
10344
+ }]
10352
10345
  } : {};
10353
- }, transformVariables: (variables) => {
10354
- return {
10355
- options: {
10356
- ...variables.options,
10357
- filterOperator: "OR"
10358
- }
10359
- };
10360
10346
  }, route: Route$z, customizeColumns: {
10361
10347
  user: {
10362
10348
  header: () => /* @__PURE__ */ jsx(Trans, { .../*i18n*/
@@ -10610,12 +10596,15 @@ function CustomerGroupMembersTable({
10610
10596
  setFilters(filters2);
10611
10597
  }, onSearchTermChange: (searchTerm) => {
10612
10598
  return {
10613
- lastName: {
10614
- contains: searchTerm
10615
- },
10616
- emailAddress: {
10617
- contains: searchTerm
10618
- }
10599
+ _or: [{
10600
+ lastName: {
10601
+ contains: searchTerm
10602
+ }
10603
+ }, {
10604
+ emailAddress: {
10605
+ contains: searchTerm
10606
+ }
10607
+ }]
10619
10608
  };
10620
10609
  }, additionalColumns: {
10621
10610
  name: {
@@ -10829,21 +10818,16 @@ function CountryListPage() {
10829
10818
  enabled: true
10830
10819
  }, onSearchTermChange: (searchTerm) => {
10831
10820
  return searchTerm ? {
10832
- name: {
10833
- contains: searchTerm
10834
- },
10835
- code: {
10836
- contains: searchTerm
10837
- }
10821
+ _or: [{
10822
+ name: {
10823
+ contains: searchTerm
10824
+ }
10825
+ }, {
10826
+ code: {
10827
+ contains: searchTerm
10828
+ }
10829
+ }]
10838
10830
  } : {};
10839
- }, transformVariables: (variables) => {
10840
- return {
10841
- ...variables,
10842
- options: {
10843
- ...variables.options,
10844
- filterOperator: "OR"
10845
- }
10846
- };
10847
10831
  }, customizeColumns: {
10848
10832
  name: {
10849
10833
  cell: ({
@@ -12452,23 +12436,20 @@ function AdministratorListPage() {
12452
12436
  id: "3zE1mx"
12453
12437
  } }), listQuery: administratorListDocument, route: Route$s, onSearchTermChange: (searchTerm) => {
12454
12438
  return searchTerm ? {
12455
- firstName: {
12456
- contains: searchTerm
12457
- },
12458
- lastName: {
12459
- contains: searchTerm
12460
- },
12461
- emailAddress: {
12462
- contains: searchTerm
12463
- }
12439
+ _or: [{
12440
+ firstName: {
12441
+ contains: searchTerm
12442
+ }
12443
+ }, {
12444
+ lastName: {
12445
+ contains: searchTerm
12446
+ }
12447
+ }, {
12448
+ emailAddress: {
12449
+ contains: searchTerm
12450
+ }
12451
+ }]
12464
12452
  } : {};
12465
- }, transformVariables: (variables) => {
12466
- return {
12467
- options: {
12468
- ...variables.options,
12469
- filterOperator: "OR"
12470
- }
12471
- };
12472
12453
  }, additionalColumns: {
12473
12454
  name: {
12474
12455
  meta: {
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "./chunks/use-job-queue-polling-BrMR-IHJ.js";
3
3
  import "sonner";
4
- import "./chunks/main-9UGYMBwq.js";
4
+ import "./chunks/main-BnHyVdxB.js";
5
5
  import "@tanstack/react-router";
6
6
  import "react";
7
7
  import "react-dom";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vendure/dashboard",
3
3
  "private": false,
4
- "version": "3.7.4-master-202609060211",
4
+ "version": "3.7.4-master-202609090211",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -140,8 +140,8 @@
140
140
  "@storybook/addon-vitest": "^10.3.1",
141
141
  "@storybook/react-vite": "^10.3.1",
142
142
  "@types/node": "^22.19.0",
143
- "@vendure/common": "^3.7.4-master-202609060211",
144
- "@vendure/core": "^3.7.4-master-202609060211",
143
+ "@vendure/common": "^3.7.4-master-202609090211",
144
+ "@vendure/core": "^3.7.4-master-202609090211",
145
145
  "@vitest/browser": "^3.2.4",
146
146
  "@vitest/coverage-v8": "^3.2.4",
147
147
  "eslint": "^9.39.0",
@@ -25,20 +25,14 @@ function AdministratorListPage() {
25
25
  onSearchTermChange={searchTerm => {
26
26
  return searchTerm
27
27
  ? {
28
- firstName: { contains: searchTerm },
29
- lastName: { contains: searchTerm },
30
- emailAddress: { contains: searchTerm },
28
+ _or: [
29
+ { firstName: { contains: searchTerm } },
30
+ { lastName: { contains: searchTerm } },
31
+ { emailAddress: { contains: searchTerm } },
32
+ ],
31
33
  }
32
34
  : {};
33
35
  }}
34
- transformVariables={variables => {
35
- return {
36
- options: {
37
- ...variables.options,
38
- filterOperator: 'OR',
39
- },
40
- };
41
- }}
42
36
  additionalColumns={{
43
37
  name: {
44
38
  meta: { dependencies: ['id', 'firstName', 'lastName'] },
@@ -28,20 +28,10 @@ function CountryListPage() {
28
28
  onSearchTermChange={searchTerm => {
29
29
  return searchTerm
30
30
  ? {
31
- name: { contains: searchTerm },
32
- code: { contains: searchTerm },
31
+ _or: [{ name: { contains: searchTerm } }, { code: { contains: searchTerm } }],
33
32
  }
34
33
  : {};
35
34
  }}
36
- transformVariables={variables => {
37
- return {
38
- ...variables,
39
- options: {
40
- ...variables.options,
41
- filterOperator: 'OR',
42
- },
43
- };
44
- }}
45
35
  customizeColumns={{
46
36
  name: {
47
37
  cell: ({ row }) => <DetailPageButton id={row.original.id} label={row.original.name} />,
@@ -93,12 +93,10 @@ export function CustomerGroupMembersTable({
93
93
  }}
94
94
  onSearchTermChange={searchTerm => {
95
95
  return {
96
- lastName: {
97
- contains: searchTerm,
98
- },
99
- emailAddress: {
100
- contains: searchTerm,
101
- },
96
+ _or: [
97
+ { lastName: { contains: searchTerm } },
98
+ { emailAddress: { contains: searchTerm } },
99
+ ],
102
100
  };
103
101
  }}
104
102
  additionalColumns={{
@@ -24,20 +24,14 @@ function CustomerListPage() {
24
24
  onSearchTermChange={searchTerm => {
25
25
  return searchTerm
26
26
  ? {
27
- lastName: { contains: searchTerm },
28
- emailAddress: { contains: searchTerm },
29
- phoneNumber: { contains: searchTerm },
27
+ _or: [
28
+ { lastName: { contains: searchTerm } },
29
+ { emailAddress: { contains: searchTerm } },
30
+ { phoneNumber: { contains: searchTerm } },
31
+ ],
30
32
  }
31
33
  : {};
32
34
  }}
33
- transformVariables={variables => {
34
- return {
35
- options: {
36
- ...variables.options,
37
- filterOperator: 'OR',
38
- },
39
- };
40
- }}
41
35
  route={Route}
42
36
  customizeColumns={{
43
37
  user: {
@@ -88,19 +88,10 @@ function ProductListPage() {
88
88
  onSearchTermChange={searchTerm => {
89
89
  return searchTerm
90
90
  ? {
91
- name: { contains: searchTerm },
92
- sku: { contains: searchTerm },
91
+ _or: [{ name: { contains: searchTerm } }, { sku: { contains: searchTerm } }],
93
92
  }
94
93
  : {};
95
94
  }}
96
- transformVariables={variables => {
97
- return {
98
- options: {
99
- ...variables.options,
100
- filterOperator: 'OR',
101
- },
102
- };
103
- }}
104
95
  route={Route}
105
96
  ></ListPage>
106
97
  );
@@ -56,9 +56,11 @@ function ProductListPage() {
56
56
  onSearchTermChange={searchTerm => {
57
57
  return searchTerm
58
58
  ? {
59
- name: { contains: searchTerm },
60
- slug: { contains: searchTerm },
61
- sku: { contains: searchTerm },
59
+ _or: [
60
+ { name: { contains: searchTerm } },
61
+ { slug: { contains: searchTerm } },
62
+ { sku: { contains: searchTerm } },
63
+ ],
62
64
  }
63
65
  : {};
64
66
  }}
@@ -77,14 +79,6 @@ function ProductListPage() {
77
79
  component: FacetValueFacetedFilter,
78
80
  },
79
81
  }}
80
- transformVariables={variables => {
81
- return {
82
- options: {
83
- ...variables.options,
84
- filterOperator: 'OR',
85
- },
86
- };
87
- }}
88
82
  defaultSort={[{ id: 'updatedAt', desc: true }]}
89
83
  defaultVisibility={{
90
84
  name: true,
@@ -38,19 +38,10 @@ function PromotionListPage() {
38
38
  onSearchTermChange={searchTerm => {
39
39
  return searchTerm
40
40
  ? {
41
- name: { contains: searchTerm },
42
- couponCode: { contains: searchTerm },
41
+ _or: [{ name: { contains: searchTerm } }, { couponCode: { contains: searchTerm } }],
43
42
  }
44
43
  : {};
45
44
  }}
46
- transformVariables={variables => {
47
- return {
48
- options: {
49
- ...variables.options,
50
- filterOperator: 'OR' as const,
51
- },
52
- };
53
- }}
54
45
  customizeColumns={{
55
46
  name: {
56
47
  cell: ({ row }) => <DetailPageButton id={row.original.id} label={row.original.name} />,
@@ -148,21 +148,7 @@ export const WithSearch: Story = {
148
148
  },
149
149
  onSearchTermChange: (searchTerm: string) => {
150
150
  return {
151
- name: {
152
- contains: searchTerm,
153
- },
154
- code: {
155
- contains: searchTerm,
156
- },
157
- };
158
- },
159
- transformVariables: (variables: any) => {
160
- return {
161
- ...variables,
162
- options: {
163
- ...variables.options,
164
- filterOperator: 'OR',
165
- },
151
+ _or: [{ name: { contains: searchTerm } }, { code: { contains: searchTerm } }],
166
152
  };
167
153
  },
168
154
  customizeColumns: {
@@ -222,21 +208,7 @@ export const Complete: Story = {
222
208
  },
223
209
  onSearchTermChange: (searchTerm: string) => {
224
210
  return {
225
- name: {
226
- contains: searchTerm,
227
- },
228
- code: {
229
- contains: searchTerm,
230
- },
231
- };
232
- },
233
- transformVariables: (variables: any) => {
234
- return {
235
- ...variables,
236
- options: {
237
- ...variables.options,
238
- filterOperator: 'OR',
239
- },
211
+ _or: [{ name: { contains: searchTerm } }, { code: { contains: searchTerm } }],
240
212
  };
241
213
  },
242
214
  customizeColumns: {
@@ -140,6 +140,11 @@ export interface ListPageProps<
140
140
  * Allows you to customize how the search term is used in the list query options.
141
141
  * For instance, when you want the term to filter on specific fields.
142
142
  *
143
+ * The returned filter is merged with the column & faceted filters, so when the term should
144
+ * match any of several fields, group those fields in an `_or` block. Setting a page-level
145
+ * `filterOperator: 'OR'` would instead OR together _every_ top-level condition, including
146
+ * the column filters.
147
+ *
143
148
  * @example
144
149
  * ```tsx
145
150
  * <ListPage
@@ -148,9 +153,11 @@ export interface ListPageProps<
148
153
  * listQuery={administratorListDocument}
149
154
  * onSearchTermChange={searchTerm => {
150
155
  * return {
151
- * firstName: { contains: searchTerm },
152
- * lastName: { contains: searchTerm },
153
- * emailAddress: { contains: searchTerm },
156
+ * _or: [
157
+ * { firstName: { contains: searchTerm } },
158
+ * { lastName: { contains: searchTerm } },
159
+ * { emailAddress: { contains: searchTerm } },
160
+ * ],
154
161
  * };
155
162
  * }}
156
163
  * />