@commercetools-frontend/experimental-components 7.2.0 → 7.2.2

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.
@@ -9078,11 +9078,11 @@ const RecurrentIntervalPicker = _ref => {
9078
9078
  formatMessage = _useIntl.formatMessage;
9079
9079
  const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
9080
9080
  const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
9081
- const skip = isReadOnly && !value;
9081
+ const skipFetch = isReadOnly && !value;
9082
9082
  const where = isReadOnly && value ? `id="${value}"` : undefined;
9083
9083
  const _useRecurrenceInterva = useRecurrenceIntervals({
9084
9084
  where,
9085
- skip
9085
+ skip: skipFetch
9086
9086
  }),
9087
9087
  recurrencePolicies = _useRecurrenceInterva.recurrencePolicies,
9088
9088
  loading = _useRecurrenceInterva.loading,
@@ -9107,7 +9107,7 @@ const RecurrentIntervalPicker = _ref => {
9107
9107
  }
9108
9108
  return mapped;
9109
9109
  }, [recurrencePolicies, selectedIsMissingInData, value, dataLocale, formatMessage, formatLocalizedFieldToString, loading]);
9110
- const noRecurrentIntervalsConfigured = !loading && recurrencePolicies.length === 0;
9110
+ const noRecurrentIntervalsConfigured = !loading && !skipFetch && recurrencePolicies.length === 0;
9111
9111
  React.useEffect(() => {
9112
9112
  if (error && onError) {
9113
9113
  onError(error);
@@ -9133,7 +9133,7 @@ const RecurrentIntervalPicker = _ref => {
9133
9133
  }) : selectedIsMissingInData ? jsxRuntime.jsx(uiKit.Text.Body, {
9134
9134
  tone: "negative",
9135
9135
  intlMessage: messages$w.missingSelectedWarning
9136
- }) : null, !error && !skip && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
9136
+ }) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
9137
9137
  type: "warning",
9138
9138
  children: jsxRuntime.jsx(uiKit.Text.Detail, {
9139
9139
  intlMessage: messages$w.noRecurrentIntervalsConfigured
@@ -9190,7 +9190,8 @@ const ScrollToFieldError = () => {
9190
9190
  // div is used only for custom fields
9191
9191
  document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
9192
9192
  elementToScrollTo.scrollIntoView?.({
9193
- behavior: 'smooth'
9193
+ behavior: 'smooth',
9194
+ block: 'center'
9194
9195
  });
9195
9196
  }
9196
9197
  }
@@ -9056,11 +9056,11 @@ const RecurrentIntervalPicker = _ref => {
9056
9056
  formatMessage = _useIntl.formatMessage;
9057
9057
  const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
9058
9058
  const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
9059
- const skip = isReadOnly && !value;
9059
+ const skipFetch = isReadOnly && !value;
9060
9060
  const where = isReadOnly && value ? `id="${value}"` : undefined;
9061
9061
  const _useRecurrenceInterva = useRecurrenceIntervals({
9062
9062
  where,
9063
- skip
9063
+ skip: skipFetch
9064
9064
  }),
9065
9065
  recurrencePolicies = _useRecurrenceInterva.recurrencePolicies,
9066
9066
  loading = _useRecurrenceInterva.loading,
@@ -9085,7 +9085,7 @@ const RecurrentIntervalPicker = _ref => {
9085
9085
  }
9086
9086
  return mapped;
9087
9087
  }, [recurrencePolicies, selectedIsMissingInData, value, dataLocale, formatMessage, formatLocalizedFieldToString, loading]);
9088
- const noRecurrentIntervalsConfigured = !loading && recurrencePolicies.length === 0;
9088
+ const noRecurrentIntervalsConfigured = !loading && !skipFetch && recurrencePolicies.length === 0;
9089
9089
  React.useEffect(() => {
9090
9090
  if (error && onError) {
9091
9091
  onError(error);
@@ -9111,7 +9111,7 @@ const RecurrentIntervalPicker = _ref => {
9111
9111
  }) : selectedIsMissingInData ? jsxRuntime.jsx(uiKit.Text.Body, {
9112
9112
  tone: "negative",
9113
9113
  intlMessage: messages$w.missingSelectedWarning
9114
- }) : null, !error && !skip && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
9114
+ }) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
9115
9115
  type: "warning",
9116
9116
  children: jsxRuntime.jsx(uiKit.Text.Detail, {
9117
9117
  intlMessage: messages$w.noRecurrentIntervalsConfigured
@@ -9168,7 +9168,8 @@ const ScrollToFieldError = () => {
9168
9168
  // div is used only for custom fields
9169
9169
  document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
9170
9170
  elementToScrollTo.scrollIntoView?.({
9171
- behavior: 'smooth'
9171
+ behavior: 'smooth',
9172
+ block: 'center'
9172
9173
  });
9173
9174
  }
9174
9175
  }
@@ -8976,11 +8976,11 @@ const RecurrentIntervalPicker = _ref => {
8976
8976
  formatMessage = _useIntl.formatMessage;
8977
8977
  const dataLocale = useApplicationContext(applicationContext => applicationContext.dataLocale);
8978
8978
  const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
8979
- const skip = isReadOnly && !value;
8979
+ const skipFetch = isReadOnly && !value;
8980
8980
  const where = isReadOnly && value ? `id="${value}"` : undefined;
8981
8981
  const _useRecurrenceInterva = useRecurrenceIntervals({
8982
8982
  where,
8983
- skip
8983
+ skip: skipFetch
8984
8984
  }),
8985
8985
  recurrencePolicies = _useRecurrenceInterva.recurrencePolicies,
8986
8986
  loading = _useRecurrenceInterva.loading,
@@ -9005,7 +9005,7 @@ const RecurrentIntervalPicker = _ref => {
9005
9005
  }
9006
9006
  return mapped;
9007
9007
  }, [recurrencePolicies, selectedIsMissingInData, value, dataLocale, formatMessage, formatLocalizedFieldToString, loading]);
9008
- const noRecurrentIntervalsConfigured = !loading && recurrencePolicies.length === 0;
9008
+ const noRecurrentIntervalsConfigured = !loading && !skipFetch && recurrencePolicies.length === 0;
9009
9009
  useEffect(() => {
9010
9010
  if (error && onError) {
9011
9011
  onError(error);
@@ -9031,7 +9031,7 @@ const RecurrentIntervalPicker = _ref => {
9031
9031
  }) : selectedIsMissingInData ? jsx(Text.Body, {
9032
9032
  tone: "negative",
9033
9033
  intlMessage: messages$w.missingSelectedWarning
9034
- }) : null, !error && !skip && noRecurrentIntervalsConfigured && jsx(ContentNotification, {
9034
+ }) : null, !error && noRecurrentIntervalsConfigured && jsx(ContentNotification, {
9035
9035
  type: "warning",
9036
9036
  children: jsx(Text.Detail, {
9037
9037
  intlMessage: messages$w.noRecurrentIntervalsConfigured
@@ -9088,7 +9088,8 @@ const ScrollToFieldError = () => {
9088
9088
  // div is used only for custom fields
9089
9089
  document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
9090
9090
  elementToScrollTo.scrollIntoView?.({
9091
- behavior: 'smooth'
9091
+ behavior: 'smooth',
9092
+ block: 'center'
9092
9093
  });
9093
9094
  }
9094
9095
  }
@@ -1,4 +1,4 @@
1
- import { TRecurrencePolicyQueryResult } from '../../../../../../types/src/generated/ctp';
1
+ import type { TRecurrencePolicyQueryResult } from '../../../../../../types/src/generated/ctp';
2
2
  declare const handlers: {
3
3
  FetchRecurrencePolicies: {
4
4
  all: (policies?: TRecurrencePolicyQueryResult['results']) => import("msw").GraphQLHandler<import("msw").GraphQLRequest<import("msw").GraphQLVariables>>;
package/dist/styles.css CHANGED
@@ -24,21 +24,39 @@
24
24
  margin-top: 2px;
25
25
  position: absolute;
26
26
  }
27
+ /* imported from validated-input.module.css */
28
+
29
+ .validated-input-module__invalid___380EL {
30
+ /* this needs !important because react-select has a :focus style that
31
+ stops the border colour being set unless the element is blurred */
32
+ border-color: var(--color-error) !important;
33
+ }
34
+
35
+ .validated-input-module__container___3L2KB {
36
+ display: inline;
37
+ }
27
38
  /* imported from store-select-input.module.css */
28
39
 
29
40
  .store-select-input-module__customOption___2SC00 {
30
41
  margin-top: 10px;
31
42
  }
32
- /* imported from validated-input.module.css */
43
+ /* imported from label-range.module.css */
33
44
 
34
- .validated-input-module__invalid___380EL {
45
+ .label-range-module__label___3Tb0p {
46
+ font-size: 0.9rem;
47
+ font-weight: bold;
48
+ }
49
+ /* imported from numeric-format-input.module.css */
50
+
51
+ .numeric-format-input-module__invalid___3LcyE {
35
52
  /* this needs !important because react-select has a :focus style that
36
53
  stops the border colour being set unless the element is blurred */
37
54
  border-color: var(--color-error) !important;
55
+ border: 1px solid;
38
56
  }
39
57
 
40
- .validated-input-module__container___3L2KB {
41
- display: inline;
58
+ .numeric-format-input-module__disabled___hb6h4 {
59
+ cursor: not-allowed;
42
60
  }
43
61
  /* imported from multi-value-search-input.module.css */
44
62
 
@@ -86,11 +104,77 @@
86
104
  border-bottom-left-radius: var(--border-radius-for-input);
87
105
  border-bottom-right-radius: var(--border-radius-for-input);
88
106
  }
89
- /* imported from label-range.module.css */
107
+ /* imported from throttled-field.module.css */
90
108
 
91
- .label-range-module__label___3Tb0p {
92
- font-size: 0.9rem;
93
- font-weight: bold;
109
+ .throttled-field-module__size___324jx {
110
+ width: 100%;
111
+ }
112
+
113
+ .throttled-field-module__size___324jx {
114
+ min-height: var(--height-for-input);
115
+ }
116
+
117
+ .throttled-field-module__input-text___3zFFp {
118
+ transition: 0.2s ease;
119
+ border-radius: 6px;
120
+ border-style: solid;
121
+ border-width: 1px;
122
+ color: var(--color-solid);
123
+ font-weight: 500;
124
+ font-size: 1rem;
125
+ font-family: 'Open Sans', sans-serif !important;
126
+ padding: 7.5px 10px;
127
+ outline: none;
128
+ box-shadow: none;
129
+ appearance: none;
130
+ }
131
+
132
+ .throttled-field-module__input-secondary___cFo9e {
133
+ background-color: var(--color-neutral-95);
134
+ border-color: var(--color-surface);
135
+ width: 100%;
136
+ }
137
+
138
+ .throttled-field-module__input-primary___26G3R {
139
+ border-color: var(--color-neutral);
140
+ background-color: var(--color-surface);
141
+ }
142
+
143
+ .throttled-field-module__textarea___3ZNEs {
144
+ width: 100%;
145
+ min-height: 36px;
146
+ resize: vertical;
147
+ }
148
+
149
+ .throttled-field-module__textarea-primary___24Wwt {
150
+ border-color: var(--color-neutral);
151
+ background-color: var(--color-surface);
152
+ }
153
+
154
+ .throttled-field-module__textarea-secondary___2rmFG {
155
+ background-color: var(--color-neutral-95);
156
+ border-color: var(--color-surface);
157
+ width: 100%;
158
+ }
159
+
160
+ .throttled-field-module__invalid___1yZLW {
161
+ /* this needs !important because react-select has a :focus style that
162
+ stops the border colour being set unless the element is blurred */
163
+ border-color: var(--color-error) !important;
164
+ border: 1px solid;
165
+ }
166
+
167
+ .throttled-field-module__disabled___qVj79 {
168
+ cursor: not-allowed;
169
+ background-color: var(--color-accent-98);
170
+ color: var(--color-solid);
171
+ opacity: 1; /* fix for mobile safari */
172
+ }
173
+
174
+ .throttled-field-module__granular___2LXJf {
175
+ border-top-left-radius: 0;
176
+ border-bottom-left-radius: 0;
177
+ margin-left: 0;
94
178
  }
95
179
  /* imported from search-input.module.css */
96
180
 
@@ -182,90 +266,6 @@
182
266
  flex-shrink: 1;
183
267
  margin-left: var(--spacing-s);
184
268
  }
185
- /* imported from numeric-format-input.module.css */
186
-
187
- .numeric-format-input-module__invalid___3LcyE {
188
- /* this needs !important because react-select has a :focus style that
189
- stops the border colour being set unless the element is blurred */
190
- border-color: var(--color-error) !important;
191
- border: 1px solid;
192
- }
193
-
194
- .numeric-format-input-module__disabled___hb6h4 {
195
- cursor: not-allowed;
196
- }
197
- /* imported from throttled-field.module.css */
198
-
199
- .throttled-field-module__size___324jx {
200
- width: 100%;
201
- }
202
-
203
- .throttled-field-module__size___324jx {
204
- min-height: var(--height-for-input);
205
- }
206
-
207
- .throttled-field-module__input-text___3zFFp {
208
- transition: 0.2s ease;
209
- border-radius: 6px;
210
- border-style: solid;
211
- border-width: 1px;
212
- color: var(--color-solid);
213
- font-weight: 500;
214
- font-size: 1rem;
215
- font-family: 'Open Sans', sans-serif !important;
216
- padding: 7.5px 10px;
217
- outline: none;
218
- box-shadow: none;
219
- appearance: none;
220
- }
221
-
222
- .throttled-field-module__input-secondary___cFo9e {
223
- background-color: var(--color-neutral-95);
224
- border-color: var(--color-surface);
225
- width: 100%;
226
- }
227
-
228
- .throttled-field-module__input-primary___26G3R {
229
- border-color: var(--color-neutral);
230
- background-color: var(--color-surface);
231
- }
232
-
233
- .throttled-field-module__textarea___3ZNEs {
234
- width: 100%;
235
- min-height: 36px;
236
- resize: vertical;
237
- }
238
-
239
- .throttled-field-module__textarea-primary___24Wwt {
240
- border-color: var(--color-neutral);
241
- background-color: var(--color-surface);
242
- }
243
-
244
- .throttled-field-module__textarea-secondary___2rmFG {
245
- background-color: var(--color-neutral-95);
246
- border-color: var(--color-surface);
247
- width: 100%;
248
- }
249
-
250
- .throttled-field-module__invalid___1yZLW {
251
- /* this needs !important because react-select has a :focus style that
252
- stops the border colour being set unless the element is blurred */
253
- border-color: var(--color-error) !important;
254
- border: 1px solid;
255
- }
256
-
257
- .throttled-field-module__disabled___qVj79 {
258
- cursor: not-allowed;
259
- background-color: var(--color-accent-98);
260
- color: var(--color-solid);
261
- opacity: 1; /* fix for mobile safari */
262
- }
263
-
264
- .throttled-field-module__granular___2LXJf {
265
- border-top-left-radius: 0;
266
- border-bottom-left-radius: 0;
267
- margin-left: 0;
268
- }
269
269
  /* imported from button.module.css */
270
270
 
271
271
  /* Generic button */
@@ -510,14 +510,20 @@
510
510
  .custom-money-input-module__container___1fdO2 {
511
511
  width: 100%;
512
512
  }
513
- /* imported from centered-loading-spinner.module.css */
513
+ /* imported from reference-search.module.css */
514
514
 
515
- .centered-loading-spinner-module__loading-container___3_9-h {
516
- height: 100%;
517
- display: flex;
518
- flex-grow: 1;
519
- align-items: center;
520
- justify-content: center;
515
+ .reference-search-module__container___3-iK3 {
516
+ width: 100%;
517
+ }
518
+
519
+ .reference-search-module__container___3-iK3 > div {
520
+ width: 100%;
521
+ }
522
+
523
+ .reference-search-module__missing-label___az9AO {
524
+ color: var(--color-warning);
525
+ font-size: 0.9rem;
526
+ margin-left: var(--spacing-xs);
521
527
  }
522
528
  /* imported from divider.module.css */
523
529
 
@@ -546,20 +552,14 @@
546
552
  .divider-module__divider-dashed___2Em8A {
547
553
  border-style: dashed;
548
554
  }
549
- /* imported from reference-search.module.css */
550
-
551
- .reference-search-module__container___3-iK3 {
552
- width: 100%;
553
- }
554
-
555
- .reference-search-module__container___3-iK3 > div {
556
- width: 100%;
557
- }
555
+ /* imported from centered-loading-spinner.module.css */
558
556
 
559
- .reference-search-module__missing-label___az9AO {
560
- color: var(--color-warning);
561
- font-size: 0.9rem;
562
- margin-left: var(--spacing-xs);
557
+ .centered-loading-spinner-module__loading-container___3_9-h {
558
+ height: 100%;
559
+ display: flex;
560
+ flex-grow: 1;
561
+ align-items: center;
562
+ justify-content: center;
563
563
  }
564
564
  /* imported from set-buttons.module.css */
565
565
 
@@ -595,11 +595,6 @@
595
595
  .platform-limits-customers-status-module__status___3rXYM {
596
596
  min-width: max-content;
597
597
  }
598
- /* imported from platform-limits-customers-combined.module.css */
599
-
600
- .platform-limits-customers-combined-module__combined___OszDd {
601
- margin-bottom: var(--spacing-s);
602
- }
603
598
  /* imported from platform-limits-customer-groups-combined.module.css */
604
599
 
605
600
  .platform-limits-customer-groups-combined-module__combined___WjRoI {
@@ -610,3 +605,8 @@
610
605
  .platform-limits-customer-groups-status-module__status___6099G {
611
606
  min-width: max-content;
612
607
  }
608
+ /* imported from platform-limits-customers-combined.module.css */
609
+
610
+ .platform-limits-customers-combined-module__combined___OszDd {
611
+ margin-bottom: var(--spacing-s);
612
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/experimental-components",
3
- "version": "7.2.0",
3
+ "version": "7.2.2",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,14 +25,14 @@
25
25
  "dependencies": {
26
26
  "@babel/core": "^7.22.11",
27
27
  "@babel/runtime-corejs3": "^7.21.0",
28
- "@commercetools-frontend/actions-global": "24.1.0",
29
- "@commercetools-frontend/application-components": "24.1.0",
30
- "@commercetools-frontend/application-shell": "24.1.0",
31
- "@commercetools-frontend/application-shell-connectors": "24.1.0",
32
- "@commercetools-frontend/constants": "24.1.0",
33
- "@commercetools-frontend/l10n": "24.1.0",
34
- "@commercetools-frontend/sdk": "24.1.0",
35
- "@commercetools-frontend/sentry": "24.1.0",
28
+ "@commercetools-frontend/actions-global": "24.2.1",
29
+ "@commercetools-frontend/application-components": "24.2.1",
30
+ "@commercetools-frontend/application-shell": "24.2.1",
31
+ "@commercetools-frontend/application-shell-connectors": "24.2.1",
32
+ "@commercetools-frontend/constants": "24.2.1",
33
+ "@commercetools-frontend/l10n": "24.2.1",
34
+ "@commercetools-frontend/sdk": "24.2.1",
35
+ "@commercetools-frontend/sentry": "24.2.1",
36
36
  "@commercetools-frontend/ui-kit": "20.0.0",
37
37
  "@commercetools-uikit/design-system": "20.0.0",
38
38
  "@commercetools-uikit/select-utils": "20.0.0",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "@apollo/client": "3.12.4",
64
- "@commercetools/composable-commerce-test-data": "11.2.1",
64
+ "@commercetools/composable-commerce-test-data": "11.5.1",
65
65
  "@testing-library/react": "16.1.0",
66
66
  "@types/debounce-promise": "3.1.9",
67
67
  "@types/jest": "^29.5.2",
@@ -80,8 +80,8 @@
80
80
  "react-test-renderer": "17.0.2",
81
81
  "redux": "4.2.1",
82
82
  "typescript": "5.2.2",
83
- "@commercetools-local/test-data": "1.2.20",
84
- "@commercetools-local/test-utils": "1.2.21"
83
+ "@commercetools-local/test-data": "1.2.22",
84
+ "@commercetools-local/test-utils": "1.2.22"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@apollo/client": "3.x",