@shopify/ui-extensions 2025.10.6 → 2026.1.0-rc.1
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/build/ts/surfaces/point-of-sale/types/cart.d.ts +26 -0
- package/build/ts/surfaces/point-of-sale/types/cart.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/surfaces/admin/components/DatePicker/examples/analytics-dashboard.html +2 -2
- package/src/surfaces/point-of-sale/components/ChoiceList/examples/event-handling.jsx +2 -2
- package/src/surfaces/point-of-sale/components/ChoiceList/examples/multiple-selection.jsx +1 -1
- package/src/surfaces/point-of-sale/components/DateField/examples/event-handling.jsx +4 -4
- package/src/surfaces/point-of-sale/components/DatePicker/examples/command-system.jsx +1 -1
- package/src/surfaces/point-of-sale/components/DatePicker/examples/event-handling.jsx +2 -2
- package/src/surfaces/point-of-sale/components/DateSpinner/examples/command-system.jsx +1 -1
- package/src/surfaces/point-of-sale/components/DateSpinner/examples/event-handling.jsx +2 -2
- package/src/surfaces/point-of-sale/components/EmailField/examples/event-handling.jsx +2 -2
- package/src/surfaces/point-of-sale/components/NumberField/examples/controls-constraints.jsx +2 -2
- package/src/surfaces/point-of-sale/components/NumberField/examples/input-mode.jsx +2 -2
- package/src/surfaces/point-of-sale/components/SearchField/examples/event-handling.jsx +2 -2
- package/src/surfaces/point-of-sale/components/TextArea/examples/event-handling.jsx +2 -2
- package/src/surfaces/point-of-sale/components/TextArea/examples/rows-configuration.jsx +1 -1
- package/src/surfaces/point-of-sale/components/TextField/examples/common-props.jsx +1 -1
- package/src/surfaces/point-of-sale/components/TextField/examples/event-handling.jsx +5 -5
- package/src/surfaces/point-of-sale/components/TimeField/examples/event-handling.jsx +2 -2
- package/src/surfaces/point-of-sale/components/TimePicker/examples/command-system.jsx +1 -1
- package/src/surfaces/point-of-sale/components/TimePicker/examples/event-handling.jsx +2 -2
- package/src/surfaces/point-of-sale/types/cart.ts +27 -0
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
id="analytics-picker"
|
|
12
12
|
value="2025-01-01--2025-01-31"
|
|
13
13
|
view="2025-01"
|
|
14
|
-
onchange="console.log('Date range changed:', event.
|
|
14
|
+
onchange="console.log('Date range changed:', event.currentTarget.value)"
|
|
15
15
|
></s-date-picker>
|
|
16
16
|
<s-text id="selected-range">
|
|
17
17
|
Selected range: 2025-01-01--2025-01-31
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
// Handle picker changes
|
|
26
26
|
picker.addEventListener('change', (event) => {
|
|
27
|
-
display.textContent = `Selected range: ${event.
|
|
27
|
+
display.textContent = `Selected range: ${event.currentTarget.value}`;
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
// Quick selection buttons
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<s-choice-list
|
|
2
|
-
onChange={(event) => console.log('onChange:', event.
|
|
3
|
-
onInput={(event) => console.log('onInput:', event.
|
|
2
|
+
onChange={(event) => console.log('onChange:', event.currentTarget.values)}
|
|
3
|
+
onInput={(event) => console.log('onInput:', event.currentTarget.values)}
|
|
4
4
|
>
|
|
5
5
|
<s-choice value="option1">Option 1</s-choice>
|
|
6
6
|
<s-choice value="option2" disabled>Option 2 (disabled)</s-choice>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<s-choice-list
|
|
2
2
|
multiple
|
|
3
3
|
values={['small', 'medium']}
|
|
4
|
-
onChange={(event) => console.log('Selected:', event.
|
|
4
|
+
onChange={(event) => console.log('Selected:', event.currentTarget.values)}
|
|
5
5
|
>
|
|
6
6
|
<s-choice value="small">Small</s-choice>
|
|
7
7
|
<s-choice value="medium">Medium</s-choice>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<s-date-field
|
|
2
2
|
label="Order date"
|
|
3
3
|
value="2024-10-26"
|
|
4
|
-
onInput={(event) => console.log('Input:', event.
|
|
5
|
-
onChange={(event) => console.log('Change:', event.
|
|
6
|
-
onFocus={(event) => console.log('Focused with:', event.
|
|
7
|
-
onBlur={(event) => console.log('Blurred with:', event.
|
|
4
|
+
onInput={(event) => console.log('Input:', event.currentTarget.value)}
|
|
5
|
+
onChange={(event) => console.log('Change:', event.currentTarget.value)}
|
|
6
|
+
onFocus={(event) => console.log('Focused with:', event.currentTarget.value)}
|
|
7
|
+
onBlur={(event) => console.log('Blurred with:', event.currentTarget.value)}
|
|
8
8
|
/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<s-date-picker
|
|
2
2
|
value="2024-10-26"
|
|
3
|
-
onInput={(event) => console.log('Input:', event.
|
|
4
|
-
onChange={(event) => console.log('Change:', event.
|
|
3
|
+
onInput={(event) => console.log('Input:', event.currentTarget.value)}
|
|
4
|
+
onChange={(event) => console.log('Change:', event.currentTarget.value)}
|
|
5
5
|
onFocus={(event) => console.log('Focus')}
|
|
6
6
|
onBlur={(event) => console.log('Blur')}
|
|
7
7
|
/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<s-date-spinner
|
|
2
2
|
value="2024-10-26"
|
|
3
|
-
onInput={(event) => console.log('Input:', event.
|
|
4
|
-
onChange={(event) => console.log('Change:', event.
|
|
3
|
+
onInput={(event) => console.log('Input:', event.currentTarget.value)}
|
|
4
|
+
onChange={(event) => console.log('Change:', event.currentTarget.value)}
|
|
5
5
|
onFocus={(event) => console.log('Focus')}
|
|
6
6
|
onBlur={(event) => console.log('Blur')}
|
|
7
7
|
/>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<s-email-field
|
|
2
2
|
label="Customer email"
|
|
3
3
|
placeholder="customer@example.com"
|
|
4
|
-
onInput={(event) => console.log('Input:', event.
|
|
5
|
-
onChange={(event) => console.log('Change:', event.
|
|
4
|
+
onInput={(event) => console.log('Input:', event.currentTarget.value)}
|
|
5
|
+
onChange={(event) => console.log('Change:', event.currentTarget.value)}
|
|
6
6
|
onFocus={(event) => console.log('Focus')}
|
|
7
7
|
onBlur={(event) => console.log('Blur')}
|
|
8
8
|
/>
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
min={1}
|
|
5
5
|
max={100}
|
|
6
6
|
controls
|
|
7
|
-
onInput={(event) => console.log('Input:', event.
|
|
8
|
-
onChange={(event) => console.log('Change:', event.
|
|
7
|
+
onInput={(event) => console.log('Input:', event.currentTarget.value)}
|
|
8
|
+
onChange={(event) => console.log('Change:', event.currentTarget.value)}
|
|
9
9
|
/>;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
label="Price"
|
|
4
4
|
placeholder="0.00"
|
|
5
5
|
inputMode="decimal"
|
|
6
|
-
onInput={(event) => console.log('Value:', event.
|
|
6
|
+
onInput={(event) => console.log('Value:', event.currentTarget.value)}
|
|
7
7
|
/>
|
|
8
8
|
|
|
9
9
|
<s-number-field
|
|
10
10
|
label="Stock count"
|
|
11
11
|
placeholder="0"
|
|
12
12
|
inputMode="numeric"
|
|
13
|
-
onInput={(event) => console.log('Value:', event.
|
|
13
|
+
onInput={(event) => console.log('Value:', event.currentTarget.value)}
|
|
14
14
|
/>
|
|
15
15
|
</s-stack>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<s-search-field
|
|
2
2
|
placeholder="Search products..."
|
|
3
3
|
value=""
|
|
4
|
-
onInput={(event) => console.log('Input:', event.
|
|
5
|
-
onChange={(event) => console.log('Change:', event.
|
|
4
|
+
onInput={(event) => console.log('Input:', event.currentTarget.value)}
|
|
5
|
+
onChange={(event) => console.log('Change:', event.currentTarget.value)}
|
|
6
6
|
onFocus={(event) => console.log('Search focused')}
|
|
7
7
|
onBlur={(event) => console.log('Search blurred')}
|
|
8
8
|
/>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<s-text-area
|
|
2
2
|
label="Customer feedback"
|
|
3
3
|
placeholder="Enter feedback..."
|
|
4
|
-
onInput={(event) => console.log('Input:', event.
|
|
5
|
-
onChange={(event) => console.log('Change:', event.
|
|
4
|
+
onInput={(event) => console.log('Input:', event.currentTarget.value)}
|
|
5
|
+
onChange={(event) => console.log('Change:', event.currentTarget.value)}
|
|
6
6
|
onFocus={(event) => console.log('Focused')}
|
|
7
7
|
onBlur={(event) => console.log('Blurred')}
|
|
8
8
|
/>
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
label="Product SKU"
|
|
3
3
|
placeholder="Enter SKU"
|
|
4
4
|
onInput={(event) => {
|
|
5
|
-
console.log('Input:', event.
|
|
6
|
-
console.log('Current error:', event.
|
|
5
|
+
console.log('Input:', event.currentTarget.value);
|
|
6
|
+
console.log('Current error:', event.currentTarget.error);
|
|
7
7
|
}}
|
|
8
8
|
onFocus={(event) => {
|
|
9
|
-
console.log('Focused with value:', event.
|
|
9
|
+
console.log('Focused with value:', event.currentTarget.value);
|
|
10
10
|
}}
|
|
11
11
|
onBlur={(event) => {
|
|
12
|
-
console.log('Blurred with value:', event.
|
|
12
|
+
console.log('Blurred with value:', event.currentTarget.value);
|
|
13
13
|
}}
|
|
14
14
|
onChange={(event) => {
|
|
15
|
-
console.log('Changed to:', event.
|
|
15
|
+
console.log('Changed to:', event.currentTarget.value);
|
|
16
16
|
}}
|
|
17
17
|
/>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<s-time-field
|
|
2
2
|
label="Appointment time"
|
|
3
3
|
value="14:30"
|
|
4
|
-
onInput={(event) => console.log('Input:', event.
|
|
5
|
-
onChange={(event) => console.log('Change:', event.
|
|
4
|
+
onInput={(event) => console.log('Input:', event.currentTarget.value)}
|
|
5
|
+
onChange={(event) => console.log('Change:', event.currentTarget.value)}
|
|
6
6
|
onFocus={(event) => console.log('Focused')}
|
|
7
7
|
onBlur={(event) => console.log('Blurred')}
|
|
8
8
|
/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<s-time-picker
|
|
2
2
|
value="14:30"
|
|
3
|
-
onInput={(event) => console.log('Input:', event.
|
|
4
|
-
onChange={(event) => console.log('Change:', event.
|
|
3
|
+
onInput={(event) => console.log('Input:', event.currentTarget.value)}
|
|
4
|
+
onChange={(event) => console.log('Change:', event.currentTarget.value)}
|
|
5
5
|
onFocus={(event) => console.log('Focused')}
|
|
6
6
|
onBlur={(event) => console.log('Blurred')}
|
|
7
7
|
/>
|
|
@@ -55,6 +55,33 @@ export interface LineItem {
|
|
|
55
55
|
* The currently selected selling plan for this line item.
|
|
56
56
|
*/
|
|
57
57
|
sellingPlan?: SellingPlan;
|
|
58
|
+
/**
|
|
59
|
+
* Bundle components for this line item. Only present for product bundles.
|
|
60
|
+
* Each component represents an individual item within the bundle with its own tax information.
|
|
61
|
+
*/
|
|
62
|
+
components?: LineItemComponent[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Represents a component of a product bundle line item.
|
|
67
|
+
* Bundle components contain the individual items that make up a bundle,
|
|
68
|
+
* each with their own pricing and tax information.
|
|
69
|
+
*/
|
|
70
|
+
export interface LineItemComponent {
|
|
71
|
+
/** The title/name of the component product */
|
|
72
|
+
title?: string;
|
|
73
|
+
/** The quantity of this component in the bundle */
|
|
74
|
+
quantity: number;
|
|
75
|
+
/** The price of this component */
|
|
76
|
+
price?: number;
|
|
77
|
+
/** Whether this component is taxable */
|
|
78
|
+
taxable: boolean;
|
|
79
|
+
/** Tax lines applied to this component */
|
|
80
|
+
taxLines: TaxLine[];
|
|
81
|
+
/** The variant ID of this component, if applicable */
|
|
82
|
+
variantId?: number;
|
|
83
|
+
/** The product ID of this component, if applicable */
|
|
84
|
+
productId?: number;
|
|
58
85
|
}
|
|
59
86
|
|
|
60
87
|
/**
|