@wix/form-public 0.190.0 → 0.192.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.
package/dist/index.cjs CHANGED
@@ -22217,6 +22217,7 @@ var require_messages_en = __commonJS({
22217
22217
  "mla-city.input.error.message.required-error.tr": "Enter a district.",
22218
22218
  "date-picker.a11y.calendar-button.role-description": "Calendar dialog pop up collapsed",
22219
22219
  "field.signature.a11y.action-description.draw-or-type": "Sign in the box or use the keyboard to type.",
22220
+ "settings.scheduling.meeting-type.round-robin": "Round Robin",
22220
22221
  "field.time.perdiod.AM": "AM",
22221
22222
  "form.login-bar.title.logged-out-state": "Have an account? ",
22222
22223
  "form.appointment.slots-not-found.text": "There\u2019s no availability for this date. Try selecting another date.",
@@ -22237,6 +22238,7 @@ var require_messages_en = __commonJS({
22237
22238
  "ecom.email.label": "Email",
22238
22239
  "input.error.message.incomplete-date-error.year-month-day": "Enter a month, day and year.",
22239
22240
  "field-context-menu.make-optional": "Make optional",
22241
+ "settings.scheduling.meeting-type.info-icon.round-robin.description": " - Meetings rotate between hosts.",
22240
22242
  "contacts-subscribe.input.error.message.not-allowed-value": "Check the box to continue.",
22241
22243
  "field.signature.mode.draw.description": "Drawing mode selected. Drawing requires a mouse or touchpad. For keyboard accessibility, select Type or Upload.",
22242
22244
  "checkbox.input.error.message.required-error": "Check the box to continue.",
@@ -22311,6 +22313,7 @@ var require_messages_en = __commonJS({
22311
22313
  "dext-phone.input.error.message.format-error": "Enter a valid phone number.",
22312
22314
  "bookings-phone.input.error.message.required-error": "Enter a phone number.",
22313
22315
  "form.file-upload.explanation-text": "{count, plural, =1 {# file} other {# files}} uploaded",
22316
+ "settings.scheduling.meeting-type.info-icon.intro": "How hosts are assigned:",
22314
22317
  "contacts-last-name.input.error.message.required-error": "Enter a last name.",
22315
22318
  "field.signature.mode.selector.aria-label": "Signature input mode",
22316
22319
  "phone.input.error.message.not-allowed-value": "Phone numbers with this country code aren't accepted.",
@@ -22325,6 +22328,7 @@ var require_messages_en = __commonJS({
22325
22328
  "field.date.placeholder.time": "HH:MM",
22326
22329
  "submit.checkout.message": "Redirecting to checkout...",
22327
22330
  "form.file-upload.error.unsupported-file-format": "This file type is unsupported.",
22331
+ "settings.scheduling.meeting-type.info-icon.single-host.description": " - One host runs every meeting.",
22328
22332
  "input.error.message.invalid-phone-country-code-error": "Enter a valid country code.",
22329
22333
  "mla-street-name.input.error.message.required-error": "Enter a street name.",
22330
22334
  "settings.scheduling.sync-external-calendars.not-current-user.kb-link": "https://support.wix.com/en/article/wix-meetings-syncing-personal-calendars-with-wix-meetings",
@@ -22384,6 +22388,7 @@ var require_messages_en = __commonJS({
22384
22388
  "field.signature.mode.type.label": "Type",
22385
22389
  "settings.default-value-conflict.min-value-error": "Min characters must be at least the default text length. Update the character limit or shorten the text.",
22386
22390
  "date-picker.input.error.message.min-value-error": "Enter a valid date after today\u2019s date.",
22391
+ "settings.scheduling.meeting-type.personal": "Single Host",
22387
22392
  "date-time-input.input.error.message.min-value-error": "Enter a valid date after today\u2019s date.",
22388
22393
  "dext-checkbox.input.error.message.required-error": "Check the box to continue.",
22389
22394
  "url-input.input.error.message.format-error": "Enter a web URL like https://www.example.com.",
@@ -29219,6 +29224,7 @@ var UploadEnabledKey = "uploadEnabled";
29219
29224
  var FirstDayOfWeekKey = "firstDayOfWeek";
29220
29225
  var DefaultCountryCodeKey = "defaultCountry";
29221
29226
  var ImageResizeKey = "imageResize";
29227
+ var ChoiceImageResizeKey = "choiceImageResize";
29222
29228
  var ShowFlagKey = "showFlag";
29223
29229
  var NameKey = "name";
29224
29230
  var DurationKey = "duration";
@@ -29229,6 +29235,8 @@ var FormatDescriptionTypeKey = "formatDescriptionType";
29229
29235
  var LocationTypeKey = "locationType";
29230
29236
  var FormatDescriptionKey = "formatDescription";
29231
29237
  var LocationIdsKey = "locationIds";
29238
+ var MeetingTypeKey = "meetingType";
29239
+ var StaffStrategySelectionKey = "staffStrategySelection";
29232
29240
  var RepeaterFieldsKey = "fields";
29233
29241
  var RepeaterLayoutKey = "layout";
29234
29242
  var ScoreKey = "score";
@@ -29340,9 +29348,10 @@ function resolveArrayComponent(arrayComponent) {
29340
29348
  }
29341
29349
  }
29342
29350
  function takeCheckboxGroupViewProperties(checkboxGroup) {
29351
+ var _checkboxGroup$mediaS;
29343
29352
  return {
29344
29353
  [HideLabelKey]: !checkboxGroup.showLabel,
29345
- [AddOtherKey]: checkboxGroup.customOption != null,
29354
+ [AddOtherKey]: !!checkboxGroup.customOption,
29346
29355
  [OptionsKey]: checkboxGroup.options.map((option) => makeOptionView(option)),
29347
29356
  [NumberOfColumnsKey]: numericNumberOfColumns(checkboxGroup.numberOfColumns ?? NumberOfColumns3.ONE),
29348
29357
  [DefaultValueKey]: checkboxGroup.options.filter((option) => option.default).map((option) => option.value),
@@ -29355,13 +29364,16 @@ function takeCheckboxGroupViewProperties(checkboxGroup) {
29355
29364
  ...checkboxGroup.customOption && {
29356
29365
  [AddOtherLabelKey]: checkboxGroup.customOption.label,
29357
29366
  [AddOtherPlaceholderKey]: checkboxGroup.customOption.placeholder
29367
+ },
29368
+ ...((_checkboxGroup$mediaS = checkboxGroup.mediaSettings) == null ? void 0 : _checkboxGroup$mediaS.imageFit) && {
29369
+ [ChoiceImageResizeKey]: checkboxGroup.mediaSettings.imageFit === ImageFit3.CONTAIN ? "contain" : "cover"
29358
29370
  }
29359
29371
  };
29360
29372
  }
29361
29373
  function takeTagsViewProperties(tags) {
29362
29374
  return {
29363
29375
  [HideLabelKey]: !tags.showLabel,
29364
- [AddOtherKey]: tags.customOption != null,
29376
+ [AddOtherKey]: !!tags.customOption,
29365
29377
  [OptionsKey]: tags.options.map((option) => makeOptionView(option)),
29366
29378
  [NumberOfColumnsKey]: numericNumberOfColumns(tags.numberOfColumns ?? NumberOfColumns3.ONE),
29367
29379
  [DefaultValueKey]: tags.options.filter((option) => option.default).map((option) => option.value),
@@ -29435,6 +29447,9 @@ function takeNumberInputViewProperties(numberInput) {
29435
29447
  },
29436
29448
  ...numberInput.placeholder && {
29437
29449
  [PlaceholderKey]: numberInput.placeholder
29450
+ },
29451
+ ...typeof numberInput.default === "number" && {
29452
+ [DefaultValueKey]: numberInput.default
29438
29453
  }
29439
29454
  };
29440
29455
  }
@@ -29520,6 +29535,9 @@ function takeTextInputViewProperties(textInput) {
29520
29535
  },
29521
29536
  ...textInput.placeholder && {
29522
29537
  [PlaceholderKey]: textInput.placeholder
29538
+ },
29539
+ ...textInput.default && {
29540
+ [DefaultValueKey]: textInput.default
29523
29541
  }
29524
29542
  };
29525
29543
  }
@@ -29534,6 +29552,9 @@ function takePasswordViewProperties(password) {
29534
29552
  },
29535
29553
  ...password.placeholder && {
29536
29554
  [PlaceholderKey]: password.placeholder
29555
+ },
29556
+ ...password.default && {
29557
+ [DefaultValueKey]: password.default
29537
29558
  }
29538
29559
  };
29539
29560
  }
@@ -29542,7 +29563,7 @@ function takeRadioGroupViewProperties(radioGroup) {
29542
29563
  const options = radioGroup.options ?? [];
29543
29564
  return {
29544
29565
  [HideLabelKey]: !radioGroup.showLabel,
29545
- [AddOtherKey]: radioGroup.customOption != null,
29566
+ [AddOtherKey]: !!radioGroup.customOption,
29546
29567
  [NumberOfColumnsKey]: numericNumberOfColumns(radioGroup.numberOfColumns ?? NumberOfColumns3.ONE),
29547
29568
  [OptionsKey]: options.map((option) => makeOptionView(option)),
29548
29569
  ...radioGroup.description && {
@@ -29565,7 +29586,7 @@ function takeDropdownViewProperties(dropdown) {
29565
29586
  const options = dropdown.options ?? [];
29566
29587
  return {
29567
29588
  [HideLabelKey]: !dropdown.showLabel,
29568
- [AddOtherKey]: dropdown.customOption != null,
29589
+ [AddOtherKey]: !!dropdown.customOption,
29569
29590
  [OptionsKey]: options.map((option) => makeOptionView(option)),
29570
29591
  ...dropdown.description && {
29571
29592
  [DescriptionKey]: dropdown.description
@@ -29596,6 +29617,9 @@ function takeDateTimeViewProperties(dateTimeInput) {
29596
29617
  ...dateTimeInput.label && {
29597
29618
  [LabelKey]: dateTimeInput.label
29598
29619
  },
29620
+ ...dateTimeInput.default && {
29621
+ [DefaultValueKey]: dateTimeInput.default
29622
+ },
29599
29623
  [Use24HourFormatKey]: dateTimeInput == null ? void 0 : dateTimeInput.use24HourFormat
29600
29624
  };
29601
29625
  }
@@ -29609,6 +29633,9 @@ function takeDateInputViewProperties(dateInput) {
29609
29633
  },
29610
29634
  ...dateInput.label && {
29611
29635
  [LabelKey]: dateInput.label
29636
+ },
29637
+ ...dateInput.default && {
29638
+ [DefaultValueKey]: dateInput.default
29612
29639
  }
29613
29640
  };
29614
29641
  }
@@ -29622,6 +29649,9 @@ function takeTimeInputViewProperties(timeInput) {
29622
29649
  ...timeInput.label && {
29623
29650
  [LabelKey]: timeInput.label
29624
29651
  },
29652
+ ...timeInput.default && {
29653
+ [DefaultValueKey]: timeInput.default
29654
+ },
29625
29655
  [Use24HourFormatKey]: timeInput.use24HourFormat
29626
29656
  };
29627
29657
  }
@@ -29637,6 +29667,9 @@ function takeDatePickerViewProperties(datePicker) {
29637
29667
  ...datePicker.label && {
29638
29668
  [LabelKey]: datePicker.label
29639
29669
  },
29670
+ ...datePicker.default && {
29671
+ [DefaultValueKey]: datePicker.default
29672
+ },
29640
29673
  [FirstDayOfWeekKey]: datePicker == null ? void 0 : datePicker.firstDayOfWeek
29641
29674
  };
29642
29675
  }
@@ -29662,6 +29695,7 @@ function takeServiceDropdownViewProperties(servicesDropdownOptions) {
29662
29695
  const options = servicesDropdownOptions.options ?? [];
29663
29696
  return {
29664
29697
  [HideLabelKey]: !servicesDropdownOptions.showLabel,
29698
+ [AddOtherKey]: !!servicesDropdownOptions.customOption,
29665
29699
  [OptionsKey]: options.map((option) => makeOptionView(option)),
29666
29700
  ...servicesDropdownOptions.label && {
29667
29701
  [LabelKey]: servicesDropdownOptions.label
@@ -29715,6 +29749,11 @@ function takeMultilineAddressViewProperties(multilineAddress) {
29715
29749
  hideLabel: !showLabel
29716
29750
  };
29717
29751
  }
29752
+ var staffStrategyV2toV1 = {
29753
+ [StaffStrategySelection3.AUTOMATIC]: "AUTOMATIC",
29754
+ [StaffStrategySelection3.HIGH_TO_LOW_PRIORITY]: "PRIORITY_HIGH_TO_LOW",
29755
+ [StaffStrategySelection3.LOW_TO_HIGH_PRIORITY]: "PRIORITY_LOW_TO_HIGH"
29756
+ };
29718
29757
  function takeAppointmentViewProperties(appointmentOptions) {
29719
29758
  const {
29720
29759
  label,
@@ -29725,6 +29764,8 @@ function takeAppointmentViewProperties(appointmentOptions) {
29725
29764
  format,
29726
29765
  description,
29727
29766
  showLabel,
29767
+ meetingType,
29768
+ staffStrategySelection,
29728
29769
  phoneOptions,
29729
29770
  videoConferenceOptions,
29730
29771
  inPersonOptions
@@ -29751,6 +29792,12 @@ function takeAppointmentViewProperties(appointmentOptions) {
29751
29792
  [FormatKey]: format,
29752
29793
  [FormatDescriptionTypeKey]: format,
29753
29794
  [StaffIdsKey]: staffIds,
29795
+ ...meetingType && {
29796
+ [MeetingTypeKey]: meetingType
29797
+ },
29798
+ ...staffStrategySelection && {
29799
+ [StaffStrategySelectionKey]: staffStrategyV2toV1[staffStrategySelection] ?? staffStrategySelection
29800
+ },
29754
29801
  ...transformFormatInfoToView(inPersonOptions, videoConferenceOptions, phoneOptions)
29755
29802
  };
29756
29803
  }
@@ -29791,7 +29838,7 @@ function takeDonationsInputViewProperties(donationInput) {
29791
29838
  const options = donationInput.options ?? [];
29792
29839
  return {
29793
29840
  [HideLabelKey]: !donationInput.showLabel,
29794
- [AddOtherKey]: donationInput.customOption != null,
29841
+ [AddOtherKey]: !!donationInput.customOption,
29795
29842
  [NumberOfColumnsKey]: numericNumberOfColumns(donationInput.numberOfColumns ?? NumberOfColumns3.ONE),
29796
29843
  [OptionsKey]: options.map((option) => makeOptionView(option)),
29797
29844
  ...donationInput.description && {
@@ -29831,6 +29878,9 @@ function takePaymentInputViewProperties(paymentInput) {
29831
29878
  },
29832
29879
  ...paymentInput.placeholder && {
29833
29880
  [PlaceholderKey]: paymentInput.placeholder
29881
+ },
29882
+ ...typeof paymentInput.default === "number" && {
29883
+ [DefaultValueKey]: paymentInput.default
29834
29884
  }
29835
29885
  };
29836
29886
  }