@wix/himalaya-cli 0.1496.0 → 0.1498.0

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.
Files changed (138) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/attendance-classifier.d.ts +37 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/catalog-pricing-contract.d.ts +1 -1
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/index.d.ts +2 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +11 -3
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/apple-iap-contract.d.ts +27 -3
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/commerce-contract.d.ts +1 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance.d.ts +10 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/index.d.ts +1 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/index.d.ts +1 -1
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +33 -2
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +346 -26
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +132 -3
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +366 -48
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +5 -0
  15. package/dist/cli.mjs +817 -666
  16. package/guides/iap-products.md +7 -1
  17. package/package.json +2 -2
  18. package/templates/beauty-salon/dev/index.ts +394 -0
  19. package/templates/beauty-salon/tier5-src/_shared/iap-attendance-form.ts +106 -0
  20. package/templates/beauty-salon/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  21. package/templates/beauty-salon/tier5-src/_shared/iap-attendance.ts +38 -0
  22. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +52 -7
  23. package/templates/beauty-salon-owner/dev/index.ts +571 -0
  24. package/templates/beauty-salon-owner/himalaya.content.json +6 -0
  25. package/templates/beauty-salon-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  26. package/templates/beauty-salon-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  27. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  28. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  29. package/templates/branded-lite/dev/index.ts +1429 -278
  30. package/templates/branded-lite/tier5-src/_shared/business-chat-presenter.ts +46 -8
  31. package/templates/branded-lite/tier5-src/_shared/iap-attendance-form.ts +106 -0
  32. package/templates/branded-lite/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  33. package/templates/branded-lite/tier5-src/_shared/iap-attendance.ts +38 -0
  34. package/templates/branded-lite/tier5-src/business-chat/index.ts +3 -2
  35. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +52 -7
  36. package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +112 -21
  37. package/templates/community-club/dev/index.ts +397 -2
  38. package/templates/community-club/tier5-src/_shared/iap-attendance-form.ts +106 -0
  39. package/templates/community-club/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  40. package/templates/community-club/tier5-src/_shared/iap-attendance.ts +38 -0
  41. package/templates/community-club/tier5-src/himi-events-detail/index.ts +112 -21
  42. package/templates/community-club-owner/dev/index.ts +571 -0
  43. package/templates/community-club-owner/himalaya.content.json +6 -0
  44. package/templates/community-club-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  45. package/templates/community-club-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  46. package/templates/community-club-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  47. package/templates/community-club-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  48. package/templates/events-meetups/dev/index.ts +397 -2
  49. package/templates/events-meetups/tier5-src/_shared/iap-attendance-form.ts +106 -0
  50. package/templates/events-meetups/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  51. package/templates/events-meetups/tier5-src/_shared/iap-attendance.ts +38 -0
  52. package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +112 -21
  53. package/templates/events-meetups-owner/dev/index.ts +571 -0
  54. package/templates/events-meetups-owner/himalaya.content.json +6 -0
  55. package/templates/events-meetups-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  56. package/templates/events-meetups-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  57. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  58. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  59. package/templates/gym-fitness/dev/index.ts +828 -39
  60. package/templates/gym-fitness/tier5-src/_shared/iap-attendance-form.ts +106 -0
  61. package/templates/gym-fitness/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  62. package/templates/gym-fitness/tier5-src/_shared/iap-attendance.ts +38 -0
  63. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +52 -7
  64. package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +112 -21
  65. package/templates/gym-fitness-owner/dev/index.ts +571 -0
  66. package/templates/gym-fitness-owner/himalaya.content.json +6 -0
  67. package/templates/gym-fitness-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  68. package/templates/gym-fitness-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  69. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  70. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  71. package/templates/nonprofit-cause/dev/index.ts +397 -2
  72. package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance-form.ts +106 -0
  73. package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  74. package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance.ts +38 -0
  75. package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +112 -21
  76. package/templates/nonprofit-cause-owner/dev/index.ts +571 -0
  77. package/templates/nonprofit-cause-owner/himalaya.content.json +6 -0
  78. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  79. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  80. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  81. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  82. package/templates/owner-lite/dev/index.ts +571 -0
  83. package/templates/owner-lite/himalaya.content.json +6 -0
  84. package/templates/owner-lite/tier5-src/_shared/owner-today-rollup.ts +307 -0
  85. package/templates/owner-lite/tier5-src/_shared/owner-widget-reads.ts +23 -0
  86. package/templates/owner-lite/tier5-src/himi-owner-lite-today/index.ts +8 -20
  87. package/templates/owner-lite/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  88. package/templates/podcast-creator/dev/index.ts +397 -2
  89. package/templates/podcast-creator/tier5-src/_shared/iap-attendance-form.ts +106 -0
  90. package/templates/podcast-creator/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  91. package/templates/podcast-creator/tier5-src/_shared/iap-attendance.ts +38 -0
  92. package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +112 -21
  93. package/templates/podcast-creator-owner/dev/index.ts +571 -0
  94. package/templates/podcast-creator-owner/himalaya.content.json +6 -0
  95. package/templates/podcast-creator-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  96. package/templates/podcast-creator-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  97. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  98. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  99. package/templates/portfolio-creative/dev/index.ts +397 -2
  100. package/templates/portfolio-creative/tier5-src/_shared/iap-attendance-form.ts +106 -0
  101. package/templates/portfolio-creative/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  102. package/templates/portfolio-creative/tier5-src/_shared/iap-attendance.ts +38 -0
  103. package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +112 -21
  104. package/templates/portfolio-creative-owner/dev/index.ts +571 -0
  105. package/templates/portfolio-creative-owner/himalaya.content.json +6 -0
  106. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  107. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  108. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  109. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  110. package/templates/restaurant/dev/index.ts +397 -2
  111. package/templates/restaurant/tier5-src/_shared/iap-attendance-form.ts +106 -0
  112. package/templates/restaurant/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  113. package/templates/restaurant/tier5-src/_shared/iap-attendance.ts +38 -0
  114. package/templates/restaurant/tier5-src/himi-events-detail/index.ts +112 -21
  115. package/templates/restaurant-owner/dev/index.ts +571 -0
  116. package/templates/restaurant-owner/himalaya.content.json +6 -0
  117. package/templates/restaurant-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  118. package/templates/restaurant-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  119. package/templates/restaurant-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  120. package/templates/restaurant-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  121. package/templates/retail-store-owner/dev/index.ts +571 -0
  122. package/templates/retail-store-owner/himalaya.content.json +6 -0
  123. package/templates/retail-store-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  124. package/templates/retail-store-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  125. package/templates/retail-store-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  126. package/templates/retail-store-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  127. package/templates/yoga-studio/dev/index.ts +828 -39
  128. package/templates/yoga-studio/tier5-src/_shared/iap-attendance-form.ts +106 -0
  129. package/templates/yoga-studio/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  130. package/templates/yoga-studio/tier5-src/_shared/iap-attendance.ts +38 -0
  131. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +52 -7
  132. package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +112 -21
  133. package/templates/yoga-studio-owner/dev/index.ts +571 -0
  134. package/templates/yoga-studio-owner/himalaya.content.json +6 -0
  135. package/templates/yoga-studio-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  136. package/templates/yoga-studio-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  137. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  138. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
@@ -22715,6 +22715,398 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
22715
22715
  "hiddenPath": "$service:himiEventDetail.hideTierPicker"
22716
22716
  }
22717
22717
  },
22718
+ {
22719
+ "id": "",
22720
+ "body": {
22721
+ "package": "himalaya",
22722
+ "type": "VStack",
22723
+ "props": {
22724
+ "spacing": 12,
22725
+ "alignment": "leading",
22726
+ "children": [
22727
+ {
22728
+ "id": "",
22729
+ "body": {
22730
+ "package": "himalaya",
22731
+ "type": "Text",
22732
+ "props": {
22733
+ "text": "$service:himiEventDetail.iapPrice",
22734
+ "style": "bodyEmphasis",
22735
+ "collapseWhenEmpty": true
22736
+ }
22737
+ }
22738
+ },
22739
+ {
22740
+ "id": "himi_event.apple.form",
22741
+ "body": {
22742
+ "package": "himalaya",
22743
+ "type": "Grid",
22744
+ "props": {
22745
+ "columns": 1,
22746
+ "spacing": 12,
22747
+ "itemsPath": "$service:himiEventDetail.iapFields",
22748
+ "items": [
22749
+ {
22750
+ "id": "",
22751
+ "body": {
22752
+ "package": "himalaya",
22753
+ "type": "VStack",
22754
+ "props": {
22755
+ "spacing": 8,
22756
+ "alignment": "leading",
22757
+ "children": [
22758
+ {
22759
+ "id": "",
22760
+ "body": {
22761
+ "package": "himalaya",
22762
+ "type": "Text",
22763
+ "props": {
22764
+ "text": "$item.sectionLabel",
22765
+ "style": "bodyEmphasis",
22766
+ "collapseWhenEmpty": true
22767
+ }
22768
+ }
22769
+ },
22770
+ {
22771
+ "id": "",
22772
+ "body": {
22773
+ "package": "himalaya",
22774
+ "type": "Text",
22775
+ "props": {
22776
+ "text": "$item.label",
22777
+ "style": "footnote"
22778
+ }
22779
+ }
22780
+ },
22781
+ {
22782
+ "id": "himi_event.apple.input.$item.id",
22783
+ "body": {
22784
+ "package": "himalaya",
22785
+ "type": "FragmentSlot",
22786
+ "props": {
22787
+ "casePath": "$item.kind",
22788
+ "defaultCase": "text",
22789
+ "cases": [
22790
+ {
22791
+ "id": "text",
22792
+ "content": {
22793
+ "id": "himi_event.apple.field.text.$item.id",
22794
+ "body": {
22795
+ "package": "himalaya",
22796
+ "type": "TextField",
22797
+ "props": {
22798
+ "placeholder": "$item.inputLabel",
22799
+ "value": "$item.value",
22800
+ "onChange": {
22801
+ "actionId": "tier5.himiEventDetail.setIapField",
22802
+ "params": {
22803
+ "id": "$item.fieldId"
22804
+ }
22805
+ },
22806
+ "validation": {},
22807
+ "errorText": "$item.error",
22808
+ "autoCapitalization": "words"
22809
+ }
22810
+ }
22811
+ }
22812
+ },
22813
+ {
22814
+ "id": "requiredText",
22815
+ "content": {
22816
+ "id": "himi_event.apple.field.requiredText.$item.id",
22817
+ "body": {
22818
+ "package": "himalaya",
22819
+ "type": "TextField",
22820
+ "props": {
22821
+ "placeholder": "$item.inputLabel",
22822
+ "value": "$item.value",
22823
+ "onChange": {
22824
+ "actionId": "tier5.himiEventDetail.setIapField",
22825
+ "params": {
22826
+ "id": "$item.fieldId"
22827
+ }
22828
+ },
22829
+ "validation": {
22830
+ "required": true
22831
+ },
22832
+ "errorText": "$item.error",
22833
+ "autoCapitalization": "words"
22834
+ }
22835
+ }
22836
+ }
22837
+ },
22838
+ {
22839
+ "id": "email",
22840
+ "content": {
22841
+ "id": "himi_event.apple.field.email.$item.id",
22842
+ "body": {
22843
+ "package": "himalaya",
22844
+ "type": "TextField",
22845
+ "props": {
22846
+ "placeholder": "$item.inputLabel",
22847
+ "value": "$item.value",
22848
+ "onChange": {
22849
+ "actionId": "tier5.himiEventDetail.setIapField",
22850
+ "params": {
22851
+ "id": "$item.fieldId"
22852
+ }
22853
+ },
22854
+ "validation": {
22855
+ "required": true,
22856
+ "type": "email"
22857
+ },
22858
+ "errorText": "$item.error",
22859
+ "autoCapitalization": "none"
22860
+ }
22861
+ }
22862
+ }
22863
+ },
22864
+ {
22865
+ "id": "number",
22866
+ "content": {
22867
+ "id": "himi_event.apple.field.number.$item.id",
22868
+ "body": {
22869
+ "package": "himalaya",
22870
+ "type": "TextField",
22871
+ "props": {
22872
+ "placeholder": "$item.inputLabel",
22873
+ "value": "$item.value",
22874
+ "onChange": {
22875
+ "actionId": "tier5.himiEventDetail.setIapField",
22876
+ "params": {
22877
+ "id": "$item.fieldId"
22878
+ }
22879
+ },
22880
+ "validation": {
22881
+ "type": "number"
22882
+ },
22883
+ "errorText": "$item.error",
22884
+ "autoCapitalization": "words"
22885
+ }
22886
+ }
22887
+ }
22888
+ },
22889
+ {
22890
+ "id": "choice",
22891
+ "content": {
22892
+ "id": "",
22893
+ "body": {
22894
+ "package": "himalaya",
22895
+ "type": "VStack",
22896
+ "props": {
22897
+ "spacing": 4,
22898
+ "children": [
22899
+ {
22900
+ "id": "himi_event.apple.options.choice",
22901
+ "body": {
22902
+ "package": "himalaya",
22903
+ "type": "Grid",
22904
+ "props": {
22905
+ "columns": 1,
22906
+ "spacing": 8,
22907
+ "itemsPath": "$item.options",
22908
+ "items": [
22909
+ {
22910
+ "id": "himi_event.apple.option.choice.$item.fieldId.$item.id",
22911
+ "body": {
22912
+ "package": "himalaya",
22913
+ "type": "Button",
22914
+ "props": {
22915
+ "title": "$item.displayLabel",
22916
+ "style": "secondary",
22917
+ "fullWidth": true,
22918
+ "action": {
22919
+ "actionId": "tier5.himiEventDetail.setIapField",
22920
+ "params": {
22921
+ "id": "$item.fieldId",
22922
+ "option": "$item.id"
22923
+ }
22924
+ }
22925
+ }
22926
+ }
22927
+ }
22928
+ ]
22929
+ }
22930
+ }
22931
+ },
22932
+ {
22933
+ "id": "",
22934
+ "body": {
22935
+ "package": "himalaya",
22936
+ "type": "FieldError",
22937
+ "props": {
22938
+ "text": "$item.error"
22939
+ }
22940
+ },
22941
+ "modifiers": {
22942
+ "hiddenPath": "$item.errorHidden"
22943
+ }
22944
+ }
22945
+ ]
22946
+ }
22947
+ }
22948
+ }
22949
+ },
22950
+ {
22951
+ "id": "multiple",
22952
+ "content": {
22953
+ "id": "",
22954
+ "body": {
22955
+ "package": "himalaya",
22956
+ "type": "VStack",
22957
+ "props": {
22958
+ "spacing": 4,
22959
+ "children": [
22960
+ {
22961
+ "id": "himi_event.apple.options.multiple",
22962
+ "body": {
22963
+ "package": "himalaya",
22964
+ "type": "Grid",
22965
+ "props": {
22966
+ "columns": 1,
22967
+ "spacing": 8,
22968
+ "itemsPath": "$item.options",
22969
+ "items": [
22970
+ {
22971
+ "id": "himi_event.apple.option.multiple.$item.fieldId.$item.id",
22972
+ "body": {
22973
+ "package": "himalaya",
22974
+ "type": "Button",
22975
+ "props": {
22976
+ "title": "$item.displayLabel",
22977
+ "style": "secondary",
22978
+ "fullWidth": true,
22979
+ "action": {
22980
+ "actionId": "tier5.himiEventDetail.setIapField",
22981
+ "params": {
22982
+ "id": "$item.fieldId",
22983
+ "option": "$item.id"
22984
+ }
22985
+ }
22986
+ }
22987
+ }
22988
+ }
22989
+ ]
22990
+ }
22991
+ }
22992
+ },
22993
+ {
22994
+ "id": "",
22995
+ "body": {
22996
+ "package": "himalaya",
22997
+ "type": "FieldError",
22998
+ "props": {
22999
+ "text": "$item.error"
23000
+ }
23001
+ },
23002
+ "modifiers": {
23003
+ "hiddenPath": "$item.errorHidden"
23004
+ }
23005
+ }
23006
+ ]
23007
+ }
23008
+ }
23009
+ }
23010
+ }
23011
+ ]
23012
+ }
23013
+ }
23014
+ }
23015
+ ]
23016
+ }
23017
+ }
23018
+ }
23019
+ ]
23020
+ }
23021
+ },
23022
+ "modifiers": {
23023
+ "hiddenPath": "$service:himiEventDetail.iapFormHidden"
23024
+ }
23025
+ },
23026
+ {
23027
+ "id": "",
23028
+ "body": {
23029
+ "package": "himalaya",
23030
+ "type": "FieldError",
23031
+ "props": {
23032
+ "text": "",
23033
+ "textPath": "$service:himiEventDetail.iapFormError"
23034
+ }
23035
+ }
23036
+ },
23037
+ {
23038
+ "id": "himi_event.apple.buy",
23039
+ "body": {
23040
+ "package": "himalaya",
23041
+ "type": "Button",
23042
+ "props": {
23043
+ "title": "$service:himiEventDetail.iapBuyLabel",
23044
+ "disabledPath": "$service:himiEventDetail.iapBuyDisabled",
23045
+ "style": "primary",
23046
+ "fullWidth": true,
23047
+ "action": {
23048
+ "actionId": "tier5.himiEventDetail.buyApple"
23049
+ }
23050
+ }
23051
+ }
23052
+ },
23053
+ {
23054
+ "id": "",
23055
+ "body": {
23056
+ "package": "himalaya",
23057
+ "type": "Text",
23058
+ "props": {
23059
+ "text": "$service:himiEventDetail.iapNote",
23060
+ "style": "footnote",
23061
+ "color": "textSecondary",
23062
+ "collapseWhenEmpty": true
23063
+ }
23064
+ }
23065
+ },
23066
+ {
23067
+ "id": "himi_event.apple.signin",
23068
+ "body": {
23069
+ "package": "himalaya",
23070
+ "type": "Button",
23071
+ "props": {
23072
+ "title": "Sign in to purchase",
23073
+ "style": "secondary",
23074
+ "action": {
23075
+ "actionId": "himi.open",
23076
+ "params": {
23077
+ "screenId": "himi_account"
23078
+ }
23079
+ }
23080
+ }
23081
+ },
23082
+ "modifiers": {
23083
+ "hiddenPath": "$service:himiEventDetail.iapSignInHidden"
23084
+ }
23085
+ },
23086
+ {
23087
+ "id": "himi_event.apple.retry",
23088
+ "body": {
23089
+ "package": "himalaya",
23090
+ "type": "Button",
23091
+ "props": {
23092
+ "title": "Refresh purchase status",
23093
+ "style": "secondary",
23094
+ "action": {
23095
+ "actionId": "tier5.himiEventDetail.iapRefresh"
23096
+ }
23097
+ }
23098
+ },
23099
+ "modifiers": {
23100
+ "hiddenPath": "$service:himiEventDetail.iapRetryHidden"
23101
+ }
23102
+ }
23103
+ ]
23104
+ }
23105
+ },
23106
+ "modifiers": {
23107
+ "hiddenPath": "$service:himiEventDetail.iapBuyHidden"
23108
+ }
23109
+ },
22718
23110
  {
22719
23111
  "id": "himi_event.tickets",
22720
23112
  "body": {
@@ -22724,6 +23116,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
22724
23116
  "title": "Get tickets",
22725
23117
  "style": "primary",
22726
23118
  "fullWidth": true,
23119
+ "disabledPath": "$service:himiEventDetail.ticketPurchaseBlocked",
22727
23120
  "action": {
22728
23121
  "actionId": "tier5.himiEventDetail.openRegistration"
22729
23122
  }
@@ -22733,7 +23126,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
22733
23126
  "cornerRadius": 8,
22734
23127
  "pressFeedback": "scale",
22735
23128
  "haptic": "medium",
22736
- "hiddenPath": "$service:himiEventDetail.hideTickets"
23129
+ "hiddenPath": "$service:himiEventDetail.regularTicketsHidden"
22737
23130
  }
22738
23131
  },
22739
23132
  {
@@ -22893,7 +23286,9 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
22893
23286
  "share",
22894
23287
  "wix_cashier",
22895
23288
  "local_database",
22896
- "wix_platform"
23289
+ "wix_platform",
23290
+ "app_info",
23291
+ "iap"
22897
23292
  ],
22898
23293
  "minBinaryVersion": "0.1.0",
22899
23294
  "bundleVersion": "0.0.1"
@@ -0,0 +1,106 @@
1
+ import { copyParam } from "./himi-copy.js";
2
+
3
+ export interface AttendanceField {
4
+ id: string;
5
+ label: string;
6
+ kind: string;
7
+ required: boolean;
8
+ value: string;
9
+ selectedIds: string[];
10
+ options: { id: string; label: string }[];
11
+ error: string;
12
+ maxLength?: number;
13
+ maxSize?: number;
14
+ }
15
+
16
+ const object = (v: unknown): Record<string, unknown> => v !== null && typeof v === "object" && !Array.isArray(v) ? v as Record<string, unknown> : {};
17
+ const text = (v: unknown): string => typeof v === "string" ? v : "";
18
+ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
19
+
20
+ export function createAttendanceForm(prefix: string) {
21
+ let fields: AttendanceField[] = [];
22
+ let supported = false;
23
+ const label = (name: string) => copyParam(`${prefix}.${name}Label`, name === "firstName" ? "First name" : name === "lastName" ? "Last name" : "Email");
24
+ const field = (scope: string, name: string, input: Record<string, unknown> = {}): AttendanceField => ({
25
+ id: `${scope}:${name}`, label: text(input.label) || label(name), required: input.mandatory === true,
26
+ kind: name === "email" ? "email" : input.type === "NUMBER" ? "number" : input.type === "TEXT_ARRAY" ? "multiple" : Array.isArray(input.options) && input.options.length ? "choice" : "text",
27
+ value: "", selectedIds: [], error: "",
28
+ options: Array.isArray(input.options) ? input.options.filter((o): o is string => typeof o === "string").map((o) => ({ id: o, label: o })) : [],
29
+ ...(typeof input.maxLength === "number" ? { maxLength: input.maxLength } : {}),
30
+ ...(typeof input.maxSize === "number" ? { maxSize: input.maxSize } : {}),
31
+ });
32
+ const contact = (scope: string) => ["firstName", "lastName", "email"].map((name) => field(scope, name, { mandatory: true }));
33
+
34
+ function event(raw: unknown): void {
35
+ fields = contact("buyer");
36
+ const controls = object(raw).controls;
37
+ supported = Array.isArray(controls) && controls.length > 0;
38
+ const names = new Set<string>();
39
+ for (const control of Array.isArray(controls) ? controls : []) {
40
+ const c = object(control);
41
+ if (c.deleted === true) continue;
42
+ if (!Array.isArray(c.inputs) || !c.inputs.length) { supported = false; continue; }
43
+ for (const rawInput of c.inputs) {
44
+ const input = object(rawInput);
45
+ const name = text(input.name);
46
+ if (!name || names.has(name) || !["TEXT", "NUMBER", "TEXT_ARRAY"].includes(text(input.type)) || (input.type === "TEXT_ARRAY" && (!Array.isArray(input.options) || !input.options.length))) { supported = false; continue; }
47
+ names.add(name);
48
+ fields.push(field("guest", name, { ...input, mandatory: input.mandatory === true || ["firstName", "lastName", "email"].includes(name) }));
49
+ }
50
+ }
51
+ if (!["firstName", "lastName", "email"].every((name) => names.has(name))) supported = false;
52
+ }
53
+
54
+ function booking(service: unknown): void {
55
+ fields = contact("buyer");
56
+ const id = text(object(object(service).form).id);
57
+ // Custom intake schemas need their own reader; never silently omit their required fields.
58
+ supported = id === "00000000-0000-0000-0000-000000000000";
59
+ }
60
+
61
+ function change(arg: unknown): void {
62
+ const a = object(arg);
63
+ const f = fields.find((candidate) => candidate.id === a.id);
64
+ if (!f) return;
65
+ if (typeof a.option === "string") {
66
+ if (f.kind === "multiple") f.selectedIds = f.selectedIds.includes(a.option) ? f.selectedIds.filter((v) => v !== a.option) : [...f.selectedIds, a.option];
67
+ else f.value = a.option;
68
+ f.error = "";
69
+ return;
70
+ }
71
+ f.value = text(a.value ?? a.text ?? a.selectedId);
72
+ f.selectedIds = Array.isArray(a.selectedIds) ? a.selectedIds.filter((v): v is string => typeof v === "string") : [];
73
+ f.error = "";
74
+ }
75
+
76
+ function valid(f: AttendanceField): boolean {
77
+ const value = f.value.trim();
78
+ const values = f.kind === "multiple" ? f.selectedIds : value ? [value] : [];
79
+ if (!values.length) return !f.required;
80
+ if (f.options.length && values.some((v) => !f.options.some((o) => o.id === v))) return false;
81
+ if (f.maxSize !== undefined && values.length > f.maxSize) return false;
82
+ if (f.maxLength !== undefined && values.some((v) => v.length > f.maxLength!)) return false;
83
+ return f.kind === "email" ? EMAIL.test(value) : f.kind !== "number" || /^-?\d+(?:\.\d+)?$/.test(value);
84
+ }
85
+
86
+ function validate(): boolean {
87
+ for (const f of fields) f.error = valid(f) ? "" : copyParam(`${prefix}.formInvalidText`, "Check this field.");
88
+ return supported && fields.every((f) => !f.error);
89
+ }
90
+
91
+ function buyer(): Record<string, string> {
92
+ return Object.fromEntries(fields.filter((f) => f.id.startsWith("buyer:")).map((f) => [f.id.slice(6), f.value.trim()]));
93
+ }
94
+
95
+ function ticket(definitionId: string) {
96
+ const inputValues = fields.filter((f) => f.id.startsWith("guest:") && (f.value.trim() || f.selectedIds.length)).map((f) => ({ inputName: f.id.slice(6), ...(f.kind === "multiple" ? { values: f.selectedIds.slice() } : { value: f.value.trim() }) }));
97
+ return { buyer: buyer(), guests: [{ ticketDefinitionId: definitionId, form: { inputValues } }] };
98
+ }
99
+
100
+ return {
101
+ event, booking, change, validate, buyer, ticket,
102
+ supported: () => supported,
103
+ rows: () => fields.map((f) => ({ ...f, selectedIds: f.selectedIds.slice(), kind: f.kind === "text" && f.required ? "requiredText" : f.kind })),
104
+ clear: () => { for (const f of fields) { f.value = ""; f.selectedIds = []; f.error = ""; } },
105
+ };
106
+ }