@stacksjs/defaults 0.75.317 → 0.75.320
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/ai/skills/stacks-browse/SKILL.md +8 -0
- package/ai/skills/stacks-browse/scripts/browse.ts +16 -6
- package/ai/skills/stacks-browse/scripts/chrome.ts +4 -0
- package/ai/skills/stacks-database/SKILL.md +1 -1
- package/ai/skills/stacks-migrations/SKILL.md +2 -2
- package/ai/skills/stacks-native/CATALOG.md +6 -6
- package/app/Actions/Cms/AuthorUpdateAction.ts +4 -4
- package/app/Actions/Cms/CategorizableUpdateAction.ts +4 -4
- package/app/Actions/Cms/PostUpdateAction.ts +4 -5
- package/app/Actions/Cms/TaggableUpdateAction.ts +4 -2
- package/app/Actions/Commerce/CustomerStoreAction.ts +4 -6
- package/app/Actions/Commerce/CustomerUpdateAction.ts +4 -6
- package/app/Actions/Commerce/PaymentStoreAction.ts +5 -8
- package/app/Actions/Commerce/PaymentUpdateAction.ts +20 -17
- package/app/Actions/Dashboard/Commerce/commerce-product-records.test.ts +7 -0
- package/app/Actions/Dashboard/Commerce/commerce-product-records.ts +14 -3
- package/app/Actions/Dashboard/Commerce/review-records.test.ts +12 -0
- package/app/Actions/Dashboard/Commerce/review-records.ts +10 -5
- package/app/Actions/Dashboard/Content/AuthorStoreAction.ts +2 -0
- package/app/Actions/Dashboard/Content/CategoryStoreAction.ts +4 -1
- package/app/Actions/Dashboard/Content/PageStoreAction.ts +2 -0
- package/app/Actions/Dashboard/Content/PostStoreAction.ts +2 -0
- package/app/Actions/Dashboard/Content/TagStoreAction.ts +2 -0
- package/app/Actions/Dashboard/Content/content-input.ts +9 -4
- package/app/Actions/Dashboard/Content/content-record-input.test.ts +20 -1
- package/app/Actions/Dashboard/Marketing/CampaignIndexAction.ts +1 -1
- package/app/Actions/Dashboard/Marketing/ListIndexAction.ts +1 -1
- package/app/Actions/Dashboard/Models/ModelStoreAction.ts +5 -1
- package/app/Actions/Dashboard/Models/ModelUpdateAction.ts +5 -1
- package/app/Actions/Dashboard/Notifications/NotificationDeliveryOverviewAction.ts +1 -1
- package/app/Actions/Storefront/AddToCartAction.ts +5 -2
- package/app/Actions/Storefront/PlaceOrderAction.ts +6 -11
- package/app/Actions/Storefront/SubmitReviewAction.ts +6 -5
- package/app/Models/Activity.ts +1 -0
- package/app/Models/AnalyticsEvent.ts +1 -0
- package/app/Models/AutomationRun.ts +1 -1
- package/app/Models/BoardColumn.ts +0 -1
- package/app/Models/Campaign.ts +1 -1
- package/app/Models/CampaignSend.ts +3 -3
- package/app/Models/Card.ts +0 -1
- package/app/Models/CardComment.ts +0 -2
- package/app/Models/Content/Author.ts +2 -0
- package/app/Models/Content/Categorizable.ts +1 -0
- package/app/Models/Content/Menu.ts +2 -0
- package/app/Models/Content/MenuItem.ts +2 -0
- package/app/Models/Content/PageRevision.ts +2 -0
- package/app/Models/Content/Post.ts +2 -0
- package/app/Models/Content/Redirect.ts +2 -0
- package/app/Models/EmailListSubscriber.ts +2 -2
- package/app/Models/Error.ts +5 -0
- package/app/Models/Forms/Form.ts +2 -0
- package/app/Models/Forms/FormField.ts +2 -0
- package/app/Models/Forms/FormSubmission.ts +2 -0
- package/app/Models/Label.ts +0 -1
- package/app/Models/Log.ts +3 -1
- package/app/Models/MagicLinkToken.ts +0 -7
- package/app/Models/PaymentProduct.ts +1 -0
- package/app/Models/PaymentTransaction.ts +1 -0
- package/app/Models/Release.ts +3 -0
- package/app/Models/Request.ts +1 -0
- package/app/Models/SenderDomain.ts +2 -0
- package/app/Models/SmsOptOut.ts +0 -7
- package/app/Models/Subscription.ts +2 -0
- package/app/Models/commerce/Auction.ts +1 -0
- package/app/Models/commerce/AuctionItem.ts +1 -0
- package/app/Models/commerce/Cart.ts +83 -2
- package/app/Models/commerce/Category.ts +5 -1
- package/app/Models/commerce/Coupon.ts +4 -1
- package/app/Models/commerce/DigitalDelivery.ts +1 -0
- package/app/Models/commerce/GiftCard.ts +1 -0
- package/app/Models/commerce/LoyaltyPoint.ts +1 -0
- package/app/Models/commerce/LoyaltyReward.ts +3 -1
- package/app/Models/commerce/Order.ts +4 -1
- package/app/Models/commerce/OrderItem.ts +1 -0
- package/app/Models/commerce/Payment.ts +1 -0
- package/app/Models/commerce/Product.ts +15 -0
- package/app/Models/commerce/ProductVariant.ts +2 -0
- package/app/Models/commerce/Receipt.ts +1 -0
- package/app/Models/commerce/Review.ts +3 -1
- package/app/Models/commerce/Transaction.ts +1 -0
- package/app/Models/realtime/Websocket.ts +4 -1
- package/functions/dashboard-form.test.ts +10 -1
- package/functions/dashboard-form.ts +17 -0
- package/ide/vscode/package.json +1 -1
- package/package.json +4 -4
- package/resources/components/Dashboard/Analytics/AnalyticsPageHeader.stx +1 -1
- package/resources/components/Dashboard/App/RequestDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Auth/AccessTokenCreateDialog.stx +1 -1
- package/resources/components/Dashboard/Auth/ForgotPassword.stx +1 -1
- package/resources/components/Dashboard/Auth/Login.stx +1 -1
- package/resources/components/Dashboard/Auth/Register.stx +1 -1
- package/resources/components/Dashboard/Auth/ResetPassword.stx +1 -1
- package/resources/components/Dashboard/Auth/TwoFactorLogin.stx +1 -1
- package/resources/components/Dashboard/CodeEditor.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCategoriesDashboard.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCategoriesTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCategoryDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCategoryDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCategoryDialog.stx +4 -13
- package/resources/components/Dashboard/Commerce/CommerceCouponDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCouponDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCouponDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCouponsTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCustomerDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCustomerDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCustomerDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCustomersTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceGiftCardsTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceManufacturersTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceOrderDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceOrderDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceOrderDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceOrdersTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommercePaymentsTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommercePosCart.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommercePosCatalog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommercePosCheckoutDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommercePosReceiptDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceProductDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceProductDialog.stx +27 -2
- package/resources/components/Dashboard/Commerce/CommerceProductsTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceReviewDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceReviewEditDialog.stx +7 -5
- package/resources/components/Dashboard/Commerce/CommerceReviewsDashboard.stx +12 -4
- package/resources/components/Dashboard/Commerce/CommerceReviewsTable.stx +3 -3
- package/resources/components/Dashboard/Commerce/CommerceTaxDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceTaxDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceTaxesTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceUnitDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceUnitDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceUnitsTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceVariantDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceVariantDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceVariantsTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/CourierDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/CourierDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/CouriersTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryPagination.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRoutesTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeysTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodsTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRatesTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZonesTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/PaymentDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PaymentRefundDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintDeviceDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintDeviceDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintDeviceDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintDevicesTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintLogDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintLogDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintLogsTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/ProductWaitlistDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/ProductWaitlistEntryDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/ProductWaitlistTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistEntryDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistTable.stx +1 -1
- package/resources/components/Dashboard/Content/AuthorEditorDialog.stx +1 -1
- package/resources/components/Dashboard/Content/BlogPostEditorDialog.stx +1 -1
- package/resources/components/Dashboard/Content/CreateFolderDialog.stx +1 -1
- package/resources/components/Dashboard/Content/FileDetailsDrawer.stx +1 -1
- package/resources/components/Dashboard/Content/FileUploadDialog.stx +1 -1
- package/resources/components/Dashboard/Content/PageEditorDialog.stx +1 -1
- package/resources/components/Dashboard/Content/PostEditorDialog.stx +1 -1
- package/resources/components/Dashboard/Content/SeoEditorDialog.stx +1 -1
- package/resources/components/Dashboard/Content/TaxonomyEditorDialog.stx +1 -1
- package/resources/components/Dashboard/CreateRecordModal.stx +1 -1
- package/resources/components/Dashboard/Deployments/DeploymentPreviewDialog.stx +1 -1
- package/resources/components/Dashboard/Elements/DropdownNavigation.stx +1 -1
- package/resources/components/Dashboard/Email/CapturedMailList.stx +1 -1
- package/resources/components/Dashboard/Email/EmailSettingsList.stx +1 -1
- package/resources/components/Dashboard/Email/EmailSettingsNavigation.stx +1 -1
- package/resources/components/Dashboard/Email/EmailSidebar.stx +1 -1
- package/resources/components/Dashboard/Email/InboxComposer.stx +1 -1
- package/resources/components/Dashboard/Email/InboxMessageDetail.stx +1 -1
- package/resources/components/Dashboard/Email/InboxMessageList.stx +1 -1
- package/resources/components/Dashboard/Infrastructure/CloudDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Infrastructure/CloudResourceButton.stx +1 -1
- package/resources/components/Dashboard/Infrastructure/DnsRecordDialog.stx +1 -1
- package/resources/components/Dashboard/Infrastructure/LogDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Infrastructure/MailboxDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Infrastructure/ServerInspectorDialog.stx +1 -1
- package/resources/components/Dashboard/Jobs/JobTable.stx +1 -1
- package/resources/components/Dashboard/Library/SourceScaffoldDialog.stx +1 -1
- package/resources/components/Dashboard/Management/AssignmentDrawer.stx +1 -1
- package/resources/components/Dashboard/Marketing/CampaignDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Marketing/CampaignDeliveryDialog.stx +1 -1
- package/resources/components/Dashboard/Marketing/CampaignDialog.stx +1 -1
- package/resources/components/Dashboard/Marketing/CampaignsTable.stx +1 -1
- package/resources/components/Dashboard/Marketing/MarketingListDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Marketing/MarketingListDialog.stx +1 -1
- package/resources/components/Dashboard/Marketing/MarketingListsTable.stx +1 -1
- package/resources/components/Dashboard/Marketing/RecoveryCampaignDialog.stx +1 -1
- package/resources/components/Dashboard/Marketing/SocialPostDeleteDialog.stx +1 -1
- package/resources/components/Dashboard/Marketing/SocialPostDialog.stx +1 -1
- package/resources/components/Dashboard/Marketing/SocialPostsTable.stx +1 -1
- package/resources/components/Dashboard/MobileSidebar.stx +1 -1
- package/resources/components/Dashboard/Modals/BaseModal.stx +1 -1
- package/resources/components/Dashboard/Modals/Popups/Alert.stx +1 -1
- package/resources/components/Dashboard/Modals/Popups/Toast.stx +1 -1
- package/resources/components/Dashboard/Modals/ToastWrapper.stx +1 -1
- package/resources/components/Dashboard/Models/EditRecordModal.stx +1 -1
- package/resources/components/Dashboard/Models/ModelRecordActions.stx +1 -1
- package/resources/components/Dashboard/Monitoring/ErrorTable.stx +1 -1
- package/resources/components/Dashboard/Notifications/NotificationDeliveryDialog.stx +1 -1
- package/resources/components/Dashboard/Notifications/NotificationDeliveryTable.stx +1 -1
- package/resources/components/Dashboard/Operations/RecoveryDestinationDialog.stx +1 -1
- package/resources/components/Dashboard/Operations/RecoveryPointTable.stx +1 -1
- package/resources/components/Dashboard/Operations/RecoveryPolicyDialog.stx +1 -1
- package/resources/components/Dashboard/Operations/RecoveryRestoreDialog.stx +1 -1
- package/resources/components/Dashboard/Operations/SchedulerTaskTable.stx +1 -1
- package/resources/components/Dashboard/UI/Checkbox.stx +1 -1
- package/resources/components/Dashboard/UI/ConfirmDialog.stx +1 -1
- package/resources/components/Dashboard/UI/Drawer.stx +1 -1
- package/resources/components/Dashboard/UI/Dropdown.stx +1 -1
- package/resources/components/Dashboard/UI/Input.stx +1 -1
- package/resources/components/Dashboard/UI/Modal.stx +1 -1
- package/resources/components/Dashboard/UI/Pagination.stx +1 -1
- package/resources/components/Dashboard/UI/SearchFilter.stx +1 -1
- package/resources/components/Dashboard/UI/Select.stx +1 -1
- package/resources/components/Dashboard/UI/Table.stx +1 -1
- package/resources/components/Dashboard/UI/Tabs.stx +1 -1
- package/resources/components/Dashboard/UI/Textarea.stx +1 -1
- package/resources/components/Dashboard/UI/Toggle.stx +1 -1
- package/resources/components/Dashboard/UI/WindowControls.stx +1 -1
- package/resources/components/NativeActionSheet.stx +1 -1
- package/resources/components/NativeContextMenu.stx +1 -1
- package/resources/components/NativeHealthButton.stx +1 -1
- package/resources/components/NativePermissionButton.stx +1 -1
- package/resources/components/NativePullToRefresh.stx +1 -1
- package/resources/components/NativeSegmentedControl.stx +1 -1
- package/resources/components/NativeSheet.stx +1 -1
|
@@ -136,9 +136,90 @@ export default defineModel({
|
|
|
136
136
|
order: 10,
|
|
137
137
|
fillable: true,
|
|
138
138
|
validation: {
|
|
139
|
-
|
|
139
|
+
// Optional: a cart without a coupon is the common case.
|
|
140
|
+
rule: schema.string(),
|
|
141
|
+
},
|
|
142
|
+
// Stored and shown, never resolved: nothing redeems or joins on it yet,
|
|
143
|
+
// so what it holds is left to the feature that does. No factory, so a
|
|
144
|
+
// seed does not invent one (stacksjs/stacks#3002).
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
// The storefront's anonymous cart: the shopper's signed stacks_cart cookie
|
|
148
|
+
// carries this token, checkout records its progress and the address, and
|
|
149
|
+
// the order is placed from them (stacksjs/stacks#3017). A cart made any
|
|
150
|
+
// other way has none of them.
|
|
151
|
+
|
|
152
|
+
/** Bearer for an anonymous cart, so never returned by the API. No factory: a seeded cart is no shopper's. */
|
|
153
|
+
sessionToken: {
|
|
154
|
+
order: 11,
|
|
155
|
+
unique: true,
|
|
156
|
+
hidden: true,
|
|
157
|
+
validation: {
|
|
158
|
+
rule: schema.string().max(255),
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
checkoutStep: {
|
|
163
|
+
default: 'cart',
|
|
164
|
+
order: 12,
|
|
165
|
+
fillable: true,
|
|
166
|
+
validation: {
|
|
167
|
+
rule: schema.enum(['cart', 'shipping', 'payment', 'placed']),
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
email: {
|
|
172
|
+
personal: true,
|
|
173
|
+
order: 13,
|
|
174
|
+
fillable: true,
|
|
175
|
+
validation: {
|
|
176
|
+
rule: schema.string().email().max(255),
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
shippingName: {
|
|
181
|
+
personal: true,
|
|
182
|
+
order: 14,
|
|
183
|
+
fillable: true,
|
|
184
|
+
validation: {
|
|
185
|
+
rule: schema.string().max(255),
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
shippingAddress: {
|
|
190
|
+
personal: true,
|
|
191
|
+
order: 15,
|
|
192
|
+
fillable: true,
|
|
193
|
+
validation: {
|
|
194
|
+
rule: schema.string().max(255),
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
shippingCity: {
|
|
199
|
+
personal: true,
|
|
200
|
+
order: 16,
|
|
201
|
+
fillable: true,
|
|
202
|
+
validation: {
|
|
203
|
+
rule: schema.string().max(255),
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
shippingState: {
|
|
208
|
+
personal: true,
|
|
209
|
+
order: 17,
|
|
210
|
+
fillable: true,
|
|
211
|
+
validation: {
|
|
212
|
+
rule: schema.string().max(100),
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
shippingZip: {
|
|
217
|
+
personal: true,
|
|
218
|
+
order: 18,
|
|
219
|
+
fillable: true,
|
|
220
|
+
validation: {
|
|
221
|
+
rule: schema.string().max(20),
|
|
140
222
|
},
|
|
141
|
-
factory: () => 'test-coupon-id',
|
|
142
223
|
},
|
|
143
224
|
},
|
|
144
225
|
|
|
@@ -64,6 +64,7 @@ export default defineModel({
|
|
|
64
64
|
description: {
|
|
65
65
|
order: 2,
|
|
66
66
|
fillable: true,
|
|
67
|
+
type: 'text',
|
|
67
68
|
validation: {
|
|
68
69
|
rule: schema.string(),
|
|
69
70
|
},
|
|
@@ -101,7 +102,10 @@ export default defineModel({
|
|
|
101
102
|
order: 5,
|
|
102
103
|
fillable: true,
|
|
103
104
|
validation: {
|
|
104
|
-
|
|
105
|
+
// Another category's id, so a number like the id it points at. As a
|
|
106
|
+
// string it was a text column, and joining it to categories.id failed
|
|
107
|
+
// on PostgreSQL with "text = bigint" (stacksjs/stacks#3002).
|
|
108
|
+
rule: schema.number(),
|
|
105
109
|
},
|
|
106
110
|
factory: () => null, // Most categories won't have a parent
|
|
107
111
|
},
|
|
@@ -55,6 +55,7 @@ export default defineModel({
|
|
|
55
55
|
description: {
|
|
56
56
|
order: 2,
|
|
57
57
|
fillable: true,
|
|
58
|
+
type: 'text',
|
|
58
59
|
validation: {
|
|
59
60
|
rule: schema.string(),
|
|
60
61
|
},
|
|
@@ -145,7 +146,9 @@ export default defineModel({
|
|
|
145
146
|
validation: {
|
|
146
147
|
rule: schema.string(),
|
|
147
148
|
},
|
|
148
|
-
|
|
149
|
+
// Stored and shown, never resolved: nothing redeems or joins on it yet,
|
|
150
|
+
// so what it holds is left to the feature that does. No factory, so a
|
|
151
|
+
// seed does not invent one (stacksjs/stacks#3002).
|
|
149
152
|
},
|
|
150
153
|
|
|
151
154
|
usageLimit: {
|
|
@@ -98,7 +98,9 @@ export default defineModel({
|
|
|
98
98
|
validation: {
|
|
99
99
|
rule: schema.string(),
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
// Stored and shown, never resolved: nothing redeems or joins on it yet,
|
|
102
|
+
// so what it holds is left to the feature that does. No factory, so a
|
|
103
|
+
// seed does not invent one (stacksjs/stacks#3002).
|
|
102
104
|
},
|
|
103
105
|
|
|
104
106
|
isActive: {
|
|
@@ -142,6 +142,7 @@ export default defineModel({
|
|
|
142
142
|
personal: true,
|
|
143
143
|
order: 11,
|
|
144
144
|
fillable: true,
|
|
145
|
+
type: 'text',
|
|
145
146
|
validation: {
|
|
146
147
|
rule: schema.string(),
|
|
147
148
|
},
|
|
@@ -199,7 +200,9 @@ export default defineModel({
|
|
|
199
200
|
validation: {
|
|
200
201
|
rule: schema.string(),
|
|
201
202
|
},
|
|
202
|
-
|
|
203
|
+
// Stored and shown, never resolved: nothing redeems or joins on it yet,
|
|
204
|
+
// so what it holds is left to the feature that does. No factory, so a
|
|
205
|
+
// seed does not invent one (stacksjs/stacks#3002).
|
|
203
206
|
},
|
|
204
207
|
},
|
|
205
208
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineModel } from '@stacksjs/orm'
|
|
2
|
+
import { slug } from '@stacksjs/strings'
|
|
2
3
|
import { schema } from '@stacksjs/validation/runtime'
|
|
3
4
|
|
|
4
5
|
export default defineModel({
|
|
@@ -56,9 +57,22 @@ export default defineModel({
|
|
|
56
57
|
factory: faker => faker.commerce.productName(),
|
|
57
58
|
},
|
|
58
59
|
|
|
60
|
+
// The storefront's address for a product: /products/{slug}, and what a
|
|
61
|
+
// cart line keeps in product_sku (stacksjs/stacks#3005).
|
|
62
|
+
slug: {
|
|
63
|
+
order: 1,
|
|
64
|
+
unique: true,
|
|
65
|
+
fillable: true,
|
|
66
|
+
validation: {
|
|
67
|
+
rule: schema.string().required().max(255),
|
|
68
|
+
},
|
|
69
|
+
factory: (_faker, attributes) => slug(String(attributes.name)),
|
|
70
|
+
},
|
|
71
|
+
|
|
59
72
|
description: {
|
|
60
73
|
order: 2,
|
|
61
74
|
fillable: true,
|
|
75
|
+
type: 'text',
|
|
62
76
|
validation: {
|
|
63
77
|
rule: schema.string(),
|
|
64
78
|
},
|
|
@@ -139,6 +153,7 @@ export default defineModel({
|
|
|
139
153
|
nutritionalInfo: {
|
|
140
154
|
order: 10,
|
|
141
155
|
fillable: true,
|
|
156
|
+
type: 'text',
|
|
142
157
|
validation: {
|
|
143
158
|
rule: schema.string(),
|
|
144
159
|
},
|
|
@@ -77,6 +77,7 @@ export default defineModel({
|
|
|
77
77
|
description: {
|
|
78
78
|
order: 5,
|
|
79
79
|
fillable: true,
|
|
80
|
+
type: 'text',
|
|
80
81
|
validation: {
|
|
81
82
|
rule: schema.string(),
|
|
82
83
|
},
|
|
@@ -86,6 +87,7 @@ export default defineModel({
|
|
|
86
87
|
options: {
|
|
87
88
|
order: 6,
|
|
88
89
|
fillable: true,
|
|
90
|
+
type: 'text',
|
|
89
91
|
validation: {
|
|
90
92
|
rule: schema.string(),
|
|
91
93
|
},
|
|
@@ -34,7 +34,9 @@ export default defineModel({
|
|
|
34
34
|
observe: true,
|
|
35
35
|
},
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
// The order a storefront review was left for: one review per product per
|
|
38
|
+
// order, and the proof the reviewer bought it (stacksjs/stacks#3017).
|
|
39
|
+
belongsTo: ['Product', 'Customer', 'Order'],
|
|
38
40
|
|
|
39
41
|
attributes: {
|
|
40
42
|
/**
|
|
@@ -72,7 +72,10 @@ export default defineModel({
|
|
|
72
72
|
order: 4,
|
|
73
73
|
fillable: true,
|
|
74
74
|
validation: {
|
|
75
|
-
|
|
75
|
+
// A Unix timestamp in milliseconds, so a bigint column: `number()`
|
|
76
|
+
// generated a 32-bit integer that Date.now() overflows on PostgreSQL
|
|
77
|
+
// and MySQL (stacksjs/stacks#2996).
|
|
78
|
+
rule: schema.unix(),
|
|
76
79
|
message: {
|
|
77
80
|
date: 'Time must be a valid timestamp',
|
|
78
81
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from 'bun:test'
|
|
2
|
-
import { formErrorMessages } from './dashboard-form'
|
|
2
|
+
import { formErrorMessages, slugify } from './dashboard-form'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* stacksjs/stacks#2918 — this was duplicated across fourteen dialogs. The
|
|
@@ -39,3 +39,12 @@ describe('formErrorMessages', () => {
|
|
|
39
39
|
expect(formErrorMessages({ Name: 'is required' })).toEqual(['Name: is required'])
|
|
40
40
|
})
|
|
41
41
|
})
|
|
42
|
+
|
|
43
|
+
describe('slugify', () => {
|
|
44
|
+
it('turns a name into the slug a dialog proposes', () => {
|
|
45
|
+
expect(slugify('Trail Runner')).toBe('trail-runner')
|
|
46
|
+
expect(slugify(' Café & Bar ')).toBe('cafe-bar')
|
|
47
|
+
expect(slugify('50% off: Summer!')).toBe('50-off-summer')
|
|
48
|
+
expect(slugify('---')).toBe('')
|
|
49
|
+
})
|
|
50
|
+
})
|
|
@@ -28,3 +28,20 @@ export function formErrorMessages(errors: Record<string, string>): string[] {
|
|
|
28
28
|
return `${label.charAt(0).toUpperCase()}${label.slice(1)}: ${message}`
|
|
29
29
|
})
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A slug a dialog proposes from a name: accents folded, lowercase, and every
|
|
34
|
+
* run of anything but a letter or digit one hyphen.
|
|
35
|
+
*
|
|
36
|
+
* The category dialog defined this inline; the product dialog needs the same
|
|
37
|
+
* rule (stacksjs/stacks#3005), so it lives here once.
|
|
38
|
+
*/
|
|
39
|
+
export function slugify(value: string): string {
|
|
40
|
+
return value
|
|
41
|
+
.normalize('NFKD')
|
|
42
|
+
.replace(/[̀-ͯ]/g, '')
|
|
43
|
+
.toLowerCase()
|
|
44
|
+
.trim()
|
|
45
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
46
|
+
.replace(/^-+|-+$/g, '')
|
|
47
|
+
}
|
package/ide/vscode/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.320",
|
|
6
6
|
"description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.320",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@iconify-json/f7": "^1.2.2",
|
|
47
47
|
"@iconify-json/hugeicons": "^1.2.35",
|
|
48
|
-
"@stacksjs/mobile": "0.75.
|
|
49
|
-
"@stacksjs/sanitizer": "0.2.
|
|
50
|
-
"@stacksjs/stx": "0.2.
|
|
48
|
+
"@stacksjs/mobile": "0.75.320",
|
|
49
|
+
"@stacksjs/sanitizer": "0.2.711",
|
|
50
|
+
"@stacksjs/stx": "0.2.711",
|
|
51
51
|
"@xterm/addon-fit": "^0.11.0",
|
|
52
52
|
"@xterm/xterm": "^6.0.0",
|
|
53
53
|
"ts-qr-codes": "^0.1.8"
|
|
@@ -4,7 +4,7 @@ const description = useReactiveProp('description', '')
|
|
|
4
4
|
const dateRange = useReactiveProp('dateRange', '')
|
|
5
5
|
const range = useReactiveProp('range', 'month')
|
|
6
6
|
const loading = useReactiveProp('loading', false)
|
|
7
|
-
const emit = defineEmits()
|
|
7
|
+
const emit = defineEmits(['range-change', 'refresh'])
|
|
8
8
|
const selectedRange = state('month')
|
|
9
9
|
|
|
10
10
|
effect(() => {
|
|
@@ -28,7 +28,7 @@ const expiryMinutes = state('10080')
|
|
|
28
28
|
const selectedScopes = state<string[]>(['read'])
|
|
29
29
|
const localError = state('')
|
|
30
30
|
const copied = state(false)
|
|
31
|
-
const emit = defineEmits()
|
|
31
|
+
const emit = defineEmits(['submit', 'close'])
|
|
32
32
|
let wasOpen = false
|
|
33
33
|
|
|
34
34
|
effect(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import('../UI/Input', '../UI/Button')
|
|
2
2
|
|
|
3
3
|
<script client>
|
|
4
|
-
const emit = defineEmits()
|
|
4
|
+
const emit = defineEmits(['submit', 'retry'])
|
|
5
5
|
const title = useReactiveProp<string>('title', 'Forgot password?')
|
|
6
6
|
const subtitle = useReactiveProp<string>('subtitle', 'Enter your email and we\'ll send you a reset link')
|
|
7
7
|
const isLoading = useReactiveProp<boolean>('isLoading', false)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import('../UI/Input', '../UI/Button')
|
|
2
2
|
|
|
3
3
|
<script client>
|
|
4
|
-
const emit = defineEmits()
|
|
4
|
+
const emit = defineEmits(['submit'])
|
|
5
5
|
const title = useReactiveProp<string>('title', 'Welcome back')
|
|
6
6
|
const subtitle = useReactiveProp<string>('subtitle', 'Sign in to your account')
|
|
7
7
|
const isLoading = useReactiveProp<boolean>('isLoading', false)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import('../UI/Input', '../UI/Button')
|
|
2
2
|
|
|
3
3
|
<script client>
|
|
4
|
-
const emit = defineEmits()
|
|
4
|
+
const emit = defineEmits(['submit'])
|
|
5
5
|
const title = useReactiveProp<string>('title', 'Create an account')
|
|
6
6
|
const subtitle = useReactiveProp<string>('subtitle', 'Get started with your free account')
|
|
7
7
|
const isLoading = useReactiveProp<boolean>('isLoading', false)
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
--}}
|
|
14
14
|
|
|
15
15
|
<script client>
|
|
16
|
-
const emit = defineEmits()
|
|
16
|
+
const emit = defineEmits(['submit'])
|
|
17
17
|
const title = useReactiveProp<string>('title', 'Choose a new password')
|
|
18
18
|
const subtitle = useReactiveProp<string>('subtitle', 'Set the password you will use to sign in')
|
|
19
19
|
const isLoading = useReactiveProp<boolean>('isLoading', false)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import('../UI/Input', '../UI/Button')
|
|
2
2
|
|
|
3
3
|
<script client>
|
|
4
|
-
const emit = defineEmits()
|
|
4
|
+
const emit = defineEmits(['submit', 'restart'])
|
|
5
5
|
const isLoading = useReactiveProp<boolean>('isLoading', false)
|
|
6
6
|
const error = useReactiveProp<string>('error', '')
|
|
7
7
|
const code = state('')
|
|
@@ -6,7 +6,7 @@ const liveLanguage = useReactiveProp('language', 'text' as CodeEditorLanguage)
|
|
|
6
6
|
const liveLabel = useReactiveProp('label', 'Code editor')
|
|
7
7
|
const liveLoading = useReactiveProp('loading', false)
|
|
8
8
|
const liveReadonly = useReactiveProp('readonly', false)
|
|
9
|
-
const emit = defineEmits()
|
|
9
|
+
const emit = defineEmits(['update:value', 'input', 'save', 'format'])
|
|
10
10
|
|
|
11
11
|
const lineCount = derived(() => Math.max(1, liveValue().split('\n').length))
|
|
12
12
|
const characterCount = derived(() => liveValue().length)
|
|
@@ -10,7 +10,7 @@ const loading = useReactiveProp('loading', false)
|
|
|
10
10
|
const sortResetKey = useReactiveProp<unknown>('sortResetKey', '')
|
|
11
11
|
/** The parent's search and filters: a change returns to the first page. */
|
|
12
12
|
const pageResetKey = useReactiveProp<unknown>('pageResetKey', '')
|
|
13
|
-
const emit = defineEmits()
|
|
13
|
+
const emit = defineEmits(['view', 'edit', 'delete'])
|
|
14
14
|
|
|
15
15
|
function parentName(record: CommerceCategoryRecord): string {
|
|
16
16
|
if (!record.parentCategoryId)
|
|
@@ -4,7 +4,7 @@ import type { CommerceCategoryRecord } from '../../../../app/Actions/Dashboard/C
|
|
|
4
4
|
const open = useReactiveProp('open', false)
|
|
5
5
|
const record = useReactiveProp('record', null as CommerceCategoryRecord | null)
|
|
6
6
|
const busy = useReactiveProp('busy', false)
|
|
7
|
-
const emit = defineEmits()
|
|
7
|
+
const emit = defineEmits(['close', 'confirm'])
|
|
8
8
|
const description = derived(() => `Delete "${record()?.name || 'Unnamed category'}" permanently? Linked products and child categories may prevent deletion.`)
|
|
9
9
|
</script>
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ import type { CommerceCategoryRecord } from '../../../../app/Actions/Dashboard/C
|
|
|
4
4
|
const open = useReactiveProp('open', false)
|
|
5
5
|
const record = useReactiveProp('record', null as CommerceCategoryRecord | null)
|
|
6
6
|
const records = useReactiveProp('records', [] as CommerceCategoryRecord[])
|
|
7
|
-
const emit = defineEmits()
|
|
7
|
+
const emit = defineEmits(['edit', 'close', 'delete'])
|
|
8
8
|
|
|
9
9
|
function parentName(): string {
|
|
10
10
|
const parentId = record()?.parentCategoryId
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script client>
|
|
2
2
|
import type { CommerceCategoryRecord } from '../../../../app/Actions/Dashboard/Commerce/commerce-category-records'
|
|
3
|
-
import { formErrorMessages } from '../../../../functions/dashboard-form'
|
|
3
|
+
import { formErrorMessages, slugify } from '../../../../functions/dashboard-form'
|
|
4
4
|
|
|
5
5
|
const open = useReactiveProp('open', false)
|
|
6
6
|
const mode = useReactiveProp('mode', 'add')
|
|
@@ -8,7 +8,7 @@ const record = useReactiveProp('record', null as CommerceCategoryRecord | null)
|
|
|
8
8
|
const records = useReactiveProp('records', [] as CommerceCategoryRecord[])
|
|
9
9
|
const busy = useReactiveProp('busy', false)
|
|
10
10
|
const errors = useReactiveProp('errors', {} as Record<string, string>)
|
|
11
|
-
const emit = defineEmits()
|
|
11
|
+
const emit = defineEmits(['submit', 'close'])
|
|
12
12
|
const name = state('')
|
|
13
13
|
const description = state('')
|
|
14
14
|
const slug = state('')
|
|
@@ -19,16 +19,6 @@ const displayOrder = state('0')
|
|
|
19
19
|
let hydrationKey = ''
|
|
20
20
|
let slugTouched = false
|
|
21
21
|
|
|
22
|
-
function slugify(value: string): string {
|
|
23
|
-
return value
|
|
24
|
-
.normalize('NFKD')
|
|
25
|
-
.replace(/[\u0300-\u036F]/g, '')
|
|
26
|
-
.toLowerCase()
|
|
27
|
-
.trim()
|
|
28
|
-
.replace(/[^a-z0-9]+/g, '-')
|
|
29
|
-
.replace(/^-+|-+$/g, '')
|
|
30
|
-
}
|
|
31
|
-
|
|
32
22
|
effect(() => {
|
|
33
23
|
if (!open()) {
|
|
34
24
|
hydrationKey = ''
|
|
@@ -108,7 +98,8 @@ function submit(): void {
|
|
|
108
98
|
slug: slugify(slug()),
|
|
109
99
|
imageUrl: imageUrl().trim(),
|
|
110
100
|
isActive: isActive(),
|
|
111
|
-
|
|
101
|
+
// The select holds the id as text; the model declares a number (#3013).
|
|
102
|
+
parentCategoryId: parentCategoryId() ? Number(parentCategoryId()) : null,
|
|
112
103
|
displayOrder: Number(displayOrder()),
|
|
113
104
|
})
|
|
114
105
|
}
|
|
@@ -4,7 +4,7 @@ import type { CouponRecord } from '../../../../app/Actions/Dashboard/Commerce/co
|
|
|
4
4
|
const open = useReactiveProp('open', false)
|
|
5
5
|
const record = useReactiveProp('record', null as CouponRecord | null)
|
|
6
6
|
const busy = useReactiveProp('busy', false)
|
|
7
|
-
const emit = defineEmits()
|
|
7
|
+
const emit = defineEmits(['close', 'confirm'])
|
|
8
8
|
const description = derived(() => `Delete "${record()?.code || 'Unnamed coupon'}" permanently? Recorded order relationships may prevent deletion.`)
|
|
9
9
|
</script>
|
|
10
10
|
|
|
@@ -5,7 +5,7 @@ import { formatCurrency } from '@stacksjs/commerce/money'
|
|
|
5
5
|
const open = useReactiveProp('open', false)
|
|
6
6
|
const record = useReactiveProp('record', null as CouponRecord | null)
|
|
7
7
|
const currency = useReactiveProp('currency', 'USD')
|
|
8
|
-
const emit = defineEmits()
|
|
8
|
+
const emit = defineEmits(['edit', 'close', 'delete'])
|
|
9
9
|
|
|
10
10
|
// Fixed discounts and order thresholds are integer minor units.
|
|
11
11
|
function money(value: number): string {
|
|
@@ -13,7 +13,7 @@ const record = useReactiveProp('record', null as CouponRecord | null)
|
|
|
13
13
|
const currency = useReactiveProp('currency', 'USD')
|
|
14
14
|
const busy = useReactiveProp('busy', false)
|
|
15
15
|
const errors = useReactiveProp('errors', {} as Record<string, string>)
|
|
16
|
-
const emit = defineEmits()
|
|
16
|
+
const emit = defineEmits(['submit', 'close'])
|
|
17
17
|
const code = state('')
|
|
18
18
|
const description = state('')
|
|
19
19
|
const status = state<CouponStatus>('Active')
|
|
@@ -11,7 +11,7 @@ const sortResetKey = useReactiveProp<unknown>('sortResetKey', '')
|
|
|
11
11
|
/** The parent's search and filters: a change returns to the first page. */
|
|
12
12
|
const pageResetKey = useReactiveProp<unknown>('pageResetKey', '')
|
|
13
13
|
const currency = useReactiveProp('currency', 'USD')
|
|
14
|
-
const emit = defineEmits()
|
|
14
|
+
const emit = defineEmits(['view', 'edit', 'delete'])
|
|
15
15
|
|
|
16
16
|
// A percentage is a rate, not money; a fixed amount is integer minor units.
|
|
17
17
|
function discount(record: CouponRecord): string {
|
|
@@ -4,7 +4,7 @@ import type { CommerceCustomerRecord } from '../../../../app/Actions/Dashboard/C
|
|
|
4
4
|
const open = useReactiveProp('open', false)
|
|
5
5
|
const record = useReactiveProp('record', null as CommerceCustomerRecord | null)
|
|
6
6
|
const busy = useReactiveProp('busy', false)
|
|
7
|
-
const emit = defineEmits()
|
|
7
|
+
const emit = defineEmits(['close', 'confirm'])
|
|
8
8
|
const description = derived(() => `Delete "${record()?.name || 'Unnamed customer'}" permanently? Linked orders, reviews, payments, and gift cards may prevent deletion.`)
|
|
9
9
|
</script>
|
|
10
10
|
|
|
@@ -5,7 +5,7 @@ import { formatCurrency } from '@stacksjs/commerce/money'
|
|
|
5
5
|
const open = useReactiveProp('open', false)
|
|
6
6
|
const record = useReactiveProp('record', null as CommerceCustomerRecord | null)
|
|
7
7
|
const currency = useReactiveProp('currency', 'USD')
|
|
8
|
-
const emit = defineEmits()
|
|
8
|
+
const emit = defineEmits(['edit', 'close', 'delete'])
|
|
9
9
|
|
|
10
10
|
function formatMoney(value: number): string {
|
|
11
11
|
return formatCurrency(value, currency())
|
|
@@ -9,7 +9,7 @@ const record = useReactiveProp('record', null as CommerceCustomerRecord | null)
|
|
|
9
9
|
const currency = useReactiveProp('currency', 'USD')
|
|
10
10
|
const busy = useReactiveProp('busy', false)
|
|
11
11
|
const errors = useReactiveProp('errors', {} as Record<string, string>)
|
|
12
|
-
const emit = defineEmits()
|
|
12
|
+
const emit = defineEmits(['submit', 'close'])
|
|
13
13
|
const name = state('')
|
|
14
14
|
const email = state('')
|
|
15
15
|
const phone = state('')
|
|
@@ -10,7 +10,7 @@ const sortResetKey = useReactiveProp<unknown>('sortResetKey', '')
|
|
|
10
10
|
/** The parent's search and filters: a change returns to the first page. */
|
|
11
11
|
const pageResetKey = useReactiveProp<unknown>('pageResetKey', '')
|
|
12
12
|
const currency = useReactiveProp('currency', 'USD')
|
|
13
|
-
const emit = defineEmits()
|
|
13
|
+
const emit = defineEmits(['view', 'edit', 'delete'])
|
|
14
14
|
|
|
15
15
|
/** Only the customer cell is slotted, for its initial. */
|
|
16
16
|
const COLUMNS = [
|