@mohasinac/appkit 4.9.0 → 4.9.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.
@@ -112,7 +112,7 @@ export function ProductForm({ product, onChange, isReadonly = false, renderDescr
112
112
  name: product.title || "product",
113
113
  category: (product.categorySlugs?.[0] ?? product.category) || "uncategorized",
114
114
  store: product.storeName || "store",
115
- }), onChange: (url) => update({ mainImage: url }), label: t("formMainImage"), helperText: "Recommended: 800x800px (1:1)" })), isReadonly && product.mainImage && (_jsx(FormField, { name: "mainImage", label: t("formMainImage"), type: "text", value: product.mainImage, onChange: () => { }, disabled: true })), !isReadonly && (_jsx(MediaUploadList, { label: t("formGalleryImages"), value: galleryImages, onChange: (fields) => update({ images: fields.map((f) => f.url) }), onUpload: handleGalleryUpload, accept: "image/*,video/*", maxItems: 5, maxSizeMB: 10, helperText: t("formGalleryImagesHelper"), onAbort: onMediaAbort })), !isReadonly && (_jsx(MediaUploadField, { label: t("formVideo"), value: product.video?.url || "", onChange: (url) => update({
115
+ }), onChange: (url) => update({ mainImage: url }), label: t("formMainImage"), helperText: "Recommended: 800x800px (1:1)" })), isReadonly && product.mainImage && (_jsx(FormField, { name: "mainImage", label: t("formMainImage"), type: "text", value: product.mainImage, onChange: () => { }, disabled: true })), !isReadonly && (_jsx(MediaUploadList, { label: t("formGalleryImages"), value: galleryImages, onChange: (fields) => update({ images: fields.map((f) => f.url) }), onUpload: handleGalleryUpload, accept: "image/*,video/*", maxItems: 5, maxSizeMB: 10, helperText: t("formGalleryImagesHelper"), onAbort: onMediaAbort })), !isReadonly && (_jsx(MediaUploadField, { label: product.listingType === "live" ? `${t("formVideo")} *` : t("formVideo"), value: product.video?.url || "", onChange: (url) => update({
116
116
  video: url
117
117
  ? {
118
118
  url,
@@ -137,7 +137,9 @@ export function ProductForm({ product, onChange, isReadonly = false, renderDescr
137
137
  thumbnailUrl: media.thumbnailUrl,
138
138
  },
139
139
  });
140
- }, onUpload: handleVideoUpload, accept: "video/*", maxSizeMB: 50, helperText: t("formVideoHelper"), onAbort: onMediaAbort })), _jsx(TagInput, { label: t("formTags"), value: product.tags || [], onChange: (tags) => update({ tags }), disabled: isReadonly, placeholder: t("formTagsPlaceholder") }), _jsxs(FormGroup, { columns: 2, children: [_jsx(Checkbox, { label: t("formFeatured"), checked: !!product.featured, onChange: (e) => update({ featured: e.target.checked }), disabled: isReadonly }), _jsx(Checkbox, { label: t("formIsPromoted"), checked: !!product.isPromoted, onChange: (e) => update({ isPromoted: e.target.checked }), disabled: isReadonly }), _jsx(Checkbox, { label: t("formAllowShipBeforeEmiComplete"), checked: !!product.allowShipBeforeEmiComplete, onChange: (e) => update({ allowShipBeforeEmiComplete: e.target.checked }), disabled: isReadonly }), _jsx(Checkbox, { label: t("formAllowOffers"), checked: !!product.allowOffers, onChange: (e) => update({
140
+ }, onUpload: handleVideoUpload, accept: "video/*", maxSizeMB: 50, helperText: product.listingType === "live"
141
+ ? "Required for live listings — buyers must see the actual animal/plant moving before purchase."
142
+ : t("formVideoHelper"), onAbort: onMediaAbort })), _jsx(TagInput, { label: t("formTags"), value: product.tags || [], onChange: (tags) => update({ tags }), disabled: isReadonly, placeholder: t("formTagsPlaceholder") }), _jsxs(FormGroup, { columns: 2, children: [_jsx(Checkbox, { label: t("formFeatured"), checked: !!product.featured, onChange: (e) => update({ featured: e.target.checked }), disabled: isReadonly }), _jsx(Checkbox, { label: t("formIsPromoted"), checked: !!product.isPromoted, onChange: (e) => update({ isPromoted: e.target.checked }), disabled: isReadonly }), _jsx(Checkbox, { label: t("formAllowShipBeforeEmiComplete"), checked: !!product.allowShipBeforeEmiComplete, onChange: (e) => update({ allowShipBeforeEmiComplete: e.target.checked }), disabled: isReadonly }), _jsx(Checkbox, { label: t("formAllowOffers"), checked: !!product.allowOffers, onChange: (e) => update({
141
143
  allowOffers: e.target.checked,
142
144
  minOfferPercent: e.target.checked ? product.minOfferPercent ?? 50 : undefined,
143
145
  }), disabled: isReadonly })] }), product.allowOffers && (_jsxs(_Fragment, { children: [_jsx(Alert, { variant: "info", title: t("formAllowOffersHelp"), children: t("formAllowOffersHelp") }), _jsx(FormField, { name: "minOfferPercent", label: t("formMinOfferPercent"), type: "number", value: String(product.minOfferPercent ?? ""), onChange: (value) => update({ minOfferPercent: Number(value) }), disabled: isReadonly, placeholder: "50" })] })), _jsx(Heading, { level: 4, className: "mt-4", children: t("sectionTaxGst") }), _jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "gstRate", label: t("formGstRate"), type: "select",
@@ -379,8 +379,8 @@ export const productsTesterSeedData = [
379
379
  withTokens({
380
380
  id: "live-tester-sandbox-1",
381
381
  slug: "live-tester-sandbox-1",
382
- title: "Test Live Item — Watch Me!",
383
- description: "Disposable test live-item listing for the tester QA program. Auto-expires in 7 days.",
382
+ title: "Test Live Item — Golden Retriever Puppy",
383
+ description: "Disposable test live-item listing for the tester QA program (verifies the mandatory-video rule, gallery video slide, and watermark on a real animal listing). Auto-expires in 7 days.",
384
384
  categorySlugs: COLLECTIBLES_CATEGORY_SLUGS,
385
385
  categoryNames: COLLECTIBLES_CATEGORY_NAMES,
386
386
  brandSlug: "brand-tester-sandbox",
@@ -392,7 +392,16 @@ export const productsTesterSeedData = [
392
392
  listingType: "live",
393
393
  images: [seedExtMedia("https://picsum.photos/seed/live-image-tester-sandbox-1-20260101/900/900")],
394
394
  mainImage: seedExtMedia("https://picsum.photos/seed/live-image-tester-sandbox-1-20260101/900/900"),
395
- video: { url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" },
395
+ // Real, directly-playable dog video (a raw <video> element, not routed through
396
+ // /api/media/ext which is image-only — Root Cause #27) — Wikimedia Commons,
397
+ // CC-BY-SA 4.0, https://commons.wikimedia.org/wiki/File:Slow_motion_of_running_greyhound.webm.
398
+ // Exercises the mandatory-video-for-live rule + gallery video slide + watermark
399
+ // on a genuine "animal actually moving" clip instead of a broken YouTube watch-page URL.
400
+ video: {
401
+ url: "https://upload.wikimedia.org/wikipedia/commons/4/42/Slow_motion_of_running_greyhound.webm", // audit-seed-external-url-ok: raw <video> src, CC-BY-SA 4.0 (Wikimedia Commons)
402
+ thumbnailUrl: seedExtMedia("https://picsum.photos/seed/live-video-thumb-tester-sandbox-1-20260101/800/450"),
403
+ duration: 14,
404
+ },
396
405
  isSold: false,
397
406
  stockQuantity: 1,
398
407
  availableQuantity: 1,
@@ -401,9 +410,9 @@ export const productsTesterSeedData = [
401
410
  isPromoted: false,
402
411
  isOnSale: false,
403
412
  liveItem: {
404
- species: "Test Species",
413
+ species: "Dog (Golden Retriever)",
405
414
  ageMonths: 6,
406
- sex: "n/a",
415
+ sex: "male",
407
416
  careInfo: "Disposable test care info for the tester QA program.",
408
417
  transport: { method: "courier", handlingFee: 100, insuranceIncluded: true },
409
418
  jurisdictionAllowed: ["IN-KA", "IN-MH"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohasinac/appkit",
3
- "version": "4.9.0",
3
+ "version": "4.9.1",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"