@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
@@ -19890,6 +19890,398 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
19890
19890
  "hiddenPath": "$service:himiEventDetail.hideTierPicker"
19891
19891
  }
19892
19892
  },
19893
+ {
19894
+ "id": "",
19895
+ "body": {
19896
+ "package": "himalaya",
19897
+ "type": "VStack",
19898
+ "props": {
19899
+ "spacing": 12,
19900
+ "alignment": "leading",
19901
+ "children": [
19902
+ {
19903
+ "id": "",
19904
+ "body": {
19905
+ "package": "himalaya",
19906
+ "type": "Text",
19907
+ "props": {
19908
+ "text": "$service:himiEventDetail.iapPrice",
19909
+ "style": "bodyEmphasis",
19910
+ "collapseWhenEmpty": true
19911
+ }
19912
+ }
19913
+ },
19914
+ {
19915
+ "id": "himi_event.apple.form",
19916
+ "body": {
19917
+ "package": "himalaya",
19918
+ "type": "Grid",
19919
+ "props": {
19920
+ "columns": 1,
19921
+ "spacing": 12,
19922
+ "itemsPath": "$service:himiEventDetail.iapFields",
19923
+ "items": [
19924
+ {
19925
+ "id": "",
19926
+ "body": {
19927
+ "package": "himalaya",
19928
+ "type": "VStack",
19929
+ "props": {
19930
+ "spacing": 8,
19931
+ "alignment": "leading",
19932
+ "children": [
19933
+ {
19934
+ "id": "",
19935
+ "body": {
19936
+ "package": "himalaya",
19937
+ "type": "Text",
19938
+ "props": {
19939
+ "text": "$item.sectionLabel",
19940
+ "style": "bodyEmphasis",
19941
+ "collapseWhenEmpty": true
19942
+ }
19943
+ }
19944
+ },
19945
+ {
19946
+ "id": "",
19947
+ "body": {
19948
+ "package": "himalaya",
19949
+ "type": "Text",
19950
+ "props": {
19951
+ "text": "$item.label",
19952
+ "style": "footnote"
19953
+ }
19954
+ }
19955
+ },
19956
+ {
19957
+ "id": "himi_event.apple.input.$item.id",
19958
+ "body": {
19959
+ "package": "himalaya",
19960
+ "type": "FragmentSlot",
19961
+ "props": {
19962
+ "casePath": "$item.kind",
19963
+ "defaultCase": "text",
19964
+ "cases": [
19965
+ {
19966
+ "id": "text",
19967
+ "content": {
19968
+ "id": "himi_event.apple.field.text.$item.id",
19969
+ "body": {
19970
+ "package": "himalaya",
19971
+ "type": "TextField",
19972
+ "props": {
19973
+ "placeholder": "$item.inputLabel",
19974
+ "value": "$item.value",
19975
+ "onChange": {
19976
+ "actionId": "tier5.himiEventDetail.setIapField",
19977
+ "params": {
19978
+ "id": "$item.fieldId"
19979
+ }
19980
+ },
19981
+ "validation": {},
19982
+ "errorText": "$item.error",
19983
+ "autoCapitalization": "words"
19984
+ }
19985
+ }
19986
+ }
19987
+ },
19988
+ {
19989
+ "id": "requiredText",
19990
+ "content": {
19991
+ "id": "himi_event.apple.field.requiredText.$item.id",
19992
+ "body": {
19993
+ "package": "himalaya",
19994
+ "type": "TextField",
19995
+ "props": {
19996
+ "placeholder": "$item.inputLabel",
19997
+ "value": "$item.value",
19998
+ "onChange": {
19999
+ "actionId": "tier5.himiEventDetail.setIapField",
20000
+ "params": {
20001
+ "id": "$item.fieldId"
20002
+ }
20003
+ },
20004
+ "validation": {
20005
+ "required": true
20006
+ },
20007
+ "errorText": "$item.error",
20008
+ "autoCapitalization": "words"
20009
+ }
20010
+ }
20011
+ }
20012
+ },
20013
+ {
20014
+ "id": "email",
20015
+ "content": {
20016
+ "id": "himi_event.apple.field.email.$item.id",
20017
+ "body": {
20018
+ "package": "himalaya",
20019
+ "type": "TextField",
20020
+ "props": {
20021
+ "placeholder": "$item.inputLabel",
20022
+ "value": "$item.value",
20023
+ "onChange": {
20024
+ "actionId": "tier5.himiEventDetail.setIapField",
20025
+ "params": {
20026
+ "id": "$item.fieldId"
20027
+ }
20028
+ },
20029
+ "validation": {
20030
+ "required": true,
20031
+ "type": "email"
20032
+ },
20033
+ "errorText": "$item.error",
20034
+ "autoCapitalization": "none"
20035
+ }
20036
+ }
20037
+ }
20038
+ },
20039
+ {
20040
+ "id": "number",
20041
+ "content": {
20042
+ "id": "himi_event.apple.field.number.$item.id",
20043
+ "body": {
20044
+ "package": "himalaya",
20045
+ "type": "TextField",
20046
+ "props": {
20047
+ "placeholder": "$item.inputLabel",
20048
+ "value": "$item.value",
20049
+ "onChange": {
20050
+ "actionId": "tier5.himiEventDetail.setIapField",
20051
+ "params": {
20052
+ "id": "$item.fieldId"
20053
+ }
20054
+ },
20055
+ "validation": {
20056
+ "type": "number"
20057
+ },
20058
+ "errorText": "$item.error",
20059
+ "autoCapitalization": "words"
20060
+ }
20061
+ }
20062
+ }
20063
+ },
20064
+ {
20065
+ "id": "choice",
20066
+ "content": {
20067
+ "id": "",
20068
+ "body": {
20069
+ "package": "himalaya",
20070
+ "type": "VStack",
20071
+ "props": {
20072
+ "spacing": 4,
20073
+ "children": [
20074
+ {
20075
+ "id": "himi_event.apple.options.choice",
20076
+ "body": {
20077
+ "package": "himalaya",
20078
+ "type": "Grid",
20079
+ "props": {
20080
+ "columns": 1,
20081
+ "spacing": 8,
20082
+ "itemsPath": "$item.options",
20083
+ "items": [
20084
+ {
20085
+ "id": "himi_event.apple.option.choice.$item.fieldId.$item.id",
20086
+ "body": {
20087
+ "package": "himalaya",
20088
+ "type": "Button",
20089
+ "props": {
20090
+ "title": "$item.displayLabel",
20091
+ "style": "secondary",
20092
+ "fullWidth": true,
20093
+ "action": {
20094
+ "actionId": "tier5.himiEventDetail.setIapField",
20095
+ "params": {
20096
+ "id": "$item.fieldId",
20097
+ "option": "$item.id"
20098
+ }
20099
+ }
20100
+ }
20101
+ }
20102
+ }
20103
+ ]
20104
+ }
20105
+ }
20106
+ },
20107
+ {
20108
+ "id": "",
20109
+ "body": {
20110
+ "package": "himalaya",
20111
+ "type": "FieldError",
20112
+ "props": {
20113
+ "text": "$item.error"
20114
+ }
20115
+ },
20116
+ "modifiers": {
20117
+ "hiddenPath": "$item.errorHidden"
20118
+ }
20119
+ }
20120
+ ]
20121
+ }
20122
+ }
20123
+ }
20124
+ },
20125
+ {
20126
+ "id": "multiple",
20127
+ "content": {
20128
+ "id": "",
20129
+ "body": {
20130
+ "package": "himalaya",
20131
+ "type": "VStack",
20132
+ "props": {
20133
+ "spacing": 4,
20134
+ "children": [
20135
+ {
20136
+ "id": "himi_event.apple.options.multiple",
20137
+ "body": {
20138
+ "package": "himalaya",
20139
+ "type": "Grid",
20140
+ "props": {
20141
+ "columns": 1,
20142
+ "spacing": 8,
20143
+ "itemsPath": "$item.options",
20144
+ "items": [
20145
+ {
20146
+ "id": "himi_event.apple.option.multiple.$item.fieldId.$item.id",
20147
+ "body": {
20148
+ "package": "himalaya",
20149
+ "type": "Button",
20150
+ "props": {
20151
+ "title": "$item.displayLabel",
20152
+ "style": "secondary",
20153
+ "fullWidth": true,
20154
+ "action": {
20155
+ "actionId": "tier5.himiEventDetail.setIapField",
20156
+ "params": {
20157
+ "id": "$item.fieldId",
20158
+ "option": "$item.id"
20159
+ }
20160
+ }
20161
+ }
20162
+ }
20163
+ }
20164
+ ]
20165
+ }
20166
+ }
20167
+ },
20168
+ {
20169
+ "id": "",
20170
+ "body": {
20171
+ "package": "himalaya",
20172
+ "type": "FieldError",
20173
+ "props": {
20174
+ "text": "$item.error"
20175
+ }
20176
+ },
20177
+ "modifiers": {
20178
+ "hiddenPath": "$item.errorHidden"
20179
+ }
20180
+ }
20181
+ ]
20182
+ }
20183
+ }
20184
+ }
20185
+ }
20186
+ ]
20187
+ }
20188
+ }
20189
+ }
20190
+ ]
20191
+ }
20192
+ }
20193
+ }
20194
+ ]
20195
+ }
20196
+ },
20197
+ "modifiers": {
20198
+ "hiddenPath": "$service:himiEventDetail.iapFormHidden"
20199
+ }
20200
+ },
20201
+ {
20202
+ "id": "",
20203
+ "body": {
20204
+ "package": "himalaya",
20205
+ "type": "FieldError",
20206
+ "props": {
20207
+ "text": "",
20208
+ "textPath": "$service:himiEventDetail.iapFormError"
20209
+ }
20210
+ }
20211
+ },
20212
+ {
20213
+ "id": "himi_event.apple.buy",
20214
+ "body": {
20215
+ "package": "himalaya",
20216
+ "type": "Button",
20217
+ "props": {
20218
+ "title": "$service:himiEventDetail.iapBuyLabel",
20219
+ "disabledPath": "$service:himiEventDetail.iapBuyDisabled",
20220
+ "style": "primary",
20221
+ "fullWidth": true,
20222
+ "action": {
20223
+ "actionId": "tier5.himiEventDetail.buyApple"
20224
+ }
20225
+ }
20226
+ }
20227
+ },
20228
+ {
20229
+ "id": "",
20230
+ "body": {
20231
+ "package": "himalaya",
20232
+ "type": "Text",
20233
+ "props": {
20234
+ "text": "$service:himiEventDetail.iapNote",
20235
+ "style": "footnote",
20236
+ "color": "textSecondary",
20237
+ "collapseWhenEmpty": true
20238
+ }
20239
+ }
20240
+ },
20241
+ {
20242
+ "id": "himi_event.apple.signin",
20243
+ "body": {
20244
+ "package": "himalaya",
20245
+ "type": "Button",
20246
+ "props": {
20247
+ "title": "Sign in to purchase",
20248
+ "style": "secondary",
20249
+ "action": {
20250
+ "actionId": "himi.open",
20251
+ "params": {
20252
+ "screenId": "himi_account"
20253
+ }
20254
+ }
20255
+ }
20256
+ },
20257
+ "modifiers": {
20258
+ "hiddenPath": "$service:himiEventDetail.iapSignInHidden"
20259
+ }
20260
+ },
20261
+ {
20262
+ "id": "himi_event.apple.retry",
20263
+ "body": {
20264
+ "package": "himalaya",
20265
+ "type": "Button",
20266
+ "props": {
20267
+ "title": "Refresh purchase status",
20268
+ "style": "secondary",
20269
+ "action": {
20270
+ "actionId": "tier5.himiEventDetail.iapRefresh"
20271
+ }
20272
+ }
20273
+ },
20274
+ "modifiers": {
20275
+ "hiddenPath": "$service:himiEventDetail.iapRetryHidden"
20276
+ }
20277
+ }
20278
+ ]
20279
+ }
20280
+ },
20281
+ "modifiers": {
20282
+ "hiddenPath": "$service:himiEventDetail.iapBuyHidden"
20283
+ }
20284
+ },
19893
20285
  {
19894
20286
  "id": "himi_event.tickets",
19895
20287
  "body": {
@@ -19899,6 +20291,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
19899
20291
  "title": "Get tickets",
19900
20292
  "style": "primary",
19901
20293
  "fullWidth": true,
20294
+ "disabledPath": "$service:himiEventDetail.ticketPurchaseBlocked",
19902
20295
  "action": {
19903
20296
  "actionId": "tier5.himiEventDetail.openRegistration"
19904
20297
  }
@@ -19908,7 +20301,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
19908
20301
  "cornerRadius": 8,
19909
20302
  "pressFeedback": "scale",
19910
20303
  "haptic": "medium",
19911
- "hiddenPath": "$service:himiEventDetail.hideTickets"
20304
+ "hiddenPath": "$service:himiEventDetail.regularTicketsHidden"
19912
20305
  }
19913
20306
  },
19914
20307
  {
@@ -20068,7 +20461,9 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
20068
20461
  "share",
20069
20462
  "wix_cashier",
20070
20463
  "local_database",
20071
- "wix_platform"
20464
+ "wix_platform",
20465
+ "app_info",
20466
+ "iap"
20072
20467
  ],
20073
20468
  "minBinaryVersion": "0.1.0",
20074
20469
  "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
+ }