Version Description
Download this release
Release Info
Developer | bordoni |
Plugin | Event Tickets |
Version | 5.1.10 |
Comparing to | |
See all releases |
Code changes from version 5.1.9.1 to 5.1.10
- common/lang/tribe-common-cs_CZ.mo +0 -0
- common/lang/tribe-common-de_DE.mo +0 -0
- common/lang/tribe-common-es_ES.mo +0 -0
- common/lang/tribe-common-fr_CA.mo +0 -0
- common/lang/tribe-common-fr_FR.mo +0 -0
- common/lang/tribe-common-hu_HU.mo +0 -0
- common/lang/tribe-common-it_IT.mo +0 -0
- common/lang/tribe-common-ja.mo +0 -0
- common/lang/tribe-common-nl_NL.mo +0 -0
- common/lang/tribe-common-pt_BR.mo +0 -0
- common/lang/tribe-common-pt_PT.mo +0 -0
- common/lang/tribe-common.pot +115 -93
- common/node_modules/intro.js/intro.js +4421 -0
- common/node_modules/intro.js/introjs-rtl.css +23 -0
- common/node_modules/intro.js/introjs.css +436 -0
- common/src/Tribe/Admin/Help_Page.php +8 -5
- common/src/Tribe/Ajax/Dropdown.php +4 -0
- common/src/Tribe/Main.php +2 -1
- common/src/Tribe/Onboarding/Hints_Abstract.php +98 -0
- common/src/Tribe/Onboarding/Main.php +223 -0
- common/src/Tribe/Onboarding/README.md +242 -0
- common/src/Tribe/Onboarding/Tour_Abstract.php +98 -0
- common/src/Tribe/Service_Providers/Onboarding.php +140 -0
- common/src/Tribe/Support.php +24 -25
- common/src/admin-views/troubleshooting/system-information.php +4 -2
- common/src/resources/css/onboarding.min.css +1 -0
- common/src/resources/css/tribe-common-admin.min.css +1 -1
- common/src/resources/js/admin/help-page.js +34 -5
- common/src/resources/js/onboarding.js +106 -0
- common/src/resources/js/onboarding.min.js +1 -0
- common/vendor/autoload.php +1 -1
- common/vendor/autoload_52.php +1 -1
- common/vendor/composer/autoload_classmap.php +4 -0
- common/vendor/composer/autoload_real.php +4 -4
- common/vendor/composer/autoload_real_52.php +3 -3
- common/vendor/composer/autoload_static.php +9 -5
- common/vendor/composer/installed.json +11 -11
- common/vendor/psr/log/Psr/Log/AbstractLogger.php +16 -16
- common/vendor/psr/log/Psr/Log/LoggerAwareTrait.php +1 -1
- event-tickets.php +1 -2
- lang/event-tickets-es_ES.mo +0 -0
- lang/event-tickets-fr_FR.mo +0 -0
- lang/event-tickets-ro_RO.mo +0 -0
- lang/event-tickets.pot +295 -348
- readme.txt +14 -2
- src/Tickets/Commerce/Assets.php +1 -0
- src/Tickets/Commerce/Attendee.php +101 -71
- src/Tickets/Commerce/Cart.php +8 -36
- src/Tickets/Commerce/Cart/Cart_Interface.php +22 -0
- src/Tickets/Commerce/Cart/Unmanaged_Cart.php +57 -0
- src/Tickets/Commerce/Checkout.php +19 -0
- src/Tickets/Commerce/Flag_Actions/Archive_Attendees.php +67 -0
- src/Tickets/Commerce/Flag_Actions/Decrease_Stock.php +76 -1
- src/Tickets/Commerce/Flag_Actions/Flag_Action_Abstract.php +40 -5
- src/Tickets/Commerce/Flag_Actions/Flag_Action_Handler.php +1 -0
- src/Tickets/Commerce/Flag_Actions/Flag_Action_Interface.php +8 -3
- src/Tickets/Commerce/Flag_Actions/Generate_Attendees.php +81 -1
- src/Tickets/Commerce/Flag_Actions/Increase_Stock.php +26 -2
- src/Tickets/Commerce/Gateways/Manager.php +5 -3
- src/Tickets/Commerce/Gateways/PayPal/Ajax_Request_Handler.php +0 -44
- src/Tickets/Commerce/Gateways/PayPal/Assets.php +16 -3
- src/Tickets/Commerce/Gateways/PayPal/Buttons.php +15 -1
- src/Tickets/Commerce/Gateways/PayPal/Client.php +409 -75
- src/Tickets/Commerce/Gateways/PayPal/Gateway.php +2 -2
- src/Tickets/Commerce/Gateways/PayPal/Hooks.php +12 -0
- src/Tickets/Commerce/Gateways/PayPal/Models/PayPal_Order.php +0 -166
- src/Tickets/Commerce/Gateways/PayPal/Models/PayPal_Payment.php +0 -116
- src/Tickets/Commerce/Gateways/PayPal/Models/Webhook_Config.php +0 -77
- src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php +30 -4
- src/Tickets/Commerce/Gateways/PayPal/Provider.php +3 -12
- src/Tickets/Commerce/Gateways/PayPal/REST/On_Boarding_Endpoint.php +4 -0
- src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php +3 -1
- src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php +155 -73
- src/Tickets/Commerce/Gateways/PayPal/Repositories/Authorization.php +0 -88
- src/Tickets/Commerce/Gateways/PayPal/Repositories/Order.php +0 -83
- src/Tickets/Commerce/Gateways/PayPal/Repositories/Webhooks.php +0 -451
- src/Tickets/Commerce/Gateways/PayPal/Settings.php +33 -30
- src/Tickets/Commerce/Gateways/PayPal/Signup.php +3 -3
- src/Tickets/Commerce/Gateways/PayPal/Webhooks.php +194 -0
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Events.php +127 -0
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php +145 -0
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Headers.php +0 -106
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Event_Listener.php +0 -17
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Capture_Completed.php +0 -30
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Capture_Denied.php +0 -30
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Capture_Refunded.php +0 -30
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Capture_Reversed.php +0 -30
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Event_Listener.php +0 -248
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Webhook_Checker.php +0 -104
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Webhook_Register.php +0 -104
- src/Tickets/Commerce/Gateways/PayPal/Webhooks/Webhooks_Route.php +0 -141
- src/Tickets/Commerce/Gateways/PayPal/WhoDat.php +8 -4
- src/Tickets/Commerce/Hooks.php +61 -0
- src/Tickets/Commerce/Legacy_Compat.php +35 -0
- src/Tickets/Commerce/Models/Attendee_Model.php +16 -12
- src/Tickets/Commerce/Models/Order_Model.php +79 -19
- src/Tickets/Commerce/Module.php +1 -4
- src/Tickets/Commerce/Order.php +67 -19
- src/Tickets/Commerce/Repositories/Attendees_Repository.php +2 -0
- src/Tickets/Commerce/Settings.php +54 -22
- src/Tickets/Commerce/Shortcodes/Checkout_Shortcode.php +26 -3
- src/Tickets/Commerce/Shortcodes/Success_Shortcode.php +6 -5
- src/Tickets/Commerce/Status/Completed.php +0 -2
- src/Tickets/Commerce/Status/Not_Completed.php +2 -2
- src/Tickets/Commerce/Status/Pending.php +27 -6
- src/Tickets/Commerce/Status/Status_Abstract.php +9 -7
- src/Tickets/Commerce/Status/Status_Handler.php +18 -0
- src/Tickets/Commerce/Status/Status_Interface.php +7 -4
- src/Tickets/Commerce/Success.php +19 -0
- src/Tribe/Attendee_Registration/Main.php +1 -1
- src/Tribe/Attendees_Table.php +1 -1
- src/Tribe/Commerce/Cart.php +1 -1
- src/Tribe/Commerce/PayPal/Main.php +1 -3
- src/Tribe/Editor.php +6 -2
- src/Tribe/Main.php +1 -1
- src/Tribe/Metabox.php +0 -0
- src/Tribe/RSVP.php +0 -0
- src/Tribe/Ticket_Object.php +0 -0
- src/Tribe/Tickets.php +2 -1
- src/Tribe/Tickets_Handler.php +0 -0
- src/admin-views/attendees.php +0 -0
- src/admin-views/editor/fieldset/price.php +34 -37
- src/admin-views/editor/metabox.php +0 -0
- src/admin-views/list.php +0 -0
- src/admin-views/meta-box.php +0 -0
- src/admin-views/payments/tickets-commerce.php +0 -88
- src/admin-views/privacy.php +0 -0
- src/admin-views/rsvp-metabox-capacity.php +0 -0
- src/admin-views/rsvp-metabox-not-going.php +0 -0
- src/admin-views/settings/tickets-commerce/paypal-commerce/connect-with-paypal.php +0 -78
- src/admin-views/settings/tickets-commerce/paypal-commerce/connect-with-paypal/errors.php +0 -48
- src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php +0 -59
- src/admin-views/settings/tickets-commerce/paypal/connect/active.php +41 -0
- src/admin-views/settings/tickets-commerce/paypal/connect/active/connection.php +39 -0
- src/admin-views/settings/tickets-commerce/paypal/connect/active/paypal-status.php +30 -0
- src/admin-views/settings/tickets-commerce/paypal/connect/inactive.php +32 -0
- src/admin-views/settings/tickets-commerce/paypal/connect/logo.php +24 -0
- src/admin-views/settings/tickets-commerce/paypal/connect/logo/features.php +34 -0
- src/admin-views/settings/tickets-commerce/paypal/connect/logo/image.php +24 -0
- src/admin-views/settings/tickets-commerce/paypal/main.php +33 -0
- src/admin-views/{commerce/gateways → settings/tickets-commerce}/paypal/signup-link.php +3 -2
- src/admin-views/tpp-metabox-capacity.php +0 -0
- src/admin-views/tribe-options-tickets.php +9 -1
- src/deprecated/TribeEventsTicketObject.php +0 -0
- src/deprecated/TribeEventsTickets.php +0 -0
- src/deprecated/TribeEventsTicketsAttendeesTable.php +0 -0
- src/deprecated/TribeEventsTicketsMetabox.php +0 -0
- src/deprecated/TribeEventsTicketsPro.php +0 -0
- src/deprecated/Tribe__Events__Tickets__Attendees_Table.php +0 -0
- src/deprecated/Tribe__Events__Tickets__Metabox.php +0 -0
- src/deprecated/Tribe__Events__Tickets__Ticket_Object.php +0 -0
- src/deprecated/Tribe__Events__Tickets__Tickets.php +0 -0
- src/deprecated/Tribe__Events__Tickets__Tickets_Pro.php +0 -0
- src/functions/commerce/provider.php +46 -3
- src/modules/blocks/attendees/index.js +3 -2
- src/modules/blocks/attendees/template.js +3 -3
- src/modules/blocks/hoc/with-save-data.js +2 -2
- src/modules/blocks/rsvp/action-buttons/attendees-action-button/container.js +1 -1
- src/modules/blocks/rsvp/action-dashboard/container.js +6 -6
- src/modules/blocks/rsvp/action-dashboard/template.js +6 -4
- src/modules/blocks/rsvp/advanced-options/template.js +0 -2
- src/modules/blocks/rsvp/attendee-registration/container.js +12 -7
- src/modules/blocks/rsvp/attendee-registration/template.js +2 -1
- src/modules/blocks/rsvp/container-content/container.js +1 -1
- src/modules/blocks/rsvp/container-header/container.js +1 -1
- src/modules/blocks/rsvp/container-header/style.pcss +21 -25
- src/modules/blocks/rsvp/container-header/template.js +3 -4
- src/modules/blocks/rsvp/container.js +2 -2
- src/modules/blocks/rsvp/dashboard/template.js +0 -1
- src/modules/blocks/rsvp/duration-label/template.js +4 -1
- src/modules/blocks/rsvp/duration-picker/container.js +5 -5
- src/modules/blocks/rsvp/duration/template.js +4 -1
- src/modules/blocks/rsvp/header-image/container.js +2 -0
- src/modules/blocks/rsvp/header-image/template.js +2 -2
- src/modules/blocks/rsvp/inactive-block/template.js +1 -1
- src/modules/blocks/rsvp/index.js +6 -1
- src/modules/blocks/rsvp/move-delete/container.js +1 -1
- src/modules/blocks/rsvp/template.js +2 -2
- src/modules/blocks/ticket/container-content/advanced-options/ecommerce-options/container.js +2 -2
- src/modules/blocks/ticket/container-content/advanced-options/ecommerce-options/template.js +11 -8
- src/modules/blocks/ticket/container-content/advanced-options/move-delete/container.js +1 -1
- src/modules/blocks/ticket/container-content/advanced-options/sku/__tests__/template.test.js +1 -1
- src/modules/blocks/ticket/container-content/advanced-options/sku/template.js +6 -1
- src/modules/blocks/ticket/container-content/attendee-collection/iac-setting/__tests__/template.test.js +1 -1
- src/modules/blocks/ticket/container-content/attendee-collection/iac-setting/template.js +4 -1
- src/modules/blocks/ticket/container-content/attendees-registration/container.js +13 -5
- src/modules/blocks/ticket/container-content/attendees-registration/template.js +2 -1
- src/modules/blocks/ticket/container-content/capacity/template.js +15 -10
- src/modules/blocks/ticket/container-content/duration/__tests__/template.test.js +1 -1
- src/modules/blocks/ticket/container-content/duration/container.js +5 -5
- src/modules/blocks/ticket/container-content/duration/template.js +10 -2
- src/modules/blocks/ticket/container-header/quantity/container.js +1 -1
- src/modules/blocks/ticket/container-header/quantity/quantity-bar/__tests__/element.test.js +11 -3
- src/modules/blocks/ticket/container-header/quantity/quantity-bar/bar.js +3 -4
- src/modules/blocks/ticket/container-header/quantity/quantity-bar/element.js +10 -10
- src/modules/blocks/ticket/container-header/quantity/template.js +4 -1
- src/modules/blocks/ticket/container-header/template.js +0 -5
- src/modules/blocks/ticket/container-header/title/style.pcss +22 -18
- src/modules/blocks/ticket/container-header/title/template.js +3 -3
- src/modules/blocks/ticket/container.js +3 -3
- src/modules/blocks/ticket/container/template.js +10 -3
- src/modules/blocks/ticket/dashboard/container.js +5 -5
- src/modules/blocks/ticket/index.js +6 -1
- src/modules/blocks/tickets/action-buttons/attendees/container.js +2 -2
- src/modules/blocks/tickets/action-dashboard/container.js +2 -2
- src/modules/blocks/tickets/action-dashboard/template.js +10 -8
- src/modules/blocks/tickets/availability/template.js +7 -3
- src/modules/blocks/tickets/capacity-table/__tests__/template.test.js +1 -1
- src/modules/blocks/tickets/capacity-table/row/__tests__/capacity-row.test.js +1 -1
- src/modules/blocks/tickets/container/container.js +7 -7
- src/modules/blocks/tickets/container/template.js +4 -1
- src/modules/blocks/tickets/controls/template.js +4 -4
- src/modules/blocks/tickets/dashboard/template.js +2 -3
- src/modules/blocks/tickets/header-image/container.js +1 -1
- src/modules/blocks/tickets/header-image/template.js +2 -2
- src/modules/blocks/tickets/index.js +6 -2
- src/modules/blocks/tickets/settings-dashboard/template.js +0 -1
- src/modules/data/__tests__/utils.test.js +2 -1
- src/modules/data/blocks/attendees/__tests__/actions.test.js +0 -10
- src/modules/data/blocks/attendees/__tests__/sagas.test.js +10 -6
- src/modules/data/blocks/attendees/__tests__/types.test.js +8 -4
- src/modules/data/blocks/attendees/sagas.js +5 -5
- src/modules/data/blocks/attendees/types.js +2 -1
- src/modules/data/blocks/index.js +3 -0
- src/modules/data/blocks/rsvp/__tests__/reducer.test.js +2 -1
- src/modules/data/blocks/rsvp/__tests__/sagas.test.js +157 -163
- src/modules/data/blocks/rsvp/__tests__/selectors.test.js +1 -1
- src/modules/data/blocks/rsvp/reducers/__tests__/details.test.js +10 -5
- src/modules/data/blocks/rsvp/reducers/__tests__/header-image.test.js +3 -1
- src/modules/data/blocks/rsvp/reducers/__tests__/temp-details.test.js +16 -9
- src/modules/data/blocks/rsvp/reducers/details.js +6 -2
- src/modules/data/blocks/rsvp/sagas.js +17 -6
- src/modules/data/blocks/rsvp/selectors.js +1 -1
- src/modules/data/blocks/rsvp/thunks.js +17 -18
- src/modules/data/blocks/rsvp/types.js +1 -0
- src/modules/data/blocks/ticket/__tests__/actions.test.js +17 -9
- src/modules/data/blocks/ticket/__tests__/sagas.test.js +357 -326
- src/modules/data/blocks/ticket/__tests__/selectors.test.js +10 -10
- src/modules/data/blocks/ticket/actions.js +1 -2
- src/modules/data/blocks/ticket/constants.js +3 -3
- src/modules/data/blocks/ticket/options.js +1 -1
- src/modules/data/blocks/ticket/reducers/tickets/ticket/__tests__/details.test.js +52 -13
- src/modules/data/blocks/ticket/reducers/tickets/ticket/__tests__/temp-details.test.js +52 -13
- src/modules/data/blocks/ticket/reducers/tickets/ticket/details.js +6 -2
- src/modules/data/blocks/ticket/reducers/tickets/ticket/temp-details.js +6 -2
- src/modules/data/blocks/ticket/sagas.js +121 -42
- src/modules/data/blocks/ticket/selectors.js +19 -7
- src/modules/data/blocks/ticket/types.js +2 -1
- src/modules/data/blocks/ticket/utils.js +6 -1
- src/modules/data/shared/__tests__/sagas.test.js +12 -12
- src/modules/data/shared/move/__tests__/actions.test.js +1 -1
- src/modules/data/shared/move/__tests__/sagas.test.js +2 -11
- src/modules/data/shared/move/actions.js +1 -1
- src/modules/data/shared/move/reducers/__tests__/modal.test.js +4 -4
- src/modules/data/shared/move/reducers/__tests__/postTypes.test.js +3 -4
- src/modules/data/shared/move/reducers/__tests__/posts.test.js +4 -4
- src/modules/data/shared/move/reducers/__tests__/ui.test.js +2 -3
- src/modules/data/shared/move/sagas.js +8 -4
- src/modules/data/shared/move/selectors.js +6 -3
- src/modules/data/shared/sagas.js +3 -2
- src/modules/elements/action-button/__tests__/element.test.js +3 -3
- src/modules/elements/action-button/element.js +2 -2
- src/modules/elements/action-dashboard/element.js +2 -3
- src/modules/elements/attendees-registration/element.js +2 -0
- src/modules/elements/date-time-range-picker/element.js +1 -1
- src/modules/elements/inactive-block/__tests__/element.test.js +6 -2
- src/modules/elements/label-with-tooltip/__tests__/element.test.js +2 -2
- src/modules/elements/move-modal/container.js +3 -3
- src/modules/elements/move-modal/template.js +4 -1
- src/modules/elements/numeric-label/__tests__/element.test.js +11 -11
- src/modules/elements/numeric-label/element.js +15 -14
- src/modules/elements/settings-dashboard/__tests__/element.test.js +6 -2
- src/modules/elements/warning-button/__tests__/element.test.js +1 -1
- src/resources/css/app/blocks.css +2 -3
- src/resources/css/app/blocks.min.css +2 -3
- src/resources/css/attendees.css +3 -3
- src/resources/css/attendees.min.css +1 -1
- src/resources/css/common-responsive.css +26 -27
- src/resources/css/common-responsive.min.css +1 -1
- src/resources/css/details.css +4 -0
- src/resources/css/freemius.css +12 -15
- src/resources/css/freemius.min.css +1 -1
- src/resources/css/rsvp-v1.css +3 -1
- src/resources/css/rsvp-v1.min.css +1 -1
- src/resources/css/rsvp.css +49 -60
- src/resources/css/rsvp.min.css +1 -1
common/lang/tribe-common-cs_CZ.mo
CHANGED
Binary file
|
common/lang/tribe-common-de_DE.mo
CHANGED
Binary file
|
common/lang/tribe-common-es_ES.mo
CHANGED
Binary file
|
common/lang/tribe-common-fr_CA.mo
CHANGED
Binary file
|
common/lang/tribe-common-fr_FR.mo
CHANGED
Binary file
|
common/lang/tribe-common-hu_HU.mo
CHANGED
Binary file
|
common/lang/tribe-common-it_IT.mo
CHANGED
Binary file
|
common/lang/tribe-common-ja.mo
CHANGED
Binary file
|
common/lang/tribe-common-nl_NL.mo
CHANGED
Binary file
|
common/lang/tribe-common-pt_BR.mo
CHANGED
Binary file
|
common/lang/tribe-common-pt_PT.mo
CHANGED
Binary file
|
common/lang/tribe-common.pot
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
# This file is distributed under the same license as the Tribe Common package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Tribe Common 4.14.
|
6 |
"Report-Msgid-Bugs-To: http://m.tri.be/191x\n"
|
7 |
-
"POT-Creation-Date: 2021-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2021-
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
@@ -28,356 +28,373 @@ msgstr ""
|
|
28 |
msgid "Return to WordPress Updates"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: src/Tribe/Admin/Help_Page.php:56
|
32 |
-
|
33 |
msgid "Copy to clipboard"
|
34 |
msgstr ""
|
35 |
|
36 |
#: src/Tribe/Admin/Help_Page.php:57
|
|
|
37 |
msgid "System info copied"
|
38 |
msgstr ""
|
39 |
|
40 |
#: src/Tribe/Admin/Help_Page.php:58
|
|
|
41 |
msgid "Press \"Cmd + C\" to copy"
|
42 |
msgstr ""
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
#. Author of the plugin/theme
|
46 |
-
#: src/Tribe/Admin/Help_Page.php:
|
47 |
#: src/Tribe/Plugins_API.php:25 src/admin-views/help-calendar.php:97
|
48 |
msgid "The Events Calendar"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: src/Tribe/Admin/Help_Page.php:
|
52 |
msgid ""
|
53 |
"The Events Calendar is a carefully crafted, extensible plugin that lets you "
|
54 |
"easily share your events."
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: src/Tribe/Admin/Help_Page.php:
|
58 |
#: src/admin-views/help-ticketing.php:97
|
59 |
msgid "Event Tickets"
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: src/Tribe/Admin/Help_Page.php:
|
63 |
msgid ""
|
64 |
"Events Tickets is a carefully crafted, extensible plugin that lets you "
|
65 |
"easily sell tickets for your events."
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: src/Tribe/Admin/Help_Page.php:
|
69 |
msgid "Advanced Post Manager"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: src/Tribe/Admin/Help_Page.php:
|
73 |
msgid ""
|
74 |
"Turbo charge your posts admin for any custom post type with sortable filters "
|
75 |
"and columns, and auto-registration of metaboxes."
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: src/Tribe/Admin/Help_Page.php:
|
79 |
msgid " and "
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: src/Tribe/Admin/Help_Page.php:
|
83 |
msgid "Events Calendar PRO"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: src/Tribe/Admin/Help_Page.php:
|
87 |
msgid "Eventbrite Tickets"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: src/Tribe/Admin/Help_Page.php:
|
91 |
#: src/admin-views/help-community.php:90
|
92 |
msgid "Community Events"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: src/Tribe/Admin/Help_Page.php:
|
96 |
#: src/admin-views/help-calendar.php:102
|
97 |
msgid "Event Aggregator"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: src/Tribe/Admin/Help_Page.php:
|
101 |
#: src/admin-views/help-calendar.php:107
|
102 |
msgid "Filter Bar"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: src/Tribe/Admin/Help_Page.php:
|
106 |
#: src/admin-views/help-calendar.php:112
|
107 |
msgid "Virtual Events"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: src/Tribe/Admin/Help_Page.php:
|
111 |
msgid "Event Tickets Plus"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: src/Tribe/Admin/Help_Page.php:
|
115 |
#: src/admin-views/help-community.php:95
|
116 |
msgid "Community Tickets"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: src/Tribe/Admin/Help_Page.php:
|
120 |
msgctxt "not available"
|
121 |
msgid "n/a"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: src/Tribe/Admin/Help_Page.php:
|
125 |
msgid "You need to upgrade!"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: src/Tribe/Admin/Help_Page.php:
|
129 |
msgid "You are up to date!"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: src/Tribe/Admin/Help_Page.php:
|
133 |
msgid "Activate %s"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: src/Tribe/Admin/Help_Page.php:
|
137 |
msgid "Activate Plugin"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: src/Tribe/Admin/Help_Page.php:
|
141 |
msgid "Upgrade Plugin"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: src/Tribe/Admin/Help_Page.php:
|
145 |
msgid "Install %s"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: src/Tribe/Admin/Help_Page.php:
|
149 |
msgid "Install Plugin"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: src/Tribe/Admin/Help_Page.php:
|
153 |
msgid "Latest Version:"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: src/Tribe/Admin/Help_Page.php:
|
157 |
msgid "Requires:"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: src/Tribe/Admin/Help_Page.php:
|
161 |
msgid "WordPress "
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: src/Tribe/Admin/Help_Page.php:
|
165 |
msgid "Active Users:"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: src/Tribe/Admin/Help_Page.php:
|
169 |
msgid "Rating:"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: src/Tribe/Admin/Help_Page.php:
|
173 |
msgid "Premium Add-Ons"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: src/Tribe/Admin/Help_Page.php:
|
177 |
msgid "Plugin Active"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: src/Tribe/Admin/Help_Page.php:
|
181 |
msgid "Plugin Inactive"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: src/Tribe/Admin/Help_Page.php:
|
185 |
msgid "Visit the Add-on Page"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: src/Tribe/Admin/Help_Page.php:
|
189 |
msgid "Can I have more than one calendar?"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: src/Tribe/Admin/Help_Page.php:
|
193 |
msgid ""
|
194 |
"No, but you can use event categories or tags to display certain events like "
|
195 |
"having..."
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: src/Tribe/Admin/Help_Page.php:
|
199 |
msgid "What do I get with Events Calendar Pro?"
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: src/Tribe/Admin/Help_Page.php:
|
203 |
msgid "Events Calendar Pro runs alongside The Events Calendar and enhances..."
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: src/Tribe/Admin/Help_Page.php:
|
207 |
msgid "How do I sell tickets to events?"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: src/Tribe/Admin/Help_Page.php:
|
211 |
msgid ""
|
212 |
"Use our free Event Tickets plugin to get started with tickets and RSVPs."
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: src/Tribe/Admin/Help_Page.php:
|
216 |
msgid "Where can I find a list of available shortcodes?"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: src/Tribe/Admin/Help_Page.php:
|
220 |
msgid ""
|
221 |
"Our plugins include many shortcodes that do everything from embedding the "
|
222 |
"calendar..."
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: src/Tribe/Admin/Help_Page.php:
|
226 |
msgid "Calendar widget areas"
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: src/Tribe/Admin/Help_Page.php:
|
230 |
msgid ""
|
231 |
"This extension creates a useful variety of WordPress widget areas (a.k.a. "
|
232 |
"sidebars)."
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: src/Tribe/Admin/Help_Page.php:
|
236 |
msgid "Event block patterns"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: src/Tribe/Admin/Help_Page.php:
|
240 |
msgid ""
|
241 |
"This extension adds a set of block patterns for events to the WordPress "
|
242 |
"block editor."
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: src/Tribe/Admin/Help_Page.php:
|
246 |
msgid "Alternative photo view"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: src/Tribe/Admin/Help_Page.php:
|
250 |
msgid ""
|
251 |
"This extension replaces photo view with a tiled grid of cards featuring "
|
252 |
"event images."
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: src/Tribe/Admin/Help_Page.php:
|
256 |
msgid "The Events Calendar Tweaks"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: src/Tribe/Admin/Help_Page.php:
|
260 |
msgid ""
|
261 |
"This extension is a collection of tweaks and snippets for The Events "
|
262 |
"Calendar."
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: src/Tribe/Admin/Help_Page.php:
|
266 |
msgid "How Do I create events with Tickets or RSVP’s?"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: src/Tribe/Admin/Help_Page.php:
|
270 |
msgid ""
|
271 |
"We’ve put together a video tutorial showing how to create events with "
|
272 |
"Tickets using our plugins. Click on the link in the link in the title to "
|
273 |
"learn more."
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: src/Tribe/Admin/Help_Page.php:
|
277 |
msgid "How Do I Set Up E-Commerce Plugins for Selling Tickets?"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: src/Tribe/Admin/Help_Page.php:
|
281 |
msgid ""
|
282 |
"You can sell tickets using our built-in e-commerce option, or upgrade to "
|
283 |
"Event Tickets Plus to use ecommerce plugins such as WooCommerce."
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: src/Tribe/Admin/Help_Page.php:
|
287 |
msgid "Can I have a seating chart associated with my tickets?"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: src/Tribe/Admin/Help_Page.php:
|
291 |
msgid ""
|
292 |
"Yes! You can easily accomplish this task using the stock options and "
|
293 |
"multiple ticket types available with Event Tickets."
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: src/Tribe/Admin/Help_Page.php:
|
297 |
msgid "How do I process refunds for tickets?"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: src/Tribe/Admin/Help_Page.php:
|
301 |
msgid ""
|
302 |
"When it comes to paid tickets, these orders can be refunded through the e-"
|
303 |
"commerce platform in use."
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: src/Tribe/Admin/Help_Page.php:
|
307 |
msgid "Ticket Email Settings"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: src/Tribe/Admin/Help_Page.php:
|
311 |
msgid ""
|
312 |
"Adds a new settings panel in Events > Settings that gives more control over "
|
313 |
"the ticket and rsvp emails that are sent to attendees after registration."
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: src/Tribe/Admin/Help_Page.php:
|
317 |
msgid "Per Event Check In API"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: src/Tribe/Admin/Help_Page.php:
|
321 |
msgid ""
|
322 |
"This extension shows a meta box with an API key on each Event with Ticket/"
|
323 |
"RSVP."
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: src/Tribe/Admin/Help_Page.php:
|
327 |
msgid "Add Event & Attendee Info to WooCommerce Order Details"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: src/Tribe/Admin/Help_Page.php:
|
331 |
msgid ""
|
332 |
"Displays the information collected by “attendee meta fields” in the "
|
333 |
"WooCommerce order screens as well."
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: src/Tribe/Admin/Help_Page.php:
|
337 |
msgid "Organizer Notification Email"
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: src/Tribe/Admin/Help_Page.php:
|
341 |
msgid ""
|
342 |
"This extension will send an email to event organizers whenever a user "
|
343 |
"registers for their event."
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: src/Tribe/Admin/Help_Page.php:
|
347 |
msgid "Add Cost Currency Symbol"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: src/Tribe/Admin/Help_Page.php:
|
351 |
msgid ""
|
352 |
"This extension allows you to set default currency symbols for your users to "
|
353 |
"choose from instead of having a plain text field."
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: src/Tribe/Admin/Help_Page.php:
|
357 |
msgid "Add Google Maps Display and Link Options"
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: src/Tribe/Admin/Help_Page.php:
|
361 |
msgid ""
|
362 |
"This extension adds the “Show Google Maps” and “Show Google Maps Link” "
|
363 |
"checkboxes when creating a new Venue."
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: src/Tribe/Admin/Help_Page.php:
|
367 |
msgid "Hide Others’ Organizers and Venues"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: src/Tribe/Admin/Help_Page.php:
|
371 |
msgid ""
|
372 |
"This extension allows you to hide the Organizers and Venues that a visitor "
|
373 |
"has not created from the Community Events submission form."
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: src/Tribe/Admin/Help_Page.php:
|
377 |
msgid "Display Custom HTML"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: src/Tribe/Admin/Help_Page.php:
|
381 |
msgid ""
|
382 |
"This extension allows you to add custom HTML content to the top of the "
|
383 |
"Community Events submission form."
|
@@ -557,15 +574,15 @@ msgstr ""
|
|
557 |
msgid "Cannot look for Terms without a taxonomy"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: src/Tribe/Ajax/Dropdown.php:
|
561 |
msgid "Missing data source for this dropdown"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: src/Tribe/Ajax/Dropdown.php:
|
565 |
msgid "Empty data set for this dropdown"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: src/Tribe/Ajax/Dropdown.php:
|
569 |
msgid "The \"%s\" source is invalid and cannot be reached on \"%s\" instance."
|
570 |
msgstr ""
|
571 |
|
@@ -2857,42 +2874,42 @@ msgid ""
|
|
2857 |
"overrides is provided below."
|
2858 |
msgstr ""
|
2859 |
|
2860 |
-
#: src/Tribe/Support.php:
|
2861 |
msgid "English"
|
2862 |
msgstr ""
|
2863 |
|
2864 |
-
#: src/Tribe/Support.php:
|
2865 |
msgid "Unknown or not set"
|
2866 |
msgstr ""
|
2867 |
|
2868 |
-
#: src/Tribe/Support.php:
|
2869 |
msgid ""
|
2870 |
"Rewrite rules were purged on load of this help page. Chances are there is a "
|
2871 |
"rewrite rule flush occurring in a plugin or theme!"
|
2872 |
msgstr ""
|
2873 |
|
2874 |
-
#: src/Tribe/Support.php:
|
2875 |
msgid ""
|
2876 |
"Yes, automatically share my system information with The Events Calendar's "
|
2877 |
"support team"
|
2878 |
msgstr ""
|
2879 |
|
2880 |
-
#: src/Tribe/Support.php:
|
2881 |
msgid ""
|
2882 |
"Your system information will only be used by The Events Calendar's support "
|
2883 |
"team. All information is stored securely. We do not share this information "
|
2884 |
"with any third parties."
|
2885 |
msgstr ""
|
2886 |
|
2887 |
-
#: src/Tribe/Support.php:
|
2888 |
msgid "Invalid Key"
|
2889 |
msgstr ""
|
2890 |
|
2891 |
-
#: src/Tribe/Support.php:
|
2892 |
msgid "Permission Error"
|
2893 |
msgstr ""
|
2894 |
|
2895 |
-
#: src/Tribe/Support.php:
|
2896 |
msgid "Unique System Info Key Generated"
|
2897 |
msgstr ""
|
2898 |
|
@@ -3523,7 +3540,7 @@ msgid "Read more about our support policy"
|
|
3523 |
msgstr ""
|
3524 |
|
3525 |
#: src/admin-views/tribe-options-help.php:71
|
3526 |
-
#: src/admin-views/troubleshooting/system-information.php:
|
3527 |
msgid "System Information"
|
3528 |
msgstr ""
|
3529 |
|
@@ -3535,6 +3552,11 @@ msgid ""
|
|
3535 |
"allow us to assist you faster if you post in our help desk."
|
3536 |
msgstr ""
|
3537 |
|
|
|
|
|
|
|
|
|
|
|
3538 |
#: src/admin-views/tribe-options-help.php:82
|
3539 |
msgid "Recent Template Changes"
|
3540 |
msgstr ""
|
@@ -3829,20 +3851,20 @@ msgstr ""
|
|
3829 |
msgid "Open a ticket"
|
3830 |
msgstr ""
|
3831 |
|
3832 |
-
#: src/admin-views/troubleshooting/system-information.php:
|
3833 |
msgid ""
|
3834 |
"Please opt-in below to automatically share your system information with our "
|
3835 |
"support team. This will allow us to assist you faster if you post in our "
|
3836 |
"help desk."
|
3837 |
msgstr ""
|
3838 |
|
3839 |
-
#: src/admin-views/troubleshooting/system-information.php:
|
3840 |
msgid ""
|
3841 |
"Yes, automatically share my system information with The Events Calendar "
|
3842 |
"support team*"
|
3843 |
msgstr ""
|
3844 |
|
3845 |
-
#: src/admin-views/troubleshooting/system-information.php:
|
3846 |
msgid ""
|
3847 |
"* Your system information will only be used by The Events Calendar support "
|
3848 |
"team. All information is stored securely. We do not share this information "
|
2 |
# This file is distributed under the same license as the Tribe Common package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Tribe Common 4.14.5\n"
|
6 |
"Report-Msgid-Bugs-To: http://m.tri.be/191x\n"
|
7 |
+
"POT-Creation-Date: 2021-09-14 04:33:24+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2021-09-14 04:33\n"
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
28 |
msgid "Return to WordPress Updates"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: src/Tribe/Admin/Help_Page.php:56
|
32 |
+
msgctxt "Copy to clipboard button text."
|
33 |
msgid "Copy to clipboard"
|
34 |
msgstr ""
|
35 |
|
36 |
#: src/Tribe/Admin/Help_Page.php:57
|
37 |
+
msgctxt "Copy to clipboard success message"
|
38 |
msgid "System info copied"
|
39 |
msgstr ""
|
40 |
|
41 |
#: src/Tribe/Admin/Help_Page.php:58
|
42 |
+
msgctxt "Copy to clipboard instructions"
|
43 |
msgid "Press \"Cmd + C\" to copy"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: src/Tribe/Admin/Help_Page.php:59
|
47 |
+
msgctxt "Default error message for system info optin"
|
48 |
+
msgid "Something has gone wrong!"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: src/Tribe/Admin/Help_Page.php:60
|
52 |
+
msgctxt "Error code label for system info optin"
|
53 |
+
msgid "Code:"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: src/Tribe/Admin/Help_Page.php:61
|
57 |
+
msgctxt "Error status label for system info optin"
|
58 |
+
msgid "Status:"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#. #-#-#-#-# tribe-common.pot (Tribe Common 4.14.5) #-#-#-#-#
|
62 |
#. Author of the plugin/theme
|
63 |
+
#: src/Tribe/Admin/Help_Page.php:82 src/Tribe/Customizer.php:664
|
64 |
#: src/Tribe/Plugins_API.php:25 src/admin-views/help-calendar.php:97
|
65 |
msgid "The Events Calendar"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: src/Tribe/Admin/Help_Page.php:86
|
69 |
msgid ""
|
70 |
"The Events Calendar is a carefully crafted, extensible plugin that lets you "
|
71 |
"easily share your events."
|
72 |
msgstr ""
|
73 |
|
74 |
+
#: src/Tribe/Admin/Help_Page.php:101 src/Tribe/Plugins_API.php:85
|
75 |
#: src/admin-views/help-ticketing.php:97
|
76 |
msgid "Event Tickets"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: src/Tribe/Admin/Help_Page.php:105
|
80 |
msgid ""
|
81 |
"Events Tickets is a carefully crafted, extensible plugin that lets you "
|
82 |
"easily sell tickets for your events."
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: src/Tribe/Admin/Help_Page.php:120
|
86 |
msgid "Advanced Post Manager"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: src/Tribe/Admin/Help_Page.php:124
|
90 |
msgid ""
|
91 |
"Turbo charge your posts admin for any custom post type with sortable filters "
|
92 |
"and columns, and auto-registration of metaboxes."
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: src/Tribe/Admin/Help_Page.php:202
|
96 |
msgid " and "
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: src/Tribe/Admin/Help_Page.php:226
|
100 |
msgid "Events Calendar PRO"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: src/Tribe/Admin/Help_Page.php:235 src/Tribe/Plugins_API.php:206
|
104 |
msgid "Eventbrite Tickets"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: src/Tribe/Admin/Help_Page.php:243 src/Tribe/Plugins_API.php:165
|
108 |
#: src/admin-views/help-community.php:90
|
109 |
msgid "Community Events"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: src/Tribe/Admin/Help_Page.php:251 src/Tribe/Plugins_API.php:45
|
113 |
#: src/admin-views/help-calendar.php:102
|
114 |
msgid "Event Aggregator"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: src/Tribe/Admin/Help_Page.php:261 src/Tribe/Plugins_API.php:145
|
118 |
#: src/admin-views/help-calendar.php:107
|
119 |
msgid "Filter Bar"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: src/Tribe/Admin/Help_Page.php:269 src/Tribe/Plugins_API.php:245
|
123 |
#: src/admin-views/help-calendar.php:112
|
124 |
msgid "Virtual Events"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: src/Tribe/Admin/Help_Page.php:277 src/Tribe/Plugins_API.php:105
|
128 |
msgid "Event Tickets Plus"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: src/Tribe/Admin/Help_Page.php:286 src/Tribe/Plugins_API.php:185
|
132 |
#: src/admin-views/help-community.php:95
|
133 |
msgid "Community Tickets"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: src/Tribe/Admin/Help_Page.php:447
|
137 |
msgctxt "not available"
|
138 |
msgid "n/a"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: src/Tribe/Admin/Help_Page.php:455
|
142 |
msgid "You need to upgrade!"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: src/Tribe/Admin/Help_Page.php:455 src/Tribe/Admin/Help_Page.php:830
|
146 |
msgid "You are up to date!"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: src/Tribe/Admin/Help_Page.php:820
|
150 |
msgid "Activate %s"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: src/Tribe/Admin/Help_Page.php:820
|
154 |
msgid "Activate Plugin"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: src/Tribe/Admin/Help_Page.php:828
|
158 |
msgid "Upgrade Plugin"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: src/Tribe/Admin/Help_Page.php:844
|
162 |
msgid "Install %s"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: src/Tribe/Admin/Help_Page.php:844
|
166 |
msgid "Install Plugin"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: src/Tribe/Admin/Help_Page.php:861
|
170 |
msgid "Latest Version:"
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: src/Tribe/Admin/Help_Page.php:864
|
174 |
msgid "Requires:"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: src/Tribe/Admin/Help_Page.php:865
|
178 |
msgid "WordPress "
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: src/Tribe/Admin/Help_Page.php:867
|
182 |
msgid "Active Users:"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: src/Tribe/Admin/Help_Page.php:870
|
186 |
msgid "Rating:"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: src/Tribe/Admin/Help_Page.php:893
|
190 |
msgid "Premium Add-Ons"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: src/Tribe/Admin/Help_Page.php:899
|
194 |
msgid "Plugin Active"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: src/Tribe/Admin/Help_Page.php:901
|
198 |
msgid "Plugin Inactive"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: src/Tribe/Admin/Help_Page.php:906
|
202 |
msgid "Visit the Add-on Page"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: src/Tribe/Admin/Help_Page.php:930
|
206 |
msgid "Can I have more than one calendar?"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: src/Tribe/Admin/Help_Page.php:931
|
210 |
msgid ""
|
211 |
"No, but you can use event categories or tags to display certain events like "
|
212 |
"having..."
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: src/Tribe/Admin/Help_Page.php:935
|
216 |
msgid "What do I get with Events Calendar Pro?"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: src/Tribe/Admin/Help_Page.php:936
|
220 |
msgid "Events Calendar Pro runs alongside The Events Calendar and enhances..."
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: src/Tribe/Admin/Help_Page.php:940
|
224 |
msgid "How do I sell tickets to events?"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: src/Tribe/Admin/Help_Page.php:941
|
228 |
msgid ""
|
229 |
"Use our free Event Tickets plugin to get started with tickets and RSVPs."
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: src/Tribe/Admin/Help_Page.php:945
|
233 |
msgid "Where can I find a list of available shortcodes?"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: src/Tribe/Admin/Help_Page.php:946
|
237 |
msgid ""
|
238 |
"Our plugins include many shortcodes that do everything from embedding the "
|
239 |
"calendar..."
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: src/Tribe/Admin/Help_Page.php:964
|
243 |
msgid "Calendar widget areas"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: src/Tribe/Admin/Help_Page.php:965
|
247 |
msgid ""
|
248 |
"This extension creates a useful variety of WordPress widget areas (a.k.a. "
|
249 |
"sidebars)."
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: src/Tribe/Admin/Help_Page.php:970
|
253 |
msgid "Event block patterns"
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: src/Tribe/Admin/Help_Page.php:971
|
257 |
msgid ""
|
258 |
"This extension adds a set of block patterns for events to the WordPress "
|
259 |
"block editor."
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: src/Tribe/Admin/Help_Page.php:976
|
263 |
msgid "Alternative photo view"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: src/Tribe/Admin/Help_Page.php:977
|
267 |
msgid ""
|
268 |
"This extension replaces photo view with a tiled grid of cards featuring "
|
269 |
"event images."
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: src/Tribe/Admin/Help_Page.php:982
|
273 |
msgid "The Events Calendar Tweaks"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: src/Tribe/Admin/Help_Page.php:983
|
277 |
msgid ""
|
278 |
"This extension is a collection of tweaks and snippets for The Events "
|
279 |
"Calendar."
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: src/Tribe/Admin/Help_Page.php:1020
|
283 |
msgid "How Do I create events with Tickets or RSVP’s?"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: src/Tribe/Admin/Help_Page.php:1021
|
287 |
msgid ""
|
288 |
"We’ve put together a video tutorial showing how to create events with "
|
289 |
"Tickets using our plugins. Click on the link in the link in the title to "
|
290 |
"learn more."
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: src/Tribe/Admin/Help_Page.php:1025
|
294 |
msgid "How Do I Set Up E-Commerce Plugins for Selling Tickets?"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: src/Tribe/Admin/Help_Page.php:1026
|
298 |
msgid ""
|
299 |
"You can sell tickets using our built-in e-commerce option, or upgrade to "
|
300 |
"Event Tickets Plus to use ecommerce plugins such as WooCommerce."
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: src/Tribe/Admin/Help_Page.php:1030
|
304 |
msgid "Can I have a seating chart associated with my tickets?"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: src/Tribe/Admin/Help_Page.php:1031
|
308 |
msgid ""
|
309 |
"Yes! You can easily accomplish this task using the stock options and "
|
310 |
"multiple ticket types available with Event Tickets."
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: src/Tribe/Admin/Help_Page.php:1035
|
314 |
msgid "How do I process refunds for tickets?"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: src/Tribe/Admin/Help_Page.php:1036
|
318 |
msgid ""
|
319 |
"When it comes to paid tickets, these orders can be refunded through the e-"
|
320 |
"commerce platform in use."
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: src/Tribe/Admin/Help_Page.php:1054
|
324 |
msgid "Ticket Email Settings"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: src/Tribe/Admin/Help_Page.php:1055
|
328 |
msgid ""
|
329 |
"Adds a new settings panel in Events > Settings that gives more control over "
|
330 |
"the ticket and rsvp emails that are sent to attendees after registration."
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: src/Tribe/Admin/Help_Page.php:1060
|
334 |
msgid "Per Event Check In API"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: src/Tribe/Admin/Help_Page.php:1061
|
338 |
msgid ""
|
339 |
"This extension shows a meta box with an API key on each Event with Ticket/"
|
340 |
"RSVP."
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: src/Tribe/Admin/Help_Page.php:1066
|
344 |
msgid "Add Event & Attendee Info to WooCommerce Order Details"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: src/Tribe/Admin/Help_Page.php:1067
|
348 |
msgid ""
|
349 |
"Displays the information collected by “attendee meta fields” in the "
|
350 |
"WooCommerce order screens as well."
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: src/Tribe/Admin/Help_Page.php:1072
|
354 |
msgid "Organizer Notification Email"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: src/Tribe/Admin/Help_Page.php:1073
|
358 |
msgid ""
|
359 |
"This extension will send an email to event organizers whenever a user "
|
360 |
"registers for their event."
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: src/Tribe/Admin/Help_Page.php:1110
|
364 |
msgid "Add Cost Currency Symbol"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: src/Tribe/Admin/Help_Page.php:1111
|
368 |
msgid ""
|
369 |
"This extension allows you to set default currency symbols for your users to "
|
370 |
"choose from instead of having a plain text field."
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: src/Tribe/Admin/Help_Page.php:1116
|
374 |
msgid "Add Google Maps Display and Link Options"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: src/Tribe/Admin/Help_Page.php:1117
|
378 |
msgid ""
|
379 |
"This extension adds the “Show Google Maps” and “Show Google Maps Link” "
|
380 |
"checkboxes when creating a new Venue."
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: src/Tribe/Admin/Help_Page.php:1122
|
384 |
msgid "Hide Others’ Organizers and Venues"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: src/Tribe/Admin/Help_Page.php:1123
|
388 |
msgid ""
|
389 |
"This extension allows you to hide the Organizers and Venues that a visitor "
|
390 |
"has not created from the Community Events submission form."
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: src/Tribe/Admin/Help_Page.php:1128
|
394 |
msgid "Display Custom HTML"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: src/Tribe/Admin/Help_Page.php:1129
|
398 |
msgid ""
|
399 |
"This extension allows you to add custom HTML content to the top of the "
|
400 |
"Community Events submission form."
|
574 |
msgid "Cannot look for Terms without a taxonomy"
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: src/Tribe/Ajax/Dropdown.php:270
|
578 |
msgid "Missing data source for this dropdown"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: src/Tribe/Ajax/Dropdown.php:283
|
582 |
msgid "Empty data set for this dropdown"
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: src/Tribe/Ajax/Dropdown.php:336
|
586 |
msgid "The \"%s\" source is invalid and cannot be reached on \"%s\" instance."
|
587 |
msgstr ""
|
588 |
|
2874 |
"overrides is provided below."
|
2875 |
msgstr ""
|
2876 |
|
2877 |
+
#: src/Tribe/Support.php:191
|
2878 |
msgid "English"
|
2879 |
msgstr ""
|
2880 |
|
2881 |
+
#: src/Tribe/Support.php:210 src/Tribe/Support.php:211
|
2882 |
msgid "Unknown or not set"
|
2883 |
msgstr ""
|
2884 |
|
2885 |
+
#: src/Tribe/Support.php:221
|
2886 |
msgid ""
|
2887 |
"Rewrite rules were purged on load of this help page. Chances are there is a "
|
2888 |
"rewrite rule flush occurring in a plugin or theme!"
|
2889 |
msgstr ""
|
2890 |
|
2891 |
+
#: src/Tribe/Support.php:324
|
2892 |
msgid ""
|
2893 |
"Yes, automatically share my system information with The Events Calendar's "
|
2894 |
"support team"
|
2895 |
msgstr ""
|
2896 |
|
2897 |
+
#: src/Tribe/Support.php:325
|
2898 |
msgid ""
|
2899 |
"Your system information will only be used by The Events Calendar's support "
|
2900 |
"team. All information is stored securely. We do not share this information "
|
2901 |
"with any third parties."
|
2902 |
msgstr ""
|
2903 |
|
2904 |
+
#: src/Tribe/Support.php:344 src/Tribe/Support.php:349
|
2905 |
msgid "Invalid Key"
|
2906 |
msgstr ""
|
2907 |
|
2908 |
+
#: src/Tribe/Support.php:382 src/Tribe/Support.php:408
|
2909 |
msgid "Permission Error"
|
2910 |
msgstr ""
|
2911 |
|
2912 |
+
#: src/Tribe/Support.php:396
|
2913 |
msgid "Unique System Info Key Generated"
|
2914 |
msgstr ""
|
2915 |
|
3540 |
msgstr ""
|
3541 |
|
3542 |
#: src/admin-views/tribe-options-help.php:71
|
3543 |
+
#: src/admin-views/troubleshooting/system-information.php:16
|
3544 |
msgid "System Information"
|
3545 |
msgstr ""
|
3546 |
|
3552 |
"allow us to assist you faster if you post in our help desk."
|
3553 |
msgstr ""
|
3554 |
|
3555 |
+
#: src/admin-views/tribe-options-help.php:80
|
3556 |
+
#: src/admin-views/troubleshooting/system-information.php:39
|
3557 |
+
msgid "Copy to clipboard"
|
3558 |
+
msgstr ""
|
3559 |
+
|
3560 |
#: src/admin-views/tribe-options-help.php:82
|
3561 |
msgid "Recent Template Changes"
|
3562 |
msgstr ""
|
3851 |
msgid "Open a ticket"
|
3852 |
msgstr ""
|
3853 |
|
3854 |
+
#: src/admin-views/troubleshooting/system-information.php:19
|
3855 |
msgid ""
|
3856 |
"Please opt-in below to automatically share your system information with our "
|
3857 |
"support team. This will allow us to assist you faster if you post in our "
|
3858 |
"help desk."
|
3859 |
msgstr ""
|
3860 |
|
3861 |
+
#: src/admin-views/troubleshooting/system-information.php:24
|
3862 |
msgid ""
|
3863 |
"Yes, automatically share my system information with The Events Calendar "
|
3864 |
"support team*"
|
3865 |
msgstr ""
|
3866 |
|
3867 |
+
#: src/admin-views/troubleshooting/system-information.php:28
|
3868 |
msgid ""
|
3869 |
"* Your system information will only be used by The Events Calendar support "
|
3870 |
"team. All information is stored securely. We do not share this information "
|
common/node_modules/intro.js/intro.js
ADDED
@@ -0,0 +1,4421 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Intro.js v3.4.0
|
3 |
+
* https://introjs.com
|
4 |
+
*
|
5 |
+
* Copyright (C) 2012-2021 Afshin Mehrabani (@afshinmeh).
|
6 |
+
* https://raw.githubusercontent.com/usablica/intro.js/master/license.md
|
7 |
+
*
|
8 |
+
* Date: Thu, 25 Mar 2021 09:48:49 GMT
|
9 |
+
*/
|
10 |
+
|
11 |
+
(function (global, factory) {
|
12 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
13 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
14 |
+
(global = global || self, global.introJs = factory());
|
15 |
+
}(this, (function () { 'use strict';
|
16 |
+
|
17 |
+
function _typeof(obj) {
|
18 |
+
"@babel/helpers - typeof";
|
19 |
+
|
20 |
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
21 |
+
_typeof = function (obj) {
|
22 |
+
return typeof obj;
|
23 |
+
};
|
24 |
+
} else {
|
25 |
+
_typeof = function (obj) {
|
26 |
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
27 |
+
};
|
28 |
+
}
|
29 |
+
|
30 |
+
return _typeof(obj);
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Overwrites obj1's values with obj2's and adds obj2's if non existent in obj1
|
35 |
+
* via: http://stackoverflow.com/questions/171251/how-can-i-merge-properties-of-two-javascript-objects-dynamically
|
36 |
+
*
|
37 |
+
* @param obj1
|
38 |
+
* @param obj2
|
39 |
+
* @returns obj3 a new object based on obj1 and obj2
|
40 |
+
*/
|
41 |
+
function mergeOptions(obj1, obj2) {
|
42 |
+
var obj3 = {};
|
43 |
+
var attrname;
|
44 |
+
|
45 |
+
for (attrname in obj1) {
|
46 |
+
obj3[attrname] = obj1[attrname];
|
47 |
+
}
|
48 |
+
|
49 |
+
for (attrname in obj2) {
|
50 |
+
obj3[attrname] = obj2[attrname];
|
51 |
+
}
|
52 |
+
|
53 |
+
return obj3;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Mark any object with an incrementing number
|
58 |
+
* used for keeping track of objects
|
59 |
+
*
|
60 |
+
* @param Object obj Any object or DOM Element
|
61 |
+
* @param String key
|
62 |
+
* @return Object
|
63 |
+
*/
|
64 |
+
var stamp = function () {
|
65 |
+
var keys = {};
|
66 |
+
return function stamp(obj) {
|
67 |
+
var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "introjs-stamp";
|
68 |
+
// each group increments from 0
|
69 |
+
keys[key] = keys[key] || 0; // stamp only once per object
|
70 |
+
|
71 |
+
if (obj[key] === undefined) {
|
72 |
+
// increment key for each new object
|
73 |
+
obj[key] = keys[key]++;
|
74 |
+
}
|
75 |
+
|
76 |
+
return obj[key];
|
77 |
+
};
|
78 |
+
}();
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Iterates arrays
|
82 |
+
*
|
83 |
+
* @param {Array} arr
|
84 |
+
* @param {Function} forEachFnc
|
85 |
+
* @param {Function} completeFnc
|
86 |
+
* @return {Null}
|
87 |
+
*/
|
88 |
+
function forEach(arr, forEachFnc, completeFnc) {
|
89 |
+
// in case arr is an empty query selector node list
|
90 |
+
if (arr) {
|
91 |
+
for (var i = 0, len = arr.length; i < len; i++) {
|
92 |
+
forEachFnc(arr[i], i);
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
if (typeof completeFnc === "function") {
|
97 |
+
completeFnc();
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* DOMEvent Handles all DOM events
|
103 |
+
*
|
104 |
+
* methods:
|
105 |
+
*
|
106 |
+
* on - add event handler
|
107 |
+
* off - remove event
|
108 |
+
*/
|
109 |
+
|
110 |
+
var DOMEvent = function () {
|
111 |
+
function DOMEvent() {
|
112 |
+
var events_key = "introjs_event";
|
113 |
+
/**
|
114 |
+
* Gets a unique ID for an event listener
|
115 |
+
*
|
116 |
+
* @param obj Object
|
117 |
+
* @param type event type
|
118 |
+
* @param listener Function
|
119 |
+
* @param context Object
|
120 |
+
* @return String
|
121 |
+
*/
|
122 |
+
|
123 |
+
this._id = function (obj, type, listener, context) {
|
124 |
+
return type + stamp(listener) + (context ? "_".concat(stamp(context)) : "");
|
125 |
+
};
|
126 |
+
/**
|
127 |
+
* Adds event listener
|
128 |
+
*
|
129 |
+
* @param obj Object obj
|
130 |
+
* @param type String
|
131 |
+
* @param listener Function
|
132 |
+
* @param context Object
|
133 |
+
* @param useCapture Boolean
|
134 |
+
* @return null
|
135 |
+
*/
|
136 |
+
|
137 |
+
|
138 |
+
this.on = function (obj, type, listener, context, useCapture) {
|
139 |
+
var id = this._id.apply(this, arguments);
|
140 |
+
|
141 |
+
var handler = function handler(e) {
|
142 |
+
return listener.call(context || obj, e || window.event);
|
143 |
+
};
|
144 |
+
|
145 |
+
if ("addEventListener" in obj) {
|
146 |
+
obj.addEventListener(type, handler, useCapture);
|
147 |
+
} else if ("attachEvent" in obj) {
|
148 |
+
obj.attachEvent("on".concat(type), handler);
|
149 |
+
}
|
150 |
+
|
151 |
+
obj[events_key] = obj[events_key] || {};
|
152 |
+
obj[events_key][id] = handler;
|
153 |
+
};
|
154 |
+
/**
|
155 |
+
* Removes event listener
|
156 |
+
*
|
157 |
+
* @param obj Object
|
158 |
+
* @param type String
|
159 |
+
* @param listener Function
|
160 |
+
* @param context Object
|
161 |
+
* @param useCapture Boolean
|
162 |
+
* @return null
|
163 |
+
*/
|
164 |
+
|
165 |
+
|
166 |
+
this.off = function (obj, type, listener, context, useCapture) {
|
167 |
+
var id = this._id.apply(this, arguments);
|
168 |
+
|
169 |
+
var handler = obj[events_key] && obj[events_key][id];
|
170 |
+
|
171 |
+
if (!handler) {
|
172 |
+
return;
|
173 |
+
}
|
174 |
+
|
175 |
+
if ("removeEventListener" in obj) {
|
176 |
+
obj.removeEventListener(type, handler, useCapture);
|
177 |
+
} else if ("detachEvent" in obj) {
|
178 |
+
obj.detachEvent("on".concat(type), handler);
|
179 |
+
}
|
180 |
+
|
181 |
+
obj[events_key][id] = null;
|
182 |
+
};
|
183 |
+
}
|
184 |
+
|
185 |
+
return new DOMEvent();
|
186 |
+
}();
|
187 |
+
|
188 |
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
189 |
+
|
190 |
+
function createCommonjsModule(fn, module) {
|
191 |
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
192 |
+
}
|
193 |
+
|
194 |
+
var check = function (it) {
|
195 |
+
return it && it.Math == Math && it;
|
196 |
+
};
|
197 |
+
|
198 |
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
199 |
+
var global_1 =
|
200 |
+
/* global globalThis -- safe */
|
201 |
+
check(typeof globalThis == 'object' && globalThis) ||
|
202 |
+
check(typeof window == 'object' && window) ||
|
203 |
+
check(typeof self == 'object' && self) ||
|
204 |
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
205 |
+
// eslint-disable-next-line no-new-func -- fallback
|
206 |
+
(function () { return this; })() || Function('return this')();
|
207 |
+
|
208 |
+
var fails = function (exec) {
|
209 |
+
try {
|
210 |
+
return !!exec();
|
211 |
+
} catch (error) {
|
212 |
+
return true;
|
213 |
+
}
|
214 |
+
};
|
215 |
+
|
216 |
+
// Detect IE8's incomplete defineProperty implementation
|
217 |
+
var descriptors = !fails(function () {
|
218 |
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
219 |
+
});
|
220 |
+
|
221 |
+
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
222 |
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
223 |
+
|
224 |
+
// Nashorn ~ JDK8 bug
|
225 |
+
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
226 |
+
|
227 |
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
228 |
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
229 |
+
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
230 |
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
231 |
+
return !!descriptor && descriptor.enumerable;
|
232 |
+
} : nativePropertyIsEnumerable;
|
233 |
+
|
234 |
+
var objectPropertyIsEnumerable = {
|
235 |
+
f: f
|
236 |
+
};
|
237 |
+
|
238 |
+
var createPropertyDescriptor = function (bitmap, value) {
|
239 |
+
return {
|
240 |
+
enumerable: !(bitmap & 1),
|
241 |
+
configurable: !(bitmap & 2),
|
242 |
+
writable: !(bitmap & 4),
|
243 |
+
value: value
|
244 |
+
};
|
245 |
+
};
|
246 |
+
|
247 |
+
var toString = {}.toString;
|
248 |
+
|
249 |
+
var classofRaw = function (it) {
|
250 |
+
return toString.call(it).slice(8, -1);
|
251 |
+
};
|
252 |
+
|
253 |
+
var split = ''.split;
|
254 |
+
|
255 |
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
256 |
+
var indexedObject = fails(function () {
|
257 |
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
258 |
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
259 |
+
return !Object('z').propertyIsEnumerable(0);
|
260 |
+
}) ? function (it) {
|
261 |
+
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
262 |
+
} : Object;
|
263 |
+
|
264 |
+
// `RequireObjectCoercible` abstract operation
|
265 |
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
266 |
+
var requireObjectCoercible = function (it) {
|
267 |
+
if (it == undefined) throw TypeError("Can't call method on " + it);
|
268 |
+
return it;
|
269 |
+
};
|
270 |
+
|
271 |
+
// toObject with fallback for non-array-like ES3 strings
|
272 |
+
|
273 |
+
|
274 |
+
|
275 |
+
var toIndexedObject = function (it) {
|
276 |
+
return indexedObject(requireObjectCoercible(it));
|
277 |
+
};
|
278 |
+
|
279 |
+
var isObject = function (it) {
|
280 |
+
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
281 |
+
};
|
282 |
+
|
283 |
+
// `ToPrimitive` abstract operation
|
284 |
+
// https://tc39.es/ecma262/#sec-toprimitive
|
285 |
+
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
286 |
+
// and the second argument - flag - preferred type is a string
|
287 |
+
var toPrimitive = function (input, PREFERRED_STRING) {
|
288 |
+
if (!isObject(input)) return input;
|
289 |
+
var fn, val;
|
290 |
+
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
291 |
+
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
292 |
+
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
293 |
+
throw TypeError("Can't convert object to primitive value");
|
294 |
+
};
|
295 |
+
|
296 |
+
var hasOwnProperty = {}.hasOwnProperty;
|
297 |
+
|
298 |
+
var has = function (it, key) {
|
299 |
+
return hasOwnProperty.call(it, key);
|
300 |
+
};
|
301 |
+
|
302 |
+
var document$1 = global_1.document;
|
303 |
+
// typeof document.createElement is 'object' in old IE
|
304 |
+
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
305 |
+
|
306 |
+
var documentCreateElement = function (it) {
|
307 |
+
return EXISTS ? document$1.createElement(it) : {};
|
308 |
+
};
|
309 |
+
|
310 |
+
// Thank's IE8 for his funny defineProperty
|
311 |
+
var ie8DomDefine = !descriptors && !fails(function () {
|
312 |
+
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
313 |
+
get: function () { return 7; }
|
314 |
+
}).a != 7;
|
315 |
+
});
|
316 |
+
|
317 |
+
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
318 |
+
|
319 |
+
// `Object.getOwnPropertyDescriptor` method
|
320 |
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
321 |
+
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
322 |
+
O = toIndexedObject(O);
|
323 |
+
P = toPrimitive(P, true);
|
324 |
+
if (ie8DomDefine) try {
|
325 |
+
return nativeGetOwnPropertyDescriptor(O, P);
|
326 |
+
} catch (error) { /* empty */ }
|
327 |
+
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
328 |
+
};
|
329 |
+
|
330 |
+
var objectGetOwnPropertyDescriptor = {
|
331 |
+
f: f$1
|
332 |
+
};
|
333 |
+
|
334 |
+
var anObject = function (it) {
|
335 |
+
if (!isObject(it)) {
|
336 |
+
throw TypeError(String(it) + ' is not an object');
|
337 |
+
} return it;
|
338 |
+
};
|
339 |
+
|
340 |
+
var nativeDefineProperty = Object.defineProperty;
|
341 |
+
|
342 |
+
// `Object.defineProperty` method
|
343 |
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
344 |
+
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
345 |
+
anObject(O);
|
346 |
+
P = toPrimitive(P, true);
|
347 |
+
anObject(Attributes);
|
348 |
+
if (ie8DomDefine) try {
|
349 |
+
return nativeDefineProperty(O, P, Attributes);
|
350 |
+
} catch (error) { /* empty */ }
|
351 |
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
352 |
+
if ('value' in Attributes) O[P] = Attributes.value;
|
353 |
+
return O;
|
354 |
+
};
|
355 |
+
|
356 |
+
var objectDefineProperty = {
|
357 |
+
f: f$2
|
358 |
+
};
|
359 |
+
|
360 |
+
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
361 |
+
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
362 |
+
} : function (object, key, value) {
|
363 |
+
object[key] = value;
|
364 |
+
return object;
|
365 |
+
};
|
366 |
+
|
367 |
+
var setGlobal = function (key, value) {
|
368 |
+
try {
|
369 |
+
createNonEnumerableProperty(global_1, key, value);
|
370 |
+
} catch (error) {
|
371 |
+
global_1[key] = value;
|
372 |
+
} return value;
|
373 |
+
};
|
374 |
+
|
375 |
+
var SHARED = '__core-js_shared__';
|
376 |
+
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
377 |
+
|
378 |
+
var sharedStore = store;
|
379 |
+
|
380 |
+
var functionToString = Function.toString;
|
381 |
+
|
382 |
+
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
383 |
+
if (typeof sharedStore.inspectSource != 'function') {
|
384 |
+
sharedStore.inspectSource = function (it) {
|
385 |
+
return functionToString.call(it);
|
386 |
+
};
|
387 |
+
}
|
388 |
+
|
389 |
+
var inspectSource = sharedStore.inspectSource;
|
390 |
+
|
391 |
+
var WeakMap = global_1.WeakMap;
|
392 |
+
|
393 |
+
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
394 |
+
|
395 |
+
var shared = createCommonjsModule(function (module) {
|
396 |
+
(module.exports = function (key, value) {
|
397 |
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
398 |
+
})('versions', []).push({
|
399 |
+
version: '3.9.1',
|
400 |
+
mode: 'global',
|
401 |
+
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
402 |
+
});
|
403 |
+
});
|
404 |
+
|
405 |
+
var id = 0;
|
406 |
+
var postfix = Math.random();
|
407 |
+
|
408 |
+
var uid = function (key) {
|
409 |
+
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
410 |
+
};
|
411 |
+
|
412 |
+
var keys = shared('keys');
|
413 |
+
|
414 |
+
var sharedKey = function (key) {
|
415 |
+
return keys[key] || (keys[key] = uid(key));
|
416 |
+
};
|
417 |
+
|
418 |
+
var hiddenKeys = {};
|
419 |
+
|
420 |
+
var WeakMap$1 = global_1.WeakMap;
|
421 |
+
var set, get, has$1;
|
422 |
+
|
423 |
+
var enforce = function (it) {
|
424 |
+
return has$1(it) ? get(it) : set(it, {});
|
425 |
+
};
|
426 |
+
|
427 |
+
var getterFor = function (TYPE) {
|
428 |
+
return function (it) {
|
429 |
+
var state;
|
430 |
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
431 |
+
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
432 |
+
} return state;
|
433 |
+
};
|
434 |
+
};
|
435 |
+
|
436 |
+
if (nativeWeakMap) {
|
437 |
+
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
|
438 |
+
var wmget = store$1.get;
|
439 |
+
var wmhas = store$1.has;
|
440 |
+
var wmset = store$1.set;
|
441 |
+
set = function (it, metadata) {
|
442 |
+
metadata.facade = it;
|
443 |
+
wmset.call(store$1, it, metadata);
|
444 |
+
return metadata;
|
445 |
+
};
|
446 |
+
get = function (it) {
|
447 |
+
return wmget.call(store$1, it) || {};
|
448 |
+
};
|
449 |
+
has$1 = function (it) {
|
450 |
+
return wmhas.call(store$1, it);
|
451 |
+
};
|
452 |
+
} else {
|
453 |
+
var STATE = sharedKey('state');
|
454 |
+
hiddenKeys[STATE] = true;
|
455 |
+
set = function (it, metadata) {
|
456 |
+
metadata.facade = it;
|
457 |
+
createNonEnumerableProperty(it, STATE, metadata);
|
458 |
+
return metadata;
|
459 |
+
};
|
460 |
+
get = function (it) {
|
461 |
+
return has(it, STATE) ? it[STATE] : {};
|
462 |
+
};
|
463 |
+
has$1 = function (it) {
|
464 |
+
return has(it, STATE);
|
465 |
+
};
|
466 |
+
}
|
467 |
+
|
468 |
+
var internalState = {
|
469 |
+
set: set,
|
470 |
+
get: get,
|
471 |
+
has: has$1,
|
472 |
+
enforce: enforce,
|
473 |
+
getterFor: getterFor
|
474 |
+
};
|
475 |
+
|
476 |
+
var redefine = createCommonjsModule(function (module) {
|
477 |
+
var getInternalState = internalState.get;
|
478 |
+
var enforceInternalState = internalState.enforce;
|
479 |
+
var TEMPLATE = String(String).split('String');
|
480 |
+
|
481 |
+
(module.exports = function (O, key, value, options) {
|
482 |
+
var unsafe = options ? !!options.unsafe : false;
|
483 |
+
var simple = options ? !!options.enumerable : false;
|
484 |
+
var noTargetGet = options ? !!options.noTargetGet : false;
|
485 |
+
var state;
|
486 |
+
if (typeof value == 'function') {
|
487 |
+
if (typeof key == 'string' && !has(value, 'name')) {
|
488 |
+
createNonEnumerableProperty(value, 'name', key);
|
489 |
+
}
|
490 |
+
state = enforceInternalState(value);
|
491 |
+
if (!state.source) {
|
492 |
+
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
493 |
+
}
|
494 |
+
}
|
495 |
+
if (O === global_1) {
|
496 |
+
if (simple) O[key] = value;
|
497 |
+
else setGlobal(key, value);
|
498 |
+
return;
|
499 |
+
} else if (!unsafe) {
|
500 |
+
delete O[key];
|
501 |
+
} else if (!noTargetGet && O[key]) {
|
502 |
+
simple = true;
|
503 |
+
}
|
504 |
+
if (simple) O[key] = value;
|
505 |
+
else createNonEnumerableProperty(O, key, value);
|
506 |
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
507 |
+
})(Function.prototype, 'toString', function toString() {
|
508 |
+
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
509 |
+
});
|
510 |
+
});
|
511 |
+
|
512 |
+
var path = global_1;
|
513 |
+
|
514 |
+
var aFunction = function (variable) {
|
515 |
+
return typeof variable == 'function' ? variable : undefined;
|
516 |
+
};
|
517 |
+
|
518 |
+
var getBuiltIn = function (namespace, method) {
|
519 |
+
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
|
520 |
+
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
521 |
+
};
|
522 |
+
|
523 |
+
var ceil = Math.ceil;
|
524 |
+
var floor = Math.floor;
|
525 |
+
|
526 |
+
// `ToInteger` abstract operation
|
527 |
+
// https://tc39.es/ecma262/#sec-tointeger
|
528 |
+
var toInteger = function (argument) {
|
529 |
+
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
530 |
+
};
|
531 |
+
|
532 |
+
var min = Math.min;
|
533 |
+
|
534 |
+
// `ToLength` abstract operation
|
535 |
+
// https://tc39.es/ecma262/#sec-tolength
|
536 |
+
var toLength = function (argument) {
|
537 |
+
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
538 |
+
};
|
539 |
+
|
540 |
+
var max = Math.max;
|
541 |
+
var min$1 = Math.min;
|
542 |
+
|
543 |
+
// Helper for a popular repeating case of the spec:
|
544 |
+
// Let integer be ? ToInteger(index).
|
545 |
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
546 |
+
var toAbsoluteIndex = function (index, length) {
|
547 |
+
var integer = toInteger(index);
|
548 |
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
549 |
+
};
|
550 |
+
|
551 |
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
552 |
+
var createMethod = function (IS_INCLUDES) {
|
553 |
+
return function ($this, el, fromIndex) {
|
554 |
+
var O = toIndexedObject($this);
|
555 |
+
var length = toLength(O.length);
|
556 |
+
var index = toAbsoluteIndex(fromIndex, length);
|
557 |
+
var value;
|
558 |
+
// Array#includes uses SameValueZero equality algorithm
|
559 |
+
// eslint-disable-next-line no-self-compare -- NaN check
|
560 |
+
if (IS_INCLUDES && el != el) while (length > index) {
|
561 |
+
value = O[index++];
|
562 |
+
// eslint-disable-next-line no-self-compare -- NaN check
|
563 |
+
if (value != value) return true;
|
564 |
+
// Array#indexOf ignores holes, Array#includes - not
|
565 |
+
} else for (;length > index; index++) {
|
566 |
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
567 |
+
} return !IS_INCLUDES && -1;
|
568 |
+
};
|
569 |
+
};
|
570 |
+
|
571 |
+
var arrayIncludes = {
|
572 |
+
// `Array.prototype.includes` method
|
573 |
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
574 |
+
includes: createMethod(true),
|
575 |
+
// `Array.prototype.indexOf` method
|
576 |
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
577 |
+
indexOf: createMethod(false)
|
578 |
+
};
|
579 |
+
|
580 |
+
var indexOf = arrayIncludes.indexOf;
|
581 |
+
|
582 |
+
|
583 |
+
var objectKeysInternal = function (object, names) {
|
584 |
+
var O = toIndexedObject(object);
|
585 |
+
var i = 0;
|
586 |
+
var result = [];
|
587 |
+
var key;
|
588 |
+
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
589 |
+
// Don't enum bug & hidden keys
|
590 |
+
while (names.length > i) if (has(O, key = names[i++])) {
|
591 |
+
~indexOf(result, key) || result.push(key);
|
592 |
+
}
|
593 |
+
return result;
|
594 |
+
};
|
595 |
+
|
596 |
+
// IE8- don't enum bug keys
|
597 |
+
var enumBugKeys = [
|
598 |
+
'constructor',
|
599 |
+
'hasOwnProperty',
|
600 |
+
'isPrototypeOf',
|
601 |
+
'propertyIsEnumerable',
|
602 |
+
'toLocaleString',
|
603 |
+
'toString',
|
604 |
+
'valueOf'
|
605 |
+
];
|
606 |
+
|
607 |
+
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
608 |
+
|
609 |
+
// `Object.getOwnPropertyNames` method
|
610 |
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
611 |
+
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
612 |
+
return objectKeysInternal(O, hiddenKeys$1);
|
613 |
+
};
|
614 |
+
|
615 |
+
var objectGetOwnPropertyNames = {
|
616 |
+
f: f$3
|
617 |
+
};
|
618 |
+
|
619 |
+
var f$4 = Object.getOwnPropertySymbols;
|
620 |
+
|
621 |
+
var objectGetOwnPropertySymbols = {
|
622 |
+
f: f$4
|
623 |
+
};
|
624 |
+
|
625 |
+
// all object keys, includes non-enumerable and symbols
|
626 |
+
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
627 |
+
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
628 |
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
629 |
+
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
630 |
+
};
|
631 |
+
|
632 |
+
var copyConstructorProperties = function (target, source) {
|
633 |
+
var keys = ownKeys(source);
|
634 |
+
var defineProperty = objectDefineProperty.f;
|
635 |
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
636 |
+
for (var i = 0; i < keys.length; i++) {
|
637 |
+
var key = keys[i];
|
638 |
+
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
639 |
+
}
|
640 |
+
};
|
641 |
+
|
642 |
+
var replacement = /#|\.prototype\./;
|
643 |
+
|
644 |
+
var isForced = function (feature, detection) {
|
645 |
+
var value = data[normalize(feature)];
|
646 |
+
return value == POLYFILL ? true
|
647 |
+
: value == NATIVE ? false
|
648 |
+
: typeof detection == 'function' ? fails(detection)
|
649 |
+
: !!detection;
|
650 |
+
};
|
651 |
+
|
652 |
+
var normalize = isForced.normalize = function (string) {
|
653 |
+
return String(string).replace(replacement, '.').toLowerCase();
|
654 |
+
};
|
655 |
+
|
656 |
+
var data = isForced.data = {};
|
657 |
+
var NATIVE = isForced.NATIVE = 'N';
|
658 |
+
var POLYFILL = isForced.POLYFILL = 'P';
|
659 |
+
|
660 |
+
var isForced_1 = isForced;
|
661 |
+
|
662 |
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
663 |
+
|
664 |
+
|
665 |
+
|
666 |
+
|
667 |
+
|
668 |
+
|
669 |
+
/*
|
670 |
+
options.target - name of the target object
|
671 |
+
options.global - target is the global object
|
672 |
+
options.stat - export as static methods of target
|
673 |
+
options.proto - export as prototype methods of target
|
674 |
+
options.real - real prototype method for the `pure` version
|
675 |
+
options.forced - export even if the native feature is available
|
676 |
+
options.bind - bind methods to the target, required for the `pure` version
|
677 |
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
678 |
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
679 |
+
options.sham - add a flag to not completely full polyfills
|
680 |
+
options.enumerable - export as enumerable property
|
681 |
+
options.noTargetGet - prevent calling a getter on target
|
682 |
+
*/
|
683 |
+
var _export = function (options, source) {
|
684 |
+
var TARGET = options.target;
|
685 |
+
var GLOBAL = options.global;
|
686 |
+
var STATIC = options.stat;
|
687 |
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
688 |
+
if (GLOBAL) {
|
689 |
+
target = global_1;
|
690 |
+
} else if (STATIC) {
|
691 |
+
target = global_1[TARGET] || setGlobal(TARGET, {});
|
692 |
+
} else {
|
693 |
+
target = (global_1[TARGET] || {}).prototype;
|
694 |
+
}
|
695 |
+
if (target) for (key in source) {
|
696 |
+
sourceProperty = source[key];
|
697 |
+
if (options.noTargetGet) {
|
698 |
+
descriptor = getOwnPropertyDescriptor$1(target, key);
|
699 |
+
targetProperty = descriptor && descriptor.value;
|
700 |
+
} else targetProperty = target[key];
|
701 |
+
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
702 |
+
// contained in target
|
703 |
+
if (!FORCED && targetProperty !== undefined) {
|
704 |
+
if (typeof sourceProperty === typeof targetProperty) continue;
|
705 |
+
copyConstructorProperties(sourceProperty, targetProperty);
|
706 |
+
}
|
707 |
+
// add a flag to not completely full polyfills
|
708 |
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
709 |
+
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
710 |
+
}
|
711 |
+
// extend global
|
712 |
+
redefine(target, key, sourceProperty, options);
|
713 |
+
}
|
714 |
+
};
|
715 |
+
|
716 |
+
// `RegExp.prototype.flags` getter implementation
|
717 |
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
718 |
+
var regexpFlags = function () {
|
719 |
+
var that = anObject(this);
|
720 |
+
var result = '';
|
721 |
+
if (that.global) result += 'g';
|
722 |
+
if (that.ignoreCase) result += 'i';
|
723 |
+
if (that.multiline) result += 'm';
|
724 |
+
if (that.dotAll) result += 's';
|
725 |
+
if (that.unicode) result += 'u';
|
726 |
+
if (that.sticky) result += 'y';
|
727 |
+
return result;
|
728 |
+
};
|
729 |
+
|
730 |
+
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
731 |
+
// so we use an intermediate function.
|
732 |
+
function RE(s, f) {
|
733 |
+
return RegExp(s, f);
|
734 |
+
}
|
735 |
+
|
736 |
+
var UNSUPPORTED_Y = fails(function () {
|
737 |
+
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
738 |
+
var re = RE('a', 'y');
|
739 |
+
re.lastIndex = 2;
|
740 |
+
return re.exec('abcd') != null;
|
741 |
+
});
|
742 |
+
|
743 |
+
var BROKEN_CARET = fails(function () {
|
744 |
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
745 |
+
var re = RE('^r', 'gy');
|
746 |
+
re.lastIndex = 2;
|
747 |
+
return re.exec('str') != null;
|
748 |
+
});
|
749 |
+
|
750 |
+
var regexpStickyHelpers = {
|
751 |
+
UNSUPPORTED_Y: UNSUPPORTED_Y,
|
752 |
+
BROKEN_CARET: BROKEN_CARET
|
753 |
+
};
|
754 |
+
|
755 |
+
var nativeExec = RegExp.prototype.exec;
|
756 |
+
// This always refers to the native implementation, because the
|
757 |
+
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
758 |
+
// which loads this file before patching the method.
|
759 |
+
var nativeReplace = String.prototype.replace;
|
760 |
+
|
761 |
+
var patchedExec = nativeExec;
|
762 |
+
|
763 |
+
var UPDATES_LAST_INDEX_WRONG = (function () {
|
764 |
+
var re1 = /a/;
|
765 |
+
var re2 = /b*/g;
|
766 |
+
nativeExec.call(re1, 'a');
|
767 |
+
nativeExec.call(re2, 'a');
|
768 |
+
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
769 |
+
})();
|
770 |
+
|
771 |
+
var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
|
772 |
+
|
773 |
+
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
774 |
+
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
|
775 |
+
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
776 |
+
|
777 |
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
|
778 |
+
|
779 |
+
if (PATCH) {
|
780 |
+
patchedExec = function exec(str) {
|
781 |
+
var re = this;
|
782 |
+
var lastIndex, reCopy, match, i;
|
783 |
+
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
784 |
+
var flags = regexpFlags.call(re);
|
785 |
+
var source = re.source;
|
786 |
+
var charsAdded = 0;
|
787 |
+
var strCopy = str;
|
788 |
+
|
789 |
+
if (sticky) {
|
790 |
+
flags = flags.replace('y', '');
|
791 |
+
if (flags.indexOf('g') === -1) {
|
792 |
+
flags += 'g';
|
793 |
+
}
|
794 |
+
|
795 |
+
strCopy = String(str).slice(re.lastIndex);
|
796 |
+
// Support anchored sticky behavior.
|
797 |
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
|
798 |
+
source = '(?: ' + source + ')';
|
799 |
+
strCopy = ' ' + strCopy;
|
800 |
+
charsAdded++;
|
801 |
+
}
|
802 |
+
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
803 |
+
// simulate the 'y' flag.
|
804 |
+
reCopy = new RegExp('^(?:' + source + ')', flags);
|
805 |
+
}
|
806 |
+
|
807 |
+
if (NPCG_INCLUDED) {
|
808 |
+
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
809 |
+
}
|
810 |
+
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
811 |
+
|
812 |
+
match = nativeExec.call(sticky ? reCopy : re, strCopy);
|
813 |
+
|
814 |
+
if (sticky) {
|
815 |
+
if (match) {
|
816 |
+
match.input = match.input.slice(charsAdded);
|
817 |
+
match[0] = match[0].slice(charsAdded);
|
818 |
+
match.index = re.lastIndex;
|
819 |
+
re.lastIndex += match[0].length;
|
820 |
+
} else re.lastIndex = 0;
|
821 |
+
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
822 |
+
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
823 |
+
}
|
824 |
+
if (NPCG_INCLUDED && match && match.length > 1) {
|
825 |
+
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
826 |
+
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
827 |
+
nativeReplace.call(match[0], reCopy, function () {
|
828 |
+
for (i = 1; i < arguments.length - 2; i++) {
|
829 |
+
if (arguments[i] === undefined) match[i] = undefined;
|
830 |
+
}
|
831 |
+
});
|
832 |
+
}
|
833 |
+
|
834 |
+
return match;
|
835 |
+
};
|
836 |
+
}
|
837 |
+
|
838 |
+
var regexpExec = patchedExec;
|
839 |
+
|
840 |
+
// `RegExp.prototype.exec` method
|
841 |
+
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
842 |
+
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
843 |
+
exec: regexpExec
|
844 |
+
});
|
845 |
+
|
846 |
+
var engineIsNode = classofRaw(global_1.process) == 'process';
|
847 |
+
|
848 |
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
849 |
+
|
850 |
+
var process = global_1.process;
|
851 |
+
var versions = process && process.versions;
|
852 |
+
var v8 = versions && versions.v8;
|
853 |
+
var match, version;
|
854 |
+
|
855 |
+
if (v8) {
|
856 |
+
match = v8.split('.');
|
857 |
+
version = match[0] + match[1];
|
858 |
+
} else if (engineUserAgent) {
|
859 |
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
860 |
+
if (!match || match[1] >= 74) {
|
861 |
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
862 |
+
if (match) version = match[1];
|
863 |
+
}
|
864 |
+
}
|
865 |
+
|
866 |
+
var engineV8Version = version && +version;
|
867 |
+
|
868 |
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
869 |
+
/* global Symbol -- required for testing */
|
870 |
+
return !Symbol.sham &&
|
871 |
+
// Chrome 38 Symbol has incorrect toString conversion
|
872 |
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
873 |
+
(engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
|
874 |
+
});
|
875 |
+
|
876 |
+
var useSymbolAsUid = nativeSymbol
|
877 |
+
/* global Symbol -- safe */
|
878 |
+
&& !Symbol.sham
|
879 |
+
&& typeof Symbol.iterator == 'symbol';
|
880 |
+
|
881 |
+
var WellKnownSymbolsStore = shared('wks');
|
882 |
+
var Symbol$1 = global_1.Symbol;
|
883 |
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
884 |
+
|
885 |
+
var wellKnownSymbol = function (name) {
|
886 |
+
if (!has(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
887 |
+
if (nativeSymbol && has(Symbol$1, name)) {
|
888 |
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
889 |
+
} else {
|
890 |
+
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
891 |
+
}
|
892 |
+
} return WellKnownSymbolsStore[name];
|
893 |
+
};
|
894 |
+
|
895 |
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
896 |
+
|
897 |
+
|
898 |
+
|
899 |
+
|
900 |
+
|
901 |
+
|
902 |
+
|
903 |
+
var SPECIES = wellKnownSymbol('species');
|
904 |
+
|
905 |
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
906 |
+
// #replace needs built-in support for named groups.
|
907 |
+
// #match works fine because it just return the exec results, even if it has
|
908 |
+
// a "grops" property.
|
909 |
+
var re = /./;
|
910 |
+
re.exec = function () {
|
911 |
+
var result = [];
|
912 |
+
result.groups = { a: '7' };
|
913 |
+
return result;
|
914 |
+
};
|
915 |
+
return ''.replace(re, '$<a>') !== '7';
|
916 |
+
});
|
917 |
+
|
918 |
+
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
919 |
+
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
920 |
+
var REPLACE_KEEPS_$0 = (function () {
|
921 |
+
return 'a'.replace(/./, '$0') === '$0';
|
922 |
+
})();
|
923 |
+
|
924 |
+
var REPLACE = wellKnownSymbol('replace');
|
925 |
+
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
926 |
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
927 |
+
if (/./[REPLACE]) {
|
928 |
+
return /./[REPLACE]('a', '$0') === '';
|
929 |
+
}
|
930 |
+
return false;
|
931 |
+
})();
|
932 |
+
|
933 |
+
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
934 |
+
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
935 |
+
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
936 |
+
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
937 |
+
var re = /(?:)/;
|
938 |
+
var originalExec = re.exec;
|
939 |
+
re.exec = function () { return originalExec.apply(this, arguments); };
|
940 |
+
var result = 'ab'.split(re);
|
941 |
+
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
942 |
+
});
|
943 |
+
|
944 |
+
var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
|
945 |
+
var SYMBOL = wellKnownSymbol(KEY);
|
946 |
+
|
947 |
+
var DELEGATES_TO_SYMBOL = !fails(function () {
|
948 |
+
// String methods call symbol-named RegEp methods
|
949 |
+
var O = {};
|
950 |
+
O[SYMBOL] = function () { return 7; };
|
951 |
+
return ''[KEY](O) != 7;
|
952 |
+
});
|
953 |
+
|
954 |
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
955 |
+
// Symbol-named RegExp methods call .exec
|
956 |
+
var execCalled = false;
|
957 |
+
var re = /a/;
|
958 |
+
|
959 |
+
if (KEY === 'split') {
|
960 |
+
// We can't use real regex here since it causes deoptimization
|
961 |
+
// and serious performance degradation in V8
|
962 |
+
// https://github.com/zloirock/core-js/issues/306
|
963 |
+
re = {};
|
964 |
+
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
965 |
+
// a new one. We need to return the patched regex when creating the new one.
|
966 |
+
re.constructor = {};
|
967 |
+
re.constructor[SPECIES] = function () { return re; };
|
968 |
+
re.flags = '';
|
969 |
+
re[SYMBOL] = /./[SYMBOL];
|
970 |
+
}
|
971 |
+
|
972 |
+
re.exec = function () { execCalled = true; return null; };
|
973 |
+
|
974 |
+
re[SYMBOL]('');
|
975 |
+
return !execCalled;
|
976 |
+
});
|
977 |
+
|
978 |
+
if (
|
979 |
+
!DELEGATES_TO_SYMBOL ||
|
980 |
+
!DELEGATES_TO_EXEC ||
|
981 |
+
(KEY === 'replace' && !(
|
982 |
+
REPLACE_SUPPORTS_NAMED_GROUPS &&
|
983 |
+
REPLACE_KEEPS_$0 &&
|
984 |
+
!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
985 |
+
)) ||
|
986 |
+
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
987 |
+
) {
|
988 |
+
var nativeRegExpMethod = /./[SYMBOL];
|
989 |
+
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
990 |
+
if (regexp.exec === regexpExec) {
|
991 |
+
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
992 |
+
// The native String method already delegates to @@method (this
|
993 |
+
// polyfilled function), leasing to infinite recursion.
|
994 |
+
// We avoid it by directly calling the native @@method method.
|
995 |
+
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
996 |
+
}
|
997 |
+
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
998 |
+
}
|
999 |
+
return { done: false };
|
1000 |
+
}, {
|
1001 |
+
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
|
1002 |
+
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
1003 |
+
});
|
1004 |
+
var stringMethod = methods[0];
|
1005 |
+
var regexMethod = methods[1];
|
1006 |
+
|
1007 |
+
redefine(String.prototype, KEY, stringMethod);
|
1008 |
+
redefine(RegExp.prototype, SYMBOL, length == 2
|
1009 |
+
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
1010 |
+
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
1011 |
+
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
1012 |
+
// 21.2.5.6 RegExp.prototype[@@match](string)
|
1013 |
+
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1014 |
+
: function (string) { return regexMethod.call(string, this); }
|
1015 |
+
);
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
|
1019 |
+
};
|
1020 |
+
|
1021 |
+
// `String.prototype.{ codePointAt, at }` methods implementation
|
1022 |
+
var createMethod$1 = function (CONVERT_TO_STRING) {
|
1023 |
+
return function ($this, pos) {
|
1024 |
+
var S = String(requireObjectCoercible($this));
|
1025 |
+
var position = toInteger(pos);
|
1026 |
+
var size = S.length;
|
1027 |
+
var first, second;
|
1028 |
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
1029 |
+
first = S.charCodeAt(position);
|
1030 |
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
1031 |
+
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
1032 |
+
? CONVERT_TO_STRING ? S.charAt(position) : first
|
1033 |
+
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
1034 |
+
};
|
1035 |
+
};
|
1036 |
+
|
1037 |
+
var stringMultibyte = {
|
1038 |
+
// `String.prototype.codePointAt` method
|
1039 |
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
1040 |
+
codeAt: createMethod$1(false),
|
1041 |
+
// `String.prototype.at` method
|
1042 |
+
// https://github.com/mathiasbynens/String.prototype.at
|
1043 |
+
charAt: createMethod$1(true)
|
1044 |
+
};
|
1045 |
+
|
1046 |
+
var charAt = stringMultibyte.charAt;
|
1047 |
+
|
1048 |
+
// `AdvanceStringIndex` abstract operation
|
1049 |
+
// https://tc39.es/ecma262/#sec-advancestringindex
|
1050 |
+
var advanceStringIndex = function (S, index, unicode) {
|
1051 |
+
return index + (unicode ? charAt(S, index).length : 1);
|
1052 |
+
};
|
1053 |
+
|
1054 |
+
// `RegExpExec` abstract operation
|
1055 |
+
// https://tc39.es/ecma262/#sec-regexpexec
|
1056 |
+
var regexpExecAbstract = function (R, S) {
|
1057 |
+
var exec = R.exec;
|
1058 |
+
if (typeof exec === 'function') {
|
1059 |
+
var result = exec.call(R, S);
|
1060 |
+
if (typeof result !== 'object') {
|
1061 |
+
throw TypeError('RegExp exec method returned something other than an Object or null');
|
1062 |
+
}
|
1063 |
+
return result;
|
1064 |
+
}
|
1065 |
+
|
1066 |
+
if (classofRaw(R) !== 'RegExp') {
|
1067 |
+
throw TypeError('RegExp#exec called on incompatible receiver');
|
1068 |
+
}
|
1069 |
+
|
1070 |
+
return regexpExec.call(R, S);
|
1071 |
+
};
|
1072 |
+
|
1073 |
+
// @@match logic
|
1074 |
+
fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
|
1075 |
+
return [
|
1076 |
+
// `String.prototype.match` method
|
1077 |
+
// https://tc39.es/ecma262/#sec-string.prototype.match
|
1078 |
+
function match(regexp) {
|
1079 |
+
var O = requireObjectCoercible(this);
|
1080 |
+
var matcher = regexp == undefined ? undefined : regexp[MATCH];
|
1081 |
+
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
|
1082 |
+
},
|
1083 |
+
// `RegExp.prototype[@@match]` method
|
1084 |
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
|
1085 |
+
function (regexp) {
|
1086 |
+
var res = maybeCallNative(nativeMatch, regexp, this);
|
1087 |
+
if (res.done) return res.value;
|
1088 |
+
|
1089 |
+
var rx = anObject(regexp);
|
1090 |
+
var S = String(this);
|
1091 |
+
|
1092 |
+
if (!rx.global) return regexpExecAbstract(rx, S);
|
1093 |
+
|
1094 |
+
var fullUnicode = rx.unicode;
|
1095 |
+
rx.lastIndex = 0;
|
1096 |
+
var A = [];
|
1097 |
+
var n = 0;
|
1098 |
+
var result;
|
1099 |
+
while ((result = regexpExecAbstract(rx, S)) !== null) {
|
1100 |
+
var matchStr = String(result[0]);
|
1101 |
+
A[n] = matchStr;
|
1102 |
+
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
1103 |
+
n++;
|
1104 |
+
}
|
1105 |
+
return n === 0 ? null : A;
|
1106 |
+
}
|
1107 |
+
];
|
1108 |
+
});
|
1109 |
+
|
1110 |
+
// `IsArray` abstract operation
|
1111 |
+
// https://tc39.es/ecma262/#sec-isarray
|
1112 |
+
var isArray = Array.isArray || function isArray(arg) {
|
1113 |
+
return classofRaw(arg) == 'Array';
|
1114 |
+
};
|
1115 |
+
|
1116 |
+
// `ToObject` abstract operation
|
1117 |
+
// https://tc39.es/ecma262/#sec-toobject
|
1118 |
+
var toObject = function (argument) {
|
1119 |
+
return Object(requireObjectCoercible(argument));
|
1120 |
+
};
|
1121 |
+
|
1122 |
+
var createProperty = function (object, key, value) {
|
1123 |
+
var propertyKey = toPrimitive(key);
|
1124 |
+
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
1125 |
+
else object[propertyKey] = value;
|
1126 |
+
};
|
1127 |
+
|
1128 |
+
var SPECIES$1 = wellKnownSymbol('species');
|
1129 |
+
|
1130 |
+
// `ArraySpeciesCreate` abstract operation
|
1131 |
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
1132 |
+
var arraySpeciesCreate = function (originalArray, length) {
|
1133 |
+
var C;
|
1134 |
+
if (isArray(originalArray)) {
|
1135 |
+
C = originalArray.constructor;
|
1136 |
+
// cross-realm fallback
|
1137 |
+
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
1138 |
+
else if (isObject(C)) {
|
1139 |
+
C = C[SPECIES$1];
|
1140 |
+
if (C === null) C = undefined;
|
1141 |
+
}
|
1142 |
+
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
1143 |
+
};
|
1144 |
+
|
1145 |
+
var SPECIES$2 = wellKnownSymbol('species');
|
1146 |
+
|
1147 |
+
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
1148 |
+
// We can't use this feature detection in V8 since it causes
|
1149 |
+
// deoptimization and serious performance degradation
|
1150 |
+
// https://github.com/zloirock/core-js/issues/677
|
1151 |
+
return engineV8Version >= 51 || !fails(function () {
|
1152 |
+
var array = [];
|
1153 |
+
var constructor = array.constructor = {};
|
1154 |
+
constructor[SPECIES$2] = function () {
|
1155 |
+
return { foo: 1 };
|
1156 |
+
};
|
1157 |
+
return array[METHOD_NAME](Boolean).foo !== 1;
|
1158 |
+
});
|
1159 |
+
};
|
1160 |
+
|
1161 |
+
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
1162 |
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
1163 |
+
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
1164 |
+
|
1165 |
+
// We can't use this feature detection in V8 since it causes
|
1166 |
+
// deoptimization and serious performance degradation
|
1167 |
+
// https://github.com/zloirock/core-js/issues/679
|
1168 |
+
var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
|
1169 |
+
var array = [];
|
1170 |
+
array[IS_CONCAT_SPREADABLE] = false;
|
1171 |
+
return array.concat()[0] !== array;
|
1172 |
+
});
|
1173 |
+
|
1174 |
+
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
1175 |
+
|
1176 |
+
var isConcatSpreadable = function (O) {
|
1177 |
+
if (!isObject(O)) return false;
|
1178 |
+
var spreadable = O[IS_CONCAT_SPREADABLE];
|
1179 |
+
return spreadable !== undefined ? !!spreadable : isArray(O);
|
1180 |
+
};
|
1181 |
+
|
1182 |
+
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
1183 |
+
|
1184 |
+
// `Array.prototype.concat` method
|
1185 |
+
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
1186 |
+
// with adding support of @@isConcatSpreadable and @@species
|
1187 |
+
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
1188 |
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
1189 |
+
concat: function concat(arg) {
|
1190 |
+
var O = toObject(this);
|
1191 |
+
var A = arraySpeciesCreate(O, 0);
|
1192 |
+
var n = 0;
|
1193 |
+
var i, k, length, len, E;
|
1194 |
+
for (i = -1, length = arguments.length; i < length; i++) {
|
1195 |
+
E = i === -1 ? O : arguments[i];
|
1196 |
+
if (isConcatSpreadable(E)) {
|
1197 |
+
len = toLength(E.length);
|
1198 |
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1199 |
+
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
1200 |
+
} else {
|
1201 |
+
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1202 |
+
createProperty(A, n++, E);
|
1203 |
+
}
|
1204 |
+
}
|
1205 |
+
A.length = n;
|
1206 |
+
return A;
|
1207 |
+
}
|
1208 |
+
});
|
1209 |
+
|
1210 |
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
1211 |
+
var test = {};
|
1212 |
+
|
1213 |
+
test[TO_STRING_TAG] = 'z';
|
1214 |
+
|
1215 |
+
var toStringTagSupport = String(test) === '[object z]';
|
1216 |
+
|
1217 |
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
1218 |
+
// ES3 wrong here
|
1219 |
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
1220 |
+
|
1221 |
+
// fallback for IE11 Script Access Denied error
|
1222 |
+
var tryGet = function (it, key) {
|
1223 |
+
try {
|
1224 |
+
return it[key];
|
1225 |
+
} catch (error) { /* empty */ }
|
1226 |
+
};
|
1227 |
+
|
1228 |
+
// getting tag from ES6+ `Object.prototype.toString`
|
1229 |
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
1230 |
+
var O, tag, result;
|
1231 |
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
1232 |
+
// @@toStringTag case
|
1233 |
+
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
|
1234 |
+
// builtinTag case
|
1235 |
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
1236 |
+
// ES3 arguments fallback
|
1237 |
+
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
1238 |
+
};
|
1239 |
+
|
1240 |
+
// `Object.prototype.toString` method implementation
|
1241 |
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
1242 |
+
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
1243 |
+
return '[object ' + classof(this) + ']';
|
1244 |
+
};
|
1245 |
+
|
1246 |
+
// `Object.prototype.toString` method
|
1247 |
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
1248 |
+
if (!toStringTagSupport) {
|
1249 |
+
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
1250 |
+
}
|
1251 |
+
|
1252 |
+
var TO_STRING = 'toString';
|
1253 |
+
var RegExpPrototype = RegExp.prototype;
|
1254 |
+
var nativeToString = RegExpPrototype[TO_STRING];
|
1255 |
+
|
1256 |
+
var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
1257 |
+
// FF44- RegExp#toString has a wrong name
|
1258 |
+
var INCORRECT_NAME = nativeToString.name != TO_STRING;
|
1259 |
+
|
1260 |
+
// `RegExp.prototype.toString` method
|
1261 |
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
1262 |
+
if (NOT_GENERIC || INCORRECT_NAME) {
|
1263 |
+
redefine(RegExp.prototype, TO_STRING, function toString() {
|
1264 |
+
var R = anObject(this);
|
1265 |
+
var p = String(R.source);
|
1266 |
+
var rf = R.flags;
|
1267 |
+
var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);
|
1268 |
+
return '/' + p + '/' + f;
|
1269 |
+
}, { unsafe: true });
|
1270 |
+
}
|
1271 |
+
|
1272 |
+
var MATCH = wellKnownSymbol('match');
|
1273 |
+
|
1274 |
+
// `IsRegExp` abstract operation
|
1275 |
+
// https://tc39.es/ecma262/#sec-isregexp
|
1276 |
+
var isRegexp = function (it) {
|
1277 |
+
var isRegExp;
|
1278 |
+
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
1279 |
+
};
|
1280 |
+
|
1281 |
+
var aFunction$1 = function (it) {
|
1282 |
+
if (typeof it != 'function') {
|
1283 |
+
throw TypeError(String(it) + ' is not a function');
|
1284 |
+
} return it;
|
1285 |
+
};
|
1286 |
+
|
1287 |
+
var SPECIES$3 = wellKnownSymbol('species');
|
1288 |
+
|
1289 |
+
// `SpeciesConstructor` abstract operation
|
1290 |
+
// https://tc39.es/ecma262/#sec-speciesconstructor
|
1291 |
+
var speciesConstructor = function (O, defaultConstructor) {
|
1292 |
+
var C = anObject(O).constructor;
|
1293 |
+
var S;
|
1294 |
+
return C === undefined || (S = anObject(C)[SPECIES$3]) == undefined ? defaultConstructor : aFunction$1(S);
|
1295 |
+
};
|
1296 |
+
|
1297 |
+
var arrayPush = [].push;
|
1298 |
+
var min$2 = Math.min;
|
1299 |
+
var MAX_UINT32 = 0xFFFFFFFF;
|
1300 |
+
|
1301 |
+
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
|
1302 |
+
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
|
1303 |
+
|
1304 |
+
// @@split logic
|
1305 |
+
fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
|
1306 |
+
var internalSplit;
|
1307 |
+
if (
|
1308 |
+
'abbc'.split(/(b)*/)[1] == 'c' ||
|
1309 |
+
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
1310 |
+
'test'.split(/(?:)/, -1).length != 4 ||
|
1311 |
+
'ab'.split(/(?:ab)*/).length != 2 ||
|
1312 |
+
'.'.split(/(.?)(.?)/).length != 4 ||
|
1313 |
+
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
|
1314 |
+
'.'.split(/()()/).length > 1 ||
|
1315 |
+
''.split(/.?/).length
|
1316 |
+
) {
|
1317 |
+
// based on es5-shim implementation, need to rework it
|
1318 |
+
internalSplit = function (separator, limit) {
|
1319 |
+
var string = String(requireObjectCoercible(this));
|
1320 |
+
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1321 |
+
if (lim === 0) return [];
|
1322 |
+
if (separator === undefined) return [string];
|
1323 |
+
// If `separator` is not a regex, use native split
|
1324 |
+
if (!isRegexp(separator)) {
|
1325 |
+
return nativeSplit.call(string, separator, lim);
|
1326 |
+
}
|
1327 |
+
var output = [];
|
1328 |
+
var flags = (separator.ignoreCase ? 'i' : '') +
|
1329 |
+
(separator.multiline ? 'm' : '') +
|
1330 |
+
(separator.unicode ? 'u' : '') +
|
1331 |
+
(separator.sticky ? 'y' : '');
|
1332 |
+
var lastLastIndex = 0;
|
1333 |
+
// Make `global` and avoid `lastIndex` issues by working with a copy
|
1334 |
+
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
1335 |
+
var match, lastIndex, lastLength;
|
1336 |
+
while (match = regexpExec.call(separatorCopy, string)) {
|
1337 |
+
lastIndex = separatorCopy.lastIndex;
|
1338 |
+
if (lastIndex > lastLastIndex) {
|
1339 |
+
output.push(string.slice(lastLastIndex, match.index));
|
1340 |
+
if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
|
1341 |
+
lastLength = match[0].length;
|
1342 |
+
lastLastIndex = lastIndex;
|
1343 |
+
if (output.length >= lim) break;
|
1344 |
+
}
|
1345 |
+
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
1346 |
+
}
|
1347 |
+
if (lastLastIndex === string.length) {
|
1348 |
+
if (lastLength || !separatorCopy.test('')) output.push('');
|
1349 |
+
} else output.push(string.slice(lastLastIndex));
|
1350 |
+
return output.length > lim ? output.slice(0, lim) : output;
|
1351 |
+
};
|
1352 |
+
// Chakra, V8
|
1353 |
+
} else if ('0'.split(undefined, 0).length) {
|
1354 |
+
internalSplit = function (separator, limit) {
|
1355 |
+
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
|
1356 |
+
};
|
1357 |
+
} else internalSplit = nativeSplit;
|
1358 |
+
|
1359 |
+
return [
|
1360 |
+
// `String.prototype.split` method
|
1361 |
+
// https://tc39.es/ecma262/#sec-string.prototype.split
|
1362 |
+
function split(separator, limit) {
|
1363 |
+
var O = requireObjectCoercible(this);
|
1364 |
+
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
1365 |
+
return splitter !== undefined
|
1366 |
+
? splitter.call(separator, O, limit)
|
1367 |
+
: internalSplit.call(String(O), separator, limit);
|
1368 |
+
},
|
1369 |
+
// `RegExp.prototype[@@split]` method
|
1370 |
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
1371 |
+
//
|
1372 |
+
// NOTE: This cannot be properly polyfilled in engines that don't support
|
1373 |
+
// the 'y' flag.
|
1374 |
+
function (regexp, limit) {
|
1375 |
+
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
|
1376 |
+
if (res.done) return res.value;
|
1377 |
+
|
1378 |
+
var rx = anObject(regexp);
|
1379 |
+
var S = String(this);
|
1380 |
+
var C = speciesConstructor(rx, RegExp);
|
1381 |
+
|
1382 |
+
var unicodeMatching = rx.unicode;
|
1383 |
+
var flags = (rx.ignoreCase ? 'i' : '') +
|
1384 |
+
(rx.multiline ? 'm' : '') +
|
1385 |
+
(rx.unicode ? 'u' : '') +
|
1386 |
+
(SUPPORTS_Y ? 'y' : 'g');
|
1387 |
+
|
1388 |
+
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
1389 |
+
// simulate the 'y' flag.
|
1390 |
+
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
|
1391 |
+
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1392 |
+
if (lim === 0) return [];
|
1393 |
+
if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];
|
1394 |
+
var p = 0;
|
1395 |
+
var q = 0;
|
1396 |
+
var A = [];
|
1397 |
+
while (q < S.length) {
|
1398 |
+
splitter.lastIndex = SUPPORTS_Y ? q : 0;
|
1399 |
+
var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));
|
1400 |
+
var e;
|
1401 |
+
if (
|
1402 |
+
z === null ||
|
1403 |
+
(e = min$2(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
|
1404 |
+
) {
|
1405 |
+
q = advanceStringIndex(S, q, unicodeMatching);
|
1406 |
+
} else {
|
1407 |
+
A.push(S.slice(p, q));
|
1408 |
+
if (A.length === lim) return A;
|
1409 |
+
for (var i = 1; i <= z.length - 1; i++) {
|
1410 |
+
A.push(z[i]);
|
1411 |
+
if (A.length === lim) return A;
|
1412 |
+
}
|
1413 |
+
q = p = e;
|
1414 |
+
}
|
1415 |
+
}
|
1416 |
+
A.push(S.slice(p));
|
1417 |
+
return A;
|
1418 |
+
}
|
1419 |
+
];
|
1420 |
+
}, !SUPPORTS_Y);
|
1421 |
+
|
1422 |
+
/**
|
1423 |
+
* Append a class to an element
|
1424 |
+
*
|
1425 |
+
* @api private
|
1426 |
+
* @method _addClass
|
1427 |
+
* @param {Object} element
|
1428 |
+
* @param {String} className
|
1429 |
+
* @returns null
|
1430 |
+
*/
|
1431 |
+
|
1432 |
+
function addClass(element, className) {
|
1433 |
+
if (element instanceof SVGElement) {
|
1434 |
+
// svg
|
1435 |
+
var pre = element.getAttribute("class") || "";
|
1436 |
+
|
1437 |
+
if (!pre.match(className)) {
|
1438 |
+
// check if element doesn't already have className
|
1439 |
+
element.setAttribute("class", "".concat(pre, " ").concat(className));
|
1440 |
+
}
|
1441 |
+
} else {
|
1442 |
+
if (element.classList !== undefined) {
|
1443 |
+
// check for modern classList property
|
1444 |
+
var classes = className.split(" ");
|
1445 |
+
forEach(classes, function (cls) {
|
1446 |
+
element.classList.add(cls);
|
1447 |
+
});
|
1448 |
+
} else if (!element.className.match(className)) {
|
1449 |
+
// check if element doesn't already have className
|
1450 |
+
element.className += " ".concat(className);
|
1451 |
+
}
|
1452 |
+
}
|
1453 |
+
}
|
1454 |
+
|
1455 |
+
/**
|
1456 |
+
* Get an element CSS property on the page
|
1457 |
+
* Thanks to JavaScript Kit: http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml
|
1458 |
+
*
|
1459 |
+
* @api private
|
1460 |
+
* @method _getPropValue
|
1461 |
+
* @param {Object} element
|
1462 |
+
* @param {String} propName
|
1463 |
+
* @returns string property value
|
1464 |
+
*/
|
1465 |
+
function getPropValue(element, propName) {
|
1466 |
+
var propValue = "";
|
1467 |
+
|
1468 |
+
if (element.currentStyle) {
|
1469 |
+
//IE
|
1470 |
+
propValue = element.currentStyle[propName];
|
1471 |
+
} else if (document.defaultView && document.defaultView.getComputedStyle) {
|
1472 |
+
//Others
|
1473 |
+
propValue = document.defaultView.getComputedStyle(element, null).getPropertyValue(propName);
|
1474 |
+
} //Prevent exception in IE
|
1475 |
+
|
1476 |
+
|
1477 |
+
if (propValue && propValue.toLowerCase) {
|
1478 |
+
return propValue.toLowerCase();
|
1479 |
+
} else {
|
1480 |
+
return propValue;
|
1481 |
+
}
|
1482 |
+
}
|
1483 |
+
|
1484 |
+
/**
|
1485 |
+
* To set the show element
|
1486 |
+
* This function set a relative (in most cases) position and changes the z-index
|
1487 |
+
*
|
1488 |
+
* @api private
|
1489 |
+
* @method _setShowElement
|
1490 |
+
* @param {Object} targetElement
|
1491 |
+
*/
|
1492 |
+
|
1493 |
+
function setShowElement(_ref) {
|
1494 |
+
var element = _ref.element;
|
1495 |
+
addClass(element, "introjs-showElement");
|
1496 |
+
var currentElementPosition = getPropValue(element, "position");
|
1497 |
+
|
1498 |
+
if (currentElementPosition !== "absolute" && currentElementPosition !== "relative" && currentElementPosition !== "sticky" && currentElementPosition !== "fixed") {
|
1499 |
+
//change to new intro item
|
1500 |
+
addClass(element, "introjs-relativePosition");
|
1501 |
+
}
|
1502 |
+
}
|
1503 |
+
|
1504 |
+
/**
|
1505 |
+
* Find the nearest scrollable parent
|
1506 |
+
* copied from https://stackoverflow.com/questions/35939886/find-first-scrollable-parent
|
1507 |
+
*
|
1508 |
+
* @param Element element
|
1509 |
+
* @return Element
|
1510 |
+
*/
|
1511 |
+
function getScrollParent(element) {
|
1512 |
+
var style = window.getComputedStyle(element);
|
1513 |
+
var excludeStaticParent = style.position === "absolute";
|
1514 |
+
var overflowRegex = /(auto|scroll)/;
|
1515 |
+
if (style.position === "fixed") return document.body;
|
1516 |
+
|
1517 |
+
for (var parent = element; parent = parent.parentElement;) {
|
1518 |
+
style = window.getComputedStyle(parent);
|
1519 |
+
|
1520 |
+
if (excludeStaticParent && style.position === "static") {
|
1521 |
+
continue;
|
1522 |
+
}
|
1523 |
+
|
1524 |
+
if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) return parent;
|
1525 |
+
}
|
1526 |
+
|
1527 |
+
return document.body;
|
1528 |
+
}
|
1529 |
+
|
1530 |
+
/**
|
1531 |
+
* scroll a scrollable element to a child element
|
1532 |
+
*
|
1533 |
+
* @param {Object} targetElement
|
1534 |
+
*/
|
1535 |
+
|
1536 |
+
function scrollParentToElement(targetElement) {
|
1537 |
+
var element = targetElement.element;
|
1538 |
+
if (!this._options.scrollToElement) return;
|
1539 |
+
var parent = getScrollParent(element);
|
1540 |
+
if (parent === document.body) return;
|
1541 |
+
parent.scrollTop = element.offsetTop - parent.offsetTop;
|
1542 |
+
}
|
1543 |
+
|
1544 |
+
/**
|
1545 |
+
* Provides a cross-browser way to get the screen dimensions
|
1546 |
+
* via: http://stackoverflow.com/questions/5864467/internet-explorer-innerheight
|
1547 |
+
*
|
1548 |
+
* @api private
|
1549 |
+
* @method _getWinSize
|
1550 |
+
* @returns {Object} width and height attributes
|
1551 |
+
*/
|
1552 |
+
function getWinSize() {
|
1553 |
+
if (window.innerWidth !== undefined) {
|
1554 |
+
return {
|
1555 |
+
width: window.innerWidth,
|
1556 |
+
height: window.innerHeight
|
1557 |
+
};
|
1558 |
+
} else {
|
1559 |
+
var D = document.documentElement;
|
1560 |
+
return {
|
1561 |
+
width: D.clientWidth,
|
1562 |
+
height: D.clientHeight
|
1563 |
+
};
|
1564 |
+
}
|
1565 |
+
}
|
1566 |
+
|
1567 |
+
/**
|
1568 |
+
* Check to see if the element is in the viewport or not
|
1569 |
+
* http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport
|
1570 |
+
*
|
1571 |
+
* @api private
|
1572 |
+
* @method _elementInViewport
|
1573 |
+
* @param {Object} el
|
1574 |
+
*/
|
1575 |
+
function elementInViewport(el) {
|
1576 |
+
var rect = el.getBoundingClientRect();
|
1577 |
+
return rect.top >= 0 && rect.left >= 0 && rect.bottom + 80 <= window.innerHeight && // add 80 to get the text right
|
1578 |
+
rect.right <= window.innerWidth;
|
1579 |
+
}
|
1580 |
+
|
1581 |
+
/**
|
1582 |
+
* To change the scroll of `window` after highlighting an element
|
1583 |
+
*
|
1584 |
+
* @api private
|
1585 |
+
* @param {String} scrollTo
|
1586 |
+
* @param {Object} targetElement
|
1587 |
+
* @param {Object} tooltipLayer
|
1588 |
+
*/
|
1589 |
+
|
1590 |
+
function scrollTo(scrollTo, _ref, tooltipLayer) {
|
1591 |
+
var element = _ref.element;
|
1592 |
+
if (scrollTo === "off") return;
|
1593 |
+
var rect;
|
1594 |
+
if (!this._options.scrollToElement) return;
|
1595 |
+
|
1596 |
+
if (scrollTo === "tooltip") {
|
1597 |
+
rect = tooltipLayer.getBoundingClientRect();
|
1598 |
+
} else {
|
1599 |
+
rect = element.getBoundingClientRect();
|
1600 |
+
}
|
1601 |
+
|
1602 |
+
if (!elementInViewport(element)) {
|
1603 |
+
var winHeight = getWinSize().height;
|
1604 |
+
var top = rect.bottom - (rect.bottom - rect.top); // TODO (afshinm): do we need scroll padding now?
|
1605 |
+
// I have changed the scroll option and now it scrolls the window to
|
1606 |
+
// the center of the target element or tooltip.
|
1607 |
+
|
1608 |
+
if (top < 0 || element.clientHeight > winHeight) {
|
1609 |
+
window.scrollBy(0, rect.top - (winHeight / 2 - rect.height / 2) - this._options.scrollPadding); // 30px padding from edge to look nice
|
1610 |
+
//Scroll down
|
1611 |
+
} else {
|
1612 |
+
window.scrollBy(0, rect.top - (winHeight / 2 - rect.height / 2) + this._options.scrollPadding); // 30px padding from edge to look nice
|
1613 |
+
}
|
1614 |
+
}
|
1615 |
+
}
|
1616 |
+
|
1617 |
+
/**
|
1618 |
+
* Setting anchors to behave like buttons
|
1619 |
+
*
|
1620 |
+
* @api private
|
1621 |
+
* @method _setAnchorAsButton
|
1622 |
+
*/
|
1623 |
+
function setAnchorAsButton(anchor) {
|
1624 |
+
anchor.setAttribute("role", "button");
|
1625 |
+
anchor.tabIndex = 0;
|
1626 |
+
}
|
1627 |
+
|
1628 |
+
// `Object.keys` method
|
1629 |
+
// https://tc39.es/ecma262/#sec-object.keys
|
1630 |
+
var objectKeys = Object.keys || function keys(O) {
|
1631 |
+
return objectKeysInternal(O, enumBugKeys);
|
1632 |
+
};
|
1633 |
+
|
1634 |
+
var nativeAssign = Object.assign;
|
1635 |
+
var defineProperty = Object.defineProperty;
|
1636 |
+
|
1637 |
+
// `Object.assign` method
|
1638 |
+
// https://tc39.es/ecma262/#sec-object.assign
|
1639 |
+
var objectAssign = !nativeAssign || fails(function () {
|
1640 |
+
// should have correct order of operations (Edge bug)
|
1641 |
+
if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
|
1642 |
+
enumerable: true,
|
1643 |
+
get: function () {
|
1644 |
+
defineProperty(this, 'b', {
|
1645 |
+
value: 3,
|
1646 |
+
enumerable: false
|
1647 |
+
});
|
1648 |
+
}
|
1649 |
+
}), { b: 2 })).b !== 1) return true;
|
1650 |
+
// should work with symbols and should have deterministic property order (V8 bug)
|
1651 |
+
var A = {};
|
1652 |
+
var B = {};
|
1653 |
+
/* global Symbol -- required for testing */
|
1654 |
+
var symbol = Symbol();
|
1655 |
+
var alphabet = 'abcdefghijklmnopqrst';
|
1656 |
+
A[symbol] = 7;
|
1657 |
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
1658 |
+
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
|
1659 |
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
1660 |
+
var T = toObject(target);
|
1661 |
+
var argumentsLength = arguments.length;
|
1662 |
+
var index = 1;
|
1663 |
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
1664 |
+
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
1665 |
+
while (argumentsLength > index) {
|
1666 |
+
var S = indexedObject(arguments[index++]);
|
1667 |
+
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
|
1668 |
+
var length = keys.length;
|
1669 |
+
var j = 0;
|
1670 |
+
var key;
|
1671 |
+
while (length > j) {
|
1672 |
+
key = keys[j++];
|
1673 |
+
if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
|
1674 |
+
}
|
1675 |
+
} return T;
|
1676 |
+
} : nativeAssign;
|
1677 |
+
|
1678 |
+
// `Object.assign` method
|
1679 |
+
// https://tc39.es/ecma262/#sec-object.assign
|
1680 |
+
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
|
1681 |
+
assign: objectAssign
|
1682 |
+
});
|
1683 |
+
|
1684 |
+
/**
|
1685 |
+
* Get an element position on the page relative to another element (or body)
|
1686 |
+
* Thanks to `meouw`: http://stackoverflow.com/a/442474/375966
|
1687 |
+
*
|
1688 |
+
* @api private
|
1689 |
+
* @method getOffset
|
1690 |
+
* @param {Object} element
|
1691 |
+
* @param {Object} relativeEl
|
1692 |
+
* @returns Element's position info
|
1693 |
+
*/
|
1694 |
+
|
1695 |
+
function getOffset(element, relativeEl) {
|
1696 |
+
var body = document.body;
|
1697 |
+
var docEl = document.documentElement;
|
1698 |
+
var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;
|
1699 |
+
var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;
|
1700 |
+
relativeEl = relativeEl || body;
|
1701 |
+
var x = element.getBoundingClientRect();
|
1702 |
+
var xr = relativeEl.getBoundingClientRect();
|
1703 |
+
var relativeElPosition = getPropValue(relativeEl, "position");
|
1704 |
+
var obj = {
|
1705 |
+
width: x.width,
|
1706 |
+
height: x.height
|
1707 |
+
};
|
1708 |
+
|
1709 |
+
if (relativeEl.tagName.toLowerCase() !== "body" && relativeElPosition === "relative" || relativeElPosition === "sticky") {
|
1710 |
+
// when the container of our target element is _not_ body and has either "relative" or "sticky" position, we should not
|
1711 |
+
// consider the scroll position but we need to include the relative x/y of the container element
|
1712 |
+
return Object.assign(obj, {
|
1713 |
+
top: x.top - xr.top,
|
1714 |
+
left: x.left - xr.left
|
1715 |
+
});
|
1716 |
+
} else {
|
1717 |
+
return Object.assign(obj, {
|
1718 |
+
top: x.top + scrollTop,
|
1719 |
+
left: x.left + scrollLeft
|
1720 |
+
});
|
1721 |
+
}
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
/**
|
1725 |
+
* Checks to see if target element (or parents) position is fixed or not
|
1726 |
+
*
|
1727 |
+
* @api private
|
1728 |
+
* @method _isFixed
|
1729 |
+
* @param {Object} element
|
1730 |
+
* @returns Boolean
|
1731 |
+
*/
|
1732 |
+
|
1733 |
+
function isFixed(element) {
|
1734 |
+
var p = element.parentNode;
|
1735 |
+
|
1736 |
+
if (!p || p.nodeName === "HTML") {
|
1737 |
+
return false;
|
1738 |
+
}
|
1739 |
+
|
1740 |
+
if (getPropValue(element, "position") === "fixed") {
|
1741 |
+
return true;
|
1742 |
+
}
|
1743 |
+
|
1744 |
+
return isFixed(p);
|
1745 |
+
}
|
1746 |
+
|
1747 |
+
var floor$1 = Math.floor;
|
1748 |
+
var replace = ''.replace;
|
1749 |
+
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
1750 |
+
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
1751 |
+
|
1752 |
+
// https://tc39.es/ecma262/#sec-getsubstitution
|
1753 |
+
var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
|
1754 |
+
var tailPos = position + matched.length;
|
1755 |
+
var m = captures.length;
|
1756 |
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
1757 |
+
if (namedCaptures !== undefined) {
|
1758 |
+
namedCaptures = toObject(namedCaptures);
|
1759 |
+
symbols = SUBSTITUTION_SYMBOLS;
|
1760 |
+
}
|
1761 |
+
return replace.call(replacement, symbols, function (match, ch) {
|
1762 |
+
var capture;
|
1763 |
+
switch (ch.charAt(0)) {
|
1764 |
+
case '$': return '$';
|
1765 |
+
case '&': return matched;
|
1766 |
+
case '`': return str.slice(0, position);
|
1767 |
+
case "'": return str.slice(tailPos);
|
1768 |
+
case '<':
|
1769 |
+
capture = namedCaptures[ch.slice(1, -1)];
|
1770 |
+
break;
|
1771 |
+
default: // \d\d?
|
1772 |
+
var n = +ch;
|
1773 |
+
if (n === 0) return match;
|
1774 |
+
if (n > m) {
|
1775 |
+
var f = floor$1(n / 10);
|
1776 |
+
if (f === 0) return match;
|
1777 |
+
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
1778 |
+
return match;
|
1779 |
+
}
|
1780 |
+
capture = captures[n - 1];
|
1781 |
+
}
|
1782 |
+
return capture === undefined ? '' : capture;
|
1783 |
+
});
|
1784 |
+
};
|
1785 |
+
|
1786 |
+
var max$1 = Math.max;
|
1787 |
+
var min$3 = Math.min;
|
1788 |
+
|
1789 |
+
var maybeToString = function (it) {
|
1790 |
+
return it === undefined ? it : String(it);
|
1791 |
+
};
|
1792 |
+
|
1793 |
+
// @@replace logic
|
1794 |
+
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
|
1795 |
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
|
1796 |
+
var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
|
1797 |
+
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
1798 |
+
|
1799 |
+
return [
|
1800 |
+
// `String.prototype.replace` method
|
1801 |
+
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
1802 |
+
function replace(searchValue, replaceValue) {
|
1803 |
+
var O = requireObjectCoercible(this);
|
1804 |
+
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
1805 |
+
return replacer !== undefined
|
1806 |
+
? replacer.call(searchValue, O, replaceValue)
|
1807 |
+
: nativeReplace.call(String(O), searchValue, replaceValue);
|
1808 |
+
},
|
1809 |
+
// `RegExp.prototype[@@replace]` method
|
1810 |
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
1811 |
+
function (regexp, replaceValue) {
|
1812 |
+
if (
|
1813 |
+
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
|
1814 |
+
(typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
|
1815 |
+
) {
|
1816 |
+
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
1817 |
+
if (res.done) return res.value;
|
1818 |
+
}
|
1819 |
+
|
1820 |
+
var rx = anObject(regexp);
|
1821 |
+
var S = String(this);
|
1822 |
+
|
1823 |
+
var functionalReplace = typeof replaceValue === 'function';
|
1824 |
+
if (!functionalReplace) replaceValue = String(replaceValue);
|
1825 |
+
|
1826 |
+
var global = rx.global;
|
1827 |
+
if (global) {
|
1828 |
+
var fullUnicode = rx.unicode;
|
1829 |
+
rx.lastIndex = 0;
|
1830 |
+
}
|
1831 |
+
var results = [];
|
1832 |
+
while (true) {
|
1833 |
+
var result = regexpExecAbstract(rx, S);
|
1834 |
+
if (result === null) break;
|
1835 |
+
|
1836 |
+
results.push(result);
|
1837 |
+
if (!global) break;
|
1838 |
+
|
1839 |
+
var matchStr = String(result[0]);
|
1840 |
+
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
1841 |
+
}
|
1842 |
+
|
1843 |
+
var accumulatedResult = '';
|
1844 |
+
var nextSourcePosition = 0;
|
1845 |
+
for (var i = 0; i < results.length; i++) {
|
1846 |
+
result = results[i];
|
1847 |
+
|
1848 |
+
var matched = String(result[0]);
|
1849 |
+
var position = max$1(min$3(toInteger(result.index), S.length), 0);
|
1850 |
+
var captures = [];
|
1851 |
+
// NOTE: This is equivalent to
|
1852 |
+
// captures = result.slice(1).map(maybeToString)
|
1853 |
+
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
1854 |
+
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
1855 |
+
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
1856 |
+
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
|
1857 |
+
var namedCaptures = result.groups;
|
1858 |
+
if (functionalReplace) {
|
1859 |
+
var replacerArgs = [matched].concat(captures, position, S);
|
1860 |
+
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
|
1861 |
+
var replacement = String(replaceValue.apply(undefined, replacerArgs));
|
1862 |
+
} else {
|
1863 |
+
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
1864 |
+
}
|
1865 |
+
if (position >= nextSourcePosition) {
|
1866 |
+
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
|
1867 |
+
nextSourcePosition = position + matched.length;
|
1868 |
+
}
|
1869 |
+
}
|
1870 |
+
return accumulatedResult + S.slice(nextSourcePosition);
|
1871 |
+
}
|
1872 |
+
];
|
1873 |
+
});
|
1874 |
+
|
1875 |
+
/**
|
1876 |
+
* Remove a class from an element
|
1877 |
+
*
|
1878 |
+
* @api private
|
1879 |
+
* @method _removeClass
|
1880 |
+
* @param {Object} element
|
1881 |
+
* @param {RegExp|String} classNameRegex can be regex or string
|
1882 |
+
* @returns null
|
1883 |
+
*/
|
1884 |
+
function removeClass(element, classNameRegex) {
|
1885 |
+
if (element instanceof SVGElement) {
|
1886 |
+
var pre = element.getAttribute("class") || "";
|
1887 |
+
element.setAttribute("class", pre.replace(classNameRegex, "").replace(/^\s+|\s+$/g, ""));
|
1888 |
+
} else {
|
1889 |
+
element.className = element.className.replace(classNameRegex, "").replace(/^\s+|\s+$/g, "");
|
1890 |
+
}
|
1891 |
+
}
|
1892 |
+
|
1893 |
+
/**
|
1894 |
+
* Sets the style of an DOM element
|
1895 |
+
*
|
1896 |
+
* @param {Object} element
|
1897 |
+
* @param {Object|string} style
|
1898 |
+
* @return null
|
1899 |
+
*/
|
1900 |
+
function setStyle(element, style) {
|
1901 |
+
var cssText = "";
|
1902 |
+
|
1903 |
+
if (element.style.cssText) {
|
1904 |
+
cssText += element.style.cssText;
|
1905 |
+
}
|
1906 |
+
|
1907 |
+
if (typeof style === "string") {
|
1908 |
+
cssText += style;
|
1909 |
+
} else {
|
1910 |
+
for (var rule in style) {
|
1911 |
+
cssText += "".concat(rule, ":").concat(style[rule], ";");
|
1912 |
+
}
|
1913 |
+
}
|
1914 |
+
|
1915 |
+
element.style.cssText = cssText;
|
1916 |
+
}
|
1917 |
+
|
1918 |
+
/**
|
1919 |
+
* Update the position of the helper layer on the screen
|
1920 |
+
*
|
1921 |
+
* @api private
|
1922 |
+
* @method _setHelperLayerPosition
|
1923 |
+
* @param {Object} helperLayer
|
1924 |
+
*/
|
1925 |
+
|
1926 |
+
function setHelperLayerPosition(helperLayer) {
|
1927 |
+
if (helperLayer) {
|
1928 |
+
//prevent error when `this._currentStep` in undefined
|
1929 |
+
if (!this._introItems[this._currentStep]) return;
|
1930 |
+
var currentElement = this._introItems[this._currentStep];
|
1931 |
+
var elementPosition = getOffset(currentElement.element, this._targetElement);
|
1932 |
+
var widthHeightPadding = this._options.helperElementPadding; // If the target element is fixed, the tooltip should be fixed as well.
|
1933 |
+
// Otherwise, remove a fixed class that may be left over from the previous
|
1934 |
+
// step.
|
1935 |
+
|
1936 |
+
if (isFixed(currentElement.element)) {
|
1937 |
+
addClass(helperLayer, "introjs-fixedTooltip");
|
1938 |
+
} else {
|
1939 |
+
removeClass(helperLayer, "introjs-fixedTooltip");
|
1940 |
+
}
|
1941 |
+
|
1942 |
+
if (currentElement.position === "floating") {
|
1943 |
+
widthHeightPadding = 0;
|
1944 |
+
} //set new position to helper layer
|
1945 |
+
|
1946 |
+
|
1947 |
+
setStyle(helperLayer, {
|
1948 |
+
width: "".concat(elementPosition.width + widthHeightPadding, "px"),
|
1949 |
+
height: "".concat(elementPosition.height + widthHeightPadding, "px"),
|
1950 |
+
top: "".concat(elementPosition.top - widthHeightPadding / 2, "px"),
|
1951 |
+
left: "".concat(elementPosition.left - widthHeightPadding / 2, "px")
|
1952 |
+
});
|
1953 |
+
}
|
1954 |
+
}
|
1955 |
+
|
1956 |
+
// `Object.defineProperties` method
|
1957 |
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
1958 |
+
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
1959 |
+
anObject(O);
|
1960 |
+
var keys = objectKeys(Properties);
|
1961 |
+
var length = keys.length;
|
1962 |
+
var index = 0;
|
1963 |
+
var key;
|
1964 |
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
1965 |
+
return O;
|
1966 |
+
};
|
1967 |
+
|
1968 |
+
var html = getBuiltIn('document', 'documentElement');
|
1969 |
+
|
1970 |
+
var GT = '>';
|
1971 |
+
var LT = '<';
|
1972 |
+
var PROTOTYPE = 'prototype';
|
1973 |
+
var SCRIPT = 'script';
|
1974 |
+
var IE_PROTO = sharedKey('IE_PROTO');
|
1975 |
+
|
1976 |
+
var EmptyConstructor = function () { /* empty */ };
|
1977 |
+
|
1978 |
+
var scriptTag = function (content) {
|
1979 |
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
1980 |
+
};
|
1981 |
+
|
1982 |
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
1983 |
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
1984 |
+
activeXDocument.write(scriptTag(''));
|
1985 |
+
activeXDocument.close();
|
1986 |
+
var temp = activeXDocument.parentWindow.Object;
|
1987 |
+
activeXDocument = null; // avoid memory leak
|
1988 |
+
return temp;
|
1989 |
+
};
|
1990 |
+
|
1991 |
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
1992 |
+
var NullProtoObjectViaIFrame = function () {
|
1993 |
+
// Thrash, waste and sodomy: IE GC bug
|
1994 |
+
var iframe = documentCreateElement('iframe');
|
1995 |
+
var JS = 'java' + SCRIPT + ':';
|
1996 |
+
var iframeDocument;
|
1997 |
+
iframe.style.display = 'none';
|
1998 |
+
html.appendChild(iframe);
|
1999 |
+
// https://github.com/zloirock/core-js/issues/475
|
2000 |
+
iframe.src = String(JS);
|
2001 |
+
iframeDocument = iframe.contentWindow.document;
|
2002 |
+
iframeDocument.open();
|
2003 |
+
iframeDocument.write(scriptTag('document.F=Object'));
|
2004 |
+
iframeDocument.close();
|
2005 |
+
return iframeDocument.F;
|
2006 |
+
};
|
2007 |
+
|
2008 |
+
// Check for document.domain and active x support
|
2009 |
+
// No need to use active x approach when document.domain is not set
|
2010 |
+
// see https://github.com/es-shims/es5-shim/issues/150
|
2011 |
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
2012 |
+
// avoid IE GC bug
|
2013 |
+
var activeXDocument;
|
2014 |
+
var NullProtoObject = function () {
|
2015 |
+
try {
|
2016 |
+
/* global ActiveXObject -- old IE */
|
2017 |
+
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
2018 |
+
} catch (error) { /* ignore */ }
|
2019 |
+
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
2020 |
+
var length = enumBugKeys.length;
|
2021 |
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
2022 |
+
return NullProtoObject();
|
2023 |
+
};
|
2024 |
+
|
2025 |
+
hiddenKeys[IE_PROTO] = true;
|
2026 |
+
|
2027 |
+
// `Object.create` method
|
2028 |
+
// https://tc39.es/ecma262/#sec-object.create
|
2029 |
+
var objectCreate = Object.create || function create(O, Properties) {
|
2030 |
+
var result;
|
2031 |
+
if (O !== null) {
|
2032 |
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
2033 |
+
result = new EmptyConstructor();
|
2034 |
+
EmptyConstructor[PROTOTYPE] = null;
|
2035 |
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
2036 |
+
result[IE_PROTO] = O;
|
2037 |
+
} else result = NullProtoObject();
|
2038 |
+
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
2039 |
+
};
|
2040 |
+
|
2041 |
+
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
2042 |
+
var ArrayPrototype = Array.prototype;
|
2043 |
+
|
2044 |
+
// Array.prototype[@@unscopables]
|
2045 |
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
2046 |
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
2047 |
+
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
2048 |
+
configurable: true,
|
2049 |
+
value: objectCreate(null)
|
2050 |
+
});
|
2051 |
+
}
|
2052 |
+
|
2053 |
+
// add a key to Array.prototype[@@unscopables]
|
2054 |
+
var addToUnscopables = function (key) {
|
2055 |
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
2056 |
+
};
|
2057 |
+
|
2058 |
+
var $includes = arrayIncludes.includes;
|
2059 |
+
|
2060 |
+
|
2061 |
+
// `Array.prototype.includes` method
|
2062 |
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
2063 |
+
_export({ target: 'Array', proto: true }, {
|
2064 |
+
includes: function includes(el /* , fromIndex = 0 */) {
|
2065 |
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
2066 |
+
}
|
2067 |
+
});
|
2068 |
+
|
2069 |
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
2070 |
+
addToUnscopables('includes');
|
2071 |
+
|
2072 |
+
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
|
2073 |
+
|
2074 |
+
var SPECIES$4 = wellKnownSymbol('species');
|
2075 |
+
var nativeSlice = [].slice;
|
2076 |
+
var max$2 = Math.max;
|
2077 |
+
|
2078 |
+
// `Array.prototype.slice` method
|
2079 |
+
// https://tc39.es/ecma262/#sec-array.prototype.slice
|
2080 |
+
// fallback for not array-like ES3 strings and DOM objects
|
2081 |
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
2082 |
+
slice: function slice(start, end) {
|
2083 |
+
var O = toIndexedObject(this);
|
2084 |
+
var length = toLength(O.length);
|
2085 |
+
var k = toAbsoluteIndex(start, length);
|
2086 |
+
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
2087 |
+
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
2088 |
+
var Constructor, result, n;
|
2089 |
+
if (isArray(O)) {
|
2090 |
+
Constructor = O.constructor;
|
2091 |
+
// cross-realm fallback
|
2092 |
+
if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
|
2093 |
+
Constructor = undefined;
|
2094 |
+
} else if (isObject(Constructor)) {
|
2095 |
+
Constructor = Constructor[SPECIES$4];
|
2096 |
+
if (Constructor === null) Constructor = undefined;
|
2097 |
+
}
|
2098 |
+
if (Constructor === Array || Constructor === undefined) {
|
2099 |
+
return nativeSlice.call(O, k, fin);
|
2100 |
+
}
|
2101 |
+
}
|
2102 |
+
result = new (Constructor === undefined ? Array : Constructor)(max$2(fin - k, 0));
|
2103 |
+
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
2104 |
+
result.length = n;
|
2105 |
+
return result;
|
2106 |
+
}
|
2107 |
+
});
|
2108 |
+
|
2109 |
+
var notARegexp = function (it) {
|
2110 |
+
if (isRegexp(it)) {
|
2111 |
+
throw TypeError("The method doesn't accept regular expressions");
|
2112 |
+
} return it;
|
2113 |
+
};
|
2114 |
+
|
2115 |
+
var MATCH$1 = wellKnownSymbol('match');
|
2116 |
+
|
2117 |
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
2118 |
+
var regexp = /./;
|
2119 |
+
try {
|
2120 |
+
'/./'[METHOD_NAME](regexp);
|
2121 |
+
} catch (error1) {
|
2122 |
+
try {
|
2123 |
+
regexp[MATCH$1] = false;
|
2124 |
+
return '/./'[METHOD_NAME](regexp);
|
2125 |
+
} catch (error2) { /* empty */ }
|
2126 |
+
} return false;
|
2127 |
+
};
|
2128 |
+
|
2129 |
+
// `String.prototype.includes` method
|
2130 |
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
2131 |
+
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
2132 |
+
includes: function includes(searchString /* , position = 0 */) {
|
2133 |
+
return !!~String(requireObjectCoercible(this))
|
2134 |
+
.indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
|
2135 |
+
}
|
2136 |
+
});
|
2137 |
+
|
2138 |
+
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
2139 |
+
var method = [][METHOD_NAME];
|
2140 |
+
return !!method && fails(function () {
|
2141 |
+
// eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
|
2142 |
+
method.call(null, argument || function () { throw 1; }, 1);
|
2143 |
+
});
|
2144 |
+
};
|
2145 |
+
|
2146 |
+
var nativeJoin = [].join;
|
2147 |
+
|
2148 |
+
var ES3_STRINGS = indexedObject != Object;
|
2149 |
+
var STRICT_METHOD = arrayMethodIsStrict('join', ',');
|
2150 |
+
|
2151 |
+
// `Array.prototype.join` method
|
2152 |
+
// https://tc39.es/ecma262/#sec-array.prototype.join
|
2153 |
+
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
|
2154 |
+
join: function join(separator) {
|
2155 |
+
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
2156 |
+
}
|
2157 |
+
});
|
2158 |
+
|
2159 |
+
// optional / simple context binding
|
2160 |
+
var functionBindContext = function (fn, that, length) {
|
2161 |
+
aFunction$1(fn);
|
2162 |
+
if (that === undefined) return fn;
|
2163 |
+
switch (length) {
|
2164 |
+
case 0: return function () {
|
2165 |
+
return fn.call(that);
|
2166 |
+
};
|
2167 |
+
case 1: return function (a) {
|
2168 |
+
return fn.call(that, a);
|
2169 |
+
};
|
2170 |
+
case 2: return function (a, b) {
|
2171 |
+
return fn.call(that, a, b);
|
2172 |
+
};
|
2173 |
+
case 3: return function (a, b, c) {
|
2174 |
+
return fn.call(that, a, b, c);
|
2175 |
+
};
|
2176 |
+
}
|
2177 |
+
return function (/* ...args */) {
|
2178 |
+
return fn.apply(that, arguments);
|
2179 |
+
};
|
2180 |
+
};
|
2181 |
+
|
2182 |
+
var push = [].push;
|
2183 |
+
|
2184 |
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
|
2185 |
+
var createMethod$2 = function (TYPE) {
|
2186 |
+
var IS_MAP = TYPE == 1;
|
2187 |
+
var IS_FILTER = TYPE == 2;
|
2188 |
+
var IS_SOME = TYPE == 3;
|
2189 |
+
var IS_EVERY = TYPE == 4;
|
2190 |
+
var IS_FIND_INDEX = TYPE == 6;
|
2191 |
+
var IS_FILTER_OUT = TYPE == 7;
|
2192 |
+
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
2193 |
+
return function ($this, callbackfn, that, specificCreate) {
|
2194 |
+
var O = toObject($this);
|
2195 |
+
var self = indexedObject(O);
|
2196 |
+
var boundFunction = functionBindContext(callbackfn, that, 3);
|
2197 |
+
var length = toLength(self.length);
|
2198 |
+
var index = 0;
|
2199 |
+
var create = specificCreate || arraySpeciesCreate;
|
2200 |
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
|
2201 |
+
var value, result;
|
2202 |
+
for (;length > index; index++) if (NO_HOLES || index in self) {
|
2203 |
+
value = self[index];
|
2204 |
+
result = boundFunction(value, index, O);
|
2205 |
+
if (TYPE) {
|
2206 |
+
if (IS_MAP) target[index] = result; // map
|
2207 |
+
else if (result) switch (TYPE) {
|
2208 |
+
case 3: return true; // some
|
2209 |
+
case 5: return value; // find
|
2210 |
+
case 6: return index; // findIndex
|
2211 |
+
case 2: push.call(target, value); // filter
|
2212 |
+
} else switch (TYPE) {
|
2213 |
+
case 4: return false; // every
|
2214 |
+
case 7: push.call(target, value); // filterOut
|
2215 |
+
}
|
2216 |
+
}
|
2217 |
+
}
|
2218 |
+
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
2219 |
+
};
|
2220 |
+
};
|
2221 |
+
|
2222 |
+
var arrayIteration = {
|
2223 |
+
// `Array.prototype.forEach` method
|
2224 |
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
2225 |
+
forEach: createMethod$2(0),
|
2226 |
+
// `Array.prototype.map` method
|
2227 |
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
2228 |
+
map: createMethod$2(1),
|
2229 |
+
// `Array.prototype.filter` method
|
2230 |
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
2231 |
+
filter: createMethod$2(2),
|
2232 |
+
// `Array.prototype.some` method
|
2233 |
+
// https://tc39.es/ecma262/#sec-array.prototype.some
|
2234 |
+
some: createMethod$2(3),
|
2235 |
+
// `Array.prototype.every` method
|
2236 |
+
// https://tc39.es/ecma262/#sec-array.prototype.every
|
2237 |
+
every: createMethod$2(4),
|
2238 |
+
// `Array.prototype.find` method
|
2239 |
+
// https://tc39.es/ecma262/#sec-array.prototype.find
|
2240 |
+
find: createMethod$2(5),
|
2241 |
+
// `Array.prototype.findIndex` method
|
2242 |
+
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
2243 |
+
findIndex: createMethod$2(6),
|
2244 |
+
// `Array.prototype.filterOut` method
|
2245 |
+
// https://github.com/tc39/proposal-array-filtering
|
2246 |
+
filterOut: createMethod$2(7)
|
2247 |
+
};
|
2248 |
+
|
2249 |
+
var $filter = arrayIteration.filter;
|
2250 |
+
|
2251 |
+
|
2252 |
+
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('filter');
|
2253 |
+
|
2254 |
+
// `Array.prototype.filter` method
|
2255 |
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
2256 |
+
// with adding support of @@species
|
2257 |
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
|
2258 |
+
filter: function filter(callbackfn /* , thisArg */) {
|
2259 |
+
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
2260 |
+
}
|
2261 |
+
});
|
2262 |
+
|
2263 |
+
/**
|
2264 |
+
* Set tooltip left so it doesn't go off the right side of the window
|
2265 |
+
*
|
2266 |
+
* @return boolean true, if tooltipLayerStyleLeft is ok. false, otherwise.
|
2267 |
+
*/
|
2268 |
+
function checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer) {
|
2269 |
+
if (targetOffset.left + tooltipLayerStyleLeft + tooltipOffset.width > windowSize.width) {
|
2270 |
+
// off the right side of the window
|
2271 |
+
tooltipLayer.style.left = "".concat(windowSize.width - tooltipOffset.width - targetOffset.left, "px");
|
2272 |
+
return false;
|
2273 |
+
}
|
2274 |
+
|
2275 |
+
tooltipLayer.style.left = "".concat(tooltipLayerStyleLeft, "px");
|
2276 |
+
return true;
|
2277 |
+
}
|
2278 |
+
|
2279 |
+
/**
|
2280 |
+
* Set tooltip right so it doesn't go off the left side of the window
|
2281 |
+
*
|
2282 |
+
* @return boolean true, if tooltipLayerStyleRight is ok. false, otherwise.
|
2283 |
+
*/
|
2284 |
+
function checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer) {
|
2285 |
+
if (targetOffset.left + targetOffset.width - tooltipLayerStyleRight - tooltipOffset.width < 0) {
|
2286 |
+
// off the left side of the window
|
2287 |
+
tooltipLayer.style.left = "".concat(-targetOffset.left, "px");
|
2288 |
+
return false;
|
2289 |
+
}
|
2290 |
+
|
2291 |
+
tooltipLayer.style.right = "".concat(tooltipLayerStyleRight, "px");
|
2292 |
+
return true;
|
2293 |
+
}
|
2294 |
+
|
2295 |
+
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('splice');
|
2296 |
+
|
2297 |
+
var max$3 = Math.max;
|
2298 |
+
var min$4 = Math.min;
|
2299 |
+
var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
|
2300 |
+
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
|
2301 |
+
|
2302 |
+
// `Array.prototype.splice` method
|
2303 |
+
// https://tc39.es/ecma262/#sec-array.prototype.splice
|
2304 |
+
// with adding support of @@species
|
2305 |
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
|
2306 |
+
splice: function splice(start, deleteCount /* , ...items */) {
|
2307 |
+
var O = toObject(this);
|
2308 |
+
var len = toLength(O.length);
|
2309 |
+
var actualStart = toAbsoluteIndex(start, len);
|
2310 |
+
var argumentsLength = arguments.length;
|
2311 |
+
var insertCount, actualDeleteCount, A, k, from, to;
|
2312 |
+
if (argumentsLength === 0) {
|
2313 |
+
insertCount = actualDeleteCount = 0;
|
2314 |
+
} else if (argumentsLength === 1) {
|
2315 |
+
insertCount = 0;
|
2316 |
+
actualDeleteCount = len - actualStart;
|
2317 |
+
} else {
|
2318 |
+
insertCount = argumentsLength - 2;
|
2319 |
+
actualDeleteCount = min$4(max$3(toInteger(deleteCount), 0), len - actualStart);
|
2320 |
+
}
|
2321 |
+
if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) {
|
2322 |
+
throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
|
2323 |
+
}
|
2324 |
+
A = arraySpeciesCreate(O, actualDeleteCount);
|
2325 |
+
for (k = 0; k < actualDeleteCount; k++) {
|
2326 |
+
from = actualStart + k;
|
2327 |
+
if (from in O) createProperty(A, k, O[from]);
|
2328 |
+
}
|
2329 |
+
A.length = actualDeleteCount;
|
2330 |
+
if (insertCount < actualDeleteCount) {
|
2331 |
+
for (k = actualStart; k < len - actualDeleteCount; k++) {
|
2332 |
+
from = k + actualDeleteCount;
|
2333 |
+
to = k + insertCount;
|
2334 |
+
if (from in O) O[to] = O[from];
|
2335 |
+
else delete O[to];
|
2336 |
+
}
|
2337 |
+
for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
|
2338 |
+
} else if (insertCount > actualDeleteCount) {
|
2339 |
+
for (k = len - actualDeleteCount; k > actualStart; k--) {
|
2340 |
+
from = k + actualDeleteCount - 1;
|
2341 |
+
to = k + insertCount - 1;
|
2342 |
+
if (from in O) O[to] = O[from];
|
2343 |
+
else delete O[to];
|
2344 |
+
}
|
2345 |
+
}
|
2346 |
+
for (k = 0; k < insertCount; k++) {
|
2347 |
+
O[k + actualStart] = arguments[k + 2];
|
2348 |
+
}
|
2349 |
+
O.length = len - actualDeleteCount + insertCount;
|
2350 |
+
return A;
|
2351 |
+
}
|
2352 |
+
});
|
2353 |
+
|
2354 |
+
/**
|
2355 |
+
* Remove an entry from a string array if it's there, does nothing if it isn't there.
|
2356 |
+
*
|
2357 |
+
* @param {Array} stringArray
|
2358 |
+
* @param {String} stringToRemove
|
2359 |
+
*/
|
2360 |
+
function removeEntry(stringArray, stringToRemove) {
|
2361 |
+
if (stringArray.includes(stringToRemove)) {
|
2362 |
+
stringArray.splice(stringArray.indexOf(stringToRemove), 1);
|
2363 |
+
}
|
2364 |
+
}
|
2365 |
+
|
2366 |
+
/**
|
2367 |
+
* auto-determine alignment
|
2368 |
+
* @param {Integer} offsetLeft
|
2369 |
+
* @param {Integer} tooltipWidth
|
2370 |
+
* @param {Object} windowSize
|
2371 |
+
* @param {String} desiredAlignment
|
2372 |
+
* @return {String} calculatedAlignment
|
2373 |
+
*/
|
2374 |
+
|
2375 |
+
function _determineAutoAlignment(offsetLeft, tooltipWidth, _ref, desiredAlignment) {
|
2376 |
+
var width = _ref.width;
|
2377 |
+
var halfTooltipWidth = tooltipWidth / 2;
|
2378 |
+
var winWidth = Math.min(width, window.screen.width);
|
2379 |
+
var possibleAlignments = ["-left-aligned", "-middle-aligned", "-right-aligned"];
|
2380 |
+
var calculatedAlignment = ""; // valid left must be at least a tooltipWidth
|
2381 |
+
// away from right side
|
2382 |
+
|
2383 |
+
if (winWidth - offsetLeft < tooltipWidth) {
|
2384 |
+
removeEntry(possibleAlignments, "-left-aligned");
|
2385 |
+
} // valid middle must be at least half
|
2386 |
+
// width away from both sides
|
2387 |
+
|
2388 |
+
|
2389 |
+
if (offsetLeft < halfTooltipWidth || winWidth - offsetLeft < halfTooltipWidth) {
|
2390 |
+
removeEntry(possibleAlignments, "-middle-aligned");
|
2391 |
+
} // valid right must be at least a tooltipWidth
|
2392 |
+
// width away from left side
|
2393 |
+
|
2394 |
+
|
2395 |
+
if (offsetLeft < tooltipWidth) {
|
2396 |
+
removeEntry(possibleAlignments, "-right-aligned");
|
2397 |
+
}
|
2398 |
+
|
2399 |
+
if (possibleAlignments.length) {
|
2400 |
+
if (possibleAlignments.includes(desiredAlignment)) {
|
2401 |
+
// the desired alignment is valid
|
2402 |
+
calculatedAlignment = desiredAlignment;
|
2403 |
+
} else {
|
2404 |
+
// pick the first valid position, in order
|
2405 |
+
calculatedAlignment = possibleAlignments[0];
|
2406 |
+
}
|
2407 |
+
} else {
|
2408 |
+
// if screen width is too small
|
2409 |
+
// for ANY alignment, middle is
|
2410 |
+
// probably the best for visibility
|
2411 |
+
calculatedAlignment = "-middle-aligned";
|
2412 |
+
}
|
2413 |
+
|
2414 |
+
return calculatedAlignment;
|
2415 |
+
}
|
2416 |
+
/**
|
2417 |
+
* Determines the position of the tooltip based on the position precedence and availability
|
2418 |
+
* of screen space.
|
2419 |
+
*
|
2420 |
+
* @param {Object} targetElement
|
2421 |
+
* @param {Object} tooltipLayer
|
2422 |
+
* @param {String} desiredTooltipPosition
|
2423 |
+
* @return {String} calculatedPosition
|
2424 |
+
*/
|
2425 |
+
|
2426 |
+
|
2427 |
+
function _determineAutoPosition(targetElement, tooltipLayer, desiredTooltipPosition) {
|
2428 |
+
// Take a clone of position precedence. These will be the available
|
2429 |
+
var possiblePositions = this._options.positionPrecedence.slice();
|
2430 |
+
|
2431 |
+
var windowSize = getWinSize();
|
2432 |
+
var tooltipHeight = getOffset(tooltipLayer).height + 10;
|
2433 |
+
var tooltipWidth = getOffset(tooltipLayer).width + 20;
|
2434 |
+
var targetElementRect = targetElement.getBoundingClientRect(); // If we check all the possible areas, and there are no valid places for the tooltip, the element
|
2435 |
+
// must take up most of the screen real estate. Show the tooltip floating in the middle of the screen.
|
2436 |
+
|
2437 |
+
var calculatedPosition = "floating";
|
2438 |
+
/*
|
2439 |
+
* auto determine position
|
2440 |
+
*/
|
2441 |
+
// Check for space below
|
2442 |
+
|
2443 |
+
if (targetElementRect.bottom + tooltipHeight > windowSize.height) {
|
2444 |
+
removeEntry(possiblePositions, "bottom");
|
2445 |
+
} // Check for space above
|
2446 |
+
|
2447 |
+
|
2448 |
+
if (targetElementRect.top - tooltipHeight < 0) {
|
2449 |
+
removeEntry(possiblePositions, "top");
|
2450 |
+
} // Check for space to the right
|
2451 |
+
|
2452 |
+
|
2453 |
+
if (targetElementRect.right + tooltipWidth > windowSize.width) {
|
2454 |
+
removeEntry(possiblePositions, "right");
|
2455 |
+
} // Check for space to the left
|
2456 |
+
|
2457 |
+
|
2458 |
+
if (targetElementRect.left - tooltipWidth < 0) {
|
2459 |
+
removeEntry(possiblePositions, "left");
|
2460 |
+
} // @var {String} ex: 'right-aligned'
|
2461 |
+
|
2462 |
+
|
2463 |
+
var desiredAlignment = function (pos) {
|
2464 |
+
var hyphenIndex = pos.indexOf("-");
|
2465 |
+
|
2466 |
+
if (hyphenIndex !== -1) {
|
2467 |
+
// has alignment
|
2468 |
+
return pos.substr(hyphenIndex);
|
2469 |
+
}
|
2470 |
+
|
2471 |
+
return "";
|
2472 |
+
}(desiredTooltipPosition || ""); // strip alignment from position
|
2473 |
+
|
2474 |
+
|
2475 |
+
if (desiredTooltipPosition) {
|
2476 |
+
// ex: "bottom-right-aligned"
|
2477 |
+
// should return 'bottom'
|
2478 |
+
desiredTooltipPosition = desiredTooltipPosition.split("-")[0];
|
2479 |
+
}
|
2480 |
+
|
2481 |
+
if (possiblePositions.length) {
|
2482 |
+
if (possiblePositions.includes(desiredTooltipPosition)) {
|
2483 |
+
// If the requested position is in the list, choose that
|
2484 |
+
calculatedPosition = desiredTooltipPosition;
|
2485 |
+
} else {
|
2486 |
+
// Pick the first valid position, in order
|
2487 |
+
calculatedPosition = possiblePositions[0];
|
2488 |
+
}
|
2489 |
+
} // only top and bottom positions have optional alignments
|
2490 |
+
|
2491 |
+
|
2492 |
+
if (["top", "bottom"].includes(calculatedPosition)) {
|
2493 |
+
calculatedPosition += _determineAutoAlignment(targetElementRect.left, tooltipWidth, windowSize, desiredAlignment);
|
2494 |
+
}
|
2495 |
+
|
2496 |
+
return calculatedPosition;
|
2497 |
+
}
|
2498 |
+
/**
|
2499 |
+
* Render tooltip box in the page
|
2500 |
+
*
|
2501 |
+
* @api private
|
2502 |
+
* @method placeTooltip
|
2503 |
+
* @param {HTMLElement} targetElement
|
2504 |
+
* @param {HTMLElement} tooltipLayer
|
2505 |
+
* @param {HTMLElement} arrowLayer
|
2506 |
+
* @param {Boolean} hintMode
|
2507 |
+
*/
|
2508 |
+
|
2509 |
+
|
2510 |
+
function placeTooltip(targetElement, tooltipLayer, arrowLayer, hintMode) {
|
2511 |
+
var tooltipCssClass = "";
|
2512 |
+
var currentStepObj;
|
2513 |
+
var tooltipOffset;
|
2514 |
+
var targetOffset;
|
2515 |
+
var windowSize;
|
2516 |
+
var currentTooltipPosition;
|
2517 |
+
hintMode = hintMode || false; //reset the old style
|
2518 |
+
|
2519 |
+
tooltipLayer.style.top = null;
|
2520 |
+
tooltipLayer.style.right = null;
|
2521 |
+
tooltipLayer.style.bottom = null;
|
2522 |
+
tooltipLayer.style.left = null;
|
2523 |
+
tooltipLayer.style.marginLeft = null;
|
2524 |
+
tooltipLayer.style.marginTop = null;
|
2525 |
+
arrowLayer.style.display = "inherit"; //prevent error when `this._currentStep` is undefined
|
2526 |
+
|
2527 |
+
if (!this._introItems[this._currentStep]) return; //if we have a custom css class for each step
|
2528 |
+
|
2529 |
+
currentStepObj = this._introItems[this._currentStep];
|
2530 |
+
|
2531 |
+
if (typeof currentStepObj.tooltipClass === "string") {
|
2532 |
+
tooltipCssClass = currentStepObj.tooltipClass;
|
2533 |
+
} else {
|
2534 |
+
tooltipCssClass = this._options.tooltipClass;
|
2535 |
+
}
|
2536 |
+
|
2537 |
+
tooltipLayer.className = ["introjs-tooltip", tooltipCssClass].filter(Boolean).join(" ");
|
2538 |
+
tooltipLayer.setAttribute("role", "dialog");
|
2539 |
+
currentTooltipPosition = this._introItems[this._currentStep].position; // Floating is always valid, no point in calculating
|
2540 |
+
|
2541 |
+
if (currentTooltipPosition !== "floating" && this._options.autoPosition) {
|
2542 |
+
currentTooltipPosition = _determineAutoPosition.call(this, targetElement, tooltipLayer, currentTooltipPosition);
|
2543 |
+
}
|
2544 |
+
|
2545 |
+
var tooltipLayerStyleLeft;
|
2546 |
+
targetOffset = getOffset(targetElement);
|
2547 |
+
tooltipOffset = getOffset(tooltipLayer);
|
2548 |
+
windowSize = getWinSize();
|
2549 |
+
addClass(tooltipLayer, "introjs-".concat(currentTooltipPosition));
|
2550 |
+
|
2551 |
+
switch (currentTooltipPosition) {
|
2552 |
+
case "top-right-aligned":
|
2553 |
+
arrowLayer.className = "introjs-arrow bottom-right";
|
2554 |
+
var tooltipLayerStyleRight = 0;
|
2555 |
+
checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer);
|
2556 |
+
tooltipLayer.style.bottom = "".concat(targetOffset.height + 20, "px");
|
2557 |
+
break;
|
2558 |
+
|
2559 |
+
case "top-middle-aligned":
|
2560 |
+
arrowLayer.className = "introjs-arrow bottom-middle";
|
2561 |
+
var tooltipLayerStyleLeftRight = targetOffset.width / 2 - tooltipOffset.width / 2; // a fix for middle aligned hints
|
2562 |
+
|
2563 |
+
if (hintMode) {
|
2564 |
+
tooltipLayerStyleLeftRight += 5;
|
2565 |
+
}
|
2566 |
+
|
2567 |
+
if (checkLeft(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, tooltipLayer)) {
|
2568 |
+
tooltipLayer.style.right = null;
|
2569 |
+
checkRight(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, windowSize, tooltipLayer);
|
2570 |
+
}
|
2571 |
+
|
2572 |
+
tooltipLayer.style.bottom = "".concat(targetOffset.height + 20, "px");
|
2573 |
+
break;
|
2574 |
+
|
2575 |
+
case "top-left-aligned": // top-left-aligned is the same as the default top
|
2576 |
+
|
2577 |
+
case "top":
|
2578 |
+
arrowLayer.className = "introjs-arrow bottom";
|
2579 |
+
tooltipLayerStyleLeft = hintMode ? 0 : 15;
|
2580 |
+
checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer);
|
2581 |
+
tooltipLayer.style.bottom = "".concat(targetOffset.height + 20, "px");
|
2582 |
+
break;
|
2583 |
+
|
2584 |
+
case "right":
|
2585 |
+
tooltipLayer.style.left = "".concat(targetOffset.width + 20, "px");
|
2586 |
+
|
2587 |
+
if (targetOffset.top + tooltipOffset.height > windowSize.height) {
|
2588 |
+
// In this case, right would have fallen below the bottom of the screen.
|
2589 |
+
// Modify so that the bottom of the tooltip connects with the target
|
2590 |
+
arrowLayer.className = "introjs-arrow left-bottom";
|
2591 |
+
tooltipLayer.style.top = "-".concat(tooltipOffset.height - targetOffset.height - 20, "px");
|
2592 |
+
} else {
|
2593 |
+
arrowLayer.className = "introjs-arrow left";
|
2594 |
+
}
|
2595 |
+
|
2596 |
+
break;
|
2597 |
+
|
2598 |
+
case "left":
|
2599 |
+
if (!hintMode && this._options.showStepNumbers === true) {
|
2600 |
+
tooltipLayer.style.top = "15px";
|
2601 |
+
}
|
2602 |
+
|
2603 |
+
if (targetOffset.top + tooltipOffset.height > windowSize.height) {
|
2604 |
+
// In this case, left would have fallen below the bottom of the screen.
|
2605 |
+
// Modify so that the bottom of the tooltip connects with the target
|
2606 |
+
tooltipLayer.style.top = "-".concat(tooltipOffset.height - targetOffset.height - 20, "px");
|
2607 |
+
arrowLayer.className = "introjs-arrow right-bottom";
|
2608 |
+
} else {
|
2609 |
+
arrowLayer.className = "introjs-arrow right";
|
2610 |
+
}
|
2611 |
+
|
2612 |
+
tooltipLayer.style.right = "".concat(targetOffset.width + 20, "px");
|
2613 |
+
break;
|
2614 |
+
|
2615 |
+
case "floating":
|
2616 |
+
arrowLayer.style.display = "none"; //we have to adjust the top and left of layer manually for intro items without element
|
2617 |
+
|
2618 |
+
tooltipLayer.style.left = "50%";
|
2619 |
+
tooltipLayer.style.top = "50%";
|
2620 |
+
tooltipLayer.style.marginLeft = "-".concat(tooltipOffset.width / 2, "px");
|
2621 |
+
tooltipLayer.style.marginTop = "-".concat(tooltipOffset.height / 2, "px");
|
2622 |
+
break;
|
2623 |
+
|
2624 |
+
case "bottom-right-aligned":
|
2625 |
+
arrowLayer.className = "introjs-arrow top-right";
|
2626 |
+
tooltipLayerStyleRight = 0;
|
2627 |
+
checkLeft(targetOffset, tooltipLayerStyleRight, tooltipOffset, tooltipLayer);
|
2628 |
+
tooltipLayer.style.top = "".concat(targetOffset.height + 20, "px");
|
2629 |
+
break;
|
2630 |
+
|
2631 |
+
case "bottom-middle-aligned":
|
2632 |
+
arrowLayer.className = "introjs-arrow top-middle";
|
2633 |
+
tooltipLayerStyleLeftRight = targetOffset.width / 2 - tooltipOffset.width / 2; // a fix for middle aligned hints
|
2634 |
+
|
2635 |
+
if (hintMode) {
|
2636 |
+
tooltipLayerStyleLeftRight += 5;
|
2637 |
+
}
|
2638 |
+
|
2639 |
+
if (checkLeft(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, tooltipLayer)) {
|
2640 |
+
tooltipLayer.style.right = null;
|
2641 |
+
checkRight(targetOffset, tooltipLayerStyleLeftRight, tooltipOffset, windowSize, tooltipLayer);
|
2642 |
+
}
|
2643 |
+
|
2644 |
+
tooltipLayer.style.top = "".concat(targetOffset.height + 20, "px");
|
2645 |
+
break;
|
2646 |
+
// case 'bottom-left-aligned':
|
2647 |
+
// Bottom-left-aligned is the same as the default bottom
|
2648 |
+
// case 'bottom':
|
2649 |
+
// Bottom going to follow the default behavior
|
2650 |
+
|
2651 |
+
default:
|
2652 |
+
arrowLayer.className = "introjs-arrow top";
|
2653 |
+
tooltipLayerStyleLeft = 0;
|
2654 |
+
checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer);
|
2655 |
+
tooltipLayer.style.top = "".concat(targetOffset.height + 20, "px");
|
2656 |
+
}
|
2657 |
+
}
|
2658 |
+
|
2659 |
+
/**
|
2660 |
+
* To remove all show element(s)
|
2661 |
+
*
|
2662 |
+
* @api private
|
2663 |
+
* @method _removeShowElement
|
2664 |
+
*/
|
2665 |
+
|
2666 |
+
function removeShowElement() {
|
2667 |
+
var elms = document.querySelectorAll(".introjs-showElement");
|
2668 |
+
forEach(elms, function (elm) {
|
2669 |
+
removeClass(elm, /introjs-[a-zA-Z]+/g);
|
2670 |
+
});
|
2671 |
+
}
|
2672 |
+
|
2673 |
+
function _createElement(tagname, attrs) {
|
2674 |
+
var element = document.createElement(tagname);
|
2675 |
+
attrs = attrs || {}; // regex for matching attributes that need to be set with setAttribute
|
2676 |
+
|
2677 |
+
var setAttRegex = /^(?:role|data-|aria-)/;
|
2678 |
+
|
2679 |
+
for (var k in attrs) {
|
2680 |
+
var v = attrs[k];
|
2681 |
+
|
2682 |
+
if (k === "style") {
|
2683 |
+
setStyle(element, v);
|
2684 |
+
} else if (k.match(setAttRegex)) {
|
2685 |
+
element.setAttribute(k, v);
|
2686 |
+
} else {
|
2687 |
+
element[k] = v;
|
2688 |
+
}
|
2689 |
+
}
|
2690 |
+
|
2691 |
+
return element;
|
2692 |
+
}
|
2693 |
+
|
2694 |
+
/**
|
2695 |
+
* Appends `element` to `parentElement`
|
2696 |
+
*
|
2697 |
+
* @param {Element} parentElement
|
2698 |
+
* @param {Element} element
|
2699 |
+
* @param {Boolean} [animate=false]
|
2700 |
+
*/
|
2701 |
+
|
2702 |
+
function appendChild(parentElement, element, animate) {
|
2703 |
+
if (animate) {
|
2704 |
+
var existingOpacity = element.style.opacity || "1";
|
2705 |
+
setStyle(element, {
|
2706 |
+
opacity: "0"
|
2707 |
+
});
|
2708 |
+
window.setTimeout(function () {
|
2709 |
+
setStyle(element, {
|
2710 |
+
opacity: existingOpacity
|
2711 |
+
});
|
2712 |
+
}, 10);
|
2713 |
+
}
|
2714 |
+
|
2715 |
+
parentElement.appendChild(element);
|
2716 |
+
}
|
2717 |
+
|
2718 |
+
/**
|
2719 |
+
* Gets the current progress percentage
|
2720 |
+
*
|
2721 |
+
* @api private
|
2722 |
+
* @method _getProgress
|
2723 |
+
* @returns current progress percentage
|
2724 |
+
*/
|
2725 |
+
|
2726 |
+
function _getProgress() {
|
2727 |
+
// Steps are 0 indexed
|
2728 |
+
var currentStep = parseInt(this._currentStep + 1, 10);
|
2729 |
+
return currentStep / this._introItems.length * 100;
|
2730 |
+
}
|
2731 |
+
/**
|
2732 |
+
* Add disableinteraction layer and adjust the size and position of the layer
|
2733 |
+
*
|
2734 |
+
* @api private
|
2735 |
+
* @method _disableInteraction
|
2736 |
+
*/
|
2737 |
+
|
2738 |
+
|
2739 |
+
function _disableInteraction() {
|
2740 |
+
var disableInteractionLayer = document.querySelector(".introjs-disableInteraction");
|
2741 |
+
|
2742 |
+
if (disableInteractionLayer === null) {
|
2743 |
+
disableInteractionLayer = _createElement("div", {
|
2744 |
+
className: "introjs-disableInteraction"
|
2745 |
+
});
|
2746 |
+
|
2747 |
+
this._targetElement.appendChild(disableInteractionLayer);
|
2748 |
+
}
|
2749 |
+
|
2750 |
+
setHelperLayerPosition.call(this, disableInteractionLayer);
|
2751 |
+
}
|
2752 |
+
/**
|
2753 |
+
* Show an element on the page
|
2754 |
+
*
|
2755 |
+
* @api private
|
2756 |
+
* @method _showElement
|
2757 |
+
* @param {Object} targetElement
|
2758 |
+
*/
|
2759 |
+
|
2760 |
+
|
2761 |
+
function _showElement(targetElement) {
|
2762 |
+
var _this = this;
|
2763 |
+
|
2764 |
+
if (typeof this._introChangeCallback !== "undefined") {
|
2765 |
+
this._introChangeCallback.call(this, targetElement.element);
|
2766 |
+
}
|
2767 |
+
|
2768 |
+
var self = this;
|
2769 |
+
var oldHelperLayer = document.querySelector(".introjs-helperLayer");
|
2770 |
+
var oldReferenceLayer = document.querySelector(".introjs-tooltipReferenceLayer");
|
2771 |
+
var highlightClass = "introjs-helperLayer";
|
2772 |
+
var nextTooltipButton;
|
2773 |
+
var prevTooltipButton;
|
2774 |
+
var skipTooltipButton;
|
2775 |
+
|
2776 |
+
if (typeof targetElement.highlightClass === "string") {
|
2777 |
+
highlightClass += " ".concat(targetElement.highlightClass);
|
2778 |
+
} //check for options highlight class
|
2779 |
+
|
2780 |
+
|
2781 |
+
if (typeof this._options.highlightClass === "string") {
|
2782 |
+
highlightClass += " ".concat(this._options.highlightClass);
|
2783 |
+
}
|
2784 |
+
|
2785 |
+
if (oldHelperLayer !== null) {
|
2786 |
+
var oldHelperNumberLayer = oldReferenceLayer.querySelector(".introjs-helperNumberLayer");
|
2787 |
+
var oldtooltipLayer = oldReferenceLayer.querySelector(".introjs-tooltiptext");
|
2788 |
+
var oldTooltipTitleLayer = oldReferenceLayer.querySelector(".introjs-tooltip-title");
|
2789 |
+
var oldArrowLayer = oldReferenceLayer.querySelector(".introjs-arrow");
|
2790 |
+
var oldtooltipContainer = oldReferenceLayer.querySelector(".introjs-tooltip");
|
2791 |
+
skipTooltipButton = oldReferenceLayer.querySelector(".introjs-skipbutton");
|
2792 |
+
prevTooltipButton = oldReferenceLayer.querySelector(".introjs-prevbutton");
|
2793 |
+
nextTooltipButton = oldReferenceLayer.querySelector(".introjs-nextbutton"); //update or reset the helper highlight class
|
2794 |
+
|
2795 |
+
oldHelperLayer.className = highlightClass; //hide the tooltip
|
2796 |
+
|
2797 |
+
oldtooltipContainer.style.opacity = 0;
|
2798 |
+
oldtooltipContainer.style.display = "none"; // if the target element is within a scrollable element
|
2799 |
+
|
2800 |
+
scrollParentToElement.call(self, targetElement); // set new position to helper layer
|
2801 |
+
|
2802 |
+
setHelperLayerPosition.call(self, oldHelperLayer);
|
2803 |
+
setHelperLayerPosition.call(self, oldReferenceLayer); //remove old classes if the element still exist
|
2804 |
+
|
2805 |
+
removeShowElement(); //we should wait until the CSS3 transition is competed (it's 0.3 sec) to prevent incorrect `height` and `width` calculation
|
2806 |
+
|
2807 |
+
if (self._lastShowElementTimer) {
|
2808 |
+
window.clearTimeout(self._lastShowElementTimer);
|
2809 |
+
}
|
2810 |
+
|
2811 |
+
self._lastShowElementTimer = window.setTimeout(function () {
|
2812 |
+
// set current step to the label
|
2813 |
+
if (oldHelperNumberLayer !== null) {
|
2814 |
+
oldHelperNumberLayer.innerHTML = "".concat(targetElement.step, " of ").concat(_this._introItems.length);
|
2815 |
+
} // set current tooltip text
|
2816 |
+
|
2817 |
+
|
2818 |
+
oldtooltipLayer.innerHTML = targetElement.intro; // set current tooltip title
|
2819 |
+
|
2820 |
+
oldTooltipTitleLayer.innerHTML = targetElement.title; //set the tooltip position
|
2821 |
+
|
2822 |
+
oldtooltipContainer.style.display = "block";
|
2823 |
+
placeTooltip.call(self, targetElement.element, oldtooltipContainer, oldArrowLayer); //change active bullet
|
2824 |
+
|
2825 |
+
if (self._options.showBullets) {
|
2826 |
+
oldReferenceLayer.querySelector(".introjs-bullets li > a.active").className = "";
|
2827 |
+
oldReferenceLayer.querySelector(".introjs-bullets li > a[data-stepnumber=\"".concat(targetElement.step, "\"]")).className = "active";
|
2828 |
+
}
|
2829 |
+
|
2830 |
+
oldReferenceLayer.querySelector(".introjs-progress .introjs-progressbar").style.cssText = "width:".concat(_getProgress.call(self), "%;");
|
2831 |
+
oldReferenceLayer.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow", _getProgress.call(self)); //show the tooltip
|
2832 |
+
|
2833 |
+
oldtooltipContainer.style.opacity = 1; //reset button focus
|
2834 |
+
|
2835 |
+
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null && /introjs-donebutton/gi.test(nextTooltipButton.className)) {
|
2836 |
+
// skip button is now "done" button
|
2837 |
+
nextTooltipButton.focus();
|
2838 |
+
} else if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
2839 |
+
//still in the tour, focus on next
|
2840 |
+
nextTooltipButton.focus();
|
2841 |
+
} // change the scroll of the window, if needed
|
2842 |
+
|
2843 |
+
|
2844 |
+
scrollTo.call(self, targetElement.scrollTo, targetElement, oldtooltipLayer);
|
2845 |
+
}, 350); // end of old element if-else condition
|
2846 |
+
} else {
|
2847 |
+
var helperLayer = _createElement("div", {
|
2848 |
+
className: highlightClass
|
2849 |
+
});
|
2850 |
+
var referenceLayer = _createElement("div", {
|
2851 |
+
className: "introjs-tooltipReferenceLayer"
|
2852 |
+
});
|
2853 |
+
var arrowLayer = _createElement("div", {
|
2854 |
+
className: "introjs-arrow"
|
2855 |
+
});
|
2856 |
+
var tooltipLayer = _createElement("div", {
|
2857 |
+
className: "introjs-tooltip"
|
2858 |
+
});
|
2859 |
+
var tooltipTextLayer = _createElement("div", {
|
2860 |
+
className: "introjs-tooltiptext"
|
2861 |
+
});
|
2862 |
+
var tooltipHeaderLayer = _createElement("div", {
|
2863 |
+
className: "introjs-tooltip-header"
|
2864 |
+
});
|
2865 |
+
var tooltipTitleLayer = _createElement("h1", {
|
2866 |
+
className: "introjs-tooltip-title"
|
2867 |
+
});
|
2868 |
+
var bulletsLayer = _createElement("div", {
|
2869 |
+
className: "introjs-bullets"
|
2870 |
+
});
|
2871 |
+
var progressLayer = _createElement("div");
|
2872 |
+
var buttonsLayer = _createElement("div");
|
2873 |
+
setStyle(helperLayer, {
|
2874 |
+
"box-shadow": "0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(self._options.overlayOpacity.toString(), ") 0 0 0 5000px")
|
2875 |
+
}); // target is within a scrollable element
|
2876 |
+
|
2877 |
+
scrollParentToElement.call(self, targetElement); //set new position to helper layer
|
2878 |
+
|
2879 |
+
setHelperLayerPosition.call(self, helperLayer);
|
2880 |
+
setHelperLayerPosition.call(self, referenceLayer); //add helper layer to target element
|
2881 |
+
|
2882 |
+
appendChild(this._targetElement, helperLayer, true);
|
2883 |
+
appendChild(this._targetElement, referenceLayer);
|
2884 |
+
tooltipTextLayer.innerHTML = targetElement.intro;
|
2885 |
+
tooltipTitleLayer.innerHTML = targetElement.title;
|
2886 |
+
|
2887 |
+
if (this._options.showBullets === false) {
|
2888 |
+
bulletsLayer.style.display = "none";
|
2889 |
+
}
|
2890 |
+
|
2891 |
+
var ulContainer = _createElement("ul");
|
2892 |
+
ulContainer.setAttribute("role", "tablist");
|
2893 |
+
|
2894 |
+
var anchorClick = function anchorClick() {
|
2895 |
+
self.goToStep(this.getAttribute("data-stepnumber"));
|
2896 |
+
};
|
2897 |
+
|
2898 |
+
forEach(this._introItems, function (_ref, i) {
|
2899 |
+
var step = _ref.step;
|
2900 |
+
var innerLi = _createElement("li");
|
2901 |
+
var anchorLink = _createElement("a");
|
2902 |
+
innerLi.setAttribute("role", "presentation");
|
2903 |
+
anchorLink.setAttribute("role", "tab");
|
2904 |
+
anchorLink.onclick = anchorClick;
|
2905 |
+
|
2906 |
+
if (i === targetElement.step - 1) {
|
2907 |
+
anchorLink.className = "active";
|
2908 |
+
}
|
2909 |
+
|
2910 |
+
setAnchorAsButton(anchorLink);
|
2911 |
+
anchorLink.innerHTML = " ";
|
2912 |
+
anchorLink.setAttribute("data-stepnumber", step);
|
2913 |
+
innerLi.appendChild(anchorLink);
|
2914 |
+
ulContainer.appendChild(innerLi);
|
2915 |
+
});
|
2916 |
+
bulletsLayer.appendChild(ulContainer);
|
2917 |
+
progressLayer.className = "introjs-progress";
|
2918 |
+
|
2919 |
+
if (this._options.showProgress === false) {
|
2920 |
+
progressLayer.style.display = "none";
|
2921 |
+
}
|
2922 |
+
|
2923 |
+
var progressBar = _createElement("div", {
|
2924 |
+
className: "introjs-progressbar"
|
2925 |
+
});
|
2926 |
+
|
2927 |
+
if (this._options.progressBarAdditionalClass) {
|
2928 |
+
progressBar.className += " " + this._options.progressBarAdditionalClass;
|
2929 |
+
}
|
2930 |
+
|
2931 |
+
progressBar.setAttribute("role", "progress");
|
2932 |
+
progressBar.setAttribute("aria-valuemin", 0);
|
2933 |
+
progressBar.setAttribute("aria-valuemax", 100);
|
2934 |
+
progressBar.setAttribute("aria-valuenow", _getProgress.call(this));
|
2935 |
+
progressBar.style.cssText = "width:".concat(_getProgress.call(this), "%;");
|
2936 |
+
progressLayer.appendChild(progressBar);
|
2937 |
+
buttonsLayer.className = "introjs-tooltipbuttons";
|
2938 |
+
|
2939 |
+
if (this._options.showButtons === false) {
|
2940 |
+
buttonsLayer.style.display = "none";
|
2941 |
+
}
|
2942 |
+
|
2943 |
+
tooltipHeaderLayer.appendChild(tooltipTitleLayer);
|
2944 |
+
tooltipLayer.appendChild(tooltipHeaderLayer);
|
2945 |
+
tooltipLayer.appendChild(tooltipTextLayer);
|
2946 |
+
tooltipLayer.appendChild(bulletsLayer);
|
2947 |
+
tooltipLayer.appendChild(progressLayer); // add helper layer number
|
2948 |
+
|
2949 |
+
var helperNumberLayer = _createElement("div");
|
2950 |
+
|
2951 |
+
if (this._options.showStepNumbers === true) {
|
2952 |
+
helperNumberLayer.className = "introjs-helperNumberLayer";
|
2953 |
+
helperNumberLayer.innerHTML = "".concat(targetElement.step, " of ").concat(this._introItems.length);
|
2954 |
+
tooltipLayer.appendChild(helperNumberLayer);
|
2955 |
+
}
|
2956 |
+
|
2957 |
+
tooltipLayer.appendChild(arrowLayer);
|
2958 |
+
referenceLayer.appendChild(tooltipLayer); //next button
|
2959 |
+
|
2960 |
+
nextTooltipButton = _createElement("a");
|
2961 |
+
|
2962 |
+
nextTooltipButton.onclick = function () {
|
2963 |
+
if (self._introItems.length - 1 !== self._currentStep) {
|
2964 |
+
nextStep.call(self);
|
2965 |
+
} else if (/introjs-donebutton/gi.test(nextTooltipButton.className)) {
|
2966 |
+
if (typeof self._introCompleteCallback === "function") {
|
2967 |
+
self._introCompleteCallback.call(self);
|
2968 |
+
}
|
2969 |
+
|
2970 |
+
exitIntro.call(self, self._targetElement);
|
2971 |
+
}
|
2972 |
+
};
|
2973 |
+
|
2974 |
+
setAnchorAsButton(nextTooltipButton);
|
2975 |
+
nextTooltipButton.innerHTML = this._options.nextLabel; //previous button
|
2976 |
+
|
2977 |
+
prevTooltipButton = _createElement("a");
|
2978 |
+
|
2979 |
+
prevTooltipButton.onclick = function () {
|
2980 |
+
if (self._currentStep !== 0) {
|
2981 |
+
previousStep.call(self);
|
2982 |
+
}
|
2983 |
+
};
|
2984 |
+
|
2985 |
+
setAnchorAsButton(prevTooltipButton);
|
2986 |
+
prevTooltipButton.innerHTML = this._options.prevLabel; //skip button
|
2987 |
+
|
2988 |
+
skipTooltipButton = _createElement("a", {
|
2989 |
+
className: "introjs-skipbutton"
|
2990 |
+
});
|
2991 |
+
setAnchorAsButton(skipTooltipButton);
|
2992 |
+
skipTooltipButton.innerHTML = this._options.skipLabel;
|
2993 |
+
|
2994 |
+
skipTooltipButton.onclick = function () {
|
2995 |
+
if (self._introItems.length - 1 === self._currentStep && typeof self._introCompleteCallback === "function") {
|
2996 |
+
self._introCompleteCallback.call(self);
|
2997 |
+
}
|
2998 |
+
|
2999 |
+
if (typeof self._introSkipCallback === "function") {
|
3000 |
+
self._introSkipCallback.call(self);
|
3001 |
+
}
|
3002 |
+
|
3003 |
+
exitIntro.call(self, self._targetElement);
|
3004 |
+
};
|
3005 |
+
|
3006 |
+
tooltipHeaderLayer.appendChild(skipTooltipButton); //in order to prevent displaying previous button always
|
3007 |
+
|
3008 |
+
if (this._introItems.length > 1) {
|
3009 |
+
buttonsLayer.appendChild(prevTooltipButton);
|
3010 |
+
} // we always need the next button because this
|
3011 |
+
// button changes to "Done" in the last step of the tour
|
3012 |
+
|
3013 |
+
|
3014 |
+
buttonsLayer.appendChild(nextTooltipButton);
|
3015 |
+
tooltipLayer.appendChild(buttonsLayer); //set proper position
|
3016 |
+
|
3017 |
+
placeTooltip.call(self, targetElement.element, tooltipLayer, arrowLayer); // change the scroll of the window, if needed
|
3018 |
+
|
3019 |
+
scrollTo.call(this, targetElement.scrollTo, targetElement, tooltipLayer); //end of new element if-else condition
|
3020 |
+
} // removing previous disable interaction layer
|
3021 |
+
|
3022 |
+
|
3023 |
+
var disableInteractionLayer = self._targetElement.querySelector(".introjs-disableInteraction");
|
3024 |
+
|
3025 |
+
if (disableInteractionLayer) {
|
3026 |
+
disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);
|
3027 |
+
} //disable interaction
|
3028 |
+
|
3029 |
+
|
3030 |
+
if (targetElement.disableInteraction) {
|
3031 |
+
_disableInteraction.call(self);
|
3032 |
+
} // when it's the first step of tour
|
3033 |
+
|
3034 |
+
|
3035 |
+
if (this._currentStep === 0 && this._introItems.length > 1) {
|
3036 |
+
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
3037 |
+
nextTooltipButton.className = "".concat(this._options.buttonClass, " introjs-nextbutton");
|
3038 |
+
nextTooltipButton.innerHTML = this._options.nextLabel;
|
3039 |
+
}
|
3040 |
+
|
3041 |
+
if (this._options.hidePrev === true) {
|
3042 |
+
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
3043 |
+
prevTooltipButton.className = "".concat(this._options.buttonClass, " introjs-prevbutton introjs-hidden");
|
3044 |
+
}
|
3045 |
+
|
3046 |
+
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
3047 |
+
addClass(nextTooltipButton, "introjs-fullbutton");
|
3048 |
+
}
|
3049 |
+
} else {
|
3050 |
+
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
3051 |
+
prevTooltipButton.className = "".concat(this._options.buttonClass, " introjs-prevbutton introjs-disabled");
|
3052 |
+
}
|
3053 |
+
}
|
3054 |
+
} else if (this._introItems.length - 1 === this._currentStep || this._introItems.length === 1) {
|
3055 |
+
// last step of tour
|
3056 |
+
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
3057 |
+
prevTooltipButton.className = "".concat(this._options.buttonClass, " introjs-prevbutton");
|
3058 |
+
}
|
3059 |
+
|
3060 |
+
if (this._options.hideNext === true) {
|
3061 |
+
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
3062 |
+
nextTooltipButton.className = "".concat(this._options.buttonClass, " introjs-nextbutton introjs-hidden");
|
3063 |
+
}
|
3064 |
+
|
3065 |
+
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
3066 |
+
addClass(prevTooltipButton, "introjs-fullbutton");
|
3067 |
+
}
|
3068 |
+
} else {
|
3069 |
+
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
3070 |
+
if (this._options.nextToDone === true) {
|
3071 |
+
nextTooltipButton.innerHTML = this._options.doneLabel;
|
3072 |
+
addClass(nextTooltipButton, "".concat(this._options.buttonClass, " introjs-nextbutton introjs-donebutton"));
|
3073 |
+
} else {
|
3074 |
+
nextTooltipButton.className = "".concat(this._options.buttonClass, " introjs-nextbutton introjs-disabled");
|
3075 |
+
}
|
3076 |
+
}
|
3077 |
+
}
|
3078 |
+
} else {
|
3079 |
+
// steps between start and end
|
3080 |
+
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
3081 |
+
prevTooltipButton.className = "".concat(this._options.buttonClass, " introjs-prevbutton");
|
3082 |
+
}
|
3083 |
+
|
3084 |
+
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
3085 |
+
nextTooltipButton.className = "".concat(this._options.buttonClass, " introjs-nextbutton");
|
3086 |
+
nextTooltipButton.innerHTML = this._options.nextLabel;
|
3087 |
+
}
|
3088 |
+
}
|
3089 |
+
|
3090 |
+
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
|
3091 |
+
prevTooltipButton.setAttribute("role", "button");
|
3092 |
+
}
|
3093 |
+
|
3094 |
+
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
3095 |
+
nextTooltipButton.setAttribute("role", "button");
|
3096 |
+
}
|
3097 |
+
|
3098 |
+
if (typeof skipTooltipButton !== "undefined" && skipTooltipButton !== null) {
|
3099 |
+
skipTooltipButton.setAttribute("role", "button");
|
3100 |
+
} //Set focus on "next" button, so that hitting Enter always moves you onto the next step
|
3101 |
+
|
3102 |
+
|
3103 |
+
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
|
3104 |
+
nextTooltipButton.focus();
|
3105 |
+
}
|
3106 |
+
|
3107 |
+
setShowElement(targetElement);
|
3108 |
+
|
3109 |
+
if (typeof this._introAfterChangeCallback !== "undefined") {
|
3110 |
+
this._introAfterChangeCallback.call(this, targetElement.element);
|
3111 |
+
}
|
3112 |
+
}
|
3113 |
+
|
3114 |
+
/**
|
3115 |
+
* Go to specific step of introduction
|
3116 |
+
*
|
3117 |
+
* @api private
|
3118 |
+
* @method _goToStep
|
3119 |
+
*/
|
3120 |
+
|
3121 |
+
function goToStep(step) {
|
3122 |
+
//because steps starts with zero
|
3123 |
+
this._currentStep = step - 2;
|
3124 |
+
|
3125 |
+
if (typeof this._introItems !== "undefined") {
|
3126 |
+
nextStep.call(this);
|
3127 |
+
}
|
3128 |
+
}
|
3129 |
+
/**
|
3130 |
+
* Go to the specific step of introduction with the explicit [data-step] number
|
3131 |
+
*
|
3132 |
+
* @api private
|
3133 |
+
* @method _goToStepNumber
|
3134 |
+
*/
|
3135 |
+
|
3136 |
+
function goToStepNumber(step) {
|
3137 |
+
this._currentStepNumber = step;
|
3138 |
+
|
3139 |
+
if (typeof this._introItems !== "undefined") {
|
3140 |
+
nextStep.call(this);
|
3141 |
+
}
|
3142 |
+
}
|
3143 |
+
/**
|
3144 |
+
* Go to next step on intro
|
3145 |
+
*
|
3146 |
+
* @api private
|
3147 |
+
* @method _nextStep
|
3148 |
+
*/
|
3149 |
+
|
3150 |
+
function nextStep() {
|
3151 |
+
var _this = this;
|
3152 |
+
|
3153 |
+
this._direction = "forward";
|
3154 |
+
|
3155 |
+
if (typeof this._currentStepNumber !== "undefined") {
|
3156 |
+
forEach(this._introItems, function (_ref, i) {
|
3157 |
+
var step = _ref.step;
|
3158 |
+
|
3159 |
+
if (step === _this._currentStepNumber) {
|
3160 |
+
_this._currentStep = i - 1;
|
3161 |
+
_this._currentStepNumber = undefined;
|
3162 |
+
}
|
3163 |
+
});
|
3164 |
+
}
|
3165 |
+
|
3166 |
+
if (typeof this._currentStep === "undefined") {
|
3167 |
+
this._currentStep = 0;
|
3168 |
+
} else {
|
3169 |
+
++this._currentStep;
|
3170 |
+
}
|
3171 |
+
|
3172 |
+
var nextStep = this._introItems[this._currentStep];
|
3173 |
+
var continueStep = true;
|
3174 |
+
|
3175 |
+
if (typeof this._introBeforeChangeCallback !== "undefined") {
|
3176 |
+
continueStep = this._introBeforeChangeCallback.call(this, nextStep && nextStep.element);
|
3177 |
+
} // if `onbeforechange` returned `false`, stop displaying the element
|
3178 |
+
|
3179 |
+
|
3180 |
+
if (continueStep === false) {
|
3181 |
+
--this._currentStep;
|
3182 |
+
return false;
|
3183 |
+
}
|
3184 |
+
|
3185 |
+
if (this._introItems.length <= this._currentStep) {
|
3186 |
+
//end of the intro
|
3187 |
+
//check if any callback is defined
|
3188 |
+
if (typeof this._introCompleteCallback === "function") {
|
3189 |
+
this._introCompleteCallback.call(this);
|
3190 |
+
}
|
3191 |
+
|
3192 |
+
exitIntro.call(this, this._targetElement);
|
3193 |
+
return;
|
3194 |
+
}
|
3195 |
+
|
3196 |
+
_showElement.call(this, nextStep);
|
3197 |
+
}
|
3198 |
+
/**
|
3199 |
+
* Go to previous step on intro
|
3200 |
+
*
|
3201 |
+
* @api private
|
3202 |
+
* @method _previousStep
|
3203 |
+
*/
|
3204 |
+
|
3205 |
+
function previousStep() {
|
3206 |
+
this._direction = "backward";
|
3207 |
+
|
3208 |
+
if (this._currentStep === 0) {
|
3209 |
+
return false;
|
3210 |
+
}
|
3211 |
+
|
3212 |
+
--this._currentStep;
|
3213 |
+
var nextStep = this._introItems[this._currentStep];
|
3214 |
+
var continueStep = true;
|
3215 |
+
|
3216 |
+
if (typeof this._introBeforeChangeCallback !== "undefined") {
|
3217 |
+
continueStep = this._introBeforeChangeCallback.call(this, nextStep && nextStep.element);
|
3218 |
+
} // if `onbeforechange` returned `false`, stop displaying the element
|
3219 |
+
|
3220 |
+
|
3221 |
+
if (continueStep === false) {
|
3222 |
+
++this._currentStep;
|
3223 |
+
return false;
|
3224 |
+
}
|
3225 |
+
|
3226 |
+
_showElement.call(this, nextStep);
|
3227 |
+
}
|
3228 |
+
/**
|
3229 |
+
* Returns the current step of the intro
|
3230 |
+
*
|
3231 |
+
* @returns {number | boolean}
|
3232 |
+
*/
|
3233 |
+
|
3234 |
+
function currentStep() {
|
3235 |
+
return this._currentStep;
|
3236 |
+
}
|
3237 |
+
|
3238 |
+
/**
|
3239 |
+
* on keyCode:
|
3240 |
+
* https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
|
3241 |
+
* This feature has been removed from the Web standards.
|
3242 |
+
* Though some browsers may still support it, it is in
|
3243 |
+
* the process of being dropped.
|
3244 |
+
* Instead, you should use KeyboardEvent.code,
|
3245 |
+
* if it's implemented.
|
3246 |
+
*
|
3247 |
+
* jQuery's approach is to test for
|
3248 |
+
* (1) e.which, then
|
3249 |
+
* (2) e.charCode, then
|
3250 |
+
* (3) e.keyCode
|
3251 |
+
* https://github.com/jquery/jquery/blob/a6b0705294d336ae2f63f7276de0da1195495363/src/event.js#L638
|
3252 |
+
*
|
3253 |
+
* @param type var
|
3254 |
+
* @return type
|
3255 |
+
*/
|
3256 |
+
|
3257 |
+
function onKeyDown(e) {
|
3258 |
+
var code = e.code === undefined ? e.which : e.code; // if e.which is null
|
3259 |
+
|
3260 |
+
if (code === null) {
|
3261 |
+
code = e.charCode === null ? e.keyCode : e.charCode;
|
3262 |
+
}
|
3263 |
+
|
3264 |
+
if ((code === "Escape" || code === 27) && this._options.exitOnEsc === true) {
|
3265 |
+
//escape key pressed, exit the intro
|
3266 |
+
//check if exit callback is defined
|
3267 |
+
exitIntro.call(this, this._targetElement);
|
3268 |
+
} else if (code === "ArrowLeft" || code === 37) {
|
3269 |
+
//left arrow
|
3270 |
+
previousStep.call(this);
|
3271 |
+
} else if (code === "ArrowRight" || code === 39) {
|
3272 |
+
//right arrow
|
3273 |
+
nextStep.call(this);
|
3274 |
+
} else if (code === "Enter" || code === "NumpadEnter" || code === 13) {
|
3275 |
+
//srcElement === ie
|
3276 |
+
var target = e.target || e.srcElement;
|
3277 |
+
|
3278 |
+
if (target && target.className.match("introjs-prevbutton")) {
|
3279 |
+
//user hit enter while focusing on previous button
|
3280 |
+
previousStep.call(this);
|
3281 |
+
} else if (target && target.className.match("introjs-skipbutton")) {
|
3282 |
+
//user hit enter while focusing on skip button
|
3283 |
+
if (this._introItems.length - 1 === this._currentStep && typeof this._introCompleteCallback === "function") {
|
3284 |
+
this._introCompleteCallback.call(this);
|
3285 |
+
}
|
3286 |
+
|
3287 |
+
exitIntro.call(this, this._targetElement);
|
3288 |
+
} else if (target && target.getAttribute("data-stepnumber")) {
|
3289 |
+
// user hit enter while focusing on step bullet
|
3290 |
+
target.click();
|
3291 |
+
} else {
|
3292 |
+
//default behavior for responding to enter
|
3293 |
+
nextStep.call(this);
|
3294 |
+
} //prevent default behaviour on hitting Enter, to prevent steps being skipped in some browsers
|
3295 |
+
|
3296 |
+
|
3297 |
+
if (e.preventDefault) {
|
3298 |
+
e.preventDefault();
|
3299 |
+
} else {
|
3300 |
+
e.returnValue = false;
|
3301 |
+
}
|
3302 |
+
}
|
3303 |
+
}
|
3304 |
+
|
3305 |
+
/*
|
3306 |
+
* makes a copy of the object
|
3307 |
+
* @api private
|
3308 |
+
* @method _cloneObject
|
3309 |
+
*/
|
3310 |
+
function cloneObject(object) {
|
3311 |
+
if (object === null || _typeof(object) !== "object" || typeof object.nodeType !== "undefined") {
|
3312 |
+
return object;
|
3313 |
+
}
|
3314 |
+
|
3315 |
+
var temp = {};
|
3316 |
+
|
3317 |
+
for (var key in object) {
|
3318 |
+
if (typeof window.jQuery !== "undefined" && object[key] instanceof window.jQuery) {
|
3319 |
+
temp[key] = object[key];
|
3320 |
+
} else {
|
3321 |
+
temp[key] = cloneObject(object[key]);
|
3322 |
+
}
|
3323 |
+
}
|
3324 |
+
|
3325 |
+
return temp;
|
3326 |
+
}
|
3327 |
+
|
3328 |
+
/**
|
3329 |
+
* Get a queryselector within the hint wrapper
|
3330 |
+
*
|
3331 |
+
* @param {String} selector
|
3332 |
+
* @return {NodeList|Array}
|
3333 |
+
*/
|
3334 |
+
|
3335 |
+
function hintQuerySelectorAll(selector) {
|
3336 |
+
var hintsWrapper = document.querySelector(".introjs-hints");
|
3337 |
+
return hintsWrapper ? hintsWrapper.querySelectorAll(selector) : [];
|
3338 |
+
}
|
3339 |
+
/**
|
3340 |
+
* Hide a hint
|
3341 |
+
*
|
3342 |
+
* @api private
|
3343 |
+
* @method hideHint
|
3344 |
+
*/
|
3345 |
+
|
3346 |
+
function hideHint(stepId) {
|
3347 |
+
var hint = hintQuerySelectorAll(".introjs-hint[data-step=\"".concat(stepId, "\"]"))[0];
|
3348 |
+
removeHintTooltip.call(this);
|
3349 |
+
|
3350 |
+
if (hint) {
|
3351 |
+
addClass(hint, "introjs-hidehint");
|
3352 |
+
} // call the callback function (if any)
|
3353 |
+
|
3354 |
+
|
3355 |
+
if (typeof this._hintCloseCallback !== "undefined") {
|
3356 |
+
this._hintCloseCallback.call(this, stepId);
|
3357 |
+
}
|
3358 |
+
}
|
3359 |
+
/**
|
3360 |
+
* Hide all hints
|
3361 |
+
*
|
3362 |
+
* @api private
|
3363 |
+
* @method hideHints
|
3364 |
+
*/
|
3365 |
+
|
3366 |
+
function hideHints() {
|
3367 |
+
var _this = this;
|
3368 |
+
|
3369 |
+
var hints = hintQuerySelectorAll(".introjs-hint");
|
3370 |
+
forEach(hints, function (hint) {
|
3371 |
+
hideHint.call(_this, hint.getAttribute("data-step"));
|
3372 |
+
});
|
3373 |
+
}
|
3374 |
+
/**
|
3375 |
+
* Show all hints
|
3376 |
+
*
|
3377 |
+
* @api private
|
3378 |
+
* @method _showHints
|
3379 |
+
*/
|
3380 |
+
|
3381 |
+
function showHints() {
|
3382 |
+
var _this2 = this;
|
3383 |
+
|
3384 |
+
var hints = hintQuerySelectorAll(".introjs-hint");
|
3385 |
+
|
3386 |
+
if (hints && hints.length) {
|
3387 |
+
forEach(hints, function (hint) {
|
3388 |
+
showHint.call(_this2, hint.getAttribute("data-step"));
|
3389 |
+
});
|
3390 |
+
} else {
|
3391 |
+
populateHints.call(this, this._targetElement);
|
3392 |
+
}
|
3393 |
+
}
|
3394 |
+
/**
|
3395 |
+
* Show a hint
|
3396 |
+
*
|
3397 |
+
* @api private
|
3398 |
+
* @method showHint
|
3399 |
+
*/
|
3400 |
+
|
3401 |
+
function showHint(stepId) {
|
3402 |
+
var hint = hintQuerySelectorAll(".introjs-hint[data-step=\"".concat(stepId, "\"]"))[0];
|
3403 |
+
|
3404 |
+
if (hint) {
|
3405 |
+
removeClass(hint, /introjs-hidehint/g);
|
3406 |
+
}
|
3407 |
+
}
|
3408 |
+
/**
|
3409 |
+
* Removes all hint elements on the page
|
3410 |
+
* Useful when you want to destroy the elements and add them again (e.g. a modal or popup)
|
3411 |
+
*
|
3412 |
+
* @api private
|
3413 |
+
* @method removeHints
|
3414 |
+
*/
|
3415 |
+
|
3416 |
+
function removeHints() {
|
3417 |
+
var _this3 = this;
|
3418 |
+
|
3419 |
+
var hints = hintQuerySelectorAll(".introjs-hint");
|
3420 |
+
forEach(hints, function (hint) {
|
3421 |
+
removeHint.call(_this3, hint.getAttribute("data-step"));
|
3422 |
+
});
|
3423 |
+
}
|
3424 |
+
/**
|
3425 |
+
* Remove one single hint element from the page
|
3426 |
+
* Useful when you want to destroy the element and add them again (e.g. a modal or popup)
|
3427 |
+
* Use removeHints if you want to remove all elements.
|
3428 |
+
*
|
3429 |
+
* @api private
|
3430 |
+
* @method removeHint
|
3431 |
+
*/
|
3432 |
+
|
3433 |
+
function removeHint(stepId) {
|
3434 |
+
var hint = hintQuerySelectorAll(".introjs-hint[data-step=\"".concat(stepId, "\"]"))[0];
|
3435 |
+
|
3436 |
+
if (hint) {
|
3437 |
+
hint.parentNode.removeChild(hint);
|
3438 |
+
}
|
3439 |
+
}
|
3440 |
+
/**
|
3441 |
+
* Add all available hints to the page
|
3442 |
+
*
|
3443 |
+
* @api private
|
3444 |
+
* @method addHints
|
3445 |
+
*/
|
3446 |
+
|
3447 |
+
function addHints() {
|
3448 |
+
var _this4 = this;
|
3449 |
+
|
3450 |
+
var self = this;
|
3451 |
+
var hintsWrapper = document.querySelector(".introjs-hints");
|
3452 |
+
|
3453 |
+
if (hintsWrapper === null) {
|
3454 |
+
hintsWrapper = _createElement("div", {
|
3455 |
+
className: "introjs-hints"
|
3456 |
+
});
|
3457 |
+
}
|
3458 |
+
/**
|
3459 |
+
* Returns an event handler unique to the hint iteration
|
3460 |
+
*
|
3461 |
+
* @param {Integer} i
|
3462 |
+
* @return {Function}
|
3463 |
+
*/
|
3464 |
+
|
3465 |
+
|
3466 |
+
var getHintClick = function getHintClick(i) {
|
3467 |
+
return function (e) {
|
3468 |
+
var evt = e ? e : window.event;
|
3469 |
+
|
3470 |
+
if (evt.stopPropagation) {
|
3471 |
+
evt.stopPropagation();
|
3472 |
+
}
|
3473 |
+
|
3474 |
+
if (evt.cancelBubble !== null) {
|
3475 |
+
evt.cancelBubble = true;
|
3476 |
+
}
|
3477 |
+
|
3478 |
+
showHintDialog.call(self, i);
|
3479 |
+
};
|
3480 |
+
};
|
3481 |
+
|
3482 |
+
forEach(this._introItems, function (item, i) {
|
3483 |
+
// avoid append a hint twice
|
3484 |
+
if (document.querySelector(".introjs-hint[data-step=\"".concat(i, "\"]"))) {
|
3485 |
+
return;
|
3486 |
+
}
|
3487 |
+
|
3488 |
+
var hint = _createElement("a", {
|
3489 |
+
className: "introjs-hint"
|
3490 |
+
});
|
3491 |
+
setAnchorAsButton(hint);
|
3492 |
+
hint.onclick = getHintClick(i);
|
3493 |
+
|
3494 |
+
if (!item.hintAnimation) {
|
3495 |
+
addClass(hint, "introjs-hint-no-anim");
|
3496 |
+
} // hint's position should be fixed if the target element's position is fixed
|
3497 |
+
|
3498 |
+
|
3499 |
+
if (isFixed(item.element)) {
|
3500 |
+
addClass(hint, "introjs-fixedhint");
|
3501 |
+
}
|
3502 |
+
|
3503 |
+
var hintDot = _createElement("div", {
|
3504 |
+
className: "introjs-hint-dot"
|
3505 |
+
});
|
3506 |
+
var hintPulse = _createElement("div", {
|
3507 |
+
className: "introjs-hint-pulse"
|
3508 |
+
});
|
3509 |
+
hint.appendChild(hintDot);
|
3510 |
+
hint.appendChild(hintPulse);
|
3511 |
+
hint.setAttribute("data-step", i); // we swap the hint element with target element
|
3512 |
+
// because _setHelperLayerPosition uses `element` property
|
3513 |
+
|
3514 |
+
item.targetElement = item.element;
|
3515 |
+
item.element = hint; // align the hint position
|
3516 |
+
|
3517 |
+
alignHintPosition.call(_this4, item.hintPosition, hint, item.targetElement);
|
3518 |
+
hintsWrapper.appendChild(hint);
|
3519 |
+
}); // adding the hints wrapper
|
3520 |
+
|
3521 |
+
document.body.appendChild(hintsWrapper); // call the callback function (if any)
|
3522 |
+
|
3523 |
+
if (typeof this._hintsAddedCallback !== "undefined") {
|
3524 |
+
this._hintsAddedCallback.call(this);
|
3525 |
+
}
|
3526 |
+
}
|
3527 |
+
/**
|
3528 |
+
* Aligns hint position
|
3529 |
+
*
|
3530 |
+
* @api private
|
3531 |
+
* @method alignHintPosition
|
3532 |
+
* @param {String} position
|
3533 |
+
* @param {Object} hint
|
3534 |
+
* @param {Object} element
|
3535 |
+
*/
|
3536 |
+
|
3537 |
+
function alignHintPosition(position, _ref, element) {
|
3538 |
+
var style = _ref.style;
|
3539 |
+
// get/calculate offset of target element
|
3540 |
+
var offset = getOffset.call(this, element);
|
3541 |
+
var iconWidth = 20;
|
3542 |
+
var iconHeight = 20; // align the hint element
|
3543 |
+
|
3544 |
+
switch (position) {
|
3545 |
+
default:
|
3546 |
+
case "top-left":
|
3547 |
+
style.left = "".concat(offset.left, "px");
|
3548 |
+
style.top = "".concat(offset.top, "px");
|
3549 |
+
break;
|
3550 |
+
|
3551 |
+
case "top-right":
|
3552 |
+
style.left = "".concat(offset.left + offset.width - iconWidth, "px");
|
3553 |
+
style.top = "".concat(offset.top, "px");
|
3554 |
+
break;
|
3555 |
+
|
3556 |
+
case "bottom-left":
|
3557 |
+
style.left = "".concat(offset.left, "px");
|
3558 |
+
style.top = "".concat(offset.top + offset.height - iconHeight, "px");
|
3559 |
+
break;
|
3560 |
+
|
3561 |
+
case "bottom-right":
|
3562 |
+
style.left = "".concat(offset.left + offset.width - iconWidth, "px");
|
3563 |
+
style.top = "".concat(offset.top + offset.height - iconHeight, "px");
|
3564 |
+
break;
|
3565 |
+
|
3566 |
+
case "middle-left":
|
3567 |
+
style.left = "".concat(offset.left, "px");
|
3568 |
+
style.top = "".concat(offset.top + (offset.height - iconHeight) / 2, "px");
|
3569 |
+
break;
|
3570 |
+
|
3571 |
+
case "middle-right":
|
3572 |
+
style.left = "".concat(offset.left + offset.width - iconWidth, "px");
|
3573 |
+
style.top = "".concat(offset.top + (offset.height - iconHeight) / 2, "px");
|
3574 |
+
break;
|
3575 |
+
|
3576 |
+
case "middle-middle":
|
3577 |
+
style.left = "".concat(offset.left + (offset.width - iconWidth) / 2, "px");
|
3578 |
+
style.top = "".concat(offset.top + (offset.height - iconHeight) / 2, "px");
|
3579 |
+
break;
|
3580 |
+
|
3581 |
+
case "bottom-middle":
|
3582 |
+
style.left = "".concat(offset.left + (offset.width - iconWidth) / 2, "px");
|
3583 |
+
style.top = "".concat(offset.top + offset.height - iconHeight, "px");
|
3584 |
+
break;
|
3585 |
+
|
3586 |
+
case "top-middle":
|
3587 |
+
style.left = "".concat(offset.left + (offset.width - iconWidth) / 2, "px");
|
3588 |
+
style.top = "".concat(offset.top, "px");
|
3589 |
+
break;
|
3590 |
+
}
|
3591 |
+
}
|
3592 |
+
/**
|
3593 |
+
* Triggers when user clicks on the hint element
|
3594 |
+
*
|
3595 |
+
* @api private
|
3596 |
+
* @method _showHintDialog
|
3597 |
+
* @param {Number} stepId
|
3598 |
+
*/
|
3599 |
+
|
3600 |
+
function showHintDialog(stepId) {
|
3601 |
+
var hintElement = document.querySelector(".introjs-hint[data-step=\"".concat(stepId, "\"]"));
|
3602 |
+
var item = this._introItems[stepId]; // call the callback function (if any)
|
3603 |
+
|
3604 |
+
if (typeof this._hintClickCallback !== "undefined") {
|
3605 |
+
this._hintClickCallback.call(this, hintElement, item, stepId);
|
3606 |
+
} // remove all open tooltips
|
3607 |
+
|
3608 |
+
|
3609 |
+
var removedStep = removeHintTooltip.call(this); // to toggle the tooltip
|
3610 |
+
|
3611 |
+
if (parseInt(removedStep, 10) === stepId) {
|
3612 |
+
return;
|
3613 |
+
}
|
3614 |
+
|
3615 |
+
var tooltipLayer = _createElement("div", {
|
3616 |
+
className: "introjs-tooltip"
|
3617 |
+
});
|
3618 |
+
var tooltipTextLayer = _createElement("div");
|
3619 |
+
var arrowLayer = _createElement("div");
|
3620 |
+
var referenceLayer = _createElement("div");
|
3621 |
+
|
3622 |
+
tooltipLayer.onclick = function (e) {
|
3623 |
+
//IE9 & Other Browsers
|
3624 |
+
if (e.stopPropagation) {
|
3625 |
+
e.stopPropagation();
|
3626 |
+
} //IE8 and Lower
|
3627 |
+
else {
|
3628 |
+
e.cancelBubble = true;
|
3629 |
+
}
|
3630 |
+
};
|
3631 |
+
|
3632 |
+
tooltipTextLayer.className = "introjs-tooltiptext";
|
3633 |
+
var tooltipWrapper = _createElement("p");
|
3634 |
+
tooltipWrapper.innerHTML = item.hint;
|
3635 |
+
var closeButton = _createElement("a");
|
3636 |
+
closeButton.className = this._options.buttonClass;
|
3637 |
+
closeButton.setAttribute("role", "button");
|
3638 |
+
closeButton.innerHTML = this._options.hintButtonLabel;
|
3639 |
+
closeButton.onclick = hideHint.bind(this, stepId);
|
3640 |
+
tooltipTextLayer.appendChild(tooltipWrapper);
|
3641 |
+
tooltipTextLayer.appendChild(closeButton);
|
3642 |
+
arrowLayer.className = "introjs-arrow";
|
3643 |
+
tooltipLayer.appendChild(arrowLayer);
|
3644 |
+
tooltipLayer.appendChild(tooltipTextLayer); // set current step for _placeTooltip function
|
3645 |
+
|
3646 |
+
this._currentStep = hintElement.getAttribute("data-step"); // align reference layer position
|
3647 |
+
|
3648 |
+
referenceLayer.className = "introjs-tooltipReferenceLayer introjs-hintReference";
|
3649 |
+
referenceLayer.setAttribute("data-step", hintElement.getAttribute("data-step"));
|
3650 |
+
setHelperLayerPosition.call(this, referenceLayer);
|
3651 |
+
referenceLayer.appendChild(tooltipLayer);
|
3652 |
+
document.body.appendChild(referenceLayer); //set proper position
|
3653 |
+
|
3654 |
+
placeTooltip.call(this, hintElement, tooltipLayer, arrowLayer, true);
|
3655 |
+
}
|
3656 |
+
/**
|
3657 |
+
* Removes open hint (tooltip hint)
|
3658 |
+
*
|
3659 |
+
* @api private
|
3660 |
+
* @method _removeHintTooltip
|
3661 |
+
*/
|
3662 |
+
|
3663 |
+
function removeHintTooltip() {
|
3664 |
+
var tooltip = document.querySelector(".introjs-hintReference");
|
3665 |
+
|
3666 |
+
if (tooltip) {
|
3667 |
+
var step = tooltip.getAttribute("data-step");
|
3668 |
+
tooltip.parentNode.removeChild(tooltip);
|
3669 |
+
return step;
|
3670 |
+
}
|
3671 |
+
}
|
3672 |
+
/**
|
3673 |
+
* Start parsing hint items
|
3674 |
+
*
|
3675 |
+
* @api private
|
3676 |
+
* @param {Object} targetElm
|
3677 |
+
* @method _startHint
|
3678 |
+
*/
|
3679 |
+
|
3680 |
+
function populateHints(targetElm) {
|
3681 |
+
var _this5 = this;
|
3682 |
+
|
3683 |
+
this._introItems = [];
|
3684 |
+
|
3685 |
+
if (this._options.hints) {
|
3686 |
+
forEach(this._options.hints, function (hint) {
|
3687 |
+
var currentItem = cloneObject(hint);
|
3688 |
+
|
3689 |
+
if (typeof currentItem.element === "string") {
|
3690 |
+
//grab the element with given selector from the page
|
3691 |
+
currentItem.element = document.querySelector(currentItem.element);
|
3692 |
+
}
|
3693 |
+
|
3694 |
+
currentItem.hintPosition = currentItem.hintPosition || _this5._options.hintPosition;
|
3695 |
+
currentItem.hintAnimation = currentItem.hintAnimation || _this5._options.hintAnimation;
|
3696 |
+
|
3697 |
+
if (currentItem.element !== null) {
|
3698 |
+
_this5._introItems.push(currentItem);
|
3699 |
+
}
|
3700 |
+
});
|
3701 |
+
} else {
|
3702 |
+
var hints = targetElm.querySelectorAll("*[data-hint]");
|
3703 |
+
|
3704 |
+
if (!hints || !hints.length) {
|
3705 |
+
return false;
|
3706 |
+
} //first add intro items with data-step
|
3707 |
+
|
3708 |
+
|
3709 |
+
forEach(hints, function (currentElement) {
|
3710 |
+
// hint animation
|
3711 |
+
var hintAnimation = currentElement.getAttribute("data-hintanimation");
|
3712 |
+
|
3713 |
+
if (hintAnimation) {
|
3714 |
+
hintAnimation = hintAnimation === "true";
|
3715 |
+
} else {
|
3716 |
+
hintAnimation = _this5._options.hintAnimation;
|
3717 |
+
}
|
3718 |
+
|
3719 |
+
_this5._introItems.push({
|
3720 |
+
element: currentElement,
|
3721 |
+
hint: currentElement.getAttribute("data-hint"),
|
3722 |
+
hintPosition: currentElement.getAttribute("data-hintposition") || _this5._options.hintPosition,
|
3723 |
+
hintAnimation: hintAnimation,
|
3724 |
+
tooltipClass: currentElement.getAttribute("data-tooltipclass"),
|
3725 |
+
position: currentElement.getAttribute("data-position") || _this5._options.tooltipPosition
|
3726 |
+
});
|
3727 |
+
});
|
3728 |
+
}
|
3729 |
+
|
3730 |
+
addHints.call(this);
|
3731 |
+
/*
|
3732 |
+
todo:
|
3733 |
+
these events should be removed at some point
|
3734 |
+
*/
|
3735 |
+
|
3736 |
+
DOMEvent.on(document, "click", removeHintTooltip, this, false);
|
3737 |
+
DOMEvent.on(window, "resize", reAlignHints, this, true);
|
3738 |
+
}
|
3739 |
+
/**
|
3740 |
+
* Re-aligns all hint elements
|
3741 |
+
*
|
3742 |
+
* @api private
|
3743 |
+
* @method _reAlignHints
|
3744 |
+
*/
|
3745 |
+
|
3746 |
+
function reAlignHints() {
|
3747 |
+
var _this6 = this;
|
3748 |
+
|
3749 |
+
forEach(this._introItems, function (_ref2) {
|
3750 |
+
var targetElement = _ref2.targetElement,
|
3751 |
+
hintPosition = _ref2.hintPosition,
|
3752 |
+
element = _ref2.element;
|
3753 |
+
|
3754 |
+
if (typeof targetElement === "undefined") {
|
3755 |
+
return;
|
3756 |
+
}
|
3757 |
+
|
3758 |
+
alignHintPosition.call(_this6, hintPosition, element, targetElement);
|
3759 |
+
});
|
3760 |
+
}
|
3761 |
+
|
3762 |
+
/**
|
3763 |
+
* Update placement of the intro objects on the screen
|
3764 |
+
* @api private
|
3765 |
+
*/
|
3766 |
+
|
3767 |
+
function refresh() {
|
3768 |
+
// re-align intros
|
3769 |
+
setHelperLayerPosition.call(this, document.querySelector(".introjs-helperLayer"));
|
3770 |
+
setHelperLayerPosition.call(this, document.querySelector(".introjs-tooltipReferenceLayer"));
|
3771 |
+
setHelperLayerPosition.call(this, document.querySelector(".introjs-disableInteraction")); // re-align tooltip
|
3772 |
+
|
3773 |
+
if (this._currentStep !== undefined && this._currentStep !== null) {
|
3774 |
+
var oldArrowLayer = document.querySelector(".introjs-arrow");
|
3775 |
+
var oldtooltipContainer = document.querySelector(".introjs-tooltip");
|
3776 |
+
placeTooltip.call(this, this._introItems[this._currentStep].element, oldtooltipContainer, oldArrowLayer);
|
3777 |
+
} //re-align hints
|
3778 |
+
|
3779 |
+
|
3780 |
+
reAlignHints.call(this);
|
3781 |
+
return this;
|
3782 |
+
}
|
3783 |
+
|
3784 |
+
function onResize() {
|
3785 |
+
refresh.call(this);
|
3786 |
+
}
|
3787 |
+
|
3788 |
+
/**
|
3789 |
+
* Removes `element` from `parentElement`
|
3790 |
+
*
|
3791 |
+
* @param {Element} element
|
3792 |
+
* @param {Boolean} [animate=false]
|
3793 |
+
*/
|
3794 |
+
|
3795 |
+
function removeChild(element, animate) {
|
3796 |
+
if (!element || !element.parentElement) return;
|
3797 |
+
var parentElement = element.parentElement;
|
3798 |
+
|
3799 |
+
if (animate) {
|
3800 |
+
setStyle(element, {
|
3801 |
+
opacity: "0"
|
3802 |
+
});
|
3803 |
+
window.setTimeout(function () {
|
3804 |
+
parentElement.removeChild(element);
|
3805 |
+
}, 500);
|
3806 |
+
} else {
|
3807 |
+
parentElement.removeChild(element);
|
3808 |
+
}
|
3809 |
+
}
|
3810 |
+
|
3811 |
+
/**
|
3812 |
+
* Exit from intro
|
3813 |
+
*
|
3814 |
+
* @api private
|
3815 |
+
* @method _exitIntro
|
3816 |
+
* @param {Object} targetElement
|
3817 |
+
* @param {Boolean} force - Setting to `true` will skip the result of beforeExit callback
|
3818 |
+
*/
|
3819 |
+
|
3820 |
+
function exitIntro(targetElement, force) {
|
3821 |
+
var continueExit = true; // calling onbeforeexit callback
|
3822 |
+
//
|
3823 |
+
// If this callback return `false`, it would halt the process
|
3824 |
+
|
3825 |
+
if (this._introBeforeExitCallback !== undefined) {
|
3826 |
+
continueExit = this._introBeforeExitCallback.call(this);
|
3827 |
+
} // skip this check if `force` parameter is `true`
|
3828 |
+
// otherwise, if `onbeforeexit` returned `false`, don't exit the intro
|
3829 |
+
|
3830 |
+
|
3831 |
+
if (!force && continueExit === false) return; // remove overlay layers from the page
|
3832 |
+
|
3833 |
+
var overlayLayers = targetElement.querySelectorAll(".introjs-overlay");
|
3834 |
+
|
3835 |
+
if (overlayLayers && overlayLayers.length) {
|
3836 |
+
forEach(overlayLayers, function (overlayLayer) {
|
3837 |
+
return removeChild(overlayLayer);
|
3838 |
+
});
|
3839 |
+
} //remove all helper layers
|
3840 |
+
|
3841 |
+
|
3842 |
+
var helperLayer = targetElement.querySelector(".introjs-helperLayer");
|
3843 |
+
removeChild(helperLayer, true);
|
3844 |
+
var referenceLayer = targetElement.querySelector(".introjs-tooltipReferenceLayer");
|
3845 |
+
removeChild(referenceLayer); //remove disableInteractionLayer
|
3846 |
+
|
3847 |
+
var disableInteractionLayer = targetElement.querySelector(".introjs-disableInteraction");
|
3848 |
+
removeChild(disableInteractionLayer); //remove intro floating element
|
3849 |
+
|
3850 |
+
var floatingElement = document.querySelector(".introjsFloatingElement");
|
3851 |
+
removeChild(floatingElement);
|
3852 |
+
removeShowElement(); //clean listeners
|
3853 |
+
|
3854 |
+
DOMEvent.off(window, "keydown", onKeyDown, this, true);
|
3855 |
+
DOMEvent.off(window, "resize", onResize, this, true); //check if any callback is defined
|
3856 |
+
|
3857 |
+
if (this._introExitCallback !== undefined) {
|
3858 |
+
this._introExitCallback.call(this);
|
3859 |
+
} //set the step to zero
|
3860 |
+
|
3861 |
+
|
3862 |
+
this._currentStep = undefined;
|
3863 |
+
}
|
3864 |
+
|
3865 |
+
/**
|
3866 |
+
* Add overlay layer to the page
|
3867 |
+
*
|
3868 |
+
* @api private
|
3869 |
+
* @method _addOverlayLayer
|
3870 |
+
* @param {Object} targetElm
|
3871 |
+
*/
|
3872 |
+
|
3873 |
+
function addOverlayLayer(targetElm) {
|
3874 |
+
var _this = this;
|
3875 |
+
|
3876 |
+
var overlayLayer = _createElement("div", {
|
3877 |
+
className: "introjs-overlay"
|
3878 |
+
});
|
3879 |
+
setStyle(overlayLayer, {
|
3880 |
+
top: 0,
|
3881 |
+
bottom: 0,
|
3882 |
+
left: 0,
|
3883 |
+
right: 0,
|
3884 |
+
position: "fixed"
|
3885 |
+
});
|
3886 |
+
targetElm.appendChild(overlayLayer);
|
3887 |
+
|
3888 |
+
if (this._options.exitOnOverlayClick === true) {
|
3889 |
+
setStyle(overlayLayer, {
|
3890 |
+
cursor: "pointer"
|
3891 |
+
});
|
3892 |
+
|
3893 |
+
overlayLayer.onclick = function () {
|
3894 |
+
exitIntro.call(_this, targetElm);
|
3895 |
+
};
|
3896 |
+
}
|
3897 |
+
|
3898 |
+
return true;
|
3899 |
+
}
|
3900 |
+
|
3901 |
+
/**
|
3902 |
+
* Initiate a new introduction/guide from an element in the page
|
3903 |
+
*
|
3904 |
+
* @api private
|
3905 |
+
* @method _introForElement
|
3906 |
+
* @param {Object} targetElm
|
3907 |
+
* @param {String} group
|
3908 |
+
* @returns {Boolean} Success or not?
|
3909 |
+
*/
|
3910 |
+
|
3911 |
+
function introForElement(targetElm, group) {
|
3912 |
+
var _this = this;
|
3913 |
+
|
3914 |
+
var allIntroSteps = targetElm.querySelectorAll("*[data-intro]");
|
3915 |
+
var introItems = [];
|
3916 |
+
|
3917 |
+
if (this._options.steps) {
|
3918 |
+
//use steps passed programmatically
|
3919 |
+
forEach(this._options.steps, function (step) {
|
3920 |
+
var currentItem = cloneObject(step); //set the step
|
3921 |
+
|
3922 |
+
currentItem.step = introItems.length + 1;
|
3923 |
+
currentItem.title = currentItem.title || ""; //use querySelector function only when developer used CSS selector
|
3924 |
+
|
3925 |
+
if (typeof currentItem.element === "string") {
|
3926 |
+
//grab the element with given selector from the page
|
3927 |
+
currentItem.element = document.querySelector(currentItem.element);
|
3928 |
+
} //intro without element
|
3929 |
+
|
3930 |
+
|
3931 |
+
if (typeof currentItem.element === "undefined" || currentItem.element === null) {
|
3932 |
+
var floatingElementQuery = document.querySelector(".introjsFloatingElement");
|
3933 |
+
|
3934 |
+
if (floatingElementQuery === null) {
|
3935 |
+
floatingElementQuery = _createElement("div", {
|
3936 |
+
className: "introjsFloatingElement"
|
3937 |
+
});
|
3938 |
+
document.body.appendChild(floatingElementQuery);
|
3939 |
+
}
|
3940 |
+
|
3941 |
+
currentItem.element = floatingElementQuery;
|
3942 |
+
currentItem.position = "floating";
|
3943 |
+
}
|
3944 |
+
|
3945 |
+
currentItem.scrollTo = currentItem.scrollTo || _this._options.scrollTo;
|
3946 |
+
|
3947 |
+
if (typeof currentItem.disableInteraction === "undefined") {
|
3948 |
+
currentItem.disableInteraction = _this._options.disableInteraction;
|
3949 |
+
}
|
3950 |
+
|
3951 |
+
if (currentItem.element !== null) {
|
3952 |
+
introItems.push(currentItem);
|
3953 |
+
}
|
3954 |
+
});
|
3955 |
+
} else {
|
3956 |
+
//use steps from data-* annotations
|
3957 |
+
var elmsLength = allIntroSteps.length;
|
3958 |
+
var disableInteraction; //if there's no element to intro
|
3959 |
+
|
3960 |
+
if (elmsLength < 1) {
|
3961 |
+
return false;
|
3962 |
+
}
|
3963 |
+
|
3964 |
+
forEach(allIntroSteps, function (currentElement) {
|
3965 |
+
// PR #80
|
3966 |
+
// start intro for groups of elements
|
3967 |
+
if (group && currentElement.getAttribute("data-intro-group") !== group) {
|
3968 |
+
return;
|
3969 |
+
} // skip hidden elements
|
3970 |
+
|
3971 |
+
|
3972 |
+
if (currentElement.style.display === "none") {
|
3973 |
+
return;
|
3974 |
+
}
|
3975 |
+
|
3976 |
+
var step = parseInt(currentElement.getAttribute("data-step"), 10);
|
3977 |
+
|
3978 |
+
if (currentElement.hasAttribute("data-disable-interaction")) {
|
3979 |
+
disableInteraction = !!currentElement.getAttribute("data-disable-interaction");
|
3980 |
+
} else {
|
3981 |
+
disableInteraction = _this._options.disableInteraction;
|
3982 |
+
}
|
3983 |
+
|
3984 |
+
if (step > 0) {
|
3985 |
+
introItems[step - 1] = {
|
3986 |
+
element: currentElement,
|
3987 |
+
title: currentElement.getAttribute("data-title") || "",
|
3988 |
+
intro: currentElement.getAttribute("data-intro"),
|
3989 |
+
step: parseInt(currentElement.getAttribute("data-step"), 10),
|
3990 |
+
tooltipClass: currentElement.getAttribute("data-tooltipclass"),
|
3991 |
+
highlightClass: currentElement.getAttribute("data-highlightclass"),
|
3992 |
+
position: currentElement.getAttribute("data-position") || _this._options.tooltipPosition,
|
3993 |
+
scrollTo: currentElement.getAttribute("data-scrollto") || _this._options.scrollTo,
|
3994 |
+
disableInteraction: disableInteraction
|
3995 |
+
};
|
3996 |
+
}
|
3997 |
+
}); //next add intro items without data-step
|
3998 |
+
//todo: we need a cleanup here, two loops are redundant
|
3999 |
+
|
4000 |
+
var _nextStep = 0;
|
4001 |
+
forEach(allIntroSteps, function (currentElement) {
|
4002 |
+
// PR #80
|
4003 |
+
// start intro for groups of elements
|
4004 |
+
if (group && currentElement.getAttribute("data-intro-group") !== group) {
|
4005 |
+
return;
|
4006 |
+
}
|
4007 |
+
|
4008 |
+
if (currentElement.getAttribute("data-step") === null) {
|
4009 |
+
while (true) {
|
4010 |
+
if (typeof introItems[_nextStep] === "undefined") {
|
4011 |
+
break;
|
4012 |
+
} else {
|
4013 |
+
_nextStep++;
|
4014 |
+
}
|
4015 |
+
}
|
4016 |
+
|
4017 |
+
if (currentElement.hasAttribute("data-disable-interaction")) {
|
4018 |
+
disableInteraction = !!currentElement.getAttribute("data-disable-interaction");
|
4019 |
+
} else {
|
4020 |
+
disableInteraction = _this._options.disableInteraction;
|
4021 |
+
}
|
4022 |
+
|
4023 |
+
introItems[_nextStep] = {
|
4024 |
+
element: currentElement,
|
4025 |
+
title: currentElement.getAttribute("data-title") || "",
|
4026 |
+
intro: currentElement.getAttribute("data-intro"),
|
4027 |
+
step: _nextStep + 1,
|
4028 |
+
tooltipClass: currentElement.getAttribute("data-tooltipclass"),
|
4029 |
+
highlightClass: currentElement.getAttribute("data-highlightclass"),
|
4030 |
+
position: currentElement.getAttribute("data-position") || _this._options.tooltipPosition,
|
4031 |
+
scrollTo: currentElement.getAttribute("data-scrollto") || _this._options.scrollTo,
|
4032 |
+
disableInteraction: disableInteraction
|
4033 |
+
};
|
4034 |
+
}
|
4035 |
+
});
|
4036 |
+
} //removing undefined/null elements
|
4037 |
+
|
4038 |
+
|
4039 |
+
var tempIntroItems = [];
|
4040 |
+
|
4041 |
+
for (var z = 0; z < introItems.length; z++) {
|
4042 |
+
if (introItems[z]) {
|
4043 |
+
// copy non-falsy values to the end of the array
|
4044 |
+
tempIntroItems.push(introItems[z]);
|
4045 |
+
}
|
4046 |
+
}
|
4047 |
+
|
4048 |
+
introItems = tempIntroItems; //Ok, sort all items with given steps
|
4049 |
+
|
4050 |
+
introItems.sort(function (a, b) {
|
4051 |
+
return a.step - b.step;
|
4052 |
+
}); //set it to the introJs object
|
4053 |
+
|
4054 |
+
this._introItems = introItems; //add overlay layer to the page
|
4055 |
+
|
4056 |
+
if (addOverlayLayer.call(this, targetElm)) {
|
4057 |
+
//then, start the show
|
4058 |
+
nextStep.call(this);
|
4059 |
+
|
4060 |
+
if (this._options.keyboardNavigation) {
|
4061 |
+
DOMEvent.on(window, "keydown", onKeyDown, this, true);
|
4062 |
+
} //for window resize
|
4063 |
+
|
4064 |
+
|
4065 |
+
DOMEvent.on(window, "resize", onResize, this, true);
|
4066 |
+
}
|
4067 |
+
|
4068 |
+
return false;
|
4069 |
+
}
|
4070 |
+
|
4071 |
+
var version$1 = "3.4.0";
|
4072 |
+
|
4073 |
+
/**
|
4074 |
+
* IntroJs main class
|
4075 |
+
*
|
4076 |
+
* @class IntroJs
|
4077 |
+
*/
|
4078 |
+
|
4079 |
+
function IntroJs(obj) {
|
4080 |
+
this._targetElement = obj;
|
4081 |
+
this._introItems = [];
|
4082 |
+
this._options = {
|
4083 |
+
/* Next button label in tooltip box */
|
4084 |
+
nextLabel: "Next",
|
4085 |
+
|
4086 |
+
/* Previous button label in tooltip box */
|
4087 |
+
prevLabel: "Back",
|
4088 |
+
|
4089 |
+
/* Skip button label in tooltip box */
|
4090 |
+
skipLabel: "×",
|
4091 |
+
|
4092 |
+
/* Done button label in tooltip box */
|
4093 |
+
doneLabel: "Done",
|
4094 |
+
|
4095 |
+
/* Hide previous button in the first step? Otherwise, it will be disabled button. */
|
4096 |
+
hidePrev: false,
|
4097 |
+
|
4098 |
+
/* Hide next button in the last step? Otherwise, it will be disabled button (note: this will also hide the "Done" button) */
|
4099 |
+
hideNext: false,
|
4100 |
+
|
4101 |
+
/* Change the Next button to Done in the last step of the intro? otherwise, it will render a disabled button */
|
4102 |
+
nextToDone: true,
|
4103 |
+
|
4104 |
+
/* Default tooltip box position */
|
4105 |
+
tooltipPosition: "bottom",
|
4106 |
+
|
4107 |
+
/* Next CSS class for tooltip boxes */
|
4108 |
+
tooltipClass: "",
|
4109 |
+
|
4110 |
+
/* CSS class that is added to the helperLayer */
|
4111 |
+
highlightClass: "",
|
4112 |
+
|
4113 |
+
/* Close introduction when pressing Escape button? */
|
4114 |
+
exitOnEsc: true,
|
4115 |
+
|
4116 |
+
/* Close introduction when clicking on overlay layer? */
|
4117 |
+
exitOnOverlayClick: true,
|
4118 |
+
|
4119 |
+
/* Show step numbers in introduction? */
|
4120 |
+
showStepNumbers: false,
|
4121 |
+
|
4122 |
+
/* Let user use keyboard to navigate the tour? */
|
4123 |
+
keyboardNavigation: true,
|
4124 |
+
|
4125 |
+
/* Show tour control buttons? */
|
4126 |
+
showButtons: true,
|
4127 |
+
|
4128 |
+
/* Show tour bullets? */
|
4129 |
+
showBullets: true,
|
4130 |
+
|
4131 |
+
/* Show tour progress? */
|
4132 |
+
showProgress: false,
|
4133 |
+
|
4134 |
+
/* Scroll to highlighted element? */
|
4135 |
+
scrollToElement: true,
|
4136 |
+
|
4137 |
+
/*
|
4138 |
+
* Should we scroll the tooltip or target element?
|
4139 |
+
*
|
4140 |
+
* Options are: 'element' or 'tooltip'
|
4141 |
+
*/
|
4142 |
+
scrollTo: "element",
|
4143 |
+
|
4144 |
+
/* Padding to add after scrolling when element is not in the viewport (in pixels) */
|
4145 |
+
scrollPadding: 30,
|
4146 |
+
|
4147 |
+
/* Set the overlay opacity */
|
4148 |
+
overlayOpacity: 0.5,
|
4149 |
+
|
4150 |
+
/* To determine the tooltip position automatically based on the window.width/height */
|
4151 |
+
autoPosition: true,
|
4152 |
+
|
4153 |
+
/* Precedence of positions, when auto is enabled */
|
4154 |
+
positionPrecedence: ["bottom", "top", "right", "left"],
|
4155 |
+
|
4156 |
+
/* Disable an interaction with element? */
|
4157 |
+
disableInteraction: false,
|
4158 |
+
|
4159 |
+
/* Set how much padding to be used around helper element */
|
4160 |
+
helperElementPadding: 10,
|
4161 |
+
|
4162 |
+
/* Default hint position */
|
4163 |
+
hintPosition: "top-middle",
|
4164 |
+
|
4165 |
+
/* Hint button label */
|
4166 |
+
hintButtonLabel: "Got it",
|
4167 |
+
|
4168 |
+
/* Adding animation to hints? */
|
4169 |
+
hintAnimation: true,
|
4170 |
+
|
4171 |
+
/* additional classes to put on the buttons */
|
4172 |
+
buttonClass: "introjs-button",
|
4173 |
+
|
4174 |
+
/* additional classes to put on progress bar */
|
4175 |
+
progressBarAdditionalClass: false
|
4176 |
+
};
|
4177 |
+
}
|
4178 |
+
|
4179 |
+
var introJs = function introJs(targetElm) {
|
4180 |
+
var instance;
|
4181 |
+
|
4182 |
+
if (_typeof(targetElm) === "object") {
|
4183 |
+
//Ok, create a new instance
|
4184 |
+
instance = new IntroJs(targetElm);
|
4185 |
+
} else if (typeof targetElm === "string") {
|
4186 |
+
//select the target element with query selector
|
4187 |
+
var targetElement = document.querySelector(targetElm);
|
4188 |
+
|
4189 |
+
if (targetElement) {
|
4190 |
+
instance = new IntroJs(targetElement);
|
4191 |
+
} else {
|
4192 |
+
throw new Error("There is no element with given selector.");
|
4193 |
+
}
|
4194 |
+
} else {
|
4195 |
+
instance = new IntroJs(document.body);
|
4196 |
+
} // add instance to list of _instances
|
4197 |
+
// passing group to stamp to increment
|
4198 |
+
// from 0 onward somewhat reliably
|
4199 |
+
|
4200 |
+
|
4201 |
+
introJs.instances[stamp(instance, "introjs-instance")] = instance;
|
4202 |
+
return instance;
|
4203 |
+
};
|
4204 |
+
/**
|
4205 |
+
* Current IntroJs version
|
4206 |
+
*
|
4207 |
+
* @property version
|
4208 |
+
* @type String
|
4209 |
+
*/
|
4210 |
+
|
4211 |
+
|
4212 |
+
introJs.version = version$1;
|
4213 |
+
/**
|
4214 |
+
* key-val object helper for introJs instances
|
4215 |
+
*
|
4216 |
+
* @property instances
|
4217 |
+
* @type Object
|
4218 |
+
*/
|
4219 |
+
|
4220 |
+
introJs.instances = {}; //Prototype
|
4221 |
+
|
4222 |
+
introJs.fn = IntroJs.prototype = {
|
4223 |
+
clone: function clone() {
|
4224 |
+
return new IntroJs(this);
|
4225 |
+
},
|
4226 |
+
setOption: function setOption(option, value) {
|
4227 |
+
this._options[option] = value;
|
4228 |
+
return this;
|
4229 |
+
},
|
4230 |
+
setOptions: function setOptions(options) {
|
4231 |
+
this._options = mergeOptions(this._options, options);
|
4232 |
+
return this;
|
4233 |
+
},
|
4234 |
+
start: function start(group) {
|
4235 |
+
introForElement.call(this, this._targetElement, group);
|
4236 |
+
return this;
|
4237 |
+
},
|
4238 |
+
goToStep: function goToStep$1(step) {
|
4239 |
+
goToStep.call(this, step);
|
4240 |
+
|
4241 |
+
return this;
|
4242 |
+
},
|
4243 |
+
addStep: function addStep(options) {
|
4244 |
+
if (!this._options.steps) {
|
4245 |
+
this._options.steps = [];
|
4246 |
+
}
|
4247 |
+
|
4248 |
+
this._options.steps.push(options);
|
4249 |
+
|
4250 |
+
return this;
|
4251 |
+
},
|
4252 |
+
addSteps: function addSteps(steps) {
|
4253 |
+
if (!steps.length) return;
|
4254 |
+
|
4255 |
+
for (var index = 0; index < steps.length; index++) {
|
4256 |
+
this.addStep(steps[index]);
|
4257 |
+
}
|
4258 |
+
|
4259 |
+
return this;
|
4260 |
+
},
|
4261 |
+
goToStepNumber: function goToStepNumber$1(step) {
|
4262 |
+
goToStepNumber.call(this, step);
|
4263 |
+
|
4264 |
+
return this;
|
4265 |
+
},
|
4266 |
+
nextStep: function nextStep$1() {
|
4267 |
+
nextStep.call(this);
|
4268 |
+
|
4269 |
+
return this;
|
4270 |
+
},
|
4271 |
+
previousStep: function previousStep$1() {
|
4272 |
+
previousStep.call(this);
|
4273 |
+
|
4274 |
+
return this;
|
4275 |
+
},
|
4276 |
+
currentStep: function currentStep$1() {
|
4277 |
+
return currentStep.call(this);
|
4278 |
+
},
|
4279 |
+
exit: function exit(force) {
|
4280 |
+
exitIntro.call(this, this._targetElement, force);
|
4281 |
+
return this;
|
4282 |
+
},
|
4283 |
+
refresh: function refresh$1() {
|
4284 |
+
refresh.call(this);
|
4285 |
+
|
4286 |
+
return this;
|
4287 |
+
},
|
4288 |
+
onbeforechange: function onbeforechange(providedCallback) {
|
4289 |
+
if (typeof providedCallback === "function") {
|
4290 |
+
this._introBeforeChangeCallback = providedCallback;
|
4291 |
+
} else {
|
4292 |
+
throw new Error("Provided callback for onbeforechange was not a function");
|
4293 |
+
}
|
4294 |
+
|
4295 |
+
return this;
|
4296 |
+
},
|
4297 |
+
onchange: function onchange(providedCallback) {
|
4298 |
+
if (typeof providedCallback === "function") {
|
4299 |
+
this._introChangeCallback = providedCallback;
|
4300 |
+
} else {
|
4301 |
+
throw new Error("Provided callback for onchange was not a function.");
|
4302 |
+
}
|
4303 |
+
|
4304 |
+
return this;
|
4305 |
+
},
|
4306 |
+
onafterchange: function onafterchange(providedCallback) {
|
4307 |
+
if (typeof providedCallback === "function") {
|
4308 |
+
this._introAfterChangeCallback = providedCallback;
|
4309 |
+
} else {
|
4310 |
+
throw new Error("Provided callback for onafterchange was not a function");
|
4311 |
+
}
|
4312 |
+
|
4313 |
+
return this;
|
4314 |
+
},
|
4315 |
+
oncomplete: function oncomplete(providedCallback) {
|
4316 |
+
if (typeof providedCallback === "function") {
|
4317 |
+
this._introCompleteCallback = providedCallback;
|
4318 |
+
} else {
|
4319 |
+
throw new Error("Provided callback for oncomplete was not a function.");
|
4320 |
+
}
|
4321 |
+
|
4322 |
+
return this;
|
4323 |
+
},
|
4324 |
+
onhintsadded: function onhintsadded(providedCallback) {
|
4325 |
+
if (typeof providedCallback === "function") {
|
4326 |
+
this._hintsAddedCallback = providedCallback;
|
4327 |
+
} else {
|
4328 |
+
throw new Error("Provided callback for onhintsadded was not a function.");
|
4329 |
+
}
|
4330 |
+
|
4331 |
+
return this;
|
4332 |
+
},
|
4333 |
+
onhintclick: function onhintclick(providedCallback) {
|
4334 |
+
if (typeof providedCallback === "function") {
|
4335 |
+
this._hintClickCallback = providedCallback;
|
4336 |
+
} else {
|
4337 |
+
throw new Error("Provided callback for onhintclick was not a function.");
|
4338 |
+
}
|
4339 |
+
|
4340 |
+
return this;
|
4341 |
+
},
|
4342 |
+
onhintclose: function onhintclose(providedCallback) {
|
4343 |
+
if (typeof providedCallback === "function") {
|
4344 |
+
this._hintCloseCallback = providedCallback;
|
4345 |
+
} else {
|
4346 |
+
throw new Error("Provided callback for onhintclose was not a function.");
|
4347 |
+
}
|
4348 |
+
|
4349 |
+
return this;
|
4350 |
+
},
|
4351 |
+
onexit: function onexit(providedCallback) {
|
4352 |
+
if (typeof providedCallback === "function") {
|
4353 |
+
this._introExitCallback = providedCallback;
|
4354 |
+
} else {
|
4355 |
+
throw new Error("Provided callback for onexit was not a function.");
|
4356 |
+
}
|
4357 |
+
|
4358 |
+
return this;
|
4359 |
+
},
|
4360 |
+
onskip: function onskip(providedCallback) {
|
4361 |
+
if (typeof providedCallback === "function") {
|
4362 |
+
this._introSkipCallback = providedCallback;
|
4363 |
+
} else {
|
4364 |
+
throw new Error("Provided callback for onskip was not a function.");
|
4365 |
+
}
|
4366 |
+
|
4367 |
+
return this;
|
4368 |
+
},
|
4369 |
+
onbeforeexit: function onbeforeexit(providedCallback) {
|
4370 |
+
if (typeof providedCallback === "function") {
|
4371 |
+
this._introBeforeExitCallback = providedCallback;
|
4372 |
+
} else {
|
4373 |
+
throw new Error("Provided callback for onbeforeexit was not a function.");
|
4374 |
+
}
|
4375 |
+
|
4376 |
+
return this;
|
4377 |
+
},
|
4378 |
+
addHints: function addHints() {
|
4379 |
+
populateHints.call(this, this._targetElement);
|
4380 |
+
return this;
|
4381 |
+
},
|
4382 |
+
hideHint: function hideHint$1(stepId) {
|
4383 |
+
hideHint.call(this, stepId);
|
4384 |
+
|
4385 |
+
return this;
|
4386 |
+
},
|
4387 |
+
hideHints: function hideHints$1() {
|
4388 |
+
hideHints.call(this);
|
4389 |
+
|
4390 |
+
return this;
|
4391 |
+
},
|
4392 |
+
showHint: function showHint$1(stepId) {
|
4393 |
+
showHint.call(this, stepId);
|
4394 |
+
|
4395 |
+
return this;
|
4396 |
+
},
|
4397 |
+
showHints: function showHints$1() {
|
4398 |
+
showHints.call(this);
|
4399 |
+
|
4400 |
+
return this;
|
4401 |
+
},
|
4402 |
+
removeHints: function removeHints$1() {
|
4403 |
+
removeHints.call(this);
|
4404 |
+
|
4405 |
+
return this;
|
4406 |
+
},
|
4407 |
+
removeHint: function removeHint$1(stepId) {
|
4408 |
+
removeHint().call(this, stepId);
|
4409 |
+
|
4410 |
+
return this;
|
4411 |
+
},
|
4412 |
+
showHintDialog: function showHintDialog$1(stepId) {
|
4413 |
+
showHintDialog.call(this, stepId);
|
4414 |
+
|
4415 |
+
return this;
|
4416 |
+
}
|
4417 |
+
};
|
4418 |
+
|
4419 |
+
return introJs;
|
4420 |
+
|
4421 |
+
})));
|
common/node_modules/intro.js/introjs-rtl.css
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.introjs-tooltipbuttons {
|
2 |
+
text-align: left; }
|
3 |
+
|
4 |
+
.introjs-skipbutton {
|
5 |
+
margin-left: 5px;
|
6 |
+
float: left; }
|
7 |
+
|
8 |
+
.introjs-tooltip-title {
|
9 |
+
float: right; }
|
10 |
+
|
11 |
+
.introjs-tooltip {
|
12 |
+
direction: rtl; }
|
13 |
+
|
14 |
+
.introjs-prevbutton {
|
15 |
+
border: 1px solid #d4d4d4;
|
16 |
+
float: right; }
|
17 |
+
|
18 |
+
.introjs-nextbutton {
|
19 |
+
border: 1px solid #d4d4d4;
|
20 |
+
float: left; }
|
21 |
+
|
22 |
+
.introjs-bullets ul li {
|
23 |
+
float: right; }
|
common/node_modules/intro.js/introjs.css
ADDED
@@ -0,0 +1,436 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Buttons style by http://nicolasgallagher.com/lab/css3-github-buttons/
|
3 |
+
Changed by Afshin Mehrabani
|
4 |
+
*/
|
5 |
+
/* overrides extra padding on button elements in Firefox */
|
6 |
+
@-webkit-keyframes introjspulse {
|
7 |
+
0% {
|
8 |
+
-webkit-transform: scale(0);
|
9 |
+
transform: scale(0);
|
10 |
+
opacity: 0; }
|
11 |
+
25% {
|
12 |
+
-webkit-transform: scale(0);
|
13 |
+
transform: scale(0);
|
14 |
+
opacity: 0.1; }
|
15 |
+
50% {
|
16 |
+
-webkit-transform: scale(0.1);
|
17 |
+
transform: scale(0.1);
|
18 |
+
opacity: 0.3; }
|
19 |
+
75% {
|
20 |
+
-webkit-transform: scale(0.5);
|
21 |
+
transform: scale(0.5);
|
22 |
+
opacity: 0.5; }
|
23 |
+
100% {
|
24 |
+
-webkit-transform: scale(1);
|
25 |
+
transform: scale(1);
|
26 |
+
opacity: 0; } }
|
27 |
+
@keyframes introjspulse {
|
28 |
+
0% {
|
29 |
+
-webkit-transform: scale(0);
|
30 |
+
transform: scale(0);
|
31 |
+
opacity: 0; }
|
32 |
+
25% {
|
33 |
+
-webkit-transform: scale(0);
|
34 |
+
transform: scale(0);
|
35 |
+
opacity: 0.1; }
|
36 |
+
50% {
|
37 |
+
-webkit-transform: scale(0.1);
|
38 |
+
transform: scale(0.1);
|
39 |
+
opacity: 0.3; }
|
40 |
+
75% {
|
41 |
+
-webkit-transform: scale(0.5);
|
42 |
+
transform: scale(0.5);
|
43 |
+
opacity: 0.5; }
|
44 |
+
100% {
|
45 |
+
-webkit-transform: scale(1);
|
46 |
+
transform: scale(1);
|
47 |
+
opacity: 0; } }
|
48 |
+
|
49 |
+
.introjs-overlay {
|
50 |
+
position: absolute;
|
51 |
+
-webkit-box-sizing: content-box;
|
52 |
+
box-sizing: content-box;
|
53 |
+
z-index: 999999;
|
54 |
+
opacity: 0;
|
55 |
+
-webkit-transition: all 0.3s ease-out;
|
56 |
+
-o-transition: all 0.3s ease-out;
|
57 |
+
transition: all 0.3s ease-out; }
|
58 |
+
|
59 |
+
.introjs-showElement {
|
60 |
+
z-index: 9999999 !important; }
|
61 |
+
|
62 |
+
tr.introjs-showElement > td {
|
63 |
+
z-index: 9999999 !important;
|
64 |
+
position: relative; }
|
65 |
+
|
66 |
+
tr.introjs-showElement > th {
|
67 |
+
z-index: 9999999 !important;
|
68 |
+
position: relative; }
|
69 |
+
|
70 |
+
.introjs-disableInteraction {
|
71 |
+
z-index: 99999999 !important;
|
72 |
+
position: absolute;
|
73 |
+
background-color: #ffffff;
|
74 |
+
opacity: 0;
|
75 |
+
filter: alpha(opacity=0); }
|
76 |
+
|
77 |
+
.introjs-relativePosition {
|
78 |
+
position: relative; }
|
79 |
+
|
80 |
+
.introjs-helperLayer {
|
81 |
+
-webkit-box-sizing: content-box;
|
82 |
+
box-sizing: content-box;
|
83 |
+
position: absolute;
|
84 |
+
z-index: 9999998;
|
85 |
+
border-radius: 4px;
|
86 |
+
-webkit-transition: all 0.3s ease-out;
|
87 |
+
-o-transition: all 0.3s ease-out;
|
88 |
+
transition: all 0.3s ease-out; }
|
89 |
+
.introjs-helperLayer * {
|
90 |
+
-webkit-box-sizing: content-box;
|
91 |
+
box-sizing: content-box; }
|
92 |
+
.introjs-helperLayer *:before {
|
93 |
+
-webkit-box-sizing: content-box;
|
94 |
+
box-sizing: content-box; }
|
95 |
+
.introjs-helperLayer *:after {
|
96 |
+
-webkit-box-sizing: content-box;
|
97 |
+
box-sizing: content-box; }
|
98 |
+
|
99 |
+
.introjs-tooltipReferenceLayer {
|
100 |
+
font-family: "Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif;
|
101 |
+
-webkit-box-sizing: content-box;
|
102 |
+
box-sizing: content-box;
|
103 |
+
position: absolute;
|
104 |
+
visibility: hidden;
|
105 |
+
z-index: 100000000;
|
106 |
+
background-color: transparent;
|
107 |
+
-webkit-transition: all 0.3s ease-out;
|
108 |
+
-o-transition: all 0.3s ease-out;
|
109 |
+
transition: all 0.3s ease-out; }
|
110 |
+
.introjs-tooltipReferenceLayer * {
|
111 |
+
font-family: "Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif; }
|
112 |
+
|
113 |
+
.introjs-helperNumberLayer {
|
114 |
+
font-family: "Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif;
|
115 |
+
color: #9e9e9e;
|
116 |
+
text-align: center;
|
117 |
+
padding-top: 10px;
|
118 |
+
padding-bottom: 10px; }
|
119 |
+
|
120 |
+
.introjs-arrow {
|
121 |
+
border: 5px solid transparent;
|
122 |
+
content: "";
|
123 |
+
position: absolute; }
|
124 |
+
|
125 |
+
.introjs-arrow.top {
|
126 |
+
top: -10px;
|
127 |
+
left: 10px;
|
128 |
+
border-bottom-color: #ffffff; }
|
129 |
+
|
130 |
+
.introjs-arrow.top-right {
|
131 |
+
top: -10px;
|
132 |
+
right: 10px;
|
133 |
+
border-bottom-color: #ffffff; }
|
134 |
+
|
135 |
+
.introjs-arrow.top-middle {
|
136 |
+
top: -10px;
|
137 |
+
left: 50%;
|
138 |
+
margin-left: -5px;
|
139 |
+
border-bottom-color: #ffffff; }
|
140 |
+
|
141 |
+
.introjs-arrow.right {
|
142 |
+
right: -10px;
|
143 |
+
top: 10px;
|
144 |
+
border-left-color: #ffffff; }
|
145 |
+
|
146 |
+
.introjs-arrow.right-bottom {
|
147 |
+
bottom: 10px;
|
148 |
+
right: -10px;
|
149 |
+
border-left-color: #ffffff; }
|
150 |
+
|
151 |
+
.introjs-arrow.bottom {
|
152 |
+
bottom: -10px;
|
153 |
+
left: 10px;
|
154 |
+
border-top-color: #ffffff; }
|
155 |
+
|
156 |
+
.introjs-arrow.bottom-right {
|
157 |
+
bottom: -10px;
|
158 |
+
right: 10px;
|
159 |
+
border-top-color: #ffffff; }
|
160 |
+
|
161 |
+
.introjs-arrow.bottom-middle {
|
162 |
+
bottom: -10px;
|
163 |
+
left: 50%;
|
164 |
+
margin-left: -5px;
|
165 |
+
border-top-color: #ffffff; }
|
166 |
+
|
167 |
+
.introjs-arrow.left {
|
168 |
+
left: -10px;
|
169 |
+
top: 10px;
|
170 |
+
border-right-color: #ffffff; }
|
171 |
+
|
172 |
+
.introjs-arrow.left-bottom {
|
173 |
+
left: -10px;
|
174 |
+
bottom: 10px;
|
175 |
+
border-right-color: #ffffff; }
|
176 |
+
|
177 |
+
.introjs-tooltip {
|
178 |
+
-webkit-box-sizing: content-box;
|
179 |
+
box-sizing: content-box;
|
180 |
+
position: absolute;
|
181 |
+
visibility: visible;
|
182 |
+
background-color: #ffffff;
|
183 |
+
min-width: 250px;
|
184 |
+
max-width: 300px;
|
185 |
+
border-radius: 5px;
|
186 |
+
-webkit-box-shadow: 0 3px 30px rgba(33, 33, 33, 0.3);
|
187 |
+
box-shadow: 0 3px 30px rgba(33, 33, 33, 0.3);
|
188 |
+
-webkit-transition: opacity 0.1s ease-out;
|
189 |
+
-o-transition: opacity 0.1s ease-out;
|
190 |
+
transition: opacity 0.1s ease-out; }
|
191 |
+
|
192 |
+
.introjs-tooltiptext {
|
193 |
+
padding: 20px; }
|
194 |
+
|
195 |
+
.introjs-tooltip-title {
|
196 |
+
font-size: 18px;
|
197 |
+
margin: 0;
|
198 |
+
padding: 0;
|
199 |
+
font-weight: 700;
|
200 |
+
float: left;
|
201 |
+
line-height: 32px; }
|
202 |
+
|
203 |
+
.introjs-tooltip-header {
|
204 |
+
padding-left: 20px;
|
205 |
+
padding-right: 20px;
|
206 |
+
padding-top: 10px; }
|
207 |
+
.introjs-tooltip-header:after {
|
208 |
+
content: ".";
|
209 |
+
visibility: hidden;
|
210 |
+
display: block;
|
211 |
+
height: 0;
|
212 |
+
clear: both; }
|
213 |
+
|
214 |
+
.introjs-tooltipbuttons {
|
215 |
+
border-top: 1px solid #e0e0e0;
|
216 |
+
padding: 10px;
|
217 |
+
text-align: right;
|
218 |
+
white-space: nowrap; }
|
219 |
+
.introjs-tooltipbuttons:after {
|
220 |
+
content: "";
|
221 |
+
visibility: hidden;
|
222 |
+
display: block;
|
223 |
+
height: 0;
|
224 |
+
clear: both; }
|
225 |
+
|
226 |
+
.introjs-button {
|
227 |
+
-webkit-box-sizing: content-box;
|
228 |
+
box-sizing: content-box;
|
229 |
+
position: relative;
|
230 |
+
overflow: visible;
|
231 |
+
display: inline-block;
|
232 |
+
padding: 0.5rem 1rem;
|
233 |
+
border: 1px solid #bdbdbd;
|
234 |
+
text-decoration: none;
|
235 |
+
text-shadow: 1px 1px 0 #ffffff;
|
236 |
+
font-size: 14px;
|
237 |
+
color: #424242;
|
238 |
+
white-space: nowrap;
|
239 |
+
cursor: pointer;
|
240 |
+
outline: none;
|
241 |
+
background-color: #f4f4f4;
|
242 |
+
border-radius: 0.2em;
|
243 |
+
zoom: 1;
|
244 |
+
*display: inline; }
|
245 |
+
.introjs-button:hover {
|
246 |
+
outline: none;
|
247 |
+
text-decoration: none;
|
248 |
+
border-color: #9e9e9e;
|
249 |
+
background-color: #e0e0e0;
|
250 |
+
color: #212121; }
|
251 |
+
.introjs-button:focus {
|
252 |
+
outline: none;
|
253 |
+
text-decoration: none;
|
254 |
+
background-color: #eeeeee;
|
255 |
+
-webkit-box-shadow: 0 0 0 0.2rem rgba(158, 158, 158, 0.5);
|
256 |
+
box-shadow: 0 0 0 0.2rem rgba(158, 158, 158, 0.5);
|
257 |
+
border: 1px solid #616161;
|
258 |
+
color: #212121; }
|
259 |
+
.introjs-button:active {
|
260 |
+
outline: none;
|
261 |
+
text-decoration: none;
|
262 |
+
background-color: #e0e0e0;
|
263 |
+
border-color: #9e9e9e;
|
264 |
+
color: #212121; }
|
265 |
+
.introjs-button::-moz-focus-inner {
|
266 |
+
padding: 0;
|
267 |
+
border: 0; }
|
268 |
+
|
269 |
+
.introjs-skipbutton {
|
270 |
+
-webkit-box-sizing: content-box;
|
271 |
+
box-sizing: content-box;
|
272 |
+
color: #616161;
|
273 |
+
float: right;
|
274 |
+
font-size: 20px;
|
275 |
+
cursor: pointer;
|
276 |
+
font-weight: bold;
|
277 |
+
line-height: 1;
|
278 |
+
text-align: center;
|
279 |
+
padding: 7px 10px; }
|
280 |
+
.introjs-skipbutton:hover, .introjs-skipbutton:focus {
|
281 |
+
color: #212121;
|
282 |
+
outline: none;
|
283 |
+
text-decoration: none; }
|
284 |
+
|
285 |
+
.introjs-prevbutton {
|
286 |
+
float: left; }
|
287 |
+
|
288 |
+
.introjs-nextbutton {
|
289 |
+
float: right; }
|
290 |
+
|
291 |
+
.introjs-disabled {
|
292 |
+
color: #9e9e9e;
|
293 |
+
border-color: #bdbdbd;
|
294 |
+
-webkit-box-shadow: none;
|
295 |
+
box-shadow: none;
|
296 |
+
cursor: default;
|
297 |
+
background-color: #f4f4f4;
|
298 |
+
background-image: none;
|
299 |
+
text-decoration: none; }
|
300 |
+
.introjs-disabled:hover, .introjs-disabled:focus {
|
301 |
+
color: #9e9e9e;
|
302 |
+
border-color: #bdbdbd;
|
303 |
+
-webkit-box-shadow: none;
|
304 |
+
box-shadow: none;
|
305 |
+
cursor: default;
|
306 |
+
background-color: #f4f4f4;
|
307 |
+
background-image: none;
|
308 |
+
text-decoration: none; }
|
309 |
+
|
310 |
+
.introjs-hidden {
|
311 |
+
display: none; }
|
312 |
+
|
313 |
+
.introjs-bullets {
|
314 |
+
text-align: center;
|
315 |
+
padding-top: 10px;
|
316 |
+
padding-bottom: 10px; }
|
317 |
+
.introjs-bullets ul {
|
318 |
+
-webkit-box-sizing: content-box;
|
319 |
+
box-sizing: content-box;
|
320 |
+
clear: both;
|
321 |
+
margin: 0 auto 0;
|
322 |
+
padding: 0;
|
323 |
+
display: inline-block; }
|
324 |
+
.introjs-bullets ul li {
|
325 |
+
-webkit-box-sizing: content-box;
|
326 |
+
box-sizing: content-box;
|
327 |
+
list-style: none;
|
328 |
+
float: left;
|
329 |
+
margin: 0 2px; }
|
330 |
+
.introjs-bullets ul li a {
|
331 |
+
-webkit-transition: width 0.1s ease-in;
|
332 |
+
-o-transition: width 0.1s ease-in;
|
333 |
+
transition: width 0.1s ease-in;
|
334 |
+
-webkit-box-sizing: content-box;
|
335 |
+
box-sizing: content-box;
|
336 |
+
display: block;
|
337 |
+
width: 6px;
|
338 |
+
height: 6px;
|
339 |
+
background: #ccc;
|
340 |
+
border-radius: 10px;
|
341 |
+
text-decoration: none;
|
342 |
+
cursor: pointer; }
|
343 |
+
.introjs-bullets ul li a:hover, .introjs-bullets ul li a:focus {
|
344 |
+
width: 15px;
|
345 |
+
background: #999;
|
346 |
+
text-decoration: none;
|
347 |
+
outline: none; }
|
348 |
+
.introjs-bullets ul li a.active {
|
349 |
+
width: 15px;
|
350 |
+
background: #999; }
|
351 |
+
|
352 |
+
.introjs-progress {
|
353 |
+
-webkit-box-sizing: content-box;
|
354 |
+
box-sizing: content-box;
|
355 |
+
overflow: hidden;
|
356 |
+
height: 10px;
|
357 |
+
margin: 10px;
|
358 |
+
border-radius: 4px;
|
359 |
+
background-color: #e0e0e0; }
|
360 |
+
|
361 |
+
.introjs-progressbar {
|
362 |
+
-webkit-box-sizing: content-box;
|
363 |
+
box-sizing: content-box;
|
364 |
+
float: left;
|
365 |
+
width: 0%;
|
366 |
+
height: 100%;
|
367 |
+
font-size: 10px;
|
368 |
+
line-height: 10px;
|
369 |
+
text-align: center;
|
370 |
+
background-color: #08c; }
|
371 |
+
|
372 |
+
.introjsFloatingElement {
|
373 |
+
position: absolute;
|
374 |
+
height: 0;
|
375 |
+
width: 0;
|
376 |
+
left: 50%;
|
377 |
+
top: 50%; }
|
378 |
+
|
379 |
+
.introjs-fixedTooltip {
|
380 |
+
position: fixed; }
|
381 |
+
|
382 |
+
.introjs-hint {
|
383 |
+
-webkit-box-sizing: content-box;
|
384 |
+
box-sizing: content-box;
|
385 |
+
position: absolute;
|
386 |
+
background: transparent;
|
387 |
+
width: 20px;
|
388 |
+
height: 15px;
|
389 |
+
cursor: pointer; }
|
390 |
+
.introjs-hint:focus {
|
391 |
+
border: 0;
|
392 |
+
outline: 0; }
|
393 |
+
.introjs-hint:hover > .introjs-hint-pulse {
|
394 |
+
border: 5px solid rgba(60, 60, 60, 0.57); }
|
395 |
+
|
396 |
+
.introjs-hidehint {
|
397 |
+
display: none; }
|
398 |
+
|
399 |
+
.introjs-fixedhint {
|
400 |
+
position: fixed; }
|
401 |
+
|
402 |
+
.introjs-hint-pulse {
|
403 |
+
-webkit-box-sizing: content-box;
|
404 |
+
box-sizing: content-box;
|
405 |
+
width: 10px;
|
406 |
+
height: 10px;
|
407 |
+
border: 5px solid rgba(60, 60, 60, 0.27);
|
408 |
+
border-radius: 30px;
|
409 |
+
background-color: rgba(136, 136, 136, 0.24);
|
410 |
+
z-index: 10;
|
411 |
+
position: absolute;
|
412 |
+
-webkit-transition: all 0.2s ease-out;
|
413 |
+
-o-transition: all 0.2s ease-out;
|
414 |
+
transition: all 0.2s ease-out; }
|
415 |
+
|
416 |
+
.introjs-hint-no-anim .introjs-hint-dot {
|
417 |
+
-webkit-animation: none;
|
418 |
+
animation: none; }
|
419 |
+
|
420 |
+
.introjs-hint-dot {
|
421 |
+
-webkit-box-sizing: content-box;
|
422 |
+
box-sizing: content-box;
|
423 |
+
border: 10px solid rgba(146, 146, 146, 0.36);
|
424 |
+
background: transparent;
|
425 |
+
border-radius: 60px;
|
426 |
+
height: 50px;
|
427 |
+
width: 50px;
|
428 |
+
-webkit-animation: introjspulse 3s ease-out;
|
429 |
+
animation: introjspulse 3s ease-out;
|
430 |
+
-webkit-animation-iteration-count: infinite;
|
431 |
+
animation-iteration-count: infinite;
|
432 |
+
position: absolute;
|
433 |
+
top: -25px;
|
434 |
+
left: -25px;
|
435 |
+
z-index: 1;
|
436 |
+
opacity: 0; }
|
common/src/Tribe/Admin/Help_Page.php
CHANGED
@@ -52,10 +52,13 @@ class Tribe__Admin__Help_Page {
|
|
52 |
'localize' => [
|
53 |
'name' => 'tribe_system_info',
|
54 |
'data' => [
|
55 |
-
'sysinfo_optin_nonce'
|
56 |
-
'clipboard_btn_text'
|
57 |
-
'clipboard_copied_text'
|
58 |
-
'clipboard_fail_text'
|
|
|
|
|
|
|
59 |
],
|
60 |
],
|
61 |
]
|
@@ -1147,4 +1150,4 @@ class Tribe__Admin__Help_Page {
|
|
1147 |
|
1148 |
return $community_products;
|
1149 |
}
|
1150 |
-
}
|
52 |
'localize' => [
|
53 |
'name' => 'tribe_system_info',
|
54 |
'data' => [
|
55 |
+
'sysinfo_optin_nonce' => wp_create_nonce( 'sysinfo_optin_nonce' ),
|
56 |
+
'clipboard_btn_text' => _x( 'Copy to clipboard', 'Copy to clipboard button text.', 'tribe-common' ),
|
57 |
+
'clipboard_copied_text' => _x( 'System info copied', 'Copy to clipboard success message', 'tribe-common' ),
|
58 |
+
'clipboard_fail_text' => _x( 'Press "Cmd + C" to copy', 'Copy to clipboard instructions', 'tribe-common' ),
|
59 |
+
'sysinfo_error_message_text' => _x( 'Something has gone wrong!', 'Default error message for system info optin', 'tribe-common' ),
|
60 |
+
'sysinfo_error_code_text' => _x( 'Code:', 'Error code label for system info optin', 'tribe-common'),
|
61 |
+
'sysinfo_error_status_text' => _x( 'Status:', 'Error status label for system info optin', 'tribe-common'),
|
62 |
],
|
63 |
],
|
64 |
]
|
1150 |
|
1151 |
return $community_products;
|
1152 |
}
|
1153 |
+
}
|
common/src/Tribe/Ajax/Dropdown.php
CHANGED
@@ -88,6 +88,10 @@ class Tribe__Ajax__Dropdown {
|
|
88 |
}
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
91 |
$data['results'] = $results;
|
92 |
$data['taxonomies'] = get_taxonomies();
|
93 |
|
88 |
}
|
89 |
}
|
90 |
|
91 |
+
foreach ( $results as $result ) {
|
92 |
+
$result->text = wp_specialchars_decode( wp_kses( $result->text, [] ) );
|
93 |
+
}
|
94 |
+
|
95 |
$data['results'] = $results;
|
96 |
$data['taxonomies'] = get_taxonomies();
|
97 |
|
common/src/Tribe/Main.php
CHANGED
@@ -20,7 +20,7 @@ class Tribe__Main {
|
|
20 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
21 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
22 |
|
23 |
-
const VERSION = '4.14.
|
24 |
|
25 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
26 |
|
@@ -654,6 +654,7 @@ class Tribe__Main {
|
|
654 |
tribe_register_provider( Tribe\Log\Service_Provider::class );
|
655 |
tribe_register_provider( Tribe\Service_Providers\Crons::class );
|
656 |
tribe_register_provider( Tribe\Service_Providers\Widgets::class );
|
|
|
657 |
tribe_register_provider( Tribe\Admin\Notice\Service_Provider::class );
|
658 |
}
|
659 |
|
20 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
21 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
22 |
|
23 |
+
const VERSION = '4.14.5';
|
24 |
|
25 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
26 |
|
654 |
tribe_register_provider( Tribe\Log\Service_Provider::class );
|
655 |
tribe_register_provider( Tribe\Service_Providers\Crons::class );
|
656 |
tribe_register_provider( Tribe\Service_Providers\Widgets::class );
|
657 |
+
tribe_register_provider( Tribe\Service_Providers\Onboarding::class );
|
658 |
tribe_register_provider( Tribe\Admin\Notice\Service_Provider::class );
|
659 |
}
|
660 |
|
common/src/Tribe/Onboarding/Hints_Abstract.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Tribe\Onboarding;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class Hints Abstract.
|
6 |
+
*
|
7 |
+
* @since TBD
|
8 |
+
*/
|
9 |
+
abstract class Hints_Abstract {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* The hints ID.
|
13 |
+
*
|
14 |
+
* @since TBD
|
15 |
+
*
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
public $hints_id;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Times to display the hints.
|
22 |
+
*
|
23 |
+
* @since TBD
|
24 |
+
*
|
25 |
+
* @var int
|
26 |
+
*/
|
27 |
+
public $times_to_display;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Return if it's on page where it should be displayed.
|
31 |
+
*
|
32 |
+
* @since TBD
|
33 |
+
*
|
34 |
+
* @return bool True if it is on page.
|
35 |
+
*/
|
36 |
+
public function is_on_page() {
|
37 |
+
return false;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Should the hints display.
|
42 |
+
*
|
43 |
+
* @since TBD
|
44 |
+
*
|
45 |
+
* @return boolean True if it should display.
|
46 |
+
*/
|
47 |
+
public function should_display() {
|
48 |
+
// Bail if it's not on the page we want to display.
|
49 |
+
if ( ! $this->is_on_page() ) {
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
|
53 |
+
// Bail if the `Times to display` is set and it was reached.
|
54 |
+
if (
|
55 |
+
is_numeric( $this->times_to_display )
|
56 |
+
&& ( tribe( 'onboarding' )->get_views( $this->hints_id ) > $this->times_to_display )
|
57 |
+
) {
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
|
61 |
+
return true;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Return the hints data.
|
66 |
+
*
|
67 |
+
* @since TBD
|
68 |
+
*
|
69 |
+
* @return array The hints.
|
70 |
+
*/
|
71 |
+
abstract function hints();
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Return the CSS classes.
|
75 |
+
*
|
76 |
+
* @since TBD
|
77 |
+
*
|
78 |
+
* @return array The CSS classes.
|
79 |
+
*/
|
80 |
+
public function css_classes() {
|
81 |
+
return [];
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* The hints data, publicly accessible.
|
86 |
+
*
|
87 |
+
* @since TBD.
|
88 |
+
*
|
89 |
+
* @param array $data An array with the hints data.
|
90 |
+
* @return array
|
91 |
+
*/
|
92 |
+
public function hints_data( array $data = [] ) {
|
93 |
+
$data['hints'] = $this->hints();
|
94 |
+
$data['classes'] = $this->css_classes();
|
95 |
+
|
96 |
+
return $data;
|
97 |
+
}
|
98 |
+
}
|
common/src/Tribe/Onboarding/Main.php
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Tribe\Onboarding;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class
|
6 |
+
*
|
7 |
+
* @since TBD
|
8 |
+
*/
|
9 |
+
class Main {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Get the tour steps.
|
13 |
+
*
|
14 |
+
* @since TBD
|
15 |
+
*
|
16 |
+
* @return array $steps The tour data.
|
17 |
+
*/
|
18 |
+
private function tour_data() {
|
19 |
+
$data = [];
|
20 |
+
$registered_tours = $this->get_registered_tours();
|
21 |
+
|
22 |
+
// Try to populate, if it should display.
|
23 |
+
foreach ( $registered_tours as $tour => $class_name ) {
|
24 |
+
$tour_class = new $class_name();
|
25 |
+
|
26 |
+
if ( $tour_class->should_display() ) {
|
27 |
+
// Increment the views when the tour is displayed.
|
28 |
+
$this->increment_views( $tour_class->tour_id );
|
29 |
+
$data = $tour_class->tour_data( $data );
|
30 |
+
|
31 |
+
/**
|
32 |
+
* We're displaying the tour.
|
33 |
+
*
|
34 |
+
* @since TBD.
|
35 |
+
*
|
36 |
+
* @param string $tour_id The tour id.
|
37 |
+
*/
|
38 |
+
do_action( 'tribe_onboarding_tour_display', $tour_class->tour_id );
|
39 |
+
|
40 |
+
break;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Filter the data we're using to localize the tour steps.
|
46 |
+
*
|
47 |
+
* Since TBD
|
48 |
+
*
|
49 |
+
* @param array $data An array with the tour data.
|
50 |
+
*
|
51 |
+
* @return array $data An array with the tour data.
|
52 |
+
*/
|
53 |
+
$data = apply_filters( 'tribe_onboarding_tour_data', $data );
|
54 |
+
|
55 |
+
return $data;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Get the hints.
|
60 |
+
*
|
61 |
+
* @since TBD
|
62 |
+
*
|
63 |
+
* @return array $steps The hints data.
|
64 |
+
*/
|
65 |
+
private function hints_data() {
|
66 |
+
$data = [];
|
67 |
+
$registered_hints = $this->get_registered_hints();
|
68 |
+
|
69 |
+
// Try to populate, and check if it should display.
|
70 |
+
foreach ( $registered_hints as $hints => $class_name ) {
|
71 |
+
$hints_class = new $class_name();
|
72 |
+
|
73 |
+
if ( $hints_class->should_display() ) {
|
74 |
+
// Increment the views when the tour is displayed.
|
75 |
+
$this->increment_views( $hints_class->tour_id );
|
76 |
+
$data = $hints_class->hints_data( $data );
|
77 |
+
|
78 |
+
/**
|
79 |
+
* We're displaying the hints.
|
80 |
+
*
|
81 |
+
* @since TBD.
|
82 |
+
*
|
83 |
+
* @param string $hints_id The hints id.
|
84 |
+
*/
|
85 |
+
do_action( 'tribe_onboarding_hints_display', $hints_class->hints_id );
|
86 |
+
|
87 |
+
break;
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Filter the data we're using to localize the hints.
|
93 |
+
*
|
94 |
+
* Since TBD
|
95 |
+
*
|
96 |
+
* @param array $data An array with the hints data.
|
97 |
+
*
|
98 |
+
* @return array $data An array with the hints data.
|
99 |
+
*/
|
100 |
+
$data = apply_filters( 'tribe_onboarding_hints_data', $data );
|
101 |
+
|
102 |
+
return $data;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Localize tour data.
|
107 |
+
*
|
108 |
+
* @since TBD
|
109 |
+
*
|
110 |
+
* @param string $hook The current admin page.
|
111 |
+
*/
|
112 |
+
public function localize_tour( $hook ) {
|
113 |
+
$data = $this->tour_data();
|
114 |
+
|
115 |
+
wp_localize_script( 'tribe-onboarding-js', 'TribeOnboardingTour', $data );
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Localize hints data.
|
120 |
+
*
|
121 |
+
* @since TBD
|
122 |
+
*
|
123 |
+
* @param string $hook The current admin page.
|
124 |
+
*/
|
125 |
+
public function localize_hints( $hook ) {
|
126 |
+
$data = $this->hints_data();
|
127 |
+
|
128 |
+
wp_localize_script( 'tribe-onboarding-js', 'TribeOnboardingHints', $data );
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Get the views for an onboarding element.
|
133 |
+
*
|
134 |
+
* @since TBD
|
135 |
+
*
|
136 |
+
* @param string $id The onboarding ID (tour or hint).
|
137 |
+
*
|
138 |
+
* @return mixed The views for the given ID.
|
139 |
+
*/
|
140 |
+
public function get_views( $id = '' ) {
|
141 |
+
|
142 |
+
if ( empty( $id ) ) {
|
143 |
+
return;
|
144 |
+
}
|
145 |
+
|
146 |
+
$option = tribe_get_option( 'tribe_onboarding_views', [] );
|
147 |
+
|
148 |
+
if ( ! isset( $option[ $id ] ) ) {
|
149 |
+
return;
|
150 |
+
}
|
151 |
+
|
152 |
+
return intval( $option[ $id ] );
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Increment views for an onboarding element.
|
157 |
+
*
|
158 |
+
* @since TBD
|
159 |
+
*
|
160 |
+
* @param string $id The onboarding ID (tour or hint).
|
161 |
+
* @return int The views count for the particular `$id`.
|
162 |
+
*/
|
163 |
+
public function increment_views( $id ) {
|
164 |
+
$option = tribe_get_option( 'tribe_onboarding_views', [] );
|
165 |
+
$views = 0;
|
166 |
+
|
167 |
+
if ( isset( $option[ $id ] ) ) {
|
168 |
+
$views = intval( $option[ $id ] );
|
169 |
+
}
|
170 |
+
|
171 |
+
// Increment views and save.
|
172 |
+
$views++;
|
173 |
+
$option[ $id ] = $views;
|
174 |
+
|
175 |
+
tribe_update_option( 'tribe_onboarding_views', $option );
|
176 |
+
|
177 |
+
return $views;
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Get the list of tours available for handling.
|
182 |
+
*
|
183 |
+
* @since TBD
|
184 |
+
*
|
185 |
+
* @return array An associative array of shortcodes in the shape `[ <slug> => <class> ]`
|
186 |
+
*/
|
187 |
+
public function get_registered_tours() {
|
188 |
+
$tours = [];
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Allow the registering of tours into our plugins.
|
192 |
+
*
|
193 |
+
* @since TBD
|
194 |
+
*
|
195 |
+
* @var array An associative array of tours in the shape `[ <id> => <class> ]`.
|
196 |
+
*/
|
197 |
+
$tours = apply_filters( 'tribe_onboarding_tours', $tours );
|
198 |
+
|
199 |
+
return $tours;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Get the list of hints available for handling.
|
204 |
+
*
|
205 |
+
* @since TBD
|
206 |
+
*
|
207 |
+
* @return array An associative array of hints in the shape `[ <id> => <class> ]`
|
208 |
+
*/
|
209 |
+
public function get_registered_hints() {
|
210 |
+
$hints = [];
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Allow the registering of tours into our plugins.
|
214 |
+
*
|
215 |
+
* @since TBD
|
216 |
+
*
|
217 |
+
* @var array An associative array of hints in the shape `[ <id> => <class> ]`.
|
218 |
+
*/
|
219 |
+
$tours = apply_filters( 'tribe_onboarding_hints', $hints );
|
220 |
+
|
221 |
+
return $hints;
|
222 |
+
}
|
223 |
+
}
|
common/src/Tribe/Onboarding/README.md
ADDED
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Onboarding
|
2 |
+
|
3 |
+
Onboarding consists of two components. Tours & Hints. The idea of this components is to enhance the onboarding experience and add some contextual help for elements.
|
4 |
+
|
5 |
+
These components work as a wrapper of [IntroJS](https://introjs.com/).
|
6 |
+
|
7 |
+
If for any reason you want to disable the Onboarding library, you can use the following filter:
|
8 |
+
|
9 |
+
`add_filter( 'tribe_onboarding_disable, '__return_true' );`
|
10 |
+
|
11 |
+
## Tours
|
12 |
+
|
13 |
+
**Tours** provides an easy way to onboard users on a step by step basis. The information is provided to the user on a modal.
|
14 |
+
|
15 |
+
Users can navigate through the different steps and close the modal at any time by clicking outside of it.
|
16 |
+
|
17 |
+
Setting up tours is fairly simple. It all comes down to hooking onto `tribe_onboarding_tour_data`.
|
18 |
+
|
19 |
+
The information to be sent there is an array in the following format:
|
20 |
+
|
21 |
+
```
|
22 |
+
$tour_data = [
|
23 |
+
'steps' = [], // An array of the steps you'd like for the tour.
|
24 |
+
'classes' = [], // An array of CSS classes to apply to the modal. (Optional)
|
25 |
+
];
|
26 |
+
```
|
27 |
+
|
28 |
+
The format of each step can contain the following:
|
29 |
+
|
30 |
+
```
|
31 |
+
$step = [
|
32 |
+
'title' => __( 'Welcome to this screen' ), // The step title.
|
33 |
+
'intro' => __( 'This is the description of the "Welcome to this screen" message.' );
|
34 |
+
'element' => '#my-html-id', // If you want to highlight a certain part of the HTML for this step. If not defined, it'll show just the modal with the information. (Optional)
|
35 |
+
];
|
36 |
+
```
|
37 |
+
|
38 |
+
So for example, if you want to add a simple welcome tour for a settings panel you could add the following.
|
39 |
+
|
40 |
+
```
|
41 |
+
add_filter( 'tribe_onboarding_tour_data', 'my_fancy_tour' );
|
42 |
+
|
43 |
+
function my_fancy_tour( $data ) {
|
44 |
+
|
45 |
+
// Here you can do some checks to see if you're in the page you want to show to tour.
|
46 |
+
|
47 |
+
$steps = [
|
48 |
+
[
|
49 |
+
'title' => __( '🤘 Welcome to the settings panel' ),
|
50 |
+
'intro' => __( 'It is actually great that you are using our plugins! From this settings panel you should be able to access all the settings to configure your site.' ),
|
51 |
+
],
|
52 |
+
[
|
53 |
+
'title' => __( '⚙️ Different sections' ),
|
54 |
+
'element' => '#tribe-settings-tabs',
|
55 |
+
'intro' => __( 'On this section you can access all of the different settings of our plugins, if you have questions about which settings we have you can go to <a href="#whatever">our knowledgebase article</a>' ),
|
56 |
+
],
|
57 |
+
[
|
58 |
+
'title' => __( '🛠️ Change the settings' ),
|
59 |
+
'element' => '#tribe-field-postsPerPage',
|
60 |
+
'intro' => __( 'If you need to change any configuration, you can do it! If you have questions about which settings we have you can go to <a href="#whatever">our knowledgebase article</a>' ),
|
61 |
+
],
|
62 |
+
[
|
63 |
+
'title' => __( '💡 Save the Settings' ),
|
64 |
+
'element' => '#tribeSaveSettings',
|
65 |
+
'intro' => __( 'Please remember to save the settings, if you have questions about which settings we have you can go to <a href="#whatever">our knowledgebase article</a>' ),
|
66 |
+
],
|
67 |
+
];
|
68 |
+
|
69 |
+
$data['steps'] = $steps;
|
70 |
+
$data['classes'] = [ 'my__fancy-css-class', 'my__fancy-css-class--modifier' ];
|
71 |
+
|
72 |
+
return $data;
|
73 |
+
}
|
74 |
+
```
|
75 |
+
|
76 |
+
### Setting up Tours from TEC plugins
|
77 |
+
|
78 |
+
Setting up new tours from our plugins should be easy with the abstract classes we have in place.
|
79 |
+
|
80 |
+
We should be registering the tours we want, hooking them into the `tribe_onboarding_tours` filter.
|
81 |
+
|
82 |
+
The function to hook onto `tribe_onboarding_tours` should have the following format:
|
83 |
+
|
84 |
+
```
|
85 |
+
/**
|
86 |
+
* Register tours.
|
87 |
+
*
|
88 |
+
* @see \Tribe\Onboarding\Main::get_registered_tours()
|
89 |
+
*
|
90 |
+
* @since TBD
|
91 |
+
*
|
92 |
+
* @param array $tours An associative array of tours in the shape `[ <tour_id> => <class> ]`.
|
93 |
+
*
|
94 |
+
* @return array
|
95 |
+
*/
|
96 |
+
public function filter_register_tours( array $tours ) {
|
97 |
+
$tours['my_awesome_tour_id'] = MyAwesomeTourClass::class;
|
98 |
+
|
99 |
+
return $tours;
|
100 |
+
}
|
101 |
+
```
|
102 |
+
|
103 |
+
And then `MyAwesomeTourClass` should have the following format:
|
104 |
+
|
105 |
+
```
|
106 |
+
use Tribe\Onboarding\Tour_Abstract;
|
107 |
+
/**
|
108 |
+
* Class MyAwesomeTourClass
|
109 |
+
*/
|
110 |
+
class MyAwesomeTourClass extends Tour_Abstract {
|
111 |
+
|
112 |
+
/**
|
113 |
+
* The tour ID.
|
114 |
+
*
|
115 |
+
* @var string
|
116 |
+
*/
|
117 |
+
public $tour_id = 'my_awesome_tour_id';
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Times to display the tour.
|
121 |
+
* If you set '5', then it'll be displayed FIVE times.
|
122 |
+
*
|
123 |
+
* @var int
|
124 |
+
*/
|
125 |
+
public $times_to_display = 5;
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Returns if it's on the page we want to display the tour for.
|
129 |
+
*
|
130 |
+
* @return bool True if it's on page.
|
131 |
+
*/
|
132 |
+
public function is_on_page() {
|
133 |
+
|
134 |
+
// Perform any check you want, to see if the tour should display or not.
|
135 |
+
return $admin_helpers->is_screen( 'tribe_events_page_tribe-common' );
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Tour steps.
|
140 |
+
*
|
141 |
+
* @since TBD
|
142 |
+
*
|
143 |
+
* @return array $steps The tour steps
|
144 |
+
*/
|
145 |
+
public function steps() {
|
146 |
+
|
147 |
+
$steps = [
|
148 |
+
[
|
149 |
+
'title' => __( '🤘 Welcome to the settings panel' ),
|
150 |
+
'intro' => __( 'It is actually great that you are using our plugins! From this settings panel you should be able to access all the settings to configure your site.' ),
|
151 |
+
],
|
152 |
+
[
|
153 |
+
'title' => __( '⚙️ Different sections' ),
|
154 |
+
'element' => '#tribe-settings-tabs',
|
155 |
+
'intro' => __( 'On this section you can access all of the different settings of our plugins, if you have questions about which settings we have you can go to <a href="#whatever">our knowledgebase article</a>' ),
|
156 |
+
],
|
157 |
+
[
|
158 |
+
'title' => __( '🛠️ Change the settings' ),
|
159 |
+
'element' => '#tribe-field-postsPerPage',
|
160 |
+
'intro' => __( 'If you need to change any configuration, you can do it! If you have questions about which settings we have you can go to <a href="#whatever">our knowledgebase article</a>' ),
|
161 |
+
],
|
162 |
+
[
|
163 |
+
'title' => __( '💡 Save the Settings' ),
|
164 |
+
'element' => '#tribeSaveSettings',
|
165 |
+
'intro' => __( 'Please remember to save the settings, if you have questions about which settings we have you can go to <a href="#whatever">our knowledgebase article</a>' ),
|
166 |
+
],
|
167 |
+
];
|
168 |
+
|
169 |
+
return $steps;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Tour CSS Classes.
|
174 |
+
*
|
175 |
+
* Here you can set additional CSS classes for the particular tour.
|
176 |
+
*
|
177 |
+
* @return array $css_classes The tour extra CSS classes.
|
178 |
+
*/
|
179 |
+
public function css_classes() {
|
180 |
+
|
181 |
+
return [ 'my-awesome-css-class' ];
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
```
|
186 |
+
|
187 |
+
## Hints
|
188 |
+
|
189 |
+
**Hints** are great for providing non-intrusive contextual help. Each hing will be associated to a particular HTML element (which you can define by a CSS class or an ID) and it'll add kind of a "infinite bouncing dot" besides that element. When clicked you'll have some more context on what's the purpose of that.
|
190 |
+
|
191 |
+
Technically speaking **Hints** work pretty similarly to how **Tours** do. The mechanics of adding a set of hints is almost the same.
|
192 |
+
|
193 |
+
It comes down to hooking onto `tribe_onboarding_hints_data`.
|
194 |
+
|
195 |
+
The information to be sent there is an array in the following format:
|
196 |
+
|
197 |
+
```
|
198 |
+
$hints_data = [
|
199 |
+
'hints' = [], // An array of the hints you'd like to have.
|
200 |
+
'classes' = [], // An array of CSS classes to apply to the modal/tooltip. (Optional)
|
201 |
+
];
|
202 |
+
```
|
203 |
+
|
204 |
+
So for example, if you want to add a hint for a newly added button:
|
205 |
+
|
206 |
+
```
|
207 |
+
add_filter( 'tribe_onboarding_hints_data', 'my_fancy_hints' );
|
208 |
+
|
209 |
+
function my_fancy_hints( $data ) {
|
210 |
+
$hints = [
|
211 |
+
[
|
212 |
+
'hint' => __( 'You can now add attendees for this event!' ),
|
213 |
+
'element' => '.add_attendee',
|
214 |
+
],
|
215 |
+
];
|
216 |
+
|
217 |
+
$data['hints'] = $hints;
|
218 |
+
$data['classes'] = [ 'my__fancy-css-class', 'my__fancy-css-class--modifier' ];
|
219 |
+
|
220 |
+
return $data;
|
221 |
+
}
|
222 |
+
```
|
223 |
+
|
224 |
+
## CSS classes that you may want to use:
|
225 |
+
|
226 |
+
- `.tribe-onboarding__tooltip--large` - Use if if you want your tooltip to be bigger/wider.
|
227 |
+
- `.tribe-onboarding__tooltip--dark` - Use if if you want your tooltip to have a dark skin (to use an image for the background, or just a plain dark color).
|
228 |
+
- `.tribe-onboarding__tooltip--squared` - Use it if you want a squared tooltip.
|
229 |
+
- `.tribe-onboarding__tooltip--no-bullets` - Use it if you want to hide the navigation bullets.
|
230 |
+
- `.tribe-onboarding__tooltip--title-large` - Use it if you want to have a bigger title.
|
231 |
+
- `.tribe-onboarding__tooltip--content-centered` - Use it if you want to center the content.
|
232 |
+
- `.tribe-onboarding__tooltip--button-centered` - Use it if you want to center the buttons.
|
233 |
+
- `.tribe-onboarding__tooltip--button-large` - Use it if you want to have a bigger button.
|
234 |
+
- `.tribe-onboarding__tooltip--button-rounded` - Use it if you want to have a rounded button.
|
235 |
+
- `.tribe-onboarding__tooltip--button-dark-skin` - Use it if you want to have a button for dark skin (white background / dark text button).
|
236 |
+
|
237 |
+
|
238 |
+
### 💡 To-Do's / Ideas:
|
239 |
+
|
240 |
+
- [ ] Add some more styles variations.
|
241 |
+
- [ ] Maybe add the possibility of having animated GIFs/images on each step.
|
242 |
+
- [ ] Add some abstraction to extend this anywhere, and make it easier to check if it's in the page, and load the tours and/or hints we would like to add.
|
common/src/Tribe/Onboarding/Tour_Abstract.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Tribe\Onboarding;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class Tour Abstract.
|
6 |
+
*
|
7 |
+
* @since TBD
|
8 |
+
*/
|
9 |
+
abstract class Tour_Abstract {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* The tour ID.
|
13 |
+
*
|
14 |
+
* @since TBD
|
15 |
+
*
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
public $tour_id;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Times to display the tour.
|
22 |
+
*
|
23 |
+
* @since TBD
|
24 |
+
*
|
25 |
+
* @var int
|
26 |
+
*/
|
27 |
+
public $times_to_display;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Return if it's on page where it should be displayed.
|
31 |
+
*
|
32 |
+
* @since TBD
|
33 |
+
*
|
34 |
+
* @return bool True if it is on page.
|
35 |
+
*/
|
36 |
+
public function is_on_page() {
|
37 |
+
return false;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Should the tour display.
|
42 |
+
*
|
43 |
+
* @since TBD
|
44 |
+
*
|
45 |
+
* @return boolean True if it should display.
|
46 |
+
*/
|
47 |
+
public function should_display() {
|
48 |
+
// Bail if it's not on the page we want to display.
|
49 |
+
if ( ! $this->is_on_page() ) {
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
|
53 |
+
// Bail if the `Times to display` is set and it was reached.
|
54 |
+
if (
|
55 |
+
is_numeric( $this->times_to_display )
|
56 |
+
&& ( tribe( 'onboarding' )->get_views( $this->tour_id ) > $this->times_to_display )
|
57 |
+
) {
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
|
61 |
+
return true;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Return the tour steps.
|
66 |
+
*
|
67 |
+
* @since TBD
|
68 |
+
*
|
69 |
+
* @return array The tour steps.
|
70 |
+
*/
|
71 |
+
abstract function steps();
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Return the CSS classes.
|
75 |
+
*
|
76 |
+
* @since TBD
|
77 |
+
*
|
78 |
+
* @return array The CSS classes.
|
79 |
+
*/
|
80 |
+
public function css_classes() {
|
81 |
+
return [];
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* The tour data, publicly accessible.
|
86 |
+
*
|
87 |
+
* @since TBD.
|
88 |
+
*
|
89 |
+
* @param array $data An array with the tour data.
|
90 |
+
* @return array
|
91 |
+
*/
|
92 |
+
public function tour_data( array $data = [] ) {
|
93 |
+
$data['steps'] = $this->steps();
|
94 |
+
$data['classes'] = $this->css_classes();
|
95 |
+
|
96 |
+
return $data;
|
97 |
+
}
|
98 |
+
}
|
common/src/Tribe/Service_Providers/Onboarding.php
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Tribe\Service_Providers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class Onboarding
|
6 |
+
*
|
7 |
+
* @since TBD
|
8 |
+
*
|
9 |
+
* Handles the registration and creation of our async process handlers.
|
10 |
+
*/
|
11 |
+
class Onboarding extends \tad_DI52_ServiceProvider {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* The Onboarding assets group identifier.
|
15 |
+
*
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
public static $group_key = 'tribe-onboarding';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Binds and sets up implementations.
|
22 |
+
*
|
23 |
+
* @since TBD
|
24 |
+
*/
|
25 |
+
public function register() {
|
26 |
+
tribe_singleton( 'onboarding', '\Tribe\Onboarding\Main' );
|
27 |
+
|
28 |
+
$this->hooks();
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Set up hooks for classes.
|
33 |
+
*
|
34 |
+
* @since TBD
|
35 |
+
*/
|
36 |
+
private function hooks() {
|
37 |
+
add_action( 'tribe_common_loaded', [ $this, 'register_assets' ] );
|
38 |
+
|
39 |
+
add_action( 'admin_enqueue_scripts', tribe_callback( 'onboarding', 'localize_tour' ) );
|
40 |
+
add_action( 'admin_enqueue_scripts', tribe_callback( 'onboarding', 'localize_hints' ) );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Register assets associated with onboarding.
|
45 |
+
*
|
46 |
+
* @since TBD
|
47 |
+
*/
|
48 |
+
public function register_assets() {
|
49 |
+
$main = \Tribe__Main::instance();
|
50 |
+
|
51 |
+
tribe_asset(
|
52 |
+
$main,
|
53 |
+
'intro-js',
|
54 |
+
'node_modules/intro.js/intro.js',
|
55 |
+
[],
|
56 |
+
[ 'admin_enqueue_scripts' ],
|
57 |
+
[
|
58 |
+
'groups' => self::$group_key,
|
59 |
+
'conditionals' => [ $this, 'should_enqueue_assets' ],
|
60 |
+
]
|
61 |
+
);
|
62 |
+
|
63 |
+
tribe_asset(
|
64 |
+
$main,
|
65 |
+
'intro-styles',
|
66 |
+
'node_modules/intro.js/introjs.css',
|
67 |
+
[],
|
68 |
+
[ 'admin_enqueue_scripts' ],
|
69 |
+
[
|
70 |
+
'groups' => self::$group_key,
|
71 |
+
'conditionals' => [ $this, 'should_enqueue_assets' ],
|
72 |
+
]
|
73 |
+
);
|
74 |
+
|
75 |
+
tribe_asset(
|
76 |
+
$main,
|
77 |
+
'tribe-onboarding-styles',
|
78 |
+
'onboarding.css',
|
79 |
+
[ 'intro-styles', 'tec-variables-skeleton', 'tec-variables-full' ],
|
80 |
+
[ 'admin_enqueue_scripts' ],
|
81 |
+
[
|
82 |
+
'groups' => self::$group_key,
|
83 |
+
'conditionals' => [ $this, 'should_enqueue_assets' ],
|
84 |
+
]
|
85 |
+
);
|
86 |
+
|
87 |
+
tribe_asset(
|
88 |
+
$main,
|
89 |
+
'tribe-onboarding-js',
|
90 |
+
'onboarding.js',
|
91 |
+
[
|
92 |
+
'tribe-common',
|
93 |
+
'intro-js'
|
94 |
+
],
|
95 |
+
[ 'admin_enqueue_scripts' ],
|
96 |
+
[
|
97 |
+
'groups' => self::$group_key,
|
98 |
+
'in_footer' => false,
|
99 |
+
'localize' => [
|
100 |
+
'name' => 'TribeOnboarding',
|
101 |
+
'data' => [
|
102 |
+
'hintButtonLabel' => __( 'Got it', 'tribe-common' ),
|
103 |
+
],
|
104 |
+
],
|
105 |
+
'conditionals' => [ $this, 'should_enqueue_assets' ],
|
106 |
+
]
|
107 |
+
);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Define if the assets for `Onboarding` should be enqueued or not.
|
112 |
+
*
|
113 |
+
* @since TBD
|
114 |
+
*
|
115 |
+
* @return bool If the Onboarding assets should be enqueued or not.
|
116 |
+
*/
|
117 |
+
public function should_enqueue_assets() {
|
118 |
+
return $this->is_enabled();
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Check if the onboarding is enabled or not.
|
123 |
+
*
|
124 |
+
* @since TBD
|
125 |
+
*
|
126 |
+
* @return bool
|
127 |
+
*/
|
128 |
+
public function is_enabled() {
|
129 |
+
/**
|
130 |
+
* Filter to disable tribe onboarding
|
131 |
+
*
|
132 |
+
* @since TBD
|
133 |
+
*
|
134 |
+
* @param bool $disabled If we want to disable the onboarding.
|
135 |
+
*/
|
136 |
+
$is_disabled = (bool) apply_filters( 'tribe_onboarding_disable', false );
|
137 |
+
|
138 |
+
return is_admin() && ! $is_disabled;
|
139 |
+
}
|
140 |
+
}
|
common/src/Tribe/Support.php
CHANGED
@@ -15,6 +15,15 @@ if ( ! class_exists( 'Tribe__Support' ) ) {
|
|
15 |
public static $support;
|
16 |
public $rewrite_rules_purged = false;
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
/**
|
19 |
* @var Tribe__Support__Obfuscator
|
20 |
*/
|
@@ -309,13 +318,10 @@ if ( ! class_exists( 'Tribe__Support' ) ) {
|
|
309 |
*/
|
310 |
public static function opt_in() {
|
311 |
|
312 |
-
$checked = '';
|
313 |
-
$optin_key = get_option( 'tribe_systeminfo_optin' );
|
314 |
-
if ( $optin_key ) {
|
315 |
-
$checked = 'checked';
|
316 |
-
}
|
317 |
|
318 |
-
$
|
|
|
|
|
319 |
$opt_in .= '<p class="tooltip description">' . esc_html__( 'Your system information will only be used by The Events Calendar\'s support team. All information is stored securely. We do not share this information with any third parties.', 'tribe-common' ) . '</p>';
|
320 |
$opt_in .= '<p class="tribe-sysinfo-optin-msg"></p>';
|
321 |
|
@@ -332,7 +338,7 @@ if ( ! class_exists( 'Tribe__Support' ) ) {
|
|
332 |
*/
|
333 |
public static function sysinfo_query( $query ) {
|
334 |
|
335 |
-
$optin_key = get_option(
|
336 |
|
337 |
if ( ! $optin_key ) {
|
338 |
wp_send_json_error( __( 'Invalid Key', 'tribe-common' ) );
|
@@ -353,7 +359,7 @@ if ( ! class_exists( 'Tribe__Support' ) ) {
|
|
353 |
* Create Unique Endpoint Per Site
|
354 |
*/
|
355 |
public static function create_sysinfo_endpoint() {
|
356 |
-
$optin_key = get_option(
|
357 |
if ( $optin_key ) {
|
358 |
register_rest_route(
|
359 |
'tribe_events/v2',
|
@@ -377,25 +383,25 @@ if ( ! class_exists( 'Tribe__Support' ) ) {
|
|
377 |
}
|
378 |
|
379 |
if ( 'generate' == $_POST['generate_key'] ) {
|
380 |
-
|
381 |
$random = base_convert( rand( 0, getrandmax() ), 10, 36 );
|
382 |
$optin_key = hash( 'sha1', $random );
|
383 |
-
|
|
|
384 |
|
385 |
//Only Connect If a License Exists
|
386 |
$keys = apply_filters( 'tribe-pue-install-keys', [] );
|
387 |
if ( is_array( $keys ) && ! empty( $keys ) ) {
|
388 |
-
|
389 |
} else {
|
390 |
wp_send_json_success( __( 'Unique System Info Key Generated', 'tribe-common' ) );
|
391 |
}
|
392 |
|
393 |
} elseif ( 'remove' == $_POST['generate_key'] ) {
|
394 |
-
$optin_key = get_option(
|
395 |
|
396 |
-
delete_option(
|
397 |
|
398 |
-
|
399 |
|
400 |
}
|
401 |
|
@@ -411,16 +417,9 @@ if ( ! class_exists( 'Tribe__Support' ) ) {
|
|
411 |
* @param null $pueadd boolean to disable messaging when coming from pue script
|
412 |
*/
|
413 |
public static function send_sysinfo_key( $optin_key = null, $url = null, $remove = null, $pueadd = false ) {
|
414 |
-
|
415 |
-
$
|
416 |
-
|
417 |
-
$teccom_url = 'https://theeventscalendar.com/';
|
418 |
-
|
419 |
-
if ( defined( 'TEC_URL' ) ) {
|
420 |
-
$teccom_url = trailingslashit( TEC_URL );
|
421 |
-
}
|
422 |
-
|
423 |
-
$query = $teccom_url . 'wp-json/tribe_system/v2/customer-info/' . $optin_key . '/' . $url;
|
424 |
|
425 |
if ( $remove ) {
|
426 |
$query .= '?status=remove';
|
@@ -434,7 +433,7 @@ if ( ! class_exists( 'Tribe__Support' ) ) {
|
|
434 |
// make sure the response came back okay
|
435 |
if ( ! isset( $response->success ) ) {
|
436 |
//on error delete the key
|
437 |
-
delete_option(
|
438 |
|
439 |
//send error response
|
440 |
wp_send_json_error( $response );
|
15 |
public static $support;
|
16 |
public $rewrite_rules_purged = false;
|
17 |
|
18 |
+
/**
|
19 |
+
* The wp_options key used to store the optin_key
|
20 |
+
*
|
21 |
+
* @since 4.14.5
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
public static $option_key = 'tribe_systeminfo_optin';
|
26 |
+
|
27 |
/**
|
28 |
* @var Tribe__Support__Obfuscator
|
29 |
*/
|
318 |
*/
|
319 |
public static function opt_in() {
|
320 |
|
|
|
|
|
|
|
|
|
|
|
321 |
|
322 |
+
$optin_key = ! empty( get_option( self::$option_key ) );
|
323 |
+
|
324 |
+
$opt_in = '<p class="system-info"><input name="tribe_auto_sysinfo_opt_in" id="tribe_auto_sysinfo_opt_in" type="checkbox" value="optin" ' . checked( $optin_key ) . '/><label for="tribe_auto_sysinfo_opt_in">' . esc_html__( 'Yes, automatically share my system information with The Events Calendar\'s support team', 'tribe-common' ) . '</label></p>';
|
325 |
$opt_in .= '<p class="tooltip description">' . esc_html__( 'Your system information will only be used by The Events Calendar\'s support team. All information is stored securely. We do not share this information with any third parties.', 'tribe-common' ) . '</p>';
|
326 |
$opt_in .= '<p class="tribe-sysinfo-optin-msg"></p>';
|
327 |
|
338 |
*/
|
339 |
public static function sysinfo_query( $query ) {
|
340 |
|
341 |
+
$optin_key = get_option( self::$option_key );
|
342 |
|
343 |
if ( ! $optin_key ) {
|
344 |
wp_send_json_error( __( 'Invalid Key', 'tribe-common' ) );
|
359 |
* Create Unique Endpoint Per Site
|
360 |
*/
|
361 |
public static function create_sysinfo_endpoint() {
|
362 |
+
$optin_key = get_option( self::$option_key );
|
363 |
if ( $optin_key ) {
|
364 |
register_rest_route(
|
365 |
'tribe_events/v2',
|
383 |
}
|
384 |
|
385 |
if ( 'generate' == $_POST['generate_key'] ) {
|
|
|
386 |
$random = base_convert( rand( 0, getrandmax() ), 10, 36 );
|
387 |
$optin_key = hash( 'sha1', $random );
|
388 |
+
|
389 |
+
update_option( self::$option_key, $optin_key );
|
390 |
|
391 |
//Only Connect If a License Exists
|
392 |
$keys = apply_filters( 'tribe-pue-install-keys', [] );
|
393 |
if ( is_array( $keys ) && ! empty( $keys ) ) {
|
394 |
+
self::send_sysinfo_key( $optin_key );
|
395 |
} else {
|
396 |
wp_send_json_success( __( 'Unique System Info Key Generated', 'tribe-common' ) );
|
397 |
}
|
398 |
|
399 |
} elseif ( 'remove' == $_POST['generate_key'] ) {
|
400 |
+
$optin_key = get_option( self::$option_key );
|
401 |
|
402 |
+
delete_option( self::$option_key );
|
403 |
|
404 |
+
self::send_sysinfo_key( $optin_key, null, 'remove' );
|
405 |
|
406 |
}
|
407 |
|
417 |
* @param null $pueadd boolean to disable messaging when coming from pue script
|
418 |
*/
|
419 |
public static function send_sysinfo_key( $optin_key = null, $url = null, $remove = null, $pueadd = false ) {
|
420 |
+
$url = $url ? $url : urlencode( str_replace( [ 'http://', 'https://' ], '', get_site_url() ) );
|
421 |
+
$teccom_url = defined( 'TEC_URL' ) ? TEC_URL : 'https://theeventscalendar.com';
|
422 |
+
$query = trailingslashit( $teccom_url ) . 'wp-json/tribe_system/v2/customer-info/' . $optin_key . '/' . $url;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
|
424 |
if ( $remove ) {
|
425 |
$query .= '?status=remove';
|
433 |
// make sure the response came back okay
|
434 |
if ( ! isset( $response->success ) ) {
|
435 |
//on error delete the key
|
436 |
+
delete_option( self::$option_key );
|
437 |
|
438 |
//send error response
|
439 |
wp_send_json_error( $response );
|
common/src/admin-views/troubleshooting/system-information.php
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
|
9 |
$support = Tribe__Support::getInstance();
|
10 |
$system_info = $support->formattedSupportStats();
|
|
|
11 |
?>
|
12 |
<div class="tribe-events-admin__system-information">
|
13 |
<div class="tribe-events-admin__system-information-content">
|
@@ -18,7 +19,7 @@ $system_info = $support->formattedSupportStats();
|
|
18 |
<?php esc_html_e( 'Please opt-in below to automatically share your system information with our support team. This will allow us to assist you faster if you post in our help desk.', 'tribe-common' ); ?>
|
19 |
</p>
|
20 |
<div class="tribe-events-admin__system-information-select">
|
21 |
-
<input name="tribe_auto_sysinfo_opt_in" id="tribe_auto_sysinfo_opt_in" type="checkbox" value="optin" />
|
22 |
<label for="tribe_auto_sysinfo_opt_in">
|
23 |
<?php esc_html_e( 'Yes, automatically share my system information with The Events Calendar support team*', 'tribe-common' ); ?>
|
24 |
</label>
|
@@ -26,6 +27,7 @@ $system_info = $support->formattedSupportStats();
|
|
26 |
<small>
|
27 |
<?php esc_html_e( '* Your system information will only be used by The Events Calendar support team. All information is stored securely. We do not share this information with any third parties.', 'tribe-common' ); ?>
|
28 |
</small>
|
|
|
29 |
</div>
|
30 |
|
31 |
<div class="tribe-events-admin__system-information-widget">
|
@@ -37,4 +39,4 @@ $system_info = $support->formattedSupportStats();
|
|
37 |
<?php esc_attr_e( 'Copy to clipboard', 'tribe-common' ); ?>
|
38 |
</button>
|
39 |
</div>
|
40 |
-
</div>
|
8 |
|
9 |
$support = Tribe__Support::getInstance();
|
10 |
$system_info = $support->formattedSupportStats();
|
11 |
+
$optin_key = ! empty( get_option( $support::$option_key ) );
|
12 |
?>
|
13 |
<div class="tribe-events-admin__system-information">
|
14 |
<div class="tribe-events-admin__system-information-content">
|
19 |
<?php esc_html_e( 'Please opt-in below to automatically share your system information with our support team. This will allow us to assist you faster if you post in our help desk.', 'tribe-common' ); ?>
|
20 |
</p>
|
21 |
<div class="tribe-events-admin__system-information-select">
|
22 |
+
<input name="tribe_auto_sysinfo_opt_in" id="tribe_auto_sysinfo_opt_in" type="checkbox" value="optin" <?php checked( $optin_key ); ?> />
|
23 |
<label for="tribe_auto_sysinfo_opt_in">
|
24 |
<?php esc_html_e( 'Yes, automatically share my system information with The Events Calendar support team*', 'tribe-common' ); ?>
|
25 |
</label>
|
27 |
<small>
|
28 |
<?php esc_html_e( '* Your system information will only be used by The Events Calendar support team. All information is stored securely. We do not share this information with any third parties.', 'tribe-common' ); ?>
|
29 |
</small>
|
30 |
+
<p class="tribe-sysinfo-optin-msg"></p>
|
31 |
</div>
|
32 |
|
33 |
<div class="tribe-events-admin__system-information-widget">
|
39 |
<?php esc_attr_e( 'Copy to clipboard', 'tribe-common' ); ?>
|
40 |
</button>
|
41 |
</div>
|
42 |
+
</div>
|
common/src/resources/css/onboarding.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.introjs-tooltipbuttons{border-top:none}.introjs-bullets ul li a.active{background-color:var(--tec-color-accent-primary)}.introjs-bullets ul li:only-child{display:none}.introjs-hint-pulse{background-color:transparent}.introjs-hint-dot,.introjs-hint-pulse,.introjs-hint:hover>.introjs-hint-pulse{border-color:var(--tec-color-accent-primary)}.introjs-hintReference .tribe-onboarding__tooltip .introjs-tooltiptext p{font-size:14px;margin-top:0}.introjs-hint:focus{box-shadow:none}.introjs-tooltipReferenceLayer:not(.introjs-hintReference) .tribe-onboarding__tooltip{box-sizing:border-box;max-width:450px;min-width:430px}.tribe-onboarding__tooltip .introjs-button{border:0;text-shadow:none}.tribe-onboarding__tooltip .introjs-button:focus{box-shadow:none}.tribe-onboarding__tooltip .introjs-prevbutton{color:var(--tec-color-icon-disabled)}.tribe-onboarding__tooltip .introjs-prevbutton,.tribe-onboarding__tooltip .introjs-prevbutton:hover{background-color:transparent;border-color:transparent}.tribe-onboarding__tooltip .introjs-nextbutton{background-color:#f7f6f6}.tribe-onboarding__tooltip .introjs-donebutton{background-color:var(--tec-color-accent-primary);color:var(--tec-color-background)}.introjs-tooltipReferenceLayer:not(.introjs-hintReference) .tribe-onboarding__tooltip--large{max-width:100%;min-width:630px}.tribe-onboarding__tooltip--squared{border-radius:1px}.tribe-onboarding__tooltip--rounded{border-radius:5px}.tribe-onboarding__tooltip--dark *,.tribe-onboarding__tooltip--dark h1{color:var(--tec-color-background)}.tribe-onboarding__tooltip--no-bullets .introjs-bullets{display:none}.tribe-onboarding__tooltip--content-centered .introjs-tooltip-title{float:none}.tribe-onboarding__tooltip--content-centered .introjs-tooltip-title,.tribe-onboarding__tooltip--content-centered .introjs-tooltiptext{text-align:center}.tribe-onboarding__tooltip--title-large .introjs-tooltip-title{font-size:20px}.tribe-onboarding__tooltip--button-centered .introjs-tooltipbuttons,.tribe-onboarding__tooltip-only-step--button-centered .introjs-tooltipbuttons{text-align:center}.tribe-onboarding__tooltip--button-centered .introjs-nextbutton,.tribe-onboarding__tooltip-only-step--button-centered .introjs-nextbutton{float:none}.tribe-onboarding__tooltip--button-large .introjs-button{font-size:16px;padding:14px 28px}.tribe-onboarding__tooltip--button-rounded .introjs-button{border-radius:28px}.tribe-onboarding__tooltip--button-dark-skin .introjs-button{background-color:var(--tec-color-background);color:var(--tec-color-text-primary)}
|
common/src/resources/css/tribe-common-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.invalid input,input:out-of-range{border:2px solid red!important}.valid input{border:1px solid green}.clearfix{zoom:1}.placeholder{color:#999;cursor:text;padding:4px}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::placeholder,textarea::placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.bubble{background-color:#f9f9f9;border:1px solid #dfdfdf;border-radius:3px;border-spacing:0;padding:10px}.tribe-sticky-tooltip{color:#bbb}td.tribe_message{padding-bottom:10px!important}#tribe_thanks{float:left;margin:5px 0 0;width:200px}.tribe_brand{font-family:Georgia,serif!important;font-size:17px!important;font-weight:400;margin:8px 0}.tribe-rating{color:#3d54ff}.tribe-rating:hover{color:#1c39bb}#tribe-upgrade{background:#f6f6f6;border:1px solid #ccc;border-radius:5px;margin:20px 0 30px;padding:0 20px 20px}#tribe-upgrade .message{background-color:#ffffe0;border:1px solid #e6db55;border-radius:3px;padding:6px 12px}table.plugins .tribe-plugin-update-message{background:#d54e21;color:#fff;display:inline-table;margin:6px 0;padding:10px 12px}table.plugins .tribe-plugin-update-message h4{display:inline;font-weight:700;margin-right:8px}table.plugins .tribe-plugin-update-message h4:after{content:" \00BB "}table.plugins .tribe-plugin-update-message a{color:#fff;text-decoration:underline}.tribe-settings-form{max-width:1000px}.tribe-settings-form fieldset{clear:both;display:inline-block;padding:10px 0}.tribe-settings-form fieldset.tribe-field-license_key legend{width:auto}.tribe-settings-form legend{float:left;font-weight:700;margin-right:20px;width:220px}.tribe-settings-form .tribe-field-wrap{float:left;max-width:500px}.tribe-settings-form .tribe-field-wrap :first-child{margin-top:0}.tribe-settings-form .tribe-field-checkbox_list label,.tribe-settings-form .tribe-field-radio label{display:block;margin:5px 0 5px 20px;text-indent:-20px}.tribe-settings-form .tribe-field-checkbox_list label>p,.tribe-settings-form .tribe-field-radio label>p{margin-left:1px;text-indent:0}.tribe-settings-form .tribe-field-checkbox_list label input,.tribe-settings-form .tribe-field-radio label input{margin-right:5px}.tribe-settings-form .tribe-settings-form-wrap .description,.tribe-settings-form .tribe-settings-form-wrap fieldset,.tribe-settings-form fieldset[id^=tribe-field-geoloc_]{padding-left:12px}.tribe-settings-form .tribe-settings-form-wrap fieldset .description{margin-left:0;max-width:450px;padding-left:0}.tribe-settings-form .tribe-settings-form-wrap fieldset .tribe-style-selection{margin-bottom:18px}.tribe-settings-form .tribe-settings-form-wrap #tribe-field-stylesheetOption .description{color:#999;margin-left:1px}.tribe-settings-form .tribe-settings-form-wrap h3{background-color:#f9f9f9;margin-bottom:10px;padding:6px 0 6px 12px}.tribe-settings-form .tribe-settings-form-wrap .contained,.tribe-settings-form .tribe-settings-form-wrap .system-info,.tribe-settings-form .tribe-settings-form-wrap .tribe-sysinfo-optin-msg,.tribe-settings-form .tribe-settings-form-wrap h3+p{margin:0 0 10px;padding-left:12px}.tribe_settings .tribe-field-indent{margin-left:245px}.tribe_settings #pu_dashboard_message{display:none}.tribe_settings .tribe-errors-list{margin-left:15px}.tribe_settings .expiring-license{color:red}.tribe_settings .tribe-error{border:1px solid red}.tribe_settings .tribe-field-description{margin-bottom:0;position:relative;top:-12px}.tribe_settings #ical-link{top:-14px}#modern-tribe-info{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;margin:20px 0;padding:8px 20px 12px}#modern-tribe-info img{margin:10px 0}#modern-tribe-info ul{list-style:disc;margin-left:20px}#modern-tribe-info ul ul{list-style:circle}.tribe-field-inline-dropdown{margin-left:0;margin-right:0}.tribe-field-inline-text{line-height:28px;margin:0 2px}.tribe-field-textarea.tribe-size-small textarea{height:60px;width:180px}.tribe-field-textarea.tribe-size-medium textarea{height:80px;width:300px}.tribe-field-textarea.tribe-size-large textarea{height:120px;width:450px}.tribe-field-email.tribe-size-small input,.tribe-field-license_key.tribe-size-small input,.tribe-field-text.tribe-size-small input{width:50px}.tribe-field-email.tribe-size-medium input,.tribe-field-license_key.tribe-size-medium input,.tribe-field-text.tribe-size-medium input{width:225px}.tribe-field-email.tribe-size-large input,.tribe-field-license_key.tribe-size-large input,.tribe-field-text.tribe-size-large input{width:450px}.tribe-field-dropdown.tribe-size-small select{width:100px}.tribe-field-dropdown.tribe-size-medium select{width:300px}.tribe-field-dropdown.tribe-size-large select{width:450px}.tribe-field-wrapped_html.tribe-size-large .tribe-field-wrap{max-width:600px}.tribe-field-wrapped_html.tribe-size-large .tribe-field-wrap .description{max-width:100%}.tribe-field-dropdown_chosen.tribe-size-small select{width:100px}.tribe-field-dropdown_chosen.tribe-size-medium select{width:200px}.tribe-field-dropdown_chosen.tribe-size-large select{width:300px}.tribe-field-wrap .tooltip:first-child{font-style:normal}.tribe-field.indent{margin-left:252px;width:75%}.tribe-field.indent legend{font-weight:400;width:auto}.tribe-field.indent .tribe-field-wrap{padding-right:12px}.tribe-field.indent.tribe-field-radio .tribe-field-wrap{clear:left;margin-top:12px}.tribe-field.light-bordered{background-color:#fff;border:1px solid #d3d3d3}.ajax-loading-license,.invalid-key,.valid-key{display:none;margin:0 5px}.ajax-loading-license{position:relative;top:5px}.key-validity{display:inline-block}.invalid-key,.optin-fail{color:red}.optin-success,.valid-key{color:green}.valid-key.service-msg{color:#b72}#additional-field-table{margin-bottom:20px}.tribe-admin-box-left{float:left;width:20%}.tribe-admin-box-left,.tribe-admin-box-right{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;margin:20px 0;padding:0 20px 15px}.tribe-admin-box-right{float:right;width:68%}.ajax-loader{float:right;margin:10px}.tribe-arrangeable-item{border:1px solid #d3d3d3;border-radius:3px}.tribe-arrangeable-item .ui-state-default{border:none}.tribe-arrangeable-item-top{padding:6px}.tribe-arrangeable-item-top:hover{cursor:move}.tribe-arrangeable-action{float:right}.tribe-arrangeable-child{background-color:#f9f9f9;border-top:1px solid #d3d3d3;display:none;padding:25px}.tribe-arrangeable-child label{display:block;margin:0 0 7px}.tribe_events_active_filter_type_options{margin:10px 0}.tribe_events_active_filter_type_options label{margin:7px 0}#event_organizer td small,.OrganizerInfo td small{display:block;margin:0;max-width:250px}#event_organizer .organizer-email,.OrganizerInfo .organizer-email{vertical-align:top}.tribe-table-field-label{max-width:100%;width:200px}#tribe-help-general,#tribe-help-sidebar{float:left;margin-top:20px}#tribe-help-general p{margin-left:15px}#tribe-help-general ul{list-style-type:square}#tribe-help-general ol,#tribe-help-general ul{margin-bottom:20px;margin-left:35px}#tribe-help-general h3{background-color:#f9f9f9;margin-bottom:10px;padding:6px 0 6px 12px}#tribe-help-general h3~h3{margin-top:2.25em}#tribe-help-general h3+p{margin:0 0 20px;padding-left:12px}#tribe-help-general{width:65%}.tribe-help-section{padding-bottom:10px}.tribe-section-type-box{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;padding:8px 20px 12px}.tribe-section-type-box img{height:auto;margin:10px 0;max-width:300px}.tribe-section-type-box ul{list-style:disc;margin-left:20px}.tribe-section-type-box ul ul{list-style:circle}#tribe-log-controls{padding-bottom:1rem;padding-left:12px}#tribe-log-controls>div{display:inline-block;padding-right:1rem}#tribe-log-controls .working{opacity:1;transition:opacity .2s}#tribe-log-controls .working.hidden{opacity:0;transition:opacity .2s}#tribe-log-viewer,#tribe-system-info dl.support-stats,.template-updates-wrapper{background:#000;border-radius:2px;color:#888;max-height:400px;overflow:scroll;padding:10px}#tribe-system-info dl.support-stats dt,.template-updates-wrapper dt{clear:both;float:left;font-weight:700;text-transform:uppercase;width:25%}#tribe-system-info dl.support-stats dd,.template-updates-wrapper dd{margin-left:25%;padding-left:10px}.system-info-copy .system-info-copy-btn{padding:6px}.system-info-copy .system-info-copy-btn .dashicons{padding-right:10px}.template-updates-wrapper p{margin-top:0}#tribe-help-sidebar{margin:20px 0 0 3%;max-width:225px;width:32%}.tribe-help-plugin-info{border:1px solid #ccc;padding:0 12px 12px}.tribe-help-plugin-info dd,.tribe-help-plugin-info dt{display:inline;margin:0}.tribe-help-plugin-info dt{font-weight:700}.tribe-help-plugin-info dd:after{content:"";display:block;height:.4em}.tribe-help-plugin-info dd:last-child:after{height:0}.tribe-help-plugin-info+.tribe-help-plugin-info{margin-top:20px}.tribe-help-plugin-info>div{line-height:2em}.tribe-help-plugin-info .star-rating{display:inline-block;margin-left:3px;position:relative;top:-2px}.tribe-help-plugin-info .tribe-list-addons{color:#21a6cb;font-size:24px;list-style:circle inside;margin-bottom:10px;margin-top:10px;padding-left:4px}.tribe-help-plugin-info .tribe-list-addons a{font-size:13px;left:-5px;position:relative;top:-5px}.tribe-help-plugin-info .tribe-list-addons .tribe-active-addon{list-style:disc inside}.ui-widget-overlay{background:#666;filter:alpha(opacity=50);opacity:.5}.ui-widget-shadow{background:#000;border-radius:5px;filter:alpha(opacity=20);margin:-5px 0 0 -5px;opacity:.2;padding:5px}.ui-resizable{position:relative}.ui-resizable-handle{display:block;font-size:.1px;position:absolute;z-index:99999}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;left:0;top:-5px;width:100%}.ui-resizable-s{bottom:-5px;cursor:s-resize;height:7px;left:0;width:100%}.ui-resizable-e{cursor:e-resize;height:100%;right:-5px;top:0;width:7px}.ui-resizable-w{cursor:w-resize;height:100%;left:-5px;top:0;width:7px}.ui-resizable-se{bottom:1px;cursor:se-resize;height:12px;right:1px;width:12px}.ui-resizable-sw{bottom:-5px;cursor:sw-resize;height:9px;left:-5px;width:9px}.ui-resizable-nw{cursor:nw-resize;height:9px;left:-5px;top:-5px;width:9px}.ui-resizable-ne{cursor:ne-resize;height:9px;right:-5px;top:-5px;width:9px}.ui-dialog{padding:.2em;position:relative;width:375px}.ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em}.ui-dialog .ui-dialog-titlebar-close{height:18px;margin:-10px 0 0;padding:1px;position:absolute;right:.3em;top:50%;width:19px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin-left:-8px;margin-top:-8px}.ui-dialog .ui-dialog-titlebar-close:focus,.ui-dialog .ui-dialog-titlebar-close:hover{padding:0}.ui-dialog .ui-dialog-content{background:none;border:0;overflow:auto;padding:.5em 1em;zoom:1}.ui-dialog .ui-dialog-buttonpane{background-image:none;border-width:1px 0 0;margin:.5em 0 0;padding:.3em 1em .5em!important;text-align:right}.ui-dialog .ui-dialog-buttonpane button{cursor:pointer;line-height:1.4em;margin:.5em .4em!important;overflow:visible;padding:.2em .6em .3em;text-shadow:none;width:auto}.ui-dialog .ui-resizable-se{bottom:3px;height:14px;right:3px;width:14px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:none!important;text-align:center}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button .ui-button-text{display:block;line-height:1.4}#ui-datepicker-div{display:none}#tribe-loading{background:#fff;background:hsla(0,0%,100%,.8);display:none;height:100%;left:0;position:absolute;top:0;transition:all 1s linear;width:100%;z-index:4}#tribe-loading span{background:url(../images/tribe-loading.gif) 0 0 no-repeat;background-size:32px 32px;height:32px;left:50%;margin:-16px 0 0 -16px;position:absolute;top:50%;width:32px}.tribe_update_page{max-width:850px}.tribe-half-column{float:left;margin-bottom:30px;margin-right:5%;width:45%}.tribe-row:after,.tribe-row:before{content:"";display:table}.tribe-row,.tribe-row:after{clear:both}.tribe-row .tribe-half-column:last-child{margin-right:0;width:50%}.tribe_update_page h2{font-size:30px;line-height:1.2;margin-bottom:20px}.tribe_update_page h3{font-size:24px;font-weight:400;line-height:24px;margin-top:0}.tribe_update_page h4{font-size:18px;font-weight:600;line-height:18px;margin:0}.tribe_update_page p{font-size:15px}p.tribe-update-message{font-size:18px;font-weight:400}.tribe_update_page h4:before{content:"\f145";font-family:dashicons;font-size:34px;line-height:1;margin-right:5px;position:relative;top:5px}a.tribe-rating-link{text-decoration:none}.tribe-update-links{margin-top:30px}.tribe_update_page li:before{content:"\2022";padding-right:3px}.tribe_update_page .rss-widget{margin:1em 0}.tribe_update_page a.rsswidget{font-size:14px;font-weight:400;line-height:1}.tribe_update_page .rss-widget li:before{display:none}.tribe-events-widget-admin-form__input-section p{margin:0}.tribe-events-widget-admin-form__input-section h4{margin:.5em 0}.tribe-update-bar{display:inline-block}.tribe-update-bar .progress{border:1px solid #ccc;float:left;margin-right:1rem;padding:1px;width:18rem}.tribe-update-bar .progress .bar{background:#7ad03a;height:1rem;width:1%}#tribe-dialog-wrapper>div{padding:1rem}#tribe-dialog-wrapper>div .stage{display:none}#tribe-dialog-wrapper #heading{background:#fff}#tribe-dialog-wrapper label{display:block}#tribe-dialog-wrapper .select-single-container{border:1px solid #888;height:300px;overflow-y:scroll}#tribe-dialog-wrapper .select-single-container label{opacity:1;padding:3px 5px;transition:opacity .2s}#tribe-dialog-wrapper .select-single-container label:nth-child(odd){background:#fff}#tribe-dialog-wrapper .select-single-container label.selected{background:#0073aa;color:#fff;font-weight:700}#tribe-dialog-wrapper .select-single-container label input{display:none}#tribe-dialog-wrapper .select-single-container.updating label{opacity:.35;transition:opacity .2s}.ui-front{z-index:1000000}.wp-list-table.plugins .column-description .update-message{color:#d54e21}.api-check{min-height:100px;padding:1em}.api-check+.notice-dismiss:hover:before{color:#fff}.api-check:after,.api-check:before{content:"";display:table}.api-check:after{clear:both}.api-check .tribe-mascot{bottom:0;display:none;padding:0 1rem 0 0;position:absolute;right:0;top:0}.api-check .tribe-mascot img{display:inline-block;height:100%;max-height:150px;max-width:150px;vertical-align:middle;width:auto}.api-check p{line-height:1.7;margin-bottom:1em}.api-check a{text-decoration:none}.api-check a:hover{text-decoration:underline}.api-check .plugin-list{display:inline;font-weight:600;margin:0;padding:0}.api-check .plugin-list span.plugin-invalid:after{content:", "}.api-check .plugin-list span.plugin-invalid:last-of-type:after{content:""}.tribe-marketing-notice{padding:1em}.tribe-marketing-notice+.notice-dismiss:hover:before{color:#fff}.tribe-marketing-notice:after,.tribe-marketing-notice:before{content:"";display:table}.tribe-marketing-notice:after{clear:both}.tribe-marketing-notice .tribe-marketing-notice__icon{display:none;flex-shrink:0;padding:0;position:static}.tribe-marketing-notice .tribe-marketing-notice__icon img{display:inline-block;max-height:100%;max-width:none;vertical-align:middle;width:100%}.tribe-marketing-notice h3{margin-bottom:.5em;margin-top:.5em}.tribe-marketing-notice p{line-height:1.7;margin-bottom:.5em}.tribe-marketing-notice a{text-decoration:none}.tribe-marketing-notice a:hover{text-decoration:underline}#wpcontent .notice-tribe-banner{align-items:center;background:#161b7d;border:0;box-shadow:none;display:flex;justify-content:flex-start;margin:0 0 16px;padding-right:0}.notice-tribe-banner .tribe-marketing-notice__icon{width:47px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:0;padding:1em 0}.notice-tribe-banner h3{color:#fff;display:block;font-size:.875rem;line-height:1.25;margin:0 0 .25rem}.notice-tribe-banner a{border-bottom:1px solid #fff;line-height:1.25;margin:0;text-decoration:none}.notice-tribe-banner a:hover{text-decoration:none}.notice-tribe-banner a,.notice-tribe-banner p{color:#fff;display:inline-block;font-size:.875rem;line-height:1.25}.notice-tribe-banner p{display:inline-block;margin:0;padding:0}.notice-tribe-banner .tribe-marketing-notice{align-items:center;display:flex;justify-content:flex-start;margin:0 auto;min-height:65px;padding:0 .75rem;width:100%}.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe-welcome .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:100%}.notice-tribe-banner .notice-dismiss{position:static}.notice-tribe-banner .notice-dismiss:before{color:#eaf1ff}.tribe-dropdown,.tribe-ea-dropdown{max-width:100%;width:auto}.tribe-dropdown.select2-container .selection,.tribe-ea-dropdown.select2-container .selection{margin-top:inherit}.tribe-dropdown .select2-selection--single,.tribe-ea-dropdown .select2-selection--single{height:32px}.tribe-dropdown .select2-selection--single .select2-selection__clear,.tribe-ea-dropdown .select2-selection--single .select2-selection__clear{line-height:28px}.tribe-dropdown .select2-selection--single .select2-selection__rendered,.tribe-ea-dropdown .select2-selection--single .select2-selection__rendered{line-height:32px;padding-right:28px}.tribe-dropdown.select2-container--focus .select2-selection--single,.tribe-ea-dropdown.select2-container--focus .select2-selection--single{border-color:#5897fb;box-shadow:0 0 5px rgba(0,0,0,.1)}.tribe-dropdown.select2-container--open .select2-search__field,.tribe-ea-dropdown.select2-container--open .select2-search__field{padding:0}.tribe-dropdown.select2-container--open .select2-dropdown--below,.tribe-ea-dropdown.select2-container--open .select2-dropdown--below{border-top:1px solid #aaa;margin-top:-1px}.tribe-dropdown.select2-container--open .select2-dropdown--above,.tribe-ea-dropdown.select2-container--open .select2-dropdown--above{border-bottom:1px solid #aaa;margin-bottom:-16px}.tribe-dropdown.select2-container--open .select2-selection--single,.tribe-ea-dropdown.select2-container--open .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0;border-color:#aaa}.tribe-dropdown.select2-container--open .select2-selection__arrow b,.tribe-ea-dropdown.select2-container--open .select2-selection__arrow b{transform:rotate(180deg)}.tribe-dropdown.select2-selection--single,.tribe-ea-dropdown.select2-selection--single{background-image:none;border:1px solid #ccc;border-radius:3px;overflow:hidden}.tribe-dropdown.select2-selection--single>.select2-selection__rendered,.tribe-ea-dropdown.select2-selection--single>.select2-selection__rendered{white-space:normal}.tribe-dropdown.select2-selection--single .select2-selection__arrow,.tribe-ea-dropdown.select2-selection--single .select2-selection__arrow{background:transparent;background-image:none;border-left:0;top:2px;width:26px}.tribe-dropdown.select2-selection--single .select2-selection__arrow b,.tribe-ea-dropdown.select2-selection--single .select2-selection__arrow b{background:#fff url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 5px top 55%;background-size:auto;background-size:16px 16px;border:0;bottom:0;display:block;height:auto;left:0;margin:0;padding:0;right:0;top:0;width:auto}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered{background-image:none;border:1px solid #ccc;border-radius:3px;min-height:25px}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline{line-height:25px}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline input,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline input{padding-bottom:0;padding-top:0}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice{line-height:19px;margin-top:2px;padding-bottom:0;padding-top:0}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice div,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice div{line-height:inherit}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice__remove,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice__remove{left:4px;top:3px;transition-property:border,color}.select2-results .select2-results__option{color:#939393;font-weight:400;margin-bottom:0}.select2-results .select2-results__option[aria-disabled=true]{background-color:#e0e0e0}.select2-results.select2-results__option--highlighted{background-color:#efefef;color:#a1a1a1;cursor:default;display:block}.wp-core-ui .button-red{background-color:#a00;border-color:#9b2124;box-shadow:inset 0 1px 0 rgba(120,200,230,.5);color:#fff;text-decoration:none;text-shadow:0 1px 0 rgba(0,0,0,.1)}.wp-core-ui .button-red.focus,.wp-core-ui .button-red.hover,.wp-core-ui .button-red:focus,.wp-core-ui .button-red:hover{background-color:#a00;border-color:#7f1c1f;box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.3)}.wp-core-ui .button-red.focus,.wp-core-ui .button-red:focus{border-color:#500f0e;box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4)}.wp-core-ui .button-red.active,.wp-core-ui .button-red.active:focus,.wp-core-ui .button-red.active:hover,.wp-core-ui .button-red:active{background:#7f1c1f;border-color:#601312 #ae2426 #ae2426;box-shadow:inset 0 1px 0 rgba(0,0,0,.1);color:hsla(0,0%,100%,.95);text-shadow:0 1px 0 rgba(0,0,0,.1)}.wp-core-ui .button-red-disabled,.wp-core-ui .button-red:disabled,.wp-core-ui .button-red[disabled]{background:#ba292b!important;border-color:#7f1c1f!important;box-shadow:none!important;color:#e79496!important;cursor:default;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important}.ticket_form .select2-container .select2-selection--single .select2-selection__arrow{display:none}.clear{zoom:1}.clear:after,.clear:before{content:" ";display:table}.clear:after{clear:both}.checkmark:after{border:solid #0ab152;border-width:0 3px 3px 0;content:"";display:block;height:15px;transform:rotate(45deg);width:8px}.checkmark.checkmark-right:after{float:right;margin-right:2em}.checkmark.checkmark-left:after{float:left;margin-left:2em}.checkmark.no-checkmark:after{display:none}.complete,.ok,.on,.yes,[data-status=complete],[data-status=ok],[data-status=on],[data-status=yes]{color:#0ab152}.incomplete,.ko,.no,.off,[data-status=incomplete],[data-status=ko],[data-status=no],[data-status=off]{color:#ff2500}.plugin-card-event-tickets-plus .column-downloaded,.plugin-card-event-tickets-plus .column-rating,.plugin-card-event-tickets-plus .column-updated,.plugin-card-event-tickets .column-downloaded,.plugin-card-event-tickets .column-rating,.plugin-card-event-tickets .column-updated,.plugin-card-events-calendar-pro .column-downloaded,.plugin-card-events-calendar-pro .column-rating,.plugin-card-events-calendar-pro .column-updated,.plugin-card-events-community-tickets .column-downloaded,.plugin-card-events-community-tickets .column-rating,.plugin-card-events-community-tickets .column-updated,.plugin-card-events-community .column-downloaded,.plugin-card-events-community .column-rating,.plugin-card-events-community .column-updated,.plugin-card-image-widget-plus .column-downloaded,.plugin-card-image-widget-plus .column-rating,.plugin-card-image-widget-plus .column-updated,.plugin-card-image-widget .column-downloaded,.plugin-card-image-widget .column-rating,.plugin-card-image-widget .column-updated,.plugin-card-the-events-calendar .column-downloaded,.plugin-card-the-events-calendar .column-rating,.plugin-card-the-events-calendar .column-updated,.plugin-card-tribe-eventbrite .column-downloaded,.plugin-card-tribe-eventbrite .column-rating,.plugin-card-tribe-eventbrite .column-updated,.plugin-card-tribe-filterbar .column-downloaded,.plugin-card-tribe-filterbar .column-rating,.plugin-card-tribe-filterbar .column-updated{display:none}.tribe-events-admin-content-wrapper{font-style:normal;margin:0 auto;padding:20px;width:calc(100% - 40px)}.tribe-events-admin-card{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;display:block;margin:0 auto 36px;padding:27px;text-align:center}.tribe-events-admin-card--2up .tribe-events-admin-card__title{max-width:260px}.tribe-events-admin-card--3up .tribe-events-admin-card__description{height:71px}.tribe-events-admin-card--3up .tribe-events-admin-card__image{margin-bottom:28px}.tribe-events-admin-card__button{background-color:#fff;border:none;color:#3d54ff;font-size:14px;font-weight:700;letter-spacing:1px;line-height:16px;position:absolute;right:20px;text-transform:uppercase;top:17px}.tribe-events-admin-card__button:hover{color:#161b7d}.tribe-events-admin-card__description{color:#000;font-size:14px;font-style:normal;font-weight:400;line-height:22px;margin-top:16px}.tribe-events-admin-card__image{display:block;height:100px;margin:0 auto}.tribe-events-admin-card__link{color:#3d54ff;display:inline-block;font-size:16px;font-style:normal;font-weight:700;line-height:18px;margin-top:24px;position:relative;text-decoration:none}.tribe-events-admin-card__link:hover{color:#161b7d}.tribe-events-admin-card__link:after{border-style:solid;border-width:0 0 1px;bottom:-4px;content:"";left:0;position:absolute;width:100%}.tribe-events-admin-card__title{color:#0f1031;font-size:20px;font-weight:700;line-height:23px;margin:auto}.tribe-events-admin-card-grid{max-width:1048px}.tribe-events-admin-section-header{color:#000;font-size:24px;font-weight:700;line-height:28px;margin:21px 0 24px}input[type=checkbox].tribe-common-switch__input{display:none}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label{background:#fff;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;cursor:pointer;display:block;height:18px;outline:0;padding:3px;position:relative;transition:all .2s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:27px}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:after,input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:before{content:"";display:block;height:10px;position:relative;width:10px}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:after{background:#878787;border-radius:2px;content:"";left:0;transition:all .2s ease}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:before{display:none}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label::-moz-selection{background:none}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label::selection{background:none}input[type=checkbox].tribe-common-switch__input:checked+.tribe-common-switch__label:after{background:#2e709d;left:50%}body.tribe-welcome,body.tribe_events_page_tribe-help{background-color:#fff;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}body.tribe-welcome .update-nag,body.tribe_events_page_tribe-help .update-nag{display:none}body.tribe-welcome #wpcontent,body.tribe_events_page_tribe-help #wpcontent{padding:0}body.tribe-welcome .tribe_settings,body.tribe_events_page_tribe-help .tribe_settings{margin:0}body.tribe-welcome #wpfooter,body.tribe-welcome .tribe_settings>h1,body.tribe_events_page_tribe-help #wpfooter,body.tribe_events_page_tribe-help .tribe_settings>h1{display:none}body.tribe-welcome #wpbody-content,body.tribe_events_page_tribe-help #wpbody-content{padding-bottom:25px}body.tribe-welcome .tribe-dependency-error,body.tribe_events_page_tribe-help .tribe-dependency-error{display:none}.tribe-events-admin-header__logo-word-mark{display:inline-block;height:auto;margin:0 0 26px;vertical-align:middle;width:312px}.tribe-events-admin-content-wrapper{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:0 0 30px}.tribe-events-admin-header{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:45px 0 0}.tribe-events-admin-header__right-image{height:280px;position:absolute;right:0;top:0;width:auto;z-index:-1}.tribe-events-admin-header__title{font-size:48px;line-height:48px;margin:0 0 18px}.tribe-events-admin-header__description{font-size:18px;line-height:28px;margin-bottom:44px;max-width:60%}.tribe-events-admin-tab-nav{display:flex;margin:0}.tribe-events-admin-tab-nav li{cursor:pointer;font-size:16px;font-weight:500;margin-bottom:0;margin-right:30px}.tribe-events-admin-tab-nav li:hover{color:#334aff}.tribe-events-admin-tab-nav .selected{border-bottom:3px solid #334aff;color:#334aff;padding-bottom:17px}.tribe-events-admin-tab-nav li:after{background:#334aff;border-radius:100px;bottom:0;content:"";display:block;height:3px;left:0;position:absolute;right:0}.tribe-events-admin__line{border-top:1px solid #e1e1e4}.tribe-events-admin-products-description{color:#0f1031;font-size:14px;line-height:2}.tribe-events-admin-products-card{align-items:center;border:1px solid #e1e1e4;border-radius:20px;display:flex;padding:10px 15px}.tribe-events-admin-products-card__icon{height:40px;-o-object-fit:contain;object-fit:contain;width:40px}.tribe-events-admin-products-card__group{margin:0 20px;max-width:55%}.tribe-events-admin-products-card__group-title{color:#0f1031;font-size:16px;font-weight:700;line-height:1;margin:0}.tribe-events-admin-products-card__group-description{font-size:12px;margin-top:5px}.tribe-events-admin-products-card__button{background-color:#fff;border:1px solid #e1e1e4;border-radius:20px;color:#0f1031;font-size:12px;font-weight:700;letter-spacing:1px;line-height:16px;margin-left:auto;padding:10px 15px;text-decoration:none;text-transform:uppercase}.tribe-events-admin-products-card__button:hover{background-color:#334aff;color:#fff}.tribe-events-admin-products-card__button:active,.tribe-events-admin-products-card__button:focus{box-shadow:none;outline:none}.tribe-events-admin-products-card__button--active,.tribe-events-admin-products-card__button--active:active,.tribe-events-admin-products-card__button--active:focus,.tribe-events-admin-products-card__button--active:hover{background:rgba(61,84,255,.16);color:#334aff;cursor:not-allowed;text-transform:uppercase}.tribe-events-admin-card--1up{width:100%}.tribe-events-admin-card--no-pad{padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__image{display:block;height:152px;margin:0;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{font-size:28px;line-height:34px;text-align:left}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin:0;padding:0;text-align:left}.tribe-events-admin-card--no-pad .tribe-events-admin-card__link{margin:0;padding:0}.tribe-events-admin-card--faq{display:inline-block;font-size:0;height:147px;margin:0 0 0 30px;padding:24px 16px 22px 20px;width:230px}.tribe-events-admin-card--faq:first-child{margin-left:0}.tribe-events-admin-card--faq img{float:left;height:22px;width:16px}.tribe-events-admin-card--faq .tribe-events-admin-faq__question{color:#334aff;font-size:16px;line-height:19px;margin:0 0 12px 26px;text-align:left}.tribe-events-admin-card--faq .tribe-events-admin-faq__answer{font-size:13px;line-height:16px;margin-left:26px;text-align:left}.tribe-events-admin-video{border-radius:16px;height:200px;margin-bottom:72px;-webkit-mask-image:-webkit-radial-gradient(circle,#fff 100%,#000 0);overflow:hidden;-webkit-transform:rotate(.000001deg)}.tribe-events-admin-video iframe{width:100%}.tribe-events-admin-card--promo-blue{background-color:#3d54ff;background-image:url(../images/welcome/promo.jpg)}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{color:#fff;font-size:16px;margin-bottom:16px;text-align:left}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__title{color:#fff;text-align:left}.tribe-events-admin-graphic{position:absolute;right:0;top:106px;z-index:-1}.tribe-events-admin-graphic--desktop-only{display:none}.tribe-events-admin-graphic--mobile-only{display:block}.tribe-events-admin-card__form{position:relative}input[type=email].tribe-events-admin-card__input{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;font-size:14px;height:54px}input[type=email].tribe-events-admin-card__input:-ms-input-placeholder{color:rgba(15,16,49,.72);letter-spacing:.5px;padding-left:10px}input[type=email].tribe-events-admin-card__input::placeholder{color:rgba(15,16,49,.72);letter-spacing:.5px;padding-left:10px}.tribe-events-admin-container,.tribe-events-admin-content-wrapper.tribe-events-admin-container{margin:0 auto;max-width:1024px;width:90%}.tribe-events-admin-2col-grid{display:grid;grid-gap:15px 30px;gap:15px 30px;grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-3col-grid{display:grid;grid-gap:30px;gap:30px;grid-template-areas:". . .";grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-4col-grid{display:grid;grid-gap:30px;gap:30px;grid-template-areas:". . . .";grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-products{margin:10px 0 0}.tribe-events-admin-quick-nav{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;display:block;margin:40px 0 78px;padding:18px 23px 2px}.tribe-events-admin-quick-nav__link{color:#3d54ff;font-size:16px;font-weight:700;line-height:18px;text-align:center;text-decoration:none}.tribe-events-admin-quick-nav__link:hover{color:#161b7d}.tribe-events-admin-quick-nav__link-item{display:block;padding-bottom:19px}.tribe-events-admin-quick-nav__links{display:inline}.tribe-events-admin-quick-nav__title{color:rgba(15,16,49,.72);display:inline-block;font-size:14px;font-weight:400;line-height:16px;padding-bottom:14px;text-transform:uppercase}.tribe-events-admin-title{padding-top:14px}.tribe-events-admin-title__description{color:#0f1031;font-size:16px;font-weight:400;line-height:24px;max-width:584px;padding-top:15px}.tribe-events-admin-title__heading{color:#0f1031;display:inline-block;font-size:24px;font-weight:700;line-height:28px;margin:5px 0 0}.tribe-events-admin-title__logo{margin-right:8px;vertical-align:top;width:34px}.tribe-events-admin-notice{background-color:#3d54ff;height:65px}.tribe-events-admin-notice .tribe-events-admin-content-wrapper{padding-bottom:0;padding-top:8px}.tribe-events-admin-notice p{color:#fff;display:inline-block;font-family:Helvetica;font-size:16px;line-height:18px;margin-top:0;padding-bottom:12px;padding-left:16px;vertical-align:middle;width:calc(100% - 60px)}.tribe-events-admin-notice__logo{display:inline-block}.tribe-events-admin-tickets .tribe-events-admin-section-header{font-size:28px;line-height:32px}.tribe-events-admin-tickets .tribe-events-admin-graphic--desktop-only{width:365px}.tribe-events-admin-tickets .tribe-events-admin-graphic--mobile-only{top:230px;width:300px}.tribe-events-admin-tickets .tribe-events-admin-title__heading{margin-top:0}.tribe-events-admin-tickets .tribe-events-admin-title__logo{margin-right:4px;width:32px}.tribe-events-admin-kb{margin:10px 0 0}.tribe-events-admin-kb-card{border:1px solid #e1e1e4;border-radius:20px}.tribe-events-admin-kb-card__image{height:auto;width:100%}.tribe-events-admin-kb-card__title{color:#0f1031;flex-grow:0;font-size:20px;font-weight:700;line-height:1.2;margin:0;padding:20px 28px 10px}.tribe-events-admin-kb-card__links{margin:0;padding:0 28px 25px}.tribe-events-admin-kb-card__links li{margin:0 0 10px}.tribe-events-admin-kb-card__links li a{color:#334aff;font-size:14px;line-height:1.2;text-decoration:none}.tribe-events-admin-kb-card__links li a:focus{box-shadow:none;outline:none}.tribe-events-admin-kb-card__links li a:hover{color:#1c39bb}.tribe-events-admin-section-header{align-items:center;display:flex;justify-content:space-between;margin:50px 0 0}.tribe-events-admin-section-header h3{color:#0f1031;font-size:28px;font-weight:700;line-height:1}.tribe-events-admin-section-header a{border-bottom:2px solid #334aff;color:#334aff;font-size:14px;padding-bottom:2px;text-decoration:none}.tribe-events-admin-section-header a:focus{box-shadow:none;outline:none}.tribe-events-admin-section-header a:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin-faq{margin:10px 0 0}.tribe-events-admin-faq-card{border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;padding:24px 15px 19px 19px}.tribe-events-admin-faq-card a{color:#0f1031}.tribe-events-admin-faq-card a:focus{box-shadow:none;outline:none}.tribe-events-admin-faq-card a:hover{color:#1c39bb}.tribe-events-admin-faq-card__icon img{height:22px;width:16px}.tribe-events-admin-faq-card__content{margin-left:10px}.tribe-events-admin-faq__question,.tribe-events-admin-faq__question a{color:#334aff;font-size:16px;text-decoration:none}.tribe-events-admin-faq__question a:focus{box-shadow:none;outline:none}.tribe-events-admin-faq__question a:hover{color:#1c39bb}.tribe-events-admin-faq__answer{color:#0f1031;font-size:13px;margin-top:18px}.tribe-events-admin-extensions-title{color:#0f1031;font-size:16px;line-height:1.5;margin:0 0 30px;max-width:70%}.tribe-events-admin-extensions{margin:10px 0 0}.tribe-events-admin-extensions-card{border:1px solid #e1e1e4;border-radius:20px;border-top:8px solid #334aff;padding:48px 35px 24px 25px}.tribe-events-admin-extensions-card__title{font-size:20px;margin:0}.tribe-events-admin-extensions-card__title a{color:#0f1031;font-family:Helvetica;font-size:20px;font-weight:700;line-height:1.2;text-decoration:none}.tribe-events-admin-extensions-card__title a:active,.tribe-events-admin-extensions-card__title a:focus,.tribe-events-admin-extensions-card__title a:hover{box-shadow:none;color:#334aff}.tribe-events-admin-extensions-card__description{color:#0f1031;font-family:Helvetica;font-size:14px;line-height:1.43;margin:20px 0}.tribe-events-admin-cta{align-items:center;border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;margin:60px 0}.tribe-events-admin-cta__image{height:152px;-o-object-fit:contain;object-fit:contain;width:auto}.tribe-events-admin-cta__content,.tribe-events-admin__troubleshooting-cta{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:20px 0;width:100%}.tribe-events-admin-cta__content-title{color:#0f1031;font-size:28px;font-weight:700;line-height:normal;margin:0 0 10px;text-align:center}.tribe-events-admin-cta__content-subtitle{color:#0f1031;font-size:16px;line-height:1.5;margin-bottom:10px;text-align:center}.tribe-events-admin-cta__content-description a{border-bottom:2px solid #334aff;color:#334aff;font-size:16px;font-weight:700;padding-bottom:2px;text-decoration:none}.tribe-events-admin-cta__content-description a:focus{box-shadow:none;outline:none}.tribe-events-admin-cta__content-description a:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin-footer-logo{display:inline-block;vertical-align:middle;width:228px}.tribe-events-admin-step{margin:10px 0 0}.tribe-events-admin-step-card{border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;padding:24px 15px 19px 19px}.tribe-events-admin-step-card a{border-bottom:2px solid #334aff;color:#334aff;padding-bottom:2px;text-decoration:none}.tribe-events-admin-step-card a:focus{box-shadow:none;outline:none}.tribe-events-admin-step-card a:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin-step-card__icon img{height:43px;margin-right:5px;width:42px}.tribe-events-admin-step-card__content{margin-left:10px}.tribe-events-admin-step__title{color:#0f1031;font-size:20px;font-weight:700;line-height:1.2;margin-bottom:10px}.tribe-events-admin-step__answer{color:#0f1031;font-size:13px;margin-top:18px}.tribe-events-admin__system-information{display:grid;grid-gap:15px 30px;gap:15px 30px;grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr;margin:100px 0;position:relative}.tribe-events-admin__troubleshooting-title{color:#0f1031;font-size:28px;font-weight:700;line-height:1;margin:0}.tribe-events-admin__troubleshooting-description{color:#0f1031;font-size:18px;line-height:1.2;line-height:1.44;margin:20px 0}.tribe-events-admin__system-information-select{display:flex;margin:30px 0 20px}.tribe-events-admin__system-information-select input[type=checkbox]{margin:0 10px 0 0}.tribe-events-admin__system-information-select label{color:#0f1031;font-size:16px;line-height:1.2}.tribe-events-admin__system-information-content small{color:#0f1031;font-size:12px;line-height:1.2}.tribe-events-admin__recent-template-changes .template-updates-wrapper,.tribe-events-admin__system-information-widget{background:#0f1031;border-radius:16px;color:#fff;font-size:14px;line-height:1.14;max-height:280px;overflow:scroll;-ms-overflow-style:none;padding:12px 0 0 27px;scrollbar-width:none}.tribe-events-admin__system-information-widget a{color:#334aff}.tribe-events-admin__system-information-widget a:hover{opacity:.8}.tribe-events-admin__recent-template-changes .template-updates-wrapper{padding:30px 0 30px 27px}.tribe-events-admin__recent-template-changes .template-updates-wrapper::-webkit-scrollbar,.tribe-events-admin__system-information-widget::-webkit-scrollbar{display:none}.tribe-events-admin__system-information-widget-copy{bottom:10px;position:absolute}.tribe-events-admin__system-information-widget-copy button{background-color:#334aff;border:none;border-radius:100px;color:#fff;cursor:pointer;font-size:16px;font-weight:700;outline:none;padding:18px 25px;text-align:center}.tribe-events-admin__system-information-widget-copy button:hover{background-color:#1c39bb}.tribe-events-admin__system-information-widget-copy button .dashicons,.tribe-events-admin__system-information-widget-copy button .dashicons-before:before{display:none}.tribe-events-admin__system-information-widget-copy button .optin-success{color:#fff;font-size:16px;font-weight:700;text-align:center}.tribe-events-admin__recent-template-changes p{color:#0f1031;font-size:18px;line-height:1.2;line-height:1.44;margin:20px 0}.tribe-events-admin__recent-log{margin-top:50px}.tribe-events-admin__troubleshooting-event-log-wrapper label{color:#0f1031;display:block;font-size:16px;line-height:1.63;margin-bottom:10px}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-controls{margin:20px 0 10px}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-viewer{background:#0f1031;border-radius:16px;color:#fff;font-size:14px;line-height:1.14;max-height:280px;min-height:60px;overflow:scroll;-ms-overflow-style:none;padding:12px 0 0 27px;scrollbar-width:none}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-viewer::-webkit-scrollbar{display:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log{border-bottom:2px solid #334aff;color:#334aff;font-size:16px;padding-bottom:2px;text-decoration:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log:focus{box-shadow:none;outline:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin__troubleshooting-event-log-wrapper .tribe-events-admin__recent-log-filters-select-wrapper:after{display:none}.tribe-events-admin__recent-log-filters{display:flex;padding:20px 0 40px}.tribe-events-admin__recent-log-filters-field{margin-right:40px}.tribe-events-admin__recent-log-filters-select-wrapper:after{content:url(../images/help/polygon.svg);height:13px;pointer-events:none;position:absolute;right:22px;top:20px;width:14px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default .select2-selection--single{border:1px solid #e1e1e4!important;border-radius:16px;color:#0f1031;font-size:14px;line-height:1.14;padding:0 25px 0 15px!important}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls{margin-bottom:20px;padding:0}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:first-child,.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(2),.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(3){padding-right:75px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-selection__clear{display:none}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow{right:5px}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:16px;border-bottom-right-radius:16px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container .select2-selection--single .select2-selection__rendered{width:100%}.tribe-events-admin__recent-log-filters-select-wrapper select.focus-visible,.tribe-events-admin__recent-log-filters-select-wrapper select:focus-visible{outline:none}.tribe-events-admin__recent-log-filters-select-wrapper select option{color:#0f1031;font-size:14px;line-height:1.14}.tribe-events-admin__ea-status{margin-top:50px}.tribe-events-admin__issues-found-card{background-color:#f3eee8;border-radius:8px;margin-bottom:20px}.tribe-events-admin__issues-found-card:last-of-type{margin-bottom:100px}.tribe-events-admin__issues-found-card-title{align-items:center;cursor:pointer;display:flex;padding:10px 20px 10px 17px;position:relative}.tribe-events-admin__issues-found-card-title img{height:21px;margin-right:14px;-o-object-fit:contain;object-fit:contain;width:21px}.tribe-events-admin__issues-found-card-title h3{margin:0}.tribe-events-admin__issues-found-card-title span{color:#0f1031;display:block}.tribe-events-admin__issues-found-card-title i{background-image:url(../images/help/arrow-down.svg);background-position:50%;background-repeat:no-repeat;background-size:contain;height:15px;margin:12px 20px;position:absolute;right:0;top:0;transition:all .3s ease;width:15px}.tribe-events-admin__issues-found-card-title.active i{background-image:url(../images/help/arrow-up.svg);background-repeat:no-repeat;top:5px}.tribe-events-admin__issues-found-card-description{display:none;padding:0 20px 20px 55px}.tribe-events-admin__issues-found-card-description p{color:#0f1031;font-size:16px;margin:0}.tribe-events-admin__issues-found-card-description-actions{display:flex;padding:20px 0 10px}.tribe-events-admin__issues-found-card-description-actions a{border-bottom:2px solid #334aff;color:#334aff;font-size:16px;margin-right:20px;padding-bottom:5px;text-decoration:none}.tribe-events-admin__issues-found-card-description-actions a:focus{box-shadow:none;outline:none}.tribe-events-admin__issues-found-card-description-actions a:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin__ea-status-table-wrapper{overflow-x:auto}.tribe-events-admin__ea-status-table{border:1px solid #e1e1e4;border-radius:16px;margin:30px 0 40px;overflow:hidden}.tribe-events-admin__ea-status-table a{border-bottom:2px solid #334aff;color:#334aff;padding-bottom:2px;text-decoration:none}.tribe-events-admin__ea-status-table a:focus{box-shadow:none;outline:none}.tribe-events-admin__ea-status-table a:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin__ea-status-table tr{display:flex;align-items:center}.tribe-events-admin__ea-status-table th{color:#0f1031;font-weight:700;line-height:1.17;margin-top:10px;padding:5px 25px}.tribe-events-admin__ea-status-table td{align-items:center;color:#0f1031;display:flex;font-size:16px;line-height:1.63;padding:10px 25px;width:25%}.tribe-events-admin__ea-status-table td:nth-child(2){width:45%}.tribe-events-admin__ea-status-table td:nth-child(3){display:flex;justify-content:flex-end;width:30%}.tribe-events-admin__ea-status-table-dark{background-color:#f9f7f4}.tribe-events-admin__ea-status-table td img{height:21px;margin-right:14px;-o-object-fit:contain;object-fit:contain;width:21px}.tribe_events_page_tec-troubleshooting{background-color:#fff}#tribe-community,#tribe-ticketing{display:none}.tribe-events-admin__troubleshooting-notice{background-color:#161b7d;color:#fff;font-size:16px;line-height:1;margin-left:-1.55vw;padding:24px 0}.tribe-events-admin__troubleshooting-notice_title{margin:0 auto;max-width:1024px;padding-left:25px;width:90%}.tribe-events-admin__troubleshooting-notice_title a{border-bottom:2px solid #fff;color:#fff;font-size:16px;line-height:1;padding-bottom:2px;text-decoration:none}.tribe-events-admin__troubleshooting-notice_title a:focus{box-shadow:none;outline:none}.tribe-events-admin__troubleshooting-notice_title a:hover{border-bottom:2px solid #f3eee8;color:#f3eee8}.tribe_events_page_tribe-help #tec-help-community,.tribe_events_page_tribe-help #tec-help-ticketing{display:none}.tribe_events_page_tribe-help .tribe-events-admin-title{padding-top:25px}.tribe_events_page_tribe-help .tribe-events-admin-title img{height:67px}body.tribe-welcome #fs_connect{border:1px solid #e1e1e4;border-radius:16px;box-shadow:none;box-sizing:border-box;margin-left:22px}body.tribe-welcome #fs_connect .fs-actions{background-color:transparent}body.tribe-welcome #fs_connect .fs-permissions{border-top:1px solid #e1e1e4;margin:0 16px}body.tribe-welcome #fs_connect button{background-color:#3d54ff;border-color:#3d54ff}body.tribe-welcome #fs_connect .button-secondary{background:#fff;border-color:#3d54ff;color:#3d54ff}body.tribe-welcome #fs_connect a{color:#3d54ff}body.tribe-welcome #fs_connect a:focus{box-shadow:none;outline:none}body.tribe-welcome #fs_connect a:hover{color:#161b7d}@media only screen and (-o-min-device-pixel-ratio:2/1),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){#tribe-loading span{background-image:url(../images/tribe-loading@2x.gif)}}@media screen and (max-width:782px){.tribe-half-column,.tribe-row .tribe-half-column:last-child{margin:0 0 20px;width:100%}input[type=email]{width:100%}.events-cal .subsubsub{float:none}.events-cal .search-box{width:98%}.events-cal #search-submit{width:100%}.events-cal .tablenav.top{display:none}}@media screen and (min-width:500px){.api-check .tribe-mascot{display:block}.api-check .notice-content{margin-right:180px}}@media screen and (min-width:320px){.tribe-marketing-notice .tribe-marketing-notice__icon{display:block}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px}}@media screen and (min-width:600px) and (max-width:782px){.tribe-marketing-notice .tribe-marketing-notice__content{margin-left:145px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px;padding:0}}@media screen and (min-width:782px){.tribe-marketing-notice .tribe-marketing-notice__content{margin-left:130px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px;padding:0}.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe-welcome .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:642px}}@media screen and (min-width:400px){.notice-tribe-banner .tribe-marketing-notice__icon{width:67px}}@media screen and (min-width:800px){.notice-tribe-banner h3{display:inline-block;font-size:1rem;margin:0 .5rem 0 0}.notice-tribe-banner a{line-height:1.5}.notice-tribe-banner a,.notice-tribe-banner p{font-size:1rem}.notice-tribe-banner p{margin:0 .5rem 0 0}.notice-tribe-banner .tribe-marketing-notice__cta{display:inline-block;margin-left:.5rem}}@media screen and (min-width:1215px){.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:992px}.tribe-welcome .notice-tribe-banner .tribe-marketing-notice{max-width:1036px}}@media screen and (min-width:710px){.tribe-events-admin-content-wrapper{width:670px}.tribe-events-admin-card--2up{display:inline-block;width:calc(50% - 20px)}.tribe-events-admin-card--2up.tribe-events-admin-card--first{margin-right:36px}.tribe-events-admin-card--2up.tribe-events-admin-card--last{margin-right:0}.tribe-events-admin-card--2up .tribe-events-admin-card__image{height:100px;margin-bottom:12px}.tribe-events-admin-card--2up .tribe-events-admin-card__title{margin-bottom:27px;max-width:340px}.tribe-events-admin-card--3up{display:inline-block;margin-bottom:32px;width:calc(50% - 18px)}.tribe-events-admin-card--3up.tribe-events-admin-card--first{margin-right:32px}.tribe-events-admin-card--3up.tribe-events-admin-card--middle{margin-right:0}.tribe-events-admin-card__title{font-size:20px;line-height:23px}.tribe-events-admin-section-header{font-size:28px;line-height:32px;margin-bottom:21px}.tribe-events-admin-card--1up{display:inline-block;margin-left:32px;width:calc(50% - 18px)}.tribe-events-admin-card--1up .tribe-events-admin-card__description{height:71px}.tribe-events-admin-card--1up .tribe-events-admin-card__image{margin-bottom:28px}.tribe-events-admin-card--no-pad{height:154px;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{margin-left:50%;padding:42px 0 10px}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin-left:50%}.tribe-events-admin-card--promo-blue{display:block;margin-left:0;min-height:170px;width:100%}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{float:left;max-width:300px}.tribe-events-admin-graphic{max-width:250px;top:0}.tribe-events-admin-graphic--desktop-only{display:block}.tribe-events-admin-graphic--mobile-only{display:none}.tribe-events-admin-card__form{float:right;width:300px}input[type=email].tribe-events-admin-card__input{width:300px}.tribe-events-admin-title{padding-top:50px}.tribe-events-admin-title__description{padding-top:15px}.tribe-events-admin-title__heading{font-size:48px;line-height:55px;margin:0}.tribe-events-admin-title__logo{margin-right:14px;padding-top:5px;width:40px}.tribe-events-admin-tickets .tribe-events-admin-card__title{font-size:18px}.tribe-events-admin-tickets .tribe-events-admin-card--2up .tribe-events-admin-card__title{font-size:18px;height:66px}.tribe-events-admin-tickets .tribe-events-admin-title__logo{margin-right:8px;padding-top:4px;width:60px}}@media screen and (min-width:1217px){.tribe-events-admin-content-wrapper{max-width:1060px;width:100%}.tribe-events-admin-card--2up{margin-right:36px;width:486px}.tribe-events-admin-card--3up{width:310px}.tribe-events-admin-card--3up.tribe-events-admin-card--first,.tribe-events-admin-card--3up.tribe-events-admin-card--middle{margin-right:36px}.tribe-events-admin-card--3up.tribe-events-admin-card--last{margin-right:0}.tribe-events-admin-quick-nav{padding:0 36px}.tribe-events-admin-card--1up{margin:0 0 36px;padding:33px 44px 30px;text-align:left;width:1012px}.tribe-events-admin-card--1up .tribe-events-admin-card__description{height:auto}.tribe-events-admin-card--1up .tribe-events-admin-card__image{float:left;margin:0 48px 10px 0}.tribe-events-admin-card--no-pad{padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__image{margin:0;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{margin-left:50%;padding:42px 0 10px}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin-left:50%}.tribe-events-admin-card--promo-blue{min-height:150px}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{max-width:450px}.tribe-events-admin-graphic{max-width:none}.tribe-events-admin-card__form,input[type=email].tribe-events-admin-card__input{width:365px}.tribe-events-admin-quick-nav{border-radius:100px;display:inline-block;height:54px;margin:24px 0 94px;max-width:1010px;padding:0 36px 0 0}.tribe-events-admin-quick-nav__link-item{display:inline-block;padding:18px 10px 0}.tribe-events-admin-quick-nav__title{padding:19px 6px 17px 32px}.tribe-events-admin-tickets .tribe-events-admin-card--2up .tribe-events-admin-card__title{height:auto}}@media screen and (max-width:768px){.tribe-events-admin-header__logo-word-mark{width:285px}.tribe-events-admin-header__right-image{height:160px}.tribe-events-admin-header__description{max-width:100%}.tribe-events-admin-tab-nav li{margin-right:20px}.tribe-events-admin-tab-nav .selected{border-bottom:2px solid #334aff;padding-bottom:10px}.tribe-events-admin-2col-grid{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr))}.tribe-events-admin-3col-grid{grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr))}.tribe-events-admin-extensions-title{max-width:100%}.tribe-events-admin-cta{align-items:flex-start;flex-direction:column;overflow:hidden}.tribe-events-admin-footer-logo{width:225px}.tribe-events-admin__system-information{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr));margin:50px 0}}@media screen and (max-width:480px){.tribe-events-admin-header__logo-word-mark{width:260px}.tribe-events-admin-header__right-image{height:120px}.tribe-events-admin-header__title{font-size:35px}.tribe-events-admin-header__description{max-width:100%}.tribe-events-admin-tab-nav{border:1px solid #e1e1e4;border-radius:20px;flex-direction:column;padding:18px 22px}.tribe-events-admin-tab-nav li{margin-bottom:18px;margin-right:0}.tribe-events-admin-tab-nav .selected{border-bottom:2px solid #334aff;padding-bottom:10px;width:-moz-fit-content;width:fit-content}.tribe-events-admin__line{border:none}.tribe-events-admin-products-card,.tribe-events-admin-products-description{display:none}.tribe-events-admin-container,.tribe-events-admin-content-wrapper.tribe-events-admin-container{max-width:90%}.tribe-events-admin-2col-grid,.tribe-events-admin-3col-grid,.tribe-events-admin-4col-grid{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr))}.tribe-events-admin-section-header{margin:0}.tribe-events-admin-extensions-title{max-width:100%}.tribe-events-admin-cta__image{height:auto;width:90%}.tribe-events-admin-cta__content,.tribe-events-admin__troubleshooting-cta{align-items:flex-start;padding:32px 23px 45px;width:auto}.tribe-events-admin-cta__content-title{font-size:22px;text-align:left}.tribe-events-admin-cta__content-subtitle{text-align:left}.tribe-events-admin-footer-logo{width:210px}.tribe-events-admin__system-information{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr));margin:50px 0}.tribe-events-admin__troubleshooting-notice{margin-left:-20px}.tribe-events-admin__troubleshooting-notice_title{max-width:90%}}@media screen and (min-width:1200px){.tribe-events-admin-products-card__group{max-width:47%}}@media screen and (min-width:500px) and (max-width:1080px){.tribe-events-admin-4col-grid{grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr))}}@media screen and (max-width:1080px){.tribe-events-admin-cta__content-title{font-size:24px}}@media only screen and (max-width:1920px){.tribe-events-admin__system-information-widget-copy{right:20.5vw}}@media only screen and (max-width:1280px){.tribe-events-admin__system-information-widget-copy{right:22vw}}@media only screen and (max-width:768px){.tribe-events-admin__system-information-widget-copy{left:10px;right:auto}.tribe-events-admin__recent-log-filters{flex-direction:column}.tribe-events-admin__recent-log-filters-field{margin-bottom:30px;margin-right:0}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:first-child,.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(2),.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(3){padding-right:30px}.tribe-events-admin__issues-found-card-title h3{max-width:90%}}@media only screen and (max-width:480px){.tribe-events-admin__system-information-widget-copy{left:10px;right:auto}.tribe-events-admin__recent-log-filters{flex-direction:column}.tribe-events-admin__recent-log-filters-field{margin-bottom:30px;margin-right:0}.tribe-events-admin__recent-log-filters-select-wrapper:after{right:25px}.tribe-events-admin__issues-found-card-title h3{max-width:80%}.tribe-events-admin__ea-status-table{overflow:scroll}.tribe-events-admin__ea-status-table td{min-width:150px}.tribe-events-admin__ea-status-table td:nth-child(2),.tribe-events-admin__ea-status-table td:nth-child(3){width:100%}}
|
1 |
+
.invalid input,input:out-of-range{border:2px solid red!important}.valid input{border:1px solid green}.clearfix{zoom:1}.placeholder{color:#999;cursor:text;padding:4px}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::placeholder,textarea::placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.bubble{background-color:#f9f9f9;border:1px solid #dfdfdf;border-radius:3px;border-spacing:0;padding:10px}.tribe-sticky-tooltip{color:#bbb}td.tribe_message{padding-bottom:10px!important}#tribe_thanks{float:left;margin:5px 0 0;width:200px}.tribe_brand{font-family:Georgia,serif!important;font-size:17px!important;font-weight:400;margin:8px 0}.tribe-rating{color:#3d54ff}.tribe-rating:hover{color:#1c39bb}#tribe-upgrade{background:#f6f6f6;border:1px solid #ccc;border-radius:5px;margin:20px 0 30px;padding:0 20px 20px}#tribe-upgrade .message{background-color:#ffffe0;border:1px solid #e6db55;border-radius:3px;padding:6px 12px}table.plugins .tribe-plugin-update-message{background:#d54e21;color:#fff;display:inline-table;margin:6px 0;padding:10px 12px}table.plugins .tribe-plugin-update-message h4{display:inline;font-weight:700;margin-right:8px}table.plugins .tribe-plugin-update-message h4:after{content:" \00BB "}table.plugins .tribe-plugin-update-message a{color:#fff;text-decoration:underline}.tribe-settings-form{max-width:1000px}.tribe-settings-form fieldset{clear:both;display:inline-block;padding:10px 0}.tribe-settings-form fieldset.tribe-field-license_key legend{width:auto}.tribe-settings-form legend{float:left;font-weight:700;margin-right:20px;width:220px}.tribe-settings-form .tribe-field-wrap{float:left;max-width:500px}.tribe-settings-form .tribe-field-wrap :first-child{margin-top:0}.tribe-settings-form .tribe-field-checkbox_list label,.tribe-settings-form .tribe-field-radio label{display:block;margin:5px 0 5px 20px;text-indent:-20px}.tribe-settings-form .tribe-field-checkbox_list label>p,.tribe-settings-form .tribe-field-radio label>p{margin-left:1px;text-indent:0}.tribe-settings-form .tribe-field-checkbox_list label input,.tribe-settings-form .tribe-field-radio label input{margin-right:5px}.tribe-settings-form .tribe-settings-form-wrap .description,.tribe-settings-form .tribe-settings-form-wrap fieldset,.tribe-settings-form fieldset[id^=tribe-field-geoloc_]{padding-left:12px}.tribe-settings-form .tribe-settings-form-wrap fieldset .description{margin-left:0;max-width:450px;padding-left:0}.tribe-settings-form .tribe-settings-form-wrap fieldset .tribe-style-selection{margin-bottom:18px}.tribe-settings-form .tribe-settings-form-wrap #tribe-field-stylesheetOption .description{color:#999;margin-left:1px}.tribe-settings-form .tribe-settings-form-wrap h3{background-color:#f9f9f9;margin-bottom:10px;padding:6px 0 6px 12px}.tribe-settings-form .tribe-settings-form-wrap .contained,.tribe-settings-form .tribe-settings-form-wrap .system-info,.tribe-settings-form .tribe-settings-form-wrap .tribe-sysinfo-optin-msg,.tribe-settings-form .tribe-settings-form-wrap h3+p{margin:0 0 10px;padding-left:12px}.tribe_settings .tribe-field-indent{margin-left:245px}.tribe_settings #pu_dashboard_message{display:none}.tribe_settings .tribe-errors-list{margin-left:15px}.tribe_settings .expiring-license{color:red}.tribe_settings .tribe-error{border:1px solid red}.tribe_settings .tribe-field-description{margin-bottom:0;position:relative;top:-12px}.tribe_settings #ical-link{top:-14px}#modern-tribe-info{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;margin:20px 0;padding:8px 20px 12px}#modern-tribe-info img{margin:10px 0}#modern-tribe-info ul{list-style:disc;margin-left:20px}#modern-tribe-info ul ul{list-style:circle}.tribe-field-inline-dropdown{margin-left:0;margin-right:0}.tribe-field-inline-text{line-height:28px;margin:0 2px}.tribe-field-textarea.tribe-size-small textarea{height:60px;width:180px}.tribe-field-textarea.tribe-size-medium textarea{height:80px;width:300px}.tribe-field-textarea.tribe-size-large textarea{height:120px;width:450px}.tribe-field-email.tribe-size-small input,.tribe-field-license_key.tribe-size-small input,.tribe-field-text.tribe-size-small input{width:50px}.tribe-field-email.tribe-size-medium input,.tribe-field-license_key.tribe-size-medium input,.tribe-field-text.tribe-size-medium input{width:225px}.tribe-field-email.tribe-size-large input,.tribe-field-license_key.tribe-size-large input,.tribe-field-text.tribe-size-large input{width:450px}.tribe-field-dropdown.tribe-size-small select{width:100px}.tribe-field-dropdown.tribe-size-medium select{width:300px}.tribe-field-dropdown.tribe-size-large select{width:450px}.tribe-field-wrapped_html.tribe-size-large .tribe-field-wrap{max-width:600px}.tribe-field-wrapped_html.tribe-size-large .tribe-field-wrap .description{max-width:100%}.tribe-field-dropdown_chosen.tribe-size-small select{width:100px}.tribe-field-dropdown_chosen.tribe-size-medium select{width:200px}.tribe-field-dropdown_chosen.tribe-size-large select{width:300px}.tribe-field-wrap .tooltip:first-child{font-style:normal}.tribe-field.indent{margin-left:252px;width:75%}.tribe-field.indent legend{font-weight:400;width:auto}.tribe-field.indent .tribe-field-wrap{padding-right:12px}.tribe-field.indent.tribe-field-radio .tribe-field-wrap{clear:left;margin-top:12px}.tribe-field.light-bordered{background-color:#fff;border:1px solid #d3d3d3}.ajax-loading-license,.invalid-key,.valid-key{display:none;margin:0 5px}.ajax-loading-license{position:relative;top:5px}.key-validity{display:inline-block}.invalid-key,.optin-fail{color:red}.optin-success,.valid-key{color:green}.valid-key.service-msg{color:#b72}#additional-field-table{margin-bottom:20px}.tribe-admin-box-left{float:left;width:20%}.tribe-admin-box-left,.tribe-admin-box-right{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;margin:20px 0;padding:0 20px 15px}.tribe-admin-box-right{float:right;width:68%}.ajax-loader{float:right;margin:10px}.tribe-arrangeable-item{border:1px solid #d3d3d3;border-radius:3px}.tribe-arrangeable-item .ui-state-default{border:none}.tribe-arrangeable-item-top{padding:6px}.tribe-arrangeable-item-top:hover{cursor:move}.tribe-arrangeable-action{float:right}.tribe-arrangeable-child{background-color:#f9f9f9;border-top:1px solid #d3d3d3;display:none;padding:25px}.tribe-arrangeable-child label{display:block;margin:0 0 7px}.tribe_events_active_filter_type_options{margin:10px 0}.tribe_events_active_filter_type_options label{margin:7px 0}#event_organizer td small,.OrganizerInfo td small{display:block;margin:0;max-width:250px}#event_organizer .organizer-email,.OrganizerInfo .organizer-email{vertical-align:top}.tribe-table-field-label{max-width:100%;width:200px}#tribe-help-general,#tribe-help-sidebar{float:left;margin-top:20px}#tribe-help-general p{margin-left:15px}#tribe-help-general ul{list-style-type:square}#tribe-help-general ol,#tribe-help-general ul{margin-bottom:20px;margin-left:35px}#tribe-help-general h3{background-color:#f9f9f9;margin-bottom:10px;padding:6px 0 6px 12px}#tribe-help-general h3~h3{margin-top:2.25em}#tribe-help-general h3+p{margin:0 0 20px;padding-left:12px}#tribe-help-general{width:65%}.tribe-help-section{padding-bottom:10px}.tribe-section-type-box{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;padding:8px 20px 12px}.tribe-section-type-box img{height:auto;margin:10px 0;max-width:300px}.tribe-section-type-box ul{list-style:disc;margin-left:20px}.tribe-section-type-box ul ul{list-style:circle}#tribe-log-controls{padding-bottom:1rem;padding-left:12px}#tribe-log-controls>div{display:inline-block;padding-right:1rem}#tribe-log-controls .working{opacity:1;transition:opacity .2s}#tribe-log-controls .working.hidden{opacity:0;transition:opacity .2s}#tribe-log-viewer,#tribe-system-info dl.support-stats,.template-updates-wrapper{background:#000;border-radius:2px;color:#888;max-height:400px;overflow:scroll;padding:10px}#tribe-system-info dl.support-stats dt,.template-updates-wrapper dt{clear:both;float:left;font-weight:700;text-transform:uppercase;width:25%}#tribe-system-info dl.support-stats dd,.template-updates-wrapper dd{margin-left:25%;padding-left:10px}.system-info-copy .system-info-copy-btn{padding:6px}.system-info-copy .system-info-copy-btn .dashicons{padding-right:10px}.template-updates-wrapper p{margin-top:0}#tribe-help-sidebar{margin:20px 0 0 3%;max-width:225px;width:32%}.tribe-help-plugin-info{border:1px solid #ccc;padding:0 12px 12px}.tribe-help-plugin-info dd,.tribe-help-plugin-info dt{display:inline;margin:0}.tribe-help-plugin-info dt{font-weight:700}.tribe-help-plugin-info dd:after{content:"";display:block;height:.4em}.tribe-help-plugin-info dd:last-child:after{height:0}.tribe-help-plugin-info+.tribe-help-plugin-info{margin-top:20px}.tribe-help-plugin-info>div{line-height:2em}.tribe-help-plugin-info .star-rating{display:inline-block;margin-left:3px;position:relative;top:-2px}.tribe-help-plugin-info .tribe-list-addons{color:#21a6cb;font-size:24px;list-style:circle inside;margin-bottom:10px;margin-top:10px;padding-left:4px}.tribe-help-plugin-info .tribe-list-addons a{font-size:13px;left:-5px;position:relative;top:-5px}.tribe-help-plugin-info .tribe-list-addons .tribe-active-addon{list-style:disc inside}.ui-widget-overlay{background:#666;filter:alpha(opacity=50);opacity:.5}.ui-widget-shadow{background:#000;border-radius:5px;filter:alpha(opacity=20);margin:-5px 0 0 -5px;opacity:.2;padding:5px}.ui-resizable{position:relative}.ui-resizable-handle{display:block;font-size:.1px;position:absolute;z-index:99999}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;left:0;top:-5px;width:100%}.ui-resizable-s{bottom:-5px;cursor:s-resize;height:7px;left:0;width:100%}.ui-resizable-e{cursor:e-resize;height:100%;right:-5px;top:0;width:7px}.ui-resizable-w{cursor:w-resize;height:100%;left:-5px;top:0;width:7px}.ui-resizable-se{bottom:1px;cursor:se-resize;height:12px;right:1px;width:12px}.ui-resizable-sw{bottom:-5px;cursor:sw-resize;height:9px;left:-5px;width:9px}.ui-resizable-nw{cursor:nw-resize;height:9px;left:-5px;top:-5px;width:9px}.ui-resizable-ne{cursor:ne-resize;height:9px;right:-5px;top:-5px;width:9px}.ui-dialog{padding:.2em;position:relative;width:375px}.ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em}.ui-dialog .ui-dialog-titlebar-close{height:18px;margin:-10px 0 0;padding:1px;position:absolute;right:.3em;top:50%;width:19px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin-left:-8px;margin-top:-8px}.ui-dialog .ui-dialog-titlebar-close:focus,.ui-dialog .ui-dialog-titlebar-close:hover{padding:0}.ui-dialog .ui-dialog-content{background:none;border:0;overflow:auto;padding:.5em 1em;zoom:1}.ui-dialog .ui-dialog-buttonpane{background-image:none;border-width:1px 0 0;margin:.5em 0 0;padding:.3em 1em .5em!important;text-align:right}.ui-dialog .ui-dialog-buttonpane button{cursor:pointer;line-height:1.4em;margin:.5em .4em!important;overflow:visible;padding:.2em .6em .3em;text-shadow:none;width:auto}.ui-dialog .ui-resizable-se{bottom:3px;height:14px;right:3px;width:14px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:none!important;text-align:center}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button .ui-button-text{display:block;line-height:1.4}#ui-datepicker-div{display:none}#tribe-loading{background:#fff;background:hsla(0,0%,100%,.8);display:none;height:100%;left:0;position:absolute;top:0;transition:all 1s linear;width:100%;z-index:4}#tribe-loading span{background:url(../images/tribe-loading.gif) 0 0 no-repeat;background-size:32px 32px;height:32px;left:50%;margin:-16px 0 0 -16px;position:absolute;top:50%;width:32px}.tribe_update_page{max-width:850px}.tribe-half-column{float:left;margin-bottom:30px;margin-right:5%;width:45%}.tribe-row:after,.tribe-row:before{content:"";display:table}.tribe-row,.tribe-row:after{clear:both}.tribe-row .tribe-half-column:last-child{margin-right:0;width:50%}.tribe_update_page h2{font-size:30px;line-height:1.2;margin-bottom:20px}.tribe_update_page h3{font-size:24px;font-weight:400;line-height:24px;margin-top:0}.tribe_update_page h4{font-size:18px;font-weight:600;line-height:18px;margin:0}.tribe_update_page p{font-size:15px}p.tribe-update-message{font-size:18px;font-weight:400}.tribe_update_page h4:before{content:"\f145";font-family:dashicons;font-size:34px;line-height:1;margin-right:5px;position:relative;top:5px}a.tribe-rating-link{text-decoration:none}.tribe-update-links{margin-top:30px}.tribe_update_page li:before{content:"\2022";padding-right:3px}.tribe_update_page .rss-widget{margin:1em 0}.tribe_update_page a.rsswidget{font-size:14px;font-weight:400;line-height:1}.tribe_update_page .rss-widget li:before{display:none}.tribe-events-widget-admin-form__input-section p{margin:0}.tribe-events-widget-admin-form__input-section h4{margin:.5em 0}.tribe-update-bar{display:inline-block}.tribe-update-bar .progress{border:1px solid #ccc;float:left;margin-right:1rem;padding:1px;width:18rem}.tribe-update-bar .progress .bar{background:#7ad03a;height:1rem;width:1%}#tribe-dialog-wrapper>div{padding:1rem}#tribe-dialog-wrapper>div .stage{display:none}#tribe-dialog-wrapper #heading{background:#fff}#tribe-dialog-wrapper label{display:block}#tribe-dialog-wrapper .select-single-container{border:1px solid #888;height:300px;overflow-y:scroll}#tribe-dialog-wrapper .select-single-container label{opacity:1;padding:3px 5px;transition:opacity .2s}#tribe-dialog-wrapper .select-single-container label:nth-child(odd){background:#fff}#tribe-dialog-wrapper .select-single-container label.selected{background:#0073aa;color:#fff;font-weight:700}#tribe-dialog-wrapper .select-single-container label input{display:none}#tribe-dialog-wrapper .select-single-container.updating label{opacity:.35;transition:opacity .2s}.ui-front{z-index:1000000}.wp-list-table.plugins .column-description .update-message{color:#d54e21}.api-check{min-height:100px;padding:1em}.api-check+.notice-dismiss:hover:before{color:#fff}.api-check:after,.api-check:before{content:"";display:table}.api-check:after{clear:both}.api-check .tribe-mascot{bottom:0;display:none;padding:0 1rem 0 0;position:absolute;right:0;top:0}.api-check .tribe-mascot img{display:inline-block;height:100%;max-height:150px;max-width:150px;vertical-align:middle;width:auto}.api-check p{line-height:1.7;margin-bottom:1em}.api-check a{text-decoration:none}.api-check a:hover{text-decoration:underline}.api-check .plugin-list{display:inline;font-weight:600;margin:0;padding:0}.api-check .plugin-list span.plugin-invalid:after{content:", "}.api-check .plugin-list span.plugin-invalid:last-of-type:after{content:""}.tribe-marketing-notice{padding:1em}.tribe-marketing-notice+.notice-dismiss:hover:before{color:#fff}.tribe-marketing-notice:after,.tribe-marketing-notice:before{content:"";display:table}.tribe-marketing-notice:after{clear:both}.tribe-marketing-notice .tribe-marketing-notice__icon{display:none;flex-shrink:0;padding:0;position:static}.tribe-marketing-notice .tribe-marketing-notice__icon img{display:inline-block;max-height:100%;max-width:none;vertical-align:middle;width:100%}.tribe-marketing-notice h3{margin-bottom:.5em;margin-top:.5em}.tribe-marketing-notice p{line-height:1.7;margin-bottom:.5em}.tribe-marketing-notice a{text-decoration:none}.tribe-marketing-notice a:hover{text-decoration:underline}#wpcontent .notice-tribe-banner{align-items:center;background:#161b7d;border:0;box-shadow:none;display:flex;justify-content:flex-start;margin:0 0 16px;padding-right:0}.notice-tribe-banner .tribe-marketing-notice__icon{width:47px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:0;padding:1em 0}.notice-tribe-banner h3{color:#fff;display:block;font-size:.875rem;line-height:1.25;margin:0 0 .25rem}.notice-tribe-banner a{border-bottom:1px solid #fff;line-height:1.25;margin:0;text-decoration:none}.notice-tribe-banner a:hover{text-decoration:none}.notice-tribe-banner a,.notice-tribe-banner p{color:#fff;display:inline-block;font-size:.875rem;line-height:1.25}.notice-tribe-banner p{display:inline-block;margin:0;padding:0}.notice-tribe-banner .tribe-marketing-notice{align-items:center;display:flex;justify-content:flex-start;margin:0 auto;min-height:65px;padding:0 .75rem;width:100%}.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe-welcome .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:100%}.notice-tribe-banner .notice-dismiss{position:static}.notice-tribe-banner .notice-dismiss:before{color:#eaf1ff}.tribe-dropdown,.tribe-ea-dropdown{max-width:100%;width:auto}.tribe-dropdown.select2-container .selection,.tribe-ea-dropdown.select2-container .selection{margin-top:inherit}.tribe-dropdown .select2-selection--single,.tribe-ea-dropdown .select2-selection--single{height:32px}.tribe-dropdown .select2-selection--single .select2-selection__clear,.tribe-ea-dropdown .select2-selection--single .select2-selection__clear{line-height:28px}.tribe-dropdown .select2-selection--single .select2-selection__rendered,.tribe-ea-dropdown .select2-selection--single .select2-selection__rendered{line-height:32px;padding-right:28px}.tribe-dropdown.select2-container--focus .select2-selection--single,.tribe-ea-dropdown.select2-container--focus .select2-selection--single{border-color:#5897fb;box-shadow:0 0 5px rgba(0,0,0,.1)}.tribe-dropdown.select2-container--open .select2-search__field,.tribe-ea-dropdown.select2-container--open .select2-search__field{padding:0}.tribe-dropdown.select2-container--open .select2-dropdown--below,.tribe-ea-dropdown.select2-container--open .select2-dropdown--below{border-top:1px solid #aaa;margin-top:-1px}.tribe-dropdown.select2-container--open .select2-dropdown--above,.tribe-ea-dropdown.select2-container--open .select2-dropdown--above{border-bottom:1px solid #aaa;margin-bottom:-16px}.tribe-dropdown.select2-container--open .select2-selection--single,.tribe-ea-dropdown.select2-container--open .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0;border-color:#aaa}.tribe-dropdown.select2-container--open .select2-selection__arrow b,.tribe-ea-dropdown.select2-container--open .select2-selection__arrow b{transform:rotate(180deg)}.tribe-dropdown.select2-selection--single,.tribe-ea-dropdown.select2-selection--single{background-image:none;border:1px solid #ccc;border-radius:3px;overflow:hidden}.tribe-dropdown.select2-selection--single>.select2-selection__rendered,.tribe-ea-dropdown.select2-selection--single>.select2-selection__rendered{white-space:normal}.tribe-dropdown.select2-selection--single .select2-selection__arrow,.tribe-ea-dropdown.select2-selection--single .select2-selection__arrow{background:transparent;background-image:none;border-left:0;top:2px;width:26px}.tribe-dropdown.select2-selection--single .select2-selection__arrow b,.tribe-ea-dropdown.select2-selection--single .select2-selection__arrow b{background:#fff url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 5px top 55%;background-size:auto;background-size:16px 16px;border:0;bottom:0;display:block;height:auto;left:0;margin:0;padding:0;right:0;top:0;width:auto}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered{background-image:none;border:1px solid #ccc;border-radius:3px;min-height:25px}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline{line-height:25px}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline input,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline input{padding-bottom:0;padding-top:0}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice{line-height:19px;margin-top:2px;padding-bottom:0;padding-top:0}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice div,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice div{line-height:inherit}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice__remove,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice__remove{left:4px;top:3px;transition-property:border,color}.select2-results .select2-results__option{color:#939393;font-weight:400;margin-bottom:0}.select2-results .select2-results__option[aria-disabled=true]{background-color:#e0e0e0}.select2-results.select2-results__option--highlighted{background-color:#efefef;color:#a1a1a1;cursor:default;display:block}.wp-core-ui .button-red{background-color:#a00;border-color:#9b2124;box-shadow:inset 0 1px 0 rgba(120,200,230,.5);color:#fff;text-decoration:none;text-shadow:0 1px 0 rgba(0,0,0,.1)}.wp-core-ui .button-red.focus,.wp-core-ui .button-red.hover,.wp-core-ui .button-red:focus,.wp-core-ui .button-red:hover{background-color:#a00;border-color:#7f1c1f;box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.3)}.wp-core-ui .button-red.focus,.wp-core-ui .button-red:focus{border-color:#500f0e;box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4)}.wp-core-ui .button-red.active,.wp-core-ui .button-red.active:focus,.wp-core-ui .button-red.active:hover,.wp-core-ui .button-red:active{background:#7f1c1f;border-color:#601312 #ae2426 #ae2426;box-shadow:inset 0 1px 0 rgba(0,0,0,.1);color:hsla(0,0%,100%,.95);text-shadow:0 1px 0 rgba(0,0,0,.1)}.wp-core-ui .button-red-disabled,.wp-core-ui .button-red:disabled,.wp-core-ui .button-red[disabled]{background:#ba292b!important;border-color:#7f1c1f!important;box-shadow:none!important;color:#e79496!important;cursor:default;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important}.ticket_form .select2-container .select2-selection--single .select2-selection__arrow{display:none}.clear{zoom:1}.clear:after,.clear:before{content:" ";display:table}.clear:after{clear:both}.checkmark:after{border:solid #0ab152;border-width:0 3px 3px 0;content:"";display:block;height:15px;transform:rotate(45deg);width:8px}.checkmark.checkmark-right:after{float:right;margin-right:2em}.checkmark.checkmark-left:after{float:left;margin-left:2em}.checkmark.no-checkmark:after{display:none}.complete,.ok,.on,.yes,[data-status=complete],[data-status=ok],[data-status=on],[data-status=yes]{color:#0ab152}.incomplete,.ko,.no,.off,[data-status=incomplete],[data-status=ko],[data-status=no],[data-status=off]{color:#ff2500}.plugin-card-event-tickets-plus .column-downloaded,.plugin-card-event-tickets-plus .column-rating,.plugin-card-event-tickets-plus .column-updated,.plugin-card-event-tickets .column-downloaded,.plugin-card-event-tickets .column-rating,.plugin-card-event-tickets .column-updated,.plugin-card-events-calendar-pro .column-downloaded,.plugin-card-events-calendar-pro .column-rating,.plugin-card-events-calendar-pro .column-updated,.plugin-card-events-community-tickets .column-downloaded,.plugin-card-events-community-tickets .column-rating,.plugin-card-events-community-tickets .column-updated,.plugin-card-events-community .column-downloaded,.plugin-card-events-community .column-rating,.plugin-card-events-community .column-updated,.plugin-card-image-widget-plus .column-downloaded,.plugin-card-image-widget-plus .column-rating,.plugin-card-image-widget-plus .column-updated,.plugin-card-image-widget .column-downloaded,.plugin-card-image-widget .column-rating,.plugin-card-image-widget .column-updated,.plugin-card-the-events-calendar .column-downloaded,.plugin-card-the-events-calendar .column-rating,.plugin-card-the-events-calendar .column-updated,.plugin-card-tribe-eventbrite .column-downloaded,.plugin-card-tribe-eventbrite .column-rating,.plugin-card-tribe-eventbrite .column-updated,.plugin-card-tribe-filterbar .column-downloaded,.plugin-card-tribe-filterbar .column-rating,.plugin-card-tribe-filterbar .column-updated{display:none}body.tribe-welcome,body.tribe_events_page_tribe-help{background-color:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body.tribe-welcome .update-nag,body.tribe_events_page_tribe-help .update-nag{display:none}body.tribe-welcome #wpcontent,body.tribe_events_page_tribe-help #wpcontent{padding:0}body.tribe-welcome .tribe_settings,body.tribe_events_page_tribe-help .tribe_settings{margin:0}body.tribe-welcome #wpfooter,body.tribe-welcome .tribe_settings>h1,body.tribe_events_page_tribe-help #wpfooter,body.tribe_events_page_tribe-help .tribe_settings>h1{display:none}body.tribe-welcome #wpbody-content,body.tribe_events_page_tribe-help #wpbody-content{padding-bottom:25px}body.tribe-welcome .tribe-dependency-error,body.tribe_events_page_tribe-help .tribe-dependency-error{display:none}.tribe-events-admin-content-wrapper{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-style:normal;margin:0 auto;padding:0 0 30px;width:calc(100% - 40px)}.tribe-events-admin-card{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;display:block;margin:0 auto 36px;padding:27px;text-align:center}.tribe-events-admin-card--2up .tribe-events-admin-card__title{max-width:260px}.tribe-events-admin-card--3up .tribe-events-admin-card__description{height:71px}.tribe-events-admin-card--3up .tribe-events-admin-card__image{margin-bottom:28px}.tribe-events-admin-card__button{background-color:#fff;border:none;color:#3d54ff;font-size:14px;font-weight:700;letter-spacing:1px;line-height:16px;position:absolute;right:20px;text-transform:uppercase;top:17px}.tribe-events-admin-card__button:hover{color:#161b7d}.tribe-events-admin-card__description{color:#000;font-size:14px;font-style:normal;font-weight:400;line-height:22px;margin-top:16px}.tribe-events-admin-card__image{display:block;height:100px;margin:0 auto}.tribe-events-admin-card__link{color:#3d54ff;display:inline-block;font-size:16px;font-style:normal;font-weight:700;line-height:18px;margin-top:24px;position:relative;text-decoration:none}.tribe-events-admin-card__link:hover{color:#161b7d}.tribe-events-admin-card__link:after{border-style:solid;border-width:0 0 1px;bottom:-4px;content:"";left:0;position:absolute;width:100%}.tribe-events-admin-card__title{color:#0f1031;font-size:20px;font-weight:700;line-height:23px;margin:auto}.tribe-events-admin-card-grid{max-width:1048px}input[type=checkbox].tribe-common-switch__input{display:none}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label{background:#fff;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;cursor:pointer;display:block;height:18px;outline:0;padding:3px;position:relative;transition:all .2s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:27px}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:after,input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:before{content:"";display:block;height:10px;position:relative;width:10px}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:after{background:#878787;border-radius:2px;content:"";left:0;transition:all .2s ease}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:before{display:none}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label::-moz-selection{background:none}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label::selection{background:none}input[type=checkbox].tribe-common-switch__input:checked+.tribe-common-switch__label:after{background:#2e709d;left:50%}.tribe-events-admin-header__logo-word-mark{display:inline-block;height:auto;margin:0 0 26px;vertical-align:middle;width:312px}.tribe-events-admin-header{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:45px 0 0}.tribe-events-admin-header__right-image{height:280px;position:absolute;right:0;top:0;width:auto;z-index:-1}.tribe-events-admin-header__title{font-size:48px;line-height:48px;margin:0 0 18px}.tribe-events-admin-header__description{font-size:18px;line-height:28px;margin-bottom:44px;max-width:60%}.tribe-events-admin-tab-nav{display:flex;margin:0}.tribe-events-admin-tab-nav li{cursor:pointer;font-size:16px;font-weight:500;margin-bottom:0;margin-right:30px}.tribe-events-admin-tab-nav li:hover{color:#334aff}.tribe-events-admin-tab-nav .selected{border-bottom:3px solid #334aff;color:#334aff;padding-bottom:17px}.tribe-events-admin-tab-nav li:after{background:#334aff;border-radius:100px;bottom:0;content:"";display:block;height:3px;left:0;position:absolute;right:0}.tribe-events-admin__line{border-top:1px solid #e1e1e4}.tribe-events-admin-products-description{color:#0f1031;font-size:14px;line-height:2}.tribe-events-admin-products-card{align-items:center;border:1px solid #e1e1e4;border-radius:20px;display:flex;padding:10px 15px}.tribe-events-admin-products-card__icon{height:40px;-o-object-fit:contain;object-fit:contain;width:40px}.tribe-events-admin-products-card__group{margin:0 20px;max-width:55%}.tribe-events-admin-products-card__group-title{color:#0f1031;font-size:16px;font-weight:700;line-height:1;margin:0}.tribe-events-admin-products-card__group-description{font-size:12px;margin-top:5px}.tribe-events-admin-products-card__button{background-color:#fff;border:1px solid #e1e1e4;border-radius:20px;color:#0f1031;font-size:12px;font-weight:700;letter-spacing:1px;line-height:16px;margin-left:auto;padding:10px 15px;text-decoration:none;text-transform:uppercase}.tribe-events-admin-products-card__button:hover{background-color:#334aff;color:#fff}.tribe-events-admin-products-card__button:active,.tribe-events-admin-products-card__button:focus{box-shadow:none;outline:none}.tribe-events-admin-products-card__button--active,.tribe-events-admin-products-card__button--active:active,.tribe-events-admin-products-card__button--active:focus,.tribe-events-admin-products-card__button--active:hover{background:rgba(61,84,255,.16);color:#334aff;cursor:not-allowed;text-transform:uppercase}.tribe-events-admin-card--1up{width:100%}.tribe-events-admin-card--no-pad{padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__image{display:block;height:152px;margin:0;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{font-size:28px;line-height:34px;text-align:left}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin:0;padding:0;text-align:left}.tribe-events-admin-card--no-pad .tribe-events-admin-card__link{margin:0;padding:0}.tribe-events-admin-card--faq{display:inline-block;font-size:0;height:147px;margin:0 0 0 30px;padding:24px 16px 22px 20px;width:230px}.tribe-events-admin-card--faq:first-child{margin-left:0}.tribe-events-admin-card--faq img{float:left;height:22px;width:16px}.tribe-events-admin-card--faq .tribe-events-admin-faq__question{color:#334aff;font-size:16px;line-height:19px;margin:0 0 12px 26px;text-align:left}.tribe-events-admin-card--faq .tribe-events-admin-faq__answer{font-size:13px;line-height:16px;margin-left:26px;text-align:left}.tribe-events-admin-video{border-radius:16px;height:200px;margin-bottom:72px;-webkit-mask-image:-webkit-radial-gradient(circle,#fff 100%,#000 0);overflow:hidden;-webkit-transform:rotate(.000001deg)}.tribe-events-admin-video iframe{width:100%}.tribe-events-admin-card--promo-blue{background-color:#3d54ff;background-image:url(../images/welcome/promo.jpg)}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{color:#fff;font-size:16px;margin-bottom:16px;text-align:left}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__title{color:#fff;text-align:left}.tribe-events-admin-graphic{position:absolute;right:0;top:106px;z-index:-1}.tribe-events-admin-graphic--desktop-only{display:none}.tribe-events-admin-graphic--mobile-only{display:block}.tribe-events-admin-card__form{position:relative}input[type=email].tribe-events-admin-card__input{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;font-size:14px;height:54px}input[type=email].tribe-events-admin-card__input:-ms-input-placeholder{color:rgba(15,16,49,.72);letter-spacing:.5px;padding-left:10px}input[type=email].tribe-events-admin-card__input::placeholder{color:rgba(15,16,49,.72);letter-spacing:.5px;padding-left:10px}.tribe-events-admin-container,.tribe-events-admin-content-wrapper.tribe-events-admin-container{margin:0 auto;max-width:1024px;width:90%}.tribe-events-admin-2col-grid{display:grid;grid-gap:15px 30px;gap:15px 30px;grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-3col-grid{display:grid;grid-gap:30px;gap:30px;grid-template-areas:". . .";grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-4col-grid{display:grid;grid-gap:30px;gap:30px;grid-template-areas:". . . .";grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-products{margin:10px 0 0}.tribe-events-admin-quick-nav{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;display:block;margin:40px 0 78px;padding:18px 23px 2px}.tribe-events-admin-quick-nav__link{color:#3d54ff;font-size:16px;font-weight:700;line-height:18px;text-align:center;text-decoration:none}.tribe-events-admin-quick-nav__link:hover{color:#161b7d}.tribe-events-admin-quick-nav__link-item{display:block;padding-bottom:19px}.tribe-events-admin-quick-nav__links{display:inline}.tribe-events-admin-quick-nav__title{color:rgba(15,16,49,.72);display:inline-block;font-size:14px;font-weight:400;line-height:16px;padding-bottom:14px;text-transform:uppercase}.tribe-events-admin-title{padding-top:14px}.tribe-events-admin-title__description{color:#0f1031;font-size:16px;font-weight:400;line-height:24px;max-width:584px;padding-top:15px}.tribe-events-admin-title__heading{color:#0f1031;display:inline-block;font-size:24px;font-weight:700;line-height:28px;margin:5px 0 0}.tribe-events-admin-title__logo{margin-right:8px;vertical-align:top;width:34px}.tribe-events-admin-notice{background-color:#3d54ff;height:65px}.tribe-events-admin-notice .tribe-events-admin-content-wrapper{padding-bottom:0;padding-top:8px}.tribe-events-admin-notice p{color:#fff;display:inline-block;font-family:Helvetica,sans-serif;font-size:16px;line-height:18px;margin-top:0;padding-bottom:12px;padding-left:16px;vertical-align:middle;width:calc(100% - 60px)}.tribe-events-admin-notice__logo{display:inline-block}.tribe-events-admin-tickets .tribe-events-admin-section-header{font-size:28px;line-height:32px}.tribe-events-admin-tickets .tribe-events-admin-graphic--desktop-only{width:365px}.tribe-events-admin-tickets .tribe-events-admin-graphic--mobile-only{top:230px;width:300px}.tribe-events-admin-tickets .tribe-events-admin-title__heading{margin-top:0}.tribe-events-admin-tickets .tribe-events-admin-title__logo{margin-right:4px;width:32px}.tribe-events-admin-kb{margin:10px 0 0}.tribe-events-admin-kb-card{border:1px solid #e1e1e4;border-radius:20px}.tribe-events-admin-kb-card__image{height:auto;width:100%}.tribe-events-admin-kb-card__title{color:#0f1031;flex-grow:0;font-size:20px;font-weight:700;line-height:1.2;margin:0;padding:20px 28px 10px}.tribe-events-admin-kb-card__links{margin:0;padding:0 28px 25px}.tribe-events-admin-kb-card__links li{margin:0 0 10px}.tribe-events-admin-kb-card__links li a{color:#334aff;font-size:14px;line-height:1.2;text-decoration:none}.tribe-events-admin-kb-card__links li a:focus{box-shadow:none;outline:none}.tribe-events-admin-kb-card__links li a:hover{color:#1c39bb}.tribe-events-admin-section-header{align-items:center;color:#000;display:flex;font-weight:700;justify-content:space-between;margin:0}.tribe-events-admin-section-header h3{color:#0f1031;font-size:28px;font-weight:700;line-height:1}.tribe-events-admin-section-header a{border-bottom:2px solid #334aff;color:#334aff;font-size:14px;padding-bottom:2px;text-decoration:none}.tribe-events-admin-section-header a:focus{box-shadow:none;outline:none}.tribe-events-admin-section-header a:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin-faq{margin:10px 0 0}.tribe-events-admin-faq-card{border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;padding:24px 15px 19px 19px}.tribe-events-admin-faq-card a{color:#0f1031}.tribe-events-admin-faq-card a:focus{box-shadow:none;outline:none}.tribe-events-admin-faq-card a:hover{color:#1c39bb}.tribe-events-admin-faq-card__icon img{height:22px;width:16px}.tribe-events-admin-faq-card__content{margin-left:10px}.tribe-events-admin-faq__question,.tribe-events-admin-faq__question a{color:#334aff;font-size:16px;text-decoration:none}.tribe-events-admin-faq__question a:focus{box-shadow:none;outline:none}.tribe-events-admin-faq__question a:hover{color:#1c39bb}.tribe-events-admin-faq__answer{color:#0f1031;font-size:13px;margin-top:18px}.tribe-events-admin-extensions-title{color:#0f1031;font-size:16px;line-height:1.5;margin:0 0 30px;max-width:70%}.tribe-events-admin-extensions{margin:10px 0 0}.tribe-events-admin-extensions-card{border:1px solid #e1e1e4;border-radius:20px;border-top:8px solid #334aff;padding:48px 35px 24px 25px}.tribe-events-admin-extensions-card__title{font-size:20px;margin:0}.tribe-events-admin-extensions-card__title a{color:#0f1031;font-family:Helvetica,sans-serif;font-size:20px;font-weight:700;line-height:1.2;text-decoration:none}.tribe-events-admin-extensions-card__title a:active,.tribe-events-admin-extensions-card__title a:focus,.tribe-events-admin-extensions-card__title a:hover{box-shadow:none;color:#334aff}.tribe-events-admin-extensions-card__description{color:#0f1031;font-family:Helvetica,sans-serif;font-size:14px;line-height:1.43;margin:20px 0}.tribe-events-admin-cta{align-items:center;border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;margin:60px 0}.tribe-events-admin-cta__image{height:152px;-o-object-fit:contain;object-fit:contain;width:auto}.tribe-events-admin-cta__content,.tribe-events-admin__troubleshooting-cta{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:20px 0;width:100%}.tribe-events-admin-cta__content-title{color:#0f1031;font-size:28px;font-weight:700;line-height:normal;margin:0 0 10px;text-align:center}.tribe-events-admin-cta__content-subtitle{color:#0f1031;font-size:16px;line-height:1.5;margin-bottom:10px;text-align:center}.tribe-events-admin-cta__content-description a{border-bottom:2px solid #334aff;color:#334aff;font-size:16px;font-weight:700;padding-bottom:2px;text-decoration:none}.tribe-events-admin-cta__content-description a:focus{box-shadow:none;outline:none}.tribe-events-admin-cta__content-description a:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin-footer-logo{display:inline-block;vertical-align:middle;width:228px}.tribe-events-admin-step{margin:10px 0 0}.tribe-events-admin-step-card{border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;padding:24px 15px 19px 19px}.tribe-events-admin-step-card a{border-bottom:2px solid #334aff;color:#334aff;padding-bottom:2px;text-decoration:none}.tribe-events-admin-step-card a:focus{box-shadow:none;outline:none}.tribe-events-admin-step-card a:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin-step-card__icon img{height:43px;margin-right:5px;width:42px}.tribe-events-admin-step-card__content{margin-left:10px}.tribe-events-admin-step__title{color:#0f1031;font-size:20px;font-weight:700;line-height:1.2;margin-bottom:10px}.tribe-events-admin-step__answer{color:#0f1031;font-size:13px;margin-top:18px}.tribe-events-admin__system-information{display:grid;grid-gap:15px 30px;gap:15px 30px;grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr;margin:100px 0;position:relative}.tribe-events-admin__troubleshooting-title{color:#0f1031;font-size:28px;font-weight:700;line-height:1;margin:0}.tribe-events-admin__troubleshooting-description{color:#0f1031;font-size:18px;line-height:1.2;line-height:1.44;margin:20px 0}.tribe-events-admin__system-information-select{display:flex;margin:30px 0 20px}.tribe-events-admin__system-information-select input[type=checkbox]{margin:0 10px 0 0}.tribe-events-admin__system-information-select label{color:#0f1031;font-size:16px;line-height:1.2}.tribe-events-admin__system-information-content small{color:#0f1031;font-size:12px;line-height:1.2}.tribe-events-admin__recent-template-changes .template-updates-wrapper,.tribe-events-admin__system-information-widget{background:#0f1031;border-radius:16px;color:#fff;font-size:14px;line-height:1.14;max-height:280px;overflow:scroll;-ms-overflow-style:none;padding:12px 0 0 27px;scrollbar-width:none}.tribe-events-admin__recent-template-changes .template-updates-wrapper p{color:#fff;font-size:14px;line-height:1.14;margin:0}.tribe-events-admin__system-information-widget a{color:#334aff}.tribe-events-admin__system-information-widget a:hover{opacity:.8}.tribe-events-admin__recent-template-changes .template-updates-wrapper{padding:30px 0 30px 27px}.tribe-events-admin__recent-template-changes .template-updates-wrapper::-webkit-scrollbar,.tribe-events-admin__system-information-widget::-webkit-scrollbar{display:none}.tribe-events-admin__system-information-widget-copy{bottom:10px;position:absolute}.tribe-events-admin__system-information-widget-copy button{background-color:#334aff;border:none;border-radius:100px;color:#fff;cursor:pointer;font-size:16px;font-weight:700;outline:none;padding:18px 25px;text-align:center}.tribe-events-admin__system-information-widget-copy button:hover{background-color:#1c39bb}.tribe-events-admin__system-information-widget-copy button .dashicons,.tribe-events-admin__system-information-widget-copy button .dashicons-before:before{display:none}.tribe-events-admin__system-information-widget-copy button .optin-success{color:#fff;font-size:16px;font-weight:700;text-align:center}.tribe-events-admin__recent-template-changes p{color:#0f1031;font-size:18px;line-height:1.2;line-height:1.44;margin:20px 0}.tribe-events-admin__recent-log{margin-top:50px}.tribe-events-admin__troubleshooting-event-log-wrapper label{color:#0f1031;display:block;font-size:16px;line-height:1.63;margin-bottom:10px}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-controls{margin:20px 0 10px}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-viewer{background:#0f1031;border-radius:16px;color:#fff;font-size:14px;line-height:1.14;max-height:280px;min-height:60px;overflow:scroll;-ms-overflow-style:none;padding:12px 0 0 27px;scrollbar-width:none}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-viewer::-webkit-scrollbar{display:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log{border-bottom:2px solid #334aff;color:#334aff;font-size:16px;padding-bottom:2px;text-decoration:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log:focus{box-shadow:none;outline:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin__troubleshooting-event-log-wrapper .tribe-events-admin__recent-log-filters-select-wrapper:after{display:none}.tribe-events-admin__recent-log-filters{display:flex;padding:20px 0 40px}.tribe-events-admin__recent-log-filters-field{margin-right:40px}.tribe-events-admin__recent-log-filters-select-wrapper:after{content:url(../images/help/polygon.svg);height:13px;pointer-events:none;position:absolute;right:22px;top:20px;width:14px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default .select2-selection--single{border:1px solid #e1e1e4!important;border-radius:16px;color:#0f1031;font-size:14px;line-height:1.14;padding:0 25px 0 15px!important}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls{margin-bottom:20px;padding:0}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:first-child,.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(2),.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(3){padding-right:75px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-selection__clear{display:none}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow{right:5px}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:16px;border-bottom-right-radius:16px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container .select2-selection--single .select2-selection__rendered{width:100%}.tribe-events-admin__recent-log-filters-select-wrapper select.focus-visible,.tribe-events-admin__recent-log-filters-select-wrapper select:focus-visible{outline:none}.tribe-events-admin__recent-log-filters-select-wrapper select option{color:#0f1031;font-size:14px;line-height:1.14}.tribe-events-admin__ea-status{margin-top:50px}.tribe-events-admin__issues-found-card{background-color:#f3eee8;border-radius:8px;margin-bottom:20px}.tribe-events-admin__issues-found-card:last-of-type{margin-bottom:100px}.tribe-events-admin__issues-found-card-title{align-items:center;cursor:pointer;display:flex;padding:10px 20px 10px 17px;position:relative}.tribe-events-admin__issues-found-card-title img{height:21px;margin-right:14px;-o-object-fit:contain;object-fit:contain;width:21px}.tribe-events-admin__issues-found-card-title h3{margin:0}.tribe-events-admin__issues-found-card-title span{color:#0f1031;display:block}.tribe-events-admin__issues-found-card-title i{background-image:url(../images/help/arrow-down.svg);background-position:50%;background-repeat:no-repeat;background-size:contain;height:15px;margin:12px 20px;position:absolute;right:0;top:0;transition:all .3s ease;width:15px}.tribe-events-admin__issues-found-card-title.active i{background-image:url(../images/help/arrow-up.svg);background-repeat:no-repeat;top:5px}.tribe-events-admin__issues-found-card-description{display:none;padding:0 20px 20px 55px}.tribe-events-admin__issues-found-card-description p{color:#0f1031;font-size:16px;margin:0}.tribe-events-admin__issues-found-card-description-actions{display:flex;padding:20px 0 10px}.tribe-events-admin__issues-found-card-description-actions a{border-bottom:2px solid #334aff;color:#334aff;font-size:16px;margin-right:20px;padding-bottom:5px;text-decoration:none}.tribe-events-admin__issues-found-card-description-actions a:focus{box-shadow:none;outline:none}.tribe-events-admin__issues-found-card-description-actions a:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin__ea-status-table-wrapper{overflow-x:auto}.tribe-events-admin__ea-status-table{border:1px solid #e1e1e4;border-radius:16px;margin:30px 0 40px;overflow:hidden}.tribe-events-admin__ea-status-table a{border-bottom:2px solid #334aff;color:#334aff;padding-bottom:2px;text-decoration:none}.tribe-events-admin__ea-status-table a:focus{box-shadow:none;outline:none}.tribe-events-admin__ea-status-table a:hover{border-bottom:2px solid #1c39bb;color:#1c39bb}.tribe-events-admin__ea-status-table tr{align-items:center;display:flex}.tribe-events-admin__ea-status-table th{color:#0f1031;font-weight:700;line-height:1.17;margin-top:10px;padding:5px 25px}.tribe-events-admin__ea-status-table td{align-items:center;color:#0f1031;display:flex;font-size:16px;line-height:1.63;padding:10px 25px;width:25%}.tribe-events-admin__ea-status-table td:nth-child(2){width:45%}.tribe-events-admin__ea-status-table td:nth-child(3){display:flex;justify-content:flex-end;width:30%}.tribe-events-admin__ea-status-table-dark{background-color:#f9f7f4}.tribe-events-admin__ea-status-table td img{height:21px;margin-right:14px;-o-object-fit:contain;object-fit:contain;width:21px}.tribe_events_page_tec-troubleshooting{background-color:#fff}#tribe-community,#tribe-ticketing{display:none}.tribe-events-admin__troubleshooting-notice{background-color:#161b7d;color:#fff;font-size:16px;line-height:1;margin-left:-1.55vw;padding:24px 0}.tribe-events-admin__troubleshooting-notice_title{margin:0 auto;max-width:1024px;padding-left:25px;width:90%}.tribe-events-admin__troubleshooting-notice_title a{border-bottom:2px solid #fff;color:#fff;font-size:16px;line-height:1;padding-bottom:2px;text-decoration:none}.tribe-events-admin__troubleshooting-notice_title a:focus{box-shadow:none;outline:none}.tribe-events-admin__troubleshooting-notice_title a:hover{border-bottom:2px solid #f3eee8;color:#f3eee8}.tribe_events_page_tribe-help #tec-help-community,.tribe_events_page_tribe-help #tec-help-ticketing{display:none}.tribe_events_page_tribe-help .tribe-events-admin-title{padding-top:25px}.tribe_events_page_tribe-help .tribe-events-admin-title img{height:67px}body.tribe-welcome #fs_connect{border:1px solid #e1e1e4;border-radius:16px;box-shadow:none;box-sizing:border-box;margin-left:22px}body.tribe-welcome #fs_connect .fs-actions{background-color:transparent}body.tribe-welcome #fs_connect .fs-permissions{border-top:1px solid #e1e1e4;margin:0 16px}body.tribe-welcome #fs_connect button{background-color:#3d54ff;border-color:#3d54ff}body.tribe-welcome #fs_connect .button-secondary{background:#fff;border-color:#3d54ff;color:#3d54ff}body.tribe-welcome #fs_connect a{color:#3d54ff}body.tribe-welcome #fs_connect a:focus{box-shadow:none;outline:none}body.tribe-welcome #fs_connect a:hover{color:#161b7d}@media only screen and (-o-min-device-pixel-ratio:2/1),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){#tribe-loading span{background-image:url(../images/tribe-loading@2x.gif)}}@media screen and (max-width:782px){.tribe-half-column,.tribe-row .tribe-half-column:last-child{margin:0 0 20px;width:100%}input[type=email]{width:100%}.events-cal .subsubsub{float:none}.events-cal .search-box{width:98%}.events-cal #search-submit{width:100%}.events-cal .tablenav.top{display:none}}@media screen and (min-width:500px){.api-check .tribe-mascot{display:block}.api-check .notice-content{margin-right:180px}}@media screen and (min-width:320px){.tribe-marketing-notice .tribe-marketing-notice__icon{display:block}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px}}@media screen and (min-width:600px) and (max-width:782px){.tribe-marketing-notice .tribe-marketing-notice__content{margin-left:145px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px;padding:0}}@media screen and (min-width:782px){.tribe-marketing-notice .tribe-marketing-notice__content{margin-left:130px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px;padding:0}.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe-welcome .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:642px}}@media screen and (min-width:400px){.notice-tribe-banner .tribe-marketing-notice__icon{width:67px}}@media screen and (min-width:800px){.notice-tribe-banner h3{display:inline-block;font-size:1rem;margin:0 .5rem 0 0}.notice-tribe-banner a{line-height:1.5}.notice-tribe-banner a,.notice-tribe-banner p{font-size:1rem}.notice-tribe-banner p{margin:0 .5rem 0 0}.notice-tribe-banner .tribe-marketing-notice__cta{display:inline-block;margin-left:.5rem}}@media screen and (min-width:1215px){.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:992px}.tribe-welcome .notice-tribe-banner .tribe-marketing-notice{max-width:1036px}}@media screen and (min-width:710px){.tribe-events-admin-content-wrapper{width:670px}.tribe-events-admin-card--2up{display:inline-block;width:calc(50% - 20px)}.tribe-events-admin-card--2up.tribe-events-admin-card--first{margin-right:36px}.tribe-events-admin-card--2up.tribe-events-admin-card--last{margin-right:0}.tribe-events-admin-card--2up .tribe-events-admin-card__image{height:100px;margin-bottom:12px}.tribe-events-admin-card--2up .tribe-events-admin-card__title{margin-bottom:27px;max-width:340px}.tribe-events-admin-card--3up{display:inline-block;margin-bottom:32px;width:calc(50% - 18px)}.tribe-events-admin-card--3up.tribe-events-admin-card--first{margin-right:32px}.tribe-events-admin-card--3up.tribe-events-admin-card--middle{margin-right:0}.tribe-events-admin-card__title{font-size:20px;line-height:23px}.tribe-events-admin-card--1up{display:inline-block;margin-left:32px;width:calc(50% - 18px)}.tribe-events-admin-card--1up .tribe-events-admin-card__description{height:71px}.tribe-events-admin-card--1up .tribe-events-admin-card__image{margin-bottom:28px}.tribe-events-admin-card--no-pad{height:154px;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{margin-left:50%;padding:42px 0 10px}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin-left:50%}.tribe-events-admin-card--promo-blue{display:block;margin-left:0;min-height:170px;width:100%}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{float:left;max-width:300px}.tribe-events-admin-graphic{max-width:250px;top:0}.tribe-events-admin-graphic--desktop-only{display:block}.tribe-events-admin-graphic--mobile-only{display:none}.tribe-events-admin-card__form{float:right;width:300px}input[type=email].tribe-events-admin-card__input{width:300px}.tribe-events-admin-title{padding-top:50px}.tribe-events-admin-title__description{padding-top:15px}.tribe-events-admin-title__heading{font-size:48px;line-height:55px;margin:0}.tribe-events-admin-title__logo{margin-right:14px;padding-top:5px;width:40px}.tribe-events-admin-tickets .tribe-events-admin-card__title{font-size:18px}.tribe-events-admin-tickets .tribe-events-admin-card--2up .tribe-events-admin-card__title{font-size:18px;height:66px}.tribe-events-admin-tickets .tribe-events-admin-title__logo{margin-right:8px;padding-top:4px;width:60px}}@media screen and (min-width:1217px){.tribe-events-admin-content-wrapper{max-width:1060px;width:100%}.tribe-events-admin-card--2up{margin-right:36px;width:486px}.tribe-events-admin-card--3up{width:310px}.tribe-events-admin-card--3up.tribe-events-admin-card--first,.tribe-events-admin-card--3up.tribe-events-admin-card--middle{margin-right:36px}.tribe-events-admin-card--3up.tribe-events-admin-card--last{margin-right:0}.tribe-events-admin-card--1up{margin:0 0 36px;padding:33px 44px 30px;text-align:left;width:1012px}.tribe-events-admin-card--1up .tribe-events-admin-card__description{height:auto}.tribe-events-admin-card--1up .tribe-events-admin-card__image{float:left;margin:0 48px 10px 0}.tribe-events-admin-card--no-pad{padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__image{margin:0;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{margin-left:50%;padding:42px 0 10px}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin-left:50%}.tribe-events-admin-card--promo-blue{min-height:150px}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{max-width:450px}.tribe-events-admin-graphic{max-width:none}.tribe-events-admin-card__form,input[type=email].tribe-events-admin-card__input{width:365px}.tribe-events-admin-quick-nav{border-radius:100px;display:inline-block;height:54px;margin:24px 0 94px;max-width:1010px;padding:0 36px 0 0}.tribe-events-admin-quick-nav__link-item{display:inline-block;padding:18px 10px 0}.tribe-events-admin-quick-nav__title{padding:19px 6px 17px 32px}.tribe-events-admin-tickets .tribe-events-admin-card--2up .tribe-events-admin-card__title{height:auto}}@media screen and (max-width:768px){.tribe-events-admin-header__logo-word-mark{width:285px}.tribe-events-admin-header__right-image{height:160px}.tribe-events-admin-header__description{max-width:100%}.tribe-events-admin-tab-nav li{margin-right:20px}.tribe-events-admin-tab-nav .selected{border-bottom:2px solid #334aff;padding-bottom:10px}.tribe-events-admin-2col-grid{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr))}.tribe-events-admin-3col-grid{grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr))}.tribe-events-admin-extensions-title{max-width:100%}.tribe-events-admin-cta{align-items:flex-start;flex-direction:column;overflow:hidden}.tribe-events-admin-footer-logo{width:225px}.tribe-events-admin__system-information{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr));margin:50px 0}}@media screen and (max-width:480px){.tribe-events-admin-header__logo-word-mark{width:260px}.tribe-events-admin-header__right-image{height:120px}.tribe-events-admin-header__title{font-size:35px}.tribe-events-admin-header__description{max-width:100%}.tribe-events-admin-tab-nav{border:1px solid #e1e1e4;border-radius:20px;flex-direction:column;padding:18px 22px}.tribe-events-admin-tab-nav li{margin-bottom:18px;margin-right:0}.tribe-events-admin-tab-nav .selected{border-bottom:2px solid #334aff;padding-bottom:10px;width:-moz-fit-content;width:fit-content}.tribe-events-admin__line{border:none}.tribe-events-admin-products-card,.tribe-events-admin-products-description{display:none}.tribe-events-admin-container,.tribe-events-admin-content-wrapper.tribe-events-admin-container{max-width:90%}.tribe-events-admin-2col-grid,.tribe-events-admin-3col-grid,.tribe-events-admin-4col-grid{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr))}.tribe-events-admin-extensions-title{max-width:100%}.tribe-events-admin-cta__image{height:auto;width:90%}.tribe-events-admin-cta__content,.tribe-events-admin__troubleshooting-cta{align-items:flex-start;padding:32px 23px 45px;width:auto}.tribe-events-admin-cta__content-title{font-size:22px;text-align:left}.tribe-events-admin-cta__content-subtitle{text-align:left}.tribe-events-admin-footer-logo{width:210px}.tribe-events-admin__system-information{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr));margin:50px 0}.tribe-events-admin__troubleshooting-notice{margin-left:-20px}.tribe-events-admin__troubleshooting-notice_title{max-width:90%}}@media screen and (min-width:1200px){.tribe-events-admin-products-card__group{max-width:47%}}@media screen and (min-width:500px) and (max-width:1080px){.tribe-events-admin-4col-grid{grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr))}}@media screen and (min-width:768px){.tribe-events-admin-section-header{font-size:28px;line-height:1.143;margin:50px 0 21px}}@media screen and (max-width:1080px){.tribe-events-admin-cta__content-title{font-size:24px}}@media only screen and (max-width:1920px){.tribe-events-admin__system-information-widget-copy{right:20.5vw}}@media only screen and (max-width:1280px){.tribe-events-admin__system-information-widget-copy{right:22vw}}@media only screen and (max-width:768px){.tribe-events-admin__system-information-widget-copy{left:10px;right:auto}.tribe-events-admin__recent-log-filters{flex-direction:column}.tribe-events-admin__recent-log-filters-field{margin-bottom:30px;margin-right:0}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:first-child,.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(2),.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(3){padding-right:30px}.tribe-events-admin__issues-found-card-title h3{max-width:90%}}@media only screen and (max-width:480px){.tribe-events-admin__system-information-widget-copy{left:10px;right:auto}.tribe-events-admin__recent-log-filters{flex-direction:column}.tribe-events-admin__recent-log-filters-field{margin-bottom:30px;margin-right:0}.tribe-events-admin__recent-log-filters-select-wrapper:after{right:25px}.tribe-events-admin__issues-found-card-title h3{max-width:80%}.tribe-events-admin__ea-status-table{overflow:scroll}.tribe-events-admin__ea-status-table td{min-width:150px}.tribe-events-admin__ea-status-table td:nth-child(2),.tribe-events-admin__ea-status-table td:nth-child(3){width:100%}}
|
common/src/resources/js/admin/help-page.js
CHANGED
@@ -59,10 +59,10 @@ tribe.helpPage = tribe.helpPage || {};
|
|
59 |
return;
|
60 |
}
|
61 |
|
62 |
-
|
63 |
-
|
64 |
|
65 |
-
|
66 |
if ( this.checked ) {
|
67 |
obj.doAjaxRequest( 'generate' );
|
68 |
} else {
|
@@ -84,11 +84,40 @@ tribe.helpPage = tribe.helpPage || {};
|
|
84 |
ajaxurl,
|
85 |
request,
|
86 |
function ( results ) {
|
|
|
87 |
if ( results.success ) {
|
88 |
obj.$system_info_opt_in_msg.html( "<p class='optin-success'>" + results.data + "</p>" );
|
89 |
} else {
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
}
|
94 |
);
|
59 |
return;
|
60 |
}
|
61 |
|
62 |
+
obj.$system_info_opt_in = $( obj.selectors.autoInfoOptIn );
|
63 |
+
obj.$system_info_opt_in_msg = $( obj.selectors.optInMsg );
|
64 |
|
65 |
+
obj.$system_info_opt_in.on( 'change', function () {
|
66 |
if ( this.checked ) {
|
67 |
obj.doAjaxRequest( 'generate' );
|
68 |
} else {
|
84 |
ajaxurl,
|
85 |
request,
|
86 |
function ( results ) {
|
87 |
+
|
88 |
if ( results.success ) {
|
89 |
obj.$system_info_opt_in_msg.html( "<p class='optin-success'>" + results.data + "</p>" );
|
90 |
} else {
|
91 |
+
var html = "<p class='optin-fail'>"
|
92 |
+
+ tribe_system_info.sysinfo_error_message_text
|
93 |
+
+ "</p>";
|
94 |
+
|
95 |
+
if ( results.data ) {
|
96 |
+
if ( results.data.message ) {
|
97 |
+
html += '<p>' + results.data.message + '</p>';
|
98 |
+
} else if ( results.message ) {
|
99 |
+
html += '<p>' + results.message + '</p>';
|
100 |
+
}
|
101 |
+
|
102 |
+
if ( results.data.code ) {
|
103 |
+
html += '<p>'
|
104 |
+
+ tribe_system_info.sysinfo_error_code_text
|
105 |
+
+ ' '
|
106 |
+
+ results.data.code
|
107 |
+
+ '</p>';
|
108 |
+
}
|
109 |
+
|
110 |
+
if ( results.data.status ) {
|
111 |
+
html += '<p>'
|
112 |
+
+ tribe_system_info.sysinfo_error_status_text
|
113 |
+
+ results.data.status
|
114 |
+
+ '</p>';
|
115 |
+
}
|
116 |
+
|
117 |
+
}
|
118 |
+
|
119 |
+
obj.$system_info_opt_in_msg.html( html ); // eslint-disable-line max-len
|
120 |
+
$( obj.selectors.autoInfoOptIn ).prop( "checked", false );
|
121 |
}
|
122 |
}
|
123 |
);
|
common/src/resources/js/onboarding.js
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
*
|
3 |
+
* @type {PlainObject}
|
4 |
+
*/
|
5 |
+
tribe.onboarding = {};
|
6 |
+
|
7 |
+
/**
|
8 |
+
*
|
9 |
+
* @param {PlainObject} $ jQuery
|
10 |
+
* @param {PlainObject} obj tribe.onboarding
|
11 |
+
*
|
12 |
+
* @return {void}
|
13 |
+
*/
|
14 |
+
( function( $, obj ) {
|
15 |
+
'use strict';
|
16 |
+
var $document = $( document );
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Selectors used for configuration and setup
|
20 |
+
*
|
21 |
+
* @since TBD
|
22 |
+
*
|
23 |
+
* @type {PlainObject}
|
24 |
+
*/
|
25 |
+
obj.selectors = {};
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Concatenate the CSS classes for the tooltip.
|
29 |
+
*
|
30 |
+
* @param {Array} classes
|
31 |
+
* @returns {String} String containing the classes for the tooltip.
|
32 |
+
*/
|
33 |
+
obj.getTooltipClasses = function( classes ) {
|
34 |
+
const defaultClasses = [ 'tribe-onboarding__tooltip' ];
|
35 |
+
|
36 |
+
return defaultClasses.concat( classes ).join( ' ' );
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Init onboarding steps.
|
41 |
+
*
|
42 |
+
* @since TBD
|
43 |
+
*
|
44 |
+
* @return void
|
45 |
+
*/
|
46 |
+
obj.initTour = function() {
|
47 |
+
const steps = TribeOnboardingTour.steps;
|
48 |
+
const classes = TribeOnboardingTour.classes || [];
|
49 |
+
|
50 |
+
if ( typeof steps === 'undefined' ) {
|
51 |
+
return;
|
52 |
+
}
|
53 |
+
|
54 |
+
if ( ! steps.length ) {
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
|
58 |
+
introJs().setOptions( {
|
59 |
+
tooltipClass: obj.getTooltipClasses( classes ),
|
60 |
+
steps: steps
|
61 |
+
} ).start();
|
62 |
+
};
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Init hints.
|
66 |
+
*
|
67 |
+
* @since TBD
|
68 |
+
*
|
69 |
+
* @return void
|
70 |
+
*/
|
71 |
+
obj.initHints = function() {
|
72 |
+
const hints = TribeOnboardingHints.hints;
|
73 |
+
const classes = TribeOnboardingHints.classes || [];
|
74 |
+
|
75 |
+
if ( ! Array.isArray( hints ) || ! hints.length ) {
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
|
79 |
+
introJs().setOptions( {
|
80 |
+
tooltipClass: obj.getTooltipClasses( classes ),
|
81 |
+
hintButtonLabel: TribeOnboarding.hintButtonLabel,
|
82 |
+
hintPosition: 'middle-right',
|
83 |
+
hintAnimation: true,
|
84 |
+
hints: hints,
|
85 |
+
} ).addHints();
|
86 |
+
};
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Handles the initialization of the enhancer.
|
90 |
+
*
|
91 |
+
* @since TBD
|
92 |
+
*
|
93 |
+
* @return {void}
|
94 |
+
*/
|
95 |
+
obj.ready = function() {
|
96 |
+
// Init Tour.
|
97 |
+
obj.initTour();
|
98 |
+
|
99 |
+
// Init hint.
|
100 |
+
obj.initHints();
|
101 |
+
};
|
102 |
+
|
103 |
+
// Configure on document ready.
|
104 |
+
$document.ready( obj.ready );
|
105 |
+
|
106 |
+
} )( jQuery, tribe.onboarding );
|
common/src/resources/js/onboarding.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tribe.onboarding={},function(t,i){"use strict";var n=t(document);i.selectors={},i.getTooltipClasses=function(t){return["tribe-onboarding__tooltip"].concat(t).join(" ")},i.initTour=function(){const t=TribeOnboardingTour.steps,n=TribeOnboardingTour.classes||[];void 0!==t&&t.length&&introJs().setOptions({tooltipClass:i.getTooltipClasses(n),steps:t}).start()},i.initHints=function(){const t=TribeOnboardingHints.hints,n=TribeOnboardingHints.classes||[];Array.isArray(t)&&t.length&&introJs().setOptions({tooltipClass:i.getTooltipClasses(n),hintButtonLabel:TribeOnboarding.hintButtonLabel,hintPosition:"middle-right",hintAnimation:!0,hints:t}).addHints()},i.ready=function(){i.initTour(),i.initHints()},n.ready(i.ready)}(jQuery,tribe.onboarding);
|
common/vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInite327b8b697647c495d3e4d6238d79f58::getLoader();
|
common/vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit77a78a5dadfd0c72ac991d87712ceac6::getLoader();
|
common/vendor/composer/autoload_classmap.php
CHANGED
@@ -135,12 +135,16 @@ return array(
|
|
135 |
'Tribe\\Log\\Service_Provider' => $baseDir . '/src/Tribe/Log/Service_Provider.php',
|
136 |
'Tribe\\Models\\Post_Types\\Base' => $baseDir . '/src/Tribe/Models/Post_Types/Base.php',
|
137 |
'Tribe\\Models\\Post_Types\\Nothing' => $baseDir . '/src/Tribe/Models/Post_Types/Nothing.php',
|
|
|
|
|
|
|
138 |
'Tribe\\PUE\\Update_Prevention' => $baseDir . '/src/Tribe/PUE/Update_Prevention.php',
|
139 |
'Tribe\\Repository\\Core_Read_Interface' => $baseDir . '/src/Tribe/Repository/Core_Read_Interface.php',
|
140 |
'Tribe\\Repository\\Filter_Validation' => $baseDir . '/src/Tribe/Repository/Filter_Validation.php',
|
141 |
'Tribe\\Service_Providers\\Body_Classes' => $baseDir . '/src/Tribe/Service_Providers/Body_Classes.php',
|
142 |
'Tribe\\Service_Providers\\Crons' => $baseDir . '/src/Tribe/Service_Providers/Crons.php',
|
143 |
'Tribe\\Service_Providers\\Dialog' => $baseDir . '/src/Tribe/Service_Providers/Dialog.php',
|
|
|
144 |
'Tribe\\Service_Providers\\PUE' => $baseDir . '/src/Tribe/Service_Providers/PUE.php',
|
145 |
'Tribe\\Service_Providers\\Shortcodes' => $baseDir . '/src/Tribe/Service_Providers/Shortcodes.php',
|
146 |
'Tribe\\Service_Providers\\Tooltip' => $baseDir . '/src/Tribe/Service_Providers/Tooltip.php',
|
135 |
'Tribe\\Log\\Service_Provider' => $baseDir . '/src/Tribe/Log/Service_Provider.php',
|
136 |
'Tribe\\Models\\Post_Types\\Base' => $baseDir . '/src/Tribe/Models/Post_Types/Base.php',
|
137 |
'Tribe\\Models\\Post_Types\\Nothing' => $baseDir . '/src/Tribe/Models/Post_Types/Nothing.php',
|
138 |
+
'Tribe\\Onboarding\\Hints_Abstract' => $baseDir . '/src/Tribe/Onboarding/Hints_Abstract.php',
|
139 |
+
'Tribe\\Onboarding\\Main' => $baseDir . '/src/Tribe/Onboarding/Main.php',
|
140 |
+
'Tribe\\Onboarding\\Tour_Abstract' => $baseDir . '/src/Tribe/Onboarding/Tour_Abstract.php',
|
141 |
'Tribe\\PUE\\Update_Prevention' => $baseDir . '/src/Tribe/PUE/Update_Prevention.php',
|
142 |
'Tribe\\Repository\\Core_Read_Interface' => $baseDir . '/src/Tribe/Repository/Core_Read_Interface.php',
|
143 |
'Tribe\\Repository\\Filter_Validation' => $baseDir . '/src/Tribe/Repository/Filter_Validation.php',
|
144 |
'Tribe\\Service_Providers\\Body_Classes' => $baseDir . '/src/Tribe/Service_Providers/Body_Classes.php',
|
145 |
'Tribe\\Service_Providers\\Crons' => $baseDir . '/src/Tribe/Service_Providers/Crons.php',
|
146 |
'Tribe\\Service_Providers\\Dialog' => $baseDir . '/src/Tribe/Service_Providers/Dialog.php',
|
147 |
+
'Tribe\\Service_Providers\\Onboarding' => $baseDir . '/src/Tribe/Service_Providers/Onboarding.php',
|
148 |
'Tribe\\Service_Providers\\PUE' => $baseDir . '/src/Tribe/Service_Providers/PUE.php',
|
149 |
'Tribe\\Service_Providers\\Shortcodes' => $baseDir . '/src/Tribe/Service_Providers/Shortcodes.php',
|
150 |
'Tribe\\Service_Providers\\Tooltip' => $baseDir . '/src/Tribe/Service_Providers/Tooltip.php',
|
common/vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit2e1141e594004e0dad407ca1dc672068
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInite327b8b697647c495d3e4d6238d79f58
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInite327b8b697647c495d3e4d6238d79f58', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInite327b8b697647c495d3e4d6238d79f58', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInite327b8b697647c495d3e4d6238d79f58::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
common/vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit4997d4c41c13f30f2ee9934d8041c337 {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInit77a78a5dadfd0c72ac991d87712ceac6 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit77a78a5dadfd0c72ac991d87712ceac6', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit77a78a5dadfd0c72ac991d87712ceac6', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
common/vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -191,12 +191,16 @@ class ComposerStaticInit2e1141e594004e0dad407ca1dc672068
|
|
191 |
'Tribe\\Log\\Service_Provider' => __DIR__ . '/../..' . '/src/Tribe/Log/Service_Provider.php',
|
192 |
'Tribe\\Models\\Post_Types\\Base' => __DIR__ . '/../..' . '/src/Tribe/Models/Post_Types/Base.php',
|
193 |
'Tribe\\Models\\Post_Types\\Nothing' => __DIR__ . '/../..' . '/src/Tribe/Models/Post_Types/Nothing.php',
|
|
|
|
|
|
|
194 |
'Tribe\\PUE\\Update_Prevention' => __DIR__ . '/../..' . '/src/Tribe/PUE/Update_Prevention.php',
|
195 |
'Tribe\\Repository\\Core_Read_Interface' => __DIR__ . '/../..' . '/src/Tribe/Repository/Core_Read_Interface.php',
|
196 |
'Tribe\\Repository\\Filter_Validation' => __DIR__ . '/../..' . '/src/Tribe/Repository/Filter_Validation.php',
|
197 |
'Tribe\\Service_Providers\\Body_Classes' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Body_Classes.php',
|
198 |
'Tribe\\Service_Providers\\Crons' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Crons.php',
|
199 |
'Tribe\\Service_Providers\\Dialog' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Dialog.php',
|
|
|
200 |
'Tribe\\Service_Providers\\PUE' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/PUE.php',
|
201 |
'Tribe\\Service_Providers\\Shortcodes' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Shortcodes.php',
|
202 |
'Tribe\\Service_Providers\\Tooltip' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Tooltip.php',
|
@@ -242,10 +246,10 @@ class ComposerStaticInit2e1141e594004e0dad407ca1dc672068
|
|
242 |
public static function getInitializer(ClassLoader $loader)
|
243 |
{
|
244 |
return \Closure::bind(function () use ($loader) {
|
245 |
-
$loader->prefixLengthsPsr4 =
|
246 |
-
$loader->prefixDirsPsr4 =
|
247 |
-
$loader->prefixesPsr0 =
|
248 |
-
$loader->classMap =
|
249 |
|
250 |
}, null, ClassLoader::class);
|
251 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInite327b8b697647c495d3e4d6238d79f58
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
191 |
'Tribe\\Log\\Service_Provider' => __DIR__ . '/../..' . '/src/Tribe/Log/Service_Provider.php',
|
192 |
'Tribe\\Models\\Post_Types\\Base' => __DIR__ . '/../..' . '/src/Tribe/Models/Post_Types/Base.php',
|
193 |
'Tribe\\Models\\Post_Types\\Nothing' => __DIR__ . '/../..' . '/src/Tribe/Models/Post_Types/Nothing.php',
|
194 |
+
'Tribe\\Onboarding\\Hints_Abstract' => __DIR__ . '/../..' . '/src/Tribe/Onboarding/Hints_Abstract.php',
|
195 |
+
'Tribe\\Onboarding\\Main' => __DIR__ . '/../..' . '/src/Tribe/Onboarding/Main.php',
|
196 |
+
'Tribe\\Onboarding\\Tour_Abstract' => __DIR__ . '/../..' . '/src/Tribe/Onboarding/Tour_Abstract.php',
|
197 |
'Tribe\\PUE\\Update_Prevention' => __DIR__ . '/../..' . '/src/Tribe/PUE/Update_Prevention.php',
|
198 |
'Tribe\\Repository\\Core_Read_Interface' => __DIR__ . '/../..' . '/src/Tribe/Repository/Core_Read_Interface.php',
|
199 |
'Tribe\\Repository\\Filter_Validation' => __DIR__ . '/../..' . '/src/Tribe/Repository/Filter_Validation.php',
|
200 |
'Tribe\\Service_Providers\\Body_Classes' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Body_Classes.php',
|
201 |
'Tribe\\Service_Providers\\Crons' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Crons.php',
|
202 |
'Tribe\\Service_Providers\\Dialog' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Dialog.php',
|
203 |
+
'Tribe\\Service_Providers\\Onboarding' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Onboarding.php',
|
204 |
'Tribe\\Service_Providers\\PUE' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/PUE.php',
|
205 |
'Tribe\\Service_Providers\\Shortcodes' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Shortcodes.php',
|
206 |
'Tribe\\Service_Providers\\Tooltip' => __DIR__ . '/../..' . '/src/Tribe/Service_Providers/Tooltip.php',
|
246 |
public static function getInitializer(ClassLoader $loader)
|
247 |
{
|
248 |
return \Closure::bind(function () use ($loader) {
|
249 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInite327b8b697647c495d3e4d6238d79f58::$prefixLengthsPsr4;
|
250 |
+
$loader->prefixDirsPsr4 = ComposerStaticInite327b8b697647c495d3e4d6238d79f58::$prefixDirsPsr4;
|
251 |
+
$loader->prefixesPsr0 = ComposerStaticInite327b8b697647c495d3e4d6238d79f58::$prefixesPsr0;
|
252 |
+
$loader->classMap = ComposerStaticInite327b8b697647c495d3e4d6238d79f58::$classMap;
|
253 |
|
254 |
}, null, ClassLoader::class);
|
255 |
}
|
common/vendor/composer/installed.json
CHANGED
@@ -35,13 +35,13 @@
|
|
35 |
"authors": [
|
36 |
{
|
37 |
"name": "Neuman Vong",
|
38 |
-
"
|
39 |
-
"
|
40 |
},
|
41 |
{
|
42 |
"name": "Anant Narayanan",
|
43 |
-
"
|
44 |
-
"
|
45 |
}
|
46 |
],
|
47 |
"description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
|
@@ -174,23 +174,23 @@
|
|
174 |
},
|
175 |
{
|
176 |
"name": "psr/log",
|
177 |
-
"version": "1.1.
|
178 |
-
"version_normalized": "1.1.
|
179 |
"source": {
|
180 |
"type": "git",
|
181 |
"url": "https://github.com/php-fig/log.git",
|
182 |
-
"reference": "
|
183 |
},
|
184 |
"dist": {
|
185 |
"type": "zip",
|
186 |
-
"url": "https://api.github.com/repos/php-fig/log/zipball/
|
187 |
-
"reference": "
|
188 |
"shasum": ""
|
189 |
},
|
190 |
"require": {
|
191 |
"php": ">=5.3.0"
|
192 |
},
|
193 |
-
"time": "
|
194 |
"type": "library",
|
195 |
"extra": {
|
196 |
"branch-alias": {
|
@@ -210,7 +210,7 @@
|
|
210 |
"authors": [
|
211 |
{
|
212 |
"name": "PHP-FIG",
|
213 |
-
"homepage": "
|
214 |
}
|
215 |
],
|
216 |
"description": "Common interface for logging libraries",
|
35 |
"authors": [
|
36 |
{
|
37 |
"name": "Neuman Vong",
|
38 |
+
"role": "Developer",
|
39 |
+
"email": "neuman+pear@twilio.com"
|
40 |
},
|
41 |
{
|
42 |
"name": "Anant Narayanan",
|
43 |
+
"role": "Developer",
|
44 |
+
"email": "anant@php.net"
|
45 |
}
|
46 |
],
|
47 |
"description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
|
174 |
},
|
175 |
{
|
176 |
"name": "psr/log",
|
177 |
+
"version": "1.1.4",
|
178 |
+
"version_normalized": "1.1.4.0",
|
179 |
"source": {
|
180 |
"type": "git",
|
181 |
"url": "https://github.com/php-fig/log.git",
|
182 |
+
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
|
183 |
},
|
184 |
"dist": {
|
185 |
"type": "zip",
|
186 |
+
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
|
187 |
+
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
|
188 |
"shasum": ""
|
189 |
},
|
190 |
"require": {
|
191 |
"php": ">=5.3.0"
|
192 |
},
|
193 |
+
"time": "2021-05-03T11:20:27+00:00",
|
194 |
"type": "library",
|
195 |
"extra": {
|
196 |
"branch-alias": {
|
210 |
"authors": [
|
211 |
{
|
212 |
"name": "PHP-FIG",
|
213 |
+
"homepage": "https://www.php-fig.org/"
|
214 |
}
|
215 |
],
|
216 |
"description": "Common interface for logging libraries",
|
common/vendor/psr/log/Psr/Log/AbstractLogger.php
CHANGED
@@ -14,8 +14,8 @@ abstract class AbstractLogger implements LoggerInterface
|
|
14 |
/**
|
15 |
* System is unusable.
|
16 |
*
|
17 |
-
* @param string
|
18 |
-
* @param
|
19 |
*
|
20 |
* @return void
|
21 |
*/
|
@@ -30,8 +30,8 @@ abstract class AbstractLogger implements LoggerInterface
|
|
30 |
* Example: Entire website down, database unavailable, etc. This should
|
31 |
* trigger the SMS alerts and wake you up.
|
32 |
*
|
33 |
-
* @param string
|
34 |
-
* @param
|
35 |
*
|
36 |
* @return void
|
37 |
*/
|
@@ -45,8 +45,8 @@ abstract class AbstractLogger implements LoggerInterface
|
|
45 |
*
|
46 |
* Example: Application component unavailable, unexpected exception.
|
47 |
*
|
48 |
-
* @param string
|
49 |
-
* @param
|
50 |
*
|
51 |
* @return void
|
52 |
*/
|
@@ -59,8 +59,8 @@ abstract class AbstractLogger implements LoggerInterface
|
|
59 |
* Runtime errors that do not require immediate action but should typically
|
60 |
* be logged and monitored.
|
61 |
*
|
62 |
-
* @param string
|
63 |
-
* @param
|
64 |
*
|
65 |
* @return void
|
66 |
*/
|
@@ -75,8 +75,8 @@ abstract class AbstractLogger implements LoggerInterface
|
|
75 |
* Example: Use of deprecated APIs, poor use of an API, undesirable things
|
76 |
* that are not necessarily wrong.
|
77 |
*
|
78 |
-
* @param string
|
79 |
-
* @param
|
80 |
*
|
81 |
* @return void
|
82 |
*/
|
@@ -88,8 +88,8 @@ abstract class AbstractLogger implements LoggerInterface
|
|
88 |
/**
|
89 |
* Normal but significant events.
|
90 |
*
|
91 |
-
* @param string
|
92 |
-
* @param
|
93 |
*
|
94 |
* @return void
|
95 |
*/
|
@@ -103,8 +103,8 @@ abstract class AbstractLogger implements LoggerInterface
|
|
103 |
*
|
104 |
* Example: User logs in, SQL logs.
|
105 |
*
|
106 |
-
* @param string
|
107 |
-
* @param
|
108 |
*
|
109 |
* @return void
|
110 |
*/
|
@@ -116,8 +116,8 @@ abstract class AbstractLogger implements LoggerInterface
|
|
116 |
/**
|
117 |
* Detailed debug information.
|
118 |
*
|
119 |
-
* @param string
|
120 |
-
* @param
|
121 |
*
|
122 |
* @return void
|
123 |
*/
|
14 |
/**
|
15 |
* System is unusable.
|
16 |
*
|
17 |
+
* @param string $message
|
18 |
+
* @param mixed[] $context
|
19 |
*
|
20 |
* @return void
|
21 |
*/
|
30 |
* Example: Entire website down, database unavailable, etc. This should
|
31 |
* trigger the SMS alerts and wake you up.
|
32 |
*
|
33 |
+
* @param string $message
|
34 |
+
* @param mixed[] $context
|
35 |
*
|
36 |
* @return void
|
37 |
*/
|
45 |
*
|
46 |
* Example: Application component unavailable, unexpected exception.
|
47 |
*
|
48 |
+
* @param string $message
|
49 |
+
* @param mixed[] $context
|
50 |
*
|
51 |
* @return void
|
52 |
*/
|
59 |
* Runtime errors that do not require immediate action but should typically
|
60 |
* be logged and monitored.
|
61 |
*
|
62 |
+
* @param string $message
|
63 |
+
* @param mixed[] $context
|
64 |
*
|
65 |
* @return void
|
66 |
*/
|
75 |
* Example: Use of deprecated APIs, poor use of an API, undesirable things
|
76 |
* that are not necessarily wrong.
|
77 |
*
|
78 |
+
* @param string $message
|
79 |
+
* @param mixed[] $context
|
80 |
*
|
81 |
* @return void
|
82 |
*/
|
88 |
/**
|
89 |
* Normal but significant events.
|
90 |
*
|
91 |
+
* @param string $message
|
92 |
+
* @param mixed[] $context
|
93 |
*
|
94 |
* @return void
|
95 |
*/
|
103 |
*
|
104 |
* Example: User logs in, SQL logs.
|
105 |
*
|
106 |
+
* @param string $message
|
107 |
+
* @param mixed[] $context
|
108 |
*
|
109 |
* @return void
|
110 |
*/
|
116 |
/**
|
117 |
* Detailed debug information.
|
118 |
*
|
119 |
+
* @param string $message
|
120 |
+
* @param mixed[] $context
|
121 |
*
|
122 |
* @return void
|
123 |
*/
|
common/vendor/psr/log/Psr/Log/LoggerAwareTrait.php
CHANGED
@@ -10,7 +10,7 @@ trait LoggerAwareTrait
|
|
10 |
/**
|
11 |
* The logger instance.
|
12 |
*
|
13 |
-
* @var LoggerInterface
|
14 |
*/
|
15 |
protected $logger;
|
16 |
|
10 |
/**
|
11 |
* The logger instance.
|
12 |
*
|
13 |
+
* @var LoggerInterface|null
|
14 |
*/
|
15 |
protected $logger;
|
16 |
|
event-tickets.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Event Tickets
|
4 |
Plugin URI: https://evnt.is/1acb
|
5 |
Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
|
6 |
-
Version: 5.1.
|
7 |
Author: The Events Calendar
|
8 |
Author URI: https://evnt.is/1aor
|
9 |
License: GPLv2 or later
|
@@ -11,7 +11,6 @@ License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
|
11 |
Text Domain: event-tickets
|
12 |
Domain Path: /lang/
|
13 |
*/
|
14 |
-
|
15 |
/*
|
16 |
Copyright 2010-2012 by Modern Tribe Inc and the contributors
|
17 |
|
3 |
Plugin Name: Event Tickets
|
4 |
Plugin URI: https://evnt.is/1acb
|
5 |
Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
|
6 |
+
Version: 5.1.10
|
7 |
Author: The Events Calendar
|
8 |
Author URI: https://evnt.is/1aor
|
9 |
License: GPLv2 or later
|
11 |
Text Domain: event-tickets
|
12 |
Domain Path: /lang/
|
13 |
*/
|
|
|
14 |
/*
|
15 |
Copyright 2010-2012 by Modern Tribe Inc and the contributors
|
16 |
|
lang/event-tickets-es_ES.mo
CHANGED
Binary file
|
lang/event-tickets-fr_FR.mo
CHANGED
Binary file
|
lang/event-tickets-ro_RO.mo
CHANGED
Binary file
|
lang/event-tickets.pot
CHANGED
@@ -2,49 +2,32 @@
|
|
2 |
# This file is distributed under the same license as the Event Tickets package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Event Tickets 5.1.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/event-tickets\n"
|
7 |
-
"POT-Creation-Date: 2021-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2021-
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
15 |
-
#. #-#-#-#-# event-tickets.pot (Event Tickets 5.1.
|
16 |
#. Plugin Name of the plugin/theme
|
17 |
-
#: event-tickets.php:
|
18 |
#: src/Tribe/Privacy.php:59 src/admin-views/admin-welcome-message.php:58
|
19 |
msgid "Event Tickets"
|
20 |
msgstr ""
|
21 |
|
22 |
-
#: src/Tickets/Commerce/Attendee.php:
|
23 |
#: src/Tribe/Admin/Manager/Service_Provider.php:173 src/Tribe/Attendees.php:212
|
24 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
25 |
#: src/Tribe/Tabbed_View/Attendee_Report_Tab.php:22 src/admin-views/list.php:95
|
26 |
msgid "Attendees"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: src/Tickets/Commerce/
|
30 |
-
msgid ""
|
31 |
-
"Make sure to complete the entire PayPal process. Do not close the window you "
|
32 |
-
"have finished the process."
|
33 |
-
msgstr ""
|
34 |
-
|
35 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Ajax_Request_Handler.php:31
|
36 |
-
msgid ""
|
37 |
-
"The last screen of the PayPal connect process includes a button to be sent "
|
38 |
-
"back to your site. It is important you click this and do not close the "
|
39 |
-
"window yourself."
|
40 |
-
msgstr ""
|
41 |
-
|
42 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Ajax_Request_Handler.php:32
|
43 |
-
msgid "If you’re still having problems connecting:"
|
44 |
-
msgstr ""
|
45 |
-
|
46 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Ajax_Request_Handler.php:38
|
47 |
-
msgid "Having trouble connecting to PayPal?"
|
48 |
msgstr ""
|
49 |
|
50 |
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:42
|
@@ -97,45 +80,78 @@ msgid ""
|
|
97 |
"again once you are in live mode."
|
98 |
msgstr ""
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:43
|
101 |
msgid "PayPal Commerce"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: src/Tickets/Commerce/Gateways/PayPal/
|
105 |
-
msgid "
|
|
|
|
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: src/Tickets/Commerce/Gateways/PayPal/
|
109 |
msgid ""
|
110 |
-
"
|
111 |
-
"
|
|
|
|
|
|
|
|
|
|
|
112 |
msgstr ""
|
113 |
|
114 |
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:38
|
|
|
|
|
|
|
|
|
115 |
msgid ""
|
116 |
"There was a problem with creating webhook on PayPal. A gateway error log "
|
117 |
"also added to get details information about PayPal response."
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
121 |
msgid "PayPal client access token API request response is:"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
125 |
msgid "PayPal client rest API credentials API request response is:"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
129 |
msgid ""
|
130 |
"There was a problem with PayPal client rest API request and we could not "
|
131 |
"find valid client id and secret."
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
135 |
msgid "PayPal merchant status check API request response is:"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
139 |
msgid ""
|
140 |
"A valid SSL certificate is required to accept payments and set up your "
|
141 |
"PayPal account. Once a\n"
|
@@ -143,22 +159,22 @@ msgid ""
|
|
143 |
"disconnect and reconnect your account."
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
147 |
msgid ""
|
148 |
"There was a problem with the status check for your account. Please try "
|
149 |
"disconnecting and connecting again. If the problem persists, please contact "
|
150 |
"support."
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
154 |
msgid "Set up an account to receive payment from PayPal"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
158 |
msgid "Confirm your primary email address"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
162 |
msgid ""
|
163 |
"Your account was expected to be able to accept custom payments, but is not. "
|
164 |
"Please make sure your\n"
|
@@ -166,94 +182,59 @@ msgid ""
|
|
166 |
"persists, please contact PayPal."
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
170 |
msgid "Reach out to PayPal to enable PPCP_CUSTOM for your account"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
174 |
msgid "Reach out to PayPal to resolve the following capabilities:"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
178 |
msgid "logged data"
|
179 |
msgstr ""
|
180 |
|
181 |
#. Translators: %1$s: The logged data link.
|
182 |
-
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:
|
183 |
msgid ""
|
184 |
"There was a problem setting up the webhooks for your PayPal account. Please "
|
185 |
"try disconnecting and reconnecting your PayPal account. If the problem "
|
186 |
"persists, please contact support and provide them with the latest %1$s"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/On_Boarding_Endpoint.php:
|
190 |
msgid "Unexpected response from PayPal when on boarding"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:
|
194 |
msgid "Order ID in PayPal"
|
195 |
msgstr ""
|
196 |
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:80
|
202 |
-
msgid "Whether the processing was successful"
|
203 |
-
msgstr ""
|
204 |
-
|
205 |
-
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:89
|
206 |
-
msgid "The webhook was invalid and was not processed"
|
207 |
-
msgstr ""
|
208 |
-
|
209 |
-
#. Translators: %s: The error message.
|
210 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Repositories/Authorization.php:69
|
211 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Repositories/Webhooks.php:100
|
212 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Repositories/Webhooks.php:149
|
213 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Repositories/Webhooks.php:198
|
214 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Repositories/Webhooks.php:267
|
215 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Repositories/Webhooks.php:359
|
216 |
-
msgid "PayPal request error: %s"
|
217 |
-
msgstr ""
|
218 |
-
|
219 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Repositories/Authorization.php:80
|
220 |
-
msgid "Unexpected PayPal response when getting token from client credentials"
|
221 |
-
msgstr ""
|
222 |
-
|
223 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Repositories/Webhooks.php:111
|
224 |
-
msgid "Unexpected PayPal response when verifying signature"
|
225 |
-
msgstr ""
|
226 |
-
|
227 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Repositories/Webhooks.php:160
|
228 |
-
msgid "Unexpected PayPal response when getting list of webhooks"
|
229 |
-
msgstr ""
|
230 |
-
|
231 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Repositories/Webhooks.php:211
|
232 |
-
msgid "The PayPal webhook does not exist"
|
233 |
msgstr ""
|
234 |
|
235 |
-
|
236 |
-
|
|
|
|
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: src/Tickets/Commerce/Gateways/PayPal/
|
240 |
-
msgid ""
|
241 |
-
"PayPal webhook limit has been reached, you need to go into your developer."
|
242 |
-
"paypal.com account and remove webhooks from the associated account"
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: src/Tickets/Commerce/Gateways/PayPal/
|
246 |
-
msgid "
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: src/Tickets/Commerce/Gateways/PayPal/
|
250 |
-
msgid ""
|
251 |
-
"The PayPal webhook was not able to be updated because it did not exist, "
|
252 |
-
"attempting to create it now"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: src/Tickets/Commerce/Gateways/PayPal/
|
256 |
-
msgid "
|
257 |
msgstr ""
|
258 |
|
259 |
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:33
|
@@ -261,46 +242,46 @@ msgid "-- Please select a country --"
|
|
261 |
msgstr ""
|
262 |
|
263 |
#. Translators: %s: The PayPal telephone number.
|
264 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:
|
265 |
msgid "Please call a PayPal support representative at %s"
|
266 |
msgstr ""
|
267 |
|
268 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:
|
269 |
msgid ""
|
270 |
"Please reach out to PayPal support from your PayPal account Resolution Center"
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:
|
274 |
msgid " and relay the following message:"
|
275 |
msgstr ""
|
276 |
|
277 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:77
|
278 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
279 |
msgid "Return to the %1$sAttendees Report%2$s."
|
280 |
msgstr ""
|
281 |
|
282 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:84
|
283 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
284 |
msgid "Post updated. %1$s"
|
285 |
msgstr ""
|
286 |
|
287 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:88
|
288 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
289 |
msgid "Post published. %1$s"
|
290 |
msgstr ""
|
291 |
|
292 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:91
|
293 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
294 |
msgid "Post submitted."
|
295 |
msgstr ""
|
296 |
|
297 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:92
|
298 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
299 |
msgid "Post scheduled."
|
300 |
msgstr ""
|
301 |
|
302 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:93
|
303 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
304 |
msgid "Post draft updated."
|
305 |
msgstr ""
|
306 |
|
@@ -311,67 +292,32 @@ msgid ""
|
|
311 |
"confirmation."
|
312 |
msgstr ""
|
313 |
|
314 |
-
#. Translators: %s: The missing keys and header information.
|
315 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Headers.php:92
|
316 |
-
msgid "Missing PayPal webhook header: %s"
|
317 |
-
msgstr ""
|
318 |
-
|
319 |
-
#. Translators: %s: The PayPal payment event.
|
320 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Event_Listener.php:97
|
321 |
-
msgid "Mismatched event type for webhook event: %s"
|
322 |
-
msgstr ""
|
323 |
-
|
324 |
#. Translators: %s: The PayPal payment event.
|
325 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/
|
326 |
msgid "Missing PayPal payment for webhook event: %s"
|
327 |
msgstr ""
|
328 |
|
329 |
#. Translators: %s: The PayPal payment ID.
|
330 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/
|
331 |
msgid "Missing order for PayPal payment from webhook: %s"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#. Translators: %
|
335 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/
|
336 |
-
msgid "
|
337 |
-
msgstr ""
|
338 |
-
|
339 |
-
#. Translators: %s: The error message.
|
340 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Event_Listener.php:230
|
341 |
-
msgid "PayPal capture request error: %s"
|
342 |
-
msgstr ""
|
343 |
-
|
344 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Event_Listener.php:241
|
345 |
-
msgid "Unexpected PayPal capture response"
|
346 |
-
msgstr ""
|
347 |
-
|
348 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Webhook_Checker.php:98
|
349 |
-
msgid ""
|
350 |
-
"There was a problem updating your PayPal Payments webhook. Please disconnect "
|
351 |
-
"your account and reconnect it."
|
352 |
-
msgstr ""
|
353 |
-
|
354 |
-
#. Translators: %s: The event type.
|
355 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Webhooks_Route.php:99
|
356 |
-
msgid "PayPal webhook event type not registered or supported: %s"
|
357 |
-
msgstr ""
|
358 |
-
|
359 |
-
#. Translators: %s: The event type.
|
360 |
-
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Webhooks_Route.php:111
|
361 |
-
msgid "Received PayPal webhook event for type: %s"
|
362 |
msgstr ""
|
363 |
|
364 |
-
|
365 |
-
|
|
|
366 |
msgstr ""
|
367 |
|
368 |
-
|
369 |
-
|
370 |
-
msgid "Error processing webhook: %s"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: src/Tickets/Commerce/Models/Attendee_Model.php:
|
374 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
375 |
msgid "(deleted)"
|
376 |
msgstr ""
|
377 |
|
@@ -379,7 +325,7 @@ msgstr ""
|
|
379 |
msgid "Tickets Commerce"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: src/Tickets/Commerce/Order.php:
|
383 |
msgid "Orders"
|
384 |
msgstr ""
|
385 |
|
@@ -403,34 +349,33 @@ msgid "Cancelled:"
|
|
403 |
msgstr ""
|
404 |
|
405 |
#: src/Tickets/Commerce/Reports/Event.php:53
|
406 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
407 |
msgid "Sales report"
|
408 |
msgstr ""
|
409 |
|
410 |
#: src/Tickets/Commerce/Reports/Ticket.php:38
|
411 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
412 |
msgid "Report"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: src/Tickets/Commerce/Settings.php:
|
416 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/connect-with-paypal.php:70
|
417 |
msgid "Payments"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: src/Tickets/Commerce/Settings.php:
|
421 |
#: src/Tribe/Main.php:666 src/admin-views/admin-welcome-message.php:56
|
422 |
#: src/admin-views/tribe-commerce-settings.php:4
|
423 |
msgid "Event Tickets Plus"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: src/Tickets/Commerce/Settings.php:
|
427 |
#: src/admin-views/tribe-commerce-settings.php:9
|
428 |
msgid "Check it out!"
|
429 |
msgstr ""
|
430 |
|
431 |
#. Translators: %1$s: The Event Tickets Plus link, %2$s: The word "ticket" in
|
432 |
#. lowercase, %3$s: The "Check it out!" link.
|
433 |
-
#: src/Tickets/Commerce/Settings.php:
|
434 |
msgctxt "about Tickets Commerce"
|
435 |
msgid ""
|
436 |
"Tickets Commerce is a light implementation of a commerce gateway using "
|
@@ -441,40 +386,44 @@ msgid ""
|
|
441 |
"%3$s"
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: src/Tickets/Commerce/Settings.php:
|
445 |
msgid "Enable Tickets Commerce"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: src/Tickets/Commerce/Settings.php:
|
449 |
msgid "-- No page set --"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: src/Tickets/Commerce/Settings.php:
|
|
|
|
|
|
|
|
|
453 |
msgid "Enable Test Mode"
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: src/Tickets/Commerce/Settings.php:
|
457 |
msgid ""
|
458 |
"Enables Test mode for testing payments. Any payments made will be done on "
|
459 |
"\"sandbox\" accounts."
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: src/Tickets/Commerce/Settings.php:
|
463 |
#: src/admin-views/tribe-commerce-settings.php:136
|
464 |
msgid "Currency Code"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: src/Tickets/Commerce/Settings.php:
|
468 |
msgid "The currency that will be used for Tickets Commerce transactions."
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: src/Tickets/Commerce/Settings.php:
|
472 |
#: src/admin-views/tribe-commerce-settings.php:144
|
473 |
msgid "Stock Handling"
|
474 |
msgstr ""
|
475 |
|
476 |
#. Translators: %s: The word "ticket" in lowercase.
|
477 |
-
#: src/Tickets/Commerce/Settings.php:
|
478 |
msgctxt "tickets fields settings paypal stock handling"
|
479 |
msgid ""
|
480 |
"When a customer purchases a %s, the payment gateway might flag the order as "
|
@@ -482,62 +431,64 @@ msgid ""
|
|
482 |
"gateway."
|
483 |
msgstr ""
|
484 |
|
485 |
-
#. Translators: %s: The word "ticket" in lowercase.
|
486 |
-
|
487 |
-
#: src/
|
488 |
-
msgid "
|
|
|
489 |
msgstr ""
|
490 |
|
491 |
-
#. Translators: %s: The word "ticket" in lowercase.
|
492 |
-
|
|
|
493 |
msgid ""
|
494 |
-
"Only decrease available %s stock if an order is confirmed as
|
495 |
-
"the payment gateway."
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: src/Tickets/Commerce/Settings.php:
|
499 |
msgid "Checkout page"
|
500 |
msgstr ""
|
501 |
|
502 |
#. Translators: %s: The [shortcode] for the success page.
|
503 |
-
#: src/Tickets/Commerce/Settings.php:
|
504 |
msgid ""
|
505 |
"This is the page where customers go to complete their purchase. Use the %s "
|
506 |
"shortcode to display the checkout experience in the page content."
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: src/Tickets/Commerce/Settings.php:
|
510 |
#: src/admin-views/tribe-commerce-settings.php:162
|
511 |
msgid "Success page"
|
512 |
msgstr ""
|
513 |
|
514 |
#. Translators: %s: The [shortcode] for the success page.
|
515 |
-
#: src/Tickets/Commerce/Settings.php:
|
516 |
msgid ""
|
517 |
"After a successful order, users will be redirected to this page. Use the %s "
|
518 |
"shortcode to display the order confirmation to the user in the page content."
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: src/Tickets/Commerce/Settings.php:
|
522 |
#: src/admin-views/tribe-commerce-settings.php:176
|
523 |
msgid "Confirmation email sender address"
|
524 |
msgstr ""
|
525 |
|
526 |
#. Translators: %s: The word "tickets" in lowercase.
|
527 |
-
#: src/Tickets/Commerce/Settings.php:
|
528 |
msgctxt "tickets fields settings confirmation email"
|
529 |
msgid ""
|
530 |
"Email address that %s customers will receive confirmation from. Leave empty "
|
531 |
"to use the default WordPress site email address."
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: src/Tickets/Commerce/Settings.php:
|
535 |
#: src/admin-views/tribe-commerce-settings.php:185
|
536 |
msgid "Confirmation email sender name"
|
537 |
msgstr ""
|
538 |
|
539 |
#. Translators: %s: The word "ticket" in lowercase.
|
540 |
-
#: src/Tickets/Commerce/Settings.php:
|
541 |
#: src/admin-views/tribe-commerce-settings.php:186
|
542 |
msgctxt "tickets fields settings paypal email sender"
|
543 |
msgid ""
|
@@ -545,13 +496,13 @@ msgid ""
|
|
545 |
"purchase."
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: src/Tickets/Commerce/Settings.php:
|
549 |
#: src/admin-views/tribe-commerce-settings.php:194
|
550 |
msgid "Confirmation email subject"
|
551 |
msgstr ""
|
552 |
|
553 |
#. Translators: %s: The word "ticket" in lowercase.
|
554 |
-
#: src/Tickets/Commerce/Settings.php:
|
555 |
#: src/admin-views/tribe-commerce-settings.php:195
|
556 |
msgctxt "tickets fields settings paypal email subject"
|
557 |
msgid ""
|
@@ -560,7 +511,7 @@ msgid ""
|
|
560 |
msgstr ""
|
561 |
|
562 |
#. Translators: %s: The word "tickets" in lowercase.
|
563 |
-
#: src/Tickets/Commerce/Settings.php:
|
564 |
#: src/admin-views/tribe-commerce-settings.php:197
|
565 |
msgctxt "tickets fields settings paypal email subject"
|
566 |
msgid "You have %s!"
|
@@ -592,26 +543,38 @@ msgstr ""
|
|
592 |
msgid "Not Completed"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
596 |
msgid "Pending"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
600 |
msgid "This order contained an invalid Ticket (ID: %1$d)"
|
601 |
msgstr ""
|
602 |
|
603 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
604 |
msgid "This order contained a Ticket with an invalid Event (Event ID: %1$d)"
|
605 |
msgstr ""
|
606 |
|
607 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
608 |
msgid "Cannot purchase zero of \"%1$s\""
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: src/Tickets/Commerce/Status/Pending.php:
|
612 |
msgid "Insufficient stock for \"%1$s\""
|
613 |
msgstr ""
|
614 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
615 |
#: src/Tickets/Commerce/Status/Refunded.php:27
|
616 |
msgid "Refunded"
|
617 |
msgstr ""
|
@@ -628,7 +591,11 @@ msgstr ""
|
|
628 |
msgid "Voided"
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: src/Tickets/Commerce/
|
|
|
|
|
|
|
|
|
632 |
msgid "Tickets"
|
633 |
msgstr ""
|
634 |
|
@@ -1437,11 +1404,11 @@ msgctxt "ticket provider"
|
|
1437 |
msgid "Tribe Commerce"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
1441 |
msgid "Tribe Commerce Tickets"
|
1442 |
msgstr ""
|
1443 |
|
1444 |
-
#: src/Tribe/Commerce/PayPal/Main.php:
|
1445 |
msgid "Tribe Commerce Ticket"
|
1446 |
msgstr ""
|
1447 |
|
@@ -1590,27 +1557,27 @@ msgstr ""
|
|
1590 |
msgid "Are you sure you want to cancel?"
|
1591 |
msgstr ""
|
1592 |
|
1593 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:297 src/Tribe/Tickets.php:
|
1594 |
msgctxt "Error message title, will be followed by the error code."
|
1595 |
msgid "API Error"
|
1596 |
msgstr ""
|
1597 |
|
1598 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:298 src/Tribe/Tickets.php:
|
1599 |
msgid ""
|
1600 |
"Refresh this page or wait a few minutes before trying again. If this happens "
|
1601 |
"repeatedly, please contact the Site Admin."
|
1602 |
msgstr ""
|
1603 |
|
1604 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:299 src/Tribe/Tickets.php:
|
1605 |
msgid ""
|
1606 |
"The ticket for this event has sold out and has been removed from your cart."
|
1607 |
msgstr ""
|
1608 |
|
1609 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:300 src/Tribe/Tickets.php:
|
1610 |
msgid "Whoops!"
|
1611 |
msgstr ""
|
1612 |
|
1613 |
-
#: src/Tribe/Editor/Blocks/Tickets.php:301 src/Tribe/Tickets.php:
|
1614 |
msgctxt "The %s will change based on the error produced."
|
1615 |
msgid "You have %s ticket(s) with a field that requires information."
|
1616 |
msgstr ""
|
@@ -1658,7 +1625,7 @@ msgid ""
|
|
1658 |
"recurring events."
|
1659 |
msgstr ""
|
1660 |
|
1661 |
-
#: src/Tribe/Editor.php:
|
1662 |
msgid "Tickets Blocks"
|
1663 |
msgstr ""
|
1664 |
|
@@ -2846,14 +2813,6 @@ msgstr ""
|
|
2846 |
msgid "%s are not yet available"
|
2847 |
msgstr ""
|
2848 |
|
2849 |
-
#: src/Tribe/Tickets.php:3146
|
2850 |
-
msgid "%s are no longer available."
|
2851 |
-
msgstr ""
|
2852 |
-
|
2853 |
-
#: src/Tribe/Tickets.php:3148
|
2854 |
-
msgid "There are no %s available at this time."
|
2855 |
-
msgstr ""
|
2856 |
-
|
2857 |
#: src/Tribe/Tickets_Handler.php:86
|
2858 |
#: src/views/blocks/tickets/extra-available-unlimited.php:19
|
2859 |
#: src/views/v2/tickets/item/extra/available/unlimited.php:56
|
@@ -3117,10 +3076,6 @@ msgstr ""
|
|
3117 |
msgid "Search attendees"
|
3118 |
msgstr ""
|
3119 |
|
3120 |
-
#: src/admin-views/commerce/gateways/paypal/signup-link.php:25
|
3121 |
-
msgid "Connect Automatically with <i>PayPal</i>"
|
3122 |
-
msgstr ""
|
3123 |
-
|
3124 |
#: src/admin-views/commerce/metabox/capacity.php:16
|
3125 |
#: src/admin-views/editor/list-row.php:99
|
3126 |
#: src/admin-views/rsvp-metabox-capacity.php:10
|
@@ -3149,7 +3104,7 @@ msgid "View Orders"
|
|
3149 |
msgstr ""
|
3150 |
|
3151 |
#: src/admin-views/editor/column-body-price.php:9
|
3152 |
-
#: src/admin-views/editor/fieldset/price.php:
|
3153 |
#: src/admin-views/legacy-ticket-fields.php:15
|
3154 |
#: src/admin-views/price-fields.php:3
|
3155 |
msgid "Price:"
|
@@ -3177,31 +3132,31 @@ msgid "Ti"
|
|
3177 |
msgstr ""
|
3178 |
|
3179 |
#. Translators: %s: singular version of the Ticket label.
|
3180 |
-
#: src/admin-views/editor/fieldset/price.php:
|
3181 |
msgctxt "ticket price validation error"
|
3182 |
msgid "%s price must be greater than zero."
|
3183 |
msgstr ""
|
3184 |
|
3185 |
-
#: src/admin-views/editor/fieldset/price.php:
|
3186 |
msgctxt "price description"
|
3187 |
msgid "Leave blank for free %s"
|
3188 |
msgstr ""
|
3189 |
|
3190 |
-
#: src/admin-views/editor/fieldset/price.php:
|
3191 |
#: src/admin-views/legacy-ticket-fields.php:24
|
3192 |
#: src/admin-views/price-fields.php:12
|
3193 |
msgid "Sale Price:"
|
3194 |
msgstr ""
|
3195 |
|
3196 |
-
#: src/admin-views/editor/fieldset/price.php:
|
3197 |
msgid "Current sale price. This can be managed via the product editor."
|
3198 |
msgstr ""
|
3199 |
|
3200 |
-
#: src/admin-views/editor/fieldset/price.php:
|
3201 |
msgid "Sale/Member Price:"
|
3202 |
msgstr ""
|
3203 |
|
3204 |
-
#: src/admin-views/editor/fieldset/price.php:
|
3205 |
msgid ""
|
3206 |
"Current sale or member price. This can be managed via the product editor."
|
3207 |
msgstr ""
|
@@ -3625,74 +3580,6 @@ msgid ""
|
|
3625 |
"statuses:"
|
3626 |
msgstr ""
|
3627 |
|
3628 |
-
#: src/admin-views/payments/tickets-commerce.php:25
|
3629 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/connect-with-paypal.php:62
|
3630 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php:27
|
3631 |
-
msgid "Disconnect"
|
3632 |
-
msgstr ""
|
3633 |
-
|
3634 |
-
#: src/admin-views/payments/tickets-commerce.php:26
|
3635 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php:28
|
3636 |
-
msgid "Refresh Access Token"
|
3637 |
-
msgstr ""
|
3638 |
-
|
3639 |
-
#: src/admin-views/payments/tickets-commerce.php:27
|
3640 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php:29
|
3641 |
-
msgid "Refresh User Info"
|
3642 |
-
msgstr ""
|
3643 |
-
|
3644 |
-
#: src/admin-views/payments/tickets-commerce.php:28
|
3645 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php:31
|
3646 |
-
msgid "PayPal Status: Connected"
|
3647 |
-
msgstr ""
|
3648 |
-
|
3649 |
-
#: src/admin-views/payments/tickets-commerce.php:29
|
3650 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php:32
|
3651 |
-
msgid "Connected as: %1$s"
|
3652 |
-
msgstr ""
|
3653 |
-
|
3654 |
-
#: src/admin-views/payments/tickets-commerce.php:32
|
3655 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php:35
|
3656 |
-
msgid "Accept online payments with PayPal!"
|
3657 |
-
msgstr ""
|
3658 |
-
|
3659 |
-
#: src/admin-views/payments/tickets-commerce.php:33
|
3660 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php:37
|
3661 |
-
msgid ""
|
3662 |
-
"Start selling tickets to your events today with PayPal. Attendees can "
|
3663 |
-
"purchase tickets directly on your site using debt or credit cards with no "
|
3664 |
-
"additional fees."
|
3665 |
-
msgstr ""
|
3666 |
-
|
3667 |
-
#: src/admin-views/payments/tickets-commerce.php:41
|
3668 |
-
msgid "Credit and debit card payments"
|
3669 |
-
msgstr ""
|
3670 |
-
|
3671 |
-
#: src/admin-views/payments/tickets-commerce.php:42
|
3672 |
-
msgid "Easy, no API key connection"
|
3673 |
-
msgstr ""
|
3674 |
-
|
3675 |
-
#: src/admin-views/payments/tickets-commerce.php:43
|
3676 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php:52
|
3677 |
-
msgid "Accept payments from around the world"
|
3678 |
-
msgstr ""
|
3679 |
-
|
3680 |
-
#: src/admin-views/payments/tickets-commerce.php:44
|
3681 |
-
msgid "Support 3D Secure Payments"
|
3682 |
-
msgstr ""
|
3683 |
-
|
3684 |
-
#: src/admin-views/payments/tickets-commerce.php:57
|
3685 |
-
msgid "Enable TicketsCommerce"
|
3686 |
-
msgstr ""
|
3687 |
-
|
3688 |
-
#: src/admin-views/payments/tickets-commerce.php:61
|
3689 |
-
msgid ""
|
3690 |
-
"TicketsCommerce allows you to accept payments for tickets with Event Tickets "
|
3691 |
-
"and Event Tickets Plus. Configure payments through PayPal, allowing users to "
|
3692 |
-
"pay with credit card or their PayPal account. Learn More about payment "
|
3693 |
-
"processing with TicketsCommerce."
|
3694 |
-
msgstr ""
|
3695 |
-
|
3696 |
#: src/admin-views/privacy.php:16
|
3697 |
msgid "Hello,"
|
3698 |
msgstr ""
|
@@ -3866,83 +3753,67 @@ msgstr ""
|
|
3866 |
msgid "Need To Upgrade?"
|
3867 |
msgstr ""
|
3868 |
|
3869 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3870 |
-
msgid "
|
3871 |
msgstr ""
|
3872 |
|
3873 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3874 |
-
msgid ""
|
3875 |
-
"There is an issue with your PayPal account that is preventing you from being "
|
3876 |
-
"able to accept payments."
|
3877 |
-
msgstr ""
|
3878 |
-
|
3879 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/connect-with-paypal/errors.php:30
|
3880 |
-
msgid "Greetings!"
|
3881 |
msgstr ""
|
3882 |
|
3883 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3884 |
-
msgid ""
|
3885 |
-
"I am trying to connect my PayPal account to the Event Tickets plugin for "
|
3886 |
-
"WordPress. I have gone through the onboarding process to connect my account, "
|
3887 |
-
"but when I finish I'm given the following message from Event Tickets:"
|
3888 |
msgstr ""
|
3889 |
|
3890 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3891 |
-
msgid ""
|
3892 |
-
"Please help me resolve these account errors so I can begin accepting "
|
3893 |
-
"payments via PayPal on Event Tickets."
|
3894 |
msgstr ""
|
3895 |
|
3896 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3897 |
-
msgid "
|
3898 |
msgstr ""
|
3899 |
|
3900 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3901 |
-
msgid "
|
3902 |
msgstr ""
|
3903 |
|
3904 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3905 |
-
msgid "
|
3906 |
msgstr ""
|
3907 |
|
3908 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3909 |
-
msgid "
|
3910 |
msgstr ""
|
3911 |
|
3912 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3913 |
-
msgid "
|
|
|
|
|
|
|
3914 |
msgstr ""
|
3915 |
|
3916 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3917 |
-
msgid "
|
3918 |
msgstr ""
|
3919 |
|
3920 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3921 |
-
msgid "
|
3922 |
msgstr ""
|
3923 |
|
3924 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3925 |
-
msgid "
|
3926 |
msgstr ""
|
3927 |
|
3928 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3929 |
-
msgid "
|
3930 |
msgstr ""
|
3931 |
|
3932 |
-
#: src/admin-views/settings/tickets-commerce/paypal
|
3933 |
msgid "PayPal Logo Image"
|
3934 |
msgstr ""
|
3935 |
|
3936 |
-
#: src/admin-views/settings/tickets-commerce/paypal-
|
3937 |
-
msgid "
|
3938 |
-
msgstr ""
|
3939 |
-
|
3940 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php:49
|
3941 |
-
msgid "Easy no-API key connection"
|
3942 |
-
msgstr ""
|
3943 |
-
|
3944 |
-
#: src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php:55
|
3945 |
-
msgid "Supports 3D Secure payments"
|
3946 |
msgstr ""
|
3947 |
|
3948 |
#: src/admin-views/ticket-type-history.php:13
|
@@ -4072,6 +3943,10 @@ msgid ""
|
|
4072 |
"order will be Complete once payment is confirmed by PayPal."
|
4073 |
msgstr ""
|
4074 |
|
|
|
|
|
|
|
|
|
4075 |
#: src/admin-views/tribe-commerce-settings.php:154
|
4076 |
msgid ""
|
4077 |
"Only decrease available %s stock if an order is confirmed as Completed by "
|
@@ -5001,51 +4876,83 @@ msgstr ""
|
|
5001 |
msgid "Buy now"
|
5002 |
msgstr ""
|
5003 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5004 |
#. Translators: %1$s: Opening span for "Quantity:" string; %2$s: Closing span
|
5005 |
#. for "Quantity:" string; %3$s: Opening span for the quantity; %4$s: The
|
5006 |
#. quantity; %5$s: Closing span for the quantity.
|
5007 |
-
#: src/views/v2/commerce/checkout/cart/footer/quantity.php:
|
5008 |
msgid "%1$sQuantity: %2$s%3$s%4$s%5$s"
|
5009 |
msgstr ""
|
5010 |
|
5011 |
#. Translators: %1$s: Opening span for "Total:" string; %2$s: Closing span for
|
5012 |
#. "Total:" string; %3$s: Opening span for the total value; %4$s: The total
|
5013 |
#. value; %5$s: Closing span for the total value.
|
5014 |
-
#: src/views/v2/commerce/checkout/cart/footer/total.php:
|
5015 |
msgid "%1$sTotal: %2$s%3$s%4$s%5$s"
|
5016 |
msgstr ""
|
5017 |
|
5018 |
-
#: src/views/v2/commerce/checkout/cart/item/details/toggle.php:
|
5019 |
msgid "Open the ticket description in checkout."
|
5020 |
msgstr ""
|
5021 |
|
5022 |
-
#: src/views/v2/commerce/checkout/cart/item/details/toggle.php:
|
5023 |
msgctxt "Opens the ticket description"
|
5024 |
msgid "More info"
|
5025 |
msgstr ""
|
5026 |
|
5027 |
-
#: src/views/v2/commerce/checkout/cart/item/details/toggle.php:
|
5028 |
msgid "Close the ticket description in checkout."
|
5029 |
msgstr ""
|
5030 |
|
5031 |
-
#: src/views/v2/commerce/checkout/cart/item/details/toggle.php:
|
5032 |
msgctxt "Closes the ticket description"
|
5033 |
msgid "Less info"
|
5034 |
msgstr ""
|
5035 |
|
5036 |
-
#: src/views/v2/commerce/checkout/
|
5037 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5038 |
msgstr ""
|
5039 |
|
5040 |
-
#: src/views/v2/commerce/checkout/header.php:
|
5041 |
msgid "modify attendees"
|
5042 |
msgstr ""
|
5043 |
|
5044 |
-
|
5045 |
-
|
|
|
5046 |
msgstr ""
|
5047 |
|
5048 |
-
#: src/views/v2/commerce/checkout/must-login/login.php:
|
5049 |
msgid "Log in to complete your purchase"
|
5050 |
msgstr ""
|
5051 |
|
@@ -5058,6 +4965,46 @@ msgstr ""
|
|
5058 |
msgid "create a new account"
|
5059 |
msgstr ""
|
5060 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5061 |
#: src/views/v2/rsvp/actions/full.php:22
|
5062 |
msgid "RSVP Closed"
|
5063 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Event Tickets package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Event Tickets 5.1.10\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/event-tickets\n"
|
7 |
+
"POT-Creation-Date: 2021-09-27 06:38:37+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2021-09-27 06:38\n"
|
12 |
"Last-Translator: \n"
|
13 |
"Language-Team: \n"
|
14 |
|
15 |
+
#. #-#-#-#-# event-tickets.pot (Event Tickets 5.1.10) #-#-#-#-#
|
16 |
#. Plugin Name of the plugin/theme
|
17 |
+
#: event-tickets.php:61 src/Tribe/Admin/Notices.php:92 src/Tribe/Main.php:691
|
18 |
#: src/Tribe/Privacy.php:59 src/admin-views/admin-welcome-message.php:58
|
19 |
msgid "Event Tickets"
|
20 |
msgstr ""
|
21 |
|
22 |
+
#: src/Tickets/Commerce/Attendee.php:197 src/Tribe/Admin/Columns/Tickets.php:56
|
23 |
#: src/Tribe/Admin/Manager/Service_Provider.php:173 src/Tribe/Attendees.php:212
|
24 |
+
#: src/Tribe/Commerce/PayPal/Main.php:456
|
25 |
#: src/Tribe/Tabbed_View/Attendee_Report_Tab.php:22 src/admin-views/list.php:95
|
26 |
msgid "Attendees"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: src/Tickets/Commerce/Checkout.php:176
|
30 |
+
msgid "Tickets Commerce Checkout Page"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
msgstr ""
|
32 |
|
33 |
#: src/Tickets/Commerce/Gateways/PayPal/Assets.php:42
|
80 |
"again once you are in live mode."
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Client.php:673
|
84 |
+
msgid "The PayPal webhook does not exist"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Client.php:676
|
88 |
+
msgid "Unexpected PayPal response when getting webhook"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Client.php:723
|
92 |
+
msgid "Unexpected PayPal response when creating webhook"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Client.php:734
|
96 |
+
msgid ""
|
97 |
+
"PayPal webhook limit has been reached, you need to go into your developer."
|
98 |
+
"paypal.com account and remove webhooks from the associated account"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Client.php:791
|
102 |
+
msgid "Unexpected PayPal response when updating webhook"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
#: src/Tickets/Commerce/Gateways/PayPal/Gateway.php:43
|
106 |
msgid "PayPal Commerce"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:30
|
110 |
+
msgid ""
|
111 |
+
"Make sure to complete the entire PayPal process. Do not close the window you "
|
112 |
+
"have finished the process."
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:31
|
116 |
msgid ""
|
117 |
+
"The last screen of the PayPal connect process includes a button to be sent "
|
118 |
+
"back to your site. It is important you click this and do not close the "
|
119 |
+
"window yourself."
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:32
|
123 |
+
msgid "If you’re still having problems connecting:"
|
124 |
msgstr ""
|
125 |
|
126 |
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:38
|
127 |
+
msgid "Having trouble connecting to PayPal?"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:64
|
131 |
msgid ""
|
132 |
"There was a problem with creating webhook on PayPal. A gateway error log "
|
133 |
"also added to get details information about PayPal response."
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:94
|
137 |
msgid "PayPal client access token API request response is:"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:100
|
141 |
msgid "PayPal client rest API credentials API request response is:"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:104
|
145 |
msgid ""
|
146 |
"There was a problem with PayPal client rest API request and we could not "
|
147 |
"find valid client id and secret."
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:133
|
151 |
msgid "PayPal merchant status check API request response is:"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:138
|
155 |
msgid ""
|
156 |
"A valid SSL certificate is required to accept payments and set up your "
|
157 |
"PayPal account. Once a\n"
|
159 |
"disconnect and reconnect your account."
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:143
|
163 |
msgid ""
|
164 |
"There was a problem with the status check for your account. Please try "
|
165 |
"disconnecting and connecting again. If the problem persists, please contact "
|
166 |
"support."
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:156
|
170 |
msgid "Set up an account to receive payment from PayPal"
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:160
|
174 |
msgid "Confirm your primary email address"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:168
|
178 |
msgid ""
|
179 |
"Your account was expected to be able to accept custom payments, but is not. "
|
180 |
"Please make sure your\n"
|
182 |
"persists, please contact PayPal."
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:186
|
186 |
msgid "Reach out to PayPal to enable PPCP_CUSTOM for your account"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:198
|
190 |
msgid "Reach out to PayPal to resolve the following capabilities:"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:226
|
194 |
msgid "logged data"
|
195 |
msgstr ""
|
196 |
|
197 |
#. Translators: %1$s: The logged data link.
|
198 |
+
#: src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php:233
|
199 |
msgid ""
|
200 |
"There was a problem setting up the webhooks for your PayPal account. Please "
|
201 |
"try disconnecting and reconnecting your PayPal account. If the problem "
|
202 |
"persists, please contact support and provide them with the latest %1$s"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/On_Boarding_Endpoint.php:140
|
206 |
msgid "Unexpected response from PayPal when on boarding"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php:236
|
210 |
msgid "Order ID in PayPal"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#. Translators: %s: The event type.
|
214 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:150
|
215 |
+
msgid "Received PayPal webhook event for type: %s"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
msgstr ""
|
217 |
|
218 |
+
#. Translators: %s: The PayPal payment event.
|
219 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:161
|
220 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php:53
|
221 |
+
msgid "Invalid event type for webhook event: %s"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:174
|
225 |
+
msgid "Failed PayPal webhook event verification"
|
|
|
|
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:218
|
229 |
+
msgid "Processes the Webhook as long as it includes valid Payment Event data"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:225
|
233 |
+
msgid "Whether the processing was successful"
|
|
|
|
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php:234
|
237 |
+
msgid "The webhook was invalid and was not processed"
|
238 |
msgstr ""
|
239 |
|
240 |
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:33
|
242 |
msgstr ""
|
243 |
|
244 |
#. Translators: %s: The PayPal telephone number.
|
245 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:85
|
246 |
msgid "Please call a PayPal support representative at %s"
|
247 |
msgstr ""
|
248 |
|
249 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:89
|
250 |
msgid ""
|
251 |
"Please reach out to PayPal support from your PayPal account Resolution Center"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Settings.php:92
|
255 |
msgid " and relay the following message:"
|
256 |
msgstr ""
|
257 |
|
258 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:77
|
259 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1908 src/Tribe/RSVP.php:2355
|
260 |
msgid "Return to the %1$sAttendees Report%2$s."
|
261 |
msgstr ""
|
262 |
|
263 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:84
|
264 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1915 src/Tribe/RSVP.php:2362
|
265 |
msgid "Post updated. %1$s"
|
266 |
msgstr ""
|
267 |
|
268 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:88
|
269 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1919 src/Tribe/RSVP.php:2366
|
270 |
msgid "Post published. %1$s"
|
271 |
msgstr ""
|
272 |
|
273 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:91
|
274 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1922 src/Tribe/RSVP.php:2369
|
275 |
msgid "Post submitted."
|
276 |
msgstr ""
|
277 |
|
278 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:92
|
279 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1923 src/Tribe/RSVP.php:2370
|
280 |
msgid "Post scheduled."
|
281 |
msgstr ""
|
282 |
|
283 |
#: src/Tickets/Commerce/Gateways/PayPal/Tickets_Form.php:93
|
284 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1924 src/Tribe/RSVP.php:2371
|
285 |
msgid "Post draft updated."
|
286 |
msgstr ""
|
287 |
|
292 |
"confirmation."
|
293 |
msgstr ""
|
294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
#. Translators: %s: The PayPal payment event.
|
296 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php:72
|
297 |
msgid "Missing PayPal payment for webhook event: %s"
|
298 |
msgstr ""
|
299 |
|
300 |
#. Translators: %s: The PayPal payment ID.
|
301 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php:94
|
302 |
msgid "Missing order for PayPal payment from webhook: %s"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#. Translators: %s: The PayPal payment ID.
|
306 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php:112
|
307 |
+
msgid "PayPal Order \"%1$s\" already on status \"%2$s\" from webhook: %3$s"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
msgstr ""
|
309 |
|
310 |
+
#. Translators: %1$s: The status name; %2$s: The payment information.
|
311 |
+
#: src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php:135
|
312 |
+
msgid "Change %1$s in PayPal from webhook: %2$s"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: src/Tickets/Commerce/Legacy_Compat.php:64
|
316 |
+
msgid "Tribe Commerce ( Legacy PayPal, not recommended )"
|
|
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: src/Tickets/Commerce/Models/Attendee_Model.php:71
|
320 |
+
#: src/Tribe/Commerce/PayPal/Main.php:2959 src/Tribe/RSVP.php:2014
|
321 |
msgid "(deleted)"
|
322 |
msgstr ""
|
323 |
|
325 |
msgid "Tickets Commerce"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: src/Tickets/Commerce/Order.php:163 src/Tribe/Commerce/PayPal/Main.php:468
|
329 |
msgid "Orders"
|
330 |
msgstr ""
|
331 |
|
349 |
msgstr ""
|
350 |
|
351 |
#: src/Tickets/Commerce/Reports/Event.php:53
|
352 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1724
|
353 |
msgid "Sales report"
|
354 |
msgstr ""
|
355 |
|
356 |
#: src/Tickets/Commerce/Reports/Ticket.php:38
|
357 |
+
#: src/Tribe/Commerce/PayPal/Main.php:1750
|
358 |
msgid "Report"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: src/Tickets/Commerce/Settings.php:121
|
|
|
362 |
msgid "Payments"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: src/Tickets/Commerce/Settings.php:136 src/Tribe/Admin/Notices.php:214
|
366 |
#: src/Tribe/Main.php:666 src/admin-views/admin-welcome-message.php:56
|
367 |
#: src/admin-views/tribe-commerce-settings.php:4
|
368 |
msgid "Event Tickets Plus"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: src/Tickets/Commerce/Settings.php:140
|
372 |
#: src/admin-views/tribe-commerce-settings.php:9
|
373 |
msgid "Check it out!"
|
374 |
msgstr ""
|
375 |
|
376 |
#. Translators: %1$s: The Event Tickets Plus link, %2$s: The word "ticket" in
|
377 |
#. lowercase, %3$s: The "Check it out!" link.
|
378 |
+
#: src/Tickets/Commerce/Settings.php:144
|
379 |
msgctxt "about Tickets Commerce"
|
380 |
msgid ""
|
381 |
"Tickets Commerce is a light implementation of a commerce gateway using "
|
386 |
"%3$s"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: src/Tickets/Commerce/Settings.php:160
|
390 |
msgid "Enable Tickets Commerce"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: src/Tickets/Commerce/Settings.php:206
|
394 |
msgid "-- No page set --"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: src/Tickets/Commerce/Settings.php:221
|
398 |
+
msgid "Tickets Commerce Settings"
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: src/Tickets/Commerce/Settings.php:225
|
402 |
msgid "Enable Test Mode"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: src/Tickets/Commerce/Settings.php:226
|
406 |
msgid ""
|
407 |
"Enables Test mode for testing payments. Any payments made will be done on "
|
408 |
"\"sandbox\" accounts."
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: src/Tickets/Commerce/Settings.php:232
|
412 |
#: src/admin-views/tribe-commerce-settings.php:136
|
413 |
msgid "Currency Code"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: src/Tickets/Commerce/Settings.php:233
|
417 |
msgid "The currency that will be used for Tickets Commerce transactions."
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: src/Tickets/Commerce/Settings.php:240
|
421 |
#: src/admin-views/tribe-commerce-settings.php:144
|
422 |
msgid "Stock Handling"
|
423 |
msgstr ""
|
424 |
|
425 |
#. Translators: %s: The word "ticket" in lowercase.
|
426 |
+
#: src/Tickets/Commerce/Settings.php:244
|
427 |
msgctxt "tickets fields settings paypal stock handling"
|
428 |
msgid ""
|
429 |
"When a customer purchases a %s, the payment gateway might flag the order as "
|
431 |
"gateway."
|
432 |
msgstr ""
|
433 |
|
434 |
+
#. Translators: %1$s: The word "ticket" in lowercase. %2$s: `<strong>` opening
|
435 |
+
#. tag. %3$s: `</strong>` closing tag.
|
436 |
+
#: src/Tickets/Commerce/Settings.php:253
|
437 |
+
msgid ""
|
438 |
+
"Decrease available %1$s stock as soon as a %2$sPending%3$s order is created."
|
439 |
msgstr ""
|
440 |
|
441 |
+
#. Translators: %1$s: The word "ticket" in lowercase. %2$s: `<strong>` opening
|
442 |
+
#. tag. %3$s: `</strong>` closing tag.
|
443 |
+
#: src/Tickets/Commerce/Settings.php:260
|
444 |
msgid ""
|
445 |
+
"Only decrease available %1$s stock if an order is confirmed as %2$sCompleted"
|
446 |
+
"%3$s by the payment gateway."
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: src/Tickets/Commerce/Settings.php:270
|
450 |
msgid "Checkout page"
|
451 |
msgstr ""
|
452 |
|
453 |
#. Translators: %s: The [shortcode] for the success page.
|
454 |
+
#: src/Tickets/Commerce/Settings.php:274
|
455 |
msgid ""
|
456 |
"This is the page where customers go to complete their purchase. Use the %s "
|
457 |
"shortcode to display the checkout experience in the page content."
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: src/Tickets/Commerce/Settings.php:285
|
461 |
#: src/admin-views/tribe-commerce-settings.php:162
|
462 |
msgid "Success page"
|
463 |
msgstr ""
|
464 |
|
465 |
#. Translators: %s: The [shortcode] for the success page.
|
466 |
+
#: src/Tickets/Commerce/Settings.php:289
|
467 |
msgid ""
|
468 |
"After a successful order, users will be redirected to this page. Use the %s "
|
469 |
"shortcode to display the order confirmation to the user in the page content."
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: src/Tickets/Commerce/Settings.php:300
|
473 |
#: src/admin-views/tribe-commerce-settings.php:176
|
474 |
msgid "Confirmation email sender address"
|
475 |
msgstr ""
|
476 |
|
477 |
#. Translators: %s: The word "tickets" in lowercase.
|
478 |
+
#: src/Tickets/Commerce/Settings.php:304
|
479 |
msgctxt "tickets fields settings confirmation email"
|
480 |
msgid ""
|
481 |
"Email address that %s customers will receive confirmation from. Leave empty "
|
482 |
"to use the default WordPress site email address."
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: src/Tickets/Commerce/Settings.php:315
|
486 |
#: src/admin-views/tribe-commerce-settings.php:185
|
487 |
msgid "Confirmation email sender name"
|
488 |
msgstr ""
|
489 |
|
490 |
#. Translators: %s: The word "ticket" in lowercase.
|
491 |
+
#: src/Tickets/Commerce/Settings.php:319
|
492 |
#: src/admin-views/tribe-commerce-settings.php:186
|
493 |
msgctxt "tickets fields settings paypal email sender"
|
494 |
msgid ""
|
496 |
"purchase."
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: src/Tickets/Commerce/Settings.php:330
|
500 |
#: src/admin-views/tribe-commerce-settings.php:194
|
501 |
msgid "Confirmation email subject"
|
502 |
msgstr ""
|
503 |
|
504 |
#. Translators: %s: The word "ticket" in lowercase.
|
505 |
+
#: src/Tickets/Commerce/Settings.php:334
|
506 |
#: src/admin-views/tribe-commerce-settings.php:195
|
507 |
msgctxt "tickets fields settings paypal email subject"
|
508 |
msgid ""
|
511 |
msgstr ""
|
512 |
|
513 |
#. Translators: %s: The word "tickets" in lowercase.
|
514 |
+
#: src/Tickets/Commerce/Settings.php:342
|
515 |
#: src/admin-views/tribe-commerce-settings.php:197
|
516 |
msgctxt "tickets fields settings paypal email subject"
|
517 |
msgid "You have %s!"
|
543 |
msgid "Not Completed"
|
544 |
msgstr ""
|
545 |
|
546 |
+
#: src/Tickets/Commerce/Status/Pending.php:36
|
547 |
msgid "Pending"
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: src/Tickets/Commerce/Status/Pending.php:93
|
551 |
msgid "This order contained an invalid Ticket (ID: %1$d)"
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: src/Tickets/Commerce/Status/Pending.php:108
|
555 |
msgid "This order contained a Ticket with an invalid Event (Event ID: %1$d)"
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: src/Tickets/Commerce/Status/Pending.php:122
|
559 |
msgid "Cannot purchase zero of \"%1$s\""
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: src/Tickets/Commerce/Status/Pending.php:139
|
563 |
msgid "Insufficient stock for \"%1$s\""
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: src/Tickets/Commerce/Status/Pending.php:155
|
567 |
+
msgid "%s will be available on %s at %s"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: src/Tickets/Commerce/Status/Pending.php:157 src/Tribe/Tickets.php:3146
|
571 |
+
msgid "%s are no longer available."
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: src/Tickets/Commerce/Status/Pending.php:159 src/Tribe/Tickets.php:3148
|
575 |
+
msgid "There are no %s available at this time."
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
#: src/Tickets/Commerce/Status/Refunded.php:27
|
579 |
msgid "Refunded"
|
580 |
msgstr ""
|
591 |
msgid "Voided"
|
592 |
msgstr ""
|
593 |
|
594 |
+
#: src/Tickets/Commerce/Success.php:139
|
595 |
+
msgid "Tickets Commerce Success Page"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: src/Tickets/Commerce/Ticket.php:118 src/Tribe/Commerce/PayPal/Main.php:440
|
599 |
msgid "Tickets"
|
600 |
msgstr ""
|
601 |
|
1404 |
msgid "Tribe Commerce"
|
1405 |
msgstr ""
|
1406 |
|
1407 |
+
#: src/Tribe/Commerce/PayPal/Main.php:442
|
1408 |
msgid "Tribe Commerce Tickets"
|
1409 |
msgstr ""
|
1410 |
|
1411 |
+
#: src/Tribe/Commerce/PayPal/Main.php:443
|
1412 |
msgid "Tribe Commerce Ticket"
|
1413 |
msgstr ""
|
1414 |
|
1557 |
msgid "Are you sure you want to cancel?"
|
1558 |
msgstr ""
|
1559 |
|
1560 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:297 src/Tribe/Tickets.php:4202
|
1561 |
msgctxt "Error message title, will be followed by the error code."
|
1562 |
msgid "API Error"
|
1563 |
msgstr ""
|
1564 |
|
1565 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:298 src/Tribe/Tickets.php:4203
|
1566 |
msgid ""
|
1567 |
"Refresh this page or wait a few minutes before trying again. If this happens "
|
1568 |
"repeatedly, please contact the Site Admin."
|
1569 |
msgstr ""
|
1570 |
|
1571 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:299 src/Tribe/Tickets.php:4204
|
1572 |
msgid ""
|
1573 |
"The ticket for this event has sold out and has been removed from your cart."
|
1574 |
msgstr ""
|
1575 |
|
1576 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:300 src/Tribe/Tickets.php:4205
|
1577 |
msgid "Whoops!"
|
1578 |
msgstr ""
|
1579 |
|
1580 |
+
#: src/Tribe/Editor/Blocks/Tickets.php:301 src/Tribe/Tickets.php:4206
|
1581 |
msgctxt "The %s will change based on the error produced."
|
1582 |
msgid "You have %s ticket(s) with a field that requires information."
|
1583 |
msgstr ""
|
1625 |
"recurring events."
|
1626 |
msgstr ""
|
1627 |
|
1628 |
+
#: src/Tribe/Editor.php:209
|
1629 |
msgid "Tickets Blocks"
|
1630 |
msgstr ""
|
1631 |
|
2813 |
msgid "%s are not yet available"
|
2814 |
msgstr ""
|
2815 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2816 |
#: src/Tribe/Tickets_Handler.php:86
|
2817 |
#: src/views/blocks/tickets/extra-available-unlimited.php:19
|
2818 |
#: src/views/v2/tickets/item/extra/available/unlimited.php:56
|
3076 |
msgid "Search attendees"
|
3077 |
msgstr ""
|
3078 |
|
|
|
|
|
|
|
|
|
3079 |
#: src/admin-views/commerce/metabox/capacity.php:16
|
3080 |
#: src/admin-views/editor/list-row.php:99
|
3081 |
#: src/admin-views/rsvp-metabox-capacity.php:10
|
3104 |
msgstr ""
|
3105 |
|
3106 |
#: src/admin-views/editor/column-body-price.php:9
|
3107 |
+
#: src/admin-views/editor/fieldset/price.php:71
|
3108 |
#: src/admin-views/legacy-ticket-fields.php:15
|
3109 |
#: src/admin-views/price-fields.php:3
|
3110 |
msgid "Price:"
|
3132 |
msgstr ""
|
3133 |
|
3134 |
#. Translators: %s: singular version of the Ticket label.
|
3135 |
+
#: src/admin-views/editor/fieldset/price.php:10
|
3136 |
msgctxt "ticket price validation error"
|
3137 |
msgid "%s price must be greater than zero."
|
3138 |
msgstr ""
|
3139 |
|
3140 |
+
#: src/admin-views/editor/fieldset/price.php:26
|
3141 |
msgctxt "price description"
|
3142 |
msgid "Leave blank for free %s"
|
3143 |
msgstr ""
|
3144 |
|
3145 |
+
#: src/admin-views/editor/fieldset/price.php:106
|
3146 |
#: src/admin-views/legacy-ticket-fields.php:24
|
3147 |
#: src/admin-views/price-fields.php:12
|
3148 |
msgid "Sale Price:"
|
3149 |
msgstr ""
|
3150 |
|
3151 |
+
#: src/admin-views/editor/fieldset/price.php:107
|
3152 |
msgid "Current sale price. This can be managed via the product editor."
|
3153 |
msgstr ""
|
3154 |
|
3155 |
+
#: src/admin-views/editor/fieldset/price.php:110
|
3156 |
msgid "Sale/Member Price:"
|
3157 |
msgstr ""
|
3158 |
|
3159 |
+
#: src/admin-views/editor/fieldset/price.php:111
|
3160 |
msgid ""
|
3161 |
"Current sale or member price. This can be managed via the product editor."
|
3162 |
msgstr ""
|
3580 |
"statuses:"
|
3581 |
msgstr ""
|
3582 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3583 |
#: src/admin-views/privacy.php:16
|
3584 |
msgid "Hello,"
|
3585 |
msgstr ""
|
3753 |
msgid "Need To Upgrade?"
|
3754 |
msgstr ""
|
3755 |
|
3756 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/connection.php:26
|
3757 |
+
msgid "Connected as:"
|
3758 |
msgstr ""
|
3759 |
|
3760 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/connection.php:36
|
3761 |
+
msgid "Disconnect"
|
|
|
|
|
|
|
|
|
|
|
|
|
3762 |
msgstr ""
|
3763 |
|
3764 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/paypal-status.php:23
|
3765 |
+
msgid "PayPal Status:"
|
|
|
|
|
|
|
3766 |
msgstr ""
|
3767 |
|
3768 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active/paypal-status.php:27
|
3769 |
+
msgid "Connected"
|
|
|
|
|
3770 |
msgstr ""
|
3771 |
|
3772 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active.php:22
|
3773 |
+
msgid "Refresh Access Token"
|
3774 |
msgstr ""
|
3775 |
|
3776 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active.php:25
|
3777 |
+
msgid "Refresh User Info"
|
3778 |
msgstr ""
|
3779 |
|
3780 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/active.php:28
|
3781 |
+
msgid "Refresh Webhook"
|
3782 |
msgstr ""
|
3783 |
|
3784 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/inactive.php:23
|
3785 |
+
msgid "Accept online payments with PayPal!"
|
3786 |
msgstr ""
|
3787 |
|
3788 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/inactive.php:28
|
3789 |
+
msgid ""
|
3790 |
+
"Start selling tickets to your events today with PayPal. Attendees can "
|
3791 |
+
"purchase tickets directly on your site using debt or credit cards with no "
|
3792 |
+
"additional fees."
|
3793 |
msgstr ""
|
3794 |
|
3795 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/features.php:23
|
3796 |
+
msgid "Credit and debit card payments"
|
3797 |
msgstr ""
|
3798 |
|
3799 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/features.php:26
|
3800 |
+
msgid "Easy no-API key connection"
|
3801 |
msgstr ""
|
3802 |
|
3803 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/features.php:29
|
3804 |
+
msgid "Accept payments from around the world"
|
3805 |
msgstr ""
|
3806 |
|
3807 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/features.php:32
|
3808 |
+
msgid "Supports 3D Secure payments"
|
3809 |
msgstr ""
|
3810 |
|
3811 |
+
#: src/admin-views/settings/tickets-commerce/paypal/connect/logo/image.php:22
|
3812 |
msgid "PayPal Logo Image"
|
3813 |
msgstr ""
|
3814 |
|
3815 |
+
#: src/admin-views/settings/tickets-commerce/paypal/signup-link.php:26
|
3816 |
+
msgid "Connect Automatically with <i>PayPal</i>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3817 |
msgstr ""
|
3818 |
|
3819 |
#: src/admin-views/ticket-type-history.php:13
|
3943 |
"order will be Complete once payment is confirmed by PayPal."
|
3944 |
msgstr ""
|
3945 |
|
3946 |
+
#: src/admin-views/tribe-commerce-settings.php:150
|
3947 |
+
msgid "Decrease available %s stock as soon as a Pending order is created."
|
3948 |
+
msgstr ""
|
3949 |
+
|
3950 |
#: src/admin-views/tribe-commerce-settings.php:154
|
3951 |
msgid ""
|
3952 |
"Only decrease available %s stock if an order is confirmed as Completed by "
|
4876 |
msgid "Buy now"
|
4877 |
msgstr ""
|
4878 |
|
4879 |
+
#. Translators: %1$s: Opening `<a>` tag. %2$s: Plural `events` in lowercase.
|
4880 |
+
#. %3$s: Closing `</a>` tag. %4$s: Plural `tickets` in lowercase.
|
4881 |
+
#: src/views/v2/commerce/checkout/cart/empty/description.php:37
|
4882 |
+
msgid "Please %1$sbrowse %2$s%3$s and add %4$s to check out."
|
4883 |
+
msgstr ""
|
4884 |
+
|
4885 |
+
#. Translators: %1$s: Plural `tickets` in lowercase.
|
4886 |
+
#: src/views/v2/commerce/checkout/cart/empty/description.php:46
|
4887 |
+
msgid "Please add %1$s to check out."
|
4888 |
+
msgstr ""
|
4889 |
+
|
4890 |
+
#. Translators: %1$s: Plural `tickets` in lowercase.
|
4891 |
+
#: src/views/v2/commerce/checkout/cart/empty/title.php:40
|
4892 |
+
msgid "Oops, no %1$s!"
|
4893 |
+
msgstr ""
|
4894 |
+
|
4895 |
#. Translators: %1$s: Opening span for "Quantity:" string; %2$s: Closing span
|
4896 |
#. for "Quantity:" string; %3$s: Opening span for the quantity; %4$s: The
|
4897 |
#. quantity; %5$s: Closing span for the quantity.
|
4898 |
+
#: src/views/v2/commerce/checkout/cart/footer/quantity.php:30
|
4899 |
msgid "%1$sQuantity: %2$s%3$s%4$s%5$s"
|
4900 |
msgstr ""
|
4901 |
|
4902 |
#. Translators: %1$s: Opening span for "Total:" string; %2$s: Closing span for
|
4903 |
#. "Total:" string; %3$s: Opening span for the total value; %4$s: The total
|
4904 |
#. value; %5$s: Closing span for the total value.
|
4905 |
+
#: src/views/v2/commerce/checkout/cart/footer/total.php:30
|
4906 |
msgid "%1$sTotal: %2$s%3$s%4$s%5$s"
|
4907 |
msgstr ""
|
4908 |
|
4909 |
+
#: src/views/v2/commerce/checkout/cart/item/details/toggle.php:38
|
4910 |
msgid "Open the ticket description in checkout."
|
4911 |
msgstr ""
|
4912 |
|
4913 |
+
#: src/views/v2/commerce/checkout/cart/item/details/toggle.php:41
|
4914 |
msgctxt "Opens the ticket description"
|
4915 |
msgid "More info"
|
4916 |
msgstr ""
|
4917 |
|
4918 |
+
#: src/views/v2/commerce/checkout/cart/item/details/toggle.php:50
|
4919 |
msgid "Close the ticket description in checkout."
|
4920 |
msgstr ""
|
4921 |
|
4922 |
+
#: src/views/v2/commerce/checkout/cart/item/details/toggle.php:53
|
4923 |
msgctxt "Closes the ticket description"
|
4924 |
msgid "Less info"
|
4925 |
msgstr ""
|
4926 |
|
4927 |
+
#: src/views/v2/commerce/checkout/footer/gateway-error.php:41
|
4928 |
+
msgid "Checkout Unavailable!"
|
4929 |
+
msgstr ""
|
4930 |
+
|
4931 |
+
#: src/views/v2/commerce/checkout/footer/gateway-error.php:42
|
4932 |
+
msgid ""
|
4933 |
+
"Checkout is not available at this time because a payment method has not been "
|
4934 |
+
"set up. Please notify the site administrator."
|
4935 |
+
msgstr ""
|
4936 |
+
|
4937 |
+
#. Translators: %1$s: Singular `event` in lowercase.
|
4938 |
+
#: src/views/v2/commerce/checkout/header/links/back.php:36
|
4939 |
+
msgid "back to %1$s"
|
4940 |
+
msgstr ""
|
4941 |
+
|
4942 |
+
#: src/views/v2/commerce/checkout/header/links/back.php:39
|
4943 |
+
msgid "back"
|
4944 |
msgstr ""
|
4945 |
|
4946 |
+
#: src/views/v2/commerce/checkout/header/links/modify-attendees.php:37
|
4947 |
msgid "modify attendees"
|
4948 |
msgstr ""
|
4949 |
|
4950 |
+
#. Translators: %1$s: Plural `Tickets` label.
|
4951 |
+
#: src/views/v2/commerce/checkout/header/title.php:31
|
4952 |
+
msgid "Purchase %1$s"
|
4953 |
msgstr ""
|
4954 |
|
4955 |
+
#: src/views/v2/commerce/checkout/must-login/login.php:34
|
4956 |
msgid "Log in to complete your purchase"
|
4957 |
msgstr ""
|
4958 |
|
4965 |
msgid "create a new account"
|
4966 |
msgstr ""
|
4967 |
|
4968 |
+
#. Translators: %1$s: Plural `tickets` in lowercase.
|
4969 |
+
#: src/views/v2/commerce/order/description.php:29
|
4970 |
+
msgid ""
|
4971 |
+
"Thank you. Your order has been received. A receipt for purchase and any "
|
4972 |
+
"digital %1$s ordered will be emailed to you shortly."
|
4973 |
+
msgstr ""
|
4974 |
+
|
4975 |
+
#: src/views/v2/commerce/order/details/date.php:27
|
4976 |
+
msgid "Date:"
|
4977 |
+
msgstr ""
|
4978 |
+
|
4979 |
+
#: src/views/v2/commerce/order/details/email.php:31
|
4980 |
+
msgid "Email:"
|
4981 |
+
msgstr ""
|
4982 |
+
|
4983 |
+
#: src/views/v2/commerce/order/details/order-number.php:31
|
4984 |
+
msgid "Order number:"
|
4985 |
+
msgstr ""
|
4986 |
+
|
4987 |
+
#: src/views/v2/commerce/order/details/payment-method.php:31
|
4988 |
+
msgid "Payment method:"
|
4989 |
+
msgstr ""
|
4990 |
+
|
4991 |
+
#: src/views/v2/commerce/order/details/total.php:31
|
4992 |
+
msgid "Total:"
|
4993 |
+
msgstr ""
|
4994 |
+
|
4995 |
+
#: src/views/v2/commerce/order/footer/links/back-home.php:28
|
4996 |
+
msgid "back home"
|
4997 |
+
msgstr ""
|
4998 |
+
|
4999 |
+
#. Translators: %1$s: Plural `events` in lowercase.
|
5000 |
+
#: src/views/v2/commerce/order/footer/links/browse-events.php:35
|
5001 |
+
msgid "browse more %1$s"
|
5002 |
+
msgstr ""
|
5003 |
+
|
5004 |
+
#: src/views/v2/commerce/order/header.php:27
|
5005 |
+
msgid "Order Received!"
|
5006 |
+
msgstr ""
|
5007 |
+
|
5008 |
#: src/views/v2/rsvp/actions/full.php:22
|
5009 |
msgid "RSVP Closed"
|
5010 |
msgstr ""
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: theeventscalendar, brianjessee, camwynsp, paulkim, aguseo, bordoni, borkweb, GeoffBel, geoffgraham, jentheo, leahkoerper, lucatume, neillmcshea, vicskf, zbtirrell, juanfra
|
4 |
Tags: tickets, registration, The Events Calendar, RSVP, ticket sales, attendee management
|
5 |
Requires at least: 4.9.18
|
6 |
-
Tested up to: 5.8.
|
7 |
-
Stable tag: 5.1.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -178,6 +178,18 @@ Check out our extensive [knowledgebase](https://evnt.is/18wm) for articles on us
|
|
178 |
|
179 |
== Changelog ==
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
= [5.1.9.1] 2021-09-08 =
|
182 |
|
183 |
* Fix - Fixed conflict with WooCommerce Payments plugin showing error on Ticket Form. [ET-1174]
|
3 |
Contributors: theeventscalendar, brianjessee, camwynsp, paulkim, aguseo, bordoni, borkweb, GeoffBel, geoffgraham, jentheo, leahkoerper, lucatume, neillmcshea, vicskf, zbtirrell, juanfra
|
4 |
Tags: tickets, registration, The Events Calendar, RSVP, ticket sales, attendee management
|
5 |
Requires at least: 4.9.18
|
6 |
+
Tested up to: 5.8.1
|
7 |
+
Stable tag: 5.1.10
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
178 |
|
179 |
== Changelog ==
|
180 |
|
181 |
+
= [5.1.10] 2021-09-27 =
|
182 |
+
|
183 |
+
* Enhancement - When editing an RSVP or ticket in the block editor, allow title to wrap to multiple lines. [ET-1089]
|
184 |
+
* Enhancement - Ensure that text for the RSVP going/not going dropdown on front end isn't cut off and arrows aren't hidden. [ET-1169]
|
185 |
+
* Tweak - Added a new filter `tribe_tickets_get_provider_query_slug` to allow customization of the provider URL variable name. [ET-543]
|
186 |
+
* Tweak - Changed the `provider` URL variable name to `tickets_provider`. The filter `tribe_tickets_get_provider_query_slug` allows for customization. [ET-543]
|
187 |
+
* Fix - Fixed ticket total formatting when using custom thousands and decimal separators. [ET-1197]
|
188 |
+
* Fix - Show warning while creating new tickets with `0` price for TribeCommerce. [ET-1201]
|
189 |
+
* Fix - Prevent text overlapping description in the ticket AR modal. [ET-1179]
|
190 |
+
* Fix - Removed the ability to resend tickets from the Attendees page to Attendees who cancelled or refunded their ticket. [ETP-703]
|
191 |
+
* Language - 26 new strings added, 116 updated, 2 fuzzied, and 35 obsoleted
|
192 |
+
|
193 |
= [5.1.9.1] 2021-09-08 =
|
194 |
|
195 |
* Fix - Fixed conflict with WooCommerce Payments plugin showing error on Ticket Form. [ET-1174]
|
src/Tickets/Commerce/Assets.php
CHANGED
@@ -62,6 +62,7 @@ class Assets extends tad_DI52_ServiceProvider {
|
|
62 |
[
|
63 |
'jquery',
|
64 |
'tribe-common',
|
|
|
65 |
],
|
66 |
null,
|
67 |
[
|
62 |
[
|
63 |
'jquery',
|
64 |
'tribe-common',
|
65 |
+
'tribe-tickets-loader',
|
66 |
],
|
67 |
null,
|
68 |
[
|
src/Tickets/Commerce/Attendee.php
CHANGED
@@ -3,6 +3,9 @@
|
|
3 |
namespace TEC\Tickets\Commerce;
|
4 |
|
5 |
use TEC\Tickets\Commerce;
|
|
|
|
|
|
|
6 |
|
7 |
/**
|
8 |
* Class Attendee
|
@@ -165,6 +168,24 @@ class Attendee {
|
|
165 |
*/
|
166 |
public static $email_meta_key = '_tec_tickets_commerce_email';
|
167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
/**
|
170 |
* Register this Class post type into WP.
|
@@ -198,6 +219,79 @@ class Attendee {
|
|
198 |
register_post_type( static::POSTTYPE, $post_type_args );
|
199 |
}
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
/**
|
202 |
* If the post that was moved to the trash was an PayPal Ticket attendee post type, redirect to
|
203 |
* the Attendees Report rather than the PayPal Ticket attendees post list (because that's kind of
|
@@ -368,6 +462,8 @@ class Attendee {
|
|
368 |
* order creation, cause the inventory to be decreased.
|
369 |
*
|
370 |
* @todo TribeCommerceLegacy: Move this method a Flag action.
|
|
|
|
|
371 |
*
|
372 |
* @since 5.1.9
|
373 |
*
|
@@ -376,77 +472,11 @@ class Attendee {
|
|
376 |
* @return bool
|
377 |
*/
|
378 |
public function decreases_inventory( $attendee ) {
|
379 |
-
$
|
380 |
-
$
|
381 |
-
$
|
382 |
-
|
383 |
-
/**
|
384 |
-
* Whether the pending Order stock reserve logic should be ignored completely or not.
|
385 |
-
*
|
386 |
-
* If set to `true` then the behaviour chosen in the Settings will apply, if `false`
|
387 |
-
* only Completed tickets will count to decrease the inventory. This is useful when
|
388 |
-
*
|
389 |
-
* @todo TribeCommerceLegacy: Move this method a Flag action.
|
390 |
-
*
|
391 |
-
* @since 5.1.9
|
392 |
-
*
|
393 |
-
* @param bool $ignore_pending
|
394 |
-
* @param array $attendee An array of data defining the current Attendee
|
395 |
-
*/
|
396 |
-
$ignore_pending = apply_filters( 'tec_tickets_commerce_pending_stock_ignore', false );
|
397 |
-
|
398 |
-
$purchase_time = false;
|
399 |
-
$order = false;
|
400 |
-
|
401 |
-
if (
|
402 |
-
'on-pending' === tribe_get_option( 'ticket-paypal-stock-handling', 'on-complete' )
|
403 |
-
&& ! $ignore_pending
|
404 |
-
&& Order_Statuses::$pending === $order_status
|
405 |
-
&& false !== $order_id
|
406 |
-
) {
|
407 |
-
$purchase_time = \Tribe__Utils__Array::get( $attendee, 'purchase_time', false );
|
408 |
-
|
409 |
-
$order = \Tribe__Tickets__Commerce__PayPal__Order::from_attendee_id(
|
410 |
-
$attendee_id,
|
411 |
-
[
|
412 |
-
// Get no meta fields.
|
413 |
-
]
|
414 |
-
);
|
415 |
-
|
416 |
-
if ( false !== $order ) {
|
417 |
-
$purchase_time = $order->get_creation_date();
|
418 |
-
}
|
419 |
-
}
|
420 |
-
|
421 |
-
if ( $purchase_time ) {
|
422 |
-
$date = \Tribe__Date_Utils::build_date_object( $purchase_time );
|
423 |
-
|
424 |
-
$date->setTimezone( new \DateTimeZone( 'UTC' ) );
|
425 |
-
|
426 |
-
$order_creation_timestamp = $date->getTimestamp();
|
427 |
-
|
428 |
-
/**
|
429 |
-
* Filters the amount of time a part of the stock will be reserved by a pending Order.
|
430 |
-
*
|
431 |
-
* The time applies from the Order creation time.
|
432 |
-
* In the unlikely scenario that an Order goes from Completed to Pending then, if the
|
433 |
-
* reservation time allows it, a part of the stock will be reserved for it.
|
434 |
-
*
|
435 |
-
* @since 4.7
|
436 |
-
*
|
437 |
-
* @param int $pending_stock_reservation_time The amount of seconds, from the Order creation time,
|
438 |
-
* part of the stock will be reserved for the Order;
|
439 |
-
* defaults to 30 minutes.
|
440 |
-
* @param array $attendee An array of data defining the current Attendee
|
441 |
-
* @param \Tribe__Tickets__Commerce__PayPal__Order $order The object representing the Order that generated
|
442 |
-
* the Attendee
|
443 |
-
*/
|
444 |
-
$pending_stock_reservation_time = (int) apply_filters( 'tec_tickets_commerce_pending_stock_reserve_time', 30 * 60, $attendee, $order );
|
445 |
-
|
446 |
-
return time() <= ( $order_creation_timestamp + $pending_stock_reservation_time );
|
447 |
-
}
|
448 |
|
449 |
-
return
|
450 |
}
|
451 |
|
452 |
/**
|
@@ -468,4 +498,4 @@ class Attendee {
|
|
468 |
}
|
469 |
}
|
470 |
}
|
471 |
-
}
|
3 |
namespace TEC\Tickets\Commerce;
|
4 |
|
5 |
use TEC\Tickets\Commerce;
|
6 |
+
use TEC\Tickets\Commerce\Status\Status_Handler;
|
7 |
+
use \Tribe__Tickets__Ticket_Object as Ticket_Object;
|
8 |
+
use Tribe__Utils__Array as Arr;
|
9 |
|
10 |
/**
|
11 |
* Class Attendee
|
168 |
*/
|
169 |
public static $email_meta_key = '_tec_tickets_commerce_email';
|
170 |
|
171 |
+
/**
|
172 |
+
* Meta key holding price paid for this attendee.
|
173 |
+
*
|
174 |
+
* @since 5.1.10
|
175 |
+
*
|
176 |
+
* @var string
|
177 |
+
*/
|
178 |
+
public static $price_paid_meta_key = '_tec_tickets_commerce_price_paid';
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Meta key holding currency which the price was paid in.
|
182 |
+
*
|
183 |
+
* @since 5.1.10
|
184 |
+
*
|
185 |
+
* @var string
|
186 |
+
*/
|
187 |
+
public static $currency_meta_key = '_tec_tickets_commerce_currency';
|
188 |
+
|
189 |
|
190 |
/**
|
191 |
* Register this Class post type into WP.
|
219 |
register_post_type( static::POSTTYPE, $post_type_args );
|
220 |
}
|
221 |
|
222 |
+
/**
|
223 |
+
* Creates an individual attendee given an Order and Ticket.
|
224 |
+
*
|
225 |
+
* @since 5.1.10
|
226 |
+
*
|
227 |
+
* @param \WP_Post $order Which order generated this attendee.
|
228 |
+
* @param Ticket_Object $ticket Which ticket generated this Attendee.
|
229 |
+
* @param array $args Set of extra arguments used to populate the data for the attendee.
|
230 |
+
*
|
231 |
+
* @return \WP_Error|\WP_Post
|
232 |
+
*/
|
233 |
+
public function create( \WP_Post $order, $ticket, array $args = [] ) {
|
234 |
+
$create_args = [
|
235 |
+
'order_id' => $order->ID,
|
236 |
+
'ticket_id' => $ticket->ID,
|
237 |
+
'event_id' => $ticket->get_event_id(),
|
238 |
+
'security_code' => Arr::get( $args, 'security_code' ),
|
239 |
+
'opt_out' => Arr::get( $args, 'optout' ),
|
240 |
+
'price_paid' => Arr::get( $args, 'price' ),
|
241 |
+
'currency' => Arr::get( $args, 'currency' ),
|
242 |
+
];
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Allow the filtering of the create arguments for attendee.
|
246 |
+
*
|
247 |
+
* @since 5.1.10
|
248 |
+
*
|
249 |
+
* @param array $create_args Which arguments we are going to use to create the attendee.
|
250 |
+
* @param \WP_Post $order Which order generated this attendee.
|
251 |
+
* @param Ticket_Object $ticket Which ticket generated this Attendee.
|
252 |
+
* @param array $args Set of extra arguments used to populate the data for the attendee.
|
253 |
+
*/
|
254 |
+
$create_args = apply_filters( 'tec_tickets_commerce_attendee_create_args', $create_args, $order, $ticket, $args );
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Allow the actions before creating the attendee.
|
258 |
+
*
|
259 |
+
* @since 5.1.10
|
260 |
+
*
|
261 |
+
* @param array $create_args Which arguments we are going to use to create the attendee.
|
262 |
+
* @param \WP_Post $order Which order generated this attendee.
|
263 |
+
* @param Ticket_Object $ticket Which ticket generated this Attendee.
|
264 |
+
* @param array $args Set of extra arguments used to populate the data for the attendee.
|
265 |
+
*/
|
266 |
+
do_action( 'tec_tickets_commerce_attendee_before_create', $create_args, $order, $ticket, $args );
|
267 |
+
|
268 |
+
$attendee = tec_tc_attendees()->set_args( $create_args )->create();
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Allow the actions after creating the attendee.
|
272 |
+
*
|
273 |
+
* @since 5.1.10
|
274 |
+
*
|
275 |
+
* @param \WP_Post $attendee Post object for the attendee.
|
276 |
+
* @param \WP_Post $order Which order generated this attendee.
|
277 |
+
* @param Ticket_Object $ticket Which ticket generated this Attendee.
|
278 |
+
* @param array $args Set of extra arguments used to populate the data for the attendee.
|
279 |
+
*/
|
280 |
+
do_action( 'tec_tickets_commerce_attendee_after_create', $attendee, $order, $ticket, $args );
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Allow the filtering of the attendee WP_Post after creating attendee.
|
284 |
+
*
|
285 |
+
* @since 5.1.10
|
286 |
+
*
|
287 |
+
* @param \WP_Post $attendee Post object for the attendee.
|
288 |
+
* @param \WP_Post $order Which order generated this attendee.
|
289 |
+
* @param Ticket_Object $ticket Which ticket generated this Attendee.
|
290 |
+
* @param array $args Set of extra arguments used to populate the data for the attendee.
|
291 |
+
*/
|
292 |
+
return apply_filters( 'tec_tickets_commerce_attendee_create', $attendee, $order, $ticket, $args );
|
293 |
+
}
|
294 |
+
|
295 |
/**
|
296 |
* If the post that was moved to the trash was an PayPal Ticket attendee post type, redirect to
|
297 |
* the Attendees Report rather than the PayPal Ticket attendees post list (because that's kind of
|
462 |
* order creation, cause the inventory to be decreased.
|
463 |
*
|
464 |
* @todo TribeCommerceLegacy: Move this method a Flag action.
|
465 |
+
* @todo For some forsaken reason the calculation of inventory is happening on the fly instead of when orders
|
466 |
+
* are modified we need to address that for performance reasons.
|
467 |
*
|
468 |
* @since 5.1.9
|
469 |
*
|
472 |
* @return bool
|
473 |
*/
|
474 |
public function decreases_inventory( $attendee ) {
|
475 |
+
$attendee = tec_tc_get_attendee( $attendee['ID'] );
|
476 |
+
$order = tec_tc_get_order( $attendee->post_parent );
|
477 |
+
$statuses = array_unique( [ tribe( Status_Handler::class )->get_inventory_decrease_status()->get_wp_slug(), tribe( Commerce\Status\Pending::class )->get_wp_slug() ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
478 |
|
479 |
+
return in_array( $order->post_status, $statuses, true );
|
480 |
}
|
481 |
|
482 |
/**
|
498 |
}
|
499 |
}
|
500 |
}
|
501 |
+
}
|
src/Tickets/Commerce/Cart.php
CHANGED
@@ -541,7 +541,8 @@ class Cart {
|
|
541 |
*
|
542 |
* @param array $data The cart data after processing.
|
543 |
*/
|
544 |
-
return apply_filters( 'tec_tickets_commerce_cart_prepare_data', $data );
|
|
|
545 |
}
|
546 |
|
547 |
/**
|
@@ -584,7 +585,10 @@ class Cart {
|
|
584 |
if ( static::REDIRECT_MODE === $this->get_mode() ) {
|
585 |
$redirect_url = tribe( Checkout::class )->get_url();
|
586 |
|
587 |
-
if (
|
|
|
|
|
|
|
588 |
$redirect_url = add_query_arg( [ static::$cookie_query_arg => $this->get_cart_hash() ], $redirect_url );
|
589 |
}
|
590 |
|
@@ -621,40 +625,8 @@ class Cart {
|
|
621 |
return false;
|
622 |
}
|
623 |
|
624 |
-
|
625 |
-
$
|
626 |
-
|
627 |
-
// Get the number of available tickets.
|
628 |
-
/** @var \Tribe__Tickets__Tickets_Handler $tickets_handler */
|
629 |
-
$tickets_handler = tribe( 'tickets.handler' );
|
630 |
-
|
631 |
-
$errors = [];
|
632 |
-
|
633 |
-
foreach ( $data['tickets'] as $ticket ) {
|
634 |
-
$available = $tickets_handler->get_ticket_max_purchase( $ticket['ticket_id'] );
|
635 |
-
|
636 |
-
// Bail if ticket does not have enough available capacity.
|
637 |
-
if ( ( - 1 !== $available && $available < $ticket['quantity'] ) || ! $ticket['obj']->date_in_range() ) {
|
638 |
-
$error_code = 'ticket-capacity-not-available';
|
639 |
-
|
640 |
-
$errors[] = new \WP_Error( $error_code, sprintf( $messages->get_message( $error_code ), $ticket['obj']->name ), [
|
641 |
-
'ticket' => $ticket,
|
642 |
-
'max_available' => $available,
|
643 |
-
] );
|
644 |
-
continue;
|
645 |
-
}
|
646 |
-
|
647 |
-
$this->add_ticket( $ticket['ticket_id'], $ticket['quantity'], $ticket['extra'] );
|
648 |
-
}
|
649 |
-
|
650 |
-
// Saved added items to the cart.
|
651 |
-
$this->get_repository()->save();
|
652 |
-
|
653 |
-
if ( ! empty( $errors ) ) {
|
654 |
-
return $errors;
|
655 |
-
}
|
656 |
-
|
657 |
-
return true;
|
658 |
}
|
659 |
|
660 |
}
|
541 |
*
|
542 |
* @param array $data The cart data after processing.
|
543 |
*/
|
544 |
+
return apply_filters( 'tec_tickets_commerce_cart_prepare_data', $this->get_repository()->prepare_data( $data ) );
|
545 |
+
|
546 |
}
|
547 |
|
548 |
/**
|
585 |
if ( static::REDIRECT_MODE === $this->get_mode() ) {
|
586 |
$redirect_url = tribe( Checkout::class )->get_url();
|
587 |
|
588 |
+
if (
|
589 |
+
! isset( $_COOKIE[ $this->get_cart_hash() ] )
|
590 |
+
|| ! $_COOKIE[ $this->get_cart_hash() ]
|
591 |
+
) {
|
592 |
$redirect_url = add_query_arg( [ static::$cookie_query_arg => $this->get_cart_hash() ], $redirect_url );
|
593 |
}
|
594 |
|
625 |
return false;
|
626 |
}
|
627 |
|
628 |
+
// Before we start we clear the existing cart.
|
629 |
+
return $this->get_repository()->process( $data );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
630 |
}
|
631 |
|
632 |
}
|
src/Tickets/Commerce/Cart/Cart_Interface.php
CHANGED
@@ -117,4 +117,26 @@ interface Cart_Interface {
|
|
117 |
* @param null|int $quantity The quantity to remove.
|
118 |
*/
|
119 |
public function remove_item( $item_id, $quantity = null );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
117 |
* @param null|int $quantity The quantity to remove.
|
118 |
*/
|
119 |
public function remove_item( $item_id, $quantity = null );
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Removes an item from the cart.
|
123 |
+
*
|
124 |
+
* @since 5.1.10
|
125 |
+
*
|
126 |
+
* @param array $data to be processed by the cart.
|
127 |
+
*
|
128 |
+
* @return array
|
129 |
+
*/
|
130 |
+
public function process( array $data = [] );
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Prepare the data for cart processing.
|
134 |
+
*
|
135 |
+
* @since 5.1.10
|
136 |
+
*
|
137 |
+
* @param array $data To be processed by the cart.
|
138 |
+
*
|
139 |
+
* @return array
|
140 |
+
*/
|
141 |
+
public function prepare_data( array $data = [] );
|
142 |
}
|
src/Tickets/Commerce/Cart/Unmanaged_Cart.php
CHANGED
@@ -173,4 +173,61 @@ class Unmanaged_Cart implements Cart_Interface {
|
|
173 |
unset( $this->items[ $item_id ] );
|
174 |
}
|
175 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
}
|
173 |
unset( $this->items[ $item_id ] );
|
174 |
}
|
175 |
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* {@inheritDoc}
|
179 |
+
*/
|
180 |
+
public function process( array $data = [] ) {
|
181 |
+
if ( empty( $data ) ) {
|
182 |
+
return false;
|
183 |
+
}
|
184 |
+
|
185 |
+
$this->clear();
|
186 |
+
|
187 |
+
/** @var \Tribe__Tickets__REST__V1__Messages $messages */
|
188 |
+
$messages = tribe( 'tickets.rest-v1.messages' );
|
189 |
+
|
190 |
+
// Get the number of available tickets.
|
191 |
+
/** @var \Tribe__Tickets__Tickets_Handler $tickets_handler */
|
192 |
+
$tickets_handler = tribe( 'tickets.handler' );
|
193 |
+
|
194 |
+
$errors = [];
|
195 |
+
|
196 |
+
foreach ( $data['tickets'] as $ticket ) {
|
197 |
+
$available = $tickets_handler->get_ticket_max_purchase( $ticket['ticket_id'] );
|
198 |
+
|
199 |
+
// Bail if ticket does not have enough available capacity.
|
200 |
+
if ( ( - 1 !== $available && $available < $ticket['quantity'] ) || ! $ticket['obj']->date_in_range() ) {
|
201 |
+
$error_code = 'ticket-capacity-not-available';
|
202 |
+
|
203 |
+
$errors[] = new \WP_Error( $error_code, sprintf( $messages->get_message( $error_code ), $ticket['obj']->name ), [
|
204 |
+
'ticket' => $ticket,
|
205 |
+
'max_available' => $available,
|
206 |
+
] );
|
207 |
+
continue;
|
208 |
+
}
|
209 |
+
|
210 |
+
// Enforces that the min to add is 1.
|
211 |
+
$ticket['quantity'] = max( 1, (int) $ticket['quantity'] );
|
212 |
+
|
213 |
+
// Add to / update quantity in cart.
|
214 |
+
$this->add_item( $ticket['ticket_id'], $ticket['quantity'], $ticket['extra'] );
|
215 |
+
}
|
216 |
+
|
217 |
+
// Saved added items to the cart.
|
218 |
+
$this->save();
|
219 |
+
|
220 |
+
if ( ! empty( $errors ) ) {
|
221 |
+
return $errors;
|
222 |
+
}
|
223 |
+
|
224 |
+
return true;
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* {@inheritDoc}
|
229 |
+
*/
|
230 |
+
public function prepare_data( array $data = [] ) {
|
231 |
+
return $data;
|
232 |
+
}
|
233 |
}
|
src/Tickets/Commerce/Checkout.php
CHANGED
@@ -159,4 +159,23 @@ class Checkout {
|
|
159 |
*/
|
160 |
return apply_filters( 'tec_tickets_commerce_checkout_registration_url', $registration_url );
|
161 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
}
|
159 |
*/
|
160 |
return apply_filters( 'tec_tickets_commerce_checkout_registration_url', $registration_url );
|
161 |
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Maybe add a post display state for special Tickets Commerce Checkout Page in the page list table.
|
165 |
+
*
|
166 |
+
* @since 5.1.10
|
167 |
+
*
|
168 |
+
* @param array $post_states An array of post display states.
|
169 |
+
* @param WP_Post $post The current post object.
|
170 |
+
*
|
171 |
+
* @return array $post_states An array of post display states.
|
172 |
+
*/
|
173 |
+
public function maybe_add_display_post_states( $post_states, $post ) {
|
174 |
+
|
175 |
+
if ( $this->get_page_id() === $post->ID ) {
|
176 |
+
$post_states['tec_tickets_commerce_page_checkout'] = __( 'Tickets Commerce Checkout Page', 'event-tickets' );
|
177 |
+
}
|
178 |
+
|
179 |
+
return $post_states;
|
180 |
+
}
|
181 |
}
|
src/Tickets/Commerce/Flag_Actions/Archive_Attendees.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Flag_Actions;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Attendee;
|
6 |
+
use TEC\Tickets\Commerce\Module;
|
7 |
+
use TEC\Tickets\Commerce\Order;
|
8 |
+
use TEC\Tickets\Commerce\Settings;
|
9 |
+
use TEC\Tickets\Commerce\Status\Completed;
|
10 |
+
use TEC\Tickets\Commerce\Status\Pending;
|
11 |
+
use TEC\Tickets\Commerce\Status\Status_Abstract;
|
12 |
+
use TEC\Tickets\Commerce\Status\Status_Handler;
|
13 |
+
use TEC\Tickets\Commerce\Status\Status_Interface;
|
14 |
+
use TEC\Tickets\Commerce\Ticket;
|
15 |
+
use Tribe__Utils__Array as Arr;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Class Archive_Attendees normally triggers when handling refunds and stuff like that.
|
19 |
+
*
|
20 |
+
* @since 5.1.10
|
21 |
+
*
|
22 |
+
* @package TEC\Tickets\Commerce\Flag_Actions
|
23 |
+
*/
|
24 |
+
class Archive_Attendees extends Flag_Action_Abstract {
|
25 |
+
/**
|
26 |
+
* {@inheritDoc}
|
27 |
+
*/
|
28 |
+
protected $flags = [
|
29 |
+
'archive_attendees',
|
30 |
+
];
|
31 |
+
|
32 |
+
/**
|
33 |
+
* {@inheritDoc}
|
34 |
+
*/
|
35 |
+
protected $post_types = [
|
36 |
+
Order::POSTTYPE
|
37 |
+
];
|
38 |
+
|
39 |
+
/**
|
40 |
+
* {@inheritDoc}
|
41 |
+
*/
|
42 |
+
public function handle( Status_Interface $new_status, $old_status, \WP_Post $post ) {
|
43 |
+
// @todo we need an error handling piece here.
|
44 |
+
if ( empty( $post->cart_items ) ) {
|
45 |
+
return;
|
46 |
+
}
|
47 |
+
|
48 |
+
foreach ( $post->cart_items as $ticket_id => $item ) {
|
49 |
+
$ticket = \Tribe__Tickets__Tickets::load_ticket_object( $item['ticket_id'] );
|
50 |
+
if ( null === $ticket ) {
|
51 |
+
continue;
|
52 |
+
}
|
53 |
+
|
54 |
+
$quantity = Arr::get( $item, 'quantity', 1 );
|
55 |
+
|
56 |
+
// Skip generating for zero-ed items.
|
57 |
+
if ( 0 >= $quantity ) {
|
58 |
+
continue;
|
59 |
+
}
|
60 |
+
|
61 |
+
for ( $i = 0; $i < $quantity; $i ++ ) {
|
62 |
+
|
63 |
+
// @todo handle the archival of attendees.
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
src/Tickets/Commerce/Flag_Actions/Decrease_Stock.php
CHANGED
@@ -2,8 +2,16 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Flag_Actions;
|
4 |
|
|
|
|
|
5 |
use TEC\Tickets\Commerce\Order;
|
|
|
|
|
|
|
|
|
6 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
|
|
|
|
7 |
|
8 |
/**
|
9 |
* Class Decrease_Stock
|
@@ -26,11 +34,78 @@ class Decrease_Stock extends Flag_Action_Abstract {
|
|
26 |
protected $post_types = [
|
27 |
Order::POSTTYPE
|
28 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
/**
|
31 |
* {@inheritDoc}
|
32 |
*/
|
33 |
public function handle( Status_Interface $new_status, $old_status, \WP_Post $post ) {
|
34 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Flag_Actions;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Attendee;
|
6 |
+
use TEC\Tickets\Commerce\Module;
|
7 |
use TEC\Tickets\Commerce\Order;
|
8 |
+
use TEC\Tickets\Commerce\Settings;
|
9 |
+
use TEC\Tickets\Commerce\Status\Pending;
|
10 |
+
use TEC\Tickets\Commerce\Status\Status_Abstract;
|
11 |
+
use TEC\Tickets\Commerce\Status\Status_Handler;
|
12 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
13 |
+
use TEC\Tickets\Commerce\Ticket;
|
14 |
+
use Tribe__Utils__Array as Arr;
|
15 |
|
16 |
/**
|
17 |
* Class Decrease_Stock
|
34 |
protected $post_types = [
|
35 |
Order::POSTTYPE
|
36 |
];
|
37 |
+
/**
|
38 |
+
* Hooks any WordPress filters related to this Flag Action.
|
39 |
+
*
|
40 |
+
* @since 5.1.10
|
41 |
+
*/
|
42 |
+
public function hook() {
|
43 |
+
parent::hook();
|
44 |
+
|
45 |
+
$status = $this->get_status_when_to_trigger();
|
46 |
+
add_filter( "tec_tickets_commerce_order_status_{$status->get_slug()}_get_flags", [ $this, 'modify_status_flags' ], 10, 3 );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Returns the instance of the status we trigger this flag action.
|
51 |
+
*
|
52 |
+
* @since 5.1.10
|
53 |
+
*
|
54 |
+
* @return Status_Abstract
|
55 |
+
*/
|
56 |
+
public function get_status_when_to_trigger() {
|
57 |
+
$status = tribe( Status_Handler::class )->get_by_slug( tribe_get_option( Settings::$option_stock_handling, Pending::SLUG ) );
|
58 |
+
|
59 |
+
if ( ! $status instanceof Status_Abstract ) {
|
60 |
+
$status = tribe( Pending::class );
|
61 |
+
}
|
62 |
+
|
63 |
+
return $status;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Include generate_attendee flag to either Completed or Pending
|
68 |
+
*
|
69 |
+
* @since 5.1.10
|
70 |
+
*
|
71 |
+
* @param string[] $flags Which flags will trigger this action.
|
72 |
+
* @param \WP_Post $post Post object.
|
73 |
+
* @param Status_Abstract $status Instance of action flag we are triggering.
|
74 |
+
*
|
75 |
+
* @return string[]
|
76 |
+
*/
|
77 |
+
public function modify_status_flags( $flags, $post, $status ) {
|
78 |
+
$flags[] = 'decrease_stock';
|
79 |
+
|
80 |
+
return $flags;
|
81 |
+
}
|
82 |
|
83 |
/**
|
84 |
* {@inheritDoc}
|
85 |
*/
|
86 |
public function handle( Status_Interface $new_status, $old_status, \WP_Post $post ) {
|
87 |
+
if ( empty( $post->cart_items ) ) {
|
88 |
+
return;
|
89 |
+
}
|
90 |
+
|
91 |
+
foreach ( $post->cart_items as $ticket_id => $item ) {
|
92 |
+
$ticket = \Tribe__Tickets__Tickets::load_ticket_object( $item['ticket_id'] );
|
93 |
+
if ( null === $ticket ) {
|
94 |
+
continue;
|
95 |
+
}
|
96 |
+
|
97 |
+
if ( ! $ticket->manage_stock() ) {
|
98 |
+
continue;
|
99 |
+
}
|
100 |
+
|
101 |
+
$quantity = Arr::get( $item, 'quantity', 1 );
|
102 |
+
|
103 |
+
// Skip generating for zero-ed items.
|
104 |
+
if ( 0 >= $quantity ) {
|
105 |
+
continue;
|
106 |
+
}
|
107 |
+
|
108 |
+
update_post_meta( $ticket->ID, Ticket::$stock_meta_key, $ticket->stock() - $quantity );
|
109 |
+
}
|
110 |
}
|
111 |
}
|
src/Tickets/Commerce/Flag_Actions/Flag_Action_Abstract.php
CHANGED
@@ -2,7 +2,9 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Flag_Actions;
|
4 |
|
|
|
5 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
|
|
6 |
|
7 |
|
8 |
/**
|
@@ -40,11 +42,41 @@ abstract class Flag_Action_Abstract implements Flag_Action_Interface {
|
|
40 |
*/
|
41 |
protected $post_types;
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
/**
|
44 |
* {@inheritDoc}
|
45 |
*/
|
46 |
-
public function get_flags() {
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
/**
|
@@ -65,7 +97,7 @@ abstract class Flag_Action_Abstract implements Flag_Action_Interface {
|
|
65 |
* {@inheritDoc}
|
66 |
*/
|
67 |
public function should_trigger( Status_Interface $new_status, $old_status, $post ) {
|
68 |
-
if ( ! $this->has_flags( $new_status ) ) {
|
69 |
return false;
|
70 |
}
|
71 |
|
@@ -79,8 +111,8 @@ abstract class Flag_Action_Abstract implements Flag_Action_Interface {
|
|
79 |
/**
|
80 |
* {@inheritDoc}
|
81 |
*/
|
82 |
-
public function has_flags( Status_Interface $status ) {
|
83 |
-
return $status->has_flags( $this->get_flags() );
|
84 |
}
|
85 |
|
86 |
/**
|
@@ -104,6 +136,9 @@ abstract class Flag_Action_Abstract implements Flag_Action_Interface {
|
|
104 |
$post = tec_tc_get_order( $post );
|
105 |
|
106 |
$this->handle( $new_status, $old_status, $post );
|
|
|
|
|
|
|
107 |
}
|
108 |
|
109 |
/**
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Flag_Actions;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Order;
|
6 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
7 |
+
use Tribe__Date_Utils as Dates;
|
8 |
|
9 |
|
10 |
/**
|
42 |
*/
|
43 |
protected $post_types;
|
44 |
|
45 |
+
/**
|
46 |
+
* Marks a given order with all the flags for this given status update.
|
47 |
+
* The value of those markers is the time where the update happened.
|
48 |
+
*
|
49 |
+
* @since 5.1.10
|
50 |
+
*
|
51 |
+
* @param Status_Interface $new_status
|
52 |
+
* @param null|Status_Interface $old_status
|
53 |
+
* @param \WP_Post $post
|
54 |
+
*
|
55 |
+
*/
|
56 |
+
protected function mark( Status_Interface $new_status, $old_status, \WP_Post $post ) {
|
57 |
+
$time = Dates::build_date_object()->format( Dates::DBDATETIMEFORMAT );
|
58 |
+
foreach ( $this->get_flags( $post ) as $flag ) {
|
59 |
+
$marker_meta_key = Order::get_flag_action_marker_meta_key( $flag, $new_status );
|
60 |
+
add_post_meta( $post->ID, $marker_meta_key, $time );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
/**
|
65 |
* {@inheritDoc}
|
66 |
*/
|
67 |
+
public function get_flags( \WP_Post $post = null ) {
|
68 |
+
$flags = $this->flags;
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Allows the modifications of which flags will trigger this Action.
|
72 |
+
*
|
73 |
+
* @since 5.1.10
|
74 |
+
*
|
75 |
+
* @param string[] $flags Which flags will trigger this action.
|
76 |
+
* @param \WP_Post $post Post object.
|
77 |
+
* @param static $action_flag Instance of action flag we are triggering.
|
78 |
+
*/
|
79 |
+
return apply_filters( 'tec_tickets_commerce_flag_actions_get_flags', $flags, $post, $this );
|
80 |
}
|
81 |
|
82 |
/**
|
97 |
* {@inheritDoc}
|
98 |
*/
|
99 |
public function should_trigger( Status_Interface $new_status, $old_status, $post ) {
|
100 |
+
if ( ! $this->has_flags( $new_status, 'AND', $post ) ) {
|
101 |
return false;
|
102 |
}
|
103 |
|
111 |
/**
|
112 |
* {@inheritDoc}
|
113 |
*/
|
114 |
+
public function has_flags( Status_Interface $status, $operator = 'AND', \WP_Post $post = null ) {
|
115 |
+
return $status->has_flags( $this->get_flags( $post ), $operator, $post );
|
116 |
}
|
117 |
|
118 |
/**
|
136 |
$post = tec_tc_get_order( $post );
|
137 |
|
138 |
$this->handle( $new_status, $old_status, $post );
|
139 |
+
|
140 |
+
// After handling we mark this order with the flags from this action.
|
141 |
+
$this->mark( $new_status, $old_status, $post );
|
142 |
}
|
143 |
|
144 |
/**
|
src/Tickets/Commerce/Flag_Actions/Flag_Action_Handler.php
CHANGED
@@ -30,6 +30,7 @@ class Flag_Action_Handler extends \tad_DI52_ServiceProvider {
|
|
30 |
Generate_Attendees::class,
|
31 |
Increase_Stock::class,
|
32 |
Decrease_Stock::class,
|
|
|
33 |
];
|
34 |
|
35 |
/**
|
30 |
Generate_Attendees::class,
|
31 |
Increase_Stock::class,
|
32 |
Decrease_Stock::class,
|
33 |
+
Archive_Attendees::class,
|
34 |
];
|
35 |
|
36 |
/**
|
src/Tickets/Commerce/Flag_Actions/Flag_Action_Interface.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
namespace TEC\Tickets\Commerce\Flag_Actions;
|
3 |
|
4 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
@@ -16,9 +17,11 @@ interface Flag_Action_Interface {
|
|
16 |
*
|
17 |
* @since 5.1.9
|
18 |
*
|
|
|
|
|
19 |
* @return string[]
|
20 |
*/
|
21 |
-
public function get_flags();
|
22 |
|
23 |
/**
|
24 |
* Gets the post types that we could trigger this flag action for.
|
@@ -56,11 +59,13 @@ interface Flag_Action_Interface {
|
|
56 |
*
|
57 |
* @since 5.1.9
|
58 |
*
|
59 |
-
* @param Status_Interface $status
|
|
|
|
|
60 |
*
|
61 |
* @return bool
|
62 |
*/
|
63 |
-
public function has_flags( Status_Interface $status );
|
64 |
|
65 |
/**
|
66 |
* Determines if a given post object is the correct post type to trigger this flag action
|
1 |
<?php
|
2 |
+
|
3 |
namespace TEC\Tickets\Commerce\Flag_Actions;
|
4 |
|
5 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
17 |
*
|
18 |
* @since 5.1.9
|
19 |
*
|
20 |
+
* @param \WP_Post $post Post object.
|
21 |
+
*
|
22 |
* @return string[]
|
23 |
*/
|
24 |
+
public function get_flags( \WP_Post $post );
|
25 |
|
26 |
/**
|
27 |
* Gets the post types that we could trigger this flag action for.
|
59 |
*
|
60 |
* @since 5.1.9
|
61 |
*
|
62 |
+
* @param Status_Interface $status Which status we are checking for.
|
63 |
+
* @param string $operator Which conditional we are using for checking.
|
64 |
+
* @param \WP_Post $post Post object.
|
65 |
*
|
66 |
* @return bool
|
67 |
*/
|
68 |
+
public function has_flags( Status_Interface $status, $operator = 'AND', \WP_Post $post = null );
|
69 |
|
70 |
/**
|
71 |
* Determines if a given post object is the correct post type to trigger this flag action
|
src/Tickets/Commerce/Flag_Actions/Generate_Attendees.php
CHANGED
@@ -2,8 +2,17 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Flag_Actions;
|
4 |
|
|
|
|
|
5 |
use TEC\Tickets\Commerce\Order;
|
|
|
|
|
|
|
|
|
|
|
6 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
|
|
|
|
7 |
|
8 |
/**
|
9 |
* Class Attendee_Generation
|
@@ -27,10 +36,81 @@ class Generate_Attendees extends Flag_Action_Abstract {
|
|
27 |
Order::POSTTYPE
|
28 |
];
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
/**
|
31 |
* {@inheritDoc}
|
32 |
*/
|
33 |
public function handle( Status_Interface $new_status, $old_status, \WP_Post $post ) {
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Flag_Actions;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Attendee;
|
6 |
+
use TEC\Tickets\Commerce\Module;
|
7 |
use TEC\Tickets\Commerce\Order;
|
8 |
+
use TEC\Tickets\Commerce\Settings;
|
9 |
+
use TEC\Tickets\Commerce\Status\Completed;
|
10 |
+
use TEC\Tickets\Commerce\Status\Pending;
|
11 |
+
use TEC\Tickets\Commerce\Status\Status_Abstract;
|
12 |
+
use TEC\Tickets\Commerce\Status\Status_Handler;
|
13 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
14 |
+
use TEC\Tickets\Commerce\Ticket;
|
15 |
+
use Tribe__Utils__Array as Arr;
|
16 |
|
17 |
/**
|
18 |
* Class Attendee_Generation
|
36 |
Order::POSTTYPE
|
37 |
];
|
38 |
|
39 |
+
/**
|
40 |
+
* Hooks any WordPress filters related to this Flag Action.
|
41 |
+
*
|
42 |
+
* @since 5.1.10
|
43 |
+
*/
|
44 |
+
public function hook() {
|
45 |
+
parent::hook();
|
46 |
+
|
47 |
+
$status = $this->get_status_when_to_trigger();
|
48 |
+
add_filter( "tec_tickets_commerce_order_status_{$status->get_slug()}_get_flags", [ $this, 'modify_status_with_attendee_generation_flag' ], 10, 3 );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Returns the instance of the status we trigger attendee generation.
|
53 |
+
*
|
54 |
+
* @since 5.1.10
|
55 |
+
*
|
56 |
+
* @return Status_Abstract
|
57 |
+
*/
|
58 |
+
public function get_status_when_to_trigger() {
|
59 |
+
return tribe( Status_Handler::class )->get_inventory_decrease_status();
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Include generate_attendee flag to either Completed or Pending
|
64 |
+
*
|
65 |
+
* @since 5.1.10
|
66 |
+
*
|
67 |
+
* @param string[] $flags Which flags will trigger this action.
|
68 |
+
* @param \WP_Post $post Post object.
|
69 |
+
* @param Status_Abstract $status Instance of action flag we are triggering.
|
70 |
+
*
|
71 |
+
* @return string[]
|
72 |
+
*/
|
73 |
+
public function modify_status_with_attendee_generation_flag( $flags, $post, $status ) {
|
74 |
+
$flags[] = 'generate_attendees';
|
75 |
+
|
76 |
+
return $flags;
|
77 |
+
}
|
78 |
+
|
79 |
/**
|
80 |
* {@inheritDoc}
|
81 |
*/
|
82 |
public function handle( Status_Interface $new_status, $old_status, \WP_Post $post ) {
|
83 |
+
// @todo we need an error handling piece here.
|
84 |
+
if ( empty( $post->cart_items ) ) {
|
85 |
+
return;
|
86 |
+
}
|
87 |
+
|
88 |
+
$default_currency = tribe_get_option( Settings::$option_currency_code, 'USD' );
|
89 |
+
|
90 |
+
foreach ( $post->cart_items as $ticket_id => $item ) {
|
91 |
+
$ticket = \Tribe__Tickets__Tickets::load_ticket_object( $item['ticket_id'] );
|
92 |
+
if ( null === $ticket ) {
|
93 |
+
continue;
|
94 |
+
}
|
95 |
+
|
96 |
+
$extra = Arr::get( $item, 'extra', [] );
|
97 |
+
$quantity = Arr::get( $item, 'quantity', 1 );
|
98 |
+
|
99 |
+
// Skip generating for zero-ed items.
|
100 |
+
if ( 0 >= $quantity ) {
|
101 |
+
continue;
|
102 |
+
}
|
103 |
+
|
104 |
+
for ( $i = 0; $i < $quantity; $i ++ ) {
|
105 |
+
$args = [
|
106 |
+
'opt_out' => Arr::get( $extra, 'optout' ),
|
107 |
+
'price_paid' => Arr::get( $item, 'price' ),
|
108 |
+
'currency' => Arr::get( $item, 'currency', $default_currency ),
|
109 |
+
'security_code' => tribe( Module::class )->generate_security_code( time() . '-' . $i )
|
110 |
+
];
|
111 |
+
|
112 |
+
$attendee = tribe( Attendee::class )->create( $post, $ticket, $args );
|
113 |
+
}
|
114 |
+
}
|
115 |
}
|
116 |
}
|
src/Tickets/Commerce/Flag_Actions/Increase_Stock.php
CHANGED
@@ -4,9 +4,11 @@ namespace TEC\Tickets\Commerce\Flag_Actions;
|
|
4 |
|
5 |
use TEC\Tickets\Commerce\Order;
|
6 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
|
|
|
|
7 |
|
8 |
/**
|
9 |
-
* Class Increase_Stock
|
10 |
*
|
11 |
* @since 5.1.9
|
12 |
*
|
@@ -31,6 +33,28 @@ class Increase_Stock extends Flag_Action_Abstract {
|
|
31 |
* {@inheritDoc}
|
32 |
*/
|
33 |
public function handle( Status_Interface $new_status, $old_status, \WP_Post $post ) {
|
34 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
}
|
4 |
|
5 |
use TEC\Tickets\Commerce\Order;
|
6 |
use TEC\Tickets\Commerce\Status\Status_Interface;
|
7 |
+
use TEC\Tickets\Commerce\Ticket;
|
8 |
+
use Tribe__Utils__Array as Arr;
|
9 |
|
10 |
/**
|
11 |
+
* Class Increase_Stock, normally triggered when refunding on orders get set to not-completed.
|
12 |
*
|
13 |
* @since 5.1.9
|
14 |
*
|
33 |
* {@inheritDoc}
|
34 |
*/
|
35 |
public function handle( Status_Interface $new_status, $old_status, \WP_Post $post ) {
|
36 |
+
if ( empty( $post->cart_items ) ) {
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
|
40 |
+
foreach ( $post->cart_items as $ticket_id => $item ) {
|
41 |
+
$ticket = \Tribe__Tickets__Tickets::load_ticket_object( $item['ticket_id'] );
|
42 |
+
if ( null === $ticket ) {
|
43 |
+
continue;
|
44 |
+
}
|
45 |
+
|
46 |
+
if ( ! $ticket->manage_stock() ) {
|
47 |
+
continue;
|
48 |
+
}
|
49 |
+
|
50 |
+
$quantity = Arr::get( $item, 'quantity', 1 );
|
51 |
+
|
52 |
+
// Skip generating for zero-ed items.
|
53 |
+
if ( 0 >= $quantity ) {
|
54 |
+
continue;
|
55 |
+
}
|
56 |
+
|
57 |
+
update_post_meta( $ticket->ID, Ticket::$stock_meta_key, $ticket->stock() + $quantity );
|
58 |
+
}
|
59 |
}
|
60 |
}
|
src/Tickets/Commerce/Gateways/Manager.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways;
|
4 |
|
|
|
|
|
5 |
/**
|
6 |
* Class Gateways Manager.
|
7 |
*
|
@@ -103,8 +105,8 @@ class Manager {
|
|
103 |
|
104 |
$heading = [
|
105 |
'tickets-commerce-' . $gateway_key => [
|
106 |
-
'type' => '
|
107 |
-
'html' => '<h3 class="event-
|
108 |
'validation_type' => 'html',
|
109 |
],
|
110 |
];
|
@@ -117,4 +119,4 @@ class Manager {
|
|
117 |
|
118 |
return array_merge( ...$gateway_setting_groups );
|
119 |
}
|
120 |
-
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Settings;
|
6 |
+
|
7 |
/**
|
8 |
* Class Gateways Manager.
|
9 |
*
|
105 |
|
106 |
$heading = [
|
107 |
'tickets-commerce-' . $gateway_key => [
|
108 |
+
'type' => 'html',
|
109 |
+
'html' => '<h3 class="event-tickets__admin-settings-subheading" class="tribe-dependent" data-depends="#' . Settings::$option_enable . '-input" data-condition-is-checked>' . $gateway::get_label() . '</h3>',
|
110 |
'validation_type' => 'html',
|
111 |
],
|
112 |
];
|
119 |
|
120 |
return array_merge( ...$gateway_setting_groups );
|
121 |
}
|
122 |
+
}
|
src/Tickets/Commerce/Gateways/PayPal/Ajax_Request_Handler.php
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
-
|
5 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Repositories\Order;
|
6 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Repositories\Webhooks;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class Ajax_Request_Handler
|
10 |
-
*
|
11 |
-
* @todo This whole file will stop exsiting once we deprecate all Give's code usage.
|
12 |
-
*
|
13 |
-
* @since 5.1.6
|
14 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
15 |
-
*
|
16 |
-
*/
|
17 |
-
class Ajax_Request_Handler {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Return on boarding trouble notice.
|
21 |
-
*
|
22 |
-
* @TODO this method needs to be completely refactored into an admin page action.
|
23 |
-
*
|
24 |
-
* @since 5.1.6
|
25 |
-
*/
|
26 |
-
public function on_boarding_trouble_notice() {
|
27 |
-
|
28 |
-
$action_list = sprintf(
|
29 |
-
'<ol><li>%1$s</li><li>%2$s</li><li>%3$s %4$s</li></ol>',
|
30 |
-
esc_html__( 'Make sure to complete the entire PayPal process. Do not close the window you have finished the process.', 'event-tickets' ),
|
31 |
-
esc_html__( 'The last screen of the PayPal connect process includes a button to be sent back to your site. It is important you click this and do not close the window yourself.', 'event-tickets' ),
|
32 |
-
esc_html__( 'If you’re still having problems connecting:', 'event-tickets' ),
|
33 |
-
$this->settings->get_guidance_html()
|
34 |
-
);
|
35 |
-
|
36 |
-
$standard_error = sprintf(
|
37 |
-
'<div id="give-paypal-onboarding-trouble-notice" class="tribe-common-a11y-hidden"><p class="error-message">%1$s</p><p>%2$s</p></div>',
|
38 |
-
esc_html__( 'Having trouble connecting to PayPal?', 'event-tickets' ),
|
39 |
-
$action_list
|
40 |
-
);
|
41 |
-
|
42 |
-
wp_send_json_success( $standard_error );
|
43 |
-
}
|
44 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Assets.php
CHANGED
@@ -76,13 +76,15 @@ class Assets extends \tad_DI52_ServiceProvider {
|
|
76 |
[
|
77 |
'jquery',
|
78 |
'tribe-common',
|
|
|
79 |
],
|
80 |
null,
|
81 |
[
|
82 |
-
'groups'
|
83 |
'tec-tickets-commerce-gateway-paypal',
|
84 |
],
|
85 |
-
'
|
|
|
86 |
'name' => 'tecTicketsCommerceGatewayPayPalCheckout',
|
87 |
'data' => static function () {
|
88 |
return [
|
@@ -110,4 +112,15 @@ class Assets extends \tad_DI52_ServiceProvider {
|
|
110 |
$client->get_home_page_url()
|
111 |
);
|
112 |
}
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
[
|
77 |
'jquery',
|
78 |
'tribe-common',
|
79 |
+
'tribe-tickets-commerce-js',
|
80 |
],
|
81 |
null,
|
82 |
[
|
83 |
+
'groups' => [
|
84 |
'tec-tickets-commerce-gateway-paypal',
|
85 |
],
|
86 |
+
'conditionals' => [ $this, 'should_enqueue_assets' ],
|
87 |
+
'localize' => [
|
88 |
'name' => 'tecTicketsCommerceGatewayPayPalCheckout',
|
89 |
'data' => static function () {
|
90 |
return [
|
112 |
$client->get_home_page_url()
|
113 |
);
|
114 |
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Define if the assets for `PayPal` should be enqueued or not.
|
118 |
+
*
|
119 |
+
* @since 5.1.10
|
120 |
+
*
|
121 |
+
* @return bool If the `PayPal` assets should be enqueued or not.
|
122 |
+
*/
|
123 |
+
public function should_enqueue_assets() {
|
124 |
+
return tribe( Gateway::class )->is_active();
|
125 |
+
}
|
126 |
+
}
|
src/Tickets/Commerce/Gateways/PayPal/Buttons.php
CHANGED
@@ -42,7 +42,19 @@ class Buttons {
|
|
42 |
return $this->template;
|
43 |
}
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
public function get_checkout_script() {
|
|
|
|
|
|
|
|
|
|
|
46 |
$client = tribe( Client::class );
|
47 |
$client_token_data = $client->get_client_token();
|
48 |
$must_login = ! is_user_logged_in() && tribe( Module::class )->login_required();
|
@@ -54,8 +66,10 @@ class Buttons {
|
|
54 |
'must_login' => $must_login,
|
55 |
];
|
56 |
|
|
|
|
|
57 |
tribe_asset_enqueue( 'tec-tickets-commerce-gateway-paypal-checkout' );
|
58 |
|
59 |
-
return $
|
60 |
}
|
61 |
}
|
42 |
return $this->template;
|
43 |
}
|
44 |
|
45 |
+
/**
|
46 |
+
* Get the checkout script tag for PayPal buttons.
|
47 |
+
*
|
48 |
+
* @since 5.1.10
|
49 |
+
*
|
50 |
+
* @return string
|
51 |
+
*/
|
52 |
public function get_checkout_script() {
|
53 |
+
// Bail if PayPal is not configured and active.
|
54 |
+
if ( ! tribe( Merchant::class )->is_active() ) {
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
|
58 |
$client = tribe( Client::class );
|
59 |
$client_token_data = $client->get_client_token();
|
60 |
$must_login = ! is_user_logged_in() && tribe( Module::class )->login_required();
|
66 |
'must_login' => $must_login,
|
67 |
];
|
68 |
|
69 |
+
$html = $this->get_template()->template( 'checkout-script', $template_vars, false );
|
70 |
+
|
71 |
tribe_asset_enqueue( 'tec-tickets-commerce-gateway-paypal-checkout' );
|
72 |
|
73 |
+
return $html;
|
74 |
}
|
75 |
}
|
src/Tickets/Commerce/Gateways/PayPal/Client.php
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
|
|
|
|
5 |
use Tribe__Utils__Array as Arr;
|
6 |
|
7 |
/**
|
@@ -108,21 +110,25 @@ class Client {
|
|
108 |
}
|
109 |
|
110 |
/**
|
111 |
-
* Send a
|
112 |
*
|
113 |
-
* @since 5.1.
|
114 |
*
|
115 |
-
* @param string $
|
|
|
116 |
* @param array $query_args
|
117 |
* @param array $request_arguments
|
|
|
118 |
*
|
119 |
-
* @return array
|
120 |
*/
|
121 |
-
public function
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
|
|
126 |
|
127 |
$default_arguments = [
|
128 |
'headers' => [
|
@@ -131,19 +137,54 @@ class Client {
|
|
131 |
'Content-Type' => 'application/json',
|
132 |
]
|
133 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
foreach ( $default_arguments as $key => $default_argument ) {
|
135 |
$request_arguments[ $key ] = array_merge( $default_argument, Arr::get( $request_arguments, $key, [] ) );
|
136 |
}
|
137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
if ( is_wp_error( $response ) ) {
|
140 |
tribe( 'logger' )->log_error( sprintf(
|
141 |
-
'[%s] PayPal
|
|
|
142 |
$url,
|
143 |
$response->get_error_message()
|
144 |
), 'tickets-commerce-paypal' );
|
145 |
|
146 |
-
return
|
|
|
|
|
|
|
|
|
|
|
147 |
}
|
148 |
|
149 |
$response_code = wp_remote_retrieve_response_code( $response );
|
@@ -157,84 +198,82 @@ class Client {
|
|
157 |
$response = @json_decode( $response, true );
|
158 |
|
159 |
if ( ! is_array( $response ) ) {
|
160 |
-
tribe( 'logger' )->log_error( sprintf( '[%s] Unexpected PayPal
|
161 |
-
|
162 |
-
return null
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
|
165 |
return $response;
|
166 |
}
|
167 |
|
168 |
/**
|
169 |
-
* Send a
|
170 |
*
|
171 |
* @since 5.1.9
|
172 |
*
|
173 |
* @param string $endpoint
|
174 |
* @param array $query_args
|
175 |
* @param array $request_arguments
|
|
|
176 |
*
|
177 |
* @return array|null
|
178 |
*/
|
179 |
-
public function
|
180 |
-
|
181 |
-
|
182 |
-
? $this->get_api_url( $endpoint, $query_args )
|
183 |
-
: add_query_arg( $query_args, $endpoint );
|
184 |
-
|
185 |
-
$default_arguments = [
|
186 |
-
'headers' => [
|
187 |
-
'Accept' => 'application/json',
|
188 |
-
'Authorization' => sprintf( 'Bearer %1$s', $this->get_access_token() ),
|
189 |
-
'Content-Type' => 'application/json',
|
190 |
-
],
|
191 |
-
'body' => [],
|
192 |
-
];
|
193 |
-
foreach ( $default_arguments as $key => $default_argument ) {
|
194 |
-
$request_arguments[ $key ] = array_merge( $default_argument, Arr::get( $request_arguments, $key, [] ) );
|
195 |
-
}
|
196 |
-
|
197 |
-
$content_type = Arr::get( $request_arguments, [ 'headers', 'Content-Type' ] );
|
198 |
-
if ( empty( $content_type ) ) {
|
199 |
-
$content_type = Arr::get( $request_arguments, [ 'headers', 'content-type' ] );
|
200 |
-
}
|
201 |
-
|
202 |
-
if (
|
203 |
-
! empty( $request_arguments['body'] )
|
204 |
-
&& 'application/json' === strtolower( $content_type )
|
205 |
-
) {
|
206 |
-
$request_arguments['body'] = wp_json_encode( $request_arguments[ $key ] );
|
207 |
-
}
|
208 |
-
|
209 |
-
$response = wp_remote_post( $url, $request_arguments );
|
210 |
-
|
211 |
-
if ( is_wp_error( $response ) ) {
|
212 |
-
tribe( 'logger' )->log_error( sprintf(
|
213 |
-
'[%s] PayPal POST request error: %s',
|
214 |
-
$url,
|
215 |
-
$response->get_error_message()
|
216 |
-
), 'tickets-commerce-paypal' );
|
217 |
-
|
218 |
-
return null;
|
219 |
-
}
|
220 |
-
|
221 |
-
$response_code = wp_remote_retrieve_response_code( $response );
|
222 |
-
|
223 |
-
// When we receive an error code we return the whole response.
|
224 |
-
if ( ! in_array( $response_code, [ 200, 201, 202, 204 ], true ) ) {
|
225 |
-
return $response;
|
226 |
-
}
|
227 |
-
|
228 |
-
$response = wp_remote_retrieve_body( $response );
|
229 |
-
$response = @json_decode( $response, true );
|
230 |
|
231 |
-
|
232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
|
234 |
-
|
235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
|
237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
239 |
|
240 |
/**
|
@@ -430,13 +469,21 @@ class Client {
|
|
430 |
*
|
431 |
* @since 5.1.9
|
432 |
*
|
433 |
-
* @param
|
|
|
|
|
|
|
434 |
*
|
435 |
* @return array|null
|
436 |
*/
|
437 |
-
public function capture_order( $order_id ) {
|
438 |
$query_args = [];
|
439 |
$body = [];
|
|
|
|
|
|
|
|
|
|
|
440 |
$args = [
|
441 |
'headers' => [
|
442 |
'PayPal-Partner-Attribution-Id' => Gateway::ATTRIBUTION_ID,
|
@@ -447,7 +494,7 @@ class Client {
|
|
447 |
|
448 |
$capture_id = urlencode( $order_id );
|
449 |
$url = '/v2/checkout/orders/{order_id}/capture';
|
450 |
-
$url = str_replace( '{order_id}', $
|
451 |
$response = $this->post( $url, $query_args, $args );
|
452 |
|
453 |
return $response;
|
@@ -494,5 +541,292 @@ class Client {
|
|
494 |
return $response;
|
495 |
}
|
496 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
497 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
498 |
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\REST\Webhook_Endpoint;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Events;
|
7 |
use Tribe__Utils__Array as Arr;
|
8 |
|
9 |
/**
|
110 |
}
|
111 |
|
112 |
/**
|
113 |
+
* Send a given method request to a given URL in the PayPal API.
|
114 |
*
|
115 |
+
* @since 5.1.10
|
116 |
*
|
117 |
+
* @param string $method
|
118 |
+
* @param string $url
|
119 |
* @param array $query_args
|
120 |
* @param array $request_arguments
|
121 |
+
* @param bool $raw
|
122 |
*
|
123 |
+
* @return array|\WP_Error
|
124 |
*/
|
125 |
+
public function request( $method, $url, array $query_args = [], array $request_arguments = [], $raw = false ) {
|
126 |
+
$method = strtoupper( $method );
|
127 |
+
|
128 |
+
// If the endpoint passed is a full URL don't try to append anything.
|
129 |
+
$url = 0 !== strpos( 'https://', $url )
|
130 |
+
? $this->get_api_url( $url, $query_args )
|
131 |
+
: add_query_arg( $query_args, $url );
|
132 |
|
133 |
$default_arguments = [
|
134 |
'headers' => [
|
137 |
'Content-Type' => 'application/json',
|
138 |
]
|
139 |
];
|
140 |
+
|
141 |
+
// By default it's important that we have a body set for any method that is not the GET method.
|
142 |
+
if ( 'GET' !== $method ) {
|
143 |
+
$default_arguments['body'] = [];
|
144 |
+
}
|
145 |
+
|
146 |
foreach ( $default_arguments as $key => $default_argument ) {
|
147 |
$request_arguments[ $key ] = array_merge( $default_argument, Arr::get( $request_arguments, $key, [] ) );
|
148 |
}
|
149 |
+
|
150 |
+
if ( 'GET' !== $method ) {
|
151 |
+
$content_type = Arr::get( $request_arguments, [ 'headers', 'Content-Type' ] );
|
152 |
+
if ( empty( $content_type ) ) {
|
153 |
+
$content_type = Arr::get( $request_arguments, [ 'headers', 'content-type' ] );
|
154 |
+
}
|
155 |
+
|
156 |
+
// For all other methods we try to make the body into the correct type.
|
157 |
+
if (
|
158 |
+
! empty( $request_arguments['body'] )
|
159 |
+
&& 'application/json' === strtolower( $content_type )
|
160 |
+
) {
|
161 |
+
$request_arguments['body'] = wp_json_encode( $request_arguments[ $key ] );
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
if ( 'GET' === $method ) {
|
166 |
+
$response = wp_remote_get( $url, $request_arguments );
|
167 |
+
} elseif ( 'POST' === $method ) {
|
168 |
+
$response = wp_remote_post( $url, $request_arguments );
|
169 |
+
} else {
|
170 |
+
$request_arguments['method'] = $method;
|
171 |
+
$response = wp_remote_request( $url, $request_arguments );
|
172 |
+
}
|
173 |
|
174 |
if ( is_wp_error( $response ) ) {
|
175 |
tribe( 'logger' )->log_error( sprintf(
|
176 |
+
'[%s] PayPal "%s" request error: %s',
|
177 |
+
$method,
|
178 |
$url,
|
179 |
$response->get_error_message()
|
180 |
), 'tickets-commerce-paypal' );
|
181 |
|
182 |
+
return $response;
|
183 |
+
}
|
184 |
+
|
185 |
+
// When raw is true means we dont do any logic.
|
186 |
+
if ( true === $raw ) {
|
187 |
+
return $response;
|
188 |
}
|
189 |
|
190 |
$response_code = wp_remote_retrieve_response_code( $response );
|
198 |
$response = @json_decode( $response, true );
|
199 |
|
200 |
if ( ! is_array( $response ) ) {
|
201 |
+
tribe( 'logger' )->log_error( sprintf( '[%s] Unexpected PayPal %s response', $url, $method ), 'tickets-commerce-paypal' );
|
202 |
+
|
203 |
+
return new \WP_Error( 'tec-tickets-commerce-gateway-paypal-client-unexpected', null, [
|
204 |
+
'method' => $method,
|
205 |
+
'url' => $url,
|
206 |
+
'query_args' => $query_args,
|
207 |
+
'request_arguments' => $request_arguments,
|
208 |
+
'response' => $response,
|
209 |
+
] );
|
210 |
}
|
211 |
|
212 |
return $response;
|
213 |
}
|
214 |
|
215 |
/**
|
216 |
+
* Send a GET request to the PayPal API.
|
217 |
*
|
218 |
* @since 5.1.9
|
219 |
*
|
220 |
* @param string $endpoint
|
221 |
* @param array $query_args
|
222 |
* @param array $request_arguments
|
223 |
+
* @param bool $raw
|
224 |
*
|
225 |
* @return array|null
|
226 |
*/
|
227 |
+
public function get( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false ) {
|
228 |
+
return $this->request( 'GET', $endpoint, $query_args, $request_arguments, $raw );
|
229 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
+
/**
|
232 |
+
* Send a POST request to the PayPal API.
|
233 |
+
*
|
234 |
+
* @since 5.1.9
|
235 |
+
*
|
236 |
+
* @param string $endpoint
|
237 |
+
* @param array $query_args
|
238 |
+
* @param array $request_arguments
|
239 |
+
* @param bool $raw
|
240 |
+
*
|
241 |
+
* @return array|null
|
242 |
+
*/
|
243 |
+
public function post( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false ) {
|
244 |
+
return $this->request( 'POST', $endpoint, $query_args, $request_arguments, $raw );
|
245 |
+
}
|
246 |
|
247 |
+
/**
|
248 |
+
* Send a PATCH request to the PayPal API.
|
249 |
+
*
|
250 |
+
* @since 5.1.10
|
251 |
+
*
|
252 |
+
* @param string $endpoint
|
253 |
+
* @param array $query_args
|
254 |
+
* @param array $request_arguments
|
255 |
+
* @param bool $raw
|
256 |
+
*
|
257 |
+
* @return array|null
|
258 |
+
*/
|
259 |
+
public function patch( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false ) {
|
260 |
+
return $this->request( 'PATCH', $endpoint, $query_args, $request_arguments, $raw );
|
261 |
+
}
|
262 |
|
263 |
+
/**
|
264 |
+
* Send a DELETE request to the PayPal API.
|
265 |
+
*
|
266 |
+
* @since 5.1.10
|
267 |
+
*
|
268 |
+
* @param string $endpoint
|
269 |
+
* @param array $query_args
|
270 |
+
* @param array $request_arguments
|
271 |
+
* @param bool $raw
|
272 |
+
*
|
273 |
+
* @return array|null
|
274 |
+
*/
|
275 |
+
public function delete( $endpoint, array $query_args = [], array $request_arguments = [], $raw = false ) {
|
276 |
+
return $this->request( 'DELETE', $endpoint, $query_args, $request_arguments, $raw );
|
277 |
}
|
278 |
|
279 |
/**
|
469 |
*
|
470 |
* @since 5.1.9
|
471 |
*
|
472 |
+
* @since 5.1.10 Added support for passing `payerID` param for PayPal API.
|
473 |
+
*
|
474 |
+
* @param string $order_id Order ID to capture.
|
475 |
+
* @param string $payer_id Payer ID for given order from PayPal.
|
476 |
*
|
477 |
* @return array|null
|
478 |
*/
|
479 |
+
public function capture_order( $order_id, $payer_id = '' ) {
|
480 |
$query_args = [];
|
481 |
$body = [];
|
482 |
+
|
483 |
+
if ( ! empty( $payer_id ) ) {
|
484 |
+
$body['payerID'] = $payer_id;
|
485 |
+
}
|
486 |
+
|
487 |
$args = [
|
488 |
'headers' => [
|
489 |
'PayPal-Partner-Attribution-Id' => Gateway::ATTRIBUTION_ID,
|
494 |
|
495 |
$capture_id = urlencode( $order_id );
|
496 |
$url = '/v2/checkout/orders/{order_id}/capture';
|
497 |
+
$url = str_replace( '{order_id}', $capture_id, $url );
|
498 |
$response = $this->post( $url, $query_args, $args );
|
499 |
|
500 |
return $response;
|
541 |
return $response;
|
542 |
}
|
543 |
|
544 |
+
/**
|
545 |
+
* This uses the links property of the payment to retrieve the Parent Payment ID from PayPal.
|
546 |
+
*
|
547 |
+
* @since 5.1.10
|
548 |
+
*
|
549 |
+
* @param string $payment The payment event object.
|
550 |
+
*
|
551 |
+
* @return string|false The parent payment ID or false if not found.
|
552 |
+
*/
|
553 |
+
public function get_payment_authorization( $payment ) {
|
554 |
+
$query_args = [];
|
555 |
+
$args = [
|
556 |
+
'headers' => [
|
557 |
+
'PayPal-Partner-Attribution-Id' => Gateway::ATTRIBUTION_ID,
|
558 |
+
'Prefer' => 'return=representation',
|
559 |
+
],
|
560 |
+
];
|
561 |
+
|
562 |
+
if ( ! wp_http_validate_url( $payment ) ) {
|
563 |
+
$payment = urlencode( $payment );
|
564 |
+
$url = '/v2/payments/authorizations/{payment_id}';
|
565 |
+
$url = str_replace( '{payment_id}', $payment, $url );
|
566 |
+
} else {
|
567 |
+
$url = $payment;
|
568 |
+
}
|
569 |
+
|
570 |
+
$response = $this->get( $url, $query_args, $args );
|
571 |
+
|
572 |
+
return $response;
|
573 |
+
}
|
574 |
|
575 |
+
/**
|
576 |
+
* Verify the identity of the Webhook request, to avoid any security problems.
|
577 |
+
*
|
578 |
+
* @link https://developer.paypal.com/docs/api/webhooks/v1/#verify-webhook-signature_post
|
579 |
+
*
|
580 |
+
* @since 5.1.10
|
581 |
+
*
|
582 |
+
* @param string $webhook_id Which webhook id we have currently stored on the database.
|
583 |
+
* @param array $event The Event received by the endpoint from PayPal.
|
584 |
+
* @param array $headers Headers from the PayPal request that we use to verify the signature.
|
585 |
+
*
|
586 |
+
* @return bool
|
587 |
+
*/
|
588 |
+
public function verify_webhook_signature( $webhook_id, $event, $headers ) {
|
589 |
+
$query_args = [];
|
590 |
+
$body = [
|
591 |
+
'transmission_id' => Arr::get( $headers, 'transmission_id' ),
|
592 |
+
'transmission_time' => Arr::get( $headers, 'transmission_time' ),
|
593 |
+
'transmission_sig' => Arr::get( $headers, 'transmission_sig' ),
|
594 |
+
'cert_url' => Arr::get( $headers, 'cert_url' ),
|
595 |
+
'auth_algo' => Arr::get( $headers, 'auth_algo' ),
|
596 |
+
'webhook_id' => $webhook_id,
|
597 |
+
'webhook_event' => $event,
|
598 |
+
];
|
599 |
+
$args = [
|
600 |
+
'headers' => [
|
601 |
+
'PayPal-Partner-Attribution-Id' => Gateway::ATTRIBUTION_ID,
|
602 |
+
],
|
603 |
+
'body' => $body,
|
604 |
+
];
|
605 |
+
|
606 |
+
$url = 'v1/notifications/verify-webhook-signature';
|
607 |
+
$response = $this->post( $url, $query_args, $args );
|
608 |
+
|
609 |
+
return 'SUCCESS' === Arr::get( $response, 'verification_status', false );
|
610 |
+
}
|
611 |
+
|
612 |
+
|
613 |
+
/**
|
614 |
+
* Get the list of webhooks.
|
615 |
+
*
|
616 |
+
* @see https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_list
|
617 |
+
* @since 5.1.10
|
618 |
+
*
|
619 |
+
* @return array[] The list of PayPal webhooks.
|
620 |
+
*/
|
621 |
+
public function list_webhooks() {
|
622 |
+
$query_args = [];
|
623 |
+
$body = [];
|
624 |
+
$args = [
|
625 |
+
'headers' => [
|
626 |
+
'PayPal-Partner-Attribution-Id' => Gateway::ATTRIBUTION_ID,
|
627 |
+
'Prefer' => 'return=representation',
|
628 |
+
],
|
629 |
+
'body' => $body,
|
630 |
+
];
|
631 |
+
|
632 |
+
$url = '/v1/notifications/webhooks';
|
633 |
+
$response = $this->get( $url, $query_args, $args );
|
634 |
+
|
635 |
+
if ( empty( $response['webhooks'] ) ) {
|
636 |
+
return [];
|
637 |
+
}
|
638 |
+
|
639 |
+
return $response['webhooks'];
|
640 |
+
}
|
641 |
+
|
642 |
+
|
643 |
+
/**
|
644 |
+
* Get the webhook data from a specific webhook ID.
|
645 |
+
*
|
646 |
+
* @see https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_get
|
647 |
+
* @since 5.1.10
|
648 |
+
*
|
649 |
+
* @param string $webhook_id The webhook ID.
|
650 |
+
*
|
651 |
+
* @return array|null The PayPal webhook data.
|
652 |
+
*/
|
653 |
+
public function get_webhook( $webhook_id ) {
|
654 |
+
$query_args = [];
|
655 |
+
$body = [];
|
656 |
+
$args = [
|
657 |
+
'headers' => [
|
658 |
+
'PayPal-Partner-Attribution-Id' => Gateway::ATTRIBUTION_ID,
|
659 |
+
],
|
660 |
+
'body' => $body,
|
661 |
+
];
|
662 |
+
|
663 |
+
$webhook_id = urlencode( $webhook_id );
|
664 |
+
$url = '/v1/notifications/webhooks/{webhook_id}';
|
665 |
+
$url = str_replace( '{webhook_id}', $webhook_id, $url );
|
666 |
+
$response = $this->get( $url, $query_args, $args );
|
667 |
+
|
668 |
+
if ( ! isset( $response['id'], $response['name'] ) ) {
|
669 |
+
$error = @json_decode( $response['body'], true );
|
670 |
+
|
671 |
+
if ( 'INVALID_RESOURCE_ID' === $error['name'] ) {
|
672 |
+
// The webhook was not found.
|
673 |
+
tribe( 'logger' )->log_warning( __( 'The PayPal webhook does not exist', 'event-tickets' ), 'tickets-commerce-gateway-paypal' );
|
674 |
+
} else {
|
675 |
+
// Other unexpected response.
|
676 |
+
tribe( 'logger' )->log_warning( __( 'Unexpected PayPal response when getting webhook', 'event-tickets' ), 'tickets-commerce-gateway-paypal' );
|
677 |
+
}
|
678 |
+
|
679 |
+
return null;
|
680 |
+
}
|
681 |
+
|
682 |
+
return $response;
|
683 |
+
}
|
684 |
+
|
685 |
+
|
686 |
+
/**
|
687 |
+
* Creates a webhook with the given event types registered.
|
688 |
+
*
|
689 |
+
* @see https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_post
|
690 |
+
* @since 5.1.10
|
691 |
+
*
|
692 |
+
* @return array|\WP_Error
|
693 |
+
*/
|
694 |
+
public function create_webhook() {
|
695 |
+
$events = tribe( Events::class )->get_registered_events();
|
696 |
+
$webhook_url = tribe( Webhook_Endpoint::class )->get_route_url();
|
697 |
+
|
698 |
+
$query_args = [];
|
699 |
+
$body = [
|
700 |
+
'url' => $webhook_url,
|
701 |
+
'event_types' => array_map(
|
702 |
+
static function ( $event_type ) {
|
703 |
+
return [
|
704 |
+
'name' => $event_type,
|
705 |
+
];
|
706 |
+
},
|
707 |
+
$events
|
708 |
+
),
|
709 |
+
];
|
710 |
+
$args = [
|
711 |
+
'headers' => [
|
712 |
+
'PayPal-Partner-Attribution-Id' => Gateway::ATTRIBUTION_ID,
|
713 |
+
],
|
714 |
+
'body' => $body,
|
715 |
+
];
|
716 |
+
|
717 |
+
$url = '/v1/notifications/webhooks';
|
718 |
+
$response = $this->post( $url, $query_args, $args );
|
719 |
+
|
720 |
+
if ( ! $response || empty( $response['id'] ) ) {
|
721 |
+
$error = @json_decode( $response['body'], true );
|
722 |
+
if ( empty( $error['name'] ) ) {
|
723 |
+
tribe( 'logger' )->log_error( __( 'Unexpected PayPal response when creating webhook', 'event-tickets' ), 'tickets-commerce-gateway-paypal' );
|
724 |
+
|
725 |
+
return new \WP_Error( 'tec-tickets-commerce-gateway-paypal-webhook-unexpected', null, $response );
|
726 |
+
}
|
727 |
+
|
728 |
+
if ( 'WEBHOOK_URL_ALREADY_EXISTS' === $error['name'] ) {
|
729 |
+
return new \WP_Error( 'tec-tickets-commerce-gateway-paypal-webhook-url-already-exists', null, $response );
|
730 |
+
}
|
731 |
+
|
732 |
+
if ( 'WEBHOOK_NUMBER_LIMIT_EXCEEDED' === $error['name'] ) {
|
733 |
+
// Limit has been reached, we cannot just delete all webhooks without permission.
|
734 |
+
tribe( 'logger' )->log_error( __( 'PayPal webhook limit has been reached, you need to go into your developer.paypal.com account and remove webhooks from the associated account', 'event-tickets' ), 'tickets-commerce-gateway-paypal' );
|
735 |
+
|
736 |
+
return new \WP_Error( 'tec-tickets-commerce-gateway-paypal-webhook-limit-exceeded', null, $response );
|
737 |
+
}
|
738 |
+
}
|
739 |
+
|
740 |
+
return $response;
|
741 |
+
}
|
742 |
+
|
743 |
+
/**
|
744 |
+
* Updates the webhook url and events
|
745 |
+
*
|
746 |
+
* @since 5.1.10
|
747 |
+
*
|
748 |
+
* @param string $webhook_id
|
749 |
+
*
|
750 |
+
* @return array|\WP_Error
|
751 |
+
*/
|
752 |
+
public function update_webhook( $webhook_id ) {
|
753 |
+
$events = tribe( Events::class )->get_registered_events();
|
754 |
+
$webhook_url = tribe( Webhook_Endpoint::class )->get_route_url();
|
755 |
+
|
756 |
+
$query_args = [];
|
757 |
+
$body = [
|
758 |
+
[
|
759 |
+
'op' => 'replace',
|
760 |
+
'path' => '/url',
|
761 |
+
'value' => $webhook_url,
|
762 |
+
],
|
763 |
+
[
|
764 |
+
'op' => 'replace',
|
765 |
+
'path' => '/event_types',
|
766 |
+
'value' => array_map(
|
767 |
+
static function ( $event_type ) {
|
768 |
+
return [
|
769 |
+
'name' => $event_type,
|
770 |
+
];
|
771 |
+
},
|
772 |
+
$events
|
773 |
+
),
|
774 |
+
],
|
775 |
+
];
|
776 |
+
$args = [
|
777 |
+
'headers' => [
|
778 |
+
'PayPal-Partner-Attribution-Id' => Gateway::ATTRIBUTION_ID,
|
779 |
+
],
|
780 |
+
'body' => $body,
|
781 |
+
];
|
782 |
+
|
783 |
+
$webhook_id = urlencode( $webhook_id );
|
784 |
+
$url = '/v1/notifications/webhooks/{webhook_id}';
|
785 |
+
$url = str_replace( '{webhook_id}', $webhook_id, $url );
|
786 |
+
$response = $this->patch( $url, $query_args, $args );
|
787 |
+
|
788 |
+
if ( ! $response || empty( $response['id'] ) ) {
|
789 |
+
$error = @json_decode( $response['body'], true );
|
790 |
+
if ( empty( $error['name'] ) ) {
|
791 |
+
tribe( 'logger' )->log_error( __( 'Unexpected PayPal response when updating webhook', 'event-tickets' ), 'tickets-commerce-gateway-paypal' );
|
792 |
+
|
793 |
+
return new \WP_Error( 'tec-tickets-commerce-gateway-paypal-webhook-update-unexpected' );
|
794 |
+
}
|
795 |
+
|
796 |
+
if ( 'INVALID_RESOURCE_ID' === $error['name'] ) {
|
797 |
+
return new \WP_Error( 'tec-tickets-commerce-gateway-paypal-webhook-update-invalid-id' );
|
798 |
+
}
|
799 |
+
}
|
800 |
+
|
801 |
+
return $response;
|
802 |
+
}
|
803 |
+
|
804 |
+
/**
|
805 |
+
* Deletes the webhook with the given id.
|
806 |
+
*
|
807 |
+
* @since 5.1.10
|
808 |
+
*
|
809 |
+
* @param string $webhook_id
|
810 |
+
*
|
811 |
+
* @return bool|\WP_Error Whether or not the deletion was successful
|
812 |
+
*/
|
813 |
+
public function delete_webhook( $webhook_id ) {
|
814 |
+
$query_args = [];
|
815 |
+
$args = [
|
816 |
+
'headers' => [
|
817 |
+
'PayPal-Partner-Attribution-Id' => Gateway::ATTRIBUTION_ID,
|
818 |
+
],
|
819 |
+
];
|
820 |
+
|
821 |
+
$webhook_id = urlencode( $webhook_id );
|
822 |
+
$url = '/v1/notifications/webhooks/{webhook_id}';
|
823 |
+
$url = str_replace( '{webhook_id}', $webhook_id, $url );
|
824 |
+
$response = $this->delete( $url, $query_args, $args, true );
|
825 |
+
|
826 |
+
if ( is_wp_error( $response ) ) {
|
827 |
+
return $response;
|
828 |
+
}
|
829 |
+
|
830 |
+
return 204 === wp_remote_retrieve_response_code( $response );
|
831 |
+
}
|
832 |
}
|
src/Tickets/Commerce/Gateways/PayPal/Gateway.php
CHANGED
@@ -52,7 +52,7 @@ class Gateway extends Abstract_Gateway {
|
|
52 |
return false;
|
53 |
}
|
54 |
|
55 |
-
return tribe( Merchant::class )->
|
56 |
}
|
57 |
|
58 |
/**
|
@@ -74,6 +74,6 @@ class Gateway extends Abstract_Gateway {
|
|
74 |
* @return bool Whether Tickets Commerce is in test mode.
|
75 |
*/
|
76 |
public static function is_test_mode() {
|
77 |
-
return tribe_is_truthy( tribe_get_option(
|
78 |
}
|
79 |
}
|
52 |
return false;
|
53 |
}
|
54 |
|
55 |
+
return tribe( Merchant::class )->is_active();
|
56 |
}
|
57 |
|
58 |
/**
|
74 |
* @return bool Whether Tickets Commerce is in test mode.
|
75 |
*/
|
76 |
public static function is_test_mode() {
|
77 |
+
return tribe_is_truthy( tribe_get_option( \TEC\Tickets\Commerce\Settings::$option_sandbox ) );
|
78 |
}
|
79 |
}
|
src/Tickets/Commerce/Gateways/PayPal/Hooks.php
CHANGED
@@ -50,6 +50,7 @@ class Hooks extends \tad_DI52_ServiceProvider {
|
|
50 |
add_action( 'tec_tickets_commerce_admin_process_action:paypal-disconnect', [ $this, 'handle_action_disconnect' ] );
|
51 |
add_action( 'tec_tickets_commerce_admin_process_action:paypal-refresh-access-token', [ $this, 'handle_action_refresh_token' ] );
|
52 |
add_action( 'tec_tickets_commerce_admin_process_action:paypal-refresh-user-info', [ $this, 'handle_action_refresh_user_info' ] );
|
|
|
53 |
|
54 |
add_action( 'tribe_template_before_include:tickets/v2/commerce/checkout/header', [ $this, 'include_client_js_sdk_script' ], 15, 3 );
|
55 |
add_action( 'tribe_template_after_include:tickets/v2/commerce/checkout/footer', [ $this, 'include_payment_buttons' ], 15, 3 );
|
@@ -167,6 +168,17 @@ class Hooks extends \tad_DI52_ServiceProvider {
|
|
167 |
$saved = $merchant->save_user_info( $user_info );
|
168 |
}
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
/**
|
171 |
* Register the Endpoints from Paypal.
|
172 |
*
|
50 |
add_action( 'tec_tickets_commerce_admin_process_action:paypal-disconnect', [ $this, 'handle_action_disconnect' ] );
|
51 |
add_action( 'tec_tickets_commerce_admin_process_action:paypal-refresh-access-token', [ $this, 'handle_action_refresh_token' ] );
|
52 |
add_action( 'tec_tickets_commerce_admin_process_action:paypal-refresh-user-info', [ $this, 'handle_action_refresh_user_info' ] );
|
53 |
+
add_action( 'tec_tickets_commerce_admin_process_action:paypal-refresh-webhook', [ $this, 'handle_action_refresh_webhook' ] );
|
54 |
|
55 |
add_action( 'tribe_template_before_include:tickets/v2/commerce/checkout/header', [ $this, 'include_client_js_sdk_script' ], 15, 3 );
|
56 |
add_action( 'tribe_template_after_include:tickets/v2/commerce/checkout/footer', [ $this, 'include_payment_buttons' ], 15, 3 );
|
168 |
$saved = $merchant->save_user_info( $user_info );
|
169 |
}
|
170 |
|
171 |
+
/**
|
172 |
+
* Handles the refreshing of the webhook on PayPal for this site/merchant.
|
173 |
+
*
|
174 |
+
* @todo Display some message when refreshing user info.
|
175 |
+
* @since 5.1.10
|
176 |
+
*
|
177 |
+
*/
|
178 |
+
public function handle_action_refresh_webhook() {
|
179 |
+
$updated = $this->container->make( Webhooks::class )->create_or_update_existing();
|
180 |
+
}
|
181 |
+
|
182 |
/**
|
183 |
* Register the Endpoints from Paypal.
|
184 |
*
|
src/Tickets/Commerce/Gateways/PayPal/Models/PayPal_Order.php
DELETED
@@ -1,166 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Models;
|
4 |
-
|
5 |
-
use InvalidArgumentException;
|
6 |
-
use stdClass;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class Order
|
10 |
-
*
|
11 |
-
* @since 5.1.6
|
12 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Models
|
13 |
-
*
|
14 |
-
*/
|
15 |
-
class PayPal_Order {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Order Id.
|
19 |
-
*
|
20 |
-
* @since 5.1.6
|
21 |
-
*
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
public $id;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Order intent.
|
28 |
-
*
|
29 |
-
* @since 5.1.6
|
30 |
-
*
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
public $intent;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Order status.
|
37 |
-
*
|
38 |
-
* @since 5.1.6
|
39 |
-
*
|
40 |
-
* @var string
|
41 |
-
*/
|
42 |
-
public $status;
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Order creation time.
|
46 |
-
*
|
47 |
-
* @since 5.1.6
|
48 |
-
*
|
49 |
-
* @var string
|
50 |
-
*/
|
51 |
-
public $create_time;
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Order update time.
|
55 |
-
*
|
56 |
-
* @since 5.1.6
|
57 |
-
*
|
58 |
-
* @var string
|
59 |
-
*/
|
60 |
-
public $update_time;
|
61 |
-
|
62 |
-
/**
|
63 |
-
* PayPal Order action links.
|
64 |
-
*
|
65 |
-
* @since 5.1.6
|
66 |
-
*
|
67 |
-
* @var string
|
68 |
-
*/
|
69 |
-
public $links;
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Payer information.
|
73 |
-
*
|
74 |
-
* @since 5.1.6
|
75 |
-
*
|
76 |
-
* @var stdClass
|
77 |
-
*/
|
78 |
-
public $payer;
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Order purchase unit details.
|
82 |
-
*
|
83 |
-
* @since 5.1.6
|
84 |
-
*
|
85 |
-
* @var stdClass
|
86 |
-
*/
|
87 |
-
private $purchase_unit;
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Payment details for order.
|
91 |
-
*
|
92 |
-
* @since 5.1.6
|
93 |
-
*
|
94 |
-
* @var PayPal_Payment
|
95 |
-
*/
|
96 |
-
public $payment;
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Create PayPalOrder object from given array.
|
100 |
-
*
|
101 |
-
* @since 5.1.6
|
102 |
-
*
|
103 |
-
* @param $array
|
104 |
-
*
|
105 |
-
* @return PayPal_Order
|
106 |
-
*/
|
107 |
-
public static function from_array( $array ) {
|
108 |
-
/* @var PayPal_Order $order */
|
109 |
-
$order = tribe( __CLASS__ );
|
110 |
-
|
111 |
-
$order->validate( $array );
|
112 |
-
|
113 |
-
foreach ( $array as $item_name => $value ) {
|
114 |
-
if ( 'purchase_units' === $item_name ) {
|
115 |
-
$value = current( $value );
|
116 |
-
|
117 |
-
$order->purchase_unit = $value;
|
118 |
-
$order->payment = PayPal_Payment::from_array( (array) current( $order->purchase_unit->payments->captures ) );
|
119 |
-
|
120 |
-
continue;
|
121 |
-
}
|
122 |
-
|
123 |
-
$order->{$item_name} = $value;
|
124 |
-
}
|
125 |
-
|
126 |
-
return $order;
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Validate order given in array format.
|
131 |
-
*
|
132 |
-
* @since 5.1.6
|
133 |
-
*
|
134 |
-
* @throws InvalidArgumentException
|
135 |
-
*
|
136 |
-
* @param array $array
|
137 |
-
*
|
138 |
-
*/
|
139 |
-
private function validate( $array ) {
|
140 |
-
$required = [
|
141 |
-
'id',
|
142 |
-
'intent',
|
143 |
-
'purchase_units',
|
144 |
-
'create_time',
|
145 |
-
'update_time',
|
146 |
-
'links',
|
147 |
-
];
|
148 |
-
|
149 |
-
// PayPal does not send following parameter in Order (completed with advanced card fields payment method) details.
|
150 |
-
if ( ! isset( $array['payment_source'] ) ) {
|
151 |
-
$required = array_merge( $required, [ 'payer', 'status' ] );
|
152 |
-
}
|
153 |
-
|
154 |
-
// Remove empty values.
|
155 |
-
$array = array_filter( $array );
|
156 |
-
|
157 |
-
if ( array_diff( $required, array_keys( $array ) ) ) {
|
158 |
-
throw new InvalidArgumentException(
|
159 |
-
sprintf(
|
160 |
-
esc_html__( 'To create a PayPalOrder object, please provide valid %1$s', 'event-tickets' ),
|
161 |
-
implode( ', ', $required )
|
162 |
-
)
|
163 |
-
);
|
164 |
-
}
|
165 |
-
}
|
166 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Models/PayPal_Payment.php
DELETED
@@ -1,116 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Models;
|
4 |
-
|
5 |
-
use InvalidArgumentException;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Class PayPal_Payment
|
9 |
-
*
|
10 |
-
* @since 5.1.6
|
11 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Models
|
12 |
-
*
|
13 |
-
*/
|
14 |
-
class PayPal_Payment {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Payment Id.
|
18 |
-
*
|
19 |
-
* @since 5.1.6
|
20 |
-
*
|
21 |
-
* @var string
|
22 |
-
*/
|
23 |
-
public $id;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Payment Amount.
|
27 |
-
*
|
28 |
-
* @since 5.1.6
|
29 |
-
*
|
30 |
-
* @var string
|
31 |
-
*/
|
32 |
-
public $amount;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Payment status.
|
36 |
-
*
|
37 |
-
* @since 5.1.6
|
38 |
-
*
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
public $status;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Payment creation time.
|
45 |
-
*
|
46 |
-
* @since 5.1.6
|
47 |
-
*
|
48 |
-
* @var string
|
49 |
-
*/
|
50 |
-
public $create_time;
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Payment update time.
|
54 |
-
*
|
55 |
-
* @since 5.1.6
|
56 |
-
*
|
57 |
-
* @var string
|
58 |
-
*/
|
59 |
-
public $update_time;
|
60 |
-
|
61 |
-
/**
|
62 |
-
* PayPal Payment action links.
|
63 |
-
*
|
64 |
-
* @since 5.1.6
|
65 |
-
*
|
66 |
-
* @var string
|
67 |
-
*/
|
68 |
-
public $links;
|
69 |
-
|
70 |
-
/**
|
71 |
-
*
|
72 |
-
*/
|
73 |
-
/**
|
74 |
-
* Create PayPalPayment object from given array.
|
75 |
-
*
|
76 |
-
* @since 5.1.6
|
77 |
-
*
|
78 |
-
* @param $array
|
79 |
-
*
|
80 |
-
* @return PayPal_Payment
|
81 |
-
*/
|
82 |
-
public static function from_array( $array ) {
|
83 |
-
/* @var PayPal_Payment $payment */
|
84 |
-
$payment = tribe( __CLASS__ );
|
85 |
-
|
86 |
-
$payment->validate( $array );
|
87 |
-
|
88 |
-
// @todo Replace this with a new method somewhere else.
|
89 |
-
$array = ArrayDataSet::camelCaseKeys( $array );
|
90 |
-
|
91 |
-
foreach ( $array as $item_name => $value ) {
|
92 |
-
$payment->{$item_name} = $value;
|
93 |
-
}
|
94 |
-
|
95 |
-
return $payment;
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Validate order given in array format.
|
100 |
-
*
|
101 |
-
* @since 5.1.6
|
102 |
-
*
|
103 |
-
* @throws InvalidArgumentException
|
104 |
-
*
|
105 |
-
* @param array $array
|
106 |
-
*
|
107 |
-
*/
|
108 |
-
private function validate( $array ) {
|
109 |
-
$required = [ 'id', 'amount', 'status', 'create_time', 'update_time', 'links' ];
|
110 |
-
$array = array_filter( $array ); // Remove empty values.
|
111 |
-
|
112 |
-
if ( array_diff( $required, array_keys( $array ) ) ) {
|
113 |
-
throw new InvalidArgumentException( __( 'To create a PayPalPayment object, please provide valid id, amount, status, create_time, update_time and links', 'event-tickets' ) );
|
114 |
-
}
|
115 |
-
}
|
116 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Models/Webhook_Config.php
DELETED
@@ -1,77 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Models;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class Webhook_Config.
|
7 |
-
*
|
8 |
-
* @since 5.1.6
|
9 |
-
*
|
10 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Models
|
11 |
-
*/
|
12 |
-
class Webhook_Config {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* @since 5.1.6
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
public $id;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @since 5.1.6
|
23 |
-
*
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
-
public $return_url;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @since 5.1.6
|
30 |
-
*
|
31 |
-
* @var string[]
|
32 |
-
*/
|
33 |
-
public $events;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Webhook_Config constructor.
|
37 |
-
*
|
38 |
-
* @since 5.1.6
|
39 |
-
*
|
40 |
-
* @param string $id
|
41 |
-
* @param string $return_url
|
42 |
-
* @param string[] $events
|
43 |
-
*/
|
44 |
-
public function __construct( $id, $return_url, $events ) {
|
45 |
-
$this->id = $id;
|
46 |
-
$this->return_url = $return_url;
|
47 |
-
$this->events = $events;
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Generates an instance from serialized data
|
52 |
-
*
|
53 |
-
* @since 5.1.6
|
54 |
-
*
|
55 |
-
* @param array $data
|
56 |
-
*
|
57 |
-
* @return Webhook_Config
|
58 |
-
*/
|
59 |
-
public static function from_array( array $data ) {
|
60 |
-
return new self( $data['id'], $data['return_url'], $data['events'] );
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Generates an array for serialization
|
65 |
-
*
|
66 |
-
* @since 5.1.6
|
67 |
-
*
|
68 |
-
* @return array
|
69 |
-
*/
|
70 |
-
public function to_array() {
|
71 |
-
return [
|
72 |
-
'id' => $this->id,
|
73 |
-
'return_url' => $this->return_url,
|
74 |
-
'events' => $this->events,
|
75 |
-
];
|
76 |
-
}
|
77 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/On_Boarding_Redirect_Handler.php
CHANGED
@@ -16,6 +16,32 @@ use Tribe__Settings;
|
|
16 |
*
|
17 |
*/
|
18 |
class On_Boarding_Redirect_Handler {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
/**
|
20 |
* Sets up the webhook for the connected account
|
21 |
*
|
@@ -31,7 +57,7 @@ class On_Boarding_Redirect_Handler {
|
|
31 |
|
32 |
$this->webhooks_repository->save_webhook_config( $webhook_config );
|
33 |
} catch ( Exception $ex ) {
|
34 |
-
tribe( 'logger' )->log_error( $ex->getMessage(), 'tickets-commerce-paypal
|
35 |
|
36 |
$errors = [];
|
37 |
|
@@ -40,7 +66,7 @@ class On_Boarding_Redirect_Handler {
|
|
40 |
// Log error messages.
|
41 |
array_map( static function ( $error_message ) {
|
42 |
$error_message = is_array( $error_message ) ? $error_message['message'] . ' ' . $error_message['value'] : $error_message;
|
43 |
-
tribe( 'logger' )->log_error( $error_message, 'tickets-commerce-paypal
|
44 |
}, $errors );
|
45 |
|
46 |
$this->merchant->save_account_errors( $errors );
|
@@ -80,7 +106,7 @@ class On_Boarding_Redirect_Handler {
|
|
80 |
// Log error messages.
|
81 |
array_map( static function ( $error_message ) {
|
82 |
$error_message = is_array( $error_message ) ? $error_message['message'] . ' ' . $error_message['value'] : $error_message;
|
83 |
-
tribe( 'logger' )->log_error( $error_message, 'tickets-commerce-paypal
|
84 |
}, $errors );
|
85 |
|
86 |
$this->merchant->save_account_errors( $errors );
|
@@ -119,7 +145,7 @@ class On_Boarding_Redirect_Handler {
|
|
119 |
// Log error messages.
|
120 |
array_map( static function ( $error_message ) {
|
121 |
$error_message = is_array( $error_message ) ? $error_message['message'] . ' ' . $error_message['value'] : $error_message;
|
122 |
-
tribe( 'logger' )->log_error( $error_message, 'tickets-commerce-paypal
|
123 |
}, $error_messages );
|
124 |
|
125 |
// Return here since the rest of the validations will definitely fail
|
16 |
*
|
17 |
*/
|
18 |
class On_Boarding_Redirect_Handler {
|
19 |
+
/**
|
20 |
+
* Return on boarding trouble notice.
|
21 |
+
*
|
22 |
+
* @TODO this method needs to be completely refactored into an admin page action.
|
23 |
+
*
|
24 |
+
* @since 5.1.6
|
25 |
+
*/
|
26 |
+
public function on_boarding_trouble_notice() {
|
27 |
+
|
28 |
+
$action_list = sprintf(
|
29 |
+
'<ol><li>%1$s</li><li>%2$s</li><li>%3$s %4$s</li></ol>',
|
30 |
+
esc_html__( 'Make sure to complete the entire PayPal process. Do not close the window you have finished the process.', 'event-tickets' ),
|
31 |
+
esc_html__( 'The last screen of the PayPal connect process includes a button to be sent back to your site. It is important you click this and do not close the window yourself.', 'event-tickets' ),
|
32 |
+
esc_html__( 'If you’re still having problems connecting:', 'event-tickets' ),
|
33 |
+
$this->settings->get_guidance_html()
|
34 |
+
);
|
35 |
+
|
36 |
+
$standard_error = sprintf(
|
37 |
+
'<div id="give-paypal-onboarding-trouble-notice" class="tribe-common-a11y-hidden"><p class="error-message">%1$s</p><p>%2$s</p></div>',
|
38 |
+
esc_html__( 'Having trouble connecting to PayPal?', 'event-tickets' ),
|
39 |
+
$action_list
|
40 |
+
);
|
41 |
+
|
42 |
+
wp_send_json_success( $standard_error );
|
43 |
+
}
|
44 |
+
|
45 |
/**
|
46 |
* Sets up the webhook for the connected account
|
47 |
*
|
57 |
|
58 |
$this->webhooks_repository->save_webhook_config( $webhook_config );
|
59 |
} catch ( Exception $ex ) {
|
60 |
+
tribe( 'logger' )->log_error( $ex->getMessage(), 'tickets-commerce-gateway-paypal' );
|
61 |
|
62 |
$errors = [];
|
63 |
|
66 |
// Log error messages.
|
67 |
array_map( static function ( $error_message ) {
|
68 |
$error_message = is_array( $error_message ) ? $error_message['message'] . ' ' . $error_message['value'] : $error_message;
|
69 |
+
tribe( 'logger' )->log_error( $error_message, 'tickets-commerce-gateway-paypal' );
|
70 |
}, $errors );
|
71 |
|
72 |
$this->merchant->save_account_errors( $errors );
|
106 |
// Log error messages.
|
107 |
array_map( static function ( $error_message ) {
|
108 |
$error_message = is_array( $error_message ) ? $error_message['message'] . ' ' . $error_message['value'] : $error_message;
|
109 |
+
tribe( 'logger' )->log_error( $error_message, 'tickets-commerce-gateway-paypal' );
|
110 |
}, $errors );
|
111 |
|
112 |
$this->merchant->save_account_errors( $errors );
|
145 |
// Log error messages.
|
146 |
array_map( static function ( $error_message ) {
|
147 |
$error_message = is_array( $error_message ) ? $error_message['message'] . ' ' . $error_message['value'] : $error_message;
|
148 |
+
tribe( 'logger' )->log_error( $error_message, 'tickets-commerce-gateway-paypal' );
|
149 |
}, $error_messages );
|
150 |
|
151 |
// Return here since the rest of the validations will definitely fail
|
src/Tickets/Commerce/Gateways/PayPal/Provider.php
CHANGED
@@ -27,24 +27,15 @@ class Provider extends \tad_DI52_ServiceProvider {
|
|
27 |
|
28 |
$this->container->singleton( Merchant::class, Merchant::class, [ 'init' ] );
|
29 |
|
30 |
-
$this->container->singleton( Ajax_Request_Handler::class );
|
31 |
$this->container->singleton( On_Boarding_Redirect_Handler::class );
|
32 |
$this->container->singleton( Refresh_Token::class );
|
33 |
$this->container->singleton( Client::class );
|
34 |
$this->container->singleton( Signup::class );
|
35 |
$this->container->singleton( Status::class );
|
36 |
|
37 |
-
$this->container->singleton(
|
38 |
-
$this->container->singleton(
|
39 |
-
$this->container->singleton(
|
40 |
-
|
41 |
-
$this->container->singleton( Webhooks\Webhook_Register::class );
|
42 |
-
$this->container->singleton( Webhooks\Webhooks_Route::class );
|
43 |
-
|
44 |
-
$this->container->singleton( Webhooks\Listeners\Payment_Capture_Completed::class );
|
45 |
-
$this->container->singleton( Webhooks\Listeners\Payment_Capture_Denied::class );
|
46 |
-
$this->container->singleton( Webhooks\Listeners\Payment_Capture_Refunded::class );
|
47 |
-
$this->container->singleton( Webhooks\Listeners\Payment_Capture_Reversed::class );
|
48 |
|
49 |
$this->register_endpoints();
|
50 |
}
|
27 |
|
28 |
$this->container->singleton( Merchant::class, Merchant::class, [ 'init' ] );
|
29 |
|
|
|
30 |
$this->container->singleton( On_Boarding_Redirect_Handler::class );
|
31 |
$this->container->singleton( Refresh_Token::class );
|
32 |
$this->container->singleton( Client::class );
|
33 |
$this->container->singleton( Signup::class );
|
34 |
$this->container->singleton( Status::class );
|
35 |
|
36 |
+
$this->container->singleton( Webhooks::class );
|
37 |
+
$this->container->singleton( Webhooks\Events::class );
|
38 |
+
$this->container->singleton( Webhooks\Handler::class );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
$this->register_endpoints();
|
41 |
}
|
src/Tickets/Commerce/Gateways/PayPal/REST/On_Boarding_Endpoint.php
CHANGED
@@ -7,6 +7,7 @@ use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
|
7 |
use TEC\Tickets\Commerce\Gateways\PayPal\Refresh_Token;
|
8 |
|
9 |
use TEC\Tickets\Commerce\Gateways\PayPal\Signup;
|
|
|
10 |
use TEC\Tickets\Commerce\Gateways\PayPal\WhoDat;
|
11 |
use Tribe__Documentation__Swagger__Provider_Interface;
|
12 |
use Tribe__Settings;
|
@@ -218,6 +219,9 @@ class On_Boarding_Endpoint implements Tribe__Documentation__Swagger__Provider_In
|
|
218 |
$user_info = $client->get_user_info();
|
219 |
$merchant->save_user_info( $user_info );
|
220 |
|
|
|
|
|
|
|
221 |
/**
|
222 |
* @todo Need to figure out where this gets saved in the merchant API.
|
223 |
*/
|
7 |
use TEC\Tickets\Commerce\Gateways\PayPal\Refresh_Token;
|
8 |
|
9 |
use TEC\Tickets\Commerce\Gateways\PayPal\Signup;
|
10 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
11 |
use TEC\Tickets\Commerce\Gateways\PayPal\WhoDat;
|
12 |
use Tribe__Documentation__Swagger__Provider_Interface;
|
13 |
use Tribe__Settings;
|
219 |
$user_info = $client->get_user_info();
|
220 |
$merchant->save_user_info( $user_info );
|
221 |
|
222 |
+
// Configures the Webhooks when setting up the new merchant.
|
223 |
+
tribe( Webhooks::class )->create_or_update_existing();
|
224 |
+
|
225 |
/**
|
226 |
* @todo Need to figure out where this gets saved in the merchant API.
|
227 |
*/
|
src/Tickets/Commerce/Gateways/PayPal/REST/Order_Endpoint.php
CHANGED
@@ -168,6 +168,7 @@ class Order_Endpoint implements Tribe__Documentation__Swagger__Provider_Interfac
|
|
168 |
];
|
169 |
|
170 |
$paypal_order_id = $request->get_param( 'order_id' );
|
|
|
171 |
$order = tec_tc_orders()->by_args( [
|
172 |
'status' => tribe( Pending::class )->get_wp_slug(),
|
173 |
'gateway_order_id' => $paypal_order_id,
|
@@ -177,7 +178,8 @@ class Order_Endpoint implements Tribe__Documentation__Swagger__Provider_Interfac
|
|
177 |
return new WP_Error( 'tec-tc-gateway-paypal-nonexistent-order-id', null, $order );
|
178 |
}
|
179 |
|
180 |
-
$
|
|
|
181 |
|
182 |
if ( ! $paypal_capture_response ) {
|
183 |
return new WP_Error( 'tec-tc-gateway-paypal-failed-capture', null, $paypal_capture_response );
|
168 |
];
|
169 |
|
170 |
$paypal_order_id = $request->get_param( 'order_id' );
|
171 |
+
|
172 |
$order = tec_tc_orders()->by_args( [
|
173 |
'status' => tribe( Pending::class )->get_wp_slug(),
|
174 |
'gateway_order_id' => $paypal_order_id,
|
178 |
return new WP_Error( 'tec-tc-gateway-paypal-nonexistent-order-id', null, $order );
|
179 |
}
|
180 |
|
181 |
+
$payer_id = $request->get_param( 'payer_id' );
|
182 |
+
$paypal_capture_response = tribe( Client::class )->capture_order( $paypal_order_id, $payer_id );
|
183 |
|
184 |
if ( ! $paypal_capture_response ) {
|
185 |
return new WP_Error( 'tec-tc-gateway-paypal-failed-capture', null, $paypal_capture_response );
|
src/Tickets/Commerce/Gateways/PayPal/REST/Webhook_Endpoint.php
CHANGED
@@ -2,26 +2,28 @@
|
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
4 |
|
|
|
|
|
5 |
use TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
|
|
|
|
6 |
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners\Payment_Capture_Completed;
|
7 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\
|
8 |
use Tribe__Documentation__Swagger__Provider_Interface;
|
9 |
use Tribe__REST__Endpoints__CREATE_Endpoint_Interface;
|
10 |
use Tribe__Tickets__REST__V1__Endpoints__Base;
|
11 |
use WP_Error;
|
12 |
use WP_REST_Request;
|
13 |
use WP_REST_Response;
|
|
|
14 |
|
15 |
/**
|
16 |
-
* Class Webhook.
|
17 |
*
|
18 |
* @since 5.1.6
|
19 |
-
* @package
|
20 |
*/
|
21 |
-
class Webhook_Endpoint
|
22 |
-
extends Tribe__Tickets__REST__V1__Endpoints__Base
|
23 |
-
implements Tribe__REST__Endpoints__CREATE_Endpoint_Interface,
|
24 |
-
Tribe__Documentation__Swagger__Provider_Interface {
|
25 |
|
26 |
/**
|
27 |
* The REST API endpoint path.
|
@@ -30,7 +32,30 @@ class Webhook_Endpoint
|
|
30 |
*
|
31 |
* @var string
|
32 |
*/
|
33 |
-
protected $path = '/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
/**
|
36 |
* Gets the Endpoint path for the on boarding process.
|
@@ -51,9 +76,129 @@ class Webhook_Endpoint
|
|
51 |
* @return string The REST API route URL.
|
52 |
*/
|
53 |
public function get_route_url() {
|
54 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
|
59 |
/**
|
@@ -99,67 +244,4 @@ class Webhook_Endpoint
|
|
99 |
],
|
100 |
];
|
101 |
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* {@inheritDoc}
|
105 |
-
*
|
106 |
-
* @todo WIP -- Still using pieces from Give.
|
107 |
-
*
|
108 |
-
* @since 5.1.6
|
109 |
-
*
|
110 |
-
* @param WP_REST_Request $request The request object.
|
111 |
-
* @param bool $return_id Whether the created post ID should be returned or the full response object.
|
112 |
-
*
|
113 |
-
* @return WP_Error|WP_REST_Response|int An array containing the data on success or a WP_Error instance on failure.
|
114 |
-
*/
|
115 |
-
public function create( WP_REST_Request $request, $return_id = false ) {
|
116 |
-
$event = $request->get_body();
|
117 |
-
$headers = $request->get_headers();
|
118 |
-
|
119 |
-
/** @var Webhooks_Route $webhook */
|
120 |
-
$webhook = tribe( Webhooks_Route::class );
|
121 |
-
|
122 |
-
try {
|
123 |
-
$processed = $webhook->handle( $event, $headers );
|
124 |
-
} catch ( \Exception $exception ) {
|
125 |
-
$processed = false;
|
126 |
-
}
|
127 |
-
|
128 |
-
if ( ! $processed ) {
|
129 |
-
$error = 'webhook-not-processed';
|
130 |
-
$message = $this->messages->get_message( $error );
|
131 |
-
|
132 |
-
return new WP_Error( $error, $message, [ 'status' => 403 ] );
|
133 |
-
}
|
134 |
-
|
135 |
-
$data = [
|
136 |
-
'success' => true,
|
137 |
-
];
|
138 |
-
|
139 |
-
return new WP_REST_Response( $data );
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* {@inheritDoc}
|
144 |
-
*
|
145 |
-
* @since 5.1.6
|
146 |
-
*
|
147 |
-
* @return array
|
148 |
-
*/
|
149 |
-
public function CREATE_args() {
|
150 |
-
// Webhooks do not send any arguments, only JSON content.
|
151 |
-
return [];
|
152 |
-
}
|
153 |
-
|
154 |
-
/**
|
155 |
-
* {@inheritDoc}
|
156 |
-
*
|
157 |
-
* @since 5.1.6
|
158 |
-
*
|
159 |
-
* @return bool Whether the current user can post or not.
|
160 |
-
*/
|
161 |
-
public function can_create() {
|
162 |
-
// Always open, no further user-based validation.
|
163 |
-
return true;
|
164 |
-
}
|
165 |
}
|
2 |
|
3 |
namespace TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
4 |
|
5 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
7 |
use TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
8 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
9 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Headers;
|
10 |
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners\Payment_Capture_Completed;
|
11 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Validation;
|
12 |
use Tribe__Documentation__Swagger__Provider_Interface;
|
13 |
use Tribe__REST__Endpoints__CREATE_Endpoint_Interface;
|
14 |
use Tribe__Tickets__REST__V1__Endpoints__Base;
|
15 |
use WP_Error;
|
16 |
use WP_REST_Request;
|
17 |
use WP_REST_Response;
|
18 |
+
use WP_REST_Server;
|
19 |
|
20 |
/**
|
21 |
+
* Class Webhook Endpoint.
|
22 |
*
|
23 |
* @since 5.1.6
|
24 |
+
* @package TEC\Tickets\Commerce\Gateways\PayPal\REST
|
25 |
*/
|
26 |
+
class Webhook_Endpoint implements Tribe__Documentation__Swagger__Provider_Interface {
|
|
|
|
|
|
|
27 |
|
28 |
/**
|
29 |
* The REST API endpoint path.
|
32 |
*
|
33 |
* @var string
|
34 |
*/
|
35 |
+
protected $path = '/commerce/paypal/webhook';
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Register the actual endpoint on WP Rest API.
|
39 |
+
*
|
40 |
+
* @since 5.1.10
|
41 |
+
*/
|
42 |
+
public function register() {
|
43 |
+
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
44 |
+
$documentation = tribe( 'tickets.rest-v1.endpoints.documentation' );
|
45 |
+
|
46 |
+
register_rest_route(
|
47 |
+
$namespace,
|
48 |
+
$this->get_endpoint_path(),
|
49 |
+
[
|
50 |
+
'methods' => WP_REST_Server::CREATABLE,
|
51 |
+
'args' => $this->get_args(),
|
52 |
+
'callback' => [ $this, 'handle_request' ],
|
53 |
+
'permission_callback' => '__return_true',
|
54 |
+
]
|
55 |
+
);
|
56 |
+
|
57 |
+
$documentation->register_documentation_provider( $this->get_endpoint_path(), $this );
|
58 |
+
}
|
59 |
|
60 |
/**
|
61 |
* Gets the Endpoint path for the on boarding process.
|
76 |
* @return string The REST API route URL.
|
77 |
*/
|
78 |
public function get_route_url() {
|
79 |
+
$namespace = tribe( 'tickets.rest-v1.main' )->get_events_route_namespace();
|
80 |
+
|
81 |
+
return rest_url( '/' . $namespace . $this->get_endpoint_path(), 'https' );
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* This grabs the headers from the webhook request to be used in the signature verification
|
86 |
+
*
|
87 |
+
* A strange thing here is that the headers are inconsistent between live and sandbox mode, so this also checks for
|
88 |
+
* both forms of the headers (studly case and all caps).
|
89 |
+
*
|
90 |
+
* @since 5.1.10
|
91 |
+
*
|
92 |
+
* @param array $paypal_headers
|
93 |
+
*
|
94 |
+
* @return array|WP_Error
|
95 |
+
*/
|
96 |
+
public function parse_headers( array $paypal_headers ) {
|
97 |
+
$header_keys = [
|
98 |
+
'transmission_id' => 'Paypal-Transmission-Id',
|
99 |
+
'transmission_time' => 'Paypal-Transmission-Time',
|
100 |
+
'transmission_sig' => 'Paypal-Transmission-Sig',
|
101 |
+
'cert_url' => 'Paypal-Cert-Url',
|
102 |
+
'auth_algo' => 'Paypal-Auth-Algo',
|
103 |
+
];
|
104 |
+
|
105 |
+
$headers = [];
|
106 |
+
$missing_keys = [];
|
107 |
+
foreach ( $header_keys as $property => $key ) {
|
108 |
+
if ( ! isset( $paypal_headers[ $key ] ) ) {
|
109 |
+
$key = str_replace( '-', '_', $key );
|
110 |
+
$key = strtoupper( $key );
|
111 |
+
|
112 |
+
if ( ! isset( $paypal_headers[ $key ] ) ) {
|
113 |
+
$key = strtolower( $key );
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
if ( isset( $paypal_headers[ $key ] ) ) {
|
118 |
+
$headers[ $property ] = $paypal_headers[ $key ];
|
119 |
+
} else {
|
120 |
+
$missing_keys[] = $property;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
if ( ! empty( $missing_keys ) ) {
|
125 |
+
return new WP_Error( 'tec-tickets-commerce-paypal-webhook-missing-headers', null, [ 'missing_keys' => $missing_keys ] );
|
126 |
+
}
|
127 |
+
|
128 |
+
return $headers;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Handle the Webhook requests coming from PayPal.
|
133 |
+
*
|
134 |
+
* @since 5.1.10
|
135 |
+
*
|
136 |
+
* @param WP_REST_Request $request The request object.
|
137 |
+
*
|
138 |
+
* @return WP_Error|WP_REST_Response An array containing the data on success or a WP_Error instance on failure.
|
139 |
+
*/
|
140 |
+
public function handle_request( WP_REST_Request $request ) {
|
141 |
+
if ( ! tribe( Merchant::class )->is_active() ) {
|
142 |
+
return new WP_Error( 'tec-tickets-commerce-paypal-merchant-inactive' );
|
143 |
+
}
|
144 |
+
|
145 |
+
$event = $request->get_body_params();
|
146 |
+
|
147 |
+
tribe( 'logger' )->log_debug(
|
148 |
+
sprintf(
|
149 |
+
// Translators: %s: The event type.
|
150 |
+
__( 'Received PayPal webhook event for type: %s', 'event-tickets' ),
|
151 |
+
$event['event_type']
|
152 |
+
),
|
153 |
+
'tickets-commerce-gateway-paypal'
|
154 |
+
);
|
155 |
+
|
156 |
+
// Check if the event type matches.
|
157 |
+
if ( ! tribe( Webhooks\Events::class )->is_valid( $event['event_type'] ) ) {
|
158 |
+
tribe( 'logger' )->log_debug(
|
159 |
+
sprintf(
|
160 |
+
// Translators: %s: The PayPal payment event.
|
161 |
+
__( 'Invalid event type for webhook event: %s', 'event-tickets' ),
|
162 |
+
json_encode( $event )
|
163 |
+
),
|
164 |
+
'tickets-commerce-gateway-paypal'
|
165 |
+
);
|
166 |
+
|
167 |
+
return new WP_Error( 'tec-tickets-commerce-paypal-webhook-invalid-type', null, $event );
|
168 |
+
}
|
169 |
+
|
170 |
+
$webhook_id = tribe( Webhooks::class )->get_setting( 'id' );
|
171 |
+
$headers = $this->parse_headers( $request->get_headers() );
|
172 |
+
|
173 |
+
if ( ! tribe( Client::class )->verify_webhook_signature( $webhook_id, $event, $headers ) ) {
|
174 |
+
tribe( 'logger' )->log_error( __( 'Failed PayPal webhook event verification', 'event-tickets' ), 'tickets-commerce-gateway-paypal' );
|
175 |
+
|
176 |
+
return new WP_Error( 'tec-tickets-commerce-paypal-webhook-signature-error', null, [ 'webhook_id' => $webhook_id, 'event' => $event, 'headers' => $headers ] );
|
177 |
+
}
|
178 |
|
179 |
+
$order = tribe( Webhooks\Handler::class )->process_event( $event );
|
180 |
+
|
181 |
+
if ( is_wp_error( $order ) ) {
|
182 |
+
return $order;
|
183 |
+
}
|
184 |
+
|
185 |
+
$data = [
|
186 |
+
'success' => true,
|
187 |
+
'order' => $order,
|
188 |
+
];
|
189 |
+
|
190 |
+
return new WP_REST_Response( $data );
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Arguments used for the signup redirect.
|
195 |
+
*
|
196 |
+
* @since 5.1.10
|
197 |
+
*
|
198 |
+
* @return array
|
199 |
+
*/
|
200 |
+
public function get_args() {
|
201 |
+
return [];
|
202 |
}
|
203 |
|
204 |
/**
|
244 |
],
|
245 |
];
|
246 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
}
|
src/Tickets/Commerce/Gateways/PayPal/Repositories/Authorization.php
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Repositories;
|
4 |
-
|
5 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\WhoDat;
|
6 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class Authorization
|
10 |
-
*
|
11 |
-
* @since 5.1.6
|
12 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Repositories
|
13 |
-
*/
|
14 |
-
class Authorization {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @since 5.1.6
|
18 |
-
*
|
19 |
-
* @var Client
|
20 |
-
*/
|
21 |
-
private $paypal_client;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @since 5.1.6
|
25 |
-
*
|
26 |
-
* @var WhoDat
|
27 |
-
*/
|
28 |
-
private $connect_client;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Authorization constructor.
|
32 |
-
*
|
33 |
-
* @since 5.1.6
|
34 |
-
*
|
35 |
-
* @param Client $paypal_client
|
36 |
-
* @param WhoDat $connect_client
|
37 |
-
*/
|
38 |
-
public function __construct( Client $paypal_client, WhoDat $connect_client ) {
|
39 |
-
$this->paypal_client = $paypal_client;
|
40 |
-
$this->connect_client = $connect_client;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Retrieves a token for the Client ID and Secret.
|
45 |
-
*
|
46 |
-
* @since 5.1.6
|
47 |
-
*
|
48 |
-
* @param string $client_id The Client ID.
|
49 |
-
* @param string $client_secret The Client Secret.
|
50 |
-
*
|
51 |
-
* @return array|null The token details response or null if there was a problem.
|
52 |
-
*/
|
53 |
-
public function get_token_from_client_credentials( $client_id, $client_secret ) {
|
54 |
-
$auth = base64_encode( "$client_id:$client_secret" );
|
55 |
-
|
56 |
-
$request = wp_remote_post( $this->paypal_client->get_api_url( 'v1/oauth2/token' ), [
|
57 |
-
'headers' => [
|
58 |
-
'Authorization' => sprintf( 'Basic %1$s', $auth ),
|
59 |
-
'Content-Type' => 'application/x-www-form-urlencoded',
|
60 |
-
],
|
61 |
-
'body' => [
|
62 |
-
'grant_type' => 'client_credentials',
|
63 |
-
],
|
64 |
-
] );
|
65 |
-
|
66 |
-
if ( is_wp_error( $request ) ) {
|
67 |
-
tribe( 'logger' )->log_error( sprintf(
|
68 |
-
// Translators: %s: The error message.
|
69 |
-
__( 'PayPal request error: %s', 'event-tickets' ),
|
70 |
-
$request->get_error_message()
|
71 |
-
), 'tickets-commerce-paypal-commerce' );
|
72 |
-
|
73 |
-
return null;
|
74 |
-
}
|
75 |
-
|
76 |
-
$response = wp_remote_retrieve_body( $request );
|
77 |
-
$response = @json_decode( $response, true );
|
78 |
-
|
79 |
-
if ( ! is_array( $response ) ) {
|
80 |
-
tribe( 'logger' )->log_error( __( 'Unexpected PayPal response when getting token from client credentials', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
81 |
-
|
82 |
-
return null;
|
83 |
-
}
|
84 |
-
|
85 |
-
return $response;
|
86 |
-
}
|
87 |
-
|
88 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Repositories/Order.php
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Repositories;
|
4 |
-
|
5 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Class Order
|
9 |
-
*
|
10 |
-
* @since 5.1.6
|
11 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Repositories
|
12 |
-
*
|
13 |
-
*/
|
14 |
-
class Order {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @since 5.1.6
|
18 |
-
*
|
19 |
-
* @var Client
|
20 |
-
*/
|
21 |
-
private $client;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Order constructor.
|
25 |
-
*
|
26 |
-
* @since 5.1.6
|
27 |
-
*
|
28 |
-
* @param Client $client
|
29 |
-
*/
|
30 |
-
public function __construct( Client $client = null ) {
|
31 |
-
$this->client = $client ?: tribe( Client::class );
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Approve order.
|
36 |
-
*
|
37 |
-
* @since 5.1.6
|
38 |
-
*
|
39 |
-
* @param string|int $order_id Which Order Post Type ID we are going to create a PayPal Order from.
|
40 |
-
*
|
41 |
-
* @return string
|
42 |
-
*/
|
43 |
-
public function approve( $order_id ) {
|
44 |
-
$response = $this->client->capture_order( $order_id );
|
45 |
-
|
46 |
-
return $response;
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Create order based on Event Ticket Order ID we send the data to Paypal to create the order there.
|
51 |
-
*
|
52 |
-
* @since 5.1.9
|
53 |
-
*
|
54 |
-
* @param string|int $order_id Which Order Post Type ID we are going to create a PayPal Order from.
|
55 |
-
*
|
56 |
-
* @return array
|
57 |
-
*/
|
58 |
-
public function create( $order_id ) {
|
59 |
-
|
60 |
-
$data = [
|
61 |
-
|
62 |
-
];
|
63 |
-
|
64 |
-
$order_response = $this->client->create_order( $data );
|
65 |
-
|
66 |
-
return $order_response['id'];
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Refunds a processed payment
|
71 |
-
*
|
72 |
-
* @since 5.1.6
|
73 |
-
|
74 |
-
* @param string|int $order_id Which Order Post Type ID we are going to create a PayPal Order from.
|
75 |
-
*
|
76 |
-
* @return string The id of the refund
|
77 |
-
*/
|
78 |
-
public function refund_payment( $order_id ) {
|
79 |
-
$response = $this->client->refund_payment( $order_id );
|
80 |
-
|
81 |
-
return $response;
|
82 |
-
}
|
83 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Repositories/Webhooks.php
DELETED
@@ -1,451 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Repositories;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Headers;
|
7 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Models\Webhook_Config;
|
8 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
9 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
10 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Settings;
|
11 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Webhook_Register;
|
12 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Webhooks_Route;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class Webhooks
|
16 |
-
*
|
17 |
-
* @since 5.1.6
|
18 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Repositories
|
19 |
-
*/
|
20 |
-
class Webhooks {
|
21 |
-
/**
|
22 |
-
* @since 5.1.6
|
23 |
-
*
|
24 |
-
* @var Webhooks_Route
|
25 |
-
*/
|
26 |
-
private $webhook_route;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @var Webhook_Register
|
30 |
-
*/
|
31 |
-
private $webhooks_register;
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @var Client
|
35 |
-
*/
|
36 |
-
private $paypal_client;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @var Settings
|
40 |
-
*/
|
41 |
-
private $settings;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Webhooks constructor.
|
45 |
-
*
|
46 |
-
* @since 5.1.6
|
47 |
-
*
|
48 |
-
* @param Client $paypal_client
|
49 |
-
* @param Webhook_Register $webhooks_register
|
50 |
-
* @param Settings $settings
|
51 |
-
*/
|
52 |
-
public function __construct( Client $paypal_client, Webhook_Register $webhooks_register, Settings $settings ) {
|
53 |
-
$this->paypal_client = $paypal_client;
|
54 |
-
$this->webhooks_register = $webhooks_register;
|
55 |
-
$this->settings = $settings;
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Verifies with PayPal that the given event is securely from PayPal and not some sneaking sneaker
|
60 |
-
*
|
61 |
-
* @see https://developer.paypal.com/docs/api/webhooks/v1/#verify-webhook-signature
|
62 |
-
* @since 5.1.6
|
63 |
-
*
|
64 |
-
* @param string $token
|
65 |
-
* @param object $event The event to verify
|
66 |
-
* @param Headers $paypal_headers
|
67 |
-
*
|
68 |
-
* @return bool
|
69 |
-
*/
|
70 |
-
public function verify_event_signature( $token, $event, $paypal_headers ) {
|
71 |
-
// @todo Move this to the SDK.
|
72 |
-
$api_url = $this->paypal_client->get_api_url( 'v1/notifications/verify-webhook-signature' );
|
73 |
-
|
74 |
-
$webhook_config = $this->get_webhook_config();
|
75 |
-
|
76 |
-
$request = wp_remote_post(
|
77 |
-
$api_url,
|
78 |
-
[
|
79 |
-
'headers' => [
|
80 |
-
'Content-Type' => 'application/json',
|
81 |
-
'Authorization' => "Bearer {$token}",
|
82 |
-
],
|
83 |
-
'body' => wp_json_encode(
|
84 |
-
[
|
85 |
-
'transmission_id' => $paypal_headers->transmission_id,
|
86 |
-
'transmission_time' => $paypal_headers->transmission_time,
|
87 |
-
'transmission_sig' => $paypal_headers->transmission_sig,
|
88 |
-
'cert_url' => $paypal_headers->cert_url,
|
89 |
-
'auth_algo' => $paypal_headers->auth_algo,
|
90 |
-
'webhook_id' => $webhook_config->id,
|
91 |
-
'webhook_event' => $event,
|
92 |
-
]
|
93 |
-
),
|
94 |
-
]
|
95 |
-
);
|
96 |
-
|
97 |
-
if ( is_wp_error( $request ) ) {
|
98 |
-
tribe( 'logger' )->log_error( sprintf(
|
99 |
-
// Translators: %s: The error message.
|
100 |
-
__( 'PayPal request error: %s', 'event-tickets' ),
|
101 |
-
$request->get_error_message()
|
102 |
-
), 'tickets-commerce-paypal-commerce' );
|
103 |
-
|
104 |
-
return false;
|
105 |
-
}
|
106 |
-
|
107 |
-
$response = wp_remote_retrieve_body( $request );
|
108 |
-
$response = json_decode( $response );
|
109 |
-
|
110 |
-
if ( ! $response || ! isset( $response->verification_status ) ) {
|
111 |
-
tribe( 'logger' )->log_error( __( 'Unexpected PayPal response when verifying signature', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
112 |
-
|
113 |
-
return false;
|
114 |
-
}
|
115 |
-
|
116 |
-
return $response->verification_status === 'SUCCESS';
|
117 |
-
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Get the list of webhooks.
|
122 |
-
*
|
123 |
-
* @see https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_list
|
124 |
-
* @since 5.1.6
|
125 |
-
*
|
126 |
-
* @param string $token The PayPal auth token.
|
127 |
-
*
|
128 |
-
* @throws Exception
|
129 |
-
*
|
130 |
-
* @return object[] The list of PayPal webhooks.
|
131 |
-
*/
|
132 |
-
public function list_webhooks( $token ) {
|
133 |
-
// @todo Move this to the SDK.
|
134 |
-
$api_url = $this->paypal_client->get_api_url( 'v1/notifications/webhooks' );
|
135 |
-
|
136 |
-
$request = wp_remote_get(
|
137 |
-
$api_url,
|
138 |
-
[
|
139 |
-
'headers' => [
|
140 |
-
'Content-Type' => 'application/json',
|
141 |
-
'Authorization' => "Bearer {$token}",
|
142 |
-
],
|
143 |
-
]
|
144 |
-
);
|
145 |
-
|
146 |
-
if ( is_wp_error( $request ) ) {
|
147 |
-
tribe( 'logger' )->log_error( sprintf(
|
148 |
-
// Translators: %s: The error message.
|
149 |
-
__( 'PayPal request error: %s', 'event-tickets' ),
|
150 |
-
$request->get_error_message()
|
151 |
-
), 'tickets-commerce-paypal-commerce' );
|
152 |
-
|
153 |
-
return false;
|
154 |
-
}
|
155 |
-
|
156 |
-
$response = wp_remote_retrieve_body( $request );
|
157 |
-
$response = json_decode( $response );
|
158 |
-
|
159 |
-
if ( ! $response || empty( $response->webhooks ) ) {
|
160 |
-
tribe( 'logger' )->log_error( __( 'Unexpected PayPal response when getting list of webhooks', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
161 |
-
|
162 |
-
throw new Exception( 'Failed to get list of webhooks' );
|
163 |
-
}
|
164 |
-
|
165 |
-
return $response->webhooks;
|
166 |
-
}
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Get the webhook data from a specific webhook ID.
|
170 |
-
*
|
171 |
-
* @see https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_get
|
172 |
-
* @since 5.1.6
|
173 |
-
*
|
174 |
-
* @param string $token The PayPal auth token.
|
175 |
-
* @param string $webhook_id The webhook ID.
|
176 |
-
*
|
177 |
-
* @throws Exception
|
178 |
-
*
|
179 |
-
* @return object The PayPal webhook data.
|
180 |
-
*/
|
181 |
-
public function get_webhook( $token, $webhook_id ) {
|
182 |
-
// @todo Move this to the SDK.
|
183 |
-
$api_url = $this->paypal_client->get_api_url( "v1/notifications/webhooks/{$webhook_id}" );
|
184 |
-
|
185 |
-
$request = wp_remote_get(
|
186 |
-
$api_url,
|
187 |
-
[
|
188 |
-
'headers' => [
|
189 |
-
'Content-Type' => 'application/json',
|
190 |
-
'Authorization' => "Bearer {$token}",
|
191 |
-
],
|
192 |
-
]
|
193 |
-
);
|
194 |
-
|
195 |
-
if ( is_wp_error( $request ) ) {
|
196 |
-
tribe( 'logger' )->log_error( sprintf(
|
197 |
-
// Translators: %s: The error message.
|
198 |
-
__( 'PayPal request error: %s', 'event-tickets' ),
|
199 |
-
$request->get_error_message()
|
200 |
-
), 'tickets-commerce-paypal-commerce' );
|
201 |
-
|
202 |
-
return false;
|
203 |
-
}
|
204 |
-
|
205 |
-
$response = wp_remote_retrieve_body( $request );
|
206 |
-
$response = json_decode( $response );
|
207 |
-
|
208 |
-
if ( ! $response || empty( $response->id ) ) {
|
209 |
-
if ( 'INVALID_RESOURCE_ID' === $response->name ) {
|
210 |
-
// The webhook was not found.
|
211 |
-
tribe( 'logger' )->log_warning( __( 'The PayPal webhook does not exist', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
212 |
-
} else {
|
213 |
-
// Other unexpected response.
|
214 |
-
tribe( 'logger' )->log_warning( __( 'Unexpected PayPal response when getting webhook', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
215 |
-
}
|
216 |
-
|
217 |
-
throw new Exception( 'Failed to get webhook' );
|
218 |
-
}
|
219 |
-
|
220 |
-
return $response;
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Creates a webhook with the given event types registered.
|
225 |
-
*
|
226 |
-
* @see https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_post
|
227 |
-
* @since 5.1.6
|
228 |
-
*
|
229 |
-
* @param string $token
|
230 |
-
*
|
231 |
-
* @return Webhook_Config
|
232 |
-
* @throws Exception
|
233 |
-
*/
|
234 |
-
public function create_webhook( $token ) {
|
235 |
-
// @todo Move this to the SDK.
|
236 |
-
$apiUrl = $this->paypal_client->get_api_url( 'v1/notifications/webhooks' );
|
237 |
-
|
238 |
-
$events = $this->webhooks_register->get_registered_events();
|
239 |
-
$webhook_url = tribe( Webhooks_Route::class )->get_route_url();
|
240 |
-
|
241 |
-
$request = wp_remote_post(
|
242 |
-
$apiUrl,
|
243 |
-
[
|
244 |
-
'headers' => [
|
245 |
-
'Content-Type' => 'application/json',
|
246 |
-
'Authorization' => "Bearer {$token}",
|
247 |
-
],
|
248 |
-
'body' => json_encode(
|
249 |
-
[
|
250 |
-
'url' => $webhook_url,
|
251 |
-
'event_types' => array_map(
|
252 |
-
static function ( $eventType ) {
|
253 |
-
return [
|
254 |
-
'name' => $eventType,
|
255 |
-
];
|
256 |
-
},
|
257 |
-
$events
|
258 |
-
),
|
259 |
-
]
|
260 |
-
),
|
261 |
-
]
|
262 |
-
);
|
263 |
-
|
264 |
-
if ( is_wp_error( $request ) ) {
|
265 |
-
tribe( 'logger' )->log_error( sprintf(
|
266 |
-
// Translators: %s: The error message.
|
267 |
-
__( 'PayPal request error: %s', 'event-tickets' ),
|
268 |
-
$request->get_error_message()
|
269 |
-
), 'tickets-commerce-paypal-commerce' );
|
270 |
-
|
271 |
-
return false;
|
272 |
-
}
|
273 |
-
|
274 |
-
$response = wp_remote_retrieve_body( $request );
|
275 |
-
$response = json_decode( $response );
|
276 |
-
|
277 |
-
if ( ! $response || empty( $response->id ) ) {
|
278 |
-
if ( ! empty( $response->name ) ) {
|
279 |
-
if ( 'WEBHOOK_URL_ALREADY_EXISTS' === $response->name ) {
|
280 |
-
// The webhook already exists, this is fine!
|
281 |
-
$webhooks = $this->list_webhooks( $token );
|
282 |
-
|
283 |
-
if ( $webhooks ) {
|
284 |
-
$webhooks = wp_list_pluck( $webhooks, 'id', 'url' );
|
285 |
-
|
286 |
-
if ( isset( $webhooks[ $webhook_url ] ) ) {
|
287 |
-
return new Webhook_Config( $webhooks[ $webhook_url ], $webhook_url, $events );
|
288 |
-
}
|
289 |
-
}
|
290 |
-
} elseif ( 'WEBHOOK_NUMBER_LIMIT_EXCEEDED' === $response->name ) {
|
291 |
-
// Limit has been reached, we cannot just delete all webhooks without permission.
|
292 |
-
tribe( 'logger' )->log_error( __( 'PayPal webhook limit has been reached, you need to go into your developer.paypal.com account and remove webhooks from the associated account', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
293 |
-
}
|
294 |
-
}
|
295 |
-
|
296 |
-
tribe( 'logger' )->log_error( __( 'Unexpected PayPal response when creating webhook', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
297 |
-
|
298 |
-
throw new Exception( 'Failed to create webhook' );
|
299 |
-
}
|
300 |
-
|
301 |
-
return new Webhook_Config( $response->id, $webhook_url, $events );
|
302 |
-
}
|
303 |
-
|
304 |
-
/**
|
305 |
-
* Updates the webhook url and events
|
306 |
-
*
|
307 |
-
* @since 5.1.6
|
308 |
-
*
|
309 |
-
* @throws Exception
|
310 |
-
*
|
311 |
-
* @param string $webhook_id
|
312 |
-
*
|
313 |
-
* @param string $token
|
314 |
-
*
|
315 |
-
* @return bool
|
316 |
-
*/
|
317 |
-
public function update_webhook( $token, $webhook_id ) {
|
318 |
-
// @todo Move this to the SDK.
|
319 |
-
$api_url = $this->paypal_client->get_api_url( "v1/notifications/webhooks/{$webhook_id}" );
|
320 |
-
|
321 |
-
$events = $this->webhooks_register->get_registered_events();
|
322 |
-
$webhook_url = tribe( Webhooks_Route::class )->get_route_url();
|
323 |
-
|
324 |
-
$request = wp_remote_request(
|
325 |
-
$api_url,
|
326 |
-
[
|
327 |
-
'method' => 'PATCH',
|
328 |
-
'headers' => [
|
329 |
-
'Content-Type' => 'application/json',
|
330 |
-
'Authorization' => "Bearer {$token}",
|
331 |
-
],
|
332 |
-
'body' => json_encode(
|
333 |
-
[
|
334 |
-
[
|
335 |
-
'op' => 'replace',
|
336 |
-
'path' => '/url',
|
337 |
-
'value' => $webhook_url,
|
338 |
-
],
|
339 |
-
[
|
340 |
-
'op' => 'replace',
|
341 |
-
'path' => '/event_types',
|
342 |
-
'value' => array_map(
|
343 |
-
static function ( $event_type ) {
|
344 |
-
return [
|
345 |
-
'name' => $event_type,
|
346 |
-
];
|
347 |
-
},
|
348 |
-
$events
|
349 |
-
),
|
350 |
-
],
|
351 |
-
]
|
352 |
-
),
|
353 |
-
]
|
354 |
-
);
|
355 |
-
|
356 |
-
if ( is_wp_error( $request ) ) {
|
357 |
-
tribe( 'logger' )->log_error( sprintf(
|
358 |
-
// Translators: %s: The error message.
|
359 |
-
__( 'PayPal request error: %s', 'event-tickets' ),
|
360 |
-
$request->get_error_message()
|
361 |
-
), 'tickets-commerce-paypal-commerce' );
|
362 |
-
|
363 |
-
return false;
|
364 |
-
}
|
365 |
-
|
366 |
-
$response = wp_remote_retrieve_body( $request );
|
367 |
-
$response = json_decode( $response );
|
368 |
-
|
369 |
-
if ( ! $response || empty( $response->id ) ) {
|
370 |
-
if ( ! empty( $response->name ) ) {
|
371 |
-
if ( 'INVALID_RESOURCE_ID' === $response->name ) {
|
372 |
-
// The webhook was not found, let's create it.
|
373 |
-
$webhook_config = $this->create_webhook( $token );
|
374 |
-
|
375 |
-
tribe( 'logger' )->log_warning( __( 'The PayPal webhook was not able to be updated because it did not exist, attempting to create it now', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
376 |
-
|
377 |
-
if ( $webhook_config ) {
|
378 |
-
return true;
|
379 |
-
}
|
380 |
-
}
|
381 |
-
}
|
382 |
-
|
383 |
-
tribe( 'logger' )->log_error( __( 'Unexpected PayPal response when updating webhook', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
384 |
-
|
385 |
-
throw new Exception( 'Failed to update PayPal Commerce webhook' );
|
386 |
-
}
|
387 |
-
|
388 |
-
return true;
|
389 |
-
}
|
390 |
-
|
391 |
-
/**
|
392 |
-
* Deletes the webhook with the given id.
|
393 |
-
*
|
394 |
-
* @since 5.1.6
|
395 |
-
*
|
396 |
-
* @param string $token
|
397 |
-
* @param string $webhook_id
|
398 |
-
*
|
399 |
-
* @return bool Whether or not the deletion was successful
|
400 |
-
*/
|
401 |
-
public function delete_webhook( $token, $webhook_id ) {
|
402 |
-
// @todo Move this to the SDK.
|
403 |
-
$api_url = $this->paypal_client->get_api_url( "v1/notifications/webhooks/{$webhook_id}" );
|
404 |
-
|
405 |
-
$request = wp_remote_request(
|
406 |
-
$api_url,
|
407 |
-
[
|
408 |
-
'method' => 'DELETE',
|
409 |
-
'headers' => [
|
410 |
-
'Content-Type' => 'application/json',
|
411 |
-
'Authorization' => "Bearer {$token}",
|
412 |
-
],
|
413 |
-
]
|
414 |
-
);
|
415 |
-
|
416 |
-
$code = wp_remote_retrieve_response_code( $request );
|
417 |
-
|
418 |
-
return 200 <= $code && $code < 300;
|
419 |
-
}
|
420 |
-
|
421 |
-
/**
|
422 |
-
* Saves the webhook config in the database
|
423 |
-
*
|
424 |
-
* @since 5.1.6
|
425 |
-
*
|
426 |
-
* @param Webhook_Config $config
|
427 |
-
*/
|
428 |
-
public function save_webhook_config( Webhook_Config $config ) {
|
429 |
-
$this->settings->update_webhook_config( tribe( Merchant::class )->get_mode(), $config );
|
430 |
-
}
|
431 |
-
|
432 |
-
/**
|
433 |
-
* Retrieves the WebhookConfig from the database
|
434 |
-
*
|
435 |
-
* @since 5.1.6
|
436 |
-
*
|
437 |
-
* @return Webhook_Config|null
|
438 |
-
*/
|
439 |
-
public function get_webhook_config() {
|
440 |
-
return $this->settings->get_webhook_config( tribe( Merchant::class )->get_mode() );
|
441 |
-
}
|
442 |
-
|
443 |
-
/**
|
444 |
-
* Deletes the stored webhook config
|
445 |
-
*
|
446 |
-
* @since 5.1.6
|
447 |
-
*/
|
448 |
-
public function delete_webhook_config() {
|
449 |
-
$this->settings->delete_webhook_config( tribe( Merchant::class )->get_mode() );
|
450 |
-
}
|
451 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Settings.php
CHANGED
@@ -32,35 +32,38 @@ class Settings extends Abstract_Settings {
|
|
32 |
// Add an initial empty selection to the start.
|
33 |
$countries = [ '' => __( '-- Please select a country --', 'event-tickets' ) ] + $countries;
|
34 |
|
35 |
-
$connect_html = 'Connect to PayPal';
|
36 |
-
|
37 |
return [
|
38 |
'tickets-commerce-paypal-commerce-configure' => [
|
39 |
'type' => 'wrapped_html',
|
40 |
-
'html' => $this->
|
41 |
'validation_type' => 'html',
|
42 |
],
|
43 |
];
|
44 |
}
|
45 |
|
46 |
/**
|
47 |
-
* Get the PayPal Commerce
|
48 |
*
|
49 |
* @since 5.1.6
|
50 |
*
|
51 |
* @return string The PayPal Commerce introduction section.
|
52 |
*/
|
53 |
-
public function
|
54 |
/** @var Tribe__Tickets__Admin__Views $admin_views */
|
55 |
$admin_views = tribe( 'tickets.admin.views' );
|
|
|
|
|
56 |
|
57 |
$context = [
|
58 |
-
'plugin_url'
|
|
|
|
|
|
|
59 |
];
|
60 |
|
61 |
$admin_views->add_template_globals( $context );
|
62 |
|
63 |
-
return $admin_views->template( 'settings/tickets-commerce/paypal
|
64 |
}
|
65 |
|
66 |
/**
|
@@ -101,29 +104,29 @@ class Settings extends Abstract_Settings {
|
|
101 |
private function account_is_in_north_america() {
|
102 |
// Countries list: https://en.wikipedia.org/wiki/List_of_North_American_countries_by_area#Countries
|
103 |
$north_american_countries = [
|
104 |
-
'CA', // Canada
|
105 |
-
'US', // United States
|
106 |
-
'MX', // Mexico
|
107 |
-
'NI', // Nicaragua
|
108 |
-
'HN', // Honduras
|
109 |
-
'CU', // Cuba
|
110 |
-
'GT', // Guatemala
|
111 |
-
'PA', // Panama
|
112 |
-
'CR', // Costa Rica
|
113 |
-
'DO', // Dominican Republic
|
114 |
-
'HT', // Haiti
|
115 |
-
'BZ', // Belize
|
116 |
-
'SV', // EL Salvador
|
117 |
-
'BS', // The Bahamas
|
118 |
-
'JM', // Jamaica
|
119 |
-
'TT', // Trinidad and Tobago
|
120 |
-
'DM', // Dominica
|
121 |
-
'LC', // Saint Lucia
|
122 |
-
'AG', // Antigua and Barbuda
|
123 |
-
'BB', // Barbados
|
124 |
-
'VC', // Saint Vincent and the Grenadines
|
125 |
-
'GD', // Grenada
|
126 |
-
'KN', // Saint Kitts and Nevis
|
127 |
];
|
128 |
|
129 |
// @todo Replace the settings name with property.
|
32 |
// Add an initial empty selection to the start.
|
33 |
$countries = [ '' => __( '-- Please select a country --', 'event-tickets' ) ] + $countries;
|
34 |
|
|
|
|
|
35 |
return [
|
36 |
'tickets-commerce-paypal-commerce-configure' => [
|
37 |
'type' => 'wrapped_html',
|
38 |
+
'html' => $this->get_connection_settings_html(),
|
39 |
'validation_type' => 'html',
|
40 |
],
|
41 |
];
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
+
* Get the PayPal Commerce Connection Settings section.
|
46 |
*
|
47 |
* @since 5.1.6
|
48 |
*
|
49 |
* @return string The PayPal Commerce introduction section.
|
50 |
*/
|
51 |
+
public function get_connection_settings_html() {
|
52 |
/** @var Tribe__Tickets__Admin__Views $admin_views */
|
53 |
$admin_views = tribe( 'tickets.admin.views' );
|
54 |
+
$merchant = tribe( Merchant::class );
|
55 |
+
$signup = tribe( SignUp::class );
|
56 |
|
57 |
$context = [
|
58 |
+
'plugin_url' => Tribe__Tickets__Main::instance()->plugin_url,
|
59 |
+
'merchant' => $merchant,
|
60 |
+
'is_merchant_active' => $merchant->is_active(),
|
61 |
+
'signup' => $signup,
|
62 |
];
|
63 |
|
64 |
$admin_views->add_template_globals( $context );
|
65 |
|
66 |
+
return $admin_views->template( 'settings/tickets-commerce/paypal/main', [], false );
|
67 |
}
|
68 |
|
69 |
/**
|
104 |
private function account_is_in_north_america() {
|
105 |
// Countries list: https://en.wikipedia.org/wiki/List_of_North_American_countries_by_area#Countries
|
106 |
$north_american_countries = [
|
107 |
+
'CA', // Canada.
|
108 |
+
'US', // United States.
|
109 |
+
'MX', // Mexico.
|
110 |
+
'NI', // Nicaragua.
|
111 |
+
'HN', // Honduras.
|
112 |
+
'CU', // Cuba.
|
113 |
+
'GT', // Guatemala.
|
114 |
+
'PA', // Panama.
|
115 |
+
'CR', // Costa Rica.
|
116 |
+
'DO', // Dominican Republic.
|
117 |
+
'HT', // Haiti.
|
118 |
+
'BZ', // Belize.
|
119 |
+
'SV', // EL Salvador.
|
120 |
+
'BS', // The Bahamas.
|
121 |
+
'JM', // Jamaica.
|
122 |
+
'TT', // Trinidad and Tobago.
|
123 |
+
'DM', // Dominica.
|
124 |
+
'LC', // Saint Lucia.
|
125 |
+
'AG', // Antigua and Barbuda.
|
126 |
+
'BB', // Barbados.
|
127 |
+
'VC', // Saint Vincent and the Grenadines.
|
128 |
+
'GD', // Grenada.
|
129 |
+
'KN', // Saint Kitts and Nevis.
|
130 |
];
|
131 |
|
132 |
// @todo Replace the settings name with property.
|
src/Tickets/Commerce/Gateways/PayPal/Signup.php
CHANGED
@@ -50,7 +50,7 @@ class Signup {
|
|
50 |
if ( empty( $this->template ) ) {
|
51 |
$this->template = new \Tribe__Template();
|
52 |
$this->template->set_template_origin( \Tribe__Tickets__Main::instance() );
|
53 |
-
$this->template->set_template_folder( 'src/admin-views/commerce/
|
54 |
$this->template->set_template_context_extract( true );
|
55 |
}
|
56 |
|
@@ -210,7 +210,7 @@ class Signup {
|
|
210 |
* @return false|string
|
211 |
*/
|
212 |
public function get_referral_data_link() {
|
213 |
-
$links =
|
214 |
if ( empty( $links ) ) {
|
215 |
return false;
|
216 |
}
|
@@ -232,4 +232,4 @@ class Signup {
|
|
232 |
|
233 |
return $this->get_template()->template( 'signup-link', $template_vars, false );
|
234 |
}
|
235 |
-
}
|
50 |
if ( empty( $this->template ) ) {
|
51 |
$this->template = new \Tribe__Template();
|
52 |
$this->template->set_template_origin( \Tribe__Tickets__Main::instance() );
|
53 |
+
$this->template->set_template_folder( 'src/admin-views/settings/tickets-commerce/paypal' );
|
54 |
$this->template->set_template_context_extract( true );
|
55 |
}
|
56 |
|
210 |
* @return false|string
|
211 |
*/
|
212 |
public function get_referral_data_link() {
|
213 |
+
$links = $this->get_transient_data();
|
214 |
if ( empty( $links ) ) {
|
215 |
return false;
|
216 |
}
|
232 |
|
233 |
return $this->get_template()->template( 'signup-link', $template_vars, false );
|
234 |
}
|
235 |
+
}
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks.php
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\PayPal;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\REST\Webhook_Endpoint;
|
6 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Events;
|
7 |
+
use Tribe__Utils__Array as Arr;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class Webhooks
|
11 |
+
*
|
12 |
+
* @since 5.1.10
|
13 |
+
*
|
14 |
+
* @package TEC\Tickets\Commerce\Gateways\PayPal
|
15 |
+
*/
|
16 |
+
class Webhooks {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Returns the options key for webhook settings in the merchant mode.
|
20 |
+
*
|
21 |
+
* @since 5.1.10
|
22 |
+
*
|
23 |
+
* @return string
|
24 |
+
*/
|
25 |
+
public function get_settings_key() {
|
26 |
+
$gateway_key = Gateway::get_key();
|
27 |
+
$merchant_mode = tribe( Merchant::class )->get_mode();
|
28 |
+
|
29 |
+
return "tec_tickets_commerce_{$gateway_key}_{$merchant_mode}_webhooks_settings";
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Retrieves the settings for the webhooks from the database.
|
34 |
+
*
|
35 |
+
* @since 5.1.10
|
36 |
+
*
|
37 |
+
* @param array|string $key Specify each nested index in order.
|
38 |
+
* Example: array( 'lvl1', 'lvl2' );
|
39 |
+
* @param mixed $default Default value if the search finds nothing.
|
40 |
+
*
|
41 |
+
* @return mixed
|
42 |
+
*/
|
43 |
+
public function get_setting( $key, $default = null ) {
|
44 |
+
$settings = get_option( $this->get_settings_key(), null );
|
45 |
+
|
46 |
+
return Arr::get( $settings, $key, $default );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Saves the webhook settings in the database.
|
51 |
+
*
|
52 |
+
* @since 5.1.10
|
53 |
+
*
|
54 |
+
* @param array $settings []
|
55 |
+
*
|
56 |
+
* @return bool
|
57 |
+
*/
|
58 |
+
public function update_settings( array $settings = [] ) {
|
59 |
+
return update_option( $this->get_settings_key(), $settings );
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Retrieves the settings for the webhooks from the database.
|
64 |
+
*
|
65 |
+
* @since 5.1.10
|
66 |
+
*
|
67 |
+
* @return array|null
|
68 |
+
*/
|
69 |
+
public function get_settings() {
|
70 |
+
$settings = get_option( $this->get_settings_key(), null );
|
71 |
+
|
72 |
+
// Without an ID, the webhook settings are invalid.
|
73 |
+
if ( empty( $settings['id'] ) ) {
|
74 |
+
return null;
|
75 |
+
}
|
76 |
+
|
77 |
+
return $settings;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Deletes the stored webhook settings.
|
82 |
+
*
|
83 |
+
* @since 5.1.10
|
84 |
+
*
|
85 |
+
* @return bool
|
86 |
+
*/
|
87 |
+
public function delete_settings() {
|
88 |
+
return delete_option( $this->get_settings_key() );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Creates or updates the Webhook associated with this site.
|
93 |
+
*
|
94 |
+
* @since 5.1.10
|
95 |
+
*
|
96 |
+
* @return bool|\WP_Error
|
97 |
+
*/
|
98 |
+
public function create_or_update_existing() {
|
99 |
+
$client = tribe( Client::class );
|
100 |
+
$existing_id = $this->get_setting( 'id' );
|
101 |
+
|
102 |
+
// When we dont have a webhook we try to create.
|
103 |
+
if ( ! $existing_id ) {
|
104 |
+
$webhook = $client->create_webhook();
|
105 |
+
// Update the settings if a new webhook was created.
|
106 |
+
if ( ! is_wp_error( $webhook ) ) {
|
107 |
+
return $this->update_settings( $webhook );
|
108 |
+
}
|
109 |
+
|
110 |
+
if ( 'tec-tickets-commerce-gateway-paypal-webhook-url-already-exists' === $webhook->get_error_code() ) {
|
111 |
+
$existing_webhooks = $client->list_webhooks();
|
112 |
+
$existing_webhooks = array_filter( array_map( static function ( $webhook ) {
|
113 |
+
if ( tribe( Webhook_Endpoint::class )->get_route_url() !== $webhook['url'] ) {
|
114 |
+
return null;
|
115 |
+
}
|
116 |
+
|
117 |
+
return $webhook;
|
118 |
+
}, $existing_webhooks ) );
|
119 |
+
if ( empty( $existing_webhooks ) ) {
|
120 |
+
return new \WP_Error( 'tec-tickets-commerce-gateway-paypal-webhook-unexpected-update-create' );
|
121 |
+
}
|
122 |
+
$existing_webhook = current( $existing_webhooks );
|
123 |
+
|
124 |
+
if ( ! $this->needs_update( $existing_webhook ) ) {
|
125 |
+
// We found a existing webhook that matched the URL but we just save it to the DB since it was up-to-date.
|
126 |
+
return $this->update_settings( $existing_webhook );
|
127 |
+
}
|
128 |
+
|
129 |
+
$webhook = $client->update_webhook( $existing_id );
|
130 |
+
// Update the settings if the webhook was updated.
|
131 |
+
if ( ! is_wp_error( $webhook ) ) {
|
132 |
+
return $this->update_settings( $webhook );
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
// Returns the failed webhook creation or update.
|
137 |
+
return $webhook;
|
138 |
+
}
|
139 |
+
|
140 |
+
if ( ! $this->needs_update() ) {
|
141 |
+
return true;
|
142 |
+
}
|
143 |
+
|
144 |
+
$webhook = $client->update_webhook( $existing_id );
|
145 |
+
// Update the settings if the webhook was updated.
|
146 |
+
if ( ! is_wp_error( $webhook ) ) {
|
147 |
+
return $this->update_settings( $webhook );
|
148 |
+
}
|
149 |
+
|
150 |
+
$webhook = $client->create_webhook();
|
151 |
+
// Update the settings if a new webhook was created.
|
152 |
+
if ( ! is_wp_error( $webhook ) ) {
|
153 |
+
return $this->update_settings( $webhook );
|
154 |
+
}
|
155 |
+
|
156 |
+
// Returns the failed webhook creation or update.
|
157 |
+
return $webhook;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Determines if a given webhook set needs to be updated based on the current values.
|
162 |
+
*
|
163 |
+
* @since 5.1.10
|
164 |
+
*
|
165 |
+
* @param array $webhook Current webhook set, if null will pull from DB.
|
166 |
+
*
|
167 |
+
* @return bool
|
168 |
+
*/
|
169 |
+
public function needs_update( $webhook = null ) {
|
170 |
+
if ( ! is_array( $webhook ) ) {
|
171 |
+
$webhook = $this->get_settings();
|
172 |
+
}
|
173 |
+
|
174 |
+
// If these are not valid indexes, we just say we need an update.
|
175 |
+
if ( ! isset( $webhook['url'], $webhook['event_types'] ) ) {
|
176 |
+
return true;
|
177 |
+
}
|
178 |
+
|
179 |
+
$url = Arr::get( $webhook, 'url' );
|
180 |
+
|
181 |
+
if ( $url !== tribe( Webhook_Endpoint::class )->get_route_url() ) {
|
182 |
+
return true;
|
183 |
+
}
|
184 |
+
|
185 |
+
$event_types = wp_list_pluck( Arr::get( $webhook, 'event_types' ), 'name' );
|
186 |
+
|
187 |
+
$has_diff_events = array_diff( tribe( Events::class )->get_registered_events(), $event_types );
|
188 |
+
if ( ! empty( $has_diff_events ) ) {
|
189 |
+
return true;
|
190 |
+
}
|
191 |
+
|
192 |
+
return false;
|
193 |
+
}
|
194 |
+
}
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Events.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Status as Commerce_Status;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class Events
|
9 |
+
*
|
10 |
+
* @since 5.1.10
|
11 |
+
*
|
12 |
+
* @package TEC\Tickets\Commerce\Gateways\PayPal\Webhooks
|
13 |
+
*/
|
14 |
+
class Events {
|
15 |
+
/**
|
16 |
+
* Webhook Event name for a capture of completed payment.
|
17 |
+
*
|
18 |
+
* @since 5.1.10
|
19 |
+
*
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
const PAYMENT_CAPTURE_COMPLETED = 'PAYMENT.CAPTURE.COMPLETED';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Webhook Event name for a capture of denied payment.
|
26 |
+
*
|
27 |
+
* @since 5.1.10
|
28 |
+
*
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
const PAYMENT_CAPTURE_DENIED = 'PAYMENT.CAPTURE.DENIED';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Webhook Event name for a capture of refunded payment.
|
35 |
+
*
|
36 |
+
* @since 5.1.10
|
37 |
+
*
|
38 |
+
* @var string
|
39 |
+
*/
|
40 |
+
const PAYMENT_CAPTURE_REFUNDED = 'PAYMENT.CAPTURE.REFUNDED';
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Webhook Event name for a capture of reversed payment.
|
44 |
+
*
|
45 |
+
* @since 5.1.10
|
46 |
+
*
|
47 |
+
* @var string
|
48 |
+
*/
|
49 |
+
const PAYMENT_CAPTURE_REVERSED = 'PAYMENT.CAPTURE.REVERSED';
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Default mapping from PayPal Status to Tickets Commerce.
|
53 |
+
*
|
54 |
+
* @since 5.1.10
|
55 |
+
*
|
56 |
+
* @var array
|
57 |
+
*/
|
58 |
+
protected $default_map = [
|
59 |
+
self::PAYMENT_CAPTURE_COMPLETED => Commerce_Status\Completed::SLUG,
|
60 |
+
self::PAYMENT_CAPTURE_DENIED => Commerce_Status\Denied::SLUG,
|
61 |
+
self::PAYMENT_CAPTURE_REFUNDED => Commerce_Status\Refunded::SLUG,
|
62 |
+
self::PAYMENT_CAPTURE_REVERSED => Commerce_Status\Reversed::SLUG,
|
63 |
+
];
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Gets the valid mapping of the webhook events.
|
67 |
+
*
|
68 |
+
* @since 5.1.10
|
69 |
+
*
|
70 |
+
* @return array
|
71 |
+
*/
|
72 |
+
public function get_valid() {
|
73 |
+
/**
|
74 |
+
* Allows filtering of the Webhook map of events for each one of the types we listen for.
|
75 |
+
*
|
76 |
+
* @since 5.1.10
|
77 |
+
*
|
78 |
+
* @param array $map The default map of which event types that translate to a given Status class.
|
79 |
+
*/
|
80 |
+
return apply_filters( 'tec_tickets_commerce_gateway_paypal_webook_events_map', $this->default_map );
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Returns of a list of the Webhook events we are listening to.
|
85 |
+
*
|
86 |
+
* @since 5.1.10
|
87 |
+
*
|
88 |
+
* @return string[]
|
89 |
+
*/
|
90 |
+
public function get_registered_events() {
|
91 |
+
return array_keys( $this->get_valid() );
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Checks if a given PayPal webhook event name is valid.
|
96 |
+
*
|
97 |
+
* @since 5.1.10
|
98 |
+
*
|
99 |
+
* @param string $event_name A PayPal Event String.
|
100 |
+
*
|
101 |
+
* @return bool
|
102 |
+
*/
|
103 |
+
public function is_valid( $event_name ) {
|
104 |
+
$events_map = $this->get_valid();
|
105 |
+
|
106 |
+
return isset( $events_map[ $event_name ] );
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Converts a valid PayPal webhook event name into a commerce status object.
|
111 |
+
*
|
112 |
+
* @since 5.1.10
|
113 |
+
*
|
114 |
+
* @param string $event_name A PayPal Event String.
|
115 |
+
*
|
116 |
+
* @return false|Commerce_Status\Status_Interface|null
|
117 |
+
*/
|
118 |
+
public function convert_to_commerce_status( $event_name ) {
|
119 |
+
if ( ! $this->is_valid( $event_name ) ) {
|
120 |
+
return false;
|
121 |
+
}
|
122 |
+
$events_map = $this->get_valid();
|
123 |
+
|
124 |
+
return tribe( Commerce_Status\Status_Handler::class )->get_by_slug( $events_map[ $event_name ] );
|
125 |
+
}
|
126 |
+
|
127 |
+
}
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Handler.php
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
4 |
+
|
5 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Client;
|
6 |
+
use TEC\Tickets\Commerce\Order;
|
7 |
+
use WP_Error;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class Handler
|
11 |
+
*
|
12 |
+
* @since 5.1.10
|
13 |
+
*
|
14 |
+
* @package TEC\Tickets\Commerce\Gateways\PayPal\Webhooks
|
15 |
+
*/
|
16 |
+
class Handler {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Gets the parent payment link from the list of Links on the response.
|
20 |
+
*
|
21 |
+
* @since 5.1.10
|
22 |
+
*
|
23 |
+
* @param array $links
|
24 |
+
*
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
protected function get_parent_payment_link( $links ) {
|
28 |
+
return current( array_filter( $links, static function ( $link ) {
|
29 |
+
return 'parent_payment' === $link['rel'];
|
30 |
+
} ) );
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Process a given PayPal Webhook event, possibly updating the local order with the status sent by the request.
|
35 |
+
*
|
36 |
+
* @since 5.1.10
|
37 |
+
*
|
38 |
+
* @param array $event The PayPal payment event object.
|
39 |
+
*
|
40 |
+
* @return \WP_Post|WP_Error Whether the event was processed successfully.
|
41 |
+
*/
|
42 |
+
public function process_event( $event ) {
|
43 |
+
// Invalid event.
|
44 |
+
if ( empty( $event['event_type'] ) || empty( $event['resource'] ) ) {
|
45 |
+
return new WP_Error( 'tec-tickets-commerce-paypal-webhook-invalid-payload', null, [ 'event' => $event ] );
|
46 |
+
}
|
47 |
+
|
48 |
+
// Check if the event type matches.
|
49 |
+
if ( ! tribe( Events::class )->is_valid( $event['event_type'] ) ) {
|
50 |
+
tribe( 'logger' )->log_debug(
|
51 |
+
sprintf(
|
52 |
+
// Translators: %s: The PayPal payment event.
|
53 |
+
__( 'Invalid event type for webhook event: %s', 'event-tickets' ),
|
54 |
+
json_encode( $event )
|
55 |
+
),
|
56 |
+
'tickets-commerce-gateway-paypal'
|
57 |
+
);
|
58 |
+
|
59 |
+
return new WP_Error( 'tec-tickets-commerce-paypal-webhook-invalid-type', null, [ 'event' => $event ] );
|
60 |
+
}
|
61 |
+
|
62 |
+
$new_status = tribe( Events::class )->convert_to_commerce_status( $event['event_type'] );
|
63 |
+
|
64 |
+
$link = $this->get_parent_payment_link( $event['resource']['links'] );
|
65 |
+
|
66 |
+
$parent_payment = tribe( Client::class )->request( $link['method'], $link['url'] );
|
67 |
+
|
68 |
+
if ( ! $parent_payment ) {
|
69 |
+
tribe( 'logger' )->log_debug(
|
70 |
+
sprintf(
|
71 |
+
// Translators: %s: The PayPal payment event.
|
72 |
+
__( 'Missing PayPal payment for webhook event: %s', 'event-tickets' ),
|
73 |
+
json_encode( $event )
|
74 |
+
),
|
75 |
+
'tickets-commerce-gateway-paypal'
|
76 |
+
);
|
77 |
+
|
78 |
+
return new WP_Error( 'tec-tickets-commerce-paypal-webhook-invalid-parent-payment', null, [
|
79 |
+
'parent_payment' => $parent_payment,
|
80 |
+
'event' => $event
|
81 |
+
] );
|
82 |
+
}
|
83 |
+
|
84 |
+
$order = tec_tc_orders()->by_args( [
|
85 |
+
'status' => 'any',
|
86 |
+
'gateway_order_id' => $parent_payment['id'],
|
87 |
+
] )->first();
|
88 |
+
|
89 |
+
// If there's no matching payment then it's not tracked by Tickets Commerce.
|
90 |
+
if ( ! $order instanceof \WP_Post ) {
|
91 |
+
tribe( 'logger' )->log_debug(
|
92 |
+
sprintf(
|
93 |
+
// Translators: %s: The PayPal payment ID.
|
94 |
+
__( 'Missing order for PayPal payment from webhook: %s', 'event-tickets' ),
|
95 |
+
$parent_payment['id']
|
96 |
+
),
|
97 |
+
'tickets-commerce-gateway-paypal'
|
98 |
+
);
|
99 |
+
|
100 |
+
return new WP_Error( 'tec-tickets-commerce-paypal-webhook-order-not-found', null, [
|
101 |
+
'parent_payment' => $parent_payment,
|
102 |
+
'order' => $order,
|
103 |
+
'event' => $event
|
104 |
+
] );
|
105 |
+
}
|
106 |
+
|
107 |
+
// Don't do anything if the status is already set.
|
108 |
+
if ( $new_status->get_wp_slug() === $order->post_status ) {
|
109 |
+
tribe( 'logger' )->log_debug(
|
110 |
+
sprintf(
|
111 |
+
// Translators: %s: The PayPal payment ID.
|
112 |
+
__( 'PayPal Order "%1$s" already on status "%2$s" from webhook: %3$s', 'event-tickets' ),
|
113 |
+
$parent_payment['id'],
|
114 |
+
$new_status->get_slug(),
|
115 |
+
json_encode( $event )
|
116 |
+
),
|
117 |
+
'tickets-commerce-gateway-paypal'
|
118 |
+
);
|
119 |
+
|
120 |
+
return new WP_Error( 'tec-tickets-commerce-paypal-webhook-order-status-already-updated', null, [
|
121 |
+
'parent_payment' => $parent_payment,
|
122 |
+
'order' => $order,
|
123 |
+
'new_status' => $new_status,
|
124 |
+
'event' => $event
|
125 |
+
] );
|
126 |
+
}
|
127 |
+
|
128 |
+
$updated = tribe( Order::class )->modify_status( $order->ID, $new_status->get_slug(), [
|
129 |
+
'gateway_payload' => $event,
|
130 |
+
] );
|
131 |
+
|
132 |
+
tribe( 'logger' )->log_debug(
|
133 |
+
sprintf(
|
134 |
+
// Translators: %1$s: The status name; %2$s: The payment information.
|
135 |
+
__( 'Change %1$s in PayPal from webhook: %2$s', 'event-tickets' ),
|
136 |
+
$new_status->get_slug(),
|
137 |
+
sprintf( '[Order ID: %s; PayPal Payment ID: %s]', $order->ID, $parent_payment['id'] )
|
138 |
+
),
|
139 |
+
'tickets-commerce-gateway-paypal'
|
140 |
+
);
|
141 |
+
|
142 |
+
return $updated;
|
143 |
+
}
|
144 |
+
|
145 |
+
}
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Headers.php
DELETED
@@ -1,106 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Class Headers.
|
9 |
-
*
|
10 |
-
* @since 5.1.6
|
11 |
-
*
|
12 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Webhooks
|
13 |
-
*/
|
14 |
-
class Headers {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @since 5.1.6
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
public $transmission_id;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* @since 5.1.6
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
-
public $transmission_time;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @since 5.1.6
|
30 |
-
* @var string
|
31 |
-
*/
|
32 |
-
public $transmission_sig;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* @since 5.1.6
|
36 |
-
* @var string
|
37 |
-
*/
|
38 |
-
public $cert_url;
|
39 |
-
|
40 |
-
/**
|
41 |
-
* @since 5.1.6
|
42 |
-
* @var string
|
43 |
-
*/
|
44 |
-
public $auth_algo;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* This grabs the headers from the webhook request to be used in the signature verification
|
48 |
-
*
|
49 |
-
* A strange thing here is that the headers are inconsistent between live and sandbox mode, so this also checks for
|
50 |
-
* both forms of the headers (studly case and all caps).
|
51 |
-
*
|
52 |
-
* @since 5.1.6
|
53 |
-
*
|
54 |
-
* @throws \HttpHeaderException
|
55 |
-
*
|
56 |
-
* @param array $headers
|
57 |
-
*
|
58 |
-
* @return self
|
59 |
-
*/
|
60 |
-
public static function from_headers( array $headers ) {
|
61 |
-
$header_keys = [
|
62 |
-
'transmission_id' => 'Paypal-Transmission-Id',
|
63 |
-
'transmission_time' => 'Paypal-Transmission-Time',
|
64 |
-
'transmission_sig' => 'Paypal-Transmission-Sig',
|
65 |
-
'cert_url' => 'Paypal-Cert-Url',
|
66 |
-
'auth_algo' => 'Paypal-Auth-Algo',
|
67 |
-
];
|
68 |
-
|
69 |
-
$paypal_headers = new self();
|
70 |
-
$missing_keys = [];
|
71 |
-
foreach ( $header_keys as $property => $key ) {
|
72 |
-
if ( ! isset( $headers[ $key ] ) ) {
|
73 |
-
$key = str_replace( '-', '_', $key );
|
74 |
-
$key = strtoupper( $key );
|
75 |
-
|
76 |
-
if ( ! isset( $headers[ $key ] ) ) {
|
77 |
-
$key = strtolower( $key );
|
78 |
-
}
|
79 |
-
}
|
80 |
-
|
81 |
-
if ( isset( $headers[ $key ] ) ) {
|
82 |
-
$paypal_headers->{$property} = $headers[ $key ];
|
83 |
-
} else {
|
84 |
-
$missing_keys[] = $key;
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
88 |
-
if ( ! empty( $missing_keys ) ) {
|
89 |
-
tribe( 'logger' )->log_error(
|
90 |
-
sprintf(
|
91 |
-
// Translators: %s: The missing keys and header information.
|
92 |
-
__( 'Missing PayPal webhook header: %s', 'event-tickets' ),
|
93 |
-
json_encode( [
|
94 |
-
'missing_keys' => $missing_keys,
|
95 |
-
'headers' => $headers,
|
96 |
-
] )
|
97 |
-
),
|
98 |
-
'tickets-commerce-paypal-commerce'
|
99 |
-
);
|
100 |
-
|
101 |
-
throw new Exception( "Missing PayPal header: $key" );
|
102 |
-
}
|
103 |
-
|
104 |
-
return $paypal_headers;
|
105 |
-
}
|
106 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Event_Listener.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners;
|
4 |
-
|
5 |
-
interface Event_Listener {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* This processes the PayPal Commerce webhook event passed to it.
|
9 |
-
*
|
10 |
-
* @since 5.1.6
|
11 |
-
*
|
12 |
-
* @param object $event The PayPal payment event object.
|
13 |
-
*
|
14 |
-
* @return bool Whether the event was processed successfully.
|
15 |
-
*/
|
16 |
-
public function process_event( $event );
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Capture_Completed.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class PaymentCaptureCompleted
|
7 |
-
*
|
8 |
-
* @since 5.1.6
|
9 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
class Payment_Capture_Completed extends Payment_Event_Listener {
|
13 |
-
/**
|
14 |
-
* The new status to set with successful event.
|
15 |
-
*
|
16 |
-
* @since 5.1.6
|
17 |
-
*
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
protected $new_status = 'completed';
|
21 |
-
|
22 |
-
/**
|
23 |
-
* The event type.
|
24 |
-
*
|
25 |
-
* @since 5.1.6
|
26 |
-
*
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
protected $event_type = 'PAYMENT.CAPTURE.COMPLETED';
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Capture_Denied.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class PaymentCaptureDenied
|
7 |
-
*
|
8 |
-
* @since 5.1.6
|
9 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
class Payment_Capture_Denied extends Payment_Event_Listener {
|
13 |
-
/**
|
14 |
-
* The new status to set with successful event.
|
15 |
-
*
|
16 |
-
* @since 5.1.6
|
17 |
-
*
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
protected $new_status = 'denied';
|
21 |
-
|
22 |
-
/**
|
23 |
-
* The event type.
|
24 |
-
*
|
25 |
-
* @since 5.1.6
|
26 |
-
*
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
protected $event_type = 'PAYMENT.CAPTURE.DENIED';
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Capture_Refunded.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class PaymentCaptureRefunded
|
7 |
-
*
|
8 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners
|
9 |
-
*
|
10 |
-
* @since 5.1.6
|
11 |
-
*/
|
12 |
-
class Payment_Capture_Refunded extends Payment_Event_Listener {
|
13 |
-
/**
|
14 |
-
* The new status to set with successful event.
|
15 |
-
*
|
16 |
-
* @since 5.1.6
|
17 |
-
*
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
protected $new_status = 'refunded';
|
21 |
-
|
22 |
-
/**
|
23 |
-
* The event type.
|
24 |
-
*
|
25 |
-
* @since 5.1.6
|
26 |
-
*
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
protected $event_type = 'PAYMENT.CAPTURE.REFUNDED';
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Capture_Reversed.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Class PaymentCaptureReversed
|
7 |
-
*
|
8 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners
|
9 |
-
*
|
10 |
-
* @since 5.1.6
|
11 |
-
*/
|
12 |
-
class Payment_Capture_Reversed extends Payment_Event_Listener {
|
13 |
-
/**
|
14 |
-
* The new status to set with successful event.
|
15 |
-
*
|
16 |
-
* @since 5.1.6
|
17 |
-
*
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
protected $new_status = 'reversed';
|
21 |
-
|
22 |
-
/**
|
23 |
-
* The event type.
|
24 |
-
*
|
25 |
-
* @since 5.1.6
|
26 |
-
*
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
protected $event_type = 'PAYMENT.CAPTURE.REVERSED';
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Listeners/Payment_Event_Listener.php
DELETED
@@ -1,248 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners;
|
4 |
-
|
5 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
6 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Repositories\Webhooks;
|
7 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Webhook_Register;
|
8 |
-
use WP_Post;
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class PaymentEventListener
|
12 |
-
*
|
13 |
-
* @since 5.1.6
|
14 |
-
* @package TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners
|
15 |
-
*
|
16 |
-
*/
|
17 |
-
abstract class Payment_Event_Listener implements Event_Listener {
|
18 |
-
/**
|
19 |
-
* @since 5.1.6
|
20 |
-
*
|
21 |
-
* @var Merchant
|
22 |
-
*/
|
23 |
-
private $merchant;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* @since 5.1.6
|
27 |
-
*
|
28 |
-
* @var Webhooks
|
29 |
-
*/
|
30 |
-
private $webhook_repository;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* @since 5.1.6
|
34 |
-
*
|
35 |
-
* @var Webhook_Register
|
36 |
-
*/
|
37 |
-
private $webhook_register;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* The new status to set with successful event.
|
41 |
-
*
|
42 |
-
* @since 5.1.6
|
43 |
-
*
|
44 |
-
* @var string
|
45 |
-
*/
|
46 |
-
protected $new_status = '';
|
47 |
-
|
48 |
-
/**
|
49 |
-
* The event type.
|
50 |
-
*
|
51 |
-
* @since 5.1.6
|
52 |
-
*
|
53 |
-
* @var string
|
54 |
-
*/
|
55 |
-
protected $event_type = '';
|
56 |
-
|
57 |
-
/**
|
58 |
-
* PaymentEventListener constructor.
|
59 |
-
*
|
60 |
-
* @since 5.1.6
|
61 |
-
*
|
62 |
-
* @param Merchant $merchant
|
63 |
-
* @param Webhook_Register $register
|
64 |
-
* @param Webhooks $webhook_repository
|
65 |
-
*/
|
66 |
-
public function __construct( Merchant $merchant, Webhook_Register $register, Webhooks $webhook_repository ) {
|
67 |
-
$this->merchant = $merchant;
|
68 |
-
$this->webhook_register = $register;
|
69 |
-
$this->webhook_repository = $webhook_repository;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* {@inheritDoc}
|
74 |
-
*
|
75 |
-
* @since 5.1.6
|
76 |
-
*
|
77 |
-
* @param object $event The PayPal payment event object.
|
78 |
-
*
|
79 |
-
* @return bool Whether the event was processed successfully.
|
80 |
-
*/
|
81 |
-
public function process_event( $event ) {
|
82 |
-
// No status set.
|
83 |
-
if ( ! $this->new_status ) {
|
84 |
-
return false;
|
85 |
-
}
|
86 |
-
|
87 |
-
// Invalid event.
|
88 |
-
if ( empty( $event->event_type ) || empty( $event->resource ) ) {
|
89 |
-
return false;
|
90 |
-
}
|
91 |
-
|
92 |
-
// Check if the event type matches.
|
93 |
-
if ( $this->event_type !== $event->event_type ) {
|
94 |
-
tribe( 'logger' )->log_debug(
|
95 |
-
sprintf(
|
96 |
-
// Translators: %s: The PayPal payment event.
|
97 |
-
__( 'Mismatched event type for webhook event: %s', 'event-tickets' ),
|
98 |
-
json_encode( $event )
|
99 |
-
),
|
100 |
-
'tickets-commerce-paypal-commerce'
|
101 |
-
);
|
102 |
-
|
103 |
-
return false;
|
104 |
-
}
|
105 |
-
|
106 |
-
$payment_id = $this->get_parent_payment_id_from_payment( $event->resource );
|
107 |
-
|
108 |
-
if ( ! $payment_id ) {
|
109 |
-
tribe( 'logger' )->log_debug(
|
110 |
-
sprintf(
|
111 |
-
// Translators: %s: The PayPal payment event.
|
112 |
-
__( 'Missing PayPal payment for webhook event: %s', 'event-tickets' ),
|
113 |
-
json_encode( $event )
|
114 |
-
),
|
115 |
-
'tickets-commerce-paypal-commerce'
|
116 |
-
);
|
117 |
-
|
118 |
-
return false;
|
119 |
-
}
|
120 |
-
|
121 |
-
$payment = $this->get_order_by_payment_id( $payment_id );
|
122 |
-
|
123 |
-
// If there's no matching payment then it's not tracked by Tickets Commerce.
|
124 |
-
if ( ! $payment ) {
|
125 |
-
tribe( 'logger' )->log_debug(
|
126 |
-
sprintf(
|
127 |
-
// Translators: %s: The PayPal payment ID.
|
128 |
-
__( 'Missing order for PayPal payment from webhook: %s', 'event-tickets' ),
|
129 |
-
$payment_id
|
130 |
-
),
|
131 |
-
'tickets-commerce-paypal-commerce'
|
132 |
-
);
|
133 |
-
|
134 |
-
return false;
|
135 |
-
}
|
136 |
-
|
137 |
-
// Don't do anything if the status is already set.
|
138 |
-
if ( $this->new_status === $payment->post_status ) {
|
139 |
-
return false;
|
140 |
-
}
|
141 |
-
|
142 |
-
// Update the status.
|
143 |
-
$post_data = [
|
144 |
-
'ID' => $payment->ID,
|
145 |
-
'post_status' => $this->new_status,
|
146 |
-
];
|
147 |
-
|
148 |
-
wp_update_post( $post_data );
|
149 |
-
|
150 |
-
tribe( 'logger' )->log_debug(
|
151 |
-
sprintf(
|
152 |
-
// Translators: %1$s: The status name; %2$s: The payment information.
|
153 |
-
__( 'Change %1$s in PayPal from webhook: %2$s', 'event-tickets' ),
|
154 |
-
$this->new_status,
|
155 |
-
sprintf( '[Order ID: %s; PayPal Payment ID: %s]', $payment->ID, $payment_id )
|
156 |
-
),
|
157 |
-
'tickets-commerce-paypal-commerce'
|
158 |
-
);
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Allow hooking into the listener status.
|
162 |
-
*
|
163 |
-
* @since 5.1.6
|
164 |
-
*
|
165 |
-
* @param WP_Post $payment The payment object.
|
166 |
-
* @param string $payment_id The PayPal payment ID.
|
167 |
-
* @param object $event The PayPal webhook event.
|
168 |
-
* @param string $new_status The new order status.
|
169 |
-
*/
|
170 |
-
do_action( 'tribe_tickets_commerce_gateways_paypal_commerce_webhooks_listeners', $payment, $payment_id, $event, $this->new_status );
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Allow hooking into the listener status for the new status.
|
174 |
-
*
|
175 |
-
* @since 5.1.6
|
176 |
-
*
|
177 |
-
* @param WP_Post $payment The payment object.
|
178 |
-
* @param string $payment_id The PayPal payment ID.
|
179 |
-
* @param object $event The PayPal webhook event.
|
180 |
-
*/
|
181 |
-
do_action( "tribe_tickets_commerce_gateways_paypal_commerce_webhooks_listeners_{$this->new_status}", $payment, $payment_id, $event );
|
182 |
-
|
183 |
-
return true;
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Get the order using the PayPal payment ID.
|
188 |
-
*
|
189 |
-
* @since 5.1.6
|
190 |
-
*
|
191 |
-
* @param string $id The PayPal payment ID.
|
192 |
-
*
|
193 |
-
* @return \WP_Post|null The matching order or null if not found.
|
194 |
-
*/
|
195 |
-
public function get_order_by_payment_id( $id ) {
|
196 |
-
$orm = tribe_tickets_orders( 'tribe-commerce' );
|
197 |
-
|
198 |
-
return $orm->by( 'id', $id )->first();
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* This uses the links property of the payment to retrieve the Parent Payment ID from PayPal
|
203 |
-
*
|
204 |
-
* @since 5.1.6
|
205 |
-
*
|
206 |
-
* @param object $payment The payment event object.
|
207 |
-
*
|
208 |
-
* @return string|false The parent payment ID or false if not found.
|
209 |
-
*/
|
210 |
-
private function get_parent_payment_id_from_payment( $payment ) {
|
211 |
-
$link = current( array_filter( $payment->links, static function ( $link ) {
|
212 |
-
return $link->rel === 'up';
|
213 |
-
} ) );
|
214 |
-
|
215 |
-
if ( ! $link ) {
|
216 |
-
return false;
|
217 |
-
}
|
218 |
-
|
219 |
-
$request = wp_remote_request( $link->href, [
|
220 |
-
'method' => $link->method,
|
221 |
-
'headers' => [
|
222 |
-
'Content-Type' => 'application/json',
|
223 |
-
'Authorization' => "Bearer {$this->merchant->get_access_token()}",
|
224 |
-
],
|
225 |
-
] );
|
226 |
-
|
227 |
-
if ( is_wp_error( $request ) ) {
|
228 |
-
tribe( 'logger' )->log_error( sprintf(
|
229 |
-
// Translators: %s: The error message.
|
230 |
-
__( 'PayPal capture request error: %s', 'event-tickets' ),
|
231 |
-
$request->get_error_message()
|
232 |
-
), 'tickets-commerce-paypal-commerce' );
|
233 |
-
|
234 |
-
return false;
|
235 |
-
}
|
236 |
-
|
237 |
-
$response = wp_remote_retrieve_body( $request );
|
238 |
-
$response = @json_decode( $response );
|
239 |
-
|
240 |
-
if ( ! $response || empty( $response->id ) ) {
|
241 |
-
tribe( 'logger' )->log_error( __( 'Unexpected PayPal capture response', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
242 |
-
|
243 |
-
return false;
|
244 |
-
}
|
245 |
-
|
246 |
-
return (string) $response->id;
|
247 |
-
}
|
248 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Webhook_Checker.php
DELETED
@@ -1,104 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
7 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Repositories\Webhooks;
|
8 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Webhooks_Route;
|
9 |
-
|
10 |
-
class Webhook_Checker {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* @since 5.1.6
|
14 |
-
*
|
15 |
-
* @var Webhooks
|
16 |
-
*/
|
17 |
-
private $webhooks_repository;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* @since 5.1.6
|
21 |
-
*
|
22 |
-
* @var Webhooks_Route
|
23 |
-
*/
|
24 |
-
private $webhooks_route;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @since 5.1.6
|
28 |
-
*
|
29 |
-
* @var Webhook_Register
|
30 |
-
*/
|
31 |
-
private $webhook_register;
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @since 5.1.6
|
35 |
-
*
|
36 |
-
* @var Merchant
|
37 |
-
*/
|
38 |
-
private $merchant;
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Webhook_Checker constructor.
|
42 |
-
*
|
43 |
-
* @since 5.1.6
|
44 |
-
*
|
45 |
-
* @param Webhooks $webhooks_repository
|
46 |
-
* @param Merchant $merchant
|
47 |
-
* @param Webhooks_Route $webhooks_route
|
48 |
-
* @param Webhook_Register $webhook_register
|
49 |
-
*/
|
50 |
-
public function __construct( Webhooks $webhooks_repository, Merchant $merchant, Webhooks_Route $webhooks_route, Webhook_Register $webhook_register ) {
|
51 |
-
$this->webhooks_repository = $webhooks_repository;
|
52 |
-
$this->merchant = $merchant;
|
53 |
-
$this->webhooks_route = $webhooks_route;
|
54 |
-
$this->webhook_register = $webhook_register;
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Checks whether the webhook configuration has changed. If it has, then update the webhook with PayPal.
|
59 |
-
*
|
60 |
-
* @since 5.1.6
|
61 |
-
*/
|
62 |
-
public function check_webhook_criteria() {
|
63 |
-
if ( wp_doing_ajax() || wp_doing_cron() ) {
|
64 |
-
return;
|
65 |
-
}
|
66 |
-
|
67 |
-
if ( ! $this->merchant->get_access_token() ) {
|
68 |
-
return;
|
69 |
-
}
|
70 |
-
|
71 |
-
$webhook_config = $this->webhooks_repository->get_webhook_config();
|
72 |
-
|
73 |
-
if ( $webhook_config === null ) {
|
74 |
-
return;
|
75 |
-
}
|
76 |
-
|
77 |
-
$webhook_url = $this->webhooks_route->get_route_url();
|
78 |
-
$registered_events = $this->webhook_register->get_registered_events();
|
79 |
-
|
80 |
-
$missing_events = array_merge(
|
81 |
-
array_diff( $registered_events, $webhook_config->events ),
|
82 |
-
array_diff( $webhook_config->events, $registered_events )
|
83 |
-
);
|
84 |
-
$has_missing_events = ! empty( $missing_events );
|
85 |
-
|
86 |
-
// Update the webhook if the return url or events have changed
|
87 |
-
if ( $webhook_url !== $webhook_config->return_url || $has_missing_events ) {
|
88 |
-
try {
|
89 |
-
$this->webhooks_repository->update_webhook( $this->merchant->get_access_token(), $webhook_config->id );
|
90 |
-
|
91 |
-
$webhook_config->return_url = $webhook_url;
|
92 |
-
$webhook_config->events = $registered_events;
|
93 |
-
|
94 |
-
$this->webhooks_repository->save_webhook_config( $webhook_config );
|
95 |
-
} catch ( Exception $exception ) {
|
96 |
-
// @todo Replace this with a notice / log.
|
97 |
-
tribe( 'logger' )->log_error(
|
98 |
-
__( 'There was a problem updating your PayPal Payments webhook. Please disconnect your account and reconnect it.', 'event-tickets' ),
|
99 |
-
'tickets-commerce-paypal-commerce'
|
100 |
-
);
|
101 |
-
}
|
102 |
-
}
|
103 |
-
}
|
104 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Webhook_Register.php
DELETED
@@ -1,104 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
4 |
-
|
5 |
-
use InvalidArgumentException;
|
6 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners\Event_Listener;
|
7 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners\Payment_Capture_Completed;
|
8 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners\Payment_Capture_Denied;
|
9 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners\Payment_Capture_Refunded;
|
10 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Listeners\Payment_Capture_Reversed;
|
11 |
-
|
12 |
-
class Webhook_Register {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Array of the PayPal webhook event handlers. Add-ons can use the registerEventHandler method
|
16 |
-
* to add additional events/handlers.
|
17 |
-
*
|
18 |
-
* Structure: PayPalEventName => EventHandlerClass
|
19 |
-
*
|
20 |
-
* @since 5.1.6
|
21 |
-
*
|
22 |
-
* @var string[]
|
23 |
-
*/
|
24 |
-
private $event_handlers = [
|
25 |
-
'PAYMENT.CAPTURE.COMPLETED' => Payment_Capture_Completed::class,
|
26 |
-
'PAYMENT.CAPTURE.DENIED' => Payment_Capture_Denied::class,
|
27 |
-
'PAYMENT.CAPTURE.REFUNDED' => Payment_Capture_Refunded::class,
|
28 |
-
'PAYMENT.CAPTURE.REVERSED' => Payment_Capture_Reversed::class,
|
29 |
-
];
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Use this to register additional events and handlers
|
33 |
-
*
|
34 |
-
* @since 5.1.6
|
35 |
-
*
|
36 |
-
* @param string $paypal_event PayPal event to listen for, i.e. CHECKOUT.ORDER.APPROVED
|
37 |
-
* @param string $event_handler The FQCN of the event handler
|
38 |
-
*
|
39 |
-
* @return $this
|
40 |
-
*/
|
41 |
-
public function register_event_handler( $paypal_event, $event_handler ) {
|
42 |
-
if ( isset( $this->event_handlers[ $paypal_event ] ) ) {
|
43 |
-
throw new InvalidArgumentException( 'Cannot register an already registered event' );
|
44 |
-
}
|
45 |
-
|
46 |
-
if ( ! is_subclass_of( $event_handler, Event_Listener::class ) ) {
|
47 |
-
throw new InvalidArgumentException( 'Listener must be a subclass of ' . Event_Listener::class );
|
48 |
-
}
|
49 |
-
|
50 |
-
$this->event_handlers[ $paypal_event ] = $event_handler;
|
51 |
-
|
52 |
-
return $this;
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Registers multiple event handlers using an array where the key is the
|
57 |
-
*
|
58 |
-
* @since 5.1.6
|
59 |
-
*
|
60 |
-
* @param array $handlers = [ 'PAYPAL.EVENT' => EventHandler::class ]
|
61 |
-
*/
|
62 |
-
public function register_event_handlers( array $handlers ) {
|
63 |
-
foreach ( $handlers as $event => $handler ) {
|
64 |
-
$this->register_event_handler( $event, $handler );
|
65 |
-
}
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Returns Event Listener instance for given event
|
70 |
-
*
|
71 |
-
* @since 5.1.6
|
72 |
-
*
|
73 |
-
* @param string $event
|
74 |
-
*
|
75 |
-
* @return Event_Listener
|
76 |
-
*/
|
77 |
-
public function get_event_handler( $event ) {
|
78 |
-
return tribe( $this->event_handlers[ $event ] );
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Checks whether the given event is registered
|
83 |
-
*
|
84 |
-
* @since 5.1.6
|
85 |
-
*
|
86 |
-
* @param string $event
|
87 |
-
*
|
88 |
-
* @return bool
|
89 |
-
*/
|
90 |
-
public function has_event_registered( $event ) {
|
91 |
-
return isset( $this->event_handlers[ $event ] );
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Returns an array of the registered events
|
96 |
-
*
|
97 |
-
* @since 5.1.6
|
98 |
-
*
|
99 |
-
* @return string[]
|
100 |
-
*/
|
101 |
-
public function get_registered_events() {
|
102 |
-
return array_keys( $this->event_handlers );
|
103 |
-
}
|
104 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/Webhooks/Webhooks_Route.php
DELETED
@@ -1,141 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace TEC\Tickets\Commerce\Gateways\PayPal\Webhooks;
|
4 |
-
|
5 |
-
use Exception;
|
6 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\REST;
|
7 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
8 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Repositories\Webhooks;
|
9 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Headers;
|
10 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Webhooks\Webhook_Register;
|
11 |
-
|
12 |
-
class Webhooks_Route {
|
13 |
-
/**
|
14 |
-
* @since 5.1.6
|
15 |
-
*
|
16 |
-
* @var Merchant
|
17 |
-
*/
|
18 |
-
private $merchant;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @since 5.1.6
|
22 |
-
*
|
23 |
-
* @var Webhooks
|
24 |
-
*/
|
25 |
-
private $webhook_repository;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* @since 5.1.6
|
29 |
-
*
|
30 |
-
* @var Webhook_Register
|
31 |
-
*/
|
32 |
-
private $webhook_register;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Webhooks_Route constructor.
|
36 |
-
*
|
37 |
-
* @since 5.1.6
|
38 |
-
*
|
39 |
-
* @param Merchant $merchant
|
40 |
-
* @param Webhook_Register $register
|
41 |
-
* @param Webhooks $webhook_repository
|
42 |
-
*/
|
43 |
-
public function __construct( Merchant $merchant, Webhook_Register $register, Webhooks $webhook_repository ) {
|
44 |
-
$this->merchant = $merchant;
|
45 |
-
$this->webhook_register = $register;
|
46 |
-
$this->webhook_repository = $webhook_repository;
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Get the REST API route URL.
|
51 |
-
*
|
52 |
-
* @since 5.1.6
|
53 |
-
*
|
54 |
-
* @return string The REST API route URL.
|
55 |
-
*/
|
56 |
-
public function get_route_url() {
|
57 |
-
/** @var REST $rest */
|
58 |
-
$rest = tribe( REST::class );
|
59 |
-
$endpoint = tribe( REST\Webhook::class );
|
60 |
-
|
61 |
-
return rest_url( '/' . $rest->namespace . $endpoint->get_endpoint_path(), 'https' );
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Handles all webhook event requests. First it verifies that authenticity of the event with
|
66 |
-
* PayPal, and then it passes the event along to the appropriate listener to finish.
|
67 |
-
*
|
68 |
-
* @since 5.1.6
|
69 |
-
*
|
70 |
-
* @throws Exception
|
71 |
-
*
|
72 |
-
* @param array $headers The list of HTTP headers for the request.
|
73 |
-
*
|
74 |
-
* @param string|object $event The PayPal payment event object.
|
75 |
-
*
|
76 |
-
* @return bool Whether the event was processed.
|
77 |
-
*
|
78 |
-
*/
|
79 |
-
public function handle( $event, $headers = [] ) {
|
80 |
-
if ( ! $this->merchant->account_is_connected() ) {
|
81 |
-
return false;
|
82 |
-
}
|
83 |
-
|
84 |
-
// Try to decode the event.
|
85 |
-
if ( ! is_object( $event ) ) {
|
86 |
-
$event = @json_decode( $event );
|
87 |
-
|
88 |
-
// The event is not valid.
|
89 |
-
if ( ! $event ) {
|
90 |
-
return false;
|
91 |
-
}
|
92 |
-
}
|
93 |
-
|
94 |
-
// If we receive an event that we're not expecting, just ignore it
|
95 |
-
if ( ! $this->webhook_register->has_event_registered( $event->event_type ) ) {
|
96 |
-
tribe( 'logger' )->log_debug(
|
97 |
-
sprintf(
|
98 |
-
// Translators: %s: The event type.
|
99 |
-
__( 'PayPal webhook event type not registered or supported: %s', 'event-tickets' ),
|
100 |
-
$event->event_type
|
101 |
-
),
|
102 |
-
'tickets-commerce-paypal-commerce'
|
103 |
-
);
|
104 |
-
|
105 |
-
return false;
|
106 |
-
}
|
107 |
-
|
108 |
-
tribe( 'logger' )->log_debug(
|
109 |
-
sprintf(
|
110 |
-
// Translators: %s: The event type.
|
111 |
-
__( 'Received PayPal webhook event for type: %s', 'event-tickets' ),
|
112 |
-
$event->event_type
|
113 |
-
),
|
114 |
-
'tickets-commerce-paypal-commerce'
|
115 |
-
);
|
116 |
-
|
117 |
-
$paypal_headers = Headers::from_headers( $headers );
|
118 |
-
|
119 |
-
if ( ! $this->webhook_repository->verify_event_signature( $this->merchant->get_access_token(), $event, $paypal_headers ) ) {
|
120 |
-
tribe( 'logger' )->log_error( __( 'Failed PayPal webhook event verification', 'event-tickets' ), 'tickets-commerce-paypal-commerce' );
|
121 |
-
|
122 |
-
throw new Exception( 'Failed event verification' );
|
123 |
-
}
|
124 |
-
|
125 |
-
try {
|
126 |
-
return $this->webhook_register
|
127 |
-
->get_event_handler( $event->event_type )
|
128 |
-
->process_event( $event );
|
129 |
-
} catch ( Exception $exception ) {
|
130 |
-
$event_type = empty( $event->event_type ) ? 'Unknown' : $event->event_type;
|
131 |
-
|
132 |
-
tribe( 'logger' )->log_error( sprintf(
|
133 |
-
// Translators: %s: The event type.
|
134 |
-
__( 'Error processing webhook: %s', 'event-tickets' ),
|
135 |
-
$event_type
|
136 |
-
), 'tickets-commerce-paypal-commerce' );
|
137 |
-
|
138 |
-
throw $exception;
|
139 |
-
}
|
140 |
-
}
|
141 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/Tickets/Commerce/Gateways/PayPal/WhoDat.php
CHANGED
@@ -27,7 +27,6 @@ class WhoDat {
|
|
27 |
*
|
28 |
* @since 5.1.9
|
29 |
*
|
30 |
-
*
|
31 |
* @param string $endpoint The endpoint path.
|
32 |
* @param array $query_args Query args appended to the URL.
|
33 |
*
|
@@ -72,7 +71,7 @@ class WhoDat {
|
|
72 |
public function get_seller_referral_data( $url ) {
|
73 |
$query_args = [
|
74 |
'mode' => tribe( Merchant::class )->get_mode(),
|
75 |
-
'url' => $url
|
76 |
];
|
77 |
|
78 |
return $this->get( 'seller/referral-data', $query_args );
|
@@ -90,7 +89,7 @@ class WhoDat {
|
|
90 |
public function get_seller_status( $saved_merchant_id ) {
|
91 |
$query_args = [
|
92 |
'mode' => tribe( Merchant::class )->get_mode(),
|
93 |
-
'merchant_id' => $saved_merchant_id
|
94 |
];
|
95 |
|
96 |
return $this->post( 'seller/status', $query_args );
|
@@ -158,7 +157,11 @@ class WhoDat {
|
|
158 |
$default_arguments = [
|
159 |
'body' => [],
|
160 |
];
|
161 |
-
|
|
|
|
|
|
|
|
|
162 |
$request = wp_remote_post( $url, $request_arguments );
|
163 |
|
164 |
if ( is_wp_error( $request ) ) {
|
@@ -172,6 +175,7 @@ class WhoDat {
|
|
172 |
|
173 |
if ( ! is_array( $body ) ) {
|
174 |
$this->log_error( 'WhoDat unexpected response:', $body, $url );
|
|
|
175 |
|
176 |
return null;
|
177 |
}
|
27 |
*
|
28 |
* @since 5.1.9
|
29 |
*
|
|
|
30 |
* @param string $endpoint The endpoint path.
|
31 |
* @param array $query_args Query args appended to the URL.
|
32 |
*
|
71 |
public function get_seller_referral_data( $url ) {
|
72 |
$query_args = [
|
73 |
'mode' => tribe( Merchant::class )->get_mode(),
|
74 |
+
'url' => $url,
|
75 |
];
|
76 |
|
77 |
return $this->get( 'seller/referral-data', $query_args );
|
89 |
public function get_seller_status( $saved_merchant_id ) {
|
90 |
$query_args = [
|
91 |
'mode' => tribe( Merchant::class )->get_mode(),
|
92 |
+
'merchant_id' => $saved_merchant_id,
|
93 |
];
|
94 |
|
95 |
return $this->post( 'seller/status', $query_args );
|
157 |
$default_arguments = [
|
158 |
'body' => [],
|
159 |
];
|
160 |
+
|
161 |
+
|
162 |
+
foreach ( $default_arguments as $key => $default_argument ) {
|
163 |
+
$request_arguments[ $key ] = array_merge( $default_argument, Arr::get( $request_arguments, $key, [] ) );
|
164 |
+
}
|
165 |
$request = wp_remote_post( $url, $request_arguments );
|
166 |
|
167 |
if ( is_wp_error( $request ) ) {
|
175 |
|
176 |
if ( ! is_array( $body ) ) {
|
177 |
$this->log_error( 'WhoDat unexpected response:', $body, $url );
|
178 |
+
$this->log_error( 'Response:', print_r( $request, true ), '--->' );
|
179 |
|
180 |
return null;
|
181 |
}
|
src/Tickets/Commerce/Hooks.php
CHANGED
@@ -90,6 +90,11 @@ class Hooks extends tad_DI52_ServiceProvider {
|
|
90 |
add_filter( 'tribe_tickets_cart_urls', [ $this, 'filter_js_include_cart_url' ] );
|
91 |
|
92 |
add_filter( 'event_tickets_attendees_tc_checkin_stati', [ $this, 'filter_checkin_statuses' ] );
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
|
95 |
/**
|
@@ -394,4 +399,60 @@ class Hooks extends tad_DI52_ServiceProvider {
|
|
394 |
|
395 |
return $urls;
|
396 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
}
|
90 |
add_filter( 'tribe_tickets_cart_urls', [ $this, 'filter_js_include_cart_url' ] );
|
91 |
|
92 |
add_filter( 'event_tickets_attendees_tc_checkin_stati', [ $this, 'filter_checkin_statuses' ] );
|
93 |
+
|
94 |
+
// Add a post display state for special Event Tickets pages.
|
95 |
+
add_filter( 'display_post_states', [ $this, 'add_display_post_states' ], 10, 2 );
|
96 |
+
|
97 |
+
$this->provider_meta_sanitization_filters();
|
98 |
}
|
99 |
|
100 |
/**
|
399 |
|
400 |
return $urls;
|
401 |
}
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Add a post display state for special Event Tickets pages in the page list table.
|
405 |
+
*
|
406 |
+
* @since 5.1.10
|
407 |
+
*
|
408 |
+
* @param array $post_states An array of post display states.
|
409 |
+
* @param WP_Post $post The current post object.
|
410 |
+
*
|
411 |
+
* @return array $post_states An array of post display states.
|
412 |
+
*/
|
413 |
+
public function add_display_post_states( $post_states, $post ) {
|
414 |
+
|
415 |
+
$post_states = tribe( Checkout::class )->maybe_add_display_post_states( $post_states, $post );
|
416 |
+
$post_states = tribe( Success::class )->maybe_add_display_post_states( $post_states, $post );
|
417 |
+
|
418 |
+
return $post_states;
|
419 |
+
}
|
420 |
+
|
421 |
+
/**
|
422 |
+
* Add the filter for provider meta sanitization.
|
423 |
+
*
|
424 |
+
* @since 5.1.10
|
425 |
+
*/
|
426 |
+
public function provider_meta_sanitization_filters() {
|
427 |
+
|
428 |
+
if ( ! tribe()->offsetExists( 'tickets.handler' ) ) {
|
429 |
+
_doing_it_wrong(
|
430 |
+
__FUNCTION__,
|
431 |
+
'tickets.handler - is not registered.',
|
432 |
+
'5.1.10'
|
433 |
+
);
|
434 |
+
|
435 |
+
return;
|
436 |
+
}
|
437 |
+
|
438 |
+
/**
|
439 |
+
* @var \Tribe__Tickets__Tickets_Handler $ticket_handler
|
440 |
+
*/
|
441 |
+
$ticket_handler = tribe( 'tickets.handler' );
|
442 |
+
|
443 |
+
add_filter( "sanitize_post_meta_{$ticket_handler->key_provider_field}" , [ $this, 'filter_modify_sanitization_provider_meta' ] );
|
444 |
+
}
|
445 |
+
|
446 |
+
/**
|
447 |
+
* Handle saving of Ticket provider meta data.
|
448 |
+
*
|
449 |
+
* @since 5.1.10
|
450 |
+
*
|
451 |
+
* @param mixed $meta_value Metadata value.
|
452 |
+
*
|
453 |
+
* @return string
|
454 |
+
*/
|
455 |
+
public function filter_modify_sanitization_provider_meta( $meta_value ) {
|
456 |
+
return tribe( Settings::class )->skip_sanitization( $meta_value );
|
457 |
+
}
|
458 |
}
|
src/Tickets/Commerce/Legacy_Compat.php
CHANGED
@@ -26,7 +26,42 @@ class Legacy_Compat extends tad_DI52_ServiceProvider {
|
|
26 |
* @since 5.1.6
|
27 |
*/
|
28 |
public function register() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
31 |
|
32 |
}
|
26 |
* @since 5.1.6
|
27 |
*/
|
28 |
public function register() {
|
29 |
+
// $this->add_actions();
|
30 |
+
$this->add_filters();
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Adds the actions required to handle legacy compatibility.
|
35 |
+
*
|
36 |
+
* @since 5.1.10
|
37 |
+
*/
|
38 |
+
protected function add_actions() {
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Adds the filters required to handle legacy compatibility.
|
44 |
+
*
|
45 |
+
* @since 5.1.10
|
46 |
+
*/
|
47 |
+
protected function add_filters() {
|
48 |
+
add_filter( 'tribe_events_tickets_module_name', [ $this, 'set_legacy_module_name' ] );
|
49 |
|
50 |
+
// Disable TribeCommerce for new installations.
|
51 |
+
add_filter( 'tribe_tickets_commerce_paypal_is_active', 'tec_tribe_commerce_is_available' );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Show the legacy PayPal as not recommended.
|
56 |
+
*
|
57 |
+
* @since 5.1.10
|
58 |
+
*
|
59 |
+
* @param $name string Name of the provider.
|
60 |
+
*
|
61 |
+
* @return string
|
62 |
+
*/
|
63 |
+
public function set_legacy_module_name( $name ) {
|
64 |
+
return $name != 'Tribe Commerce' ? $name : __( 'Tribe Commerce ( Legacy PayPal, not recommended )', 'event-tickets' );
|
65 |
}
|
66 |
|
67 |
}
|
src/Tickets/Commerce/Models/Attendee_Model.php
CHANGED
@@ -46,21 +46,23 @@ class Attendee_Model extends Base {
|
|
46 |
$user_id = Arr::get( $post_meta, [ Attendee::$user_relation_meta_key, 0 ] );
|
47 |
|
48 |
$ticket = tec_tc_get_ticket( $ticket_id );
|
49 |
-
$order
|
50 |
|
51 |
$is_product_deleted = empty( $ticket ) && ! $ticket instanceof \WP_Post;
|
52 |
|
53 |
-
$checked_in
|
54 |
-
$security
|
55 |
-
$opt_out
|
56 |
-
$status
|
57 |
-
$ticket_sent
|
58 |
$deleted_ticket_title = Arr::get( $post_meta, [ Attendee::$deleted_ticket_meta_key, 0 ] );
|
59 |
-
$first_name
|
60 |
-
$last_name
|
61 |
-
$full_name
|
62 |
-
$email
|
63 |
-
$
|
|
|
|
|
64 |
|
65 |
// Tries to determine an Attendee Unique ID.
|
66 |
$ticket_unique_id = Arr::get( $post_meta, [ '_unique_id', 0 ] );
|
@@ -71,6 +73,7 @@ class Attendee_Model extends Base {
|
|
71 |
$is_purchaser = $email === $order->purchaser_email;
|
72 |
|
73 |
$properties = [
|
|
|
74 |
'optout' => $opt_out,
|
75 |
'ticket' => $ticket_title,
|
76 |
'attendee_id' => $post_id,
|
@@ -80,13 +83,14 @@ class Attendee_Model extends Base {
|
|
80 |
'order_status' => $status,
|
81 |
'user_id' => $user_id,
|
82 |
'ticket_sent' => $ticket_sent,
|
|
|
|
|
83 |
|
84 |
// Fields for Email Tickets.
|
85 |
'event_id' => $event_id,
|
86 |
'ticket_name' => $ticket_title,
|
87 |
'holder_name' => $full_name,
|
88 |
'holder_email' => $email,
|
89 |
-
'order_id' => $order_id,
|
90 |
'ticket_id' => $ticket_unique_id,
|
91 |
'qr_ticket_id' => $post_id,
|
92 |
'security_code' => $security,
|
46 |
$user_id = Arr::get( $post_meta, [ Attendee::$user_relation_meta_key, 0 ] );
|
47 |
|
48 |
$ticket = tec_tc_get_ticket( $ticket_id );
|
49 |
+
$order = tec_tc_get_order( $this->post->post_parent );
|
50 |
|
51 |
$is_product_deleted = empty( $ticket ) && ! $ticket instanceof \WP_Post;
|
52 |
|
53 |
+
$checked_in = Arr::get( $post_meta, [ Attendee::$checked_in_meta_key, 0 ] );
|
54 |
+
$security = Arr::get( $post_meta, [ Attendee::$security_code_meta_key, 0 ] );
|
55 |
+
$opt_out = tribe_is_truthy( Arr::get( $post_meta, [ Attendee::$optout_meta_key, 0 ] ) );
|
56 |
+
$status = Arr::get( $post_meta, [ Attendee::$status_meta_key, 0 ] );
|
57 |
+
$ticket_sent = (int) Arr::get( $post_meta, [ Attendee::$ticket_sent_meta_key, 0 ] );
|
58 |
$deleted_ticket_title = Arr::get( $post_meta, [ Attendee::$deleted_ticket_meta_key, 0 ] );
|
59 |
+
$first_name = Arr::get( $post_meta, [ Attendee::$first_name_meta_key, 0 ] );
|
60 |
+
$last_name = Arr::get( $post_meta, [ Attendee::$last_name_meta_key, 0 ] );
|
61 |
+
$full_name = $first_name . ' ' . $last_name;
|
62 |
+
$email = Arr::get( $post_meta, [ Attendee::$email_meta_key, 0 ] );
|
63 |
+
$price_paid = Arr::get( $post_meta, [ Attendee::$price_paid_meta_key, 0 ] );
|
64 |
+
$currency = Arr::get( $post_meta, [ Attendee::$currency_meta_key, 0 ] );
|
65 |
+
$is_subscribed = tribe_is_truthy( Arr::get( $post_meta, [ Attendee::$subscribed_meta_key, 0 ] ) );
|
66 |
|
67 |
// Tries to determine an Attendee Unique ID.
|
68 |
$ticket_unique_id = Arr::get( $post_meta, [ '_unique_id', 0 ] );
|
73 |
$is_purchaser = $email === $order->purchaser_email;
|
74 |
|
75 |
$properties = [
|
76 |
+
'order_id' => $this->post->post_parent,
|
77 |
'optout' => $opt_out,
|
78 |
'ticket' => $ticket_title,
|
79 |
'attendee_id' => $post_id,
|
83 |
'order_status' => $status,
|
84 |
'user_id' => $user_id,
|
85 |
'ticket_sent' => $ticket_sent,
|
86 |
+
'price_paid' => $price_paid,
|
87 |
+
'currency' => $currency,
|
88 |
|
89 |
// Fields for Email Tickets.
|
90 |
'event_id' => $event_id,
|
91 |
'ticket_name' => $ticket_title,
|
92 |
'holder_name' => $full_name,
|
93 |
'holder_email' => $email,
|
|
|
94 |
'ticket_id' => $ticket_unique_id,
|
95 |
'qr_ticket_id' => $post_id,
|
96 |
'security_code' => $security,
|
src/Tickets/Commerce/Models/Order_Model.php
CHANGED
@@ -39,12 +39,14 @@ class Order_Model extends Base {
|
|
39 |
|
40 |
$post_meta = get_post_meta( $post_id );
|
41 |
|
42 |
-
$cart_items
|
43 |
-
$total_value
|
44 |
-
$currency
|
45 |
-
$gateway_slug
|
46 |
-
$gateway_order_id
|
47 |
-
$gateway_payload
|
|
|
|
|
48 |
|
49 |
$purchaser_full_name = Arr::get( $post_meta, [ Order::$purchaser_full_name_meta_key, 0 ] );
|
50 |
$purchaser_first_name = Arr::get( $post_meta, [ Order::$purchaser_first_name_meta_key, 0 ] );
|
@@ -55,23 +57,25 @@ class Order_Model extends Base {
|
|
55 |
$tickets_in_order = Arr::get( $post_meta, [ Order::$tickets_in_order_meta_key ] );
|
56 |
|
57 |
$properties = [
|
58 |
-
'provider'
|
59 |
-
'provider_slug'
|
60 |
-
'
|
61 |
-
'
|
62 |
-
'
|
63 |
-
'
|
64 |
-
'
|
65 |
-
'
|
|
|
66 |
'user_id' => $this->post->post_author,
|
67 |
'first_name' => $purchaser_first_name,
|
68 |
'last_name' => $purchaser_last_name,
|
69 |
'full_name' => $purchaser_full_name,
|
70 |
'email' => $purchaser_email,
|
71 |
],
|
72 |
-
'cart_items'
|
73 |
-
'events_in_order'
|
74 |
-
'tickets_in_order'
|
|
|
75 |
];
|
76 |
} catch ( \Exception $e ) {
|
77 |
return [];
|
@@ -80,14 +84,70 @@ class Order_Model extends Base {
|
|
80 |
return $properties;
|
81 |
}
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
protected function get_gateway_payloads( $post_meta ) {
|
84 |
$statuses = tribe( Commerce\Status\Status_Handler::class )->get_all();
|
85 |
-
$meta
|
86 |
|
87 |
foreach ( $statuses as $status ) {
|
88 |
$status_payloads = Arr::get( $post_meta, [ Order::get_gateway_payload_meta_key( $status ) ], [] );
|
89 |
|
90 |
-
$meta[ $status->get_slug() ] = $status_payloads;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
|
93 |
return array_filter( $meta );
|
39 |
|
40 |
$post_meta = get_post_meta( $post_id );
|
41 |
|
42 |
+
$cart_items = maybe_unserialize( Arr::get( $post_meta, [ Order::$cart_items_meta_key, 0 ] ) );
|
43 |
+
$total_value = Arr::get( $post_meta, [ Order::$total_value_meta_key, 0 ] );
|
44 |
+
$currency = Arr::get( $post_meta, [ Order::$currency_meta_key, 0 ], 'USD' );
|
45 |
+
$gateway_slug = Arr::get( $post_meta, [ Order::$gateway_meta_key, 0 ] );
|
46 |
+
$gateway_order_id = Arr::get( $post_meta, [ Order::$gateway_order_id_meta_key, 0 ] );
|
47 |
+
$gateway_payload = $this->get_gateway_payloads( $post_meta );
|
48 |
+
$status_log = $this->get_status_log( $post_meta );
|
49 |
+
$flag_action_markers = $this->get_flag_action_markers( $post_meta );
|
50 |
|
51 |
$purchaser_full_name = Arr::get( $post_meta, [ Order::$purchaser_full_name_meta_key, 0 ] );
|
52 |
$purchaser_first_name = Arr::get( $post_meta, [ Order::$purchaser_first_name_meta_key, 0 ] );
|
57 |
$tickets_in_order = Arr::get( $post_meta, [ Order::$tickets_in_order_meta_key ] );
|
58 |
|
59 |
$properties = [
|
60 |
+
'provider' => Module::class,
|
61 |
+
'provider_slug' => Commerce::ABBR,
|
62 |
+
'status_log' => $status_log,
|
63 |
+
'gateway' => $gateway_slug,
|
64 |
+
'gateway_order_id' => $gateway_order_id,
|
65 |
+
'gateway_payload' => $gateway_payload,
|
66 |
+
'total_value' => $total_value,
|
67 |
+
'currency' => $currency,
|
68 |
+
'purchaser' => [
|
69 |
'user_id' => $this->post->post_author,
|
70 |
'first_name' => $purchaser_first_name,
|
71 |
'last_name' => $purchaser_last_name,
|
72 |
'full_name' => $purchaser_full_name,
|
73 |
'email' => $purchaser_email,
|
74 |
],
|
75 |
+
'cart_items' => $cart_items,
|
76 |
+
'events_in_order' => $events_in_order,
|
77 |
+
'tickets_in_order' => $tickets_in_order,
|
78 |
+
'flag_action_markers' => $flag_action_markers,
|
79 |
];
|
80 |
} catch ( \Exception $e ) {
|
81 |
return [];
|
84 |
return $properties;
|
85 |
}
|
86 |
|
87 |
+
/**
|
88 |
+
* Modifies the Gateway payload meta into a more easily consumable array of data.
|
89 |
+
*
|
90 |
+
* @since 5.1.10
|
91 |
+
*
|
92 |
+
* @param array $post_meta Current existing meta.
|
93 |
+
*
|
94 |
+
* @return array
|
95 |
+
*/
|
96 |
protected function get_gateway_payloads( $post_meta ) {
|
97 |
$statuses = tribe( Commerce\Status\Status_Handler::class )->get_all();
|
98 |
+
$meta = [];
|
99 |
|
100 |
foreach ( $statuses as $status ) {
|
101 |
$status_payloads = Arr::get( $post_meta, [ Order::get_gateway_payload_meta_key( $status ) ], [] );
|
102 |
|
103 |
+
$meta[ $status->get_slug() ] = array_map( 'maybe_unserialize', $status_payloads );
|
104 |
+
}
|
105 |
+
|
106 |
+
return array_filter( $meta );
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Modifies the status log meta into a more easily consumable array of data.
|
111 |
+
*
|
112 |
+
* @since 5.1.10
|
113 |
+
*
|
114 |
+
* @param array $post_meta Current existing meta.
|
115 |
+
*
|
116 |
+
* @return array
|
117 |
+
*/
|
118 |
+
protected function get_status_log( $post_meta ) {
|
119 |
+
$statuses = tribe( Commerce\Status\Status_Handler::class )->get_all();
|
120 |
+
$meta = [];
|
121 |
+
|
122 |
+
foreach ( $statuses as $status ) {
|
123 |
+
$status_payloads = Arr::get( $post_meta, [ Order::get_status_log_meta_key( $status ) ], [] );
|
124 |
+
|
125 |
+
$meta[ $status->get_slug() ] = array_map( [ Dates::class, 'build_date_object' ], $status_payloads );
|
126 |
+
}
|
127 |
+
|
128 |
+
return array_filter( $meta );
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Modifies the markers for flag actions log meta into a more easily consumable array of data.
|
133 |
+
*
|
134 |
+
* @since 5.1.10
|
135 |
+
*
|
136 |
+
* @param array $post_meta Current existing meta.
|
137 |
+
*
|
138 |
+
* @return array
|
139 |
+
*/
|
140 |
+
protected function get_flag_action_markers( $post_meta ) {
|
141 |
+
$statuses = tribe( Commerce\Status\Status_Handler::class )->get_all();
|
142 |
+
$meta = [];
|
143 |
+
|
144 |
+
foreach ( $statuses as $status ) {
|
145 |
+
$slug = $status->get_slug();
|
146 |
+
foreach ( $status->get_flags() as $flag ) {
|
147 |
+
$flags = Arr::get( $post_meta, [ Order::get_flag_action_marker_meta_key( $flag, $status ) ], [] );
|
148 |
+
$meta[ $slug ][ $flag ] = array_filter( array_map( [ Dates::class, 'build_date_object' ], $flags ) );
|
149 |
+
}
|
150 |
+
$meta[ $slug ] = array_filter( $meta[ $slug ] );
|
151 |
}
|
152 |
|
153 |
return array_filter( $meta );
|
src/Tickets/Commerce/Module.php
CHANGED
@@ -26,8 +26,6 @@ class Module extends \Tribe__Tickets__Tickets {
|
|
26 |
|
27 |
$this->attendee_optout_key = Attendee::$optout_meta_key;
|
28 |
|
29 |
-
$this->attendee_tpp_key = Attendee::$status_meta_key;
|
30 |
-
|
31 |
$this->ticket_object = Ticket::POSTTYPE;
|
32 |
|
33 |
$this->event_key = Attendee::$event_relation_meta_key;
|
@@ -373,7 +371,6 @@ class Module extends \Tribe__Tickets__Tickets {
|
|
373 |
'attendee_product_key' => $instance->attendee_product_key,
|
374 |
'attendee_order_key' => $instance->order_key,
|
375 |
'attendee_optout_key' => $instance->attendee_optout_key,
|
376 |
-
'attendee_tpp_key' => $instance->attendee_tpp_key,
|
377 |
'event_key' => $instance->get_event_key(),
|
378 |
'checkin_key' => $instance->checkin_key,
|
379 |
'order_key' => $instance->order_key,
|
@@ -450,7 +447,7 @@ class Module extends \Tribe__Tickets__Tickets {
|
|
450 |
* @return bool
|
451 |
*/
|
452 |
public function attendee_decreases_inventory( array $attendee ) {
|
453 |
-
tribe( Attendee::class )->decreases_inventory( $attendee );
|
454 |
}
|
455 |
|
456 |
/**
|
26 |
|
27 |
$this->attendee_optout_key = Attendee::$optout_meta_key;
|
28 |
|
|
|
|
|
29 |
$this->ticket_object = Ticket::POSTTYPE;
|
30 |
|
31 |
$this->event_key = Attendee::$event_relation_meta_key;
|
371 |
'attendee_product_key' => $instance->attendee_product_key,
|
372 |
'attendee_order_key' => $instance->order_key,
|
373 |
'attendee_optout_key' => $instance->attendee_optout_key,
|
|
|
374 |
'event_key' => $instance->get_event_key(),
|
375 |
'checkin_key' => $instance->checkin_key,
|
376 |
'order_key' => $instance->order_key,
|
447 |
* @return bool
|
448 |
*/
|
449 |
public function attendee_decreases_inventory( array $attendee ) {
|
450 |
+
return tribe( Attendee::class )->decreases_inventory( $attendee );
|
451 |
}
|
452 |
|
453 |
/**
|
src/Tickets/Commerce/Order.php
CHANGED
@@ -4,6 +4,8 @@ namespace TEC\Tickets\Commerce;
|
|
4 |
|
5 |
use TEC\Tickets\Commerce;
|
6 |
use TEC\Tickets\Commerce\Utils\Price;
|
|
|
|
|
7 |
|
8 |
/**
|
9 |
* Class Order
|
@@ -133,6 +135,24 @@ class Order {
|
|
133 |
*/
|
134 |
public static $purchaser_email_meta_key = '_tec_tc_order_purchaser_email';
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
/**
|
137 |
* Register this Class post type into WP.
|
138 |
*
|
@@ -174,10 +194,39 @@ class Order {
|
|
174 |
*
|
175 |
* @return string
|
176 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
public static function get_gateway_payload_meta_key( Commerce\Status\Status_Interface $status ) {
|
178 |
return static::$gateway_payload_meta_key . '_' . $status->get_slug();
|
179 |
}
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
/**
|
182 |
* Modify the status of a given order based on Slug.
|
183 |
*
|
@@ -210,11 +259,17 @@ class Order {
|
|
210 |
'id' => $order_id,
|
211 |
] )->set_args( $args )->save();
|
212 |
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
return (bool) $updated;
|
214 |
}
|
215 |
|
216 |
/**
|
217 |
-
*
|
218 |
*
|
219 |
* @since 5.1.9
|
220 |
*
|
@@ -227,11 +282,17 @@ class Order {
|
|
227 |
|
228 |
$items = $cart->get_items_in_cart();
|
229 |
$items = array_map( static function ( $item ) {
|
230 |
-
$ticket
|
|
|
|
|
|
|
|
|
231 |
$item['sub_total'] = Price::sub_total( $ticket->price, $item['quantity'] );
|
|
|
232 |
|
233 |
return $item;
|
234 |
}, $items );
|
|
|
235 |
$sub_totals = array_filter( wp_list_pluck( $items, 'sub_total' ) );
|
236 |
$total = Price::total( $sub_totals );
|
237 |
|
@@ -244,11 +305,11 @@ class Order {
|
|
244 |
|
245 |
// When purchaser data-set is not passed we pull from the current user.
|
246 |
if ( empty( $purchaser ) && is_user_logged_in() && $user = wp_get_current_user() ) {
|
247 |
-
$order_args['author']
|
248 |
-
$order_args['purchaser_full_name']
|
249 |
$order_args['purchaser_first_name'] = $user->first_name;
|
250 |
-
$order_args['purchaser_last_name']
|
251 |
-
$order_args['purchaser_email']
|
252 |
}
|
253 |
|
254 |
$order = tec_tc_orders()->set_args( $order_args )->create();
|
@@ -597,8 +658,6 @@ class Order {
|
|
597 |
\Tribe__Post_Transient::instance()->delete( $post_id, \Tribe__Tickets__Tickets::ATTENDEES_CACHE );
|
598 |
}
|
599 |
|
600 |
-
$order->update();
|
601 |
-
|
602 |
/**
|
603 |
* Fires when an PayPal attendee tickets have been generated.
|
604 |
*
|
@@ -627,16 +686,5 @@ class Order {
|
|
627 |
) {
|
628 |
$this->send_tickets_email( $order_id, $post_id );
|
629 |
}
|
630 |
-
|
631 |
-
// Redirect to the same page to prevent double purchase on refresh
|
632 |
-
if ( ! empty( $post_id ) ) {
|
633 |
-
/** @var \Tribe__Tickets__Commerce__PayPal__Endpoints $endpoints */
|
634 |
-
$endpoints = tribe( 'tickets.commerce.paypal.endpoints' );
|
635 |
-
$url = $endpoints->success_url( $order_id, $post_id );
|
636 |
-
if ( $redirect ) {
|
637 |
-
wp_redirect( esc_url_raw( $url ) );
|
638 |
-
}
|
639 |
-
tribe_exit();
|
640 |
-
}
|
641 |
}
|
642 |
}
|
4 |
|
5 |
use TEC\Tickets\Commerce;
|
6 |
use TEC\Tickets\Commerce\Utils\Price;
|
7 |
+
use Tribe__Date_Utils as Dates;
|
8 |
+
|
9 |
|
10 |
/**
|
11 |
* Class Order
|
135 |
*/
|
136 |
public static $purchaser_email_meta_key = '_tec_tc_order_purchaser_email';
|
137 |
|
138 |
+
/**
|
139 |
+
* Prefix for the log of when a given status was applied.
|
140 |
+
*
|
141 |
+
* @since 5.1.10
|
142 |
+
*
|
143 |
+
* @var string
|
144 |
+
*/
|
145 |
+
public static $status_log_meta_key_prefix = '_tec_tc_order_status_log';
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Prefix for the Status Flag Action marker meta key.
|
149 |
+
*
|
150 |
+
* @since 5.1.10
|
151 |
+
*
|
152 |
+
* @var string
|
153 |
+
*/
|
154 |
+
public static $flag_action_status_marker_meta_key_prefix = '_tec_tc_order_fa_marker';
|
155 |
+
|
156 |
/**
|
157 |
* Register this Class post type into WP.
|
158 |
*
|
194 |
*
|
195 |
* @return string
|
196 |
*/
|
197 |
+
public static function get_status_log_meta_key( Commerce\Status\Status_Interface $status ) {
|
198 |
+
return static::$status_log_meta_key_prefix . '_' . $status->get_slug();
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Gets the meta Key for a given Order Status gateway_payload.
|
203 |
+
*
|
204 |
+
* @since 5.1.10
|
205 |
+
*
|
206 |
+
* @param Status\Status_Interface $status
|
207 |
+
*
|
208 |
+
* @return string
|
209 |
+
*/
|
210 |
public static function get_gateway_payload_meta_key( Commerce\Status\Status_Interface $status ) {
|
211 |
return static::$gateway_payload_meta_key . '_' . $status->get_slug();
|
212 |
}
|
213 |
|
214 |
+
/**
|
215 |
+
* Gets the key for a Flag Action marker for given status and flag.
|
216 |
+
*
|
217 |
+
* @since 5.1.10
|
218 |
+
*
|
219 |
+
* @param string $flag Which flag we are getting the meta key for.
|
220 |
+
* @param string $status Which status ID we are getting the meta key for.
|
221 |
+
*
|
222 |
+
* @return string
|
223 |
+
*/
|
224 |
+
public static function get_flag_action_marker_meta_key( $flag, Commerce\Status\Status_Interface $status ) {
|
225 |
+
$prefix = static::$flag_action_status_marker_meta_key_prefix;
|
226 |
+
|
227 |
+
return "{$prefix}:{$status->get_slug()}:{$flag}";
|
228 |
+
}
|
229 |
+
|
230 |
/**
|
231 |
* Modify the status of a given order based on Slug.
|
232 |
*
|
259 |
'id' => $order_id,
|
260 |
] )->set_args( $args )->save();
|
261 |
|
262 |
+
// After modifying the status we add a meta to flag when it was modified.
|
263 |
+
if ( $updated ) {
|
264 |
+
$time = Dates::build_date_object()->format( Dates::DBDATETIMEFORMAT );
|
265 |
+
add_post_meta( $order_id, static::get_status_log_meta_key( $status ), $time );
|
266 |
+
}
|
267 |
+
|
268 |
return (bool) $updated;
|
269 |
}
|
270 |
|
271 |
/**
|
272 |
+
* Creates a order from the items in the cart.
|
273 |
*
|
274 |
* @since 5.1.9
|
275 |
*
|
282 |
|
283 |
$items = $cart->get_items_in_cart();
|
284 |
$items = array_map( static function ( $item ) {
|
285 |
+
$ticket = \Tribe__Tickets__Tickets::load_ticket_object( $item['ticket_id'] );
|
286 |
+
if ( null === $ticket ) {
|
287 |
+
return null;
|
288 |
+
}
|
289 |
+
|
290 |
$item['sub_total'] = Price::sub_total( $ticket->price, $item['quantity'] );
|
291 |
+
$item['price'] = $ticket->price;
|
292 |
|
293 |
return $item;
|
294 |
}, $items );
|
295 |
+
$items = array_filter( $items );
|
296 |
$sub_totals = array_filter( wp_list_pluck( $items, 'sub_total' ) );
|
297 |
$total = Price::total( $sub_totals );
|
298 |
|
305 |
|
306 |
// When purchaser data-set is not passed we pull from the current user.
|
307 |
if ( empty( $purchaser ) && is_user_logged_in() && $user = wp_get_current_user() ) {
|
308 |
+
$order_args['author'] = $user->ID;
|
309 |
+
$order_args['purchaser_full_name'] = $user->first_name . ' ' . $user->last_name;
|
310 |
$order_args['purchaser_first_name'] = $user->first_name;
|
311 |
+
$order_args['purchaser_last_name'] = $user->last_name;
|
312 |
+
$order_args['purchaser_email'] = $user->user_email;
|
313 |
}
|
314 |
|
315 |
$order = tec_tc_orders()->set_args( $order_args )->create();
|
658 |
\Tribe__Post_Transient::instance()->delete( $post_id, \Tribe__Tickets__Tickets::ATTENDEES_CACHE );
|
659 |
}
|
660 |
|
|
|
|
|
661 |
/**
|
662 |
* Fires when an PayPal attendee tickets have been generated.
|
663 |
*
|
686 |
) {
|
687 |
$this->send_tickets_email( $order_id, $post_id );
|
688 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
689 |
}
|
690 |
}
|
src/Tickets/Commerce/Repositories/Attendees_Repository.php
CHANGED
@@ -60,6 +60,8 @@ class Attendees_Repository extends Tribe__Repository {
|
|
60 |
'security_code' => Attendee::$security_code_meta_key,
|
61 |
'opt_out' => Attendee::$optout_meta_key,
|
62 |
'checked_in' => Attendee::$checked_in_meta_key,
|
|
|
|
|
63 |
'first_name' => Attendee::$first_name_meta_key,
|
64 |
'last_name' => Attendee::$last_name_meta_key,
|
65 |
'email' => Attendee::$email_meta_key,
|
60 |
'security_code' => Attendee::$security_code_meta_key,
|
61 |
'opt_out' => Attendee::$optout_meta_key,
|
62 |
'checked_in' => Attendee::$checked_in_meta_key,
|
63 |
+
'price_paid' => Attendee::$price_paid_meta_key,
|
64 |
+
'currency' => Attendee::$currency_meta_key,
|
65 |
'first_name' => Attendee::$first_name_meta_key,
|
66 |
'last_name' => Attendee::$last_name_meta_key,
|
67 |
'email' => Attendee::$email_meta_key,
|
src/Tickets/Commerce/Settings.php
CHANGED
@@ -10,6 +10,8 @@ namespace TEC\Tickets\Commerce;
|
|
10 |
|
11 |
use TEC\Tickets\Commerce\Gateways\Abstract_Gateway;
|
12 |
use TEC\Tickets\Commerce\Gateways\Manager;
|
|
|
|
|
13 |
use Tribe__Field_Conditional;
|
14 |
|
15 |
/**
|
@@ -113,7 +115,7 @@ class Settings extends Abstract_Settings {
|
|
113 |
$tab_settings = [
|
114 |
'priority' => 25,
|
115 |
'fields' => $this->get_settings(),
|
116 |
-
'show_save' =>
|
117 |
];
|
118 |
|
119 |
new \Tribe__Settings_Tab( 'payments', esc_html__( 'Payments', 'event-tickets' ), $tab_settings );
|
@@ -138,7 +140,7 @@ class Settings extends Abstract_Settings {
|
|
138 |
esc_html__( 'Check it out!', 'event-tickets' )
|
139 |
);
|
140 |
$plus_message = sprintf(
|
141 |
-
|
142 |
esc_html_x( 'Tickets Commerce is a light implementation of a commerce gateway using PayPal and simplified stock handling. If you need more advanced features, take a look at %1$s. In addition to integrating with your favorite ecommerce provider, Event Tickets Plus includes options to collect custom information for attendees, check users in via QR codes, and share stock between %2$s. %3$s', 'about Tickets Commerce', 'event-tickets' ),
|
143 |
$plus_link,
|
144 |
esc_html( tribe_get_ticket_label_singular_lowercase( 'tickets_fields_settings_about_tribe_commerce' ) ),
|
@@ -149,13 +151,18 @@ class Settings extends Abstract_Settings {
|
|
149 |
$is_tickets_commerce_enabled = tec_tickets_commerce_is_enabled();
|
150 |
|
151 |
$top_level_settings = [
|
|
|
|
|
|
|
|
|
152 |
'tickets-commerce-header' => [
|
153 |
'type' => 'html',
|
154 |
-
'html' => '<div class="tec-tickets-commerce-toggle"><label class="tec-tickets-commerce-
|
|
|
155 |
],
|
156 |
'tickets-commerce-description' => [
|
157 |
'type' => 'html',
|
158 |
-
'html' => '<div class="tec-tickets-commerce-description">' . $plus_message . '</div>',
|
159 |
],
|
160 |
static::$option_enable => [
|
161 |
'type' => 'hidden',
|
@@ -209,6 +216,10 @@ class Settings extends Abstract_Settings {
|
|
209 |
$current_user = get_user_by( 'id', get_current_user_id() );
|
210 |
|
211 |
$settings = [
|
|
|
|
|
|
|
|
|
212 |
static::$option_sandbox => [
|
213 |
'type' => 'checkbox_bool',
|
214 |
'label' => esc_html__( 'Enable Test Mode', 'event-tickets' ),
|
@@ -229,23 +240,27 @@ class Settings extends Abstract_Settings {
|
|
229 |
'label' => esc_html__( 'Stock Handling', 'event-tickets' ),
|
230 |
'tooltip' => esc_html(
|
231 |
sprintf(
|
232 |
-
|
233 |
_x( 'When a customer purchases a %s, the payment gateway might flag the order as Pending. The order will be Complete once payment is confirmed by the payment gateway.', 'tickets fields settings paypal stock handling', 'event-tickets' ),
|
234 |
tribe_get_ticket_label_singular_lowercase( 'tickets_fields_settings_paypal_stock_handling' )
|
235 |
)
|
236 |
),
|
237 |
-
'default' =>
|
238 |
'validation_type' => 'options',
|
239 |
'options' => [
|
240 |
-
|
241 |
-
|
242 |
-
esc_html__( 'Decrease available %s stock as soon as a
|
243 |
-
tribe_get_ticket_label_singular_lowercase( 'stock_handling' )
|
|
|
|
|
244 |
),
|
245 |
-
|
246 |
-
|
247 |
-
esc_html__( 'Only decrease available %s stock if an order is confirmed as
|
248 |
-
tribe_get_ticket_label_singular_lowercase( 'stock_handling' )
|
|
|
|
|
249 |
),
|
250 |
],
|
251 |
'tooltip_first' => true,
|
@@ -255,7 +270,7 @@ class Settings extends Abstract_Settings {
|
|
255 |
'label' => esc_html__( 'Checkout page', 'event-tickets' ),
|
256 |
'tooltip' => esc_html(
|
257 |
sprintf(
|
258 |
-
|
259 |
__( 'This is the page where customers go to complete their purchase. Use the %s shortcode to display the checkout experience in the page content.', 'event-tickets' ),
|
260 |
"[$checkout_shortcode]"
|
261 |
)
|
@@ -270,7 +285,7 @@ class Settings extends Abstract_Settings {
|
|
270 |
'label' => esc_html__( 'Success page', 'event-tickets' ),
|
271 |
'tooltip' => esc_html(
|
272 |
sprintf(
|
273 |
-
|
274 |
__( 'After a successful order, users will be redirected to this page. Use the %s shortcode to display the order confirmation to the user in the page content.', 'event-tickets' ),
|
275 |
"[$success_shortcode]"
|
276 |
)
|
@@ -285,7 +300,7 @@ class Settings extends Abstract_Settings {
|
|
285 |
'label' => esc_html__( 'Confirmation email sender address', 'event-tickets' ),
|
286 |
'tooltip' => esc_html(
|
287 |
sprintf(
|
288 |
-
|
289 |
_x( 'Email address that %s customers will receive confirmation from. Leave empty to use the default WordPress site email address.', 'tickets fields settings confirmation email', 'event-tickets' ),
|
290 |
tribe_get_ticket_label_plural_lowercase( 'tickets_fields_settings_paypal_confirmation_email' )
|
291 |
)
|
@@ -300,7 +315,7 @@ class Settings extends Abstract_Settings {
|
|
300 |
'label' => esc_html__( 'Confirmation email sender name', 'event-tickets' ),
|
301 |
'tooltip' => esc_html(
|
302 |
sprintf(
|
303 |
-
|
304 |
_x( 'Sender name of the confirmation email sent to customers when confirming a %s purchase.', 'tickets fields settings paypal email sender', 'event-tickets' ),
|
305 |
tribe_get_ticket_label_singular_lowercase( 'tickets_fields_settings_paypal_email_sender' )
|
306 |
)
|
@@ -315,7 +330,7 @@ class Settings extends Abstract_Settings {
|
|
315 |
'label' => esc_html__( 'Confirmation email subject', 'event-tickets' ),
|
316 |
'tooltip' => esc_html(
|
317 |
sprintf(
|
318 |
-
|
319 |
_x( 'Subject of the confirmation email sent to customers when confirming a %s purchase.', 'tickets fields settings paypal email subject', 'event-tickets' ),
|
320 |
tribe_get_ticket_label_singular_lowercase( 'tickets_fields_settings_paypal_email_subject' )
|
321 |
)
|
@@ -323,7 +338,7 @@ class Settings extends Abstract_Settings {
|
|
323 |
'size' => 'large',
|
324 |
'default' => esc_html(
|
325 |
sprintf(
|
326 |
-
|
327 |
_x( 'You have %s!', 'tickets fields settings paypal email subject', 'event-tickets' ),
|
328 |
tribe_get_ticket_label_plural_lowercase( 'tickets_fields_settings_paypal_email_subject' )
|
329 |
)
|
@@ -344,7 +359,7 @@ class Settings extends Abstract_Settings {
|
|
344 |
*/
|
345 |
$settings = apply_filters( 'tribe_tickets_commerce_settings', $settings );
|
346 |
|
347 |
-
return array_merge( $this->get_top_level_settings(), $settings );
|
348 |
}
|
349 |
|
350 |
/**
|
@@ -352,7 +367,7 @@ class Settings extends Abstract_Settings {
|
|
352 |
*
|
353 |
* @since 5.1.9
|
354 |
*
|
355 |
-
* @param array[] $settings Which settings we are applying
|
356 |
*
|
357 |
* @return array[]
|
358 |
*/
|
@@ -382,4 +397,21 @@ class Settings extends Abstract_Settings {
|
|
382 |
return $settings;
|
383 |
}
|
384 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
}
|
10 |
|
11 |
use TEC\Tickets\Commerce\Gateways\Abstract_Gateway;
|
12 |
use TEC\Tickets\Commerce\Gateways\Manager;
|
13 |
+
use TEC\Tickets\Commerce\Status\Completed;
|
14 |
+
use TEC\Tickets\Commerce\Status\Pending;
|
15 |
use Tribe__Field_Conditional;
|
16 |
|
17 |
/**
|
115 |
$tab_settings = [
|
116 |
'priority' => 25,
|
117 |
'fields' => $this->get_settings(),
|
118 |
+
'show_save' => true,
|
119 |
];
|
120 |
|
121 |
new \Tribe__Settings_Tab( 'payments', esc_html__( 'Payments', 'event-tickets' ), $tab_settings );
|
140 |
esc_html__( 'Check it out!', 'event-tickets' )
|
141 |
);
|
142 |
$plus_message = sprintf(
|
143 |
+
// Translators: %1$s: The Event Tickets Plus link, %2$s: The word "ticket" in lowercase, %3$s: The "Check it out!" link.
|
144 |
esc_html_x( 'Tickets Commerce is a light implementation of a commerce gateway using PayPal and simplified stock handling. If you need more advanced features, take a look at %1$s. In addition to integrating with your favorite ecommerce provider, Event Tickets Plus includes options to collect custom information for attendees, check users in via QR codes, and share stock between %2$s. %3$s', 'about Tickets Commerce', 'event-tickets' ),
|
145 |
$plus_link,
|
146 |
esc_html( tribe_get_ticket_label_singular_lowercase( 'tickets_fields_settings_about_tribe_commerce' ) ),
|
151 |
$is_tickets_commerce_enabled = tec_tickets_commerce_is_enabled();
|
152 |
|
153 |
$top_level_settings = [
|
154 |
+
'tribe-form-content-start' => [
|
155 |
+
'type' => 'html',
|
156 |
+
'html' => '<div class="tribe-settings-form-wrap">',
|
157 |
+
],
|
158 |
'tickets-commerce-header' => [
|
159 |
'type' => 'html',
|
160 |
+
'html' => '<div class="tec-tickets__admin-settings-tickets-commerce-toggle-wrapper"><label class="tec-tickets__admin-settings-tickets-commerce-toggle"><input type="checkbox" name="' . static::$option_enable . '" value="' . $is_tickets_commerce_enabled . '" ' . checked( $is_tickets_commerce_enabled, true, false ) . ' id="tickets-commerce-enable-input" class="tec-tickets__admin-settings-tickets-commerce-toggle-checkbox tribe-dependency tribe-dependency-verified"><span class="tec-tickets__admin-settings-tickets-commerce-toggle-switch"></span><span class="tec-tickets__admin-settings-tickets-commerce-toggle-label">' . esc_html__( 'Enable Tickets Commerce', 'event-tickets' ) . '</span></label></div>',
|
161 |
+
|
162 |
],
|
163 |
'tickets-commerce-description' => [
|
164 |
'type' => 'html',
|
165 |
+
'html' => '<div class="tec-tickets__admin-settings-tickets-commerce-description">' . $plus_message . '</div>',
|
166 |
],
|
167 |
static::$option_enable => [
|
168 |
'type' => 'hidden',
|
216 |
$current_user = get_user_by( 'id', get_current_user_id() );
|
217 |
|
218 |
$settings = [
|
219 |
+
'tickets-commerce-general-settings-heading' => [
|
220 |
+
'type' => 'html',
|
221 |
+
'html' => '<h3 class="my-awesome-class tribe-dependent" data-depends="#' . static::$option_enable . '-input" data-condition-is-checked>' . __( 'Tickets Commerce Settings', 'event-tickets' ) . '</h3><div class="clear"></div>',
|
222 |
+
],
|
223 |
static::$option_sandbox => [
|
224 |
'type' => 'checkbox_bool',
|
225 |
'label' => esc_html__( 'Enable Test Mode', 'event-tickets' ),
|
240 |
'label' => esc_html__( 'Stock Handling', 'event-tickets' ),
|
241 |
'tooltip' => esc_html(
|
242 |
sprintf(
|
243 |
+
// Translators: %s: The word "ticket" in lowercase.
|
244 |
_x( 'When a customer purchases a %s, the payment gateway might flag the order as Pending. The order will be Complete once payment is confirmed by the payment gateway.', 'tickets fields settings paypal stock handling', 'event-tickets' ),
|
245 |
tribe_get_ticket_label_singular_lowercase( 'tickets_fields_settings_paypal_stock_handling' )
|
246 |
)
|
247 |
),
|
248 |
+
'default' => Pending::SLUG,
|
249 |
'validation_type' => 'options',
|
250 |
'options' => [
|
251 |
+
Pending::SLUG => sprintf(
|
252 |
+
// Translators: %1$s: The word "ticket" in lowercase. %2$s: `<strong>` opening tag. %3$s: `</strong>` closing tag.
|
253 |
+
esc_html__( 'Decrease available %1$s stock as soon as a %2$sPending%3$s order is created.', 'event-tickets' ),
|
254 |
+
tribe_get_ticket_label_singular_lowercase( 'stock_handling' ),
|
255 |
+
'<strong>',
|
256 |
+
'</strong>'
|
257 |
),
|
258 |
+
Completed::SLUG => sprintf(
|
259 |
+
// Translators: %1$s: The word "ticket" in lowercase. %2$s: `<strong>` opening tag. %3$s: `</strong>` closing tag.
|
260 |
+
esc_html__( 'Only decrease available %1$s stock if an order is confirmed as %2$sCompleted%3$s by the payment gateway.', 'event-tickets' ),
|
261 |
+
tribe_get_ticket_label_singular_lowercase( 'stock_handling' ),
|
262 |
+
'<strong>',
|
263 |
+
'</strong>'
|
264 |
),
|
265 |
],
|
266 |
'tooltip_first' => true,
|
270 |
'label' => esc_html__( 'Checkout page', 'event-tickets' ),
|
271 |
'tooltip' => esc_html(
|
272 |
sprintf(
|
273 |
+
// Translators: %s: The [shortcode] for the success page.
|
274 |
__( 'This is the page where customers go to complete their purchase. Use the %s shortcode to display the checkout experience in the page content.', 'event-tickets' ),
|
275 |
"[$checkout_shortcode]"
|
276 |
)
|
285 |
'label' => esc_html__( 'Success page', 'event-tickets' ),
|
286 |
'tooltip' => esc_html(
|
287 |
sprintf(
|
288 |
+
// Translators: %s: The [shortcode] for the success page.
|
289 |
__( 'After a successful order, users will be redirected to this page. Use the %s shortcode to display the order confirmation to the user in the page content.', 'event-tickets' ),
|
290 |
"[$success_shortcode]"
|
291 |
)
|
300 |
'label' => esc_html__( 'Confirmation email sender address', 'event-tickets' ),
|
301 |
'tooltip' => esc_html(
|
302 |
sprintf(
|
303 |
+
// Translators: %s: The word "tickets" in lowercase.
|
304 |
_x( 'Email address that %s customers will receive confirmation from. Leave empty to use the default WordPress site email address.', 'tickets fields settings confirmation email', 'event-tickets' ),
|
305 |
tribe_get_ticket_label_plural_lowercase( 'tickets_fields_settings_paypal_confirmation_email' )
|
306 |
)
|
315 |
'label' => esc_html__( 'Confirmation email sender name', 'event-tickets' ),
|
316 |
'tooltip' => esc_html(
|
317 |
sprintf(
|
318 |
+
// Translators: %s: The word "ticket" in lowercase.
|
319 |
_x( 'Sender name of the confirmation email sent to customers when confirming a %s purchase.', 'tickets fields settings paypal email sender', 'event-tickets' ),
|
320 |
tribe_get_ticket_label_singular_lowercase( 'tickets_fields_settings_paypal_email_sender' )
|
321 |
)
|
330 |
'label' => esc_html__( 'Confirmation email subject', 'event-tickets' ),
|
331 |
'tooltip' => esc_html(
|
332 |
sprintf(
|
333 |
+
// Translators: %s: The word "ticket" in lowercase.
|
334 |
_x( 'Subject of the confirmation email sent to customers when confirming a %s purchase.', 'tickets fields settings paypal email subject', 'event-tickets' ),
|
335 |
tribe_get_ticket_label_singular_lowercase( 'tickets_fields_settings_paypal_email_subject' )
|
336 |
)
|
338 |
'size' => 'large',
|
339 |
'default' => esc_html(
|
340 |
sprintf(
|
341 |
+
// Translators: %s: The word "tickets" in lowercase.
|
342 |
_x( 'You have %s!', 'tickets fields settings paypal email subject', 'event-tickets' ),
|
343 |
tribe_get_ticket_label_plural_lowercase( 'tickets_fields_settings_paypal_email_subject' )
|
344 |
)
|
359 |
*/
|
360 |
$settings = apply_filters( 'tribe_tickets_commerce_settings', $settings );
|
361 |
|
362 |
+
return array_merge( $this->get_top_level_settings(), $this->apply_commerce_enabled_conditional( $settings ) );
|
363 |
}
|
364 |
|
365 |
/**
|
367 |
*
|
368 |
* @since 5.1.9
|
369 |
*
|
370 |
+
* @param array[] $settings Which settings we are applying conditionals to.
|
371 |
*
|
372 |
* @return array[]
|
373 |
*/
|
397 |
return $settings;
|
398 |
}
|
399 |
|
400 |
+
/**
|
401 |
+
* If the provided meta value is from Ticket Commerce Module then re-slash the meta value.
|
402 |
+
*
|
403 |
+
* @since 5.1.10
|
404 |
+
*
|
405 |
+
* @param mixed $meta_value Metadata value.
|
406 |
+
*
|
407 |
+
* @return string
|
408 |
+
*/
|
409 |
+
public function skip_sanitization( $meta_value ) {
|
410 |
+
if ( $meta_value === wp_unslash( Module::class ) ) {
|
411 |
+
return Module::class;
|
412 |
+
}
|
413 |
+
|
414 |
+
return $meta_value;
|
415 |
+
}
|
416 |
+
|
417 |
}
|
src/Tickets/Commerce/Shortcodes/Checkout_Shortcode.php
CHANGED
@@ -14,11 +14,12 @@ use TEC\Tickets\Commerce\Module;
|
|
14 |
use TEC\Tickets\Commerce\Order;
|
15 |
use TEC\Tickets\Commerce\Status\Completed;
|
16 |
use TEC\Tickets\Commerce\Status\Created;
|
17 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
18 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Settings;
|
19 |
use Tribe__Tickets__Editor__Template;
|
20 |
use TEC\Tickets\Commerce\Utils\Price;
|
21 |
|
|
|
|
|
|
|
22 |
/**
|
23 |
* Class for Shortcode Tribe_Tickets_Checkout.
|
24 |
*
|
@@ -45,7 +46,7 @@ class Checkout_Shortcode extends Shortcode_Abstract {
|
|
45 |
$sub_totals = array_filter( wp_list_pluck( $items, 'sub_total' ) );
|
46 |
|
47 |
$args = [
|
48 |
-
'provider_id'
|
49 |
'provider' => tribe( Module::class ),
|
50 |
'items' => $items,
|
51 |
'sections' => $sections,
|
@@ -53,6 +54,9 @@ class Checkout_Shortcode extends Shortcode_Abstract {
|
|
53 |
'must_login' => ! is_user_logged_in() && tribe( Module::class )->login_required(),
|
54 |
'login_url' => tribe( Checkout::class )->get_login_url(),
|
55 |
'registration_url' => tribe( Checkout::class )->get_registration_url(),
|
|
|
|
|
|
|
56 |
];
|
57 |
|
58 |
$this->template_vars = $args;
|
@@ -81,4 +85,23 @@ class Checkout_Shortcode extends Shortcode_Abstract {
|
|
81 |
return $html;
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
14 |
use TEC\Tickets\Commerce\Order;
|
15 |
use TEC\Tickets\Commerce\Status\Completed;
|
16 |
use TEC\Tickets\Commerce\Status\Created;
|
|
|
|
|
17 |
use Tribe__Tickets__Editor__Template;
|
18 |
use TEC\Tickets\Commerce\Utils\Price;
|
19 |
|
20 |
+
use TEC\Tickets\Commerce\Gateways\Manager;
|
21 |
+
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
22 |
+
|
23 |
/**
|
24 |
* Class for Shortcode Tribe_Tickets_Checkout.
|
25 |
*
|
46 |
$sub_totals = array_filter( wp_list_pluck( $items, 'sub_total' ) );
|
47 |
|
48 |
$args = [
|
49 |
+
'provider_id' => Module::class,
|
50 |
'provider' => tribe( Module::class ),
|
51 |
'items' => $items,
|
52 |
'sections' => $sections,
|
54 |
'must_login' => ! is_user_logged_in() && tribe( Module::class )->login_required(),
|
55 |
'login_url' => tribe( Checkout::class )->get_login_url(),
|
56 |
'registration_url' => tribe( Checkout::class )->get_registration_url(),
|
57 |
+
'is_tec_active' => defined( 'TRIBE_EVENTS_FILE' ) && class_exists( 'Tribe__Events__Main' ),
|
58 |
+
'gateways' => tribe( Manager::class )->get_gateways(),
|
59 |
+
'gateways_active' => $this->get_gateways_active(),
|
60 |
];
|
61 |
|
62 |
$this->template_vars = $args;
|
85 |
return $html;
|
86 |
}
|
87 |
|
88 |
+
/**
|
89 |
+
* Get the number of active gateways.
|
90 |
+
*
|
91 |
+
* @since 5.1.10
|
92 |
+
*
|
93 |
+
* @return int The number of active gateways.
|
94 |
+
*/
|
95 |
+
public function get_gateways_active() {
|
96 |
+
$gateways = tribe( Manager::class )->get_gateways();
|
97 |
+
$gateways_active = 0;
|
98 |
+
|
99 |
+
// Get all of the gateways.
|
100 |
+
foreach ( $gateways as $gateway_key => $gateway ) {
|
101 |
+
$gateways_active += (int) $gateway->is_active();
|
102 |
+
}
|
103 |
+
|
104 |
+
return $gateways_active;
|
105 |
+
}
|
106 |
+
|
107 |
}
|
src/Tickets/Commerce/Shortcodes/Success_Shortcode.php
CHANGED
@@ -40,10 +40,11 @@ class Success_Shortcode extends Shortcode_Abstract {
|
|
40 |
] )->first();
|
41 |
|
42 |
$args = [
|
43 |
-
'provider_id'
|
44 |
-
'provider'
|
45 |
-
'order_id'
|
46 |
-
'order'
|
|
|
47 |
];
|
48 |
|
49 |
$this->template_vars = $args;
|
@@ -67,7 +68,7 @@ class Success_Shortcode extends Shortcode_Abstract {
|
|
67 |
$html = $this->get_template()->template( 'success', $args, false );
|
68 |
|
69 |
// Enqueue assets.
|
70 |
-
tribe_asset_enqueue_group( '
|
71 |
|
72 |
return $html;
|
73 |
}
|
40 |
] )->first();
|
41 |
|
42 |
$args = [
|
43 |
+
'provider_id' => Module::class,
|
44 |
+
'provider' => tribe( Module::class ),
|
45 |
+
'order_id' => $order_id,
|
46 |
+
'order' => $order,
|
47 |
+
'is_tec_active' => defined( 'TRIBE_EVENTS_FILE' ) && class_exists( 'Tribe__Events__Main' ),
|
48 |
];
|
49 |
|
50 |
$this->template_vars = $args;
|
68 |
$html = $this->get_template()->template( 'success', $args, false );
|
69 |
|
70 |
// Enqueue assets.
|
71 |
+
tribe_asset_enqueue_group( 'tribe-tickets-commerce' );
|
72 |
|
73 |
return $html;
|
74 |
}
|
src/Tickets/Commerce/Status/Completed.php
CHANGED
@@ -32,8 +32,6 @@ class Completed extends Status_Abstract {
|
|
32 |
*/
|
33 |
protected $flags = [
|
34 |
'complete',
|
35 |
-
'trigger_option',
|
36 |
-
'attendee_generation',
|
37 |
'attendee_dispatch',
|
38 |
'stock_reduced',
|
39 |
'count_attendee',
|
32 |
*/
|
33 |
protected $flags = [
|
34 |
'complete',
|
|
|
|
|
35 |
'attendee_dispatch',
|
36 |
'stock_reduced',
|
37 |
'count_attendee',
|
src/Tickets/Commerce/Status/Not_Completed.php
CHANGED
@@ -34,8 +34,8 @@ class Not_Completed extends Status_Abstract {
|
|
34 |
protected $flags = [
|
35 |
'incomplete',
|
36 |
'warning',
|
37 |
-
'
|
38 |
-
'
|
39 |
];
|
40 |
|
41 |
/**
|
34 |
protected $flags = [
|
35 |
'incomplete',
|
36 |
'warning',
|
37 |
+
'increase_stock',
|
38 |
+
'archive_attendees'
|
39 |
];
|
40 |
|
41 |
/**
|
src/Tickets/Commerce/Status/Pending.php
CHANGED
@@ -4,6 +4,9 @@ namespace TEC\Tickets\Commerce\Status;
|
|
4 |
|
5 |
use TEC\Tickets\Commerce\Module;
|
6 |
use TEC\Tickets\Commerce\Ticket;
|
|
|
|
|
|
|
7 |
use WP_Error;
|
8 |
|
9 |
/**
|
@@ -37,8 +40,6 @@ class Pending extends Status_Abstract {
|
|
37 |
* {@inheritdoc}
|
38 |
*/
|
39 |
protected $flags = [
|
40 |
-
'generate_attendees',
|
41 |
-
'reduce_stock',
|
42 |
'count_attendee',
|
43 |
'count_incomplete',
|
44 |
'count_sales',
|
@@ -83,7 +84,7 @@ class Pending extends Status_Abstract {
|
|
83 |
continue;
|
84 |
}
|
85 |
|
86 |
-
/** @var \Tribe__Tickets__Ticket_Object $
|
87 |
$ticket = tribe( Ticket::class )->get_ticket( $item['ticket_id'] );
|
88 |
|
89 |
if ( null === $ticket ) {
|
@@ -145,9 +146,29 @@ class Pending extends Status_Abstract {
|
|
145 |
}
|
146 |
}
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
}
|
152 |
|
153 |
return true;
|
4 |
|
5 |
use TEC\Tickets\Commerce\Module;
|
6 |
use TEC\Tickets\Commerce\Ticket;
|
7 |
+
use TEC\Tickets\Event;
|
8 |
+
use Tribe__Date_Utils as Dates;
|
9 |
+
|
10 |
use WP_Error;
|
11 |
|
12 |
/**
|
40 |
* {@inheritdoc}
|
41 |
*/
|
42 |
protected $flags = [
|
|
|
|
|
43 |
'count_attendee',
|
44 |
'count_incomplete',
|
45 |
'count_sales',
|
84 |
continue;
|
85 |
}
|
86 |
|
87 |
+
/** @var \Tribe__Tickets__Ticket_Object $ticket */
|
88 |
$ticket = tribe( Ticket::class )->get_ticket( $item['ticket_id'] );
|
89 |
|
90 |
if ( null === $ticket ) {
|
146 |
}
|
147 |
}
|
148 |
|
149 |
+
if ( ! $ticket->date_in_range( Dates::build_date_object() ) ) {
|
150 |
+
$now = Dates::build_date_object();
|
151 |
+
$start_sale_date = $ticket->start_date;
|
152 |
+
$start_sale_time = Dates::reformat( $ticket->start_time, tribe_get_time_format() );
|
153 |
+
|
154 |
+
if ( $ticket->date_is_earlier( $now ) ) {
|
155 |
+
$message = sprintf( __( '%s will be available on %s at %s', 'event-tickets' ), tribe_get_ticket_label_plural( 'unavailable_future_display_date' ), $start_sale_date, $start_sale_time );
|
156 |
+
} elseif ( $ticket->date_is_later( $now ) ) {
|
157 |
+
$message = sprintf( __( '%s are no longer available.', 'event-tickets' ), tribe_get_ticket_label_plural( 'unavailable_past' ) );
|
158 |
+
} else {
|
159 |
+
$message = sprintf( __( 'There are no %s available at this time.', 'event-tickets' ), tribe_get_ticket_label_plural( 'unavailable_mixed' ) );
|
160 |
+
}
|
161 |
+
|
162 |
+
return new WP_Error(
|
163 |
+
'tec-tc-ticket-unavailable',
|
164 |
+
$message,
|
165 |
+
[
|
166 |
+
'ticket' => $item['ticket_id'],
|
167 |
+
'order' => $order,
|
168 |
+
'new_status' => $this
|
169 |
+
]
|
170 |
+
);
|
171 |
+
}
|
172 |
}
|
173 |
|
174 |
return true;
|
src/Tickets/Commerce/Status/Status_Abstract.php
CHANGED
@@ -68,23 +68,24 @@ abstract class Status_Abstract implements Status_Interface {
|
|
68 |
/**
|
69 |
* {@inheritdoc}
|
70 |
*/
|
71 |
-
public function get_flags() {
|
72 |
-
return $this->filter_get_flags( $this->flags );
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
* {@inheritdoc}
|
77 |
*/
|
78 |
-
public function filter_get_flags( $flags ) {
|
79 |
/**
|
80 |
* Allows filtering of which flags are associated with this Status.
|
81 |
*
|
82 |
* @since 5.1.9
|
83 |
*
|
84 |
* @param string[] $flags Set of flags we will use.
|
|
|
85 |
* @param static $status Which status these flags are associated with.
|
86 |
*/
|
87 |
-
$flags = apply_filters( 'tec_tickets_commerce_order_status_get_flags', $flags, $this );
|
88 |
|
89 |
/**
|
90 |
* Allows filtering of which flags are associated with this Status.
|
@@ -92,16 +93,17 @@ abstract class Status_Abstract implements Status_Interface {
|
|
92 |
* @since 5.1.9
|
93 |
*
|
94 |
* @param string[] $flags Set of flags we will use.
|
|
|
95 |
* @param static $status Which status these flags are associated with.
|
96 |
*/
|
97 |
-
return apply_filters( "tec_tickets_commerce_order_status_{$this->get_slug()}_get_flags", $flags, $this );
|
98 |
}
|
99 |
|
100 |
/**
|
101 |
* {@inheritdoc}
|
102 |
*/
|
103 |
-
public function has_flags( $flags, $operator = 'AND' ) {
|
104 |
-
$intersection = array_intersect( (array) $flags, $this->get_flags() );
|
105 |
|
106 |
if ( 'AND' === strtoupper( $operator ) ) {
|
107 |
return count( $flags ) === count( $intersection );
|
68 |
/**
|
69 |
* {@inheritdoc}
|
70 |
*/
|
71 |
+
public function get_flags( \WP_Post $post = null ) {
|
72 |
+
return $this->filter_get_flags( $this->flags, $post );
|
73 |
}
|
74 |
|
75 |
/**
|
76 |
* {@inheritdoc}
|
77 |
*/
|
78 |
+
public function filter_get_flags( $flags, \WP_Post $post = null ) {
|
79 |
/**
|
80 |
* Allows filtering of which flags are associated with this Status.
|
81 |
*
|
82 |
* @since 5.1.9
|
83 |
*
|
84 |
* @param string[] $flags Set of flags we will use.
|
85 |
+
* @param \WP_Post $post Which order we are testing against.
|
86 |
* @param static $status Which status these flags are associated with.
|
87 |
*/
|
88 |
+
$flags = apply_filters( 'tec_tickets_commerce_order_status_get_flags', $flags, $post, $this );
|
89 |
|
90 |
/**
|
91 |
* Allows filtering of which flags are associated with this Status.
|
93 |
* @since 5.1.9
|
94 |
*
|
95 |
* @param string[] $flags Set of flags we will use.
|
96 |
+
* @param \WP_Post $post Which order we are testing against.
|
97 |
* @param static $status Which status these flags are associated with.
|
98 |
*/
|
99 |
+
return apply_filters( "tec_tickets_commerce_order_status_{$this->get_slug()}_get_flags", $flags, $post, $this );
|
100 |
}
|
101 |
|
102 |
/**
|
103 |
* {@inheritdoc}
|
104 |
*/
|
105 |
+
public function has_flags( $flags, $operator = 'AND', \WP_Post $post = null ) {
|
106 |
+
$intersection = array_intersect( (array) $flags, $this->get_flags( $post ) );
|
107 |
|
108 |
if ( 'AND' === strtoupper( $operator ) ) {
|
109 |
return count( $flags ) === count( $intersection );
|
src/Tickets/Commerce/Status/Status_Handler.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace TEC\Tickets\Commerce\Status;
|
4 |
|
5 |
use TEC\Tickets\Commerce\Order;
|
|
|
6 |
|
7 |
/**
|
8 |
* Class Status_Handler
|
@@ -305,6 +306,23 @@ class Status_Handler extends \tad_DI52_ServiceProvider {
|
|
305 |
}
|
306 |
}
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
/**
|
309 |
* Whether an order status will mark a transaction as completed one way or another.
|
310 |
*
|
3 |
namespace TEC\Tickets\Commerce\Status;
|
4 |
|
5 |
use TEC\Tickets\Commerce\Order;
|
6 |
+
use TEC\Tickets\Commerce\Settings;
|
7 |
|
8 |
/**
|
9 |
* Class Status_Handler
|
306 |
}
|
307 |
}
|
308 |
|
309 |
+
/**
|
310 |
+
* Gets the status in which we decrease inventory and add an attendee.
|
311 |
+
*
|
312 |
+
* @since 5.1.10
|
313 |
+
*
|
314 |
+
* @return Status_Abstract
|
315 |
+
*/
|
316 |
+
public function get_inventory_decrease_status() {
|
317 |
+
$status = $this->get_by_slug( tribe_get_option( Settings::$option_stock_handling, Pending::SLUG ) );
|
318 |
+
|
319 |
+
if ( ! $status instanceof Status_Abstract ) {
|
320 |
+
$status = tribe( Pending::class );
|
321 |
+
}
|
322 |
+
|
323 |
+
return $status;
|
324 |
+
}
|
325 |
+
|
326 |
/**
|
327 |
* Whether an order status will mark a transaction as completed one way or another.
|
328 |
*
|
src/Tickets/Commerce/Status/Status_Interface.php
CHANGED
@@ -25,10 +25,11 @@ interface Status_Interface {
|
|
25 |
* @since 5.1.9
|
26 |
*
|
27 |
* @param string[] $flags Which flags will be filtered.
|
|
|
28 |
*
|
29 |
* @return string[]
|
30 |
*/
|
31 |
-
public function filter_get_flags( $flags );
|
32 |
|
33 |
/**
|
34 |
* Gets the name of this status.
|
@@ -53,9 +54,11 @@ interface Status_Interface {
|
|
53 |
*
|
54 |
* @since 5.1.9
|
55 |
*
|
|
|
|
|
56 |
* @return array
|
57 |
*/
|
58 |
-
public function get_flags();
|
59 |
|
60 |
/**
|
61 |
* Determines if this Status has a set of flags.
|
@@ -64,11 +67,11 @@ interface Status_Interface {
|
|
64 |
*
|
65 |
* @param array|string $flags Which flags we are testing.
|
66 |
* @param string $operator Operator for the test.
|
|
|
67 |
*
|
68 |
* @return bool
|
69 |
*/
|
70 |
-
public function has_flags( $flags, $operator = 'AND' );
|
71 |
-
|
72 |
|
73 |
/**
|
74 |
* Determines if a given order can be modified to this status.
|
25 |
* @since 5.1.9
|
26 |
*
|
27 |
* @param string[] $flags Which flags will be filtered.
|
28 |
+
* @param \WP_Post $post Which order we are testing against.
|
29 |
*
|
30 |
* @return string[]
|
31 |
*/
|
32 |
+
public function filter_get_flags( $flags, \WP_Post $post = null );
|
33 |
|
34 |
/**
|
35 |
* Gets the name of this status.
|
54 |
*
|
55 |
* @since 5.1.9
|
56 |
*
|
57 |
+
* @param \WP_Post $post Which order we are testing against.
|
58 |
+
*
|
59 |
* @return array
|
60 |
*/
|
61 |
+
public function get_flags( \WP_Post $post = null );
|
62 |
|
63 |
/**
|
64 |
* Determines if this Status has a set of flags.
|
67 |
*
|
68 |
* @param array|string $flags Which flags we are testing.
|
69 |
* @param string $operator Operator for the test.
|
70 |
+
* @param \WP_Post $post Which order we are testing against.
|
71 |
*
|
72 |
* @return bool
|
73 |
*/
|
74 |
+
public function has_flags( $flags, $operator = 'AND', \WP_Post $post = null );
|
|
|
75 |
|
76 |
/**
|
77 |
* Determines if a given order can be modified to this status.
|
src/Tickets/Commerce/Success.php
CHANGED
@@ -122,4 +122,23 @@ class Success {
|
|
122 |
tribe( Cart::class )->set_cart_hash_cookie( $cookie_param );
|
123 |
}
|
124 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
}
|
122 |
tribe( Cart::class )->set_cart_hash_cookie( $cookie_param );
|
123 |
}
|
124 |
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Maybe add a post display state for special Tickets Commerce Success Page in the page list table.
|
128 |
+
*
|
129 |
+
* @since 5.1.10
|
130 |
+
*
|
131 |
+
* @param array $post_states An array of post display states.
|
132 |
+
* @param WP_Post $post The current post object.
|
133 |
+
*
|
134 |
+
* @return array $post_states An array of post display states.
|
135 |
+
*/
|
136 |
+
public function maybe_add_display_post_states( $post_states, $post ) {
|
137 |
+
|
138 |
+
if ( $this->get_page_id() === $post->ID ) {
|
139 |
+
$post_states['tec_tickets_commerce_page_success'] = __( 'Tickets Commerce Success Page', 'event-tickets' );
|
140 |
+
}
|
141 |
+
|
142 |
+
return $post_states;
|
143 |
+
}
|
144 |
}
|
src/Tribe/Attendee_Registration/Main.php
CHANGED
@@ -172,7 +172,7 @@ class Tribe__Tickets__Attendee_Registration__Main {
|
|
172 |
*/
|
173 |
$checkout_url = apply_filters( 'tribe_tickets_attendee_registration_checkout_url', null );
|
174 |
|
175 |
-
if ( Tribe__Tickets__Commerce__PayPal__Main::ATTENDEE_OBJECT === tribe_get_request_var(
|
176 |
return null;
|
177 |
}
|
178 |
|
172 |
*/
|
173 |
$checkout_url = apply_filters( 'tribe_tickets_attendee_registration_checkout_url', null );
|
174 |
|
175 |
+
if ( Tribe__Tickets__Commerce__PayPal__Main::ATTENDEE_OBJECT === tribe_get_request_var( tribe_tickets_get_provider_query_slug() ) ) {
|
176 |
return null;
|
177 |
}
|
178 |
|
src/Tribe/Attendees_Table.php
CHANGED
@@ -385,7 +385,7 @@ class Tribe__Tickets__Attendees_Table extends WP_List_Table {
|
|
385 |
|
386 |
$default_actions = [];
|
387 |
$provider = ! empty( $item['provider'] ) ? $item['provider'] : null;
|
388 |
-
$not_going = empty( $item['order_status'] ) || $item['order_status'] === 'no';
|
389 |
|
390 |
if ( is_object( $this->event ) && isset( $this->event->ID ) && ! $not_going ) {
|
391 |
$default_actions[] = sprintf(
|
385 |
|
386 |
$default_actions = [];
|
387 |
$provider = ! empty( $item['provider'] ) ? $item['provider'] : null;
|
388 |
+
$not_going = empty( $item['order_status'] ) || $item['order_status'] === 'no' || 'cancelled' === $item['order_status'] || 'refunded' === $item['order_status'];
|
389 |
|
390 |
if ( is_object( $this->event ) && isset( $this->event->ID ) && ! $not_going ) {
|
391 |
$default_actions[] = sprintf(
|
src/Tribe/Commerce/Cart.php
CHANGED
@@ -39,7 +39,7 @@ class Tribe__Tickets__Commerce__Cart {
|
|
39 |
}
|
40 |
|
41 |
$post_id = isset( $data['tribe_tickets_post_id'] ) ? absint( $data['tribe_tickets_post_id'] ) : null;
|
42 |
-
$provider = isset( $data['tribe_tickets_provider'] ) ? sanitize_text_field( $data['tribe_tickets_provider'] ) : tribe_get_request_var(
|
43 |
$tickets = isset( $data['tribe_tickets_tickets'] ) ? $data['tribe_tickets_tickets'] : null;
|
44 |
$meta = isset( $data['tribe_tickets_meta'] ) ? $data['tribe_tickets_meta'] : null;
|
45 |
|
39 |
}
|
40 |
|
41 |
$post_id = isset( $data['tribe_tickets_post_id'] ) ? absint( $data['tribe_tickets_post_id'] ) : null;
|
42 |
+
$provider = isset( $data['tribe_tickets_provider'] ) ? sanitize_text_field( $data['tribe_tickets_provider'] ) : tribe_get_request_var( tribe_tickets_get_provider_query_slug() );
|
43 |
$tickets = isset( $data['tribe_tickets_tickets'] ) ? $data['tribe_tickets_tickets'] : null;
|
44 |
$meta = isset( $data['tribe_tickets_meta'] ) ? $data['tribe_tickets_meta'] : null;
|
45 |
|
src/Tribe/Commerce/PayPal/Main.php
CHANGED
@@ -221,8 +221,6 @@ class Tribe__Tickets__Commerce__PayPal__Main extends Tribe__Tickets__Tickets {
|
|
221 |
* @return bool
|
222 |
*/
|
223 |
public function is_active() {
|
224 |
-
$is_active = tec_tickets_commerce_is_enabled() ? false : null;
|
225 |
-
|
226 |
/**
|
227 |
* Filters the check for the active status of the PayPal tickets module.
|
228 |
*
|
@@ -233,7 +231,7 @@ class Tribe__Tickets__Commerce__PayPal__Main extends Tribe__Tickets__Tickets {
|
|
233 |
* @param bool $is_active Whether the provider is active.
|
234 |
* @param Tribe__Tickets__Commerce__PayPal__Main $commerce The Tickets Commerce provider.
|
235 |
*/
|
236 |
-
$is_active = apply_filters( 'tribe_tickets_commerce_paypal_is_active',
|
237 |
|
238 |
if ( null !== $is_active ) {
|
239 |
return (bool) $is_active;
|
221 |
* @return bool
|
222 |
*/
|
223 |
public function is_active() {
|
|
|
|
|
224 |
/**
|
225 |
* Filters the check for the active status of the PayPal tickets module.
|
226 |
*
|
231 |
* @param bool $is_active Whether the provider is active.
|
232 |
* @param Tribe__Tickets__Commerce__PayPal__Main $commerce The Tickets Commerce provider.
|
233 |
*/
|
234 |
+
$is_active = apply_filters( 'tribe_tickets_commerce_paypal_is_active', null, $this );
|
235 |
|
236 |
if ( null !== $is_active ) {
|
237 |
return (bool) $is_active;
|
src/Tribe/Editor.php
CHANGED
@@ -51,6 +51,7 @@ class Tribe__Tickets__Editor extends Tribe__Editor {
|
|
51 |
*
|
52 |
* @since 4.9
|
53 |
*
|
|
|
54 |
* @param array $template Array of all the templates used by default
|
55 |
* @param string $post_type The current post type
|
56 |
*
|
@@ -222,10 +223,13 @@ class Tribe__Tickets__Editor extends Tribe__Editor {
|
|
222 |
* @return string
|
223 |
*/
|
224 |
public function filter_get_price_fields( $post_id, $ticket_id ) {
|
225 |
-
$
|
|
|
|
|
226 |
'post_id' => $post_id,
|
227 |
'ticket_id' => $ticket_id,
|
228 |
-
|
|
|
229 |
|
230 |
return tribe( 'tickets.admin.views' )->template( 'editor/fieldset/price', $context );
|
231 |
}
|
51 |
*
|
52 |
* @since 4.9
|
53 |
*
|
54 |
+
*
|
55 |
* @param array $template Array of all the templates used by default
|
56 |
* @param string $post_type The current post type
|
57 |
*
|
223 |
* @return string
|
224 |
*/
|
225 |
public function filter_get_price_fields( $post_id, $ticket_id ) {
|
226 |
+
$provider = Tribe__Tickets__Tickets::get_event_ticket_provider_object( $post_id );
|
227 |
+
|
228 |
+
$context = [
|
229 |
'post_id' => $post_id,
|
230 |
'ticket_id' => $ticket_id,
|
231 |
+
'provider' => $provider,
|
232 |
+
];
|
233 |
|
234 |
return tribe( 'tickets.admin.views' )->template( 'editor/fieldset/price', $context );
|
235 |
}
|
src/Tribe/Main.php
CHANGED
@@ -7,7 +7,7 @@ class Tribe__Tickets__Main {
|
|
7 |
/**
|
8 |
* Current version of this plugin
|
9 |
*/
|
10 |
-
const VERSION = '5.1.
|
11 |
|
12 |
/**
|
13 |
* Used to store the version history.
|
7 |
/**
|
8 |
* Current version of this plugin
|
9 |
*/
|
10 |
+
const VERSION = '5.1.10';
|
11 |
|
12 |
/**
|
13 |
* Used to store the version history.
|
src/Tribe/Metabox.php
CHANGED
File without changes
|
src/Tribe/RSVP.php
CHANGED
File without changes
|
src/Tribe/Ticket_Object.php
CHANGED
File without changes
|
src/Tribe/Tickets.php
CHANGED
@@ -3959,7 +3959,8 @@ if ( ! class_exists( 'Tribe__Tickets__Tickets' ) ) {
|
|
3959 |
$url = $attendee_reg->get_url();
|
3960 |
|
3961 |
if ( ! empty( $q_provider ) ) {
|
3962 |
-
$
|
|
|
3963 |
}
|
3964 |
|
3965 |
if ( ! empty( $redirect ) ) {
|
3959 |
$url = $attendee_reg->get_url();
|
3960 |
|
3961 |
if ( ! empty( $q_provider ) ) {
|
3962 |
+
$provider_slug = tribe_tickets_get_provider_query_slug();
|
3963 |
+
$url = add_query_arg( $provider_slug, $q_provider, $url );
|
3964 |
}
|
3965 |
|
3966 |
if ( ! empty( $redirect ) ) {
|
src/Tribe/Tickets_Handler.php
CHANGED
File without changes
|
src/admin-views/attendees.php
CHANGED
File without changes
|
src/admin-views/editor/fieldset/price.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
if ( ! isset( $post_id ) ) {
|
4 |
$post_id = get_the_ID();
|
5 |
}
|
|
|
6 |
$validation_attrs = [
|
7 |
'data-validation-error="' . esc_attr( sprintf(
|
8 |
// Translators: %s: singular version of the Ticket label.
|
@@ -11,54 +12,50 @@ $validation_attrs = [
|
|
11 |
) ) . '"'
|
12 |
];
|
13 |
|
14 |
-
$provider = null;
|
15 |
$ticket = null;
|
16 |
$is_paypal_ticket = false;
|
17 |
$price_description = '';
|
18 |
$price = null;
|
19 |
$sale_price = null;
|
20 |
$disabled = false;
|
21 |
-
if ( ! isset( $ticket_id ) ) {
|
22 |
-
$ticket_id = null;
|
23 |
-
} else {
|
24 |
-
$provider = tribe_tickets_get_ticket_provider( $ticket_id );
|
25 |
-
$is_paypal_ticket = $provider instanceof Tribe__Tickets__Commerce__PayPal__Main;
|
26 |
|
27 |
-
|
28 |
-
$description_string = esc_html( apply_filters( 'tribe_tickets_price_description', $description_string, $ticket_id ) );
|
29 |
-
$price_description = $is_paypal_ticket ? '' : $description_string;
|
30 |
|
31 |
-
|
32 |
-
$validation_attrs[] = 'data-required';
|
33 |
-
$validation_attrs[] = 'data-validation-is-greater-than="0"';
|
34 |
|
35 |
-
|
|
|
|
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
*
|
42 |
-
* @param boolean $disabled Whether the price field is disabled.
|
43 |
-
* @param WP_Post|int $ticket_id The current ticket object or its ID
|
44 |
-
*/
|
45 |
-
$disabled = apply_filters( 'tribe_tickets_price_disabled', false, $ticket_id );
|
46 |
-
$disabled = (bool) filter_var( $disabled, FILTER_VALIDATE_BOOLEAN );
|
47 |
-
$ticket = empty( $provider ) ? $ticket : $provider->get_ticket( $post_id, $ticket_id );
|
48 |
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
62 |
}
|
63 |
}
|
64 |
|
@@ -128,4 +125,4 @@ if ( ! isset( $ticket_id ) ) {
|
|
128 |
<p class="description ticket_form_right"><?php echo esc_html( $sale_price_desc ); ?></p>
|
129 |
</div>
|
130 |
<?php endif; ?>
|
131 |
-
|
3 |
if ( ! isset( $post_id ) ) {
|
4 |
$post_id = get_the_ID();
|
5 |
}
|
6 |
+
|
7 |
$validation_attrs = [
|
8 |
'data-validation-error="' . esc_attr( sprintf(
|
9 |
// Translators: %s: singular version of the Ticket label.
|
12 |
) ) . '"'
|
13 |
];
|
14 |
|
|
|
15 |
$ticket = null;
|
16 |
$is_paypal_ticket = false;
|
17 |
$price_description = '';
|
18 |
$price = null;
|
19 |
$sale_price = null;
|
20 |
$disabled = false;
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
$provider = ! empty( $ticket_id ) ? tribe_tickets_get_ticket_provider( $ticket_id ) : $provider;
|
|
|
|
|
23 |
|
24 |
+
$is_paypal_ticket = $provider instanceof Tribe__Tickets__Commerce__PayPal__Main || $provider instanceof \TEC\Tickets\Commerce\Module;
|
|
|
|
|
25 |
|
26 |
+
$description_string = sprintf( _x( 'Leave blank for free %s', 'price description', 'event-tickets' ), tribe_get_ticket_label_singular( 'price_description' ) );
|
27 |
+
$description_string = esc_html( apply_filters( 'tribe_tickets_price_description', $description_string, $ticket_id ) );
|
28 |
+
$price_description = $is_paypal_ticket ? '' : $description_string;
|
29 |
|
30 |
+
if ( $is_paypal_ticket ) {
|
31 |
+
$validation_attrs[] = 'data-required';
|
32 |
+
$validation_attrs[] = 'data-validation-is-greater-than="0"';
|
33 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
/**
|
36 |
+
* Filters whether we should disable the ticket - separate from tribe-dependency.
|
37 |
+
*
|
38 |
+
* @since 4.10.8
|
39 |
+
*
|
40 |
+
* @param boolean $disabled Whether the price field is disabled.
|
41 |
+
* @param WP_Post|int $ticket_id The current ticket object or its ID
|
42 |
+
*/
|
43 |
+
$disabled = apply_filters( 'tribe_tickets_price_disabled', false, $ticket_id );
|
44 |
+
$disabled = (bool) filter_var( $disabled, FILTER_VALIDATE_BOOLEAN );
|
45 |
+
$ticket = empty( $provider ) ? $ticket : $provider->get_ticket( $post_id, $ticket_id );
|
46 |
|
47 |
+
// If the ticket has a WC Memberships discount for the currently-logged-in user.
|
48 |
+
$ticket_has_wc_member_discount = tribe_tickets_ticket_in_wc_membership_for_user( $ticket_id );
|
49 |
+
|
50 |
+
if ( ! empty( $ticket ) ) {
|
51 |
+
if (
|
52 |
+
$ticket->on_sale
|
53 |
+
|| $ticket_has_wc_member_discount
|
54 |
+
) {
|
55 |
+
$price = $ticket->regular_price;
|
56 |
+
$sale_price = $ticket->price;
|
57 |
+
} else {
|
58 |
+
$price = $ticket->price;
|
59 |
}
|
60 |
}
|
61 |
|
125 |
<p class="description ticket_form_right"><?php echo esc_html( $sale_price_desc ); ?></p>
|
126 |
</div>
|
127 |
<?php endif; ?>
|
128 |
+
</div>
|
src/admin-views/editor/metabox.php
CHANGED
File without changes
|
src/admin-views/list.php
CHANGED
File without changes
|
src/admin-views/meta-box.php
CHANGED
File without changes
|
src/admin-views/payments/tickets-commerce.php
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The Template for displaying the Tickets Commerce Payments Settings.
|
4 |
-
*
|
5 |
-
* @version 5.1.9
|
6 |
-
*
|
7 |
-
* @todo This whole file needs to be completely reviewed once the designs are correct in place.
|
8 |
-
*/
|
9 |
-
|
10 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
11 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Signup;
|
12 |
-
|
13 |
-
$merchant = tribe( Merchant::class );
|
14 |
-
$is_merchant_active = $merchant->is_active();
|
15 |
-
|
16 |
-
$display = '<div class="tec-tickets-commerce-paypal-connect">';
|
17 |
-
|
18 |
-
if ( $is_merchant_active ) {
|
19 |
-
$name = $merchant->get_merchant_id();
|
20 |
-
|
21 |
-
$disconnect_url = Tribe__Settings::instance()->get_url( [ 'tab' => 'payments', 'tc-action' => 'paypal-disconnect' ] );
|
22 |
-
$refresh_url = Tribe__Settings::instance()->get_url( [ 'tab' => 'payments', 'tc-action' => 'paypal-refresh-access-token' ] );
|
23 |
-
$refresh_user_info_url = Tribe__Settings::instance()->get_url( [ 'tab' => 'payments', 'tc-action' => 'paypal-refresh-user-info' ] );
|
24 |
-
|
25 |
-
$disconnect = ' <a href="' . esc_url( $disconnect_url ) . '">' . esc_html__( 'Disconnect', 'event-tickets' ) . '</a>';
|
26 |
-
$refresh = ' <a href="' . esc_url( $refresh_url ) . '">' . esc_html__( 'Refresh Access Token', 'event-tickets' ) . '</a>';
|
27 |
-
$refresh_user_info = ' <a href="' . esc_url( $refresh_user_info_url ) . '">' . esc_html__( 'Refresh User Info', 'event-tickets' ) . '</a>';
|
28 |
-
$display .= '<p>' . esc_html__( 'PayPal Status: Connected', 'event-tickets' ) . '</p>';
|
29 |
-
$display .= '<p>' . esc_html( sprintf( __( 'Connected as: %1$s', 'event-tickets' ), $name ) ) . $disconnect . '</p>';
|
30 |
-
$display .= '<p>' . $refresh . $refresh_user_info . '</p>';
|
31 |
-
} else {
|
32 |
-
$display .= '<h2>' . esc_html__( 'Accept online payments with PayPal!', 'event-tickets' ) . '</h2>
|
33 |
-
' . esc_html__( 'Start selling tickets to your events today with PayPal. Attendees can purchase tickets directly on your site using debt or credit cards with no additional fees.',
|
34 |
-
'event-tickets' ) . tribe( Signup::class )->get_link_html();
|
35 |
-
}
|
36 |
-
$path = tribe_resource_url( 'images/admin/paypal_logo.png', false, null, Tribe__Tickets__Main::instance() );
|
37 |
-
$display .= '</div><div class="tec-tickets-commerce-paypal-logo"><img src=' . esc_url( $path ) . ' alt="Tickets Commerce PayPal Logo">';
|
38 |
-
|
39 |
-
$display .= '
|
40 |
-
<ul>
|
41 |
-
<li>' . esc_html__( 'Credit and debit card payments', 'event-tickets' ) . '</li>
|
42 |
-
<li>' . esc_html__( 'Easy, no API key connection', 'event-tickets' ) . '</li>
|
43 |
-
<li>' . esc_html__( 'Accept payments from around the world', 'event-tickets' ) . '</li>
|
44 |
-
<li>' . esc_html__( 'Support 3D Secure Payments', 'event-tickets' ) . '</li>
|
45 |
-
</ul>
|
46 |
-
';
|
47 |
-
|
48 |
-
$display .= '</div>';
|
49 |
-
|
50 |
-
$tickets_fields = [
|
51 |
-
'tribe-form-content-start' => [
|
52 |
-
'type' => 'html',
|
53 |
-
'html' => '<div class="tribe-settings-form-wrap tec-tickets-commerce-payments">',
|
54 |
-
],
|
55 |
-
'tickets-commerce-header' => [
|
56 |
-
'type' => 'html',
|
57 |
-
'html' => '<div class="tec-tickets-commerce-toggle"><label class="tec-tickets-commerce-switch"><input type="checkbox"><span class="tec-tickets-commerce-slider round"></span></label><h2>' . esc_html__( 'Enable TicketsCommerce', 'event-tickets' ) . '</h2></div>',
|
58 |
-
],
|
59 |
-
'tickets-commerce-description' => [
|
60 |
-
'type' => 'html',
|
61 |
-
'html' => '<div class="tec-tickets-commerce-description">' . esc_html__( 'TicketsCommerce allows you to accept payments for tickets with Event Tickets and Event Tickets Plus. Configure payments through PayPal, allowing users to pay with credit card or their PayPal account. Learn More about payment processing with TicketsCommerce.' ) . '</div>',
|
62 |
-
],
|
63 |
-
'tickets-commerce-paypal-description' => [
|
64 |
-
'type' => 'html',
|
65 |
-
'html' => '<div class="tec-tickets-commerce-paypal">' . $display . '</div>',
|
66 |
-
],
|
67 |
-
'tribe-form-content-end' => [
|
68 |
-
'type' => 'html',
|
69 |
-
'html' => '</div>',
|
70 |
-
],
|
71 |
-
];
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Filters the fields to be registered in the Events > Settings > Payments tab.
|
75 |
-
*
|
76 |
-
* @see Tribe__Field
|
77 |
-
* @see Tribe__Settings_Tab
|
78 |
-
*
|
79 |
-
* @param array $tickets_fields An associative array of fields definitions to register.
|
80 |
-
*
|
81 |
-
*/
|
82 |
-
$tickets_fields = apply_filters( 'tribe_tickets_commerce_payments_settings_tab_fields', $tickets_fields );
|
83 |
-
|
84 |
-
$tickets_tab = [
|
85 |
-
'priority' => 20,
|
86 |
-
'fields' => $tickets_fields,
|
87 |
-
'show_save' => false,
|
88 |
-
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/admin-views/privacy.php
CHANGED
File without changes
|
src/admin-views/rsvp-metabox-capacity.php
CHANGED
File without changes
|
src/admin-views/rsvp-metabox-not-going.php
CHANGED
File without changes
|
src/admin-views/settings/tickets-commerce/paypal-commerce/connect-with-paypal.php
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Connect with PayPal section for the Tickets Commerce > PayPal Commerce gateway settings.
|
4 |
-
*
|
5 |
-
* @since 5.1.6
|
6 |
-
*
|
7 |
-
* @var bool $account_is_connected [Global] Whether the account is connected.
|
8 |
-
* @var string $merchant_id [Global] The merchant ID (if there is any).
|
9 |
-
* @var string $formatted_errors [Global] The formatted account errors.
|
10 |
-
* @var string $guidance_html [Global] The guidance HTML used when showing errors.
|
11 |
-
*/
|
12 |
-
|
13 |
-
// @todo Replace font awesome icon usages.
|
14 |
-
|
15 |
-
?>
|
16 |
-
|
17 |
-
<script type="text/javascript">
|
18 |
-
function tribeTicketsAdminCommerceSettingsOnBoardCallback( authCode, sharedId ) {
|
19 |
-
tribe.tickets.admin.commerceSettings.onBoardCallback( authCode, sharedId );
|
20 |
-
}
|
21 |
-
</script>
|
22 |
-
<div id="give-paypal-commerce-account-manager-field-wrap" class="tribe-common">
|
23 |
-
<div class="connect-button-wrap">
|
24 |
-
<div class="button-wrap connection-setting <?php echo $account_is_connected ? 'tribe-common-a11y-hidden' : ''; ?>">
|
25 |
-
<div>
|
26 |
-
<button class="button button-primary button-large" id="js-give-paypal-on-boarding-handler">
|
27 |
-
<i class="fab fa-paypal"></i>
|
28 |
-
<?php esc_html_e( 'Connect with PayPal', 'event-tickets' ); ?>
|
29 |
-
</button>
|
30 |
-
<a class="tribe-common-a11y-hidden" target="_blank"
|
31 |
-
data-paypal-onboard-complete="tribeTicketsAdminCommerceSettingsOnBoardCallback" href="#"
|
32 |
-
data-paypal-button="true">
|
33 |
-
<?php esc_html_e( 'Sign up for PayPal', 'event-tickets' ); ?>
|
34 |
-
</a>
|
35 |
-
<span class="tooltip">
|
36 |
-
<span class="left-arrow"></span>
|
37 |
-
<?php esc_html_e( 'Click to get started!', 'event-tickets' ); ?>
|
38 |
-
</span>
|
39 |
-
</div>
|
40 |
-
<span class="give-field-description">
|
41 |
-
<i class="fa fa-exclamation"></i>
|
42 |
-
<?php esc_html_e( 'PayPal is currently NOT connected.', 'event-tickets' ); ?>
|
43 |
-
</span>
|
44 |
-
</div>
|
45 |
-
|
46 |
-
<div class="button-wrap disconnection-setting <?php echo ! $account_is_connected ? 'tribe-common-a11y-hidden' : ''; ?>">
|
47 |
-
<div>
|
48 |
-
<button class="button button-large disabled" disabled="disabled">
|
49 |
-
<i class="fab fa-paypal"></i> <?php esc_html_e( 'Connected', 'event-tickets' ); ?>
|
50 |
-
</button>
|
51 |
-
</div>
|
52 |
-
<div>
|
53 |
-
<span class="give-field-description">
|
54 |
-
<i class="fa fa-check"></i>
|
55 |
-
<?php esc_html_e( 'Connected for payments as', 'event-tickets' ); ?>
|
56 |
-
<span class="paypal-account-email">
|
57 |
-
<?php echo esc_html( $merchant_id ); ?>
|
58 |
-
</span>
|
59 |
-
</span>
|
60 |
-
<span class="actions">
|
61 |
-
<a href="#" id="js-give-paypal-disconnect-paypal-account">
|
62 |
-
<?php esc_html_e( 'Disconnect', 'event-tickets' ); ?>
|
63 |
-
</a>
|
64 |
-
</span>
|
65 |
-
</div>
|
66 |
-
|
67 |
-
<div class="api-access-feature-list-wrap">
|
68 |
-
<p><?php esc_html_e( 'APIs Connected:', 'event-tickets' ); ?></p>
|
69 |
-
<ul>
|
70 |
-
<li><?php esc_html_e( 'Payments', 'event-tickets' ); ?></li>
|
71 |
-
<li><?php esc_html_e( 'Refunds', 'event-tickets' ); ?></li>
|
72 |
-
</ul>
|
73 |
-
</div>
|
74 |
-
</div>
|
75 |
-
|
76 |
-
<?php $this->template( 'settings/tickets-commerce/paypal-commerce/connect-with-paypal/errors' ); ?>
|
77 |
-
</div>
|
78 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/admin-views/settings/tickets-commerce/paypal-commerce/connect-with-paypal/errors.php
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Account errors list for the Tickets Commerce > PayPal Commerce gateway settings.
|
4 |
-
*
|
5 |
-
* @since 5.1.6
|
6 |
-
*
|
7 |
-
* @var bool $account_is_connected [Global] Whether the account is connected.
|
8 |
-
* @var string $merchant_id [Global] The merchant ID (if there is any).
|
9 |
-
* @var string $formatted_errors [Global] The formatted account errors.
|
10 |
-
* @var string $guidance_html [Global] The guidance HTML used when showing errors.
|
11 |
-
*/
|
12 |
-
|
13 |
-
// Only output if we have account errors to show.
|
14 |
-
if ( empty( $formatted_errors ) ) {
|
15 |
-
return;
|
16 |
-
}
|
17 |
-
|
18 |
-
?>
|
19 |
-
<div>
|
20 |
-
<p class="error-message"><?php esc_html_e( 'Warning, your account is not ready to accept payments.', 'event-tickets' ); ?></p>
|
21 |
-
<p>
|
22 |
-
<?php esc_html_e( 'There is an issue with your PayPal account that is preventing you from being able to accept payments.', 'event-tickets' ); ?>
|
23 |
-
|
24 |
-
<?php
|
25 |
-
// phpcs:ignore
|
26 |
-
echo $guidance_html;
|
27 |
-
?>
|
28 |
-
</p>
|
29 |
-
<div class="paypal-message-template">
|
30 |
-
<p><?php esc_html_e( 'Greetings!', 'event-tickets' ); ?></p>
|
31 |
-
<p><?php esc_html_e( "I am trying to connect my PayPal account to the Event Tickets plugin for WordPress. I have gone through the onboarding process to connect my account, but when I finish I'm given the following message from Event Tickets:", 'event-tickets' ); ?></p>
|
32 |
-
|
33 |
-
<?php
|
34 |
-
// phpcs:ignore
|
35 |
-
echo $formatted_errors;
|
36 |
-
?>
|
37 |
-
|
38 |
-
<p><?php esc_html_e( 'Please help me resolve these account errors so I can begin accepting payments via PayPal on Event Tickets.', 'event-tickets' ); ?></p>
|
39 |
-
</div>
|
40 |
-
|
41 |
-
<?php if ( $account_is_connected ) : ?>
|
42 |
-
<p>
|
43 |
-
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=tribe_events&page=tribe-common&tab=event-tickets&paypalStatusCheck' ) ); ?>">
|
44 |
-
<?php esc_html_e( 'Re-Check Account Status', 'event-tickets' ); ?>
|
45 |
-
</a>
|
46 |
-
</p>
|
47 |
-
<?php endif; ?>
|
48 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/admin-views/settings/tickets-commerce/paypal-commerce/introduction.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The Template for displaying the Tickets Commerce Payments Settings.
|
4 |
-
*
|
5 |
-
* @todo This whole file needs to be completely reviewed once the designs are correct in place.
|
6 |
-
* @version 5.1.9
|
7 |
-
*
|
8 |
-
*/
|
9 |
-
|
10 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Merchant;
|
11 |
-
use TEC\Tickets\Commerce\Gateways\PayPal\Signup;
|
12 |
-
|
13 |
-
$merchant = tribe( Merchant::class );
|
14 |
-
$is_merchant_active = $merchant->is_active();
|
15 |
-
$path = tribe_resource_url( 'images/admin/paypal-logo.svg', false, null, Tribe__Tickets__Main::instance() );
|
16 |
-
?>
|
17 |
-
<div class="tec-tickets-commerce-paypal">
|
18 |
-
<div id="tec-tickets-commerce-paypal-connect">
|
19 |
-
<?php if ( $is_merchant_active ) : ?>
|
20 |
-
<?php
|
21 |
-
$name = $merchant->get_merchant_id();
|
22 |
-
|
23 |
-
$disconnect_url = Tribe__Settings::instance()->get_url( [ 'tab' => 'payments', 'tc-action' => 'paypal-disconnect' ] );
|
24 |
-
$refresh_url = Tribe__Settings::instance()->get_url( [ 'tab' => 'payments', 'tc-action' => 'paypal-refresh-access-token' ] );
|
25 |
-
$refresh_user_info_url = Tribe__Settings::instance()->get_url( [ 'tab' => 'payments', 'tc-action' => 'paypal-refresh-user-info' ] );
|
26 |
-
|
27 |
-
$disconnect = ' <a href="' . esc_url( $disconnect_url ) . '">' . esc_html__( 'Disconnect', 'event-tickets' ) . '</a>';
|
28 |
-
$refresh = ' <a href="' . esc_url( $refresh_url ) . '">' . esc_html__( 'Refresh Access Token', 'event-tickets' ) . '</a>';
|
29 |
-
$refresh_user_info = ' <a href="' . esc_url( $refresh_user_info_url ) . '">' . esc_html__( 'Refresh User Info', 'event-tickets' ) . '</a>';
|
30 |
-
?>
|
31 |
-
<p><?php esc_html_e( 'PayPal Status: Connected', 'event-tickets' ); ?></p>
|
32 |
-
<p><?php echo esc_html( sprintf( __( 'Connected as: %1$s', 'event-tickets' ), $name ) ) . $disconnect; ?></p>
|
33 |
-
<p><?php echo $refresh . $refresh_user_info; ?></p>
|
34 |
-
<?php else : ?>
|
35 |
-
<h2><?php esc_html_e( 'Accept online payments with PayPal!', 'event-tickets' ); ?></h2>
|
36 |
-
<p>
|
37 |
-
<?php esc_html_e( 'Start selling tickets to your events today with PayPal. Attendees can purchase tickets directly on your site using debt or credit cards with no additional fees.', 'event-tickets' ); ?>
|
38 |
-
</p>
|
39 |
-
<?php echo tribe( Signup::class )->get_link_html(); ?>
|
40 |
-
<?php endif; ?>
|
41 |
-
</div>
|
42 |
-
<div class="tec-tickets-commerce-paypal-logo">
|
43 |
-
<img src="<?php echo esc_url( $path ); ?>" width="316" height="84" alt="<?php esc_attr_e( 'PayPal Logo Image', 'event-tickets' ); ?>">
|
44 |
-
<ul>
|
45 |
-
<li>
|
46 |
-
<?php esc_html_e( 'Credit and Debit Card payments', 'event-tickets' ); ?>
|
47 |
-
</li>
|
48 |
-
<li>
|
49 |
-
<?php esc_html_e( 'Easy no-API key connection', 'event-tickets' ); ?>
|
50 |
-
</li>
|
51 |
-
<li>
|
52 |
-
<?php esc_html_e( 'Accept payments from around the world', 'event-tickets' ); ?>
|
53 |
-
</li>
|
54 |
-
<li>
|
55 |
-
<?php esc_html_e( 'Supports 3D Secure payments', 'event-tickets' ); ?>
|
56 |
-
</li>
|
57 |
-
</ul>
|
58 |
-
</div>
|
59 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/admin-views/settings/tickets-commerce/paypal/connect/active.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce PayPal Settings when connected.
|
4 |
+
*
|
5 |
+
* @version 5.1.10
|
6 |
+
*
|
7 |
+
* @since 5.1.10
|
8 |
+
*
|
9 |
+
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
+
* @var string $plugin_url [Global] The plugin URL.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
12 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
+
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
+
*/
|
15 |
+
|
16 |
+
if ( empty( $is_merchant_active ) ) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
$refresh_url = Tribe__Settings::instance()->get_url( [ 'tab' => 'payments', 'tc-action' => 'paypal-refresh-access-token' ] );
|
22 |
+
$refresh = ' <a href="' . esc_url( $refresh_url ) . '">' . esc_html__( 'Refresh Access Token', 'event-tickets' ) . '</a>';
|
23 |
+
|
24 |
+
$refresh_user_info_url = Tribe__Settings::instance()->get_url( [ 'tab' => 'payments', 'tc-action' => 'paypal-refresh-user-info' ] );
|
25 |
+
$refresh_user_info = ' <a href="' . esc_url( $refresh_user_info_url ) . '">' . esc_html__( 'Refresh User Info', 'event-tickets' ) . '</a>';
|
26 |
+
|
27 |
+
$refresh_webhook_url = Tribe__Settings::instance()->get_url( [ 'tab' => 'payments', 'tc-action' => 'paypal-refresh-webhook' ] );
|
28 |
+
$refresh_webhook = ' <a href="' . esc_url( $refresh_webhook_url ) . '">' . esc_html__( 'Refresh Webhook', 'event-tickets' ) . '</a>';
|
29 |
+
|
30 |
+
?>
|
31 |
+
|
32 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-paypal-connected">
|
33 |
+
|
34 |
+
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active/paypal-status' ); ?>
|
35 |
+
|
36 |
+
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active/connection' ); ?>
|
37 |
+
|
38 |
+
|
39 |
+
<p><?php echo $refresh . $refresh_user_info . $refresh_webhook; // phpcs:ignore ?></p>
|
40 |
+
|
41 |
+
</div>
|
src/admin-views/settings/tickets-commerce/paypal/connect/active/connection.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce PayPal connection details.
|
4 |
+
*
|
5 |
+
* @version 5.1.10
|
6 |
+
*
|
7 |
+
* @since 5.1.10
|
8 |
+
*
|
9 |
+
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
+
* @var string $plugin_url [Global] The plugin URL.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
12 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
+
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
+
*/
|
15 |
+
|
16 |
+
if ( empty( $is_merchant_active ) ) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
+
$name = $merchant->get_merchant_id();
|
21 |
+
$disconnect_url = Tribe__Settings::instance()->get_url( [ 'tab' => 'payments', 'tc-action' => 'paypal-disconnect' ] );
|
22 |
+
|
23 |
+
?>
|
24 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-paypal-connected-row">
|
25 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-paypal-connected-col1">
|
26 |
+
<?php esc_html_e( 'Connected as:', 'event-tickets' ); ?>
|
27 |
+
</div>
|
28 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-paypal-connected-col2">
|
29 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-paypal-connected-text-name">
|
30 |
+
<?php echo esc_html( $name ); ?>
|
31 |
+
</span>
|
32 |
+
<a
|
33 |
+
href="<?php echo esc_url( $disconnect_url ); ?>"
|
34 |
+
class="tec-tickets__admin-settings-tickets-commerce-paypal-connected-text-disconnect-link"
|
35 |
+
>
|
36 |
+
<?php esc_html_e( 'Disconnect', 'event-tickets' ); ?>
|
37 |
+
</a>
|
38 |
+
</div>
|
39 |
+
</div>
|
src/admin-views/settings/tickets-commerce/paypal/connect/active/paypal-status.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce PayPal status.
|
4 |
+
*
|
5 |
+
* @version 5.1.10
|
6 |
+
*
|
7 |
+
* @since 5.1.10
|
8 |
+
*
|
9 |
+
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
+
* @var string $plugin_url [Global] The plugin URL.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
12 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
+
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
+
*/
|
15 |
+
|
16 |
+
if ( empty( $is_merchant_active ) ) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
+
?>
|
21 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-paypal-connected-row">
|
22 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-paypal-connected-col1">
|
23 |
+
<?php esc_html_e( 'PayPal Status:', 'event-tickets' ); ?>
|
24 |
+
</div>
|
25 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-paypal-connected-col2">
|
26 |
+
<span class="tec-tickets__admin-settings-tickets-commerce-paypal-connect-text--connected">
|
27 |
+
<?php esc_html_e( 'Connected' ); ?> <span class="dashicons dashicons-saved"></span>
|
28 |
+
</span>
|
29 |
+
</div>
|
30 |
+
</div>
|
src/admin-views/settings/tickets-commerce/paypal/connect/inactive.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce PayPal Settings when inactive (not connected).
|
4 |
+
*
|
5 |
+
* @version 5.1.10
|
6 |
+
*
|
7 |
+
* @since 5.1.10
|
8 |
+
*
|
9 |
+
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
+
* @var string $plugin_url [Global] The plugin URL.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
12 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
+
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
+
*/
|
15 |
+
|
16 |
+
if ( ! empty( $is_merchant_active ) ) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
+
?>
|
21 |
+
|
22 |
+
<h2 class="tec-tickets__admin-settings-tickets-commerce-paypal-title">
|
23 |
+
<?php esc_html_e( 'Accept online payments with PayPal!', 'event-tickets' ); ?>
|
24 |
+
</h2>
|
25 |
+
|
26 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-paypal-description">
|
27 |
+
<p>
|
28 |
+
<?php esc_html_e( 'Start selling tickets to your events today with PayPal. Attendees can purchase tickets directly on your site using debt or credit cards with no additional fees.', 'event-tickets' ); ?>
|
29 |
+
</p>
|
30 |
+
|
31 |
+
<?php echo $signup->get_link_html(); // phpcs:ignore ?>
|
32 |
+
</div>
|
src/admin-views/settings/tickets-commerce/paypal/connect/logo.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce PayPal logo and features.
|
4 |
+
*
|
5 |
+
* @version 5.1.10
|
6 |
+
*
|
7 |
+
* @since 5.1.10
|
8 |
+
*
|
9 |
+
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
+
* @var string $plugin_url [Global] The plugin URL.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
12 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
+
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
+
*/
|
15 |
+
|
16 |
+
?>
|
17 |
+
|
18 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-paypal-logo">
|
19 |
+
|
20 |
+
<?php $this->template( 'settings/tickets-commerce/paypal/connect/logo/image' ); ?>
|
21 |
+
|
22 |
+
<?php $this->template( 'settings/tickets-commerce/paypal/connect/logo/features' ); ?>
|
23 |
+
|
24 |
+
</div>
|
src/admin-views/settings/tickets-commerce/paypal/connect/logo/features.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce PayPal features.
|
4 |
+
*
|
5 |
+
* @version 5.1.10
|
6 |
+
*
|
7 |
+
* @since 5.1.10
|
8 |
+
*
|
9 |
+
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
+
* @var string $plugin_url [Global] The plugin URL.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
12 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
+
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
+
*/
|
15 |
+
|
16 |
+
// Bail if PayPal is active.
|
17 |
+
if ( $is_merchant_active ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
?>
|
21 |
+
<ul>
|
22 |
+
<li>
|
23 |
+
<?php esc_html_e( 'Credit and debit card payments', 'event-tickets' ); ?>
|
24 |
+
</li>
|
25 |
+
<li>
|
26 |
+
<?php esc_html_e( 'Easy no-API key connection', 'event-tickets' ); ?>
|
27 |
+
</li>
|
28 |
+
<li>
|
29 |
+
<?php esc_html_e( 'Accept payments from around the world', 'event-tickets' ); ?>
|
30 |
+
</li>
|
31 |
+
<li>
|
32 |
+
<?php esc_html_e( 'Supports 3D Secure payments', 'event-tickets' ); ?>
|
33 |
+
</li>
|
34 |
+
</ul>
|
src/admin-views/settings/tickets-commerce/paypal/connect/logo/image.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce PayPal Settings, the PayPal logo specifically.
|
4 |
+
*
|
5 |
+
* @version 5.1.10
|
6 |
+
*
|
7 |
+
* @since 5.1.10
|
8 |
+
*
|
9 |
+
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
+
* @var string $plugin_url [Global] The plugin URL.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
12 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
+
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
+
*/
|
15 |
+
|
16 |
+
$image_src = tribe_resource_url( 'images/admin/paypal-logo.svg', false, null, Tribe__Tickets__Main::instance() );
|
17 |
+
|
18 |
+
?>
|
19 |
+
|
20 |
+
<img
|
21 |
+
src="<?php echo esc_url( $image_src ); ?>"
|
22 |
+
alt="<?php esc_attr_e( 'PayPal Logo Image', 'event-tickets' ); ?>"
|
23 |
+
class="tec-tickets__admin-settings-tickets-commerce-paypal-logo-image"
|
24 |
+
>
|
src/admin-views/settings/tickets-commerce/paypal/main.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Template for displaying the Tickets Commerce PayPal Settings.
|
4 |
+
*
|
5 |
+
* @version 5.1.10
|
6 |
+
*
|
7 |
+
* @since 5.1.10
|
8 |
+
*
|
9 |
+
* @var Tribe__Tickets__Admin__Views $this [Global] Template object.
|
10 |
+
* @var string $plugin_url [Global] The plugin URL.
|
11 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Merchant $merchant [Global] The merchant class.
|
12 |
+
* @var TEC\Tickets\Commerce\Gateways\PayPal\Signup $signup [Global] The Signup class.
|
13 |
+
* @var bool $is_merchant_active [Global] Whether the merchant is active or not.
|
14 |
+
*/
|
15 |
+
|
16 |
+
$classes = [
|
17 |
+
'tec-tickets__admin-settings-tickets-commerce-paypal',
|
18 |
+
'tec-tickets__admin-settings-tickets-commerce-paypal--connected' => $is_merchant_active,
|
19 |
+
]
|
20 |
+
?>
|
21 |
+
|
22 |
+
<div <?php tribe_classes( $classes ); ?>>
|
23 |
+
<div id="tec-tickets__admin-settings-tickets-commerce-paypal-connect" class="tec-tickets__admin-settings-tickets-commerce-paypal-connect">
|
24 |
+
|
25 |
+
<?php $this->template( 'settings/tickets-commerce/paypal/connect/inactive' ); ?>
|
26 |
+
|
27 |
+
<?php $this->template( 'settings/tickets-commerce/paypal/connect/active' ); ?>
|
28 |
+
|
29 |
+
</div>
|
30 |
+
|
31 |
+
<?php $this->template( 'settings/tickets-commerce/paypal/connect/logo' ); ?>
|
32 |
+
|
33 |
+
</div>
|
src/admin-views/{commerce/gateways → settings/tickets-commerce}/paypal/signup-link.php
RENAMED
@@ -14,14 +14,15 @@
|
|
14 |
}
|
15 |
</script>
|
16 |
|
17 |
-
<div class="tec-tickets-commerce-connect-
|
18 |
<a
|
19 |
target="_blank"
|
20 |
data-paypal-onboard-complete="onboardedCallback"
|
21 |
href="<?php echo esc_url( $url ) ?>&displayMode=minibrowser"
|
22 |
data-paypal-button="true"
|
23 |
id="connect_to_paypal"
|
|
|
24 |
>
|
25 |
<?php echo wp_kses( __( 'Connect Automatically with <i>PayPal</i>', 'event-tickets' ), 'post' ); ?>
|
26 |
</a>
|
27 |
-
</div>
|
14 |
}
|
15 |
</script>
|
16 |
|
17 |
+
<div class="tec-tickets__admin-settings-tickets-commerce-paypal-connect-button">
|
18 |
<a
|
19 |
target="_blank"
|
20 |
data-paypal-onboard-complete="onboardedCallback"
|
21 |
href="<?php echo esc_url( $url ) ?>&displayMode=minibrowser"
|
22 |
data-paypal-button="true"
|
23 |
id="connect_to_paypal"
|
24 |
+
class="tec-tickets__admin-settings-tickets-commerce-paypal-connect-button-link"
|
25 |
>
|
26 |
<?php echo wp_kses( __( 'Connect Automatically with <i>PayPal</i>', 'event-tickets' ), 'post' ); ?>
|
27 |
</a>
|
28 |
+
</div>
|
src/admin-views/tpp-metabox-capacity.php
CHANGED
File without changes
|
src/admin-views/tribe-options-tickets.php
CHANGED
@@ -156,7 +156,15 @@ $ticket_fields_end = [
|
|
156 |
],
|
157 |
];
|
158 |
|
159 |
-
$commerce_fields =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
/**
|
161 |
* Allows for the specific filtering of the commerce fields.
|
162 |
*
|
156 |
],
|
157 |
];
|
158 |
|
159 |
+
$commerce_fields = [];
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Hide Legacy PayPal settings for new installations.
|
163 |
+
*/
|
164 |
+
if ( tec_tribe_commerce_is_available() ) {
|
165 |
+
$commerce_fields = include 'tribe-commerce-settings.php';
|
166 |
+
}
|
167 |
+
|
168 |
/**
|
169 |
* Allows for the specific filtering of the commerce fields.
|
170 |
*
|
src/deprecated/TribeEventsTicketObject.php
CHANGED
File without changes
|
src/deprecated/TribeEventsTickets.php
CHANGED
File without changes
|
src/deprecated/TribeEventsTicketsAttendeesTable.php
CHANGED
File without changes
|
src/deprecated/TribeEventsTicketsMetabox.php
CHANGED
File without changes
|
src/deprecated/TribeEventsTicketsPro.php
CHANGED
File without changes
|
src/deprecated/Tribe__Events__Tickets__Attendees_Table.php
CHANGED
File without changes
|
src/deprecated/Tribe__Events__Tickets__Metabox.php
CHANGED
File without changes
|
src/deprecated/Tribe__Events__Tickets__Ticket_Object.php
CHANGED
File without changes
|
src/deprecated/Tribe__Events__Tickets__Tickets.php
CHANGED
File without changes
|
src/deprecated/Tribe__Events__Tickets__Tickets_Pro.php
CHANGED
File without changes
|
src/functions/commerce/provider.php
CHANGED
@@ -28,7 +28,7 @@ function tec_tickets_commerce_is_enabled() {
|
|
28 |
* Allows filtering of the Tickets Commerce provider, doing so will render
|
29 |
* the methods and classes no longer load-able so keep that in mind.
|
30 |
*
|
31 |
-
|
32 |
*
|
33 |
* @param boolean $enabled Determining if Tickets Commerce is enabled..
|
34 |
*/
|
@@ -44,8 +44,51 @@ function tec_tickets_commerce_is_enabled() {
|
|
44 |
* @return bool Whether Tickets Commerce is in test mode.
|
45 |
*/
|
46 |
function tribe_tickets_commerce_is_test_mode() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
/**
|
48 |
-
*
|
|
|
|
|
|
|
|
|
49 |
*/
|
50 |
-
return
|
51 |
}
|
28 |
* Allows filtering of the Tickets Commerce provider, doing so will render
|
29 |
* the methods and classes no longer load-able so keep that in mind.
|
30 |
*
|
31 |
+
* @since 5.1.6
|
32 |
*
|
33 |
* @param boolean $enabled Determining if Tickets Commerce is enabled..
|
34 |
*/
|
44 |
* @return bool Whether Tickets Commerce is in test mode.
|
45 |
*/
|
46 |
function tribe_tickets_commerce_is_test_mode() {
|
47 |
+
return tribe_is_truthy( tribe_get_option( \TEC\Tickets\Commerce\Settings::$option_sandbox ) );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Determine whether the legacy TribeCommerce should be shown or not.
|
52 |
+
*
|
53 |
+
* @since 5.1.10
|
54 |
+
*
|
55 |
+
* @return boolean
|
56 |
+
*/
|
57 |
+
function tec_tribe_commerce_is_available() {
|
58 |
+
/**
|
59 |
+
* @todo Before launch of Tickets Commerce remove this conditional from here.
|
60 |
+
*/
|
61 |
+
if ( ! tec_tickets_commerce_is_enabled() ) {
|
62 |
+
return true;
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( defined( 'TEC_TRIBE_COMMERCE_AVAILABLE' ) ) {
|
66 |
+
return (bool) TEC_TRIBE_COMMERCE_AVAILABLE;
|
67 |
+
}
|
68 |
+
|
69 |
+
$env_var = getenv( 'TEC_TRIBE_COMMERCE_AVAILABLE' );
|
70 |
+
|
71 |
+
if ( false !== $env_var ) {
|
72 |
+
return (bool) $env_var;
|
73 |
+
}
|
74 |
+
|
75 |
+
// Available if PayPal was completely setup previously.
|
76 |
+
$available = tribe()->offsetExists( 'tickets.commerce.paypal.handler.ipn' ) ? tribe( 'tickets.commerce.paypal.handler.ipn' )->get_config_status( 'slug' ) === 'complete' : null;
|
77 |
+
|
78 |
+
if ( is_null( $available ) ) {
|
79 |
+
_doing_it_wrong(
|
80 |
+
__FUNCTION__,
|
81 |
+
'tickets.commerce.paypal.handler.ipn - is not a registered callback.',
|
82 |
+
'5.1.10'
|
83 |
+
);
|
84 |
+
}
|
85 |
+
|
86 |
/**
|
87 |
+
* Filter whether we should disable TribeCommerce PayPal or not.
|
88 |
+
*
|
89 |
+
* @since 5.1.10
|
90 |
+
*
|
91 |
+
* @param boolean $available should be available or not.
|
92 |
*/
|
93 |
+
return apply_filters( 'tec_tribe_commerce_is_available', $available );
|
94 |
}
|
src/modules/blocks/attendees/index.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
/**
|
2 |
* External dependencies
|
3 |
*/
|
|
|
4 |
|
5 |
/**
|
6 |
* WordPress dependencies
|
@@ -21,9 +22,9 @@ export default {
|
|
21 |
title: __( 'Attendee List', 'event-tickets' ),
|
22 |
description: __(
|
23 |
'Show the gravatars of people coming to this event.',
|
24 |
-
'event-tickets'
|
25 |
),
|
26 |
-
icon: <AttendeesIcon/>,
|
27 |
category: 'tribe-tickets',
|
28 |
keywords: [ 'event', 'events-gutenberg', 'tribe' ],
|
29 |
|
1 |
/**
|
2 |
* External dependencies
|
3 |
*/
|
4 |
+
import React from 'react';
|
5 |
|
6 |
/**
|
7 |
* WordPress dependencies
|
22 |
title: __( 'Attendee List', 'event-tickets' ),
|
23 |
description: __(
|
24 |
'Show the gravatars of people coming to this event.',
|
25 |
+
'event-tickets',
|
26 |
),
|
27 |
+
icon: <AttendeesIcon />,
|
28 |
category: 'tribe-tickets',
|
29 |
keywords: [ 'event', 'events-gutenberg', 'tribe' ],
|
30 |
|
src/modules/blocks/attendees/template.js
CHANGED
@@ -27,7 +27,7 @@ import './style.pcss';
|
|
27 |
*/
|
28 |
|
29 |
const placeholder = __( 'Who\'s Attending?', 'event-tickets' );
|
30 |
-
const subtitle
|
31 |
|
32 |
const renderLabelInput = ( { isSelected, isEmpty, title, setTitle } ) => {
|
33 |
const containerClassNames = classNames( {
|
@@ -127,8 +127,8 @@ const Controls = ( {
|
|
127 |
|
128 |
const Attendees = ( props ) => (
|
129 |
<Fragment>
|
130 |
-
<UI {...props} />
|
131 |
-
<Controls {...props} />
|
132 |
</Fragment>
|
133 |
);
|
134 |
|
27 |
*/
|
28 |
|
29 |
const placeholder = __( 'Who\'s Attending?', 'event-tickets' );
|
30 |
+
const subtitle = __( '(X) people are attending this event', 'event-tickets' );
|
31 |
|
32 |
const renderLabelInput = ( { isSelected, isEmpty, title, setTitle } ) => {
|
33 |
const containerClassNames = classNames( {
|
127 |
|
128 |
const Attendees = ( props ) => (
|
129 |
<Fragment>
|
130 |
+
<UI { ...props } />
|
131 |
+
<Controls { ...props } />
|
132 |
</Fragment>
|
133 |
);
|
134 |
|
src/modules/blocks/hoc/with-save-data.js
CHANGED
@@ -29,7 +29,7 @@ const blockRegister = {};
|
|
29 |
* component to extract the keys of those to do the comparision.
|
30 |
*
|
31 |
* @param {object} selectedAttributes Set of attributes to only update fallback to this.props.attributes
|
32 |
-
* @returns {
|
33 |
*/
|
34 |
export default ( selectedAttributes = null ) => ( WrappedComponent ) => {
|
35 |
class WithSaveData extends Component {
|
@@ -154,7 +154,7 @@ export default ( selectedAttributes = null ) => ( WrappedComponent ) => {
|
|
154 |
}
|
155 |
}
|
156 |
|
157 |
-
WithSaveData.displayName = `WithSaveData( ${ WrappedComponent.displayName || WrappedComponent.name || 'Component ' }`;
|
158 |
|
159 |
return WithSaveData;
|
160 |
};
|
29 |
* component to extract the keys of those to do the comparision.
|
30 |
*
|
31 |
* @param {object} selectedAttributes Set of attributes to only update fallback to this.props.attributes
|
32 |
+
* @returns {Function} Return a new HOC
|
33 |
*/
|
34 |
export default ( selectedAttributes = null ) => ( WrappedComponent ) => {
|
35 |
class WithSaveData extends Component {
|
154 |
}
|
155 |
}
|
156 |
|
157 |
+
WithSaveData.displayName = `WithSaveData( ${ WrappedComponent.displayName || WrappedComponent.name || 'Component ' }`; // eslint-disable-line max-len
|
158 |
|
159 |
return WithSaveData;
|
160 |
};
|
src/modules/blocks/rsvp/action-buttons/attendees-action-button/container.js
CHANGED
@@ -23,7 +23,7 @@ const mapStateToProps = ( state ) => {
|
|
23 |
const postId = select( 'core/editor' ).getCurrentPostId();
|
24 |
|
25 |
return {
|
26 |
-
href: `${ adminURL }edit.php?post_type=${ postType }&page=tickets-attendees&event_id=${ postId }`,
|
27 |
isDisabled: selectors.getRSVPIsLoading( state ),
|
28 |
};
|
29 |
};
|
23 |
const postId = select( 'core/editor' ).getCurrentPostId();
|
24 |
|
25 |
return {
|
26 |
+
href: `${ adminURL }edit.php?post_type=${ postType }&page=tickets-attendees&event_id=${ postId }`, // eslint-disable-line max-len
|
27 |
isDisabled: selectors.getRSVPIsLoading( state ),
|
28 |
};
|
29 |
};
|
src/modules/blocks/rsvp/action-dashboard/container.js
CHANGED
@@ -20,7 +20,8 @@ import { withStore } from '@moderntribe/common/hoc';
|
|
20 |
const getHasRecurrenceRules = ( state ) => {
|
21 |
let hasRules = false;
|
22 |
try {
|
23 |
-
hasRules = window.tribe[ plugins.constants.EVENTS_PRO_PLUGIN ]
|
|
|
24 |
} catch ( e ) {
|
25 |
// ¯\_(ツ)_/¯
|
26 |
}
|
@@ -28,10 +29,10 @@ const getHasRecurrenceRules = ( state ) => {
|
|
28 |
};
|
29 |
|
30 |
const getIsConfirmDisabled = ( state ) => (
|
31 |
-
! selectors.getRSVPTempTitle( state )
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
);
|
36 |
|
37 |
const onCancelClick = ( state, dispatch ) => () => {
|
@@ -89,7 +90,6 @@ const onConfirmClick = ( state, dispatch ) => () => {
|
|
89 |
const mapStateToProps = ( state ) => ( {
|
90 |
created: selectors.getRSVPCreated( state ),
|
91 |
hasRecurrenceRules: getHasRecurrenceRules( state ),
|
92 |
-
hasTicketsPlus: plugins.selectors.hasPlugin( state )( plugins.constants.TICKETS_PLUS ),
|
93 |
isCancelDisabled: selectors.getRSVPIsLoading( state ),
|
94 |
isConfirmDisabled: getIsConfirmDisabled( state ),
|
95 |
isLoading: selectors.getRSVPIsLoading( state ),
|
20 |
const getHasRecurrenceRules = ( state ) => {
|
21 |
let hasRules = false;
|
22 |
try {
|
23 |
+
hasRules = window.tribe[ plugins.constants.EVENTS_PRO_PLUGIN ]
|
24 |
+
.data.blocks.recurring.selectors.hasRules( state );
|
25 |
} catch ( e ) {
|
26 |
// ¯\_(ツ)_/¯
|
27 |
}
|
29 |
};
|
30 |
|
31 |
const getIsConfirmDisabled = ( state ) => (
|
32 |
+
! selectors.getRSVPTempTitle( state ) ||
|
33 |
+
! selectors.getRSVPHasChanges( state ) ||
|
34 |
+
selectors.getRSVPIsLoading( state ) ||
|
35 |
+
selectors.getRSVPHasDurationError( state )
|
36 |
);
|
37 |
|
38 |
const onCancelClick = ( state, dispatch ) => () => {
|
90 |
const mapStateToProps = ( state ) => ( {
|
91 |
created: selectors.getRSVPCreated( state ),
|
92 |
hasRecurrenceRules: getHasRecurrenceRules( state ),
|
|
|
93 |
isCancelDisabled: selectors.getRSVPIsLoading( state ),
|
94 |
isConfirmDisabled: getIsConfirmDisabled( state ),
|
95 |
isLoading: selectors.getRSVPIsLoading( state ),
|
src/modules/blocks/rsvp/action-dashboard/template.js
CHANGED
@@ -30,7 +30,6 @@ const cancelLabel = __( 'Cancel', 'event-tickets' );
|
|
30 |
class RSVPActionDashboard extends PureComponent {
|
31 |
static propTypes = {
|
32 |
created: PropTypes.bool.isRequired,
|
33 |
-
hasTicketsPlus: PropTypes.bool.isRequired,
|
34 |
hasRecurrenceRules: PropTypes.bool.isRequired,
|
35 |
isCancelDisabled: PropTypes.bool.isRequired,
|
36 |
isConfirmDisabled: PropTypes.bool.isRequired,
|
@@ -54,7 +53,6 @@ class RSVPActionDashboard extends PureComponent {
|
|
54 |
getActions = () => {
|
55 |
const {
|
56 |
created,
|
57 |
-
hasTicketsPlus,
|
58 |
hasRecurrenceRules,
|
59 |
isLoading,
|
60 |
} = this.props;
|
@@ -65,7 +63,9 @@ class RSVPActionDashboard extends PureComponent {
|
|
65 |
}
|
66 |
if ( hasRecurrenceRules ) {
|
67 |
const icon = this.state.isWarningOpen ? 'no' : 'info-outline';
|
68 |
-
const text = this.state.isWarningOpen
|
|
|
|
|
69 |
actions.push(
|
70 |
<WarningButton
|
71 |
icon={ icon }
|
@@ -73,7 +73,7 @@ class RSVPActionDashboard extends PureComponent {
|
|
73 |
isDisabled={ isLoading }
|
74 |
>
|
75 |
{ text }
|
76 |
-
</WarningButton
|
77 |
);
|
78 |
}
|
79 |
return actions;
|
@@ -89,6 +89,7 @@ class RSVPActionDashboard extends PureComponent {
|
|
89 |
showCancel,
|
90 |
} = this.props;
|
91 |
|
|
|
92 |
return (
|
93 |
<Fragment>
|
94 |
<ActionDashboard
|
@@ -109,6 +110,7 @@ class RSVPActionDashboard extends PureComponent {
|
|
109 |
) }
|
110 |
</Fragment>
|
111 |
);
|
|
|
112 |
}
|
113 |
}
|
114 |
|
30 |
class RSVPActionDashboard extends PureComponent {
|
31 |
static propTypes = {
|
32 |
created: PropTypes.bool.isRequired,
|
|
|
33 |
hasRecurrenceRules: PropTypes.bool.isRequired,
|
34 |
isCancelDisabled: PropTypes.bool.isRequired,
|
35 |
isConfirmDisabled: PropTypes.bool.isRequired,
|
53 |
getActions = () => {
|
54 |
const {
|
55 |
created,
|
|
|
56 |
hasRecurrenceRules,
|
57 |
isLoading,
|
58 |
} = this.props;
|
63 |
}
|
64 |
if ( hasRecurrenceRules ) {
|
65 |
const icon = this.state.isWarningOpen ? 'no' : 'info-outline';
|
66 |
+
const text = this.state.isWarningOpen
|
67 |
+
? __( 'Hide Warning', 'event-tickets' )
|
68 |
+
: __( 'Warning', 'event-tickets' );
|
69 |
actions.push(
|
70 |
<WarningButton
|
71 |
icon={ icon }
|
73 |
isDisabled={ isLoading }
|
74 |
>
|
75 |
{ text }
|
76 |
+
</WarningButton>,
|
77 |
);
|
78 |
}
|
79 |
return actions;
|
89 |
showCancel,
|
90 |
} = this.props;
|
91 |
|
92 |
+
/* eslint-disable max-len */
|
93 |
return (
|
94 |
<Fragment>
|
95 |
<ActionDashboard
|
110 |
) }
|
111 |
</Fragment>
|
112 |
);
|
113 |
+
/* eslint-enable max-len */
|
114 |
}
|
115 |
}
|
116 |
|
src/modules/blocks/rsvp/advanced-options/template.js
CHANGED
@@ -14,8 +14,6 @@ import { __ } from '@wordpress/i18n';
|
|
14 |
/**
|
15 |
* Internal dependencies
|
16 |
*/
|
17 |
-
import RSVPDuration from '../duration/container';
|
18 |
-
import MoveDelete from './move-delete/container';
|
19 |
import { Accordion } from '@moderntribe/common/elements';
|
20 |
import './style.pcss';
|
21 |
|
14 |
/**
|
15 |
* Internal dependencies
|
16 |
*/
|
|
|
|
|
17 |
import { Accordion } from '@moderntribe/common/elements';
|
18 |
import './style.pcss';
|
19 |
|
src/modules/blocks/rsvp/attendee-registration/container.js
CHANGED
@@ -22,13 +22,13 @@ const getAttendeeRegistrationUrl = ( state ) => {
|
|
22 |
const postType = select( 'core/editor' ).getCurrentPostType();
|
23 |
const rsvpId = selectors.getRSVPId( state );
|
24 |
|
25 |
-
return `${ adminURL }edit.php?post_type=${ postType }&page=attendee-registration&ticket_id=${ rsvpId }&tribe_events_modal=1`;
|
26 |
};
|
27 |
|
28 |
const getIsDisabled = ( state ) => (
|
29 |
-
selectors.getRSVPIsLoading( state )
|
30 |
-
|
31 |
-
|
32 |
);
|
33 |
|
34 |
const mapStateToProps = ( state ) => ( {
|
@@ -54,7 +54,10 @@ const mapDispatchToProps = ( dispatch, ownProps ) => {
|
|
54 |
|
55 |
// show overlay
|
56 |
const showOverlay = () => {
|
57 |
-
iframe
|
|
|
|
|
|
|
58 |
};
|
59 |
|
60 |
// add event listener for form submit
|
@@ -63,7 +66,7 @@ const mapDispatchToProps = ( dispatch, ownProps ) => {
|
|
63 |
|
64 |
// remove listeners
|
65 |
const removeListeners = () => {
|
66 |
-
iframeWindow.removeEventListener( 'unload', handleUnload );
|
67 |
form.removeEventListener( 'submit', showOverlay );
|
68 |
};
|
69 |
|
@@ -73,7 +76,9 @@ const mapDispatchToProps = ( dispatch, ownProps ) => {
|
|
73 |
removeListeners( iframeWindow );
|
74 |
|
75 |
// check if there are meta fields
|
76 |
-
const metaFields = iframeWindow
|
|
|
|
|
77 |
const hasFields = Boolean( metaFields.firstElementChild );
|
78 |
|
79 |
// dispatch actions
|
22 |
const postType = select( 'core/editor' ).getCurrentPostType();
|
23 |
const rsvpId = selectors.getRSVPId( state );
|
24 |
|
25 |
+
return `${ adminURL }edit.php?post_type=${ postType }&page=attendee-registration&ticket_id=${ rsvpId }&tribe_events_modal=1`; // eslint-disable-line max-len
|
26 |
};
|
27 |
|
28 |
const getIsDisabled = ( state ) => (
|
29 |
+
selectors.getRSVPIsLoading( state ) ||
|
30 |
+
selectors.getRSVPSettingsOpen( state ) ||
|
31 |
+
! selectors.getRSVPCreated( state )
|
32 |
);
|
33 |
|
34 |
const mapStateToProps = ( state ) => ( {
|
54 |
|
55 |
// show overlay
|
56 |
const showOverlay = () => {
|
57 |
+
iframe
|
58 |
+
.nextSibling
|
59 |
+
.classList
|
60 |
+
.add( 'tribe-editor__attendee-registration__modal-overlay--show' );
|
61 |
};
|
62 |
|
63 |
// add event listener for form submit
|
66 |
|
67 |
// remove listeners
|
68 |
const removeListeners = () => {
|
69 |
+
iframeWindow.removeEventListener( 'unload', handleUnload ); // eslint-disable-line no-use-before-define,max-len
|
70 |
form.removeEventListener( 'submit', showOverlay );
|
71 |
};
|
72 |
|
76 |
removeListeners( iframeWindow );
|
77 |
|
78 |
// check if there are meta fields
|
79 |
+
const metaFields = iframeWindow
|
80 |
+
.document
|
81 |
+
.querySelector( '#tribe-tickets-attendee-sortables' );
|
82 |
const hasFields = Boolean( metaFields.firstElementChild );
|
83 |
|
84 |
// dispatch actions
|
src/modules/blocks/rsvp/attendee-registration/template.js
CHANGED
@@ -43,7 +43,8 @@ const RSVPAttendeeRegistration = ( {
|
|
43 |
onClose={ onClose }
|
44 |
onIframeLoad={ onIframeLoad }
|
45 |
showHelperText={ ! isCreated }
|
46 |
-
|
|
|
47 |
/>
|
48 |
);
|
49 |
};
|
43 |
onClose={ onClose }
|
44 |
onIframeLoad={ onIframeLoad }
|
45 |
showHelperText={ ! isCreated }
|
46 |
+
// @todo: @paulmskim shouldCloseOnClickOutside is a fix until we can figure out modal closing issue in WP 5.5.
|
47 |
+
shouldCloseOnClickOutside={ false }
|
48 |
/>
|
49 |
);
|
50 |
};
|
src/modules/blocks/rsvp/container-content/container.js
CHANGED
@@ -32,7 +32,7 @@ const mapDispatchToProps = ( dispatch ) => ( {
|
|
32 |
onTempNotGoingResponsesChange: ( e ) => {
|
33 |
dispatch( actions.setRSVPTempNotGoingResponses( e.target.checked ) );
|
34 |
dispatch( actions.setRSVPHasChanges( true ) );
|
35 |
-
}
|
36 |
} );
|
37 |
|
38 |
export default compose(
|
32 |
onTempNotGoingResponsesChange: ( e ) => {
|
33 |
dispatch( actions.setRSVPTempNotGoingResponses( e.target.checked ) );
|
34 |
dispatch( actions.setRSVPHasChanges( true ) );
|
35 |
+
},
|
36 |
} );
|
37 |
|
38 |
export default compose(
|
src/modules/blocks/rsvp/container-header/container.js
CHANGED
@@ -32,7 +32,7 @@ const mapDispatchToProps = ( dispatch ) => ( {
|
|
32 |
dispatch( actions.setRSVPHasChanges( true ) );
|
33 |
},
|
34 |
onTempTitleChange: ( e ) => {
|
35 |
-
dispatch( actions.setRSVPTempTitle( e.target.value ) )
|
36 |
dispatch( actions.setRSVPHasChanges( true ) );
|
37 |
},
|
38 |
} );
|
32 |
dispatch( actions.setRSVPHasChanges( true ) );
|
33 |
},
|
34 |
onTempTitleChange: ( e ) => {
|
35 |
+
dispatch( actions.setRSVPTempTitle( e.target.value ) );
|
36 |
dispatch( actions.setRSVPHasChanges( true ) );
|
37 |
},
|
38 |
} );
|
src/modules/blocks/rsvp/container-header/style.pcss
CHANGED
@@ -29,6 +29,7 @@
|
|
29 |
}
|
30 |
|
31 |
.tribe-editor__rsvp-container-header__title-input-wrapper {
|
|
|
32 |
display: flex;
|
33 |
|
34 |
svg {
|
@@ -42,36 +43,31 @@
|
|
42 |
.tribe-editor__rsvp {
|
43 |
|
44 |
.tribe-editor__rsvp-container-header__title-input {
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
48 |
line-height: 25px;
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
color: #
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
font-family: 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
|
57 |
-
font-weight: bold;
|
58 |
-
font-size: 21px;
|
59 |
-
line-height: 25px;
|
60 |
-
letter-spacing: 0.16px;
|
61 |
|
|
|
62 |
&:hover,
|
63 |
&:focus {
|
64 |
-
background-color:
|
65 |
-
|
66 |
-
|
67 |
-
&:disabled {
|
68 |
-
|
69 |
-
&,
|
70 |
-
&:hover,
|
71 |
-
&:focus {
|
72 |
-
background-color: transparent;
|
73 |
-
color: #AEB4BB;
|
74 |
-
}
|
75 |
}
|
76 |
}
|
77 |
}
|
29 |
}
|
30 |
|
31 |
.tribe-editor__rsvp-container-header__title-input-wrapper {
|
32 |
+
align-items: baseline;
|
33 |
display: flex;
|
34 |
|
35 |
svg {
|
43 |
.tribe-editor__rsvp {
|
44 |
|
45 |
.tribe-editor__rsvp-container-header__title-input {
|
46 |
+
background-color: transparent;
|
47 |
+
border: none;
|
48 |
+
color: #000;
|
49 |
+
font-family: 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
|
50 |
+
font-size: 21px;
|
51 |
+
font-weight: bold;
|
52 |
+
letter-spacing: 0.16px;
|
53 |
line-height: 25px;
|
54 |
+
margin: 3px 0 0;
|
55 |
+
padding: 0;
|
56 |
+
resize: none;
|
57 |
+
width: calc(95% - 26px);
|
58 |
|
59 |
+
&:hover,
|
60 |
+
&:focus {
|
61 |
+
background-color: #fff;
|
62 |
+
}
|
63 |
+
|
64 |
+
&:disabled {
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
+
&,
|
67 |
&:hover,
|
68 |
&:focus {
|
69 |
+
background-color: transparent;
|
70 |
+
color: #aeb4bb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
}
|
73 |
}
|
src/modules/blocks/rsvp/container-header/template.js
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
*/
|
4 |
import React, { Fragment } from 'react';
|
5 |
import PropTypes from 'prop-types';
|
6 |
-
import AutosizeInput from 'react-input-autosize';
|
7 |
import TextareaAutosize from 'react-textarea-autosize';
|
8 |
|
9 |
/**
|
@@ -42,7 +41,7 @@ const getTitle = (
|
|
42 |
isSelected
|
43 |
? (
|
44 |
<div className="tribe-editor__rsvp-container-header__title-input-wrapper">
|
45 |
-
<
|
46 |
className="tribe-editor__rsvp-container-header__title-input"
|
47 |
value={ tempTitle }
|
48 |
placeholder={ __( 'RSVP Title', 'event-tickets' ) }
|
@@ -98,7 +97,7 @@ const getCapacityLabel = ( capacity ) => {
|
|
98 |
plural={ plural }
|
99 |
fallback={ fallback }
|
100 |
/>
|
101 |
-
)
|
102 |
};
|
103 |
|
104 |
const RSVPContainerHeader = ( {
|
@@ -136,7 +135,7 @@ const RSVPContainerHeader = ( {
|
|
136 |
</div>
|
137 |
<RSVPCounters />
|
138 |
</Fragment>
|
139 |
-
)
|
140 |
};
|
141 |
|
142 |
RSVPContainerHeader.propTypes = {
|
3 |
*/
|
4 |
import React, { Fragment } from 'react';
|
5 |
import PropTypes from 'prop-types';
|
|
|
6 |
import TextareaAutosize from 'react-textarea-autosize';
|
7 |
|
8 |
/**
|
41 |
isSelected
|
42 |
? (
|
43 |
<div className="tribe-editor__rsvp-container-header__title-input-wrapper">
|
44 |
+
<TextareaAutosize
|
45 |
className="tribe-editor__rsvp-container-header__title-input"
|
46 |
value={ tempTitle }
|
47 |
placeholder={ __( 'RSVP Title', 'event-tickets' ) }
|
97 |
plural={ plural }
|
98 |
fallback={ fallback }
|
99 |
/>
|
100 |
+
);
|
101 |
};
|
102 |
|
103 |
const RSVPContainerHeader = ( {
|
135 |
</div>
|
136 |
<RSVPCounters />
|
137 |
</Fragment>
|
138 |
+
);
|
139 |
};
|
140 |
|
141 |
RSVPContainerHeader.propTypes = {
|
src/modules/blocks/rsvp/container.js
CHANGED
@@ -62,7 +62,7 @@ const setInitialState = ( dispatch, ownProps ) => () => {
|
|
62 |
}
|
63 |
if ( attributes.notGoingCount ) {
|
64 |
dispatch( actions.setRSVPNotGoingCount(
|
65 |
-
parseInt( attributes.notGoingCount, 10 )
|
66 |
) );
|
67 |
}
|
68 |
};
|
@@ -76,7 +76,7 @@ const mapStateToProps = ( state ) => {
|
|
76 |
isLoading: selectors.getRSVPIsLoading( state ),
|
77 |
isModalShowing: isModalShowing( state ) && getModalTicketId( state ) === rsvpId,
|
78 |
rsvpId,
|
79 |
-
}
|
80 |
};
|
81 |
|
82 |
const mapDispatchToProps = ( dispatch, ownProps ) => ( {
|
62 |
}
|
63 |
if ( attributes.notGoingCount ) {
|
64 |
dispatch( actions.setRSVPNotGoingCount(
|
65 |
+
parseInt( attributes.notGoingCount, 10 ),
|
66 |
) );
|
67 |
}
|
68 |
};
|
76 |
isLoading: selectors.getRSVPIsLoading( state ),
|
77 |
isModalShowing: isModalShowing( state ) && getModalTicketId( state ) === rsvpId,
|
78 |
rsvpId,
|
79 |
+
};
|
80 |
};
|
81 |
|
82 |
const mapDispatchToProps = ( dispatch, ownProps ) => ( {
|
src/modules/blocks/rsvp/dashboard/template.js
CHANGED
@@ -11,7 +11,6 @@ import RSVPActionDashboard from '@moderntribe/tickets/blocks/rsvp/action-dashboa
|
|
11 |
import RSVPSettingsDashboard from '@moderntribe/tickets/blocks/rsvp/settings-dashboard/container';
|
12 |
|
13 |
const RSVPDashboard = ( { isSelected, isSettingsOpen } ) => {
|
14 |
-
|
15 |
if ( ! isSelected ) {
|
16 |
return null;
|
17 |
}
|
11 |
import RSVPSettingsDashboard from '@moderntribe/tickets/blocks/rsvp/settings-dashboard/container';
|
12 |
|
13 |
const RSVPDashboard = ( { isSelected, isSettingsOpen } ) => {
|
|
|
14 |
if ( ! isSelected ) {
|
15 |
return null;
|
16 |
}
|
src/modules/blocks/rsvp/duration-label/template.js
CHANGED
@@ -29,7 +29,10 @@ const RSVPDurationLabel = ( { tooltipDisabled } ) => (
|
|
29 |
tooltipDisabled={ tooltipDisabled }
|
30 |
tooltipLabel={ tooltipLabel }
|
31 |
// @TODO: get tooltip text based on post type
|
32 |
-
tooltipText={ __(
|
|
|
|
|
|
|
33 |
/>
|
34 |
);
|
35 |
|
29 |
tooltipDisabled={ tooltipDisabled }
|
30 |
tooltipLabel={ tooltipLabel }
|
31 |
// @TODO: get tooltip text based on post type
|
32 |
+
tooltipText={ __(
|
33 |
+
'By default, sales will begin as soon as you save the ticket and end when the event begins',
|
34 |
+
'event-tickets',
|
35 |
+
) }
|
36 |
/>
|
37 |
);
|
38 |
|
src/modules/blocks/rsvp/duration-picker/container.js
CHANGED
@@ -52,7 +52,7 @@ const onToTimePickerClick = ( dispatch ) => ( value, onClose ) => {
|
|
52 |
const onFromTimePickerBlur = ( state, dispatch ) => ( e ) => {
|
53 |
let startTimeMoment = momentUtil.toMoment( e.target.value, momentUtil.TIME_FORMAT, false );
|
54 |
if ( ! startTimeMoment.isValid() ) {
|
55 |
-
const startTimeInput = selectors.getRSVPStartTimeInput( state )
|
56 |
startTimeMoment = momentUtil.toMoment( startTimeInput, momentUtil.TIME_FORMAT, false );
|
57 |
}
|
58 |
const seconds = momentUtil.totalSeconds( startTimeMoment );
|
@@ -62,7 +62,7 @@ const onFromTimePickerBlur = ( state, dispatch ) => ( e ) => {
|
|
62 |
const onToTimePickerBlur = ( state, dispatch ) => ( e ) => {
|
63 |
let endTimeMoment = momentUtil.toMoment( e.target.value, momentUtil.TIME_FORMAT, false );
|
64 |
if ( ! endTimeMoment.isValid() ) {
|
65 |
-
const endTimeInput = selectors.getRSVPEndTimeInput( state )
|
66 |
endTimeMoment = momentUtil.toMoment( endTimeInput, momentUtil.TIME_FORMAT, false );
|
67 |
}
|
68 |
const seconds = momentUtil.totalSeconds( endTimeMoment );
|
@@ -73,8 +73,8 @@ const mapStateToProps = ( state ) => {
|
|
73 |
const datePickerFormat = globals.tecDateSettings().datepickerFormat
|
74 |
? momentUtil.toFormat( globals.tecDateSettings().datepickerFormat )
|
75 |
: 'LL';
|
76 |
-
const isDisabled = selectors.getRSVPIsLoading( state )
|
77 |
-
|
78 |
|
79 |
const startDateMoment = selectors.getRSVPTempStartDateMoment( state );
|
80 |
const endDateMoment = selectors.getRSVPTempEndDateMoment( state );
|
@@ -118,7 +118,7 @@ const mergeProps = ( stateProps, dispatchProps, ownProps ) => {
|
|
118 |
...restDispatchProps,
|
119 |
onFromTimePickerBlur: onFromTimePickerBlur( state, dispatch ),
|
120 |
onToTimePickerBlur: onToTimePickerBlur( state, dispatch ),
|
121 |
-
}
|
122 |
};
|
123 |
|
124 |
export default compose(
|
52 |
const onFromTimePickerBlur = ( state, dispatch ) => ( e ) => {
|
53 |
let startTimeMoment = momentUtil.toMoment( e.target.value, momentUtil.TIME_FORMAT, false );
|
54 |
if ( ! startTimeMoment.isValid() ) {
|
55 |
+
const startTimeInput = selectors.getRSVPStartTimeInput( state );
|
56 |
startTimeMoment = momentUtil.toMoment( startTimeInput, momentUtil.TIME_FORMAT, false );
|
57 |
}
|
58 |
const seconds = momentUtil.totalSeconds( startTimeMoment );
|
62 |
const onToTimePickerBlur = ( state, dispatch ) => ( e ) => {
|
63 |
let endTimeMoment = momentUtil.toMoment( e.target.value, momentUtil.TIME_FORMAT, false );
|
64 |
if ( ! endTimeMoment.isValid() ) {
|
65 |
+
const endTimeInput = selectors.getRSVPEndTimeInput( state );
|
66 |
endTimeMoment = momentUtil.toMoment( endTimeInput, momentUtil.TIME_FORMAT, false );
|
67 |
}
|
68 |
const seconds = momentUtil.totalSeconds( endTimeMoment );
|
73 |
const datePickerFormat = globals.tecDateSettings().datepickerFormat
|
74 |
? momentUtil.toFormat( globals.tecDateSettings().datepickerFormat )
|
75 |
: 'LL';
|
76 |
+
const isDisabled = selectors.getRSVPIsLoading( state ) ||
|
77 |
+
selectors.getRSVPSettingsOpen( state );
|
78 |
|
79 |
const startDateMoment = selectors.getRSVPTempStartDateMoment( state );
|
80 |
const endDateMoment = selectors.getRSVPTempEndDateMoment( state );
|
118 |
...restDispatchProps,
|
119 |
onFromTimePickerBlur: onFromTimePickerBlur( state, dispatch ),
|
120 |
onToTimePickerBlur: onToTimePickerBlur( state, dispatch ),
|
121 |
+
};
|
122 |
};
|
123 |
|
124 |
export default compose(
|
src/modules/blocks/rsvp/duration/template.js
CHANGED
@@ -21,7 +21,10 @@ const RSVPDuration = ( { hasDurationError } ) => (
|
|
21 |
<RSVPDurationPicker />
|
22 |
{ hasDurationError && (
|
23 |
<span className="tribe-editor__rsvp-duration__error">
|
24 |
-
{ __(
|
|
|
|
|
|
|
25 |
</span>
|
26 |
) }
|
27 |
</div>
|
21 |
<RSVPDurationPicker />
|
22 |
{ hasDurationError && (
|
23 |
<span className="tribe-editor__rsvp-duration__error">
|
24 |
+
{ __(
|
25 |
+
'There is an error with the selected sales duration. Please fix the issue before saving.', // eslint-disable-line max-len
|
26 |
+
'event-tickets',
|
27 |
+
) }
|
28 |
</span>
|
29 |
) }
|
30 |
</div>
|
src/modules/blocks/rsvp/header-image/container.js
CHANGED
@@ -15,6 +15,7 @@ import { withStore } from '@moderntribe/common/hoc';
|
|
15 |
* Full payload from gutenberg media upload is not used,
|
16 |
* only id, alt, and src are used for this specific case.
|
17 |
*/
|
|
|
18 |
const mapStateToProps = ( state ) => ( {
|
19 |
image: {
|
20 |
id: selectors.getRSVPHeaderImageId( state ),
|
@@ -29,6 +30,7 @@ const mapDispatchToProps = ( dispatch ) => ( {
|
|
29 |
* Full payload from gutenberg media upload is not used,
|
30 |
* only id, alt, and medium src are used for this specific case.
|
31 |
*/
|
|
|
32 |
onSelect: ( image ) => dispatch( actions.updateRSVPHeaderImage( image ) ),
|
33 |
onRemove: () => dispatch( actions.deleteRSVPHeaderImage() ),
|
34 |
|
15 |
* Full payload from gutenberg media upload is not used,
|
16 |
* only id, alt, and src are used for this specific case.
|
17 |
*/
|
18 |
+
|
19 |
const mapStateToProps = ( state ) => ( {
|
20 |
image: {
|
21 |
id: selectors.getRSVPHeaderImageId( state ),
|
30 |
* Full payload from gutenberg media upload is not used,
|
31 |
* only id, alt, and medium src are used for this specific case.
|
32 |
*/
|
33 |
+
|
34 |
onSelect: ( image ) => dispatch( actions.updateRSVPHeaderImage( image ) ),
|
35 |
onRemove: () => dispatch( actions.deleteRSVPHeaderImage() ),
|
36 |
|
src/modules/blocks/rsvp/header-image/template.js
CHANGED
@@ -19,14 +19,14 @@ const RSVPHeaderImage = ( {
|
|
19 |
image,
|
20 |
isSettingsLoading,
|
21 |
onRemove,
|
22 |
-
onSelect
|
23 |
} ) => {
|
24 |
const imageUploadProps = {
|
25 |
title: __( 'Ticket Header Image', 'event-tickets' ),
|
26 |
description: __(
|
27 |
/* eslint-disable-next-line max-len */
|
28 |
'Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.',
|
29 |
-
'event-tickets'
|
30 |
),
|
31 |
className: 'tribe-editor__rsvp__image-upload',
|
32 |
buttonDisabled: isSettingsLoading,
|
19 |
image,
|
20 |
isSettingsLoading,
|
21 |
onRemove,
|
22 |
+
onSelect,
|
23 |
} ) => {
|
24 |
const imageUploadProps = {
|
25 |
title: __( 'Ticket Header Image', 'event-tickets' ),
|
26 |
description: __(
|
27 |
/* eslint-disable-next-line max-len */
|
28 |
'Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.',
|
29 |
+
'event-tickets',
|
30 |
),
|
31 |
className: 'tribe-editor__rsvp__image-upload',
|
32 |
buttonDisabled: isSettingsLoading,
|
src/modules/blocks/rsvp/inactive-block/template.js
CHANGED
@@ -30,7 +30,7 @@ const RSVPInactiveBlock = ( { created } ) => {
|
|
30 |
? __( 'Edit this block to change RSVP settings.', 'event-tickets' )
|
31 |
: __( 'Edit this block to create an RSVP form.', 'event-tickets' );
|
32 |
|
33 |
-
return <InactiveBlock { ...inactiveBlockProps }
|
34 |
};
|
35 |
|
36 |
RSVPInactiveBlock.propTypes = {
|
30 |
? __( 'Edit this block to change RSVP settings.', 'event-tickets' )
|
31 |
: __( 'Edit this block to create an RSVP form.', 'event-tickets' );
|
32 |
|
33 |
+
return <InactiveBlock { ...inactiveBlockProps } />;
|
34 |
};
|
35 |
|
36 |
RSVPInactiveBlock.propTypes = {
|
src/modules/blocks/rsvp/index.js
CHANGED
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* WordPress dependencies
|
3 |
*/
|
@@ -24,7 +29,7 @@ export default {
|
|
24 |
'Find out who is planning to attend!',
|
25 |
'event-tickets',
|
26 |
),
|
27 |
-
icon: <RSVPIcon/>,
|
28 |
category: 'tribe-tickets',
|
29 |
keywords: [ 'event', 'events-gutenberg', 'tribe' ],
|
30 |
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import React from 'react';
|
5 |
+
|
6 |
/**
|
7 |
* WordPress dependencies
|
8 |
*/
|
29 |
'Find out who is planning to attend!',
|
30 |
'event-tickets',
|
31 |
),
|
32 |
+
icon: <RSVPIcon />,
|
33 |
category: 'tribe-tickets',
|
34 |
keywords: [ 'event', 'events-gutenberg', 'tribe' ],
|
35 |
|
src/modules/blocks/rsvp/move-delete/container.js
CHANGED
@@ -41,7 +41,7 @@ const mergeProps = ( stateProps, dispatchProps, ownProps ) => {
|
|
41 |
...restDispatchProps,
|
42 |
removeRSVP: () => {
|
43 |
if ( window.confirm( // eslint-disable-line no-alert
|
44 |
-
__( 'Are you sure you want to delete this RSVP? It cannot be undone.', 'event-tickets' )
|
45 |
) ) {
|
46 |
dispatch( actions.deleteRSVP() );
|
47 |
if ( stateProps.created && stateProps.rsvpId ) {
|
41 |
...restDispatchProps,
|
42 |
removeRSVP: () => {
|
43 |
if ( window.confirm( // eslint-disable-line no-alert
|
44 |
+
__( 'Are you sure you want to delete this RSVP? It cannot be undone.', 'event-tickets' ),
|
45 |
) ) {
|
46 |
dispatch( actions.deleteRSVP() );
|
47 |
if ( stateProps.created && stateProps.rsvpId ) {
|
src/modules/blocks/rsvp/template.js
CHANGED
@@ -63,8 +63,8 @@ class RSVP extends PureComponent {
|
|
63 |
{ isLoading && <Spinner /> }
|
64 |
</div>
|
65 |
)
|
66 |
-
|
67 |
-
|
68 |
</Fragment>
|
69 |
);
|
70 |
}
|
63 |
{ isLoading && <Spinner /> }
|
64 |
</div>
|
65 |
)
|
66 |
+
}
|
67 |
+
{ isModalShowing && <MoveModal /> }
|
68 |
</Fragment>
|
69 |
);
|
70 |
}
|
src/modules/blocks/ticket/container-content/advanced-options/ecommerce-options/container.js
CHANGED
@@ -38,9 +38,9 @@ const getReportLink = ( state, ownProps, provider ) => {
|
|
38 |
let path = '';
|
39 |
|
40 |
if ( provider === EDD ) {
|
41 |
-
path = `edit.php?page=edd-reports&view=sales&post_type=download&tab=logs&download=${ ticketId }`;
|
42 |
} else if ( provider === WOO ) {
|
43 |
-
path = `admin.php?page=wc-reports&tab=orders&report=sales_by_product&product_ids=${ ticketId }`;
|
44 |
}
|
45 |
|
46 |
reportLink = `${ adminURL }${ path }`;
|
38 |
let path = '';
|
39 |
|
40 |
if ( provider === EDD ) {
|
41 |
+
path = `edit.php?page=edd-reports&view=sales&post_type=download&tab=logs&download=${ ticketId }`; // eslint-disable-line max-len
|
42 |
} else if ( provider === WOO ) {
|
43 |
+
path = `admin.php?page=wc-reports&tab=orders&report=sales_by_product&product_ids=${ ticketId }`; // eslint-disable-line max-len
|
44 |
}
|
45 |
|
46 |
reportLink = `${ adminURL }${ path }`;
|
src/modules/blocks/ticket/container-content/advanced-options/ecommerce-options/template.js
CHANGED
@@ -28,13 +28,13 @@ const EcommerceOptions = ( {
|
|
28 |
provider,
|
29 |
reportLink,
|
30 |
showEcommerceOptions,
|
31 |
-
}) => {
|
32 |
-
const getEditTicketLinkLabel = (
|
33 |
let label = '';
|
34 |
|
35 |
-
if (
|
36 |
label = __( 'Edit Ticket in Easy Digital Downloads', 'event-tickets' );
|
37 |
-
} else if (
|
38 |
label = __( 'Edit Ticket in WooCommerce', 'event-tickets' );
|
39 |
}
|
40 |
|
@@ -64,11 +64,11 @@ const EcommerceOptions = ( {
|
|
64 |
</Link>
|
65 |
)
|
66 |
);
|
67 |
-
}
|
68 |
|
69 |
return (
|
70 |
-
showEcommerceOptions
|
71 |
-
|
72 |
<LabeledItem
|
73 |
className={ classNames(
|
74 |
'tribe-editor__ticket__ecommerce-options',
|
@@ -79,7 +79,10 @@ const EcommerceOptions = ( {
|
|
79 |
>
|
80 |
<div className="tribe-editor__ticket__ecommerce-options-links">
|
81 |
{ LINK_TYPES.map( ( linkType ) => (
|
82 |
-
<span
|
|
|
|
|
|
|
83 |
{ getLink( linkType ) }
|
84 |
</span>
|
85 |
) ) }
|
28 |
provider,
|
29 |
reportLink,
|
30 |
showEcommerceOptions,
|
31 |
+
} ) => {
|
32 |
+
const getEditTicketLinkLabel = ( ticketProvider ) => {
|
33 |
let label = '';
|
34 |
|
35 |
+
if ( ticketProvider === EDD ) {
|
36 |
label = __( 'Edit Ticket in Easy Digital Downloads', 'event-tickets' );
|
37 |
+
} else if ( ticketProvider === WOO ) {
|
38 |
label = __( 'Edit Ticket in WooCommerce', 'event-tickets' );
|
39 |
}
|
40 |
|
64 |
</Link>
|
65 |
)
|
66 |
);
|
67 |
+
};
|
68 |
|
69 |
return (
|
70 |
+
showEcommerceOptions &&
|
71 |
+
(
|
72 |
<LabeledItem
|
73 |
className={ classNames(
|
74 |
'tribe-editor__ticket__ecommerce-options',
|
79 |
>
|
80 |
<div className="tribe-editor__ticket__ecommerce-options-links">
|
81 |
{ LINK_TYPES.map( ( linkType ) => (
|
82 |
+
<span
|
83 |
+
key={ linkType }
|
84 |
+
className="tribe-editor__ticket__ecommerce-options-link-wrapper"
|
85 |
+
>
|
86 |
{ getLink( linkType ) }
|
87 |
</span>
|
88 |
) ) }
|
src/modules/blocks/ticket/container-content/advanced-options/move-delete/container.js
CHANGED
@@ -27,7 +27,7 @@ const mapDispatchToProps = ( dispatch, ownProps ) => ( {
|
|
27 |
moveTicket: ( ticketId ) => dispatch( showModal( ticketId, ownProps.clientId ) ),
|
28 |
} );
|
29 |
|
30 |
-
const mergeProps = ( stateProps, dispatchProps, ownProps
|
31 |
...stateProps,
|
32 |
...dispatchProps,
|
33 |
...ownProps,
|
27 |
moveTicket: ( ticketId ) => dispatch( showModal( ticketId, ownProps.clientId ) ),
|
28 |
} );
|
29 |
|
30 |
+
const mergeProps = ( stateProps, dispatchProps, ownProps ) => ( {
|
31 |
...stateProps,
|
32 |
...dispatchProps,
|
33 |
...ownProps,
|
src/modules/blocks/ticket/container-content/advanced-options/sku/__tests__/template.test.js
CHANGED
@@ -14,7 +14,7 @@ describe( 'SKU', () => {
|
|
14 |
|
15 |
test( 'Triggers the onChange callback', () => {
|
16 |
const onChange = jest.fn();
|
17 |
-
const component = mount( <SKU onChange={ onChange } value={ 'modern-tribe'} /> );
|
18 |
component.find( 'input' ).simulate( 'change' );
|
19 |
expect( onChange ).toHaveBeenCalled();
|
20 |
} );
|
14 |
|
15 |
test( 'Triggers the onChange callback', () => {
|
16 |
const onChange = jest.fn();
|
17 |
+
const component = mount( <SKU onChange={ onChange } value={ 'modern-tribe' } /> );
|
18 |
component.find( 'input' ).simulate( 'change' );
|
19 |
expect( onChange ).toHaveBeenCalled();
|
20 |
} );
|
src/modules/blocks/ticket/container-content/advanced-options/sku/template.js
CHANGED
@@ -48,7 +48,12 @@ class SKU extends PureComponent {
|
|
48 |
'A unique identifying code for each ticket type you\'re selling',
|
49 |
'event-tickets',
|
50 |
) }
|
51 |
-
tooltipLabel={
|
|
|
|
|
|
|
|
|
|
|
52 |
/>
|
53 |
<Input
|
54 |
className="tribe-editor__ticket__sku-input"
|
48 |
'A unique identifying code for each ticket type you\'re selling',
|
49 |
'event-tickets',
|
50 |
) }
|
51 |
+
tooltipLabel={
|
52 |
+
<Dashicon
|
53 |
+
className="tribe-editor__ticket__tooltip-label"
|
54 |
+
icon="info-outline"
|
55 |
+
/>
|
56 |
+
}
|
57 |
/>
|
58 |
<Input
|
59 |
className="tribe-editor__ticket__sku-input"
|
src/modules/blocks/ticket/container-content/attendee-collection/iac-setting/__tests__/template.test.js
CHANGED
@@ -26,7 +26,7 @@ describe.skip( 'IACSetting', () => {
|
|
26 |
iacDefault={ iacDefault }
|
27 |
iacOptions={ iacOptions }
|
28 |
isDisabled={ false }
|
29 |
-
|
30 |
);
|
31 |
expect( component.toJSON() ).toMatchSnapshot();
|
32 |
} );
|
26 |
iacDefault={ iacDefault }
|
27 |
iacOptions={ iacOptions }
|
28 |
isDisabled={ false }
|
29 |
+
/>,
|
30 |
);
|
31 |
expect( component.toJSON() ).toMatchSnapshot();
|
32 |
} );
|
src/modules/blocks/ticket/container-content/attendee-collection/iac-setting/template.js
CHANGED
@@ -38,7 +38,10 @@ class IACSetting extends PureComponent {
|
|
38 |
return (
|
39 |
<div>
|
40 |
<div className="tribe-editor__ticket__content-row--iac-setting-description">
|
41 |
-
{ __(
|
|
|
|
|
|
|
42 |
</div>
|
43 |
<div className={ classNames(
|
44 |
'tribe-editor__ticket__iac-setting',
|
38 |
return (
|
39 |
<div>
|
40 |
<div className="tribe-editor__ticket__content-row--iac-setting-description">
|
41 |
+
{ __(
|
42 |
+
'Select the default way to sell tickets. Enabling Individual Attendee Collection will allow purchasers to enter a name and email for each ticket.', // eslint-disable-line max-len
|
43 |
+
'event-tickets',
|
44 |
+
) }
|
45 |
</div>
|
46 |
<div className={ classNames(
|
47 |
'tribe-editor__ticket__iac-setting',
|
src/modules/blocks/ticket/container-content/attendees-registration/container.js
CHANGED
@@ -22,7 +22,7 @@ const getAttendeeRegistrationUrl = ( state, ownProps ) => {
|
|
22 |
const postType = select( 'core/editor' ).getCurrentPostType();
|
23 |
const ticketId = selectors.getTicketId( state, ownProps );
|
24 |
|
25 |
-
return `${ adminURL }edit.php?post_type=${ postType }&page=attendee-registration&ticket_id=${ ticketId }&tribe_events_modal=1`;
|
26 |
};
|
27 |
|
28 |
const mapStateToProps = ( state, ownProps ) => {
|
@@ -47,7 +47,10 @@ const mapDispatchToProps = ( dispatch, ownProps ) => {
|
|
47 |
dispatch( actions.setTicketIsModalOpen( ownProps.clientId, false ) );
|
48 |
}
|
49 |
|
50 |
-
if (
|
|
|
|
|
|
|
51 |
dispatch( actions.setTicketIsModalOpen( ownProps.clientId, false ) );
|
52 |
}
|
53 |
},
|
@@ -56,7 +59,10 @@ const mapDispatchToProps = ( dispatch, ownProps ) => {
|
|
56 |
|
57 |
// show overlay
|
58 |
const showOverlay = () => {
|
59 |
-
iframe
|
|
|
|
|
|
|
60 |
};
|
61 |
|
62 |
// add event listener for form submit
|
@@ -65,7 +71,7 @@ const mapDispatchToProps = ( dispatch, ownProps ) => {
|
|
65 |
|
66 |
// remove listeners
|
67 |
const removeListeners = () => {
|
68 |
-
iframeWindow.removeEventListener( 'unload', handleUnload );
|
69 |
form.removeEventListener( 'submit', showOverlay );
|
70 |
};
|
71 |
|
@@ -75,7 +81,9 @@ const mapDispatchToProps = ( dispatch, ownProps ) => {
|
|
75 |
removeListeners( iframeWindow );
|
76 |
|
77 |
// check if there are meta fields
|
78 |
-
const metaFields = iframeWindow
|
|
|
|
|
79 |
const hasFields = Boolean( metaFields.firstElementChild );
|
80 |
|
81 |
// dispatch actions
|
22 |
const postType = select( 'core/editor' ).getCurrentPostType();
|
23 |
const ticketId = selectors.getTicketId( state, ownProps );
|
24 |
|
25 |
+
return `${ adminURL }edit.php?post_type=${ postType }&page=attendee-registration&ticket_id=${ ticketId }&tribe_events_modal=1`; // eslint-disable-line max-len
|
26 |
};
|
27 |
|
28 |
const mapStateToProps = ( state, ownProps ) => {
|
47 |
dispatch( actions.setTicketIsModalOpen( ownProps.clientId, false ) );
|
48 |
}
|
49 |
|
50 |
+
if (
|
51 |
+
e.type === 'click' &&
|
52 |
+
e.target.classList.contains( 'components-modal__screen-overlay' )
|
53 |
+
) {
|
54 |
dispatch( actions.setTicketIsModalOpen( ownProps.clientId, false ) );
|
55 |
}
|
56 |
},
|
59 |
|
60 |
// show overlay
|
61 |
const showOverlay = () => {
|
62 |
+
iframe
|
63 |
+
.nextSibling
|
64 |
+
.classList
|
65 |
+
.add( 'tribe-editor__attendee-registration__modal-overlay--show' );
|
66 |
};
|
67 |
|
68 |
// add event listener for form submit
|
71 |
|
72 |
// remove listeners
|
73 |
const removeListeners = () => {
|
74 |
+
iframeWindow.removeEventListener( 'unload', handleUnload ); // eslint-disable-line no-use-before-define,max-len
|
75 |
form.removeEventListener( 'submit', showOverlay );
|
76 |
};
|
77 |
|
81 |
removeListeners( iframeWindow );
|
82 |
|
83 |
// check if there are meta fields
|
84 |
+
const metaFields = iframeWindow
|
85 |
+
.document
|
86 |
+
.querySelector( '#tribe-tickets-attendee-sortables' );
|
87 |
const hasFields = Boolean( metaFields.firstElementChild );
|
88 |
|
89 |
// dispatch actions
|
src/modules/blocks/ticket/container-content/attendees-registration/template.js
CHANGED
@@ -43,7 +43,8 @@ const AttendeesRegistration = ( {
|
|
43 |
onClose={ onClose }
|
44 |
onIframeLoad={ onIframeLoad }
|
45 |
showHelperText={ ! isCreated }
|
46 |
-
|
|
|
47 |
/>
|
48 |
);
|
49 |
};
|
43 |
onClose={ onClose }
|
44 |
onIframeLoad={ onIframeLoad }
|
45 |
showHelperText={ ! isCreated }
|
46 |
+
// @todo: @paulmskim shouldCloseOnClickOutside is a fix until we can figure out modal closing issue in WP 5.5.
|
47 |
+
shouldCloseOnClickOutside={ false }
|
48 |
/>
|
49 |
);
|
50 |
};
|
src/modules/blocks/ticket/container-content/capacity/template.js
CHANGED
@@ -19,7 +19,7 @@ import { Dashicon } from '@wordpress/components';
|
|
19 |
import { constants, options } from '@moderntribe/tickets/data/blocks/ticket';
|
20 |
import { LabeledItem, NumberInput, Select } from '@moderntribe/common/elements';
|
21 |
import { LabelWithTooltip } from '@moderntribe/tickets/elements';
|
22 |
-
import { ReactSelectOption } from '@moderntribe/common/data/plugins/proptypes'
|
23 |
import './style.pcss';
|
24 |
|
25 |
const {
|
@@ -34,7 +34,7 @@ const LabeledNumberInput = ( {
|
|
34 |
className,
|
35 |
id,
|
36 |
label,
|
37 |
-
...props
|
38 |
} ) => (
|
39 |
<LabeledItem
|
40 |
className={ classNames(
|
@@ -108,7 +108,7 @@ class Capacity extends PureComponent {
|
|
108 |
disabled={ isDisabled }
|
109 |
min={ 0 }
|
110 |
required={ true }
|
111 |
-
|
112 |
);
|
113 |
}
|
114 |
|
@@ -121,8 +121,8 @@ class Capacity extends PureComponent {
|
|
121 |
const ticketType = tempCapacityType === TICKET_TYPES[ SHARED ] ? SHARED : INDEPENDENT;
|
122 |
|
123 |
if (
|
124 |
-
tempCapacityType === TICKET_TYPES[ SHARED ]
|
125 |
-
|
126 |
) {
|
127 |
const max = sharedCapacity ? sharedCapacity : tempSharedCapacity;
|
128 |
extraProps.max = parseInt( max, 10 ) || 0;
|
@@ -150,7 +150,7 @@ class Capacity extends PureComponent {
|
|
150 |
disabled={ isDisabled }
|
151 |
min={ 0 }
|
152 |
{ ...extraProps }
|
153 |
-
|
154 |
);
|
155 |
}
|
156 |
|
@@ -210,9 +210,9 @@ class Capacity extends PureComponent {
|
|
210 |
|
211 |
return (
|
212 |
<div className={ classNames(
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
) }>
|
217 |
<LabelWithTooltip
|
218 |
className="tribe-editor__ticket__capacity-label-with-tooltip"
|
@@ -223,7 +223,12 @@ class Capacity extends PureComponent {
|
|
223 |
'Ticket capacity will only be used by attendees buying this ticket type',
|
224 |
'event-tickets',
|
225 |
) }
|
226 |
-
tooltipLabel={
|
|
|
|
|
|
|
|
|
|
|
227 |
/>
|
228 |
<div className="tribe-editor__ticket__capacity-form">
|
229 |
{ hasTicketsPlus ? this.getCapacityForm() : this.getNoPlusCapacityForm() }
|
19 |
import { constants, options } from '@moderntribe/tickets/data/blocks/ticket';
|
20 |
import { LabeledItem, NumberInput, Select } from '@moderntribe/common/elements';
|
21 |
import { LabelWithTooltip } from '@moderntribe/tickets/elements';
|
22 |
+
import { ReactSelectOption } from '@moderntribe/common/data/plugins/proptypes';
|
23 |
import './style.pcss';
|
24 |
|
25 |
const {
|
34 |
className,
|
35 |
id,
|
36 |
label,
|
37 |
+
...props
|
38 |
} ) => (
|
39 |
<LabeledItem
|
40 |
className={ classNames(
|
108 |
disabled={ isDisabled }
|
109 |
min={ 0 }
|
110 |
required={ true }
|
111 |
+
/>,
|
112 |
);
|
113 |
}
|
114 |
|
121 |
const ticketType = tempCapacityType === TICKET_TYPES[ SHARED ] ? SHARED : INDEPENDENT;
|
122 |
|
123 |
if (
|
124 |
+
tempCapacityType === TICKET_TYPES[ SHARED ] &&
|
125 |
+
( sharedCapacity || tempSharedCapacity )
|
126 |
) {
|
127 |
const max = sharedCapacity ? sharedCapacity : tempSharedCapacity;
|
128 |
extraProps.max = parseInt( max, 10 ) || 0;
|
150 |
disabled={ isDisabled }
|
151 |
min={ 0 }
|
152 |
{ ...extraProps }
|
153 |
+
/>,
|
154 |
);
|
155 |
}
|
156 |
|
210 |
|
211 |
return (
|
212 |
<div className={ classNames(
|
213 |
+
'tribe-editor__ticket__capacity',
|
214 |
+
'tribe-editor__ticket__content-row',
|
215 |
+
'tribe-editor__ticket__content-row--capacity',
|
216 |
) }>
|
217 |
<LabelWithTooltip
|
218 |
className="tribe-editor__ticket__capacity-label-with-tooltip"
|
223 |
'Ticket capacity will only be used by attendees buying this ticket type',
|
224 |
'event-tickets',
|
225 |
) }
|
226 |
+
tooltipLabel={
|
227 |
+
<Dashicon
|
228 |
+
className="tribe-editor__ticket__tooltip-label"
|
229 |
+
icon="info-outline"
|
230 |
+
/>
|
231 |
+
}
|
232 |
/>
|
233 |
<div className="tribe-editor__ticket__capacity-form">
|
234 |
{ hasTicketsPlus ? this.getCapacityForm() : this.getNoPlusCapacityForm() }
|
src/modules/blocks/ticket/container-content/duration/__tests__/template.test.js
CHANGED
@@ -15,7 +15,7 @@ describe( 'Ticket Duration picker and label', () => {
|
|
15 |
fromTime="00:00"
|
16 |
toTime="23:59"
|
17 |
current="12:34"
|
18 |
-
|
19 |
);
|
20 |
expect( component.toJSON() ).toMatchSnapshot();
|
21 |
} );
|
15 |
fromTime="00:00"
|
16 |
toTime="23:59"
|
17 |
current="12:34"
|
18 |
+
/>,
|
19 |
);
|
20 |
expect( component.toJSON() ).toMatchSnapshot();
|
21 |
} );
|
src/modules/blocks/ticket/container-content/duration/container.js
CHANGED
@@ -16,7 +16,7 @@ import {
|
|
16 |
} from '@moderntribe/common/utils';
|
17 |
|
18 |
const onFromDateChange = ( dispatch, ownProps ) => ( date, modifiers, dayPickerInput ) => {
|
19 |
-
dispatch( actions.handleTicketStartDate( ownProps.clientId, date, dayPickerInput ) )
|
20 |
};
|
21 |
|
22 |
const onFromTimePickerChange = ( dispatch, ownProps ) => ( e ) => {
|
@@ -29,7 +29,7 @@ const onFromTimePickerClick = ( dispatch, ownProps ) => ( value, onClose ) => {
|
|
29 |
};
|
30 |
|
31 |
const onToDateChange = ( dispatch, ownProps ) => ( date, modifiers, dayPickerInput ) => {
|
32 |
-
dispatch( actions.handleTicketEndDate( ownProps.clientId, date, dayPickerInput ) )
|
33 |
};
|
34 |
|
35 |
const onToTimePickerChange = ( dispatch, ownProps ) => ( e ) => {
|
@@ -44,7 +44,7 @@ const onToTimePickerClick = ( dispatch, ownProps ) => ( value, onClose ) => {
|
|
44 |
const onFromTimePickerBlur = ( state, dispatch, ownProps ) => ( e ) => {
|
45 |
let startTimeMoment = momentUtil.toMoment( e.target.value, momentUtil.TIME_FORMAT, false );
|
46 |
if ( ! startTimeMoment.isValid() ) {
|
47 |
-
const startTimeInput = selectors.getTicketStartTimeInput( state, ownProps )
|
48 |
startTimeMoment = momentUtil.toMoment( startTimeInput, momentUtil.TIME_FORMAT, false );
|
49 |
}
|
50 |
const seconds = momentUtil.totalSeconds( startTimeMoment );
|
@@ -54,7 +54,7 @@ const onFromTimePickerBlur = ( state, dispatch, ownProps ) => ( e ) => {
|
|
54 |
const onToTimePickerBlur = ( state, dispatch, ownProps ) => ( e ) => {
|
55 |
let endTimeMoment = momentUtil.toMoment( e.target.value, momentUtil.TIME_FORMAT, false );
|
56 |
if ( ! endTimeMoment.isValid() ) {
|
57 |
-
const endTimeInput = selectors.getTicketEndTimeInput( state, ownProps )
|
58 |
endTimeMoment = momentUtil.toMoment( endTimeInput, momentUtil.TIME_FORMAT, false );
|
59 |
}
|
60 |
const seconds = momentUtil.totalSeconds( endTimeMoment );
|
@@ -111,7 +111,7 @@ const mergeProps = ( stateProps, dispatchProps, ownProps ) => {
|
|
111 |
onFromTimePickerBlur: onFromTimePickerBlur( state, dispatch, ownProps ),
|
112 |
onToTimePickerBlur: onToTimePickerBlur( state, dispatch, ownProps ),
|
113 |
};
|
114 |
-
}
|
115 |
|
116 |
export default compose(
|
117 |
withStore(),
|
16 |
} from '@moderntribe/common/utils';
|
17 |
|
18 |
const onFromDateChange = ( dispatch, ownProps ) => ( date, modifiers, dayPickerInput ) => {
|
19 |
+
dispatch( actions.handleTicketStartDate( ownProps.clientId, date, dayPickerInput ) );
|
20 |
};
|
21 |
|
22 |
const onFromTimePickerChange = ( dispatch, ownProps ) => ( e ) => {
|
29 |
};
|
30 |
|
31 |
const onToDateChange = ( dispatch, ownProps ) => ( date, modifiers, dayPickerInput ) => {
|
32 |
+
dispatch( actions.handleTicketEndDate( ownProps.clientId, date, dayPickerInput ) );
|
33 |
};
|
34 |
|
35 |
const onToTimePickerChange = ( dispatch, ownProps ) => ( e ) => {
|
44 |
const onFromTimePickerBlur = ( state, dispatch, ownProps ) => ( e ) => {
|
45 |
let startTimeMoment = momentUtil.toMoment( e.target.value, momentUtil.TIME_FORMAT, false );
|
46 |
if ( ! startTimeMoment.isValid() ) {
|
47 |
+
const startTimeInput = selectors.getTicketStartTimeInput( state, ownProps );
|
48 |
startTimeMoment = momentUtil.toMoment( startTimeInput, momentUtil.TIME_FORMAT, false );
|
49 |
}
|
50 |
const seconds = momentUtil.totalSeconds( startTimeMoment );
|
54 |
const onToTimePickerBlur = ( state, dispatch, ownProps ) => ( e ) => {
|
55 |
let endTimeMoment = momentUtil.toMoment( e.target.value, momentUtil.TIME_FORMAT, false );
|
56 |
if ( ! endTimeMoment.isValid() ) {
|
57 |
+
const endTimeInput = selectors.getTicketEndTimeInput( state, ownProps );
|
58 |
endTimeMoment = momentUtil.toMoment( endTimeInput, momentUtil.TIME_FORMAT, false );
|
59 |
}
|
60 |
const seconds = momentUtil.totalSeconds( endTimeMoment );
|
111 |
onFromTimePickerBlur: onFromTimePickerBlur( state, dispatch, ownProps ),
|
112 |
onToTimePickerBlur: onToTimePickerBlur( state, dispatch, ownProps ),
|
113 |
};
|
114 |
+
};
|
115 |
|
116 |
export default compose(
|
117 |
withStore(),
|
src/modules/blocks/ticket/container-content/duration/template.js
CHANGED
@@ -33,7 +33,12 @@ const TicketDuration = ( {
|
|
33 |
'If you do not set a start sale date, tickets will be available immediately.',
|
34 |
'event-tickets',
|
35 |
) }
|
36 |
-
tooltipLabel={
|
|
|
|
|
|
|
|
|
|
|
37 |
/>
|
38 |
<DateTimeRangePicker
|
39 |
className="tribe-editor__ticket__duration-picker"
|
@@ -41,7 +46,10 @@ const TicketDuration = ( {
|
|
41 |
/>
|
42 |
{ hasDurationError && (
|
43 |
<span className="tribe-editor__ticket__duration-error">
|
44 |
-
{ __(
|
|
|
|
|
|
|
45 |
</span>
|
46 |
) }
|
47 |
</div>
|
33 |
'If you do not set a start sale date, tickets will be available immediately.',
|
34 |
'event-tickets',
|
35 |
) }
|
36 |
+
tooltipLabel={
|
37 |
+
<Dashicon
|
38 |
+
className="tribe-editor__ticket__tooltip-label"
|
39 |
+
icon="info-outline"
|
40 |
+
/>
|
41 |
+
}
|
42 |
/>
|
43 |
<DateTimeRangePicker
|
44 |
className="tribe-editor__ticket__duration-picker"
|
46 |
/>
|
47 |
{ hasDurationError && (
|
48 |
<span className="tribe-editor__ticket__duration-error">
|
49 |
+
{ __(
|
50 |
+
'There is an error with the selected sales duration. Please fix the issue before saving.', // eslint-disable-line max-len
|
51 |
+
'event-tickets',
|
52 |
+
) }
|
53 |
</span>
|
54 |
) }
|
55 |
</div>
|
src/modules/blocks/ticket/container-header/quantity/container.js
CHANGED
@@ -16,7 +16,7 @@ const getSharedSold = ( state, isShared ) => (
|
|
16 |
);
|
17 |
|
18 |
const mapStateToProps = ( state, ownProps ) => {
|
19 |
-
const isShared = selectors.isSharedTicket( state, ownProps )
|
20 |
|
21 |
return {
|
22 |
isDisabled: selectors.isTicketDisabled( state, ownProps ),
|
16 |
);
|
17 |
|
18 |
const mapStateToProps = ( state, ownProps ) => {
|
19 |
+
const isShared = selectors.isSharedTicket( state, ownProps );
|
20 |
|
21 |
return {
|
22 |
isDisabled: selectors.isTicketDisabled( state, ownProps ),
|
src/modules/blocks/ticket/container-header/quantity/quantity-bar/__tests__/element.test.js
CHANGED
@@ -16,20 +16,28 @@ describe( '<QuantityBar>', () => {
|
|
16 |
} );
|
17 |
|
18 |
test( 'shared capacity', () => {
|
19 |
-
const component = renderer.create(
|
|
|
|
|
20 |
expect( component.toJSON() ).toMatchSnapshot();
|
21 |
} );
|
22 |
|
23 |
test( 'with limited capacity', () => {
|
24 |
const component = renderer.create(
|
25 |
-
<QuantityBar sold={ 20 } sharedSold={ 80 } capacity={ 50 } total={ 100 }
|
26 |
);
|
27 |
expect( component.toJSON() ).toMatchSnapshot();
|
28 |
} );
|
29 |
|
30 |
test( 'avoid render percentage on disabled', () => {
|
31 |
const component = renderer.create(
|
32 |
-
<QuantityBar
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
);
|
34 |
expect( component.toJSON() ).toMatchSnapshot();
|
35 |
} );
|
16 |
} );
|
17 |
|
18 |
test( 'shared capacity', () => {
|
19 |
+
const component = renderer.create(
|
20 |
+
<QuantityBar sold={ 20 } sharedSold={ 80 } total={ 100 } />,
|
21 |
+
);
|
22 |
expect( component.toJSON() ).toMatchSnapshot();
|
23 |
} );
|
24 |
|
25 |
test( 'with limited capacity', () => {
|
26 |
const component = renderer.create(
|
27 |
+
<QuantityBar sold={ 20 } sharedSold={ 80 } capacity={ 50 } total={ 100 } />,
|
28 |
);
|
29 |
expect( component.toJSON() ).toMatchSnapshot();
|
30 |
} );
|
31 |
|
32 |
test( 'avoid render percentage on disabled', () => {
|
33 |
const component = renderer.create(
|
34 |
+
<QuantityBar
|
35 |
+
sold={ 20 }
|
36 |
+
sharedSold={ 80 }
|
37 |
+
capacity={ 50 }
|
38 |
+
total={ 100 }
|
39 |
+
isDisabled={ true }
|
40 |
+
/>,
|
41 |
);
|
42 |
expect( component.toJSON() ).toMatchSnapshot();
|
43 |
} );
|
src/modules/blocks/ticket/container-header/quantity/quantity-bar/bar.js
CHANGED
@@ -14,7 +14,6 @@ import {
|
|
14 |
} from '@moderntribe/common/utils';
|
15 |
|
16 |
const Bar = ( { children, className, value, total } ) => {
|
17 |
-
|
18 |
if ( value === 0 || total === 0 ) {
|
19 |
return null;
|
20 |
}
|
@@ -44,7 +43,7 @@ const Bar = ( { children, className, value, total } ) => {
|
|
44 |
{ children }
|
45 |
</span>
|
46 |
);
|
47 |
-
}
|
48 |
|
49 |
Bar.propTypes = {
|
50 |
children: PropTypes.node,
|
@@ -55,12 +54,12 @@ Bar.propTypes = {
|
|
55 |
] ),
|
56 |
value: PropTypes.number,
|
57 |
total: PropTypes.number,
|
58 |
-
}
|
59 |
|
60 |
Bar.defaultProps = {
|
61 |
className: null,
|
62 |
value: 0,
|
63 |
total: 0,
|
64 |
-
}
|
65 |
|
66 |
export default Bar;
|
14 |
} from '@moderntribe/common/utils';
|
15 |
|
16 |
const Bar = ( { children, className, value, total } ) => {
|
|
|
17 |
if ( value === 0 || total === 0 ) {
|
18 |
return null;
|
19 |
}
|
43 |
{ children }
|
44 |
</span>
|
45 |
);
|
46 |
+
};
|
47 |
|
48 |
Bar.propTypes = {
|
49 |
children: PropTypes.node,
|
54 |
] ),
|
55 |
value: PropTypes.number,
|
56 |
total: PropTypes.number,
|
57 |
+
};
|
58 |
|
59 |
Bar.defaultProps = {
|
60 |
className: null,
|
61 |
value: 0,
|
62 |
total: 0,
|
63 |
+
};
|
64 |
|
65 |
export default Bar;
|
src/modules/blocks/ticket/container-header/quantity/quantity-bar/element.js
CHANGED
@@ -28,15 +28,15 @@ const QuantityBar = ( { sharedSold, sold, capacity, total, isDisabled } ) => {
|
|
28 |
total={ total }
|
29 |
/>
|
30 |
{ !! capacity && ! ( capacity === total ) && (
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
) }
|
41 |
</Fragment>
|
42 |
) }
|
@@ -50,7 +50,7 @@ QuantityBar.propTypes = {
|
|
50 |
sold: PropTypes.number,
|
51 |
total: PropTypes.number,
|
52 |
isDisabled: PropTypes.bool,
|
53 |
-
}
|
54 |
|
55 |
QuantityBar.defaultProps = {
|
56 |
sharedSold: 0,
|
28 |
total={ total }
|
29 |
/>
|
30 |
{ !! capacity && ! ( capacity === total ) && (
|
31 |
+
<Bar
|
32 |
+
className="tribe-editor__quantity-bar__bar--capacity"
|
33 |
+
value={ capacity }
|
34 |
+
total={ total }
|
35 |
+
>
|
36 |
+
<span className="tribe-editor__quantity-bar__bar-label">
|
37 |
+
{ __( 'cap', 'event-tickets' ) }
|
38 |
+
</span>
|
39 |
+
</Bar>
|
40 |
) }
|
41 |
</Fragment>
|
42 |
) }
|
50 |
sold: PropTypes.number,
|
51 |
total: PropTypes.number,
|
52 |
isDisabled: PropTypes.bool,
|
53 |
+
};
|
54 |
|
55 |
QuantityBar.defaultProps = {
|
56 |
sharedSold: 0,
|
src/modules/blocks/ticket/container-header/quantity/template.js
CHANGED
@@ -52,7 +52,10 @@ const TicketContainerHeaderDescription = ( {
|
|
52 |
);
|
53 |
|
54 |
return ! isSelected && (
|
55 |
-
<div
|
|
|
|
|
|
|
56 |
<span className="tribe-editor__ticket__container-header-quantity-label">
|
57 |
{ getLabel() }<span class="dashicons dashicons-info"></span>
|
58 |
</span>
|
52 |
);
|
53 |
|
54 |
return ! isSelected && (
|
55 |
+
<div
|
56 |
+
className="tribe-editor__ticket__container-header-quantity tribe-tooltip"
|
57 |
+
title={ __( 'This pertains to Orders that have been marked Completed.', 'event-tickets' ) }
|
58 |
+
>
|
59 |
<span className="tribe-editor__ticket__container-header-quantity-label">
|
60 |
{ getLabel() }<span class="dashicons dashicons-info"></span>
|
61 |
</span>
|
src/modules/blocks/ticket/container-header/template.js
CHANGED
@@ -4,11 +4,6 @@
|
|
4 |
import React, { Fragment } from 'react';
|
5 |
import PropTypes from 'prop-types';
|
6 |
|
7 |
-
/**
|
8 |
-
* Wordpress dependencies
|
9 |
-
*/
|
10 |
-
import { __ } from '@wordpress/i18n';
|
11 |
-
|
12 |
/**
|
13 |
* Internal dependencies
|
14 |
*/
|
4 |
import React, { Fragment } from 'react';
|
5 |
import PropTypes from 'prop-types';
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
/**
|
8 |
* Internal dependencies
|
9 |
*/
|
src/modules/blocks/ticket/container-header/title/style.pcss
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
.tribe-editor__ticket__container-header-title {
|
|
|
2 |
display: flex;
|
3 |
|
4 |
/* Clipboard tooltip */
|
@@ -50,28 +51,31 @@
|
|
50 |
.tribe-editor__ticket {
|
51 |
|
52 |
.tribe-editor__ticket__container-header-title-input {
|
53 |
-
/* !important required to override styles from react-input-autosize */
|
54 |
-
display: flex !important;
|
55 |
-
margin: 0;
|
56 |
-
padding-top: 3px;
|
57 |
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
-
|
63 |
-
background-color: transparent;
|
64 |
-
color: #000000;
|
65 |
-
margin: 0;
|
66 |
-
padding: 0;
|
67 |
-
border: none;
|
68 |
-
font-weight: bold;
|
69 |
-
font-size: 21px;
|
70 |
-
line-height: 25px;
|
71 |
-
letter-spacing: 0.16px;
|
72 |
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
75 |
}
|
76 |
}
|
77 |
}
|
1 |
.tribe-editor__ticket__container-header-title {
|
2 |
+
align-items: baseline;
|
3 |
display: flex;
|
4 |
|
5 |
/* Clipboard tooltip */
|
51 |
.tribe-editor__ticket {
|
52 |
|
53 |
.tribe-editor__ticket__container-header-title-input {
|
|
|
|
|
|
|
|
|
54 |
|
55 |
+
background-color: transparent;
|
56 |
+
border: none;
|
57 |
+
color: #000;
|
58 |
+
font-size: 21px;
|
59 |
+
font-weight: bold;
|
60 |
+
letter-spacing: 0.16px;
|
61 |
+
line-height: 25px;
|
62 |
+
margin: 3px 0 0;
|
63 |
+
padding: 0;
|
64 |
+
resize: none;
|
65 |
+
width: calc(95% - 26px);
|
66 |
+
|
67 |
+
&:hover,
|
68 |
+
&:focus {
|
69 |
+
background-color: #fff;
|
70 |
}
|
71 |
|
72 |
+
&:disabled {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
&,
|
75 |
+
&:hover,
|
76 |
+
&:focus {
|
77 |
+
background-color: transparent;
|
78 |
+
color: #aeb4bb;
|
79 |
}
|
80 |
}
|
81 |
}
|
src/modules/blocks/ticket/container-header/title/template.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
*/
|
4 |
import React, { Fragment } from 'react';
|
5 |
import PropTypes from 'prop-types';
|
6 |
-
import
|
7 |
|
8 |
/**
|
9 |
* Wordpress dependencies
|
@@ -42,7 +42,7 @@ const TicketContainerHeaderTitle = ( {
|
|
42 |
isSelected
|
43 |
? (
|
44 |
<Fragment>
|
45 |
-
<
|
46 |
className="tribe-editor__ticket__container-header-title-input"
|
47 |
value={ tempTitle }
|
48 |
placeholder={ __( 'Ticket Type *', 'event-tickets' ) }
|
@@ -65,7 +65,7 @@ const TicketContainerHeaderTitle = ( {
|
|
65 |
}
|
66 |
</div>
|
67 |
);
|
68 |
-
}
|
69 |
|
70 |
TicketContainerHeaderTitle.propTypes = {
|
71 |
hasAttendeeInfoFields: PropTypes.bool,
|
3 |
*/
|
4 |
import React, { Fragment } from 'react';
|
5 |
import PropTypes from 'prop-types';
|
6 |
+
import TextareaAutosize from 'react-textarea-autosize';
|
7 |
|
8 |
/**
|
9 |
* Wordpress dependencies
|
42 |
isSelected
|
43 |
? (
|
44 |
<Fragment>
|
45 |
+
<TextareaAutosize
|
46 |
className="tribe-editor__ticket__container-header-title-input"
|
47 |
value={ tempTitle }
|
48 |
placeholder={ __( 'Ticket Type *', 'event-tickets' ) }
|
65 |
}
|
66 |
</div>
|
67 |
);
|
68 |
+
};
|
69 |
|
70 |
TicketContainerHeaderTitle.propTypes = {
|
71 |
hasAttendeeInfoFields: PropTypes.bool,
|
src/modules/blocks/ticket/container.js
CHANGED
@@ -18,9 +18,9 @@ import {
|
|
18 |
} from '@moderntribe/tickets/data/shared/move/selectors';
|
19 |
|
20 |
const getShowTicket = ( state, ownProps ) => (
|
21 |
-
selectors.getTicketsIsSelected( state )
|
22 |
-
|
23 |
-
|
24 |
);
|
25 |
|
26 |
const mapStateToProps = ( state, ownProps ) => {
|
18 |
} from '@moderntribe/tickets/data/shared/move/selectors';
|
19 |
|
20 |
const getShowTicket = ( state, ownProps ) => (
|
21 |
+
selectors.getTicketsIsSelected( state ) ||
|
22 |
+
selectors.hasATicketSelected( state ) ||
|
23 |
+
selectors.isTicketOnSale( state, ownProps )
|
24 |
);
|
25 |
|
26 |
const mapStateToProps = ( state, ownProps ) => {
|
src/modules/blocks/ticket/container/template.js
CHANGED
@@ -27,7 +27,9 @@ const TicketIcon = ( { isDisabled } ) => (
|
|
27 |
);
|
28 |
|
29 |
const TicketContainerIcon = ( { isDisabled, isFuture, isPast } ) => (
|
30 |
-
isFuture || isPast
|
|
|
|
|
31 |
);
|
32 |
|
33 |
TicketContainerIcon.propTypes = {
|
@@ -36,12 +38,17 @@ TicketContainerIcon.propTypes = {
|
|
36 |
isPast: PropTypes.bool,
|
37 |
};
|
38 |
|
39 |
-
|
40 |
const TicketContainer = ( { clientId, isDisabled, isFuture, isPast, isSelected } ) => (
|
41 |
<ContainerPanel
|
42 |
className="tribe-editor__ticket__container"
|
43 |
layout={ LAYOUT.ticket }
|
44 |
-
icon={
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
header={ <TicketContainerHeader clientId={ clientId } isSelected={ isSelected } /> }
|
46 |
content={ <TicketContainerContent clientId={ clientId } /> }
|
47 |
/>
|
27 |
);
|
28 |
|
29 |
const TicketContainerIcon = ( { isDisabled, isFuture, isPast } ) => (
|
30 |
+
isFuture || isPast
|
31 |
+
? <ClockIcon isDisabled={ isDisabled } />
|
32 |
+
: <TicketIcon isDisabled={ isDisabled } />
|
33 |
);
|
34 |
|
35 |
TicketContainerIcon.propTypes = {
|
38 |
isPast: PropTypes.bool,
|
39 |
};
|
40 |
|
|
|
41 |
const TicketContainer = ( { clientId, isDisabled, isFuture, isPast, isSelected } ) => (
|
42 |
<ContainerPanel
|
43 |
className="tribe-editor__ticket__container"
|
44 |
layout={ LAYOUT.ticket }
|
45 |
+
icon={
|
46 |
+
<TicketContainerIcon
|
47 |
+
isDisabled={ isDisabled }
|
48 |
+
isFuture={ isFuture }
|
49 |
+
isPast={ isPast }
|
50 |
+
/>
|
51 |
+
}
|
52 |
header={ <TicketContainerHeader clientId={ clientId } isSelected={ isSelected } /> }
|
53 |
content={ <TicketContainerContent clientId={ clientId } /> }
|
54 |
/>
|
src/modules/blocks/ticket/dashboard/container.js
CHANGED
@@ -17,10 +17,10 @@ import { actions, selectors } from '@moderntribe/tickets/data/blocks/ticket';
|
|
17 |
import { withStore } from '@moderntribe/common/hoc';
|
18 |
|
19 |
const getIsConfirmDisabled = ( state, ownProps ) => (
|
20 |
-
! selectors.isTicketValid( state, ownProps )
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
);
|
25 |
|
26 |
const onCancelClick = ( state, dispatch, ownProps ) => () => {
|
@@ -49,7 +49,7 @@ const onCancelClick = ( state, dispatch, ownProps ) => () => {
|
|
49 |
) );
|
50 |
dispatch( actions.setTicketHasChanges( ownProps.clientId, false ) );
|
51 |
} else {
|
52 |
-
dispatch( actions.removeTicketBlock( ownProps.clientId ) )
|
53 |
wpDispatch( 'core/editor' ).removeBlocks( ownProps.clientId );
|
54 |
}
|
55 |
wpDispatch( 'core/editor' ).clearSelectedBlock();
|
17 |
import { withStore } from '@moderntribe/common/hoc';
|
18 |
|
19 |
const getIsConfirmDisabled = ( state, ownProps ) => (
|
20 |
+
! selectors.isTicketValid( state, ownProps ) ||
|
21 |
+
! selectors.getTicketHasChanges( state, ownProps ) ||
|
22 |
+
selectors.isTicketDisabled( state, ownProps ) ||
|
23 |
+
selectors.getTicketHasDurationError( state, ownProps )
|
24 |
);
|
25 |
|
26 |
const onCancelClick = ( state, dispatch, ownProps ) => () => {
|
49 |
) );
|
50 |
dispatch( actions.setTicketHasChanges( ownProps.clientId, false ) );
|
51 |
} else {
|
52 |
+
dispatch( actions.removeTicketBlock( ownProps.clientId ) );
|
53 |
wpDispatch( 'core/editor' ).removeBlocks( ownProps.clientId );
|
54 |
}
|
55 |
wpDispatch( 'core/editor' ).clearSelectedBlock();
|
src/modules/blocks/ticket/index.js
CHANGED
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* WordPress dependencies
|
3 |
*/
|
@@ -14,7 +19,7 @@ export default {
|
|
14 |
id: 'tickets-item',
|
15 |
title: __( 'Event Ticket', 'event-tickets' ),
|
16 |
description: __( 'A single configured ticket type.', 'event-tickets' ),
|
17 |
-
icon: <TicketsIcon/>,
|
18 |
category: 'tribe-tickets',
|
19 |
keywords: [ 'event', 'event-tickets', 'tribe' ],
|
20 |
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import React from 'react';
|
5 |
+
|
6 |
/**
|
7 |
* WordPress dependencies
|
8 |
*/
|
19 |
id: 'tickets-item',
|
20 |
title: __( 'Event Ticket', 'event-tickets' ),
|
21 |
description: __( 'A single configured ticket type.', 'event-tickets' ),
|
22 |
+
icon: <TicketsIcon />,
|
23 |
category: 'tribe-tickets',
|
24 |
keywords: [ 'event', 'event-tickets', 'tribe' ],
|
25 |
|
src/modules/blocks/tickets/action-buttons/attendees/container.js
CHANGED
@@ -23,10 +23,10 @@ const mapStateToProps = () => {
|
|
23 |
const postId = select( 'core/editor' ).getCurrentPostId();
|
24 |
|
25 |
return {
|
26 |
-
href: `${ adminURL }edit.php?post_type=${ postType }&page=tickets-attendees&event_id=${ postId }`,
|
27 |
canCreateTickets: selectors.canCreateTickets(),
|
28 |
};
|
29 |
-
}
|
30 |
|
31 |
export default compose(
|
32 |
withStore(),
|
23 |
const postId = select( 'core/editor' ).getCurrentPostId();
|
24 |
|
25 |
return {
|
26 |
+
href: `${ adminURL }edit.php?post_type=${ postType }&page=tickets-attendees&event_id=${ postId }`, // eslint-disable-line max-len
|
27 |
canCreateTickets: selectors.canCreateTickets(),
|
28 |
};
|
29 |
+
};
|
30 |
|
31 |
export default compose(
|
32 |
withStore(),
|
src/modules/blocks/tickets/action-dashboard/container.js
CHANGED
@@ -21,7 +21,8 @@ import { selectors, constants } from '@moderntribe/tickets/data/blocks/ticket';
|
|
21 |
const getHasRecurrenceRules = ( state ) => {
|
22 |
let hasRules = false;
|
23 |
try {
|
24 |
-
hasRules = window.tribe[ plugins.constants.EVENTS_PRO_PLUGIN ]
|
|
|
25 |
} catch ( e ) {
|
26 |
// ¯\_(ツ)_/¯
|
27 |
}
|
@@ -36,7 +37,6 @@ const mapStateToProps = ( state, ownProps ) => {
|
|
36 |
hasCreatedTickets: selectors.hasCreatedTickets( state ),
|
37 |
hasOrdersPage: Boolean( page ),
|
38 |
hasRecurrenceRules: getHasRecurrenceRules( state ),
|
39 |
-
hasTicketsPlus: plugins.selectors.hasPlugin( state )( plugins.constants.TICKETS_PLUS ),
|
40 |
onConfirmClick: () => { // eslint-disable-line wpcalypso/redux-no-bound-selectors
|
41 |
const { clientId } = ownProps;
|
42 |
const { getBlockCount } = select( 'core/editor' );
|
21 |
const getHasRecurrenceRules = ( state ) => {
|
22 |
let hasRules = false;
|
23 |
try {
|
24 |
+
hasRules = window.tribe[ plugins.constants.EVENTS_PRO_PLUGIN ]
|
25 |
+
.data.blocks.recurring.selectors.hasRules( state );
|
26 |
} catch ( e ) {
|
27 |
// ¯\_(ツ)_/¯
|
28 |
}
|
37 |
hasCreatedTickets: selectors.hasCreatedTickets( state ),
|
38 |
hasOrdersPage: Boolean( page ),
|
39 |
hasRecurrenceRules: getHasRecurrenceRules( state ),
|
|
|
40 |
onConfirmClick: () => { // eslint-disable-line wpcalypso/redux-no-bound-selectors
|
41 |
const { clientId } = ownProps;
|
42 |
const { getBlockCount } = select( 'core/editor' );
|
src/modules/blocks/tickets/action-dashboard/template.js
CHANGED
@@ -27,7 +27,6 @@ class TicketsDashboardAction extends PureComponent {
|
|
27 |
hasCreatedTickets: PropTypes.bool,
|
28 |
hasOrdersPage: PropTypes.bool,
|
29 |
hasRecurrenceRules: PropTypes.bool,
|
30 |
-
hasTicketsPlus: PropTypes.bool,
|
31 |
onConfirmClick: PropTypes.func,
|
32 |
};
|
33 |
|
@@ -47,12 +46,10 @@ class TicketsDashboardAction extends PureComponent {
|
|
47 |
hasCreatedTickets,
|
48 |
hasOrdersPage,
|
49 |
hasRecurrenceRules,
|
50 |
-
hasTicketsPlus,
|
51 |
} = this.props;
|
52 |
|
53 |
const actions = [ <SettingsActionButton /> ];
|
54 |
if ( hasCreatedTickets ) {
|
55 |
-
|
56 |
actions.push( <AttendeesActionButton /> );
|
57 |
|
58 |
if ( hasOrdersPage ) {
|
@@ -61,14 +58,16 @@ class TicketsDashboardAction extends PureComponent {
|
|
61 |
}
|
62 |
if ( hasRecurrenceRules ) {
|
63 |
const icon = this.state.isWarningOpen ? 'no' : 'info-outline';
|
64 |
-
const text = this.state.isWarningOpen
|
|
|
|
|
65 |
actions.push(
|
66 |
<WarningButton
|
67 |
icon={ icon }
|
68 |
onClick={ this.onWarningClick }
|
69 |
>
|
70 |
{ text }
|
71 |
-
</WarningButton
|
72 |
);
|
73 |
}
|
74 |
return actions;
|
@@ -88,12 +87,15 @@ class TicketsDashboardAction extends PureComponent {
|
|
88 |
/>
|
89 |
{ this.state.isWarningOpen && (
|
90 |
<div className="tribe-editor__tickets__warning">
|
91 |
-
{ __(
|
|
|
|
|
|
|
92 |
</div>
|
93 |
) }
|
94 |
</Fragment>
|
95 |
-
)
|
96 |
}
|
97 |
-
}
|
98 |
|
99 |
export default TicketsDashboardAction;
|
27 |
hasCreatedTickets: PropTypes.bool,
|
28 |
hasOrdersPage: PropTypes.bool,
|
29 |
hasRecurrenceRules: PropTypes.bool,
|
|
|
30 |
onConfirmClick: PropTypes.func,
|
31 |
};
|
32 |
|
46 |
hasCreatedTickets,
|
47 |
hasOrdersPage,
|
48 |
hasRecurrenceRules,
|
|
|
49 |
} = this.props;
|
50 |
|
51 |
const actions = [ <SettingsActionButton /> ];
|
52 |
if ( hasCreatedTickets ) {
|
|
|
53 |
actions.push( <AttendeesActionButton /> );
|
54 |
|
55 |
if ( hasOrdersPage ) {
|
58 |
}
|
59 |
if ( hasRecurrenceRules ) {
|
60 |
const icon = this.state.isWarningOpen ? 'no' : 'info-outline';
|
61 |
+
const text = this.state.isWarningOpen
|
62 |
+
? __( 'Hide Warning', 'event-tickets' )
|
63 |
+
: __( 'Warning', 'event-tickets' );
|
64 |
actions.push(
|
65 |
<WarningButton
|
66 |
icon={ icon }
|
67 |
onClick={ this.onWarningClick }
|
68 |
>
|
69 |
{ text }
|
70 |
+
</WarningButton>,
|
71 |
);
|
72 |
}
|
73 |
return actions;
|
87 |
/>
|
88 |
{ this.state.isWarningOpen && (
|
89 |
<div className="tribe-editor__tickets__warning">
|
90 |
+
{ __(
|
91 |
+
'This is a recurring event. If you add tickets they will only show up on the next upcoming event in the recurrence pattern. The same ticket form will appear across all events in the series. Please configure your events accordingly.', // eslint-disable-line max-len
|
92 |
+
'event-tickets',
|
93 |
+
) }
|
94 |
</div>
|
95 |
) }
|
96 |
</Fragment>
|
97 |
+
);
|
98 |
}
|
99 |
+
}
|
100 |
|
101 |
export default TicketsDashboardAction;
|
src/modules/blocks/tickets/availability/template.js
CHANGED
@@ -19,13 +19,14 @@ import './style.pcss';
|
|
19 |
/**
|
20 |
* @todo: consider changing to _n for better translation compatibility
|
21 |
*/
|
|
|
22 |
const Availability = ( { available, total } ) => {
|
23 |
const Available = (
|
24 |
<NumericLabel
|
25 |
className={ classNames(
|
26 |
'tribe-editor__tickets__availability-label',
|
27 |
'tribe-editor__tickets__availability-label--available',
|
28 |
-
'tribe-tooltip'
|
29 |
) }
|
30 |
count={ available }
|
31 |
singular={ __( '%d ticket available', 'event-tickets' ) }
|
@@ -49,7 +50,10 @@ const Availability = ( { available, total } ) => {
|
|
49 |
<div className="tribe-editor__tickets__availability">
|
50 |
<span
|
51 |
class="tribe-tooltip"
|
52 |
-
title={ __(
|
|
|
|
|
|
|
53 |
>{ Available }<span className="dashicons dashicons-info"></span></span>
|
54 |
{ Total }
|
55 |
</div>
|
@@ -59,6 +63,6 @@ const Availability = ( { available, total } ) => {
|
|
59 |
Availability.propTypes = {
|
60 |
available: PropTypes.number,
|
61 |
total: PropTypes.number,
|
62 |
-
}
|
63 |
|
64 |
export default Availability;
|
19 |
/**
|
20 |
* @todo: consider changing to _n for better translation compatibility
|
21 |
*/
|
22 |
+
|
23 |
const Availability = ( { available, total } ) => {
|
24 |
const Available = (
|
25 |
<NumericLabel
|
26 |
className={ classNames(
|
27 |
'tribe-editor__tickets__availability-label',
|
28 |
'tribe-editor__tickets__availability-label--available',
|
29 |
+
'tribe-tooltip',
|
30 |
) }
|
31 |
count={ available }
|
32 |
singular={ __( '%d ticket available', 'event-tickets' ) }
|
50 |
<div className="tribe-editor__tickets__availability">
|
51 |
<span
|
52 |
class="tribe-tooltip"
|
53 |
+
title={ __(
|
54 |
+
'Ticket availability is based on the lowest number of inventory, stock, and capacity.',
|
55 |
+
'event-tickets',
|
56 |
+
) }
|
57 |
>{ Available }<span className="dashicons dashicons-info"></span></span>
|
58 |
{ Total }
|
59 |
</div>
|
63 |
Availability.propTypes = {
|
64 |
available: PropTypes.number,
|
65 |
total: PropTypes.number,
|
66 |
+
};
|
67 |
|
68 |
export default Availability;
|
src/modules/blocks/tickets/capacity-table/__tests__/template.test.js
CHANGED
@@ -18,7 +18,7 @@ describe( '<CapacityTable />', () => {
|
|
18 |
{ name: 'Balcony', quantity: 20 },
|
19 |
] }
|
20 |
totalCapacity={ 30 }
|
21 |
-
|
22 |
);
|
23 |
expect( component.toJSON() ).toMatchSnapshot();
|
24 |
} );
|
18 |
{ name: 'Balcony', quantity: 20 },
|
19 |
] }
|
20 |
totalCapacity={ 30 }
|
21 |
+
/>,
|
22 |
);
|
23 |
expect( component.toJSON() ).toMatchSnapshot();
|
24 |
} );
|
src/modules/blocks/tickets/capacity-table/row/__tests__/capacity-row.test.js
CHANGED
@@ -22,7 +22,7 @@ describe( '<CapacityRow />', () => {
|
|
22 |
test( 'Custom right value', () => {
|
23 |
const Button = () => <button>Click Me!</button>;
|
24 |
const component = renderer.create(
|
25 |
-
<CapacityRow label="Modern Tribe" items="(20 items)" right={ <Button /> }
|
26 |
);
|
27 |
expect( component.toJSON() ).toMatchSnapshot();
|
28 |
} );
|
22 |
test( 'Custom right value', () => {
|
23 |
const Button = () => <button>Click Me!</button>;
|
24 |
const component = renderer.create(
|
25 |
+
<CapacityRow label="Modern Tribe" items="(20 items)" right={ <Button /> } />,
|
26 |
);
|
27 |
expect( component.toJSON() ).toMatchSnapshot();
|
28 |
} );
|
src/modules/blocks/tickets/container/container.js
CHANGED
@@ -12,18 +12,18 @@ import { withStore } from '@moderntribe/common/hoc';
|
|
12 |
import { selectors } from '@moderntribe/tickets/data/blocks/ticket';
|
13 |
|
14 |
const getHasOverlay = ( state, ownProps ) => (
|
15 |
-
selectors.getTicketsIsSettingsOpen( state )
|
16 |
-
|
17 |
-
! selectors.hasATicketSelected( state )
|
18 |
-
|
19 |
)
|
20 |
);
|
21 |
|
22 |
const getShowInactiveBlock = ( state, ownProps ) => {
|
23 |
const showIfBlockIsSelected = ownProps.isSelected && ! selectors.hasTickets( state );
|
24 |
-
const showIfBlockIsNotSelected = ! ownProps.isSelected
|
25 |
-
|
26 |
-
|
27 |
|
28 |
return showIfBlockIsSelected || showIfBlockIsNotSelected;
|
29 |
};
|
12 |
import { selectors } from '@moderntribe/tickets/data/blocks/ticket';
|
13 |
|
14 |
const getHasOverlay = ( state, ownProps ) => (
|
15 |
+
selectors.getTicketsIsSettingsOpen( state ) ||
|
16 |
+
(
|
17 |
+
! selectors.hasATicketSelected( state ) &&
|
18 |
+
! ownProps.isSelected
|
19 |
)
|
20 |
);
|
21 |
|
22 |
const getShowInactiveBlock = ( state, ownProps ) => {
|
23 |
const showIfBlockIsSelected = ownProps.isSelected && ! selectors.hasTickets( state );
|
24 |
+
const showIfBlockIsNotSelected = ! ownProps.isSelected &&
|
25 |
+
! selectors.hasATicketSelected( state ) &&
|
26 |
+
( ! selectors.hasCreatedTickets( state ) || ! selectors.hasTicketOnSale( state ) );
|
27 |
|
28 |
return showIfBlockIsSelected || showIfBlockIsNotSelected;
|
29 |
};
|
src/modules/blocks/tickets/container/template.js
CHANGED
@@ -37,7 +37,10 @@ const TicketsContainer = ( {
|
|
37 |
|
38 |
if ( ! canCreateTickets ) {
|
39 |
messages.title = __( 'There is no ecommerce available', 'event-tickets' );
|
40 |
-
messages.description = __(
|
|
|
|
|
|
|
41 |
} else if ( ! hasCreatedTickets ) {
|
42 |
messages.title = __( 'There are no tickets yet', 'event-tickets' );
|
43 |
messages.description = __( 'Edit this block to create your first ticket.', 'event-tickets' );
|
37 |
|
38 |
if ( ! canCreateTickets ) {
|
39 |
messages.title = __( 'There is no ecommerce available', 'event-tickets' );
|
40 |
+
messages.description = __(
|
41 |
+
'To create tickets, you\'ll need to enable an ecommerce solution.',
|
42 |
+
'event-tickets',
|
43 |
+
);
|
44 |
} else if ( ! hasCreatedTickets ) {
|
45 |
messages.title = __( 'There are no tickets yet', 'event-tickets' );
|
46 |
messages.description = __( 'Edit this block to create your first ticket.', 'event-tickets' );
|
src/modules/blocks/tickets/controls/template.js
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
*/
|
4 |
import React from 'react';
|
5 |
import PropTypes from 'prop-types';
|
6 |
-
import { noop } from 'lodash';
|
7 |
|
8 |
/**
|
9 |
* Wordpress dependencies
|
@@ -18,19 +17,20 @@ import { InspectorControls } from '@wordpress/editor';
|
|
18 |
import './style.pcss';
|
19 |
|
20 |
const message = __(
|
21 |
-
'It looks like you have multiple ecommerce plugins active. We recommend running only one at a time. However, if you need to run multiple, please select which one to use to sell tickets for this event. ',
|
22 |
'event-tickets',
|
23 |
);
|
24 |
|
25 |
const note = __(
|
26 |
-
'Note: adjusting this setting will only impact new tickets. Existing tickets will not change. We highly recommend that all tickets for one event use the same ecommerce plugin.',
|
27 |
'event-tickets',
|
28 |
);
|
29 |
|
30 |
/**
|
31 |
* @todo: create radio input element, move this over to element
|
32 |
*/
|
33 |
-
|
|
|
34 |
<div className="tribe-editor__tickets-control-container">
|
35 |
<input
|
36 |
className="tribe-editor__tickets-control__input tribe-editor__tickets-control__input--radio"
|
3 |
*/
|
4 |
import React from 'react';
|
5 |
import PropTypes from 'prop-types';
|
|
|
6 |
|
7 |
/**
|
8 |
* Wordpress dependencies
|
17 |
import './style.pcss';
|
18 |
|
19 |
const message = __(
|
20 |
+
'It looks like you have multiple ecommerce plugins active. We recommend running only one at a time. However, if you need to run multiple, please select which one to use to sell tickets for this event. ', // eslint-disable-line max-len
|
21 |
'event-tickets',
|
22 |
);
|
23 |
|
24 |
const note = __(
|
25 |
+
'Note: adjusting this setting will only impact new tickets. Existing tickets will not change. We highly recommend that all tickets for one event use the same ecommerce plugin.', // eslint-disable-line max-len
|
26 |
'event-tickets',
|
27 |
);
|
28 |
|
29 |
/**
|
30 |
* @todo: create radio input element, move this over to element
|
31 |
*/
|
32 |
+
|
33 |
+
const RadioInput = ( { provider, onProviderChange, ...additionalProps } ) => (
|
34 |
<div className="tribe-editor__tickets-control-container">
|
35 |
<input
|
36 |
className="tribe-editor__tickets-control__input tribe-editor__tickets-control__input--radio"
|
src/modules/blocks/tickets/dashboard/template.js
CHANGED
@@ -8,14 +8,13 @@ import PropTypes from 'prop-types';
|
|
8 |
* Internal dependencies
|
9 |
*/
|
10 |
import TicketsActionDashboard from '@moderntribe/tickets/blocks/tickets/action-dashboard/container';
|
11 |
-
import TicketsSettingsDashboard from '@moderntribe/tickets/blocks/tickets/settings-dashboard/container';
|
12 |
|
13 |
const TicketsDashboard = ( {
|
14 |
clientId,
|
15 |
isSelected,
|
16 |
isSettingsOpen,
|
17 |
} ) => {
|
18 |
-
|
19 |
if ( ! isSelected ) {
|
20 |
return null;
|
21 |
}
|
@@ -24,7 +23,7 @@ const TicketsDashboard = ( {
|
|
24 |
? <TicketsSettingsDashboard />
|
25 |
: <TicketsActionDashboard clientId={ clientId } />
|
26 |
);
|
27 |
-
}
|
28 |
|
29 |
TicketsDashboard.propTypes = {
|
30 |
clientId: PropTypes.string,
|
8 |
* Internal dependencies
|
9 |
*/
|
10 |
import TicketsActionDashboard from '@moderntribe/tickets/blocks/tickets/action-dashboard/container';
|
11 |
+
import TicketsSettingsDashboard from '@moderntribe/tickets/blocks/tickets/settings-dashboard/container'; // eslint-disable-line max-len
|
12 |
|
13 |
const TicketsDashboard = ( {
|
14 |
clientId,
|
15 |
isSelected,
|
16 |
isSettingsOpen,
|
17 |
} ) => {
|
|
|
18 |
if ( ! isSelected ) {
|
19 |
return null;
|
20 |
}
|
23 |
? <TicketsSettingsDashboard />
|
24 |
: <TicketsActionDashboard clientId={ clientId } />
|
25 |
);
|
26 |
+
};
|
27 |
|
28 |
TicketsDashboard.propTypes = {
|
29 |
clientId: PropTypes.string,
|
src/modules/blocks/tickets/header-image/container.js
CHANGED
@@ -11,7 +11,6 @@ import Template from './template';
|
|
11 |
import { actions, selectors } from '@moderntribe/tickets/data/blocks/ticket';
|
12 |
import { withStore } from '@moderntribe/common/hoc';
|
13 |
|
14 |
-
|
15 |
const mapStateToProps = ( state ) => ( {
|
16 |
image: {
|
17 |
id: selectors.getTicketsHeaderImageId( state ),
|
@@ -26,6 +25,7 @@ const mapDispatchToProps = ( dispatch ) => ( {
|
|
26 |
* Full payload from gutenberg media upload is not used,
|
27 |
* only id, alt, and medium src are used for this specific case.
|
28 |
*/
|
|
|
29 |
onSelect: ( image ) => dispatch( actions.updateTicketsHeaderImage( image ) ),
|
30 |
onRemove: () => dispatch( actions.deleteTicketsHeaderImage() ),
|
31 |
} );
|
11 |
import { actions, selectors } from '@moderntribe/tickets/data/blocks/ticket';
|
12 |
import { withStore } from '@moderntribe/common/hoc';
|
13 |
|
|
|
14 |
const mapStateToProps = ( state ) => ( {
|
15 |
image: {
|
16 |
id: selectors.getTicketsHeaderImageId( state ),
|
25 |
* Full payload from gutenberg media upload is not used,
|
26 |
* only id, alt, and medium src are used for this specific case.
|
27 |
*/
|
28 |
+
|
29 |
onSelect: ( image ) => dispatch( actions.updateTicketsHeaderImage( image ) ),
|
30 |
onRemove: () => dispatch( actions.deleteTicketsHeaderImage() ),
|
31 |
} );
|
src/modules/blocks/tickets/header-image/template.js
CHANGED
@@ -19,14 +19,14 @@ const HeaderImage = ( {
|
|
19 |
image,
|
20 |
isSettingsLoading,
|
21 |
onRemove,
|
22 |
-
onSelect
|
23 |
} ) => {
|
24 |
const imageUploadProps = {
|
25 |
title: __( 'Ticket Header Image', 'event-tickets' ),
|
26 |
description: __(
|
27 |
/* eslint-disable-next-line max-len */
|
28 |
'Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.',
|
29 |
-
'event-tickets'
|
30 |
),
|
31 |
className: 'tribe-editor__rsvp__image-upload',
|
32 |
buttonDisabled: isSettingsLoading,
|
19 |
image,
|
20 |
isSettingsLoading,
|
21 |
onRemove,
|
22 |
+
onSelect,
|
23 |
} ) => {
|
24 |
const imageUploadProps = {
|
25 |
title: __( 'Ticket Header Image', 'event-tickets' ),
|
26 |
description: __(
|
27 |
/* eslint-disable-next-line max-len */
|
28 |
'Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.',
|
29 |
+
'event-tickets',
|
30 |
),
|
31 |
className: 'tribe-editor__rsvp__image-upload',
|
32 |
buttonDisabled: isSettingsLoading,
|
src/modules/blocks/tickets/index.js
CHANGED
@@ -1,8 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* WordPress dependencies
|
3 |
*/
|
4 |
import { __ } from '@wordpress/i18n';
|
5 |
-
|
6 |
import { InnerBlocks } from '@wordpress/editor';
|
7 |
|
8 |
/**
|
@@ -24,7 +28,7 @@ export default {
|
|
24 |
id: 'tickets',
|
25 |
title: __( 'Tickets', 'event-tickets' ),
|
26 |
description: __( 'Sell tickets and register attendees.', 'event-tickets' ),
|
27 |
-
icon: <TicketsIcon/>,
|
28 |
category: 'tribe-tickets',
|
29 |
keywords: [ 'event', 'events-gutenberg', 'tribe' ],
|
30 |
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import React from 'react';
|
5 |
+
|
6 |
/**
|
7 |
* WordPress dependencies
|
8 |
*/
|
9 |
import { __ } from '@wordpress/i18n';
|
|
|
10 |
import { InnerBlocks } from '@wordpress/editor';
|
11 |
|
12 |
/**
|
28 |
id: 'tickets',
|
29 |
title: __( 'Tickets', 'event-tickets' ),
|
30 |
description: __( 'Sell tickets and register attendees.', 'event-tickets' ),
|
31 |
+
icon: <TicketsIcon />,
|
32 |
category: 'tribe-tickets',
|
33 |
keywords: [ 'event', 'events-gutenberg', 'tribe' ],
|
34 |
|
src/modules/blocks/tickets/settings-dashboard/template.js
CHANGED
@@ -9,7 +9,6 @@ import classNames from 'classnames';
|
|
9 |
* Wordpress dependencies
|
10 |
*/
|
11 |
import { Spinner } from '@wordpress/components';
|
12 |
-
import { __ } from '@wordpress/i18n';
|
13 |
|
14 |
/**
|
15 |
* Internal dependencies
|
9 |
* Wordpress dependencies
|
10 |
*/
|
11 |
import { Spinner } from '@wordpress/components';
|
|
|
12 |
|
13 |
/**
|
14 |
* Internal dependencies
|
src/modules/data/__tests__/utils.test.js
CHANGED
@@ -58,7 +58,8 @@ describe( 'Tickets Utils', () => {
|
|
58 |
} );
|
59 |
|
60 |
test( 'ticket not going count', () => {
|
61 |
-
expect( utils.KEY_TICKET_HAS_ATTENDEE_INFO_FIELDS )
|
|
|
62 |
} );
|
63 |
} );
|
64 |
} );
|
58 |
} );
|
59 |
|
60 |
test( 'ticket not going count', () => {
|
61 |
+
expect( utils.KEY_TICKET_HAS_ATTENDEE_INFO_FIELDS )
|
62 |
+
.toBe( '_tribe_ticket_has_attendee_info_fields' );
|
63 |
} );
|
64 |
} );
|
65 |
} );
|
src/modules/data/blocks/attendees/__tests__/actions.test.js
CHANGED
@@ -1,17 +1,8 @@
|
|
1 |
-
/**
|
2 |
-
* External dependencies
|
3 |
-
*/
|
4 |
-
import configureStore from 'redux-mock-store';
|
5 |
-
import thunk from 'redux-thunk';
|
6 |
-
|
7 |
/**
|
8 |
* Internal dependencies
|
9 |
*/
|
10 |
import { actions } from '@moderntribe/tickets/data/blocks/attendees';
|
11 |
|
12 |
-
const middlewares = [ thunk ];
|
13 |
-
const mockStore = configureStore( middlewares );
|
14 |
-
|
15 |
describe( '[STORE] - Attendees actions', () => {
|
16 |
it( 'Should set initial state', () => {
|
17 |
expect( actions.setInitialState( {} ) ).toMatchSnapshot();
|
@@ -28,5 +19,4 @@ describe( '[STORE] - Attendees actions', () => {
|
|
28 |
it( 'Should set the attendees Display Subtitle', () => {
|
29 |
expect( actions.setDisplaySubtitle( true ) ).toMatchSnapshot();
|
30 |
} );
|
31 |
-
|
32 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* Internal dependencies
|
3 |
*/
|
4 |
import { actions } from '@moderntribe/tickets/data/blocks/attendees';
|
5 |
|
|
|
|
|
|
|
6 |
describe( '[STORE] - Attendees actions', () => {
|
7 |
it( 'Should set initial state', () => {
|
8 |
expect( actions.setInitialState( {} ) ).toMatchSnapshot();
|
19 |
it( 'Should set the attendees Display Subtitle', () => {
|
20 |
expect( actions.setDisplaySubtitle( true ) ).toMatchSnapshot();
|
21 |
} );
|
|
|
22 |
} );
|
src/modules/data/blocks/attendees/__tests__/sagas.test.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* External dependencies
|
3 |
*/
|
4 |
-
import { takeEvery, put,
|
5 |
import { cloneableGenerator } from 'redux-saga/utils';
|
6 |
|
7 |
/**
|
@@ -17,7 +17,7 @@ describe( 'Attendees Block sagas', () => {
|
|
17 |
it( 'should watch actions', () => {
|
18 |
const gen = watchers();
|
19 |
expect( gen.next().value ).toEqual(
|
20 |
-
takeEvery( types.SET_ATTENDEES_INITIAL_STATE, sagas.setInitialState )
|
21 |
);
|
22 |
expect( gen.next().done ).toEqual( true );
|
23 |
} );
|
@@ -27,7 +27,7 @@ describe( 'Attendees Block sagas', () => {
|
|
27 |
beforeEach( () => {
|
28 |
action = { payload: {
|
29 |
get: jest.fn(
|
30 |
-
( name, _default ) => DEFAULT_STATE[ name ] || _default
|
31 |
),
|
32 |
} };
|
33 |
} );
|
@@ -37,9 +37,13 @@ describe( 'Attendees Block sagas', () => {
|
|
37 |
expect( gen.next().value ).toEqual(
|
38 |
all( [
|
39 |
put( actions.setTitle( action.payload.get( 'title', DEFAULT_STATE.title ) ) ),
|
40 |
-
put( actions.setDisplayTitle(
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
43 |
);
|
44 |
expect( gen.next().done ).toEqual( true );
|
45 |
} );
|
1 |
/**
|
2 |
* External dependencies
|
3 |
*/
|
4 |
+
import { takeEvery, put, all } from 'redux-saga/effects';
|
5 |
import { cloneableGenerator } from 'redux-saga/utils';
|
6 |
|
7 |
/**
|
17 |
it( 'should watch actions', () => {
|
18 |
const gen = watchers();
|
19 |
expect( gen.next().value ).toEqual(
|
20 |
+
takeEvery( types.SET_ATTENDEES_INITIAL_STATE, sagas.setInitialState ),
|
21 |
);
|
22 |
expect( gen.next().done ).toEqual( true );
|
23 |
} );
|
27 |
beforeEach( () => {
|
28 |
action = { payload: {
|
29 |
get: jest.fn(
|
30 |
+
( name, _default ) => DEFAULT_STATE[ name ] || _default,
|
31 |
),
|
32 |
} };
|
33 |
} );
|
37 |
expect( gen.next().value ).toEqual(
|
38 |
all( [
|
39 |
put( actions.setTitle( action.payload.get( 'title', DEFAULT_STATE.title ) ) ),
|
40 |
+
put( actions.setDisplayTitle(
|
41 |
+
action.payload.get( 'displayTitle', DEFAULT_STATE.displayTitle ),
|
42 |
+
) ),
|
43 |
+
put( actions.setDisplaySubtitle(
|
44 |
+
action.payload.get( 'displaySubtitle', DEFAULT_STATE.displaySubtitle ),
|
45 |
+
) ),
|
46 |
+
] ),
|
47 |
);
|
48 |
expect( gen.next().done ).toEqual( true );
|
49 |
} );
|
src/modules/data/blocks/attendees/__tests__/types.test.js
CHANGED
@@ -6,18 +6,22 @@ import { PREFIX_TICKETS_STORE } from '@moderntribe/tickets/data/utils';
|
|
6 |
|
7 |
describe( '[STORE] - Attendees types', () => {
|
8 |
it( 'Attendees initial state', () => {
|
9 |
-
expect( types.SET_ATTENDEES_INITIAL_STATE )
|
|
|
10 |
} );
|
11 |
|
12 |
it( 'Should match the types values', () => {
|
13 |
-
expect( types.SET_ATTENDEES_TITLE )
|
|
|
14 |
} );
|
15 |
|
16 |
it( 'Should match the types values', () => {
|
17 |
-
expect( types.SET_ATTENDEES_DISPLAY_TITLE )
|
|
|
18 |
} );
|
19 |
|
20 |
it( 'Should match the types values', () => {
|
21 |
-
expect( types.SET_ATTENDEES_DISPLAY_SUBTITLE )
|
|
|
22 |
} );
|
23 |
} );
|
6 |
|
7 |
describe( '[STORE] - Attendees types', () => {
|
8 |
it( 'Attendees initial state', () => {
|
9 |
+
expect( types.SET_ATTENDEES_INITIAL_STATE )
|
10 |
+
.toBe( `${ PREFIX_TICKETS_STORE }/SET_ATTENDEES_INITIAL_STATE` );
|
11 |
} );
|
12 |
|
13 |
it( 'Should match the types values', () => {
|
14 |
+
expect( types.SET_ATTENDEES_TITLE )
|
15 |
+
.toBe( `${ PREFIX_TICKETS_STORE }/SET_ATTENDEES_TITLE` );
|
16 |
} );
|
17 |
|
18 |
it( 'Should match the types values', () => {
|
19 |
+
expect( types.SET_ATTENDEES_DISPLAY_TITLE )
|
20 |
+
.toBe( `${ PREFIX_TICKETS_STORE }/SET_ATTENDEES_DISPLAY_TITLE` );
|
21 |
} );
|
22 |
|
23 |
it( 'Should match the types values', () => {
|
24 |
+
expect( types.SET_ATTENDEES_DISPLAY_SUBTITLE )
|
25 |
+
.toBe( `${ PREFIX_TICKETS_STORE }/SET_ATTENDEES_DISPLAY_SUBTITLE` );
|
26 |
} );
|
27 |
} );
|
src/modules/data/blocks/attendees/sagas.js
CHANGED
@@ -14,12 +14,12 @@ export function* setInitialState( action ) {
|
|
14 |
const { get } = action.payload;
|
15 |
|
16 |
yield all( [
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
}
|
22 |
|
23 |
export default function* watchers() {
|
24 |
yield takeEvery( types.SET_ATTENDEES_INITIAL_STATE, setInitialState );
|
25 |
-
}
|
14 |
const { get } = action.payload;
|
15 |
|
16 |
yield all( [
|
17 |
+
put( actions.setTitle( get( 'title', DEFAULT_STATE.title ) ) ),
|
18 |
+
put( actions.setDisplayTitle( get( 'displayTitle', DEFAULT_STATE.displayTitle ) ) ),
|
19 |
+
put( actions.setDisplaySubtitle( get( 'displaySubtitle', DEFAULT_STATE.displaySubtitle ) ) ),
|
20 |
+
] );
|
21 |
}
|
22 |
|
23 |
export default function* watchers() {
|
24 |
yield takeEvery( types.SET_ATTENDEES_INITIAL_STATE, setInitialState );
|
25 |
+
}
|
src/modules/data/blocks/attendees/types.js
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
/**
|
2 |
* Internal dependencies
|
3 |
*/
|
@@ -9,4 +10,4 @@ export const SET_ATTENDEES_TITLE = `${ PREFIX_TICKETS_STORE }/SET_ATTENDEES_TITL
|
|
9 |
|
10 |
export const SET_ATTENDEES_DISPLAY_TITLE = `${ PREFIX_TICKETS_STORE }/SET_ATTENDEES_DISPLAY_TITLE`;
|
11 |
|
12 |
-
export const SET_ATTENDEES_DISPLAY_SUBTITLE = `${ PREFIX_TICKETS_STORE }/SET_ATTENDEES_DISPLAY_SUBTITLE`;
|
1 |
+
/* eslint-disable max-len */
|
2 |
/**
|
3 |
* Internal dependencies
|
4 |
*/
|
10 |
|
11 |
export const SET_ATTENDEES_DISPLAY_TITLE = `${ PREFIX_TICKETS_STORE }/SET_ATTENDEES_DISPLAY_TITLE`;
|
12 |
|
13 |
+
export const SET_ATTENDEES_DISPLAY_SUBTITLE = `${ PREFIX_TICKETS_STORE }/SET_ATTENDEES_DISPLAY_SUBTITLE`;
|
src/modules/data/blocks/index.js
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
import reducer from './reducer';
|
2 |
|
3 |
export default reducer;
|
1 |
+
/**
|
2 |
+
* Internal dependencies
|
3 |
+
*/
|
4 |
import reducer from './reducer';
|
5 |
|
6 |
export default reducer;
|
src/modules/data/blocks/rsvp/__tests__/reducer.test.js
CHANGED
@@ -51,7 +51,8 @@ describe( 'RSVP block reducer', () => {
|
|
51 |
} );
|
52 |
|
53 |
it( 'should set the has attendee info fields', () => {
|
54 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPHasAttendeeInfoFields( true ) ) )
|
|
|
55 |
} );
|
56 |
|
57 |
it( 'should set the has duration error', () => {
|
51 |
} );
|
52 |
|
53 |
it( 'should set the has attendee info fields', () => {
|
54 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPHasAttendeeInfoFields( true ) ) )
|
55 |
+
.toMatchSnapshot();
|
56 |
} );
|
57 |
|
58 |
it( 'should set the has duration error', () => {
|
src/modules/data/blocks/rsvp/__tests__/sagas.test.js
CHANGED
@@ -7,10 +7,7 @@ import { noop } from 'lodash';
|
|
7 |
/**
|
8 |
* WordPress dependencies
|
9 |
*/
|
10 |
-
import {
|
11 |
-
dispatch as wpDispatch,
|
12 |
-
select as wpSelect,
|
13 |
-
} from '@wordpress/data';
|
14 |
|
15 |
/**
|
16 |
* Internal Dependencies
|
@@ -20,22 +17,25 @@ import * as actions from '../actions';
|
|
20 |
import * as selectors from '../selectors';
|
21 |
import watchers, * as sagas from '../sagas';
|
22 |
import {
|
23 |
-
DEFAULT_STATE as RSVP_HEADER_IMAGE_DEFAULT_STATE
|
24 |
} from '../reducers/header-image';
|
25 |
import * as ticketActions from '@moderntribe/tickets/data/blocks/ticket/actions';
|
26 |
import {
|
27 |
-
DEFAULT_STATE as TICKET_HEADER_IMAGE_DEFAULT_STATE
|
28 |
} from '@moderntribe/tickets/data/blocks/ticket/reducers/header-image';
|
29 |
import * as utils from '@moderntribe/tickets/data/utils';
|
30 |
import { MOVE_TICKET_SUCCESS } from '@moderntribe/tickets/data/shared/move/types';
|
31 |
import {
|
32 |
api,
|
33 |
-
globals,
|
34 |
moment as momentUtil,
|
35 |
time as timeUtil,
|
36 |
} from '@moderntribe/common/utils';
|
37 |
import * as moveSelectors from '@moderntribe/tickets/data/shared/move/selectors';
|
38 |
-
import {
|
|
|
|
|
|
|
|
|
39 |
|
40 |
function mock() {
|
41 |
return {
|
@@ -76,13 +76,13 @@ describe( 'RSVP block sagas', () => {
|
|
76 |
types.UPDATE_RSVP_HEADER_IMAGE,
|
77 |
types.DELETE_RSVP_HEADER_IMAGE,
|
78 |
MOVE_TICKET_SUCCESS,
|
79 |
-
], sagas.handler )
|
80 |
);
|
81 |
expect( gen.next().value ).toEqual(
|
82 |
-
fork( sagas.handleEventStartDateChanges )
|
83 |
);
|
84 |
expect( gen.next().value ).toEqual(
|
85 |
-
fork( sagas.setNonEventPostTypeEndDate )
|
86 |
);
|
87 |
expect( gen.next().done ).toEqual( true );
|
88 |
} );
|
@@ -99,7 +99,7 @@ describe( 'RSVP block sagas', () => {
|
|
99 |
action.type = types.SET_RSVP_DETAILS;
|
100 |
const gen = sagas.handler( action );
|
101 |
expect( gen.next().value ).toEqual(
|
102 |
-
call( sagas.setRSVPDetails, action )
|
103 |
);
|
104 |
expect( gen.next().done ).toEqual( true );
|
105 |
} );
|
@@ -108,7 +108,7 @@ describe( 'RSVP block sagas', () => {
|
|
108 |
action.type = types.SET_RSVP_TEMP_DETAILS;
|
109 |
const gen = sagas.handler( action );
|
110 |
expect( gen.next().value ).toEqual(
|
111 |
-
call( sagas.setRSVPTempDetails, action )
|
112 |
);
|
113 |
expect( gen.next().done ).toEqual( true );
|
114 |
} );
|
@@ -117,7 +117,7 @@ describe( 'RSVP block sagas', () => {
|
|
117 |
action.type = types.INITIALIZE_RSVP;
|
118 |
const gen = sagas.handler( action );
|
119 |
expect( gen.next().value ).toEqual(
|
120 |
-
call( sagas.initializeRSVP )
|
121 |
);
|
122 |
expect( gen.next().done ).toEqual( true );
|
123 |
} );
|
@@ -126,13 +126,13 @@ describe( 'RSVP block sagas', () => {
|
|
126 |
action.type = types.HANDLE_RSVP_START_DATE;
|
127 |
const gen = sagas.handler( action );
|
128 |
expect( gen.next().value ).toEqual(
|
129 |
-
call( sagas.handleRSVPStartDate, action )
|
130 |
);
|
131 |
expect( gen.next().value ).toEqual(
|
132 |
-
call( sagas.handleRSVPDurationError )
|
133 |
);
|
134 |
expect( gen.next().value ).toEqual(
|
135 |
-
put( actions.setRSVPHasChanges( true ) )
|
136 |
);
|
137 |
expect( gen.next().done ).toEqual( true );
|
138 |
} );
|
@@ -141,13 +141,13 @@ describe( 'RSVP block sagas', () => {
|
|
141 |
action.type = types.HANDLE_RSVP_END_DATE;
|
142 |
const gen = sagas.handler( action );
|
143 |
expect( gen.next().value ).toEqual(
|
144 |
-
call( sagas.handleRSVPEndDate, action )
|
145 |
);
|
146 |
expect( gen.next().value ).toEqual(
|
147 |
-
call( sagas.handleRSVPDurationError )
|
148 |
);
|
149 |
expect( gen.next().value ).toEqual(
|
150 |
-
put( actions.setRSVPHasChanges( true ) )
|
151 |
);
|
152 |
expect( gen.next().done ).toEqual( true );
|
153 |
} );
|
@@ -156,16 +156,16 @@ describe( 'RSVP block sagas', () => {
|
|
156 |
action.type = types.HANDLE_RSVP_START_TIME;
|
157 |
const gen = sagas.handler( action );
|
158 |
expect( gen.next().value ).toEqual(
|
159 |
-
call( sagas.handleRSVPStartTime, action )
|
160 |
);
|
161 |
expect( gen.next().value ).toEqual(
|
162 |
-
call( sagas.handleRSVPStartTimeInput, action )
|
163 |
);
|
164 |
expect( gen.next().value ).toEqual(
|
165 |
-
call( sagas.handleRSVPDurationError )
|
166 |
);
|
167 |
expect( gen.next().value ).toEqual(
|
168 |
-
put( actions.setRSVPHasChanges( true ) )
|
169 |
);
|
170 |
expect( gen.next().done ).toEqual( true );
|
171 |
} );
|
@@ -174,16 +174,16 @@ describe( 'RSVP block sagas', () => {
|
|
174 |
action.type = types.HANDLE_RSVP_END_TIME;
|
175 |
const gen = sagas.handler( action );
|
176 |
expect( gen.next().value ).toEqual(
|
177 |
-
call( sagas.handleRSVPEndTime, action )
|
178 |
);
|
179 |
expect( gen.next().value ).toEqual(
|
180 |
-
call( sagas.handleRSVPEndTimeInput, action )
|
181 |
);
|
182 |
expect( gen.next().value ).toEqual(
|
183 |
-
call( sagas.handleRSVPDurationError )
|
184 |
);
|
185 |
expect( gen.next().value ).toEqual(
|
186 |
-
put( actions.setRSVPHasChanges( true ) )
|
187 |
);
|
188 |
expect( gen.next().done ).toEqual( true );
|
189 |
} );
|
@@ -192,7 +192,7 @@ describe( 'RSVP block sagas', () => {
|
|
192 |
action.type = types.FETCH_RSVP_HEADER_IMAGE;
|
193 |
const gen = sagas.handler( action );
|
194 |
expect( gen.next().value ).toEqual(
|
195 |
-
call( sagas.fetchRSVPHeaderImage, action )
|
196 |
);
|
197 |
expect( gen.next().done ).toEqual( true );
|
198 |
} );
|
@@ -201,7 +201,7 @@ describe( 'RSVP block sagas', () => {
|
|
201 |
action.type = types.UPDATE_RSVP_HEADER_IMAGE;
|
202 |
const gen = sagas.handler( action );
|
203 |
expect( gen.next().value ).toEqual(
|
204 |
-
call( sagas.updateRSVPHeaderImage, action )
|
205 |
);
|
206 |
expect( gen.next().done ).toEqual( true );
|
207 |
} );
|
@@ -210,7 +210,7 @@ describe( 'RSVP block sagas', () => {
|
|
210 |
action.type = types.DELETE_RSVP_HEADER_IMAGE;
|
211 |
const gen = sagas.handler( action );
|
212 |
expect( gen.next().value ).toEqual(
|
213 |
-
call( sagas.deleteRSVPHeaderImage )
|
214 |
);
|
215 |
expect( gen.next().done ).toEqual( true );
|
216 |
} );
|
@@ -219,7 +219,7 @@ describe( 'RSVP block sagas', () => {
|
|
219 |
action.type = MOVE_TICKET_SUCCESS;
|
220 |
const gen = sagas.handler( action );
|
221 |
expect( gen.next().value ).toEqual(
|
222 |
-
call( sagas.handleRSVPMove )
|
223 |
);
|
224 |
expect( gen.next().done ).toEqual( true );
|
225 |
} );
|
@@ -264,7 +264,7 @@ describe( 'RSVP block sagas', () => {
|
|
264 |
put( actions.setRSVPEndTime( '23:32' ) ),
|
265 |
put( actions.setRSVPStartTimeInput( '12:34 pm' ) ),
|
266 |
put( actions.setRSVPEndTimeInput( '11:32 pm' ) ),
|
267 |
-
] )
|
268 |
);
|
269 |
expect( gen.next().done ).toEqual( true );
|
270 |
} );
|
@@ -309,7 +309,7 @@ describe( 'RSVP block sagas', () => {
|
|
309 |
put( actions.setRSVPTempEndTime( '23:32' ) ),
|
310 |
put( actions.setRSVPTempStartTimeInput( '12:34 pm' ) ),
|
311 |
put( actions.setRSVPTempEndTimeInput( '11:32 pm' ) ),
|
312 |
-
] )
|
313 |
);
|
314 |
expect( gen.next().done ).toEqual( true );
|
315 |
} );
|
@@ -367,13 +367,13 @@ describe( 'RSVP block sagas', () => {
|
|
367 |
put( actions.setRSVPTempStartDateMoment( state.startDate ) ),
|
368 |
put( actions.setRSVPTempStartTime( state.startTime ) ),
|
369 |
put( actions.setRSVPTempStartTimeInput( state.startTime ) ),
|
370 |
-
] )
|
371 |
);
|
372 |
expect( gen.next().value ).toEqual(
|
373 |
-
call( isTribeEventPostType )
|
374 |
);
|
375 |
expect( gen.next( true ).value ).toEqual(
|
376 |
-
select( global.tribe.events.data.blocks.datetime.selectors.getStart )
|
377 |
);
|
378 |
expect( gen.next( state.endDate ).value ).toMatchSnapshot();
|
379 |
expect( gen.next( {
|
@@ -394,25 +394,19 @@ describe( 'RSVP block sagas', () => {
|
|
394 |
put( actions.setRSVPTempEndDateMoment( state.endDate ) ),
|
395 |
put( actions.setRSVPTempEndTime( state.endTime ) ),
|
396 |
put( actions.setRSVPTempEndTimeInput( state.endTime ) ),
|
397 |
-
] )
|
398 |
);
|
399 |
expect( gen.next().value ).toEqual(
|
400 |
-
call( sagas.handleRSVPDurationError )
|
401 |
);
|
402 |
expect( gen.next().done ).toEqual( true );
|
403 |
} );
|
404 |
} );
|
405 |
|
406 |
describe( 'syncRSVPSaleEndWithEventStart', () => {
|
407 |
-
let prevDate,
|
408 |
beforeEach( () => {
|
409 |
prevDate = '2018-01-01 00:00:00';
|
410 |
-
state = {
|
411 |
-
startDate: 'January 1, 2018',
|
412 |
-
startTime: '12:34',
|
413 |
-
endDate: 'January 4, 2018',
|
414 |
-
endTime: '23:32',
|
415 |
-
};
|
416 |
global.tribe = {
|
417 |
events: {
|
418 |
data: {
|
@@ -440,13 +434,13 @@ describe( 'RSVP block sagas', () => {
|
|
440 |
it( 'should not sync', () => {
|
441 |
const gen = sagas.syncRSVPSaleEndWithEventStart( prevDate );
|
442 |
expect( gen.next().value ).toEqual(
|
443 |
-
select( selectors.getRSVPTempEndDateMoment )
|
444 |
);
|
445 |
expect( gen.next( momentMock ).value ).toEqual(
|
446 |
-
select( selectors.getRSVPEndDateMoment )
|
447 |
);
|
448 |
expect( gen.next( momentMock ).value ).toEqual(
|
449 |
-
call( createDates, prevDate )
|
450 |
);
|
451 |
expect( gen.next( { moment: momentMock } ).value ).toMatchSnapshot();
|
452 |
expect( gen.next( false ).value ).toMatchSnapshot();
|
@@ -457,23 +451,23 @@ describe( 'RSVP block sagas', () => {
|
|
457 |
it( 'should sync', () => {
|
458 |
const gen = sagas.syncRSVPSaleEndWithEventStart( prevDate );
|
459 |
expect( gen.next().value ).toEqual(
|
460 |
-
select( selectors.getRSVPTempEndDateMoment )
|
461 |
);
|
462 |
expect( gen.next( momentMock ).value ).toEqual(
|
463 |
-
select( selectors.getRSVPEndDateMoment )
|
464 |
);
|
465 |
expect( gen.next( momentMock ).value ).toEqual(
|
466 |
-
call( createDates, prevDate )
|
467 |
);
|
468 |
expect( gen.next( { moment: momentMock } ).value ).toMatchSnapshot();
|
469 |
expect( gen.next( true ).value ).toMatchSnapshot();
|
470 |
expect( gen.next( true ).value ).toMatchSnapshot();
|
471 |
|
472 |
expect( gen.next( true ).value ).toEqual(
|
473 |
-
select( global.tribe.events.data.blocks.datetime.selectors.getStart )
|
474 |
);
|
475 |
expect( gen.next( '2018-02-02 02:00:00' ).value ).toEqual(
|
476 |
-
call( createDates, '2018-02-02 02:00:00' )
|
477 |
);
|
478 |
|
479 |
expect( gen.next( {
|
@@ -485,7 +479,7 @@ describe( 'RSVP block sagas', () => {
|
|
485 |
} ).value ).toMatchSnapshot();
|
486 |
|
487 |
expect( gen.next().value ).toEqual(
|
488 |
-
fork( sagas.saveRSVPWithPostSave )
|
489 |
);
|
490 |
} );
|
491 |
} );
|
@@ -494,13 +488,13 @@ describe( 'RSVP block sagas', () => {
|
|
494 |
it( 'should set has duration error to true if start or end moment is invalid', () => {
|
495 |
const gen = sagas.handleRSVPDurationError();
|
496 |
expect( gen.next().value ).toEqual(
|
497 |
-
select( selectors.getRSVPTempStartDateMoment )
|
498 |
);
|
499 |
expect( gen.next( undefined ).value ).toEqual(
|
500 |
-
select( selectors.getRSVPTempEndDateMoment )
|
501 |
);
|
502 |
expect( gen.next( undefined ).value ).toEqual(
|
503 |
-
put( actions.setRSVPHasDurationError( true ) )
|
504 |
);
|
505 |
expect( gen.next().done ).toEqual( true );
|
506 |
} );
|
@@ -520,39 +514,39 @@ describe( 'RSVP block sagas', () => {
|
|
520 |
const END_TIME_SECONDS = 46800;
|
521 |
const gen = sagas.handleRSVPDurationError();
|
522 |
expect( gen.next().value ).toEqual(
|
523 |
-
select( selectors.getRSVPTempStartDateMoment )
|
524 |
);
|
525 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
526 |
-
select( selectors.getRSVPTempEndDateMoment )
|
527 |
);
|
528 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
529 |
-
select( selectors.getRSVPTempStartTime )
|
530 |
);
|
531 |
expect( gen.next( START_TIME ).value ).toEqual(
|
532 |
-
select( selectors.getRSVPTempEndTime )
|
533 |
);
|
534 |
expect( gen.next( END_TIME ).value ).toEqual(
|
535 |
-
call( timeUtil.toSeconds, START_TIME, timeUtil.TIME_FORMAT_HH_MM_SS )
|
536 |
);
|
537 |
expect( gen.next( START_TIME_SECONDS ).value ).toEqual(
|
538 |
-
call( timeUtil.toSeconds, END_TIME, timeUtil.TIME_FORMAT_HH_MM_SS )
|
539 |
);
|
540 |
expect( gen.next( END_TIME_SECONDS ).value ).toEqual(
|
541 |
-
call( momentUtil.setTimeInSeconds, START_DATE_MOMENT.clone(), START_TIME_SECONDS )
|
542 |
);
|
543 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
544 |
-
call( momentUtil.setTimeInSeconds, END_DATE_MOMENT.clone(), END_TIME_SECONDS )
|
545 |
);
|
546 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
547 |
-
call( [ START_DATE_MOMENT, 'isSameOrAfter' ], END_DATE_MOMENT )
|
548 |
);
|
549 |
expect( gen.next( true ).value ).toEqual(
|
550 |
-
put( actions.setRSVPHasDurationError( true ) )
|
551 |
);
|
552 |
expect( gen.next().done ).toEqual( true );
|
553 |
} );
|
554 |
|
555 |
-
it( 'should set thas duration error to false if start date time is before end date time', () => {
|
556 |
const START_DATE_MOMENT = {
|
557 |
clone: () => {},
|
558 |
isSameOrAfter: () => {},
|
@@ -567,34 +561,34 @@ describe( 'RSVP block sagas', () => {
|
|
567 |
const END_TIME_SECONDS = 46800;
|
568 |
const gen = sagas.handleRSVPDurationError();
|
569 |
expect( gen.next().value ).toEqual(
|
570 |
-
select( selectors.getRSVPTempStartDateMoment )
|
571 |
);
|
572 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
573 |
-
select( selectors.getRSVPTempEndDateMoment )
|
574 |
);
|
575 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
576 |
-
select( selectors.getRSVPTempStartTime )
|
577 |
);
|
578 |
expect( gen.next( START_TIME ).value ).toEqual(
|
579 |
-
select( selectors.getRSVPTempEndTime )
|
580 |
);
|
581 |
expect( gen.next( END_TIME ).value ).toEqual(
|
582 |
-
call( timeUtil.toSeconds, START_TIME, timeUtil.TIME_FORMAT_HH_MM_SS )
|
583 |
);
|
584 |
expect( gen.next( START_TIME_SECONDS ).value ).toEqual(
|
585 |
-
call( timeUtil.toSeconds, END_TIME, timeUtil.TIME_FORMAT_HH_MM_SS )
|
586 |
);
|
587 |
expect( gen.next( END_TIME_SECONDS ).value ).toEqual(
|
588 |
-
call( momentUtil.setTimeInSeconds, START_DATE_MOMENT.clone(), START_TIME_SECONDS )
|
589 |
);
|
590 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
591 |
-
call( momentUtil.setTimeInSeconds, END_DATE_MOMENT.clone(), END_TIME_SECONDS )
|
592 |
);
|
593 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
594 |
-
call( [ START_DATE_MOMENT, 'isSameOrAfter' ], END_DATE_MOMENT )
|
595 |
);
|
596 |
expect( gen.next( false ).value ).toEqual(
|
597 |
-
put( actions.setRSVPHasDurationError( false ) )
|
598 |
);
|
599 |
expect( gen.next().done ).toEqual( true );
|
600 |
} );
|
@@ -621,13 +615,13 @@ describe( 'RSVP block sagas', () => {
|
|
621 |
expect( gen.next().value ).toEqual( undefined );
|
622 |
expect( gen.next( undefined ).value ).toEqual( '' );
|
623 |
expect( gen.next( '' ).value ).toEqual(
|
624 |
-
put( actions.setRSVPTempStartDate( '' ) )
|
625 |
);
|
626 |
expect( gen.next().value ).toEqual(
|
627 |
-
put( actions.setRSVPTempStartDateInput( action.payload.dayPickerInput.state.value ) )
|
628 |
);
|
629 |
expect( gen.next().value ).toEqual(
|
630 |
-
put( actions.setRSVPTempStartDateMoment( undefined ) )
|
631 |
);
|
632 |
expect( gen.next().done ).toEqual( true );
|
633 |
} );
|
@@ -637,19 +631,19 @@ describe( 'RSVP block sagas', () => {
|
|
637 |
action.payload.dayPickerInput.state.value = 'January 1, 2018';
|
638 |
const gen = sagas.handleRSVPStartDate( action );
|
639 |
expect( gen.next().value ).toEqual(
|
640 |
-
call( momentUtil.toMoment, action.payload.date )
|
641 |
);
|
642 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
643 |
-
call( momentUtil.toDatabaseDate, action.payload.date )
|
644 |
);
|
645 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
646 |
-
put( actions.setRSVPTempStartDate( action.payload.date ) )
|
647 |
);
|
648 |
expect( gen.next().value ).toEqual(
|
649 |
-
put( actions.setRSVPTempStartDateInput( action.payload.dayPickerInput.state.value ) )
|
650 |
);
|
651 |
expect( gen.next().value ).toEqual(
|
652 |
-
put( actions.setRSVPTempStartDateMoment( action.payload.date ) )
|
653 |
);
|
654 |
expect( gen.next().done ).toEqual( true );
|
655 |
} );
|
@@ -666,21 +660,21 @@ describe( 'RSVP block sagas', () => {
|
|
666 |
const gen = sagas.saveRSVPWithPostSave();
|
667 |
|
668 |
expect( gen.next().value ).toEqual(
|
669 |
-
select( selectors.getRSVPCreated )
|
670 |
);
|
671 |
|
672 |
expect( gen.next( true ).value ).toEqual(
|
673 |
-
call( createWPEditorSavingChannel )
|
674 |
);
|
675 |
|
676 |
expect( gen.next( channel ).value ).toEqual(
|
677 |
-
take( channel )
|
678 |
);
|
679 |
expect( gen.next( true ).value ).toMatchSnapshot();
|
680 |
expect( gen.next( {} ).value ).toMatchSnapshot();
|
681 |
|
682 |
expect( gen.next().value ).toEqual(
|
683 |
-
call( [ channel, 'close' ] )
|
684 |
);
|
685 |
|
686 |
expect( gen.next().done ).toEqual( true );
|
@@ -689,7 +683,7 @@ describe( 'RSVP block sagas', () => {
|
|
689 |
const gen = sagas.saveRSVPWithPostSave();
|
690 |
|
691 |
expect( gen.next().value ).toEqual(
|
692 |
-
select( selectors.getRSVPCreated )
|
693 |
);
|
694 |
|
695 |
expect( gen.next( false ).done ).toEqual( true );
|
@@ -725,23 +719,23 @@ describe( 'RSVP block sagas', () => {
|
|
725 |
const gen = sagas.handleEventStartDateChanges();
|
726 |
|
727 |
expect( gen.next( true ).value ).toEqual(
|
728 |
-
take( [ types.INITIALIZE_RSVP, types.SET_RSVP_DETAILS ] )
|
729 |
);
|
730 |
|
731 |
expect( gen.next().value ).toEqual(
|
732 |
-
call( isTribeEventPostType )
|
733 |
);
|
734 |
|
735 |
expect( gen.next( true ).value ).toEqual(
|
736 |
-
select( global.tribe.events.data.blocks.datetime.selectors.getStart )
|
737 |
);
|
738 |
|
739 |
expect( gen.next( '2018-01-01 12:00:00' ).value ).toEqual(
|
740 |
-
take( [ 'SET_START_DATE_TIME', 'SET_START_TIME' ] )
|
741 |
);
|
742 |
|
743 |
expect( gen.next().value ).toEqual(
|
744 |
-
fork( sagas.syncRSVPSaleEndWithEventStart, '2018-01-01 12:00:00' )
|
745 |
);
|
746 |
|
747 |
expect( gen.next().done ).toEqual( false );
|
@@ -769,13 +763,13 @@ describe( 'RSVP block sagas', () => {
|
|
769 |
expect( gen.next().value ).toEqual( undefined );
|
770 |
expect( gen.next( undefined ).value ).toEqual( '' );
|
771 |
expect( gen.next( '' ).value ).toEqual(
|
772 |
-
put( actions.setRSVPTempEndDate( '' ) )
|
773 |
);
|
774 |
expect( gen.next().value ).toEqual(
|
775 |
-
put( actions.setRSVPTempEndDateInput( action.payload.dayPickerInput.state.value ) )
|
776 |
);
|
777 |
expect( gen.next().value ).toEqual(
|
778 |
-
put( actions.setRSVPTempEndDateMoment( undefined ) )
|
779 |
);
|
780 |
expect( gen.next().done ).toEqual( true );
|
781 |
} );
|
@@ -785,19 +779,19 @@ describe( 'RSVP block sagas', () => {
|
|
785 |
action.payload.dayPickerInput.state.value = 'January 1, 2018';
|
786 |
const gen = sagas.handleRSVPEndDate( action );
|
787 |
expect( gen.next().value ).toEqual(
|
788 |
-
call( momentUtil.toMoment, action.payload.date )
|
789 |
);
|
790 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
791 |
-
call( momentUtil.toDatabaseDate, action.payload.date )
|
792 |
);
|
793 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
794 |
-
put( actions.setRSVPTempEndDate( action.payload.date ) )
|
795 |
);
|
796 |
expect( gen.next().value ).toEqual(
|
797 |
-
put( actions.setRSVPTempEndDateInput( action.payload.dayPickerInput.state.value ) )
|
798 |
);
|
799 |
expect( gen.next().value ).toEqual(
|
800 |
-
put( actions.setRSVPTempEndDateMoment( action.payload.date ) )
|
801 |
);
|
802 |
expect( gen.next().done ).toEqual( true );
|
803 |
} );
|
@@ -813,10 +807,10 @@ describe( 'RSVP block sagas', () => {
|
|
813 |
const startTime = '01:00';
|
814 |
const gen = sagas.handleRSVPStartTime( action );
|
815 |
expect( gen.next().value ).toEqual(
|
816 |
-
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM )
|
817 |
);
|
818 |
expect( gen.next( startTime ).value ).toEqual(
|
819 |
-
put( actions.setRSVPTempStartTime( `${ startTime }:00` ) )
|
820 |
);
|
821 |
expect( gen.next().done ).toEqual( true );
|
822 |
} );
|
@@ -832,16 +826,16 @@ describe( 'RSVP block sagas', () => {
|
|
832 |
};
|
833 |
const gen = sagas.handleRSVPStartTimeInput( action );
|
834 |
expect( gen.next().value ).toEqual(
|
835 |
-
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM )
|
836 |
);
|
837 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
838 |
-
call( momentUtil.toMoment, startTimeInput, momentUtil.TIME_FORMAT, false )
|
839 |
);
|
840 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
841 |
-
call( momentUtil.toTime, startTimeInput )
|
842 |
);
|
843 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
844 |
-
put( actions.setRSVPTempStartTimeInput( startTimeInput ) )
|
845 |
);
|
846 |
expect( gen.next().done ).toEqual( true );
|
847 |
} );
|
@@ -857,10 +851,10 @@ describe( 'RSVP block sagas', () => {
|
|
857 |
const endTime = '01:00';
|
858 |
const gen = sagas.handleRSVPEndTime( action );
|
859 |
expect( gen.next().value ).toEqual(
|
860 |
-
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM )
|
861 |
);
|
862 |
expect( gen.next( endTime ).value ).toEqual(
|
863 |
-
put( actions.setRSVPTempEndTime( `${ endTime }:00` ) )
|
864 |
);
|
865 |
expect( gen.next().done ).toEqual( true );
|
866 |
} );
|
@@ -876,16 +870,16 @@ describe( 'RSVP block sagas', () => {
|
|
876 |
};
|
877 |
const gen = sagas.handleRSVPEndTimeInput( action );
|
878 |
expect( gen.next().value ).toEqual(
|
879 |
-
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM )
|
880 |
);
|
881 |
expect( gen.next( endTimeInput ).value ).toEqual(
|
882 |
-
call( momentUtil.toMoment, endTimeInput, momentUtil.TIME_FORMAT, false )
|
883 |
);
|
884 |
expect( gen.next( endTimeInput ).value ).toEqual(
|
885 |
-
call( momentUtil.toTime, endTimeInput )
|
886 |
);
|
887 |
expect( gen.next( endTimeInput ).value ).toEqual(
|
888 |
-
put( actions.setRSVPTempEndTimeInput( endTimeInput ) )
|
889 |
);
|
890 |
expect( gen.next().done ).toEqual( true );
|
891 |
} );
|
@@ -897,14 +891,14 @@ describe( 'RSVP block sagas', () => {
|
|
897 |
const action = {
|
898 |
payload: {
|
899 |
id,
|
900 |
-
}
|
901 |
};
|
902 |
const gen = sagas.fetchRSVPHeaderImage( action );
|
903 |
expect( gen.next().value ).toEqual(
|
904 |
-
put( actions.setRSVPIsSettingsLoading( true ) )
|
905 |
);
|
906 |
expect( gen.next().value ).toEqual(
|
907 |
-
call( api.wpREST, { path: `media/${ id }` } )
|
908 |
);
|
909 |
|
910 |
const apiResponse = {
|
@@ -928,10 +922,10 @@ describe( 'RSVP block sagas', () => {
|
|
928 |
id: apiResponse.data.id,
|
929 |
alt: apiResponse.data.alt_text,
|
930 |
src: apiResponse.data.media_details.sizes.medium.source_url,
|
931 |
-
} ) )
|
932 |
);
|
933 |
expect( gen.next().value ).toEqual(
|
934 |
-
put( actions.setRSVPIsSettingsLoading( false ) )
|
935 |
);
|
936 |
expect( gen.next().done ).toEqual( true );
|
937 |
} );
|
@@ -941,14 +935,14 @@ describe( 'RSVP block sagas', () => {
|
|
941 |
const action = {
|
942 |
payload: {
|
943 |
id,
|
944 |
-
}
|
945 |
};
|
946 |
const gen = sagas.fetchRSVPHeaderImage( action );
|
947 |
expect( gen.next().value ).toEqual(
|
948 |
-
put( actions.setRSVPIsSettingsLoading( true ) )
|
949 |
);
|
950 |
expect( gen.next().value ).toEqual(
|
951 |
-
call( api.wpREST, { path: `media/${ id }` } )
|
952 |
);
|
953 |
|
954 |
const apiResponse = {
|
@@ -958,7 +952,7 @@ describe( 'RSVP block sagas', () => {
|
|
958 |
data: {},
|
959 |
};
|
960 |
expect( gen.next( apiResponse ).value ).toEqual(
|
961 |
-
put( actions.setRSVPIsSettingsLoading( false ) )
|
962 |
);
|
963 |
expect( gen.next().done ).toEqual( true );
|
964 |
} );
|
@@ -983,10 +977,10 @@ describe( 'RSVP block sagas', () => {
|
|
983 |
const gen = sagas.updateRSVPHeaderImage( action );
|
984 |
expect( gen.next().value ).toMatchSnapshot();
|
985 |
expect( gen.next( postId ).value ).toEqual(
|
986 |
-
put( actions.setRSVPIsSettingsLoading( true ) )
|
987 |
);
|
988 |
expect( gen.next().value ).toEqual(
|
989 |
-
put( ticketActions.setTicketsIsSettingsLoading( true ) )
|
990 |
);
|
991 |
expect( gen.next().value ).toEqual(
|
992 |
call( api.wpREST, {
|
@@ -1002,7 +996,7 @@ describe( 'RSVP block sagas', () => {
|
|
1002 |
},
|
1003 |
} ),
|
1004 |
},
|
1005 |
-
} )
|
1006 |
);
|
1007 |
|
1008 |
const apiResponse = {
|
@@ -1016,16 +1010,16 @@ describe( 'RSVP block sagas', () => {
|
|
1016 |
src: action.payload.image.sizes.medium.url,
|
1017 |
};
|
1018 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1019 |
-
put( actions.setRSVPHeaderImage( headerImage ) )
|
1020 |
);
|
1021 |
expect( gen.next().value ).toEqual(
|
1022 |
-
put( ticketActions.setTicketsHeaderImage( headerImage ) )
|
1023 |
);
|
1024 |
expect( gen.next().value ).toEqual(
|
1025 |
-
put( actions.setRSVPIsSettingsLoading( false ) )
|
1026 |
);
|
1027 |
expect( gen.next().value ).toEqual(
|
1028 |
-
put( ticketActions.setTicketsIsSettingsLoading( false ) )
|
1029 |
);
|
1030 |
expect( gen.next().done ).toEqual( true );
|
1031 |
} );
|
@@ -1048,10 +1042,10 @@ describe( 'RSVP block sagas', () => {
|
|
1048 |
const gen = sagas.updateRSVPHeaderImage( action );
|
1049 |
expect( gen.next().value ).toMatchSnapshot();
|
1050 |
expect( gen.next( postId ).value ).toEqual(
|
1051 |
-
put( actions.setRSVPIsSettingsLoading( true ) )
|
1052 |
);
|
1053 |
expect( gen.next().value ).toEqual(
|
1054 |
-
put( ticketActions.setTicketsIsSettingsLoading( true ) )
|
1055 |
);
|
1056 |
expect( gen.next().value ).toEqual(
|
1057 |
call( api.wpREST, {
|
@@ -1067,7 +1061,7 @@ describe( 'RSVP block sagas', () => {
|
|
1067 |
},
|
1068 |
} ),
|
1069 |
},
|
1070 |
-
} )
|
1071 |
);
|
1072 |
|
1073 |
const apiResponse = {
|
@@ -1076,10 +1070,10 @@ describe( 'RSVP block sagas', () => {
|
|
1076 |
},
|
1077 |
};
|
1078 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1079 |
-
put( actions.setRSVPIsSettingsLoading( false ) )
|
1080 |
);
|
1081 |
expect( gen.next().value ).toEqual(
|
1082 |
-
put( ticketActions.setTicketsIsSettingsLoading( false ) )
|
1083 |
);
|
1084 |
expect( gen.next().done ).toEqual( true );
|
1085 |
} );
|
@@ -1091,10 +1085,10 @@ describe( 'RSVP block sagas', () => {
|
|
1091 |
const gen = sagas.deleteRSVPHeaderImage();
|
1092 |
expect( gen.next().value ).toMatchSnapshot();
|
1093 |
expect( gen.next( postId ).value ).toEqual(
|
1094 |
-
put( actions.setRSVPIsSettingsLoading( true ) )
|
1095 |
);
|
1096 |
expect( gen.next().value ).toEqual(
|
1097 |
-
put( ticketActions.setTicketsIsSettingsLoading( true ) )
|
1098 |
);
|
1099 |
expect( gen.next().value ).toEqual(
|
1100 |
call( api.wpREST, {
|
@@ -1110,7 +1104,7 @@ describe( 'RSVP block sagas', () => {
|
|
1110 |
},
|
1111 |
} ),
|
1112 |
},
|
1113 |
-
} )
|
1114 |
);
|
1115 |
|
1116 |
const apiResponse = {
|
@@ -1119,16 +1113,16 @@ describe( 'RSVP block sagas', () => {
|
|
1119 |
},
|
1120 |
};
|
1121 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1122 |
-
put( actions.setRSVPHeaderImage( RSVP_HEADER_IMAGE_DEFAULT_STATE ) )
|
1123 |
);
|
1124 |
expect( gen.next().value ).toEqual(
|
1125 |
-
put( ticketActions.setTicketsHeaderImage( TICKET_HEADER_IMAGE_DEFAULT_STATE ) )
|
1126 |
);
|
1127 |
expect( gen.next().value ).toEqual(
|
1128 |
-
put( actions.setRSVPIsSettingsLoading( false ) )
|
1129 |
);
|
1130 |
expect( gen.next().value ).toEqual(
|
1131 |
-
put( ticketActions.setTicketsIsSettingsLoading( false ) )
|
1132 |
);
|
1133 |
expect( gen.next().done ).toEqual( true );
|
1134 |
} );
|
@@ -1138,10 +1132,10 @@ describe( 'RSVP block sagas', () => {
|
|
1138 |
const gen = sagas.deleteRSVPHeaderImage();
|
1139 |
expect( gen.next().value ).toMatchSnapshot();
|
1140 |
expect( gen.next( postId ).value ).toEqual(
|
1141 |
-
put( actions.setRSVPIsSettingsLoading( true ) )
|
1142 |
);
|
1143 |
expect( gen.next().value ).toEqual(
|
1144 |
-
put( ticketActions.setTicketsIsSettingsLoading( true ) )
|
1145 |
);
|
1146 |
expect( gen.next().value ).toEqual(
|
1147 |
call( api.wpREST, {
|
@@ -1157,7 +1151,7 @@ describe( 'RSVP block sagas', () => {
|
|
1157 |
},
|
1158 |
} ),
|
1159 |
},
|
1160 |
-
} )
|
1161 |
);
|
1162 |
|
1163 |
const apiResponse = {
|
@@ -1166,10 +1160,10 @@ describe( 'RSVP block sagas', () => {
|
|
1166 |
},
|
1167 |
};
|
1168 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1169 |
-
put( actions.setRSVPIsSettingsLoading( false ) )
|
1170 |
);
|
1171 |
expect( gen.next().value ).toEqual(
|
1172 |
-
put( ticketActions.setTicketsIsSettingsLoading( false ) )
|
1173 |
);
|
1174 |
expect( gen.next().done ).toEqual( true );
|
1175 |
} );
|
@@ -1180,19 +1174,19 @@ describe( 'RSVP block sagas', () => {
|
|
1180 |
const gen = sagas.handleRSVPMove();
|
1181 |
|
1182 |
expect( gen.next().value ).toEqual(
|
1183 |
-
select( selectors.getRSVPId )
|
1184 |
);
|
1185 |
expect( gen.next( 1 ).value ).toEqual(
|
1186 |
-
select( moveSelectors.getModalTicketId )
|
1187 |
);
|
1188 |
expect( gen.next( 1 ).value ).toEqual(
|
1189 |
-
select( moveSelectors.getModalClientId )
|
1190 |
);
|
1191 |
expect( gen.next( '111111' ).value ).toEqual(
|
1192 |
-
put( actions.deleteRSVP() )
|
1193 |
);
|
1194 |
expect( gen.next().value ).toEqual(
|
1195 |
-
call( [ wpDispatch( 'core/editor' ), 'removeBlocks' ], [ '111111' ] )
|
1196 |
);
|
1197 |
expect( gen.next().done ).toEqual( true );
|
1198 |
} );
|
@@ -1203,11 +1197,11 @@ describe( 'RSVP block sagas', () => {
|
|
1203 |
const gen = sagas.setNonEventPostTypeEndDate();
|
1204 |
|
1205 |
expect( gen.next().value ).toEqual(
|
1206 |
-
take( [ types.INITIALIZE_RSVP ] )
|
1207 |
);
|
1208 |
|
1209 |
expect( gen.next().value ).toEqual(
|
1210 |
-
call( isTribeEventPostType )
|
1211 |
);
|
1212 |
|
1213 |
expect( gen.next( true ).done ).toEqual( true );
|
@@ -1222,22 +1216,22 @@ describe( 'RSVP block sagas', () => {
|
|
1222 |
};
|
1223 |
|
1224 |
expect( gen.next().value ).toEqual(
|
1225 |
-
take( [ types.INITIALIZE_RSVP ] )
|
1226 |
);
|
1227 |
expect( gen.next().value ).toEqual(
|
1228 |
-
call( isTribeEventPostType )
|
1229 |
);
|
1230 |
expect( gen.next( false ).value ).toEqual(
|
1231 |
-
select( selectors.getRSVPTempEndDateMoment )
|
1232 |
);
|
1233 |
expect( gen.next( momentMock ).value ).toEqual(
|
1234 |
-
call( [ momentMock, 'clone' ] )
|
1235 |
);
|
1236 |
expect( gen.next( momentMock ).value ).toEqual(
|
1237 |
-
call( [ momentMock, 'add' ], 100, 'years' )
|
1238 |
);
|
1239 |
expect( gen.next( momentMock ).value ).toEqual(
|
1240 |
-
call( createDates, momentMock.toDate() )
|
1241 |
);
|
1242 |
expect( gen.next( {
|
1243 |
date: '2018-01-01',
|
7 |
/**
|
8 |
* WordPress dependencies
|
9 |
*/
|
10 |
+
import { dispatch as wpDispatch } from '@wordpress/data';
|
|
|
|
|
|
|
11 |
|
12 |
/**
|
13 |
* Internal Dependencies
|
17 |
import * as selectors from '../selectors';
|
18 |
import watchers, * as sagas from '../sagas';
|
19 |
import {
|
20 |
+
DEFAULT_STATE as RSVP_HEADER_IMAGE_DEFAULT_STATE,
|
21 |
} from '../reducers/header-image';
|
22 |
import * as ticketActions from '@moderntribe/tickets/data/blocks/ticket/actions';
|
23 |
import {
|
24 |
+
DEFAULT_STATE as TICKET_HEADER_IMAGE_DEFAULT_STATE,
|
25 |
} from '@moderntribe/tickets/data/blocks/ticket/reducers/header-image';
|
26 |
import * as utils from '@moderntribe/tickets/data/utils';
|
27 |
import { MOVE_TICKET_SUCCESS } from '@moderntribe/tickets/data/shared/move/types';
|
28 |
import {
|
29 |
api,
|
|
|
30 |
moment as momentUtil,
|
31 |
time as timeUtil,
|
32 |
} from '@moderntribe/common/utils';
|
33 |
import * as moveSelectors from '@moderntribe/tickets/data/shared/move/selectors';
|
34 |
+
import {
|
35 |
+
isTribeEventPostType,
|
36 |
+
createWPEditorSavingChannel,
|
37 |
+
createDates,
|
38 |
+
} from '@moderntribe/tickets/data/shared/sagas';
|
39 |
|
40 |
function mock() {
|
41 |
return {
|
76 |
types.UPDATE_RSVP_HEADER_IMAGE,
|
77 |
types.DELETE_RSVP_HEADER_IMAGE,
|
78 |
MOVE_TICKET_SUCCESS,
|
79 |
+
], sagas.handler ),
|
80 |
);
|
81 |
expect( gen.next().value ).toEqual(
|
82 |
+
fork( sagas.handleEventStartDateChanges ),
|
83 |
);
|
84 |
expect( gen.next().value ).toEqual(
|
85 |
+
fork( sagas.setNonEventPostTypeEndDate ),
|
86 |
);
|
87 |
expect( gen.next().done ).toEqual( true );
|
88 |
} );
|
99 |
action.type = types.SET_RSVP_DETAILS;
|
100 |
const gen = sagas.handler( action );
|
101 |
expect( gen.next().value ).toEqual(
|
102 |
+
call( sagas.setRSVPDetails, action ),
|
103 |
);
|
104 |
expect( gen.next().done ).toEqual( true );
|
105 |
} );
|
108 |
action.type = types.SET_RSVP_TEMP_DETAILS;
|
109 |
const gen = sagas.handler( action );
|
110 |
expect( gen.next().value ).toEqual(
|
111 |
+
call( sagas.setRSVPTempDetails, action ),
|
112 |
);
|
113 |
expect( gen.next().done ).toEqual( true );
|
114 |
} );
|
117 |
action.type = types.INITIALIZE_RSVP;
|
118 |
const gen = sagas.handler( action );
|
119 |
expect( gen.next().value ).toEqual(
|
120 |
+
call( sagas.initializeRSVP ),
|
121 |
);
|
122 |
expect( gen.next().done ).toEqual( true );
|
123 |
} );
|
126 |
action.type = types.HANDLE_RSVP_START_DATE;
|
127 |
const gen = sagas.handler( action );
|
128 |
expect( gen.next().value ).toEqual(
|
129 |
+
call( sagas.handleRSVPStartDate, action ),
|
130 |
);
|
131 |
expect( gen.next().value ).toEqual(
|
132 |
+
call( sagas.handleRSVPDurationError ),
|
133 |
);
|
134 |
expect( gen.next().value ).toEqual(
|
135 |
+
put( actions.setRSVPHasChanges( true ) ),
|
136 |
);
|
137 |
expect( gen.next().done ).toEqual( true );
|
138 |
} );
|
141 |
action.type = types.HANDLE_RSVP_END_DATE;
|
142 |
const gen = sagas.handler( action );
|
143 |
expect( gen.next().value ).toEqual(
|
144 |
+
call( sagas.handleRSVPEndDate, action ),
|
145 |
);
|
146 |
expect( gen.next().value ).toEqual(
|
147 |
+
call( sagas.handleRSVPDurationError ),
|
148 |
);
|
149 |
expect( gen.next().value ).toEqual(
|
150 |
+
put( actions.setRSVPHasChanges( true ) ),
|
151 |
);
|
152 |
expect( gen.next().done ).toEqual( true );
|
153 |
} );
|
156 |
action.type = types.HANDLE_RSVP_START_TIME;
|
157 |
const gen = sagas.handler( action );
|
158 |
expect( gen.next().value ).toEqual(
|
159 |
+
call( sagas.handleRSVPStartTime, action ),
|
160 |
);
|
161 |
expect( gen.next().value ).toEqual(
|
162 |
+
call( sagas.handleRSVPStartTimeInput, action ),
|
163 |
);
|
164 |
expect( gen.next().value ).toEqual(
|
165 |
+
call( sagas.handleRSVPDurationError ),
|
166 |
);
|
167 |
expect( gen.next().value ).toEqual(
|
168 |
+
put( actions.setRSVPHasChanges( true ) ),
|
169 |
);
|
170 |
expect( gen.next().done ).toEqual( true );
|
171 |
} );
|
174 |
action.type = types.HANDLE_RSVP_END_TIME;
|
175 |
const gen = sagas.handler( action );
|
176 |
expect( gen.next().value ).toEqual(
|
177 |
+
call( sagas.handleRSVPEndTime, action ),
|
178 |
);
|
179 |
expect( gen.next().value ).toEqual(
|
180 |
+
call( sagas.handleRSVPEndTimeInput, action ),
|
181 |
);
|
182 |
expect( gen.next().value ).toEqual(
|
183 |
+
call( sagas.handleRSVPDurationError ),
|
184 |
);
|
185 |
expect( gen.next().value ).toEqual(
|
186 |
+
put( actions.setRSVPHasChanges( true ) ),
|
187 |
);
|
188 |
expect( gen.next().done ).toEqual( true );
|
189 |
} );
|
192 |
action.type = types.FETCH_RSVP_HEADER_IMAGE;
|
193 |
const gen = sagas.handler( action );
|
194 |
expect( gen.next().value ).toEqual(
|
195 |
+
call( sagas.fetchRSVPHeaderImage, action ),
|
196 |
);
|
197 |
expect( gen.next().done ).toEqual( true );
|
198 |
} );
|
201 |
action.type = types.UPDATE_RSVP_HEADER_IMAGE;
|
202 |
const gen = sagas.handler( action );
|
203 |
expect( gen.next().value ).toEqual(
|
204 |
+
call( sagas.updateRSVPHeaderImage, action ),
|
205 |
);
|
206 |
expect( gen.next().done ).toEqual( true );
|
207 |
} );
|
210 |
action.type = types.DELETE_RSVP_HEADER_IMAGE;
|
211 |
const gen = sagas.handler( action );
|
212 |
expect( gen.next().value ).toEqual(
|
213 |
+
call( sagas.deleteRSVPHeaderImage ),
|
214 |
);
|
215 |
expect( gen.next().done ).toEqual( true );
|
216 |
} );
|
219 |
action.type = MOVE_TICKET_SUCCESS;
|
220 |
const gen = sagas.handler( action );
|
221 |
expect( gen.next().value ).toEqual(
|
222 |
+
call( sagas.handleRSVPMove ),
|
223 |
);
|
224 |
expect( gen.next().done ).toEqual( true );
|
225 |
} );
|
264 |
put( actions.setRSVPEndTime( '23:32' ) ),
|
265 |
put( actions.setRSVPStartTimeInput( '12:34 pm' ) ),
|
266 |
put( actions.setRSVPEndTimeInput( '11:32 pm' ) ),
|
267 |
+
] ),
|
268 |
);
|
269 |
expect( gen.next().done ).toEqual( true );
|
270 |
} );
|
309 |
put( actions.setRSVPTempEndTime( '23:32' ) ),
|
310 |
put( actions.setRSVPTempStartTimeInput( '12:34 pm' ) ),
|
311 |
put( actions.setRSVPTempEndTimeInput( '11:32 pm' ) ),
|
312 |
+
] ),
|
313 |
);
|
314 |
expect( gen.next().done ).toEqual( true );
|
315 |
} );
|
367 |
put( actions.setRSVPTempStartDateMoment( state.startDate ) ),
|
368 |
put( actions.setRSVPTempStartTime( state.startTime ) ),
|
369 |
put( actions.setRSVPTempStartTimeInput( state.startTime ) ),
|
370 |
+
] ),
|
371 |
);
|
372 |
expect( gen.next().value ).toEqual(
|
373 |
+
call( isTribeEventPostType ),
|
374 |
);
|
375 |
expect( gen.next( true ).value ).toEqual(
|
376 |
+
select( global.tribe.events.data.blocks.datetime.selectors.getStart ),
|
377 |
);
|
378 |
expect( gen.next( state.endDate ).value ).toMatchSnapshot();
|
379 |
expect( gen.next( {
|
394 |
put( actions.setRSVPTempEndDateMoment( state.endDate ) ),
|
395 |
put( actions.setRSVPTempEndTime( state.endTime ) ),
|
396 |
put( actions.setRSVPTempEndTimeInput( state.endTime ) ),
|
397 |
+
] ),
|
398 |
);
|
399 |
expect( gen.next().value ).toEqual(
|
400 |
+
call( sagas.handleRSVPDurationError ),
|
401 |
);
|
402 |
expect( gen.next().done ).toEqual( true );
|
403 |
} );
|
404 |
} );
|
405 |
|
406 |
describe( 'syncRSVPSaleEndWithEventStart', () => {
|
407 |
+
let prevDate, momentMock;
|
408 |
beforeEach( () => {
|
409 |
prevDate = '2018-01-01 00:00:00';
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
global.tribe = {
|
411 |
events: {
|
412 |
data: {
|
434 |
it( 'should not sync', () => {
|
435 |
const gen = sagas.syncRSVPSaleEndWithEventStart( prevDate );
|
436 |
expect( gen.next().value ).toEqual(
|
437 |
+
select( selectors.getRSVPTempEndDateMoment ),
|
438 |
);
|
439 |
expect( gen.next( momentMock ).value ).toEqual(
|
440 |
+
select( selectors.getRSVPEndDateMoment ),
|
441 |
);
|
442 |
expect( gen.next( momentMock ).value ).toEqual(
|
443 |
+
call( createDates, prevDate ),
|
444 |
);
|
445 |
expect( gen.next( { moment: momentMock } ).value ).toMatchSnapshot();
|
446 |
expect( gen.next( false ).value ).toMatchSnapshot();
|
451 |
it( 'should sync', () => {
|
452 |
const gen = sagas.syncRSVPSaleEndWithEventStart( prevDate );
|
453 |
expect( gen.next().value ).toEqual(
|
454 |
+
select( selectors.getRSVPTempEndDateMoment ),
|
455 |
);
|
456 |
expect( gen.next( momentMock ).value ).toEqual(
|
457 |
+
select( selectors.getRSVPEndDateMoment ),
|
458 |
);
|
459 |
expect( gen.next( momentMock ).value ).toEqual(
|
460 |
+
call( createDates, prevDate ),
|
461 |
);
|
462 |
expect( gen.next( { moment: momentMock } ).value ).toMatchSnapshot();
|
463 |
expect( gen.next( true ).value ).toMatchSnapshot();
|
464 |
expect( gen.next( true ).value ).toMatchSnapshot();
|
465 |
|
466 |
expect( gen.next( true ).value ).toEqual(
|
467 |
+
select( global.tribe.events.data.blocks.datetime.selectors.getStart ),
|
468 |
);
|
469 |
expect( gen.next( '2018-02-02 02:00:00' ).value ).toEqual(
|
470 |
+
call( createDates, '2018-02-02 02:00:00' ),
|
471 |
);
|
472 |
|
473 |
expect( gen.next( {
|
479 |
} ).value ).toMatchSnapshot();
|
480 |
|
481 |
expect( gen.next().value ).toEqual(
|
482 |
+
fork( sagas.saveRSVPWithPostSave ),
|
483 |
);
|
484 |
} );
|
485 |
} );
|
488 |
it( 'should set has duration error to true if start or end moment is invalid', () => {
|
489 |
const gen = sagas.handleRSVPDurationError();
|
490 |
expect( gen.next().value ).toEqual(
|
491 |
+
select( selectors.getRSVPTempStartDateMoment ),
|
492 |
);
|
493 |
expect( gen.next( undefined ).value ).toEqual(
|
494 |
+
select( selectors.getRSVPTempEndDateMoment ),
|
495 |
);
|
496 |
expect( gen.next( undefined ).value ).toEqual(
|
497 |
+
put( actions.setRSVPHasDurationError( true ) ),
|
498 |
);
|
499 |
expect( gen.next().done ).toEqual( true );
|
500 |
} );
|
514 |
const END_TIME_SECONDS = 46800;
|
515 |
const gen = sagas.handleRSVPDurationError();
|
516 |
expect( gen.next().value ).toEqual(
|
517 |
+
select( selectors.getRSVPTempStartDateMoment ),
|
518 |
);
|
519 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
520 |
+
select( selectors.getRSVPTempEndDateMoment ),
|
521 |
);
|
522 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
523 |
+
select( selectors.getRSVPTempStartTime ),
|
524 |
);
|
525 |
expect( gen.next( START_TIME ).value ).toEqual(
|
526 |
+
select( selectors.getRSVPTempEndTime ),
|
527 |
);
|
528 |
expect( gen.next( END_TIME ).value ).toEqual(
|
529 |
+
call( timeUtil.toSeconds, START_TIME, timeUtil.TIME_FORMAT_HH_MM_SS ),
|
530 |
);
|
531 |
expect( gen.next( START_TIME_SECONDS ).value ).toEqual(
|
532 |
+
call( timeUtil.toSeconds, END_TIME, timeUtil.TIME_FORMAT_HH_MM_SS ),
|
533 |
);
|
534 |
expect( gen.next( END_TIME_SECONDS ).value ).toEqual(
|
535 |
+
call( momentUtil.setTimeInSeconds, START_DATE_MOMENT.clone(), START_TIME_SECONDS ),
|
536 |
);
|
537 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
538 |
+
call( momentUtil.setTimeInSeconds, END_DATE_MOMENT.clone(), END_TIME_SECONDS ),
|
539 |
);
|
540 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
541 |
+
call( [ START_DATE_MOMENT, 'isSameOrAfter' ], END_DATE_MOMENT ),
|
542 |
);
|
543 |
expect( gen.next( true ).value ).toEqual(
|
544 |
+
put( actions.setRSVPHasDurationError( true ) ),
|
545 |
);
|
546 |
expect( gen.next().done ).toEqual( true );
|
547 |
} );
|
548 |
|
549 |
+
it( 'should set thas duration error to false if start date time is before end date time', () => { // eslint-disable-line max-len
|
550 |
const START_DATE_MOMENT = {
|
551 |
clone: () => {},
|
552 |
isSameOrAfter: () => {},
|
561 |
const END_TIME_SECONDS = 46800;
|
562 |
const gen = sagas.handleRSVPDurationError();
|
563 |
expect( gen.next().value ).toEqual(
|
564 |
+
select( selectors.getRSVPTempStartDateMoment ),
|
565 |
);
|
566 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
567 |
+
select( selectors.getRSVPTempEndDateMoment ),
|
568 |
);
|
569 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
570 |
+
select( selectors.getRSVPTempStartTime ),
|
571 |
);
|
572 |
expect( gen.next( START_TIME ).value ).toEqual(
|
573 |
+
select( selectors.getRSVPTempEndTime ),
|
574 |
);
|
575 |
expect( gen.next( END_TIME ).value ).toEqual(
|
576 |
+
call( timeUtil.toSeconds, START_TIME, timeUtil.TIME_FORMAT_HH_MM_SS ),
|
577 |
);
|
578 |
expect( gen.next( START_TIME_SECONDS ).value ).toEqual(
|
579 |
+
call( timeUtil.toSeconds, END_TIME, timeUtil.TIME_FORMAT_HH_MM_SS ),
|
580 |
);
|
581 |
expect( gen.next( END_TIME_SECONDS ).value ).toEqual(
|
582 |
+
call( momentUtil.setTimeInSeconds, START_DATE_MOMENT.clone(), START_TIME_SECONDS ),
|
583 |
);
|
584 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
585 |
+
call( momentUtil.setTimeInSeconds, END_DATE_MOMENT.clone(), END_TIME_SECONDS ),
|
586 |
);
|
587 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
588 |
+
call( [ START_DATE_MOMENT, 'isSameOrAfter' ], END_DATE_MOMENT ),
|
589 |
);
|
590 |
expect( gen.next( false ).value ).toEqual(
|
591 |
+
put( actions.setRSVPHasDurationError( false ) ),
|
592 |
);
|
593 |
expect( gen.next().done ).toEqual( true );
|
594 |
} );
|
615 |
expect( gen.next().value ).toEqual( undefined );
|
616 |
expect( gen.next( undefined ).value ).toEqual( '' );
|
617 |
expect( gen.next( '' ).value ).toEqual(
|
618 |
+
put( actions.setRSVPTempStartDate( '' ) ),
|
619 |
);
|
620 |
expect( gen.next().value ).toEqual(
|
621 |
+
put( actions.setRSVPTempStartDateInput( action.payload.dayPickerInput.state.value ) ),
|
622 |
);
|
623 |
expect( gen.next().value ).toEqual(
|
624 |
+
put( actions.setRSVPTempStartDateMoment( undefined ) ),
|
625 |
);
|
626 |
expect( gen.next().done ).toEqual( true );
|
627 |
} );
|
631 |
action.payload.dayPickerInput.state.value = 'January 1, 2018';
|
632 |
const gen = sagas.handleRSVPStartDate( action );
|
633 |
expect( gen.next().value ).toEqual(
|
634 |
+
call( momentUtil.toMoment, action.payload.date ),
|
635 |
);
|
636 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
637 |
+
call( momentUtil.toDatabaseDate, action.payload.date ),
|
638 |
);
|
639 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
640 |
+
put( actions.setRSVPTempStartDate( action.payload.date ) ),
|
641 |
);
|
642 |
expect( gen.next().value ).toEqual(
|
643 |
+
put( actions.setRSVPTempStartDateInput( action.payload.dayPickerInput.state.value ) ),
|
644 |
);
|
645 |
expect( gen.next().value ).toEqual(
|
646 |
+
put( actions.setRSVPTempStartDateMoment( action.payload.date ) ),
|
647 |
);
|
648 |
expect( gen.next().done ).toEqual( true );
|
649 |
} );
|
660 |
const gen = sagas.saveRSVPWithPostSave();
|
661 |
|
662 |
expect( gen.next().value ).toEqual(
|
663 |
+
select( selectors.getRSVPCreated ),
|
664 |
);
|
665 |
|
666 |
expect( gen.next( true ).value ).toEqual(
|
667 |
+
call( createWPEditorSavingChannel ),
|
668 |
);
|
669 |
|
670 |
expect( gen.next( channel ).value ).toEqual(
|
671 |
+
take( channel ),
|
672 |
);
|
673 |
expect( gen.next( true ).value ).toMatchSnapshot();
|
674 |
expect( gen.next( {} ).value ).toMatchSnapshot();
|
675 |
|
676 |
expect( gen.next().value ).toEqual(
|
677 |
+
call( [ channel, 'close' ] ),
|
678 |
);
|
679 |
|
680 |
expect( gen.next().done ).toEqual( true );
|
683 |
const gen = sagas.saveRSVPWithPostSave();
|
684 |
|
685 |
expect( gen.next().value ).toEqual(
|
686 |
+
select( selectors.getRSVPCreated ),
|
687 |
);
|
688 |
|
689 |
expect( gen.next( false ).done ).toEqual( true );
|
719 |
const gen = sagas.handleEventStartDateChanges();
|
720 |
|
721 |
expect( gen.next( true ).value ).toEqual(
|
722 |
+
take( [ types.INITIALIZE_RSVP, types.SET_RSVP_DETAILS ] ),
|
723 |
);
|
724 |
|
725 |
expect( gen.next().value ).toEqual(
|
726 |
+
call( isTribeEventPostType ),
|
727 |
);
|
728 |
|
729 |
expect( gen.next( true ).value ).toEqual(
|
730 |
+
select( global.tribe.events.data.blocks.datetime.selectors.getStart ),
|
731 |
);
|
732 |
|
733 |
expect( gen.next( '2018-01-01 12:00:00' ).value ).toEqual(
|
734 |
+
take( [ 'SET_START_DATE_TIME', 'SET_START_TIME' ] ),
|
735 |
);
|
736 |
|
737 |
expect( gen.next().value ).toEqual(
|
738 |
+
fork( sagas.syncRSVPSaleEndWithEventStart, '2018-01-01 12:00:00' ),
|
739 |
);
|
740 |
|
741 |
expect( gen.next().done ).toEqual( false );
|
763 |
expect( gen.next().value ).toEqual( undefined );
|
764 |
expect( gen.next( undefined ).value ).toEqual( '' );
|
765 |
expect( gen.next( '' ).value ).toEqual(
|
766 |
+
put( actions.setRSVPTempEndDate( '' ) ),
|
767 |
);
|
768 |
expect( gen.next().value ).toEqual(
|
769 |
+
put( actions.setRSVPTempEndDateInput( action.payload.dayPickerInput.state.value ) ),
|
770 |
);
|
771 |
expect( gen.next().value ).toEqual(
|
772 |
+
put( actions.setRSVPTempEndDateMoment( undefined ) ),
|
773 |
);
|
774 |
expect( gen.next().done ).toEqual( true );
|
775 |
} );
|
779 |
action.payload.dayPickerInput.state.value = 'January 1, 2018';
|
780 |
const gen = sagas.handleRSVPEndDate( action );
|
781 |
expect( gen.next().value ).toEqual(
|
782 |
+
call( momentUtil.toMoment, action.payload.date ),
|
783 |
);
|
784 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
785 |
+
call( momentUtil.toDatabaseDate, action.payload.date ),
|
786 |
);
|
787 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
788 |
+
put( actions.setRSVPTempEndDate( action.payload.date ) ),
|
789 |
);
|
790 |
expect( gen.next().value ).toEqual(
|
791 |
+
put( actions.setRSVPTempEndDateInput( action.payload.dayPickerInput.state.value ) ),
|
792 |
);
|
793 |
expect( gen.next().value ).toEqual(
|
794 |
+
put( actions.setRSVPTempEndDateMoment( action.payload.date ) ),
|
795 |
);
|
796 |
expect( gen.next().done ).toEqual( true );
|
797 |
} );
|
807 |
const startTime = '01:00';
|
808 |
const gen = sagas.handleRSVPStartTime( action );
|
809 |
expect( gen.next().value ).toEqual(
|
810 |
+
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM ),
|
811 |
);
|
812 |
expect( gen.next( startTime ).value ).toEqual(
|
813 |
+
put( actions.setRSVPTempStartTime( `${ startTime }:00` ) ),
|
814 |
);
|
815 |
expect( gen.next().done ).toEqual( true );
|
816 |
} );
|
826 |
};
|
827 |
const gen = sagas.handleRSVPStartTimeInput( action );
|
828 |
expect( gen.next().value ).toEqual(
|
829 |
+
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM ),
|
830 |
);
|
831 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
832 |
+
call( momentUtil.toMoment, startTimeInput, momentUtil.TIME_FORMAT, false ),
|
833 |
);
|
834 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
835 |
+
call( momentUtil.toTime, startTimeInput ),
|
836 |
);
|
837 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
838 |
+
put( actions.setRSVPTempStartTimeInput( startTimeInput ) ),
|
839 |
);
|
840 |
expect( gen.next().done ).toEqual( true );
|
841 |
} );
|
851 |
const endTime = '01:00';
|
852 |
const gen = sagas.handleRSVPEndTime( action );
|
853 |
expect( gen.next().value ).toEqual(
|
854 |
+
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM ),
|
855 |
);
|
856 |
expect( gen.next( endTime ).value ).toEqual(
|
857 |
+
put( actions.setRSVPTempEndTime( `${ endTime }:00` ) ),
|
858 |
);
|
859 |
expect( gen.next().done ).toEqual( true );
|
860 |
} );
|
870 |
};
|
871 |
const gen = sagas.handleRSVPEndTimeInput( action );
|
872 |
expect( gen.next().value ).toEqual(
|
873 |
+
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM ),
|
874 |
);
|
875 |
expect( gen.next( endTimeInput ).value ).toEqual(
|
876 |
+
call( momentUtil.toMoment, endTimeInput, momentUtil.TIME_FORMAT, false ),
|
877 |
);
|
878 |
expect( gen.next( endTimeInput ).value ).toEqual(
|
879 |
+
call( momentUtil.toTime, endTimeInput ),
|
880 |
);
|
881 |
expect( gen.next( endTimeInput ).value ).toEqual(
|
882 |
+
put( actions.setRSVPTempEndTimeInput( endTimeInput ) ),
|
883 |
);
|
884 |
expect( gen.next().done ).toEqual( true );
|
885 |
} );
|
891 |
const action = {
|
892 |
payload: {
|
893 |
id,
|
894 |
+
},
|
895 |
};
|
896 |
const gen = sagas.fetchRSVPHeaderImage( action );
|
897 |
expect( gen.next().value ).toEqual(
|
898 |
+
put( actions.setRSVPIsSettingsLoading( true ) ),
|
899 |
);
|
900 |
expect( gen.next().value ).toEqual(
|
901 |
+
call( api.wpREST, { path: `media/${ id }` } ),
|
902 |
);
|
903 |
|
904 |
const apiResponse = {
|
922 |
id: apiResponse.data.id,
|
923 |
alt: apiResponse.data.alt_text,
|
924 |
src: apiResponse.data.media_details.sizes.medium.source_url,
|
925 |
+
} ) ),
|
926 |
);
|
927 |
expect( gen.next().value ).toEqual(
|
928 |
+
put( actions.setRSVPIsSettingsLoading( false ) ),
|
929 |
);
|
930 |
expect( gen.next().done ).toEqual( true );
|
931 |
} );
|
935 |
const action = {
|
936 |
payload: {
|
937 |
id,
|
938 |
+
},
|
939 |
};
|
940 |
const gen = sagas.fetchRSVPHeaderImage( action );
|
941 |
expect( gen.next().value ).toEqual(
|
942 |
+
put( actions.setRSVPIsSettingsLoading( true ) ),
|
943 |
);
|
944 |
expect( gen.next().value ).toEqual(
|
945 |
+
call( api.wpREST, { path: `media/${ id }` } ),
|
946 |
);
|
947 |
|
948 |
const apiResponse = {
|
952 |
data: {},
|
953 |
};
|
954 |
expect( gen.next( apiResponse ).value ).toEqual(
|
955 |
+
put( actions.setRSVPIsSettingsLoading( false ) ),
|
956 |
);
|
957 |
expect( gen.next().done ).toEqual( true );
|
958 |
} );
|
977 |
const gen = sagas.updateRSVPHeaderImage( action );
|
978 |
expect( gen.next().value ).toMatchSnapshot();
|
979 |
expect( gen.next( postId ).value ).toEqual(
|
980 |
+
put( actions.setRSVPIsSettingsLoading( true ) ),
|
981 |
);
|
982 |
expect( gen.next().value ).toEqual(
|
983 |
+
put( ticketActions.setTicketsIsSettingsLoading( true ) ),
|
984 |
);
|
985 |
expect( gen.next().value ).toEqual(
|
986 |
call( api.wpREST, {
|
996 |
},
|
997 |
} ),
|
998 |
},
|
999 |
+
} ),
|
1000 |
);
|
1001 |
|
1002 |
const apiResponse = {
|
1010 |
src: action.payload.image.sizes.medium.url,
|
1011 |
};
|
1012 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1013 |
+
put( actions.setRSVPHeaderImage( headerImage ) ),
|
1014 |
);
|
1015 |
expect( gen.next().value ).toEqual(
|
1016 |
+
put( ticketActions.setTicketsHeaderImage( headerImage ) ),
|
1017 |
);
|
1018 |
expect( gen.next().value ).toEqual(
|
1019 |
+
put( actions.setRSVPIsSettingsLoading( false ) ),
|
1020 |
);
|
1021 |
expect( gen.next().value ).toEqual(
|
1022 |
+
put( ticketActions.setTicketsIsSettingsLoading( false ) ),
|
1023 |
);
|
1024 |
expect( gen.next().done ).toEqual( true );
|
1025 |
} );
|
1042 |
const gen = sagas.updateRSVPHeaderImage( action );
|
1043 |
expect( gen.next().value ).toMatchSnapshot();
|
1044 |
expect( gen.next( postId ).value ).toEqual(
|
1045 |
+
put( actions.setRSVPIsSettingsLoading( true ) ),
|
1046 |
);
|
1047 |
expect( gen.next().value ).toEqual(
|
1048 |
+
put( ticketActions.setTicketsIsSettingsLoading( true ) ),
|
1049 |
);
|
1050 |
expect( gen.next().value ).toEqual(
|
1051 |
call( api.wpREST, {
|
1061 |
},
|
1062 |
} ),
|
1063 |
},
|
1064 |
+
} ),
|
1065 |
);
|
1066 |
|
1067 |
const apiResponse = {
|
1070 |
},
|
1071 |
};
|
1072 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1073 |
+
put( actions.setRSVPIsSettingsLoading( false ) ),
|
1074 |
);
|
1075 |
expect( gen.next().value ).toEqual(
|
1076 |
+
put( ticketActions.setTicketsIsSettingsLoading( false ) ),
|
1077 |
);
|
1078 |
expect( gen.next().done ).toEqual( true );
|
1079 |
} );
|
1085 |
const gen = sagas.deleteRSVPHeaderImage();
|
1086 |
expect( gen.next().value ).toMatchSnapshot();
|
1087 |
expect( gen.next( postId ).value ).toEqual(
|
1088 |
+
put( actions.setRSVPIsSettingsLoading( true ) ),
|
1089 |
);
|
1090 |
expect( gen.next().value ).toEqual(
|
1091 |
+
put( ticketActions.setTicketsIsSettingsLoading( true ) ),
|
1092 |
);
|
1093 |
expect( gen.next().value ).toEqual(
|
1094 |
call( api.wpREST, {
|
1104 |
},
|
1105 |
} ),
|
1106 |
},
|
1107 |
+
} ),
|
1108 |
);
|
1109 |
|
1110 |
const apiResponse = {
|
1113 |
},
|
1114 |
};
|
1115 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1116 |
+
put( actions.setRSVPHeaderImage( RSVP_HEADER_IMAGE_DEFAULT_STATE ) ),
|
1117 |
);
|
1118 |
expect( gen.next().value ).toEqual(
|
1119 |
+
put( ticketActions.setTicketsHeaderImage( TICKET_HEADER_IMAGE_DEFAULT_STATE ) ),
|
1120 |
);
|
1121 |
expect( gen.next().value ).toEqual(
|
1122 |
+
put( actions.setRSVPIsSettingsLoading( false ) ),
|
1123 |
);
|
1124 |
expect( gen.next().value ).toEqual(
|
1125 |
+
put( ticketActions.setTicketsIsSettingsLoading( false ) ),
|
1126 |
);
|
1127 |
expect( gen.next().done ).toEqual( true );
|
1128 |
} );
|
1132 |
const gen = sagas.deleteRSVPHeaderImage();
|
1133 |
expect( gen.next().value ).toMatchSnapshot();
|
1134 |
expect( gen.next( postId ).value ).toEqual(
|
1135 |
+
put( actions.setRSVPIsSettingsLoading( true ) ),
|
1136 |
);
|
1137 |
expect( gen.next().value ).toEqual(
|
1138 |
+
put( ticketActions.setTicketsIsSettingsLoading( true ) ),
|
1139 |
);
|
1140 |
expect( gen.next().value ).toEqual(
|
1141 |
call( api.wpREST, {
|
1151 |
},
|
1152 |
} ),
|
1153 |
},
|
1154 |
+
} ),
|
1155 |
);
|
1156 |
|
1157 |
const apiResponse = {
|
1160 |
},
|
1161 |
};
|
1162 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1163 |
+
put( actions.setRSVPIsSettingsLoading( false ) ),
|
1164 |
);
|
1165 |
expect( gen.next().value ).toEqual(
|
1166 |
+
put( ticketActions.setTicketsIsSettingsLoading( false ) ),
|
1167 |
);
|
1168 |
expect( gen.next().done ).toEqual( true );
|
1169 |
} );
|
1174 |
const gen = sagas.handleRSVPMove();
|
1175 |
|
1176 |
expect( gen.next().value ).toEqual(
|
1177 |
+
select( selectors.getRSVPId ),
|
1178 |
);
|
1179 |
expect( gen.next( 1 ).value ).toEqual(
|
1180 |
+
select( moveSelectors.getModalTicketId ),
|
1181 |
);
|
1182 |
expect( gen.next( 1 ).value ).toEqual(
|
1183 |
+
select( moveSelectors.getModalClientId ),
|
1184 |
);
|
1185 |
expect( gen.next( '111111' ).value ).toEqual(
|
1186 |
+
put( actions.deleteRSVP() ),
|
1187 |
);
|
1188 |
expect( gen.next().value ).toEqual(
|
1189 |
+
call( [ wpDispatch( 'core/editor' ), 'removeBlocks' ], [ '111111' ] ),
|
1190 |
);
|
1191 |
expect( gen.next().done ).toEqual( true );
|
1192 |
} );
|
1197 |
const gen = sagas.setNonEventPostTypeEndDate();
|
1198 |
|
1199 |
expect( gen.next().value ).toEqual(
|
1200 |
+
take( [ types.INITIALIZE_RSVP ] ),
|
1201 |
);
|
1202 |
|
1203 |
expect( gen.next().value ).toEqual(
|
1204 |
+
call( isTribeEventPostType ),
|
1205 |
);
|
1206 |
|
1207 |
expect( gen.next( true ).done ).toEqual( true );
|
1216 |
};
|
1217 |
|
1218 |
expect( gen.next().value ).toEqual(
|
1219 |
+
take( [ types.INITIALIZE_RSVP ] ),
|
1220 |
);
|
1221 |
expect( gen.next().value ).toEqual(
|
1222 |
+
call( isTribeEventPostType ),
|
1223 |
);
|
1224 |
expect( gen.next( false ).value ).toEqual(
|
1225 |
+
select( selectors.getRSVPTempEndDateMoment ),
|
1226 |
);
|
1227 |
expect( gen.next( momentMock ).value ).toEqual(
|
1228 |
+
call( [ momentMock, 'clone' ] ),
|
1229 |
);
|
1230 |
expect( gen.next( momentMock ).value ).toEqual(
|
1231 |
+
call( [ momentMock, 'add' ], 100, 'years' ),
|
1232 |
);
|
1233 |
expect( gen.next( momentMock ).value ).toEqual(
|
1234 |
+
call( createDates, momentMock.toDate() ),
|
1235 |
);
|
1236 |
expect( gen.next( {
|
1237 |
date: '2018-01-01',
|
src/modules/data/blocks/rsvp/__tests__/selectors.test.js
CHANGED
@@ -9,7 +9,7 @@ const state = {
|
|
9 |
blocks: {
|
10 |
rsvp: DEFAULT_STATE,
|
11 |
},
|
12 |
-
}
|
13 |
};
|
14 |
|
15 |
describe( 'RSVP block selectors', () => {
|
9 |
blocks: {
|
10 |
rsvp: DEFAULT_STATE,
|
11 |
},
|
12 |
+
},
|
13 |
};
|
14 |
|
15 |
describe( 'RSVP block selectors', () => {
|
src/modules/data/blocks/rsvp/reducers/__tests__/details.test.js
CHANGED
@@ -19,7 +19,8 @@ describe( 'Details reducer', () => {
|
|
19 |
} );
|
20 |
|
21 |
it( 'should set the description', () => {
|
22 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPDescription( 'new description' ) ) )
|
|
|
23 |
} );
|
24 |
|
25 |
it( 'should set the capacity', () => {
|
@@ -31,11 +32,13 @@ describe( 'Details reducer', () => {
|
|
31 |
} );
|
32 |
|
33 |
it( 'should set the start date', () => {
|
34 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPStartDate( 'January 1, 2018' ) ) )
|
|
|
35 |
} );
|
36 |
|
37 |
it( 'should set the start date input', () => {
|
38 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPStartDateInput( 'January 1, 2018' ) ) )
|
|
|
39 |
} );
|
40 |
|
41 |
it( 'should set the start date moment', () => {
|
@@ -46,11 +49,13 @@ describe( 'Details reducer', () => {
|
|
46 |
} );
|
47 |
|
48 |
it( 'should set the end date', () => {
|
49 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPEndDate( 'January 1, 2018' ) ) )
|
|
|
50 |
} );
|
51 |
|
52 |
it( 'should set the end date input', () => {
|
53 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPEndDateInput( 'January 1, 2018' ) ) )
|
|
|
54 |
} );
|
55 |
|
56 |
it( 'should set the end date moment', () => {
|
19 |
} );
|
20 |
|
21 |
it( 'should set the description', () => {
|
22 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPDescription( 'new description' ) ) )
|
23 |
+
.toMatchSnapshot();
|
24 |
} );
|
25 |
|
26 |
it( 'should set the capacity', () => {
|
32 |
} );
|
33 |
|
34 |
it( 'should set the start date', () => {
|
35 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPStartDate( 'January 1, 2018' ) ) )
|
36 |
+
.toMatchSnapshot();
|
37 |
} );
|
38 |
|
39 |
it( 'should set the start date input', () => {
|
40 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPStartDateInput( 'January 1, 2018' ) ) )
|
41 |
+
.toMatchSnapshot();
|
42 |
} );
|
43 |
|
44 |
it( 'should set the start date moment', () => {
|
49 |
} );
|
50 |
|
51 |
it( 'should set the end date', () => {
|
52 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPEndDate( 'January 1, 2018' ) ) )
|
53 |
+
.toMatchSnapshot();
|
54 |
} );
|
55 |
|
56 |
it( 'should set the end date input', () => {
|
57 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPEndDateInput( 'January 1, 2018' ) ) )
|
58 |
+
.toMatchSnapshot();
|
59 |
} );
|
60 |
|
61 |
it( 'should set the end date moment', () => {
|
src/modules/data/blocks/rsvp/reducers/__tests__/header-image.test.js
CHANGED
@@ -2,7 +2,9 @@
|
|
2 |
* Internal dependencies
|
3 |
*/
|
4 |
import { actions } from '@moderntribe/tickets/data/blocks/rsvp';
|
5 |
-
import reducer, {
|
|
|
|
|
6 |
|
7 |
describe( 'Header image reducer', () => {
|
8 |
it( 'should set the default state', () => {
|
2 |
* Internal dependencies
|
3 |
*/
|
4 |
import { actions } from '@moderntribe/tickets/data/blocks/rsvp';
|
5 |
+
import reducer, {
|
6 |
+
DEFAULT_STATE,
|
7 |
+
} from '@moderntribe/tickets/data/blocks/rsvp/reducers/header-image';
|
8 |
|
9 |
describe( 'Header image reducer', () => {
|
10 |
it( 'should set the default state', () => {
|
src/modules/data/blocks/rsvp/reducers/__tests__/temp-details.test.js
CHANGED
@@ -5,7 +5,6 @@ import { actions } from '@moderntribe/tickets/data/blocks/rsvp';
|
|
5 |
import reducer from '@moderntribe/tickets/data/blocks/rsvp/reducers/temp-details';
|
6 |
import { DEFAULT_STATE } from '@moderntribe/tickets/data/blocks/rsvp/reducers/details';
|
7 |
|
8 |
-
|
9 |
jest.mock( 'moment', () => () => {
|
10 |
const moment = require.requireActual( 'moment' );
|
11 |
return moment( 'July 19, 2018 7:30 pm', 'MMMM D, Y h:mm a' );
|
@@ -21,7 +20,8 @@ describe( 'Temp details reducer', () => {
|
|
21 |
} );
|
22 |
|
23 |
it( 'should set the temp description', () => {
|
24 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPTempDescription( 'new description' ) ) )
|
|
|
25 |
} );
|
26 |
|
27 |
it( 'should set the temp capacity', () => {
|
@@ -29,15 +29,18 @@ describe( 'Temp details reducer', () => {
|
|
29 |
} );
|
30 |
|
31 |
it( 'should set the temp not going responses', () => {
|
32 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPTempNotGoingResponses( true ) ) )
|
|
|
33 |
} );
|
34 |
|
35 |
it( 'should set the temp start date', () => {
|
36 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPTempStartDate( 'January 1, 2018' ) ) )
|
|
|
37 |
} );
|
38 |
|
39 |
it( 'should set the temp start date input', () => {
|
40 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPTempStartDateInput( 'January 1, 2018' ) ) )
|
|
|
41 |
} );
|
42 |
|
43 |
it( 'should set the temp start date moment', () => {
|
@@ -48,11 +51,13 @@ describe( 'Temp details reducer', () => {
|
|
48 |
} );
|
49 |
|
50 |
it( 'should set the temp end date', () => {
|
51 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPTempEndDate( 'January 1, 2018' ) ) )
|
|
|
52 |
} );
|
53 |
|
54 |
it( 'should set the temp end date input', () => {
|
55 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPTempEndDateInput( 'January 1, 2018' ) ) )
|
|
|
56 |
} );
|
57 |
|
58 |
it( 'should set the temp end date moment', () => {
|
@@ -71,10 +76,12 @@ describe( 'Temp details reducer', () => {
|
|
71 |
} );
|
72 |
|
73 |
it( 'should set the temp start time input', () => {
|
74 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPTempStartTimeInput( '13:45' ) ) )
|
|
|
75 |
} );
|
76 |
|
77 |
it( 'should set the temp end time input', () => {
|
78 |
-
expect( reducer( DEFAULT_STATE, actions.setRSVPTempEndTimeInput( '13:45' ) ) )
|
|
|
79 |
} );
|
80 |
} );
|
5 |
import reducer from '@moderntribe/tickets/data/blocks/rsvp/reducers/temp-details';
|
6 |
import { DEFAULT_STATE } from '@moderntribe/tickets/data/blocks/rsvp/reducers/details';
|
7 |
|
|
|
8 |
jest.mock( 'moment', () => () => {
|
9 |
const moment = require.requireActual( 'moment' );
|
10 |
return moment( 'July 19, 2018 7:30 pm', 'MMMM D, Y h:mm a' );
|
20 |
} );
|
21 |
|
22 |
it( 'should set the temp description', () => {
|
23 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPTempDescription( 'new description' ) ) )
|
24 |
+
.toMatchSnapshot();
|
25 |
} );
|
26 |
|
27 |
it( 'should set the temp capacity', () => {
|
29 |
} );
|
30 |
|
31 |
it( 'should set the temp not going responses', () => {
|
32 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPTempNotGoingResponses( true ) ) )
|
33 |
+
.toMatchSnapshot();
|
34 |
} );
|
35 |
|
36 |
it( 'should set the temp start date', () => {
|
37 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPTempStartDate( 'January 1, 2018' ) ) )
|
38 |
+
.toMatchSnapshot();
|
39 |
} );
|
40 |
|
41 |
it( 'should set the temp start date input', () => {
|
42 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPTempStartDateInput( 'January 1, 2018' ) ) )
|
43 |
+
.toMatchSnapshot();
|
44 |
} );
|
45 |
|
46 |
it( 'should set the temp start date moment', () => {
|
51 |
} );
|
52 |
|
53 |
it( 'should set the temp end date', () => {
|
54 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPTempEndDate( 'January 1, 2018' ) ) )
|
55 |
+
.toMatchSnapshot();
|
56 |
} );
|
57 |
|
58 |
it( 'should set the temp end date input', () => {
|
59 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPTempEndDateInput( 'January 1, 2018' ) ) )
|
60 |
+
.toMatchSnapshot();
|
61 |
} );
|
62 |
|
63 |
it( 'should set the temp end date moment', () => {
|
76 |
} );
|
77 |
|
78 |
it( 'should set the temp start time input', () => {
|
79 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPTempStartTimeInput( '13:45' ) ) )
|
80 |
+
.toMatchSnapshot();
|
81 |
} );
|
82 |
|
83 |
it( 'should set the temp end time input', () => {
|
84 |
+
expect( reducer( DEFAULT_STATE, actions.setRSVPTempEndTimeInput( '13:45' ) ) )
|
85 |
+
.toMatchSnapshot();
|
86 |
} );
|
87 |
} );
|
src/modules/data/blocks/rsvp/reducers/details.js
CHANGED
@@ -11,8 +11,12 @@ import { globals, moment as momentUtil } from '@moderntribe/common/utils';
|
|
11 |
|
12 |
const datePickerFormat = globals.tecDateSettings().datepickerFormat;
|
13 |
const currentMoment = moment();
|
14 |
-
const bufferDuration = globals.tickets().end_sale_buffer_duration
|
15 |
-
|
|
|
|
|
|
|
|
|
16 |
const endMoment = currentMoment.clone().add( bufferDuration, 'hours' ).add( bufferYears, 'years' );
|
17 |
|
18 |
const startDateInput = datePickerFormat
|
11 |
|
12 |
const datePickerFormat = globals.tecDateSettings().datepickerFormat;
|
13 |
const currentMoment = moment();
|
14 |
+
const bufferDuration = globals.tickets().end_sale_buffer_duration
|
15 |
+
? globals.tickets().end_sale_buffer_duration
|
16 |
+
: 2;
|
17 |
+
const bufferYears = globals.tickets().end_sale_buffer_years
|
18 |
+
? globals.tickets().end_sale_buffer_years
|
19 |
+
: 1;
|
20 |
const endMoment = currentMoment.clone().add( bufferDuration, 'hours' ).add( bufferYears, 'years' );
|
21 |
|
22 |
const startDateInput = datePickerFormat
|
src/modules/data/blocks/rsvp/sagas.js
CHANGED
@@ -14,11 +14,11 @@ import * as actions from './actions';
|
|
14 |
import * as selectors from './selectors';
|
15 |
import { updateRSVP } from './thunks';
|
16 |
import {
|
17 |
-
DEFAULT_STATE as RSVP_HEADER_IMAGE_DEFAULT_STATE
|
18 |
} from './reducers/header-image';
|
19 |
import * as ticketActions from '@moderntribe/tickets/data/blocks/ticket/actions';
|
20 |
import {
|
21 |
-
DEFAULT_STATE as TICKET_HEADER_IMAGE_DEFAULT_STATE
|
22 |
} from '@moderntribe/tickets/data/blocks/ticket/reducers/header-image';
|
23 |
import * as utils from '@moderntribe/tickets/data/utils';
|
24 |
import { MOVE_TICKET_SUCCESS } from '@moderntribe/tickets/data/shared/move/types';
|
@@ -39,7 +39,8 @@ import {
|
|
39 |
* Set details for current RSVP
|
40 |
*
|
41 |
* @export
|
42 |
-
* @
|
|
|
43 |
*/
|
44 |
export function* setRSVPDetails( action ) {
|
45 |
const {
|
@@ -80,7 +81,8 @@ export function* setRSVPDetails( action ) {
|
|
80 |
* Set details for current temp RSVP
|
81 |
*
|
82 |
* @export
|
83 |
-
* @
|
|
|
84 |
*/
|
85 |
export function* setRSVPTempDetails( action ) {
|
86 |
const {
|
@@ -123,11 +125,13 @@ export function* setRSVPTempDetails( action ) {
|
|
123 |
|
124 |
/**
|
125 |
* Initializes RSVP that has not been created
|
|
|
126 |
* @borrows TEC - Optional functionality requires TEC to be enabled and post type to be event
|
127 |
* @export
|
|
|
128 |
*/
|
129 |
export function* initializeRSVP() {
|
130 |
-
const publishDate =
|
131 |
const {
|
132 |
moment: startMoment,
|
133 |
date: startDate,
|
@@ -184,9 +188,11 @@ export function* initializeRSVP() {
|
|
184 |
|
185 |
/**
|
186 |
* Will sync RSVP sale end to be the same as event start date and time, if field has not been manually edited
|
|
|
187 |
* @borrows TEC - Functionality requires TEC to be enabled
|
188 |
-
* @param {
|
189 |
* @export
|
|
|
190 |
*/
|
191 |
export function* syncRSVPSaleEndWithEventStart( prevStartDate ) {
|
192 |
try {
|
@@ -251,6 +257,7 @@ export function* syncRSVPSaleEndWithEventStart( prevStartDate ) {
|
|
251 |
* Avoids the user having to open up the RSVP block, and then click update again there, when changing the event start date.
|
252 |
*
|
253 |
* @export
|
|
|
254 |
*/
|
255 |
export function* saveRSVPWithPostSave() {
|
256 |
let saveChannel;
|
@@ -294,8 +301,10 @@ export function* saveRSVPWithPostSave() {
|
|
294 |
|
295 |
/**
|
296 |
* Listens for event start date and time changes after RSVP block is loaded.
|
|
|
297 |
* @borrows TEC - Functionality requires TEC to be enabled and post type to be event
|
298 |
* @export
|
|
|
299 |
*/
|
300 |
export function* handleEventStartDateChanges() {
|
301 |
try {
|
@@ -400,6 +409,7 @@ export function* handleRSVPEndTimeInput( action ) {
|
|
400 |
* Handles proper RSVP deletion and RSVP block removal upon moving RSVP
|
401 |
*
|
402 |
* @export
|
|
|
403 |
*/
|
404 |
export function* handleRSVPMove() {
|
405 |
const rsvpId = yield select( selectors.getRSVPId );
|
@@ -616,6 +626,7 @@ export function* handler( action ) {
|
|
616 |
* Temporary bandaid until datepickers allow blank state
|
617 |
*
|
618 |
* @export
|
|
|
619 |
*/
|
620 |
export function* setNonEventPostTypeEndDate() {
|
621 |
yield take( [ types.INITIALIZE_RSVP ] );
|
14 |
import * as selectors from './selectors';
|
15 |
import { updateRSVP } from './thunks';
|
16 |
import {
|
17 |
+
DEFAULT_STATE as RSVP_HEADER_IMAGE_DEFAULT_STATE,
|
18 |
} from './reducers/header-image';
|
19 |
import * as ticketActions from '@moderntribe/tickets/data/blocks/ticket/actions';
|
20 |
import {
|
21 |
+
DEFAULT_STATE as TICKET_HEADER_IMAGE_DEFAULT_STATE,
|
22 |
} from '@moderntribe/tickets/data/blocks/ticket/reducers/header-image';
|
23 |
import * as utils from '@moderntribe/tickets/data/utils';
|
24 |
import { MOVE_TICKET_SUCCESS } from '@moderntribe/tickets/data/shared/move/types';
|
39 |
* Set details for current RSVP
|
40 |
*
|
41 |
* @export
|
42 |
+
* @yields
|
43 |
+
* @param {object} action redux action
|
44 |
*/
|
45 |
export function* setRSVPDetails( action ) {
|
46 |
const {
|
81 |
* Set details for current temp RSVP
|
82 |
*
|
83 |
* @export
|
84 |
+
* @yields
|
85 |
+
* @param {object} action redux action
|
86 |
*/
|
87 |
export function* setRSVPTempDetails( action ) {
|
88 |
const {
|
125 |
|
126 |
/**
|
127 |
* Initializes RSVP that has not been created
|
128 |
+
*
|
129 |
* @borrows TEC - Optional functionality requires TEC to be enabled and post type to be event
|
130 |
* @export
|
131 |
+
* @yields
|
132 |
*/
|
133 |
export function* initializeRSVP() {
|
134 |
+
const publishDate = yield call( [ wpSelect( 'core/editor' ), 'getEditedPostAttribute' ], 'date' );
|
135 |
const {
|
136 |
moment: startMoment,
|
137 |
date: startDate,
|
188 |
|
189 |
/**
|
190 |
* Will sync RSVP sale end to be the same as event start date and time, if field has not been manually edited
|
191 |
+
*
|
192 |
* @borrows TEC - Functionality requires TEC to be enabled
|
193 |
+
* @param {string} prevStartDate Previous start date before latest set date time changes
|
194 |
* @export
|
195 |
+
* @yields
|
196 |
*/
|
197 |
export function* syncRSVPSaleEndWithEventStart( prevStartDate ) {
|
198 |
try {
|
257 |
* Avoids the user having to open up the RSVP block, and then click update again there, when changing the event start date.
|
258 |
*
|
259 |
* @export
|
260 |
+
* @yields
|
261 |
*/
|
262 |
export function* saveRSVPWithPostSave() {
|
263 |
let saveChannel;
|
301 |
|
302 |
/**
|
303 |
* Listens for event start date and time changes after RSVP block is loaded.
|
304 |
+
*
|
305 |
* @borrows TEC - Functionality requires TEC to be enabled and post type to be event
|
306 |
* @export
|
307 |
+
* @yields
|
308 |
*/
|
309 |
export function* handleEventStartDateChanges() {
|
310 |
try {
|
409 |
* Handles proper RSVP deletion and RSVP block removal upon moving RSVP
|
410 |
*
|
411 |
* @export
|
412 |
+
* @yields
|
413 |
*/
|
414 |
export function* handleRSVPMove() {
|
415 |
const rsvpId = yield select( selectors.getRSVPId );
|
626 |
* Temporary bandaid until datepickers allow blank state
|
627 |
*
|
628 |
* @export
|
629 |
+
* @yields
|
630 |
*/
|
631 |
export function* setNonEventPostTypeEndDate() {
|
632 |
yield take( [ types.INITIALIZE_RSVP ] );
|
src/modules/data/blocks/rsvp/selectors.js
CHANGED
@@ -105,7 +105,7 @@ export const getRSVPAvailable = createSelector(
|
|
105 |
* of the substraction operation or zero if the operation is lower than zero it will return zero insted.
|
106 |
*/
|
107 |
return Math.max( total - going, 0 );
|
108 |
-
}
|
109 |
);
|
110 |
|
111 |
export const getRSVPNotGoingResponses = createSelector(
|
105 |
* of the substraction operation or zero if the operation is lower than zero it will return zero insted.
|
106 |
*/
|
107 |
return Math.max( total - going, 0 );
|
108 |
+
},
|
109 |
);
|
110 |
|
111 |
export const getRSVPNotGoingResponses = createSelector(
|
src/modules/data/blocks/rsvp/thunks.js
CHANGED
@@ -2,13 +2,12 @@
|
|
2 |
* Internal dependencies
|
3 |
*/
|
4 |
import * as actions from './actions';
|
5 |
-
import { DEFAULT_STATE } from './reducers/header-image';
|
6 |
import * as utils from '@moderntribe/tickets/data/utils';
|
7 |
import { middlewares } from '@moderntribe/common/store';
|
8 |
import { globals, time, moment as momentUtil } from '@moderntribe/common/utils';
|
9 |
|
10 |
const { request: {
|
11 |
-
actions:wpRequestActions
|
12 |
} } = middlewares;
|
13 |
|
14 |
/**
|
@@ -34,15 +33,15 @@ const createOrUpdateRSVP = ( method ) => ( payload ) => ( dispatch ) => {
|
|
34 |
} = payload;
|
35 |
|
36 |
const startMoment = startDateMoment.clone().startOf( 'day' ).seconds(
|
37 |
-
time.toSeconds( startTime, time.TIME_FORMAT_HH_MM_SS )
|
38 |
);
|
39 |
|
40 |
const endMoment = endDateMoment.clone().startOf( 'day' ).seconds(
|
41 |
-
time.toSeconds( endTime, time.TIME_FORMAT_HH_MM_SS )
|
42 |
);
|
43 |
|
44 |
let path = `${ utils.RSVP_POST_TYPE }`;
|
45 |
-
const
|
46 |
title,
|
47 |
excerpt: description,
|
48 |
meta: {
|
@@ -54,12 +53,12 @@ const createOrUpdateRSVP = ( method ) => ( payload ) => ( dispatch ) => {
|
|
54 |
};
|
55 |
|
56 |
if ( method === METHODS.POST ) {
|
57 |
-
|
58 |
-
|
59 |
/* This is hardcoded value until we can sort out BE */
|
60 |
-
|
61 |
/* This is hardcoded value until we can sort out BE */
|
62 |
-
|
63 |
} else if ( method === METHODS.PUT ) {
|
64 |
path += `/${ payload.id }`;
|
65 |
}
|
@@ -68,7 +67,7 @@ const createOrUpdateRSVP = ( method ) => ( payload ) => ( dispatch ) => {
|
|
68 |
path,
|
69 |
params: {
|
70 |
method,
|
71 |
-
body: JSON.stringify(
|
72 |
},
|
73 |
actions: {
|
74 |
start: () => dispatch( actions.setRSVPIsLoading( true ) ),
|
@@ -116,7 +115,7 @@ export const getRSVP = ( postId, page = 1 ) => ( dispatch ) => {
|
|
116 |
start: () => dispatch( actions.setRSVPIsLoading( true ) ),
|
117 |
success: ( { body, headers } ) => {
|
118 |
const filteredRSVPs = body.filter( ( rsvp ) => (
|
119 |
-
rsvp.meta[ utils.KEY_RSVP_FOR_EVENT ] == postId
|
120 |
) );
|
121 |
const totalPages = headers.get( 'x-wp-totalpages' );
|
122 |
|
@@ -130,7 +129,7 @@ export const getRSVP = ( postId, page = 1 ) => ( dispatch ) => {
|
|
130 |
*/
|
131 |
const datePickerFormat = globals.tecDateSettings().datepickerFormat;
|
132 |
|
133 |
-
const rsvp = filteredRSVPs[0];
|
134 |
const { meta = {} } = rsvp;
|
135 |
const startMoment = momentUtil.toMoment( meta[ utils.KEY_TICKET_START_DATE ] );
|
136 |
const endMoment = momentUtil.toMoment( meta[ utils.KEY_TICKET_END_DATE ] );
|
@@ -149,18 +148,18 @@ export const getRSVP = ( postId, page = 1 ) => ( dispatch ) => {
|
|
149 |
dispatch( actions.setRSVPId( rsvp.id ) );
|
150 |
dispatch(
|
151 |
actions.setRSVPGoingCount(
|
152 |
-
parseInt( meta[ utils.KEY_TICKET_GOING_COUNT ], 10 ) || 0
|
153 |
-
)
|
154 |
);
|
155 |
dispatch(
|
156 |
actions.setRSVPNotGoingCount(
|
157 |
-
parseInt( meta[ utils.KEY_TICKET_NOT_GOING_COUNT ], 10 ) || 0
|
158 |
-
)
|
159 |
);
|
160 |
dispatch(
|
161 |
actions.setRSVPHasAttendeeInfoFields(
|
162 |
-
meta[ utils.KEY_TICKET_HAS_ATTENDEE_INFO_FIELDS ]
|
163 |
-
)
|
164 |
);
|
165 |
dispatch( actions.setRSVPDetails( {
|
166 |
title: rsvp.title.rendered,
|
2 |
* Internal dependencies
|
3 |
*/
|
4 |
import * as actions from './actions';
|
|
|
5 |
import * as utils from '@moderntribe/tickets/data/utils';
|
6 |
import { middlewares } from '@moderntribe/common/store';
|
7 |
import { globals, time, moment as momentUtil } from '@moderntribe/common/utils';
|
8 |
|
9 |
const { request: {
|
10 |
+
actions: wpRequestActions,
|
11 |
} } = middlewares;
|
12 |
|
13 |
/**
|
33 |
} = payload;
|
34 |
|
35 |
const startMoment = startDateMoment.clone().startOf( 'day' ).seconds(
|
36 |
+
time.toSeconds( startTime, time.TIME_FORMAT_HH_MM_SS ),
|
37 |
);
|
38 |
|
39 |
const endMoment = endDateMoment.clone().startOf( 'day' ).seconds(
|
40 |
+
time.toSeconds( endTime, time.TIME_FORMAT_HH_MM_SS ),
|
41 |
);
|
42 |
|
43 |
let path = `${ utils.RSVP_POST_TYPE }`;
|
44 |
+
const reqBody = {
|
45 |
title,
|
46 |
excerpt: description,
|
47 |
meta: {
|
53 |
};
|
54 |
|
55 |
if ( method === METHODS.POST ) {
|
56 |
+
reqBody.status = 'publish';
|
57 |
+
reqBody.meta[ utils.KEY_RSVP_FOR_EVENT ] = `${ payload.postId }`;
|
58 |
/* This is hardcoded value until we can sort out BE */
|
59 |
+
reqBody.meta[ utils.KEY_TICKET_SHOW_DESCRIPTION ] = 'yes';
|
60 |
/* This is hardcoded value until we can sort out BE */
|
61 |
+
reqBody.meta[ utils.KEY_PRICE ] = '0';
|
62 |
} else if ( method === METHODS.PUT ) {
|
63 |
path += `/${ payload.id }`;
|
64 |
}
|
67 |
path,
|
68 |
params: {
|
69 |
method,
|
70 |
+
body: JSON.stringify( reqBody ),
|
71 |
},
|
72 |
actions: {
|
73 |
start: () => dispatch( actions.setRSVPIsLoading( true ) ),
|
115 |
start: () => dispatch( actions.setRSVPIsLoading( true ) ),
|
116 |
success: ( { body, headers } ) => {
|
117 |
const filteredRSVPs = body.filter( ( rsvp ) => (
|
118 |
+
rsvp.meta[ utils.KEY_RSVP_FOR_EVENT ] == postId // eslint-disable-line eqeqeq
|
119 |
) );
|
120 |
const totalPages = headers.get( 'x-wp-totalpages' );
|
121 |
|
129 |
*/
|
130 |
const datePickerFormat = globals.tecDateSettings().datepickerFormat;
|
131 |
|
132 |
+
const rsvp = filteredRSVPs[ 0 ];
|
133 |
const { meta = {} } = rsvp;
|
134 |
const startMoment = momentUtil.toMoment( meta[ utils.KEY_TICKET_START_DATE ] );
|
135 |
const endMoment = momentUtil.toMoment( meta[ utils.KEY_TICKET_END_DATE ] );
|
148 |
dispatch( actions.setRSVPId( rsvp.id ) );
|
149 |
dispatch(
|
150 |
actions.setRSVPGoingCount(
|
151 |
+
parseInt( meta[ utils.KEY_TICKET_GOING_COUNT ], 10 ) || 0,
|
152 |
+
),
|
153 |
);
|
154 |
dispatch(
|
155 |
actions.setRSVPNotGoingCount(
|
156 |
+
parseInt( meta[ utils.KEY_TICKET_NOT_GOING_COUNT ], 10 ) || 0,
|
157 |
+
),
|
158 |
);
|
159 |
dispatch(
|
160 |
actions.setRSVPHasAttendeeInfoFields(
|
161 |
+
meta[ utils.KEY_TICKET_HAS_ATTENDEE_INFO_FIELDS ],
|
162 |
+
),
|
163 |
);
|
164 |
dispatch( actions.setRSVPDetails( {
|
165 |
title: rsvp.title.rendered,
|
src/modules/data/blocks/rsvp/types.js
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
/**
|
2 |
* Internal dependencies
|
3 |
*/
|
1 |
+
/* eslint-disable max-len */
|
2 |
/**
|
3 |
* Internal dependencies
|
4 |
*/
|
src/modules/data/blocks/ticket/__tests__/actions.test.js
CHANGED
@@ -50,7 +50,8 @@ describe( 'Ticket actions', () => {
|
|
50 |
} );
|
51 |
|
52 |
test( 'set tickets provider', () => {
|
53 |
-
expect( actions.setTicketsProvider( 'Tribe__Tickets__Commerce__PayPal__Main' ) )
|
|
|
54 |
} );
|
55 |
|
56 |
test( 'set tickets shared capacity', () => {
|
@@ -68,7 +69,8 @@ describe( 'Ticket actions', () => {
|
|
68 |
} );
|
69 |
|
70 |
test( 'update tickets header image', () => {
|
71 |
-
expect( actions.updateTicketsHeaderImage( { id: 1, alt: 'hi', src: '#' } ) )
|
|
|
72 |
} );
|
73 |
|
74 |
test( 'delete tickets header image', () => {
|
@@ -155,8 +157,10 @@ describe( 'Ticket actions', () => {
|
|
155 |
} );
|
156 |
|
157 |
test( 'set ticket temp description', () => {
|
158 |
-
expect( actions.setTicketTempDescription(
|
159 |
-
|
|
|
|
|
160 |
} );
|
161 |
|
162 |
test( 'set ticket temp price', () => {
|
@@ -176,11 +180,13 @@ describe( 'Ticket actions', () => {
|
|
176 |
} );
|
177 |
|
178 |
test( 'set ticket temp start date input', () => {
|
179 |
-
expect( actions.setTicketTempStartDateInput( clientId, 'January 1, 2018' ) )
|
|
|
180 |
} );
|
181 |
|
182 |
test( 'set ticket temp start moment', () => {
|
183 |
-
expect( actions.setTicketTempStartDateMoment( clientId, { type: 'moment' } ) )
|
|
|
184 |
expect( actions.setTicketTempStartDateMoment( clientId, null ) ).toMatchSnapshot();
|
185 |
} );
|
186 |
|
@@ -189,11 +195,13 @@ describe( 'Ticket actions', () => {
|
|
189 |
} );
|
190 |
|
191 |
test( 'set ticket temp end date input', () => {
|
192 |
-
expect( actions.setTicketTempEndDateInput( clientId, 'January 10, 2018' ) )
|
|
|
193 |
} );
|
194 |
|
195 |
test( 'set ticket temp end moment', () => {
|
196 |
-
expect( actions.setTicketTempEndDateMoment( clientId, { type: 'moment' } ) )
|
|
|
197 |
expect( actions.setTicketTempEndDateMoment( clientId, null ) ).toMatchSnapshot();
|
198 |
} );
|
199 |
|
@@ -272,7 +280,7 @@ describe( 'Ticket actions', () => {
|
|
272 |
test( 'set ticket is modal open', () => {
|
273 |
expect( actions.setTicketIsModalOpen( clientId, true ) ).toMatchSnapshot();
|
274 |
expect( actions.setTicketIsModalOpen( clientId, false ) ).toMatchSnapshot();
|
275 |
-
})
|
276 |
|
277 |
test( 'set ticket has been created', () => {
|
278 |
expect( actions.setTicketHasBeenCreated( clientId, true ) ).toMatchSnapshot();
|
50 |
} );
|
51 |
|
52 |
test( 'set tickets provider', () => {
|
53 |
+
expect( actions.setTicketsProvider( 'Tribe__Tickets__Commerce__PayPal__Main' ) )
|
54 |
+
.toMatchSnapshot();
|
55 |
} );
|
56 |
|
57 |
test( 'set tickets shared capacity', () => {
|
69 |
} );
|
70 |
|
71 |
test( 'update tickets header image', () => {
|
72 |
+
expect( actions.updateTicketsHeaderImage( { id: 1, alt: 'hi', src: '#' } ) )
|
73 |
+
.toMatchSnapshot();
|
74 |
} );
|
75 |
|
76 |
test( 'delete tickets header image', () => {
|
157 |
} );
|
158 |
|
159 |
test( 'set ticket temp description', () => {
|
160 |
+
expect( actions.setTicketTempDescription(
|
161 |
+
clientId,
|
162 |
+
'The Next Generation of Digital Agency',
|
163 |
+
) ).toMatchSnapshot();
|
164 |
} );
|
165 |
|
166 |
test( 'set ticket temp price', () => {
|
180 |
} );
|
181 |
|
182 |
test( 'set ticket temp start date input', () => {
|
183 |
+
expect( actions.setTicketTempStartDateInput( clientId, 'January 1, 2018' ) )
|
184 |
+
.toMatchSnapshot();
|
185 |
} );
|
186 |
|
187 |
test( 'set ticket temp start moment', () => {
|
188 |
+
expect( actions.setTicketTempStartDateMoment( clientId, { type: 'moment' } ) )
|
189 |
+
.toMatchSnapshot();
|
190 |
expect( actions.setTicketTempStartDateMoment( clientId, null ) ).toMatchSnapshot();
|
191 |
} );
|
192 |
|
195 |
} );
|
196 |
|
197 |
test( 'set ticket temp end date input', () => {
|
198 |
+
expect( actions.setTicketTempEndDateInput( clientId, 'January 10, 2018' ) )
|
199 |
+
.toMatchSnapshot();
|
200 |
} );
|
201 |
|
202 |
test( 'set ticket temp end moment', () => {
|
203 |
+
expect( actions.setTicketTempEndDateMoment( clientId, { type: 'moment' } ) )
|
204 |
+
.toMatchSnapshot();
|
205 |
expect( actions.setTicketTempEndDateMoment( clientId, null ) ).toMatchSnapshot();
|
206 |
} );
|
207 |
|
280 |
test( 'set ticket is modal open', () => {
|
281 |
expect( actions.setTicketIsModalOpen( clientId, true ) ).toMatchSnapshot();
|
282 |
expect( actions.setTicketIsModalOpen( clientId, false ) ).toMatchSnapshot();
|
283 |
+
} );
|
284 |
|
285 |
test( 'set ticket has been created', () => {
|
286 |
expect( actions.setTicketHasBeenCreated( clientId, true ) ).toMatchSnapshot();
|
src/modules/data/blocks/ticket/__tests__/sagas.test.js
CHANGED
@@ -18,11 +18,11 @@ import * as actions from '../actions';
|
|
18 |
import watchers, * as sagas from '../sagas';
|
19 |
import * as selectors from '../selectors';
|
20 |
import {
|
21 |
-
DEFAULT_STATE as TICKET_HEADER_IMAGE_DEFAULT_STATE
|
22 |
} from '../reducers/header-image';
|
23 |
import * as rsvpActions from '@moderntribe/tickets/data/blocks/rsvp/actions';
|
24 |
import {
|
25 |
-
DEFAULT_STATE as RSVP_HEADER_IMAGE_DEFAULT_STATE
|
26 |
} from '@moderntribe/tickets/data/blocks/rsvp/reducers/header-image';
|
27 |
import { MOVE_TICKET_SUCCESS } from '@moderntribe/tickets/data/shared/move/types';
|
28 |
import * as moveSelectors from '@moderntribe/tickets/data/shared/move/selectors';
|
@@ -46,7 +46,7 @@ const {
|
|
46 |
SHARED,
|
47 |
TICKET_TYPES,
|
48 |
PROVIDER_CLASS_TO_PROVIDER_MAPPING,
|
49 |
-
WOO_CLASS
|
50 |
} = constants;
|
51 |
|
52 |
jest.mock( '@wordpress/data', () => {
|
@@ -100,10 +100,10 @@ describe( 'Ticket Block sagas', () => {
|
|
100 |
types.HANDLE_TICKET_START_TIME,
|
101 |
types.HANDLE_TICKET_END_TIME,
|
102 |
MOVE_TICKET_SUCCESS,
|
103 |
-
], sagas.handler )
|
104 |
);
|
105 |
expect( gen.next().value ).toEqual(
|
106 |
-
fork( sagas.handleEventStartDateChanges )
|
107 |
);
|
108 |
expect( gen.next().done ).toEqual( true );
|
109 |
} );
|
@@ -120,7 +120,7 @@ describe( 'Ticket Block sagas', () => {
|
|
120 |
action.type = types.SET_TICKETS_INITIAL_STATE;
|
121 |
const gen = sagas.handler( action );
|
122 |
expect( gen.next().value ).toEqual(
|
123 |
-
call( sagas.setTicketsInitialState, action )
|
124 |
);
|
125 |
expect( gen.next().done ).toEqual( true );
|
126 |
} );
|
@@ -129,7 +129,7 @@ describe( 'Ticket Block sagas', () => {
|
|
129 |
action.type = types.RESET_TICKETS_BLOCK;
|
130 |
const gen = sagas.handler( action );
|
131 |
expect( gen.next().value ).toEqual(
|
132 |
-
call( sagas.resetTicketsBlock )
|
133 |
);
|
134 |
expect( gen.next().done ).toEqual( true );
|
135 |
} );
|
@@ -138,7 +138,7 @@ describe( 'Ticket Block sagas', () => {
|
|
138 |
action.type = types.SET_TICKET_INITIAL_STATE;
|
139 |
const gen = sagas.handler( action );
|
140 |
expect( gen.next().value ).toEqual(
|
141 |
-
call( sagas.setTicketInitialState, action )
|
142 |
);
|
143 |
expect( gen.next().done ).toEqual( true );
|
144 |
} );
|
@@ -147,7 +147,7 @@ describe( 'Ticket Block sagas', () => {
|
|
147 |
action.type = types.FETCH_TICKET;
|
148 |
const gen = sagas.handler( action );
|
149 |
expect( gen.next().value ).toEqual(
|
150 |
-
call( sagas.fetchTicket, action )
|
151 |
);
|
152 |
expect( gen.next().done ).toEqual( true );
|
153 |
} );
|
@@ -156,7 +156,7 @@ describe( 'Ticket Block sagas', () => {
|
|
156 |
action.type = types.CREATE_NEW_TICKET;
|
157 |
const gen = sagas.handler( action );
|
158 |
expect( gen.next().value ).toEqual(
|
159 |
-
call( sagas.createNewTicket, action )
|
160 |
);
|
161 |
expect( gen.next().done ).toEqual( true );
|
162 |
} );
|
@@ -165,7 +165,7 @@ describe( 'Ticket Block sagas', () => {
|
|
165 |
action.type = types.UPDATE_TICKET;
|
166 |
const gen = sagas.handler( action );
|
167 |
expect( gen.next().value ).toEqual(
|
168 |
-
call( sagas.updateTicket, action )
|
169 |
);
|
170 |
expect( gen.next().done ).toEqual( true );
|
171 |
} );
|
@@ -174,7 +174,7 @@ describe( 'Ticket Block sagas', () => {
|
|
174 |
action.type = types.DELETE_TICKET;
|
175 |
const gen = sagas.handler( action );
|
176 |
expect( gen.next().value ).toEqual(
|
177 |
-
call( sagas.deleteTicket, action )
|
178 |
);
|
179 |
expect( gen.next().done ).toEqual( true );
|
180 |
} );
|
@@ -183,7 +183,7 @@ describe( 'Ticket Block sagas', () => {
|
|
183 |
action.type = types.FETCH_TICKETS_HEADER_IMAGE;
|
184 |
const gen = sagas.handler( action );
|
185 |
expect( gen.next().value ).toEqual(
|
186 |
-
call( sagas.fetchTicketsHeaderImage, action )
|
187 |
);
|
188 |
expect( gen.next().done ).toEqual( true );
|
189 |
} );
|
@@ -192,7 +192,7 @@ describe( 'Ticket Block sagas', () => {
|
|
192 |
action.type = types.UPDATE_TICKETS_HEADER_IMAGE;
|
193 |
const gen = sagas.handler( action );
|
194 |
expect( gen.next().value ).toEqual(
|
195 |
-
call( sagas.updateTicketsHeaderImage, action )
|
196 |
);
|
197 |
expect( gen.next().done ).toEqual( true );
|
198 |
} );
|
@@ -201,7 +201,7 @@ describe( 'Ticket Block sagas', () => {
|
|
201 |
action.type = types.DELETE_TICKETS_HEADER_IMAGE;
|
202 |
const gen = sagas.handler( action );
|
203 |
expect( gen.next().value ).toEqual(
|
204 |
-
call( sagas.deleteTicketsHeaderImage )
|
205 |
);
|
206 |
expect( gen.next().done ).toEqual( true );
|
207 |
} );
|
@@ -210,7 +210,7 @@ describe( 'Ticket Block sagas', () => {
|
|
210 |
action.type = types.SET_TICKET_DETAILS;
|
211 |
const gen = sagas.handler( action );
|
212 |
expect( gen.next().value ).toEqual(
|
213 |
-
call( sagas.setTicketDetails, action )
|
214 |
);
|
215 |
expect( gen.next().done ).toEqual( true );
|
216 |
} );
|
@@ -219,7 +219,7 @@ describe( 'Ticket Block sagas', () => {
|
|
219 |
action.type = types.SET_TICKET_TEMP_DETAILS;
|
220 |
const gen = sagas.handler( action );
|
221 |
expect( gen.next().value ).toEqual(
|
222 |
-
call( sagas.setTicketTempDetails, action )
|
223 |
);
|
224 |
expect( gen.next().done ).toEqual( true );
|
225 |
} );
|
@@ -229,13 +229,13 @@ describe( 'Ticket Block sagas', () => {
|
|
229 |
action.payload = { clientId: 'tribe' };
|
230 |
const gen = sagas.handler( action );
|
231 |
expect( gen.next().value ).toEqual(
|
232 |
-
call( sagas.handleTicketStartDate, action )
|
233 |
);
|
234 |
expect( gen.next().value ).toEqual(
|
235 |
-
call( sagas.handleTicketDurationError, action.payload.clientId )
|
236 |
);
|
237 |
expect( gen.next().value ).toEqual(
|
238 |
-
put( actions.setTicketHasChanges( action.payload.clientId, true ) )
|
239 |
);
|
240 |
expect( gen.next().done ).toEqual( true );
|
241 |
} );
|
@@ -245,13 +245,13 @@ describe( 'Ticket Block sagas', () => {
|
|
245 |
action.payload = { clientId: 'tribe' };
|
246 |
const gen = sagas.handler( action );
|
247 |
expect( gen.next().value ).toEqual(
|
248 |
-
call( sagas.handleTicketEndDate, action )
|
249 |
);
|
250 |
expect( gen.next().value ).toEqual(
|
251 |
-
call( sagas.handleTicketDurationError, action.payload.clientId )
|
252 |
);
|
253 |
expect( gen.next().value ).toEqual(
|
254 |
-
put( actions.setTicketHasChanges( action.payload.clientId, true ) )
|
255 |
);
|
256 |
expect( gen.next().done ).toEqual( true );
|
257 |
} );
|
@@ -261,16 +261,16 @@ describe( 'Ticket Block sagas', () => {
|
|
261 |
action.payload = { clientId: 'tribe' };
|
262 |
const gen = sagas.handler( action );
|
263 |
expect( gen.next().value ).toEqual(
|
264 |
-
call( sagas.handleTicketStartTime, action )
|
265 |
);
|
266 |
expect( gen.next().value ).toEqual(
|
267 |
-
call( sagas.handleTicketStartTimeInput, action )
|
268 |
);
|
269 |
expect( gen.next().value ).toEqual(
|
270 |
-
call( sagas.handleTicketDurationError, action.payload.clientId )
|
271 |
);
|
272 |
expect( gen.next().value ).toEqual(
|
273 |
-
put( actions.setTicketHasChanges( action.payload.clientId, true ) )
|
274 |
);
|
275 |
expect( gen.next().done ).toEqual( true );
|
276 |
} );
|
@@ -280,16 +280,16 @@ describe( 'Ticket Block sagas', () => {
|
|
280 |
action.payload = { clientId: 'tribe' };
|
281 |
const gen = sagas.handler( action );
|
282 |
expect( gen.next().value ).toEqual(
|
283 |
-
call( sagas.handleTicketEndTime, action )
|
284 |
);
|
285 |
expect( gen.next().value ).toEqual(
|
286 |
-
call( sagas.handleTicketEndTimeInput, action )
|
287 |
);
|
288 |
expect( gen.next().value ).toEqual(
|
289 |
-
call( sagas.handleTicketDurationError, action.payload.clientId )
|
290 |
);
|
291 |
expect( gen.next().value ).toEqual(
|
292 |
-
put( actions.setTicketHasChanges( action.payload.clientId, true ) )
|
293 |
);
|
294 |
expect( gen.next().done ).toEqual( true );
|
295 |
} );
|
@@ -298,7 +298,7 @@ describe( 'Ticket Block sagas', () => {
|
|
298 |
action.type = MOVE_TICKET_SUCCESS;
|
299 |
const gen = sagas.handler( action );
|
300 |
expect( gen.next().value ).toEqual(
|
301 |
-
call( sagas.handleTicketMove )
|
302 |
);
|
303 |
expect( gen.next().done ).toEqual( true );
|
304 |
} );
|
@@ -316,10 +316,10 @@ describe( 'Ticket Block sagas', () => {
|
|
316 |
const tickets = [ 'tribe' ];
|
317 |
const gen = sagas.createMissingTicketBlocks( tickets );
|
318 |
expect( gen.next().value ).toEqual(
|
319 |
-
call( wpDispatch, 'core/editor' )
|
320 |
);
|
321 |
expect( gen.next( wpDispatchCoreEditor ).value ).toEqual(
|
322 |
-
call( wpSelect, 'core/editor' )
|
323 |
);
|
324 |
expect( gen.next( wpSelectCoreEditor ).value ).toMatchSnapshot();
|
325 |
expect( gen.next( [] ).done ).toEqual( true );
|
@@ -352,24 +352,24 @@ describe( 'Ticket Block sagas', () => {
|
|
352 |
|
353 |
const gen = cloneableGenerator( sagas.setTicketsInitialState )( action );
|
354 |
expect( gen.next().value ).toEqual(
|
355 |
-
select( selectors.getTicketsIdsInBlocks )
|
356 |
);
|
357 |
|
358 |
const clone1 = gen.clone();
|
359 |
expect( clone1.next( [] ).value ).toEqual(
|
360 |
-
call( sagas.createMissingTicketBlocks, [ 'tribe' ] )
|
361 |
);
|
362 |
expect( clone1.next().value ).toEqual(
|
363 |
all( [
|
364 |
put( actions.setTicketsSharedCapacity( SHARED_CAPACITY ) ),
|
365 |
put( actions.setTicketsTempSharedCapacity( SHARED_CAPACITY ) ),
|
366 |
-
] )
|
367 |
);
|
368 |
expect( clone1.next().value ).toEqual(
|
369 |
-
put( actions.fetchTicketsHeaderImage( HEADER ) )
|
370 |
);
|
371 |
expect( clone1.next().value ).toEqual(
|
372 |
-
put( actions.setTicketsProvider( PROVIDER ) )
|
373 |
);
|
374 |
expect( clone1.next().done ).toEqual( true );
|
375 |
|
@@ -378,13 +378,13 @@ describe( 'Ticket Block sagas', () => {
|
|
378 |
all( [
|
379 |
put( actions.setTicketsSharedCapacity( SHARED_CAPACITY ) ),
|
380 |
put( actions.setTicketsTempSharedCapacity( SHARED_CAPACITY ) ),
|
381 |
-
] )
|
382 |
);
|
383 |
expect( clone2.next().value ).toEqual(
|
384 |
-
put( actions.fetchTicketsHeaderImage( HEADER ) )
|
385 |
);
|
386 |
expect( clone2.next().value ).toEqual(
|
387 |
-
put( actions.setTicketsProvider( PROVIDER ) )
|
388 |
);
|
389 |
expect( clone2.next().done ).toEqual( true );
|
390 |
} );
|
@@ -414,27 +414,27 @@ describe( 'Ticket Block sagas', () => {
|
|
414 |
};
|
415 |
const gen = cloneableGenerator( sagas.setTicketsInitialState )( action );
|
416 |
expect( gen.next().value ).toEqual(
|
417 |
-
select( selectors.getTicketsIdsInBlocks )
|
418 |
);
|
419 |
|
420 |
const clone1 = gen.clone();
|
421 |
expect( clone1.next( [] ).value ).toEqual(
|
422 |
-
call( sagas.createMissingTicketBlocks, [ 'tribe' ] )
|
423 |
);
|
424 |
expect( clone1.next().value ).toEqual(
|
425 |
-
select( selectors.getDefaultTicketProvider )
|
426 |
);
|
427 |
expect( clone1.next( DEFAULT_PROVIDER ).value ).toEqual(
|
428 |
-
put( actions.setTicketsProvider( DEFAULT_PROVIDER ) )
|
429 |
);
|
430 |
expect( clone1.next().done ).toEqual( true );
|
431 |
|
432 |
const clone2 = gen.clone();
|
433 |
expect( clone2.next( [ 'tribe' ] ).value ).toEqual(
|
434 |
-
select( selectors.getDefaultTicketProvider )
|
435 |
);
|
436 |
expect( clone2.next( DEFAULT_PROVIDER ).value ).toEqual(
|
437 |
-
put( actions.setTicketsProvider( DEFAULT_PROVIDER ) )
|
438 |
);
|
439 |
expect( clone2.next().done ).toEqual( true );
|
440 |
} );
|
@@ -444,13 +444,13 @@ describe( 'Ticket Block sagas', () => {
|
|
444 |
it( 'should reset tickets block', () => {
|
445 |
const gen = sagas.resetTicketsBlock();
|
446 |
expect( gen.next().value ).toEqual(
|
447 |
-
select( selectors.hasCreatedTickets )
|
448 |
);
|
449 |
expect( gen.next( false ).value ).toEqual(
|
450 |
all( [
|
451 |
put( actions.removeTicketBlocks() ),
|
452 |
put( actions.setTicketsIsSettingsOpen( false ) ),
|
453 |
-
] )
|
454 |
);
|
455 |
expect( gen.next().value ).toMatchSnapshot();
|
456 |
expect( gen.next( {} ).value ).toMatchSnapshot();
|
@@ -458,7 +458,7 @@ describe( 'Ticket Block sagas', () => {
|
|
458 |
all( [
|
459 |
put( actions.setTicketsSharedCapacity( '' ) ),
|
460 |
put( actions.setTicketsTempSharedCapacity( '' ) ),
|
461 |
-
] )
|
462 |
);
|
463 |
expect( gen.next().done ).toEqual( true );
|
464 |
} );
|
@@ -466,13 +466,13 @@ describe( 'Ticket Block sagas', () => {
|
|
466 |
it( 'should not reset tickets block', () => {
|
467 |
const gen = sagas.resetTicketsBlock();
|
468 |
expect( gen.next().value ).toEqual(
|
469 |
-
select( selectors.hasCreatedTickets )
|
470 |
);
|
471 |
expect( gen.next( true ).value ).toEqual(
|
472 |
all( [
|
473 |
put( actions.removeTicketBlocks() ),
|
474 |
put( actions.setTicketsIsSettingsOpen( false ) ),
|
475 |
-
] )
|
476 |
);
|
477 |
expect( gen.next().done ).toEqual( true );
|
478 |
} );
|
@@ -540,19 +540,19 @@ describe( 'Ticket Block sagas', () => {
|
|
540 |
const gen = cloneableGenerator( sagas.setTicketInitialState )( action );
|
541 |
expect( gen.next().value ).toMatchSnapshot();
|
542 |
expect( gen.next( publishDate ).value ).toEqual(
|
543 |
-
call( momentUtil.toMoment, publishDate )
|
544 |
);
|
545 |
expect( gen.next( startMoment ).value ).toEqual(
|
546 |
-
call( momentUtil.toDatabaseDate, startMoment )
|
547 |
);
|
548 |
expect( gen.next( startDate ).value ).toEqual(
|
549 |
-
call( momentUtil.toDate, startMoment )
|
550 |
);
|
551 |
expect( gen.next( startDateInput ).value ).toEqual(
|
552 |
-
call( momentUtil.toDatabaseTime, startMoment )
|
553 |
);
|
554 |
expect( gen.next( startTime ).value ).toEqual(
|
555 |
-
call( momentUtil.toTime, startMoment )
|
556 |
);
|
557 |
expect( gen.next( startTime ).value ).toEqual(
|
558 |
all( [
|
@@ -567,25 +567,25 @@ describe( 'Ticket Block sagas', () => {
|
|
567 |
put( actions.setTicketTempStartTime( action.payload.clientId, startTime ) ),
|
568 |
put( actions.setTicketTempStartTimeInput( action.payload.clientId, startTime ) ),
|
569 |
put( actions.setTicketHasBeenCreated( action.payload.clientId, HAS_BEEN_CREATED ) ),
|
570 |
-
] )
|
571 |
);
|
572 |
expect( gen.next().value ).toEqual(
|
573 |
-
select( global.tribe.events.data.blocks.datetime.selectors.getStart )
|
574 |
-
)
|
575 |
expect( gen.next( eventStart ).value ).toEqual(
|
576 |
-
call( momentUtil.toMoment, eventStart )
|
577 |
);
|
578 |
expect( gen.next( endMoment ).value ).toEqual(
|
579 |
-
call( momentUtil.toDatabaseDate, endMoment )
|
580 |
);
|
581 |
expect( gen.next( endDate ).value ).toEqual(
|
582 |
-
call( momentUtil.toDate, endMoment )
|
583 |
);
|
584 |
expect( gen.next( endDateInput ).value ).toEqual(
|
585 |
-
call( momentUtil.toDatabaseTime, endMoment )
|
586 |
);
|
587 |
expect( gen.next( endTime ).value ).toEqual(
|
588 |
-
call( momentUtil.toTime, endMoment )
|
589 |
);
|
590 |
expect( gen.next( endTime ).value ).toEqual(
|
591 |
all( [
|
@@ -599,13 +599,13 @@ describe( 'Ticket Block sagas', () => {
|
|
599 |
put( actions.setTicketTempEndDateMoment( action.payload.clientId, endMoment ) ),
|
600 |
put( actions.setTicketTempEndTime( action.payload.clientId, endTime ) ),
|
601 |
put( actions.setTicketTempEndTimeInput( action.payload.clientId, endTime ) ),
|
602 |
-
] )
|
603 |
);
|
604 |
expect( gen.next().value ).toEqual(
|
605 |
-
select( plugins.selectors.hasPlugin, plugins.constants.TICKETS_PLUS )
|
606 |
);
|
607 |
expect( gen.next( false ).value ).toEqual(
|
608 |
-
select( selectors.getTicketsSharedCapacity )
|
609 |
);
|
610 |
|
611 |
const clone1 = gen.clone();
|
@@ -615,13 +615,13 @@ describe( 'Ticket Block sagas', () => {
|
|
615 |
all( [
|
616 |
put( actions.setTicketId( CLIENT_ID, TICKET_ID ) ),
|
617 |
call( sagas.fetchTicket, { payload: { clientId: CLIENT_ID, ticketId: TICKET_ID } } ),
|
618 |
-
] )
|
619 |
);
|
620 |
expect( clone1.next().value ).toEqual(
|
621 |
-
call( sagas.handleTicketDurationError, CLIENT_ID )
|
622 |
);
|
623 |
expect( clone1.next().value ).toEqual(
|
624 |
-
fork( sagas.saveTicketWithPostSave, CLIENT_ID )
|
625 |
);
|
626 |
expect( clone1.next().done ).toEqual( true );
|
627 |
|
@@ -632,19 +632,19 @@ describe( 'Ticket Block sagas', () => {
|
|
632 |
all( [
|
633 |
put( actions.setTicketCapacity( CLIENT_ID, sharedCapacity ) ),
|
634 |
put( actions.setTicketTempCapacity( CLIENT_ID, sharedCapacity ) ),
|
635 |
-
] )
|
636 |
);
|
637 |
expect( clone2.next().value ).toEqual(
|
638 |
all( [
|
639 |
put( actions.setTicketId( CLIENT_ID, TICKET_ID ) ),
|
640 |
call( sagas.fetchTicket, { payload: { clientId: CLIENT_ID, ticketId: TICKET_ID } } ),
|
641 |
-
] )
|
642 |
);
|
643 |
expect( clone2.next().value ).toEqual(
|
644 |
-
call( sagas.handleTicketDurationError, CLIENT_ID )
|
645 |
);
|
646 |
expect( clone2.next().value ).toEqual(
|
647 |
-
fork( sagas.saveTicketWithPostSave, CLIENT_ID )
|
648 |
);
|
649 |
expect( clone2.next().done ).toEqual( true );
|
650 |
} );
|
@@ -670,19 +670,19 @@ describe( 'Ticket Block sagas', () => {
|
|
670 |
const gen = cloneableGenerator( sagas.setTicketInitialState )( action );
|
671 |
expect( gen.next().value ).toMatchSnapshot();
|
672 |
expect( gen.next( publishDate ).value ).toEqual(
|
673 |
-
call( momentUtil.toMoment, publishDate )
|
674 |
);
|
675 |
expect( gen.next( startMoment ).value ).toEqual(
|
676 |
-
call( momentUtil.toDatabaseDate, startMoment )
|
677 |
);
|
678 |
expect( gen.next( startDate ).value ).toEqual(
|
679 |
-
call( momentUtil.toDate, startMoment )
|
680 |
);
|
681 |
expect( gen.next( startDateInput ).value ).toEqual(
|
682 |
-
call( momentUtil.toDatabaseTime, startMoment )
|
683 |
);
|
684 |
expect( gen.next( startTime ).value ).toEqual(
|
685 |
-
call( momentUtil.toTime, startMoment )
|
686 |
);
|
687 |
expect( gen.next( startTime ).value ).toEqual(
|
688 |
all( [
|
@@ -697,25 +697,25 @@ describe( 'Ticket Block sagas', () => {
|
|
697 |
put( actions.setTicketTempStartTime( action.payload.clientId, startTime ) ),
|
698 |
put( actions.setTicketTempStartTimeInput( action.payload.clientId, startTime ) ),
|
699 |
put( actions.setTicketHasBeenCreated( action.payload.clientId, HAS_BEEN_CREATED ) ),
|
700 |
-
] )
|
701 |
);
|
702 |
expect( gen.next().value ).toEqual(
|
703 |
-
select( global.tribe.events.data.blocks.datetime.selectors.getStart )
|
704 |
-
)
|
705 |
expect( gen.next( eventStart ).value ).toEqual(
|
706 |
-
call( momentUtil.toMoment, eventStart )
|
707 |
);
|
708 |
expect( gen.next( endMoment ).value ).toEqual(
|
709 |
-
call( momentUtil.toDatabaseDate, endMoment )
|
710 |
);
|
711 |
expect( gen.next( endDate ).value ).toEqual(
|
712 |
-
call( momentUtil.toDate, endMoment )
|
713 |
);
|
714 |
expect( gen.next( endDateInput ).value ).toEqual(
|
715 |
-
call( momentUtil.toDatabaseTime, endMoment )
|
716 |
);
|
717 |
expect( gen.next( endTime ).value ).toEqual(
|
718 |
-
call( momentUtil.toTime, endMoment )
|
719 |
);
|
720 |
expect( gen.next( endTime ).value ).toEqual(
|
721 |
all( [
|
@@ -729,23 +729,23 @@ describe( 'Ticket Block sagas', () => {
|
|
729 |
put( actions.setTicketTempEndDateMoment( action.payload.clientId, endMoment ) ),
|
730 |
put( actions.setTicketTempEndTime( action.payload.clientId, endTime ) ),
|
731 |
put( actions.setTicketTempEndTimeInput( action.payload.clientId, endTime ) ),
|
732 |
-
] )
|
733 |
);
|
734 |
expect( gen.next().value ).toEqual(
|
735 |
-
select( plugins.selectors.hasPlugin, plugins.constants.TICKETS_PLUS )
|
736 |
);
|
737 |
expect( gen.next( false ).value ).toEqual(
|
738 |
-
select( selectors.getTicketsSharedCapacity )
|
739 |
);
|
740 |
|
741 |
const clone1 = gen.clone();
|
742 |
const blankSharedCapacity = '';
|
743 |
|
744 |
expect( clone1.next().value ).toEqual(
|
745 |
-
call( sagas.handleTicketDurationError, CLIENT_ID )
|
746 |
);
|
747 |
expect( clone1.next().value ).toEqual(
|
748 |
-
fork( sagas.saveTicketWithPostSave, CLIENT_ID )
|
749 |
);
|
750 |
expect( clone1.next( blankSharedCapacity ).done ).toEqual( true );
|
751 |
|
@@ -756,13 +756,13 @@ describe( 'Ticket Block sagas', () => {
|
|
756 |
all( [
|
757 |
put( actions.setTicketCapacity( CLIENT_ID, sharedCapacity ) ),
|
758 |
put( actions.setTicketTempCapacity( CLIENT_ID, sharedCapacity ) ),
|
759 |
-
] )
|
760 |
);
|
761 |
expect( clone2.next().value ).toEqual(
|
762 |
-
call( sagas.handleTicketDurationError, CLIENT_ID )
|
763 |
);
|
764 |
expect( clone2.next().value ).toEqual(
|
765 |
-
fork( sagas.saveTicketWithPostSave, CLIENT_ID )
|
766 |
);
|
767 |
expect( clone2.next().done ).toEqual( true );
|
768 |
} );
|
@@ -788,19 +788,19 @@ describe( 'Ticket Block sagas', () => {
|
|
788 |
const gen = cloneableGenerator( sagas.setTicketInitialState )( action );
|
789 |
expect( gen.next().value ).toMatchSnapshot();
|
790 |
expect( gen.next( publishDate ).value ).toEqual(
|
791 |
-
call( momentUtil.toMoment, publishDate )
|
792 |
);
|
793 |
expect( gen.next( startMoment ).value ).toEqual(
|
794 |
-
call( momentUtil.toDatabaseDate, startMoment )
|
795 |
);
|
796 |
expect( gen.next( startDate ).value ).toEqual(
|
797 |
-
call( momentUtil.toDate, startMoment )
|
798 |
);
|
799 |
expect( gen.next( startDateInput ).value ).toEqual(
|
800 |
-
call( momentUtil.toDatabaseTime, startMoment )
|
801 |
);
|
802 |
expect( gen.next( startTime ).value ).toEqual(
|
803 |
-
call( momentUtil.toTime, startMoment )
|
804 |
);
|
805 |
expect( gen.next( startTime ).value ).toEqual(
|
806 |
all( [
|
@@ -815,25 +815,25 @@ describe( 'Ticket Block sagas', () => {
|
|
815 |
put( actions.setTicketTempStartTime( action.payload.clientId, startTime ) ),
|
816 |
put( actions.setTicketTempStartTimeInput( action.payload.clientId, startTime ) ),
|
817 |
put( actions.setTicketHasBeenCreated( action.payload.clientId, HAS_BEEN_CREATED ) ),
|
818 |
-
] )
|
819 |
);
|
820 |
expect( gen.next().value ).toEqual(
|
821 |
-
select( global.tribe.events.data.blocks.datetime.selectors.getStart )
|
822 |
-
)
|
823 |
expect( gen.next( eventStart ).value ).toEqual(
|
824 |
-
call( momentUtil.toMoment, eventStart )
|
825 |
);
|
826 |
expect( gen.next( endMoment ).value ).toEqual(
|
827 |
-
call( momentUtil.toDatabaseDate, endMoment )
|
828 |
);
|
829 |
expect( gen.next( endDate ).value ).toEqual(
|
830 |
-
call( momentUtil.toDate, endMoment )
|
831 |
);
|
832 |
expect( gen.next( endDateInput ).value ).toEqual(
|
833 |
-
call( momentUtil.toDatabaseTime, endMoment )
|
834 |
);
|
835 |
expect( gen.next( endTime ).value ).toEqual(
|
836 |
-
call( momentUtil.toTime, endMoment )
|
837 |
);
|
838 |
expect( gen.next( endTime ).value ).toEqual(
|
839 |
all( [
|
@@ -847,25 +847,31 @@ describe( 'Ticket Block sagas', () => {
|
|
847 |
put( actions.setTicketTempEndDateMoment( action.payload.clientId, endMoment ) ),
|
848 |
put( actions.setTicketTempEndTime( action.payload.clientId, endTime ) ),
|
849 |
put( actions.setTicketTempEndTimeInput( action.payload.clientId, endTime ) ),
|
850 |
-
] )
|
851 |
);
|
852 |
expect( gen.next().value ).toEqual(
|
853 |
-
select( plugins.selectors.hasPlugin, plugins.constants.TICKETS_PLUS )
|
854 |
);
|
855 |
expect( gen.next( true ).value ).toEqual(
|
856 |
all( [
|
857 |
-
put( actions.setTicketCapacityType(
|
858 |
-
|
859 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
860 |
);
|
861 |
expect( gen.next().value ).toEqual(
|
862 |
-
select( selectors.getTicketsSharedCapacity )
|
863 |
);
|
864 |
expect( gen.next().value ).toEqual(
|
865 |
-
call( sagas.handleTicketDurationError, CLIENT_ID )
|
866 |
);
|
867 |
expect( gen.next().value ).toEqual(
|
868 |
-
fork( sagas.saveTicketWithPostSave, CLIENT_ID )
|
869 |
);
|
870 |
expect( gen.next( '' ).done ).toEqual( true );
|
871 |
} );
|
@@ -882,52 +888,52 @@ describe( 'Ticket Block sagas', () => {
|
|
882 |
|
883 |
expect( gen.next().value ).toMatchSnapshot();
|
884 |
expect( gen.next( rootClientId ).value ).toEqual(
|
885 |
-
select( selectors.getTicketProvider, props )
|
886 |
);
|
887 |
expect( gen.next().value ).toEqual(
|
888 |
-
select( selectors.getTicketsProvider )
|
889 |
);
|
890 |
expect( gen.next().value ).toMatchSnapshot();
|
891 |
expect( gen.next( postId ).value ).toEqual(
|
892 |
-
select( selectors.getTicketTempTitle, props )
|
893 |
);
|
894 |
expect( gen.next().value ).toEqual(
|
895 |
-
select( selectors.getTicketTempDescription, props )
|
896 |
);
|
897 |
expect( gen.next().value ).toEqual(
|
898 |
-
select( selectors.getTicketTempPrice, props )
|
899 |
);
|
900 |
expect( gen.next().value ).toEqual(
|
901 |
-
select( selectors.getTicketTempStartDate, props )
|
902 |
);
|
903 |
expect( gen.next().value ).toEqual(
|
904 |
-
select( selectors.getTicketTempStartTime, props )
|
905 |
);
|
906 |
expect( gen.next().value ).toEqual(
|
907 |
-
select( selectors.getTicketTempEndDate, props )
|
908 |
);
|
909 |
expect( gen.next().value ).toEqual(
|
910 |
-
select( selectors.getTicketTempEndTime, props )
|
911 |
);
|
912 |
expect( gen.next().value ).toEqual(
|
913 |
-
select( selectors.getTicketTempSku, props )
|
914 |
);
|
915 |
expect( gen.next().value ).toEqual(
|
916 |
-
select( selectors.getTicketTempIACSetting, props )
|
917 |
);
|
918 |
expect( gen.next().value ).toMatchSnapshot();
|
919 |
expect( gen.next( menuOrder ).value ).toEqual(
|
920 |
-
select( selectors.getTicketTempCapacityType, props )
|
921 |
);
|
922 |
|
923 |
const clone1 = gen.clone();
|
924 |
const sharedCapacityType = TICKET_TYPES[ SHARED ];
|
925 |
|
926 |
expect( clone1.next( sharedCapacityType ).value ).toEqual(
|
927 |
-
select( selectors.getTicketTempCapacity, props )
|
928 |
);
|
929 |
expect( clone1.next().value ).toEqual(
|
930 |
-
select( selectors.getTicketsTempSharedCapacity )
|
931 |
);
|
932 |
expect( clone1.next().done ).toEqual( true );
|
933 |
|
@@ -935,7 +941,7 @@ describe( 'Ticket Block sagas', () => {
|
|
935 |
const independentCapacityType = TICKET_TYPES[ INDEPENDENT ];
|
936 |
|
937 |
expect( clone2.next( independentCapacityType ).value ).toEqual(
|
938 |
-
select( selectors.getTicketTempCapacity, props )
|
939 |
);
|
940 |
expect( clone2.next().done ).toEqual( true );
|
941 |
} );
|
@@ -954,13 +960,13 @@ describe( 'Ticket Block sagas', () => {
|
|
954 |
|
955 |
const gen = cloneableGenerator( sagas.fetchTicket )( action );
|
956 |
expect( gen.next().value ).toEqual(
|
957 |
-
put( actions.setTicketIsLoading( CLIENT_ID, true ) )
|
958 |
);
|
959 |
expect( gen.next().value ).toEqual(
|
960 |
call( wpREST, {
|
961 |
path: `tickets/${ TICKET_ID }`,
|
962 |
namespace: 'tribe/tickets/v1',
|
963 |
-
} )
|
964 |
);
|
965 |
|
966 |
const clone1 = gen.clone();
|
@@ -972,7 +978,7 @@ describe( 'Ticket Block sagas', () => {
|
|
972 |
};
|
973 |
|
974 |
expect( clone1.next( apiResponse1 ).value ).toEqual(
|
975 |
-
put( actions.setTicketIsLoading( CLIENT_ID, false ) )
|
976 |
);
|
977 |
expect( clone1.next().done ).toEqual( true );
|
978 |
|
@@ -1013,22 +1019,22 @@ describe( 'Ticket Block sagas', () => {
|
|
1013 |
const endTimeInput2 = '';
|
1014 |
|
1015 |
expect( clone2.next( apiResponse2 ).value ).toEqual(
|
1016 |
-
call( momentUtil.toMoment, apiResponse2.data.available_from )
|
1017 |
);
|
1018 |
expect( clone2.next( startMoment2 ).value ).toEqual(
|
1019 |
-
call( momentUtil.toDatabaseDate, startMoment2 )
|
1020 |
);
|
1021 |
expect( clone2.next( startDate2 ).value ).toEqual(
|
1022 |
-
call( momentUtil.toDate, startMoment2 )
|
1023 |
);
|
1024 |
expect( clone2.next( startDateInput2 ).value ).toEqual(
|
1025 |
-
call( momentUtil.toDatabaseTime, startMoment2 )
|
1026 |
);
|
1027 |
expect( clone2.next( startTime2 ).value ).toEqual(
|
1028 |
-
call( momentUtil.toTime, startMoment2 )
|
1029 |
);
|
1030 |
expect( clone2.next( startTimeInput2 ).value ).toEqual(
|
1031 |
-
call( momentUtil.toMoment, '' )
|
1032 |
);
|
1033 |
|
1034 |
const details2 = {
|
@@ -1057,15 +1063,24 @@ describe( 'Ticket Block sagas', () => {
|
|
1057 |
put( actions.setTicketTempDetails( CLIENT_ID, details2 ) ),
|
1058 |
put( actions.setTicketSold( CLIENT_ID, apiResponse2.data.totals.sold ) ),
|
1059 |
put( actions.setTicketAvailable( CLIENT_ID, apiResponse2.data.totals.stock ) ),
|
1060 |
-
put( actions.setTicketCurrencySymbol(
|
1061 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1062 |
put( actions.setTicketProvider( CLIENT_ID, apiResponse2.data.provider ) ),
|
1063 |
-
put( actions.setTicketHasAttendeeInfoFields(
|
|
|
|
|
|
|
1064 |
put( actions.setTicketHasBeenCreated( CLIENT_ID, true ) ),
|
1065 |
-
] )
|
1066 |
);
|
1067 |
expect( clone2.next().value ).toEqual(
|
1068 |
-
put( actions.setTicketIsLoading( CLIENT_ID, false ) )
|
1069 |
);
|
1070 |
expect( clone2.next().done ).toEqual( true );
|
1071 |
|
@@ -1107,37 +1122,37 @@ describe( 'Ticket Block sagas', () => {
|
|
1107 |
const endTimeInput3 = momentUtil.toTime( endMoment3 );
|
1108 |
|
1109 |
expect( clone3.next( apiResponse3 ).value ).toEqual(
|
1110 |
-
call( momentUtil.toMoment, apiResponse3.data.available_from )
|
1111 |
);
|
1112 |
expect( clone3.next( startMoment3 ).value ).toEqual(
|
1113 |
-
call( momentUtil.toDatabaseDate, startMoment3 )
|
1114 |
);
|
1115 |
expect( clone3.next( startDate3 ).value ).toEqual(
|
1116 |
-
call( momentUtil.toDate, startMoment3 )
|
1117 |
);
|
1118 |
expect( clone3.next( startDateInput3 ).value ).toEqual(
|
1119 |
-
call( momentUtil.toDatabaseTime, startMoment3 )
|
1120 |
);
|
1121 |
expect( clone3.next( startTime3 ).value ).toEqual(
|
1122 |
-
call( momentUtil.toTime, startMoment3 )
|
1123 |
);
|
1124 |
expect( clone3.next( startTimeInput3 ).value ).toEqual(
|
1125 |
-
call( momentUtil.toMoment, '' )
|
1126 |
);
|
1127 |
expect( clone3.next( endMoment2 ).value ).toEqual(
|
1128 |
-
call( momentUtil.toMoment, apiResponse3.data.available_until )
|
1129 |
);
|
1130 |
expect( clone3.next( endMoment3 ).value ).toEqual(
|
1131 |
-
call( momentUtil.toDatabaseDate, endMoment3 )
|
1132 |
);
|
1133 |
expect( clone3.next( endDate3 ).value ).toEqual(
|
1134 |
-
call( momentUtil.toDate, endMoment3 )
|
1135 |
);
|
1136 |
expect( clone3.next( endDateInput3 ).value ).toEqual(
|
1137 |
-
call( momentUtil.toDatabaseTime, endMoment3 )
|
1138 |
);
|
1139 |
expect( clone3.next( startTime3 ).value ).toEqual(
|
1140 |
-
call( momentUtil.toTime, endMoment3 )
|
1141 |
);
|
1142 |
|
1143 |
const details3 = {
|
@@ -1166,15 +1181,24 @@ describe( 'Ticket Block sagas', () => {
|
|
1166 |
put( actions.setTicketTempDetails( CLIENT_ID, details3 ) ),
|
1167 |
put( actions.setTicketSold( CLIENT_ID, apiResponse3.data.totals.sold ) ),
|
1168 |
put( actions.setTicketAvailable( CLIENT_ID, apiResponse3.data.totals.stock ) ),
|
1169 |
-
put( actions.setTicketCurrencySymbol(
|
1170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1171 |
put( actions.setTicketProvider( CLIENT_ID, apiResponse3.data.provider ) ),
|
1172 |
-
put( actions.setTicketHasAttendeeInfoFields(
|
|
|
|
|
|
|
1173 |
put( actions.setTicketHasBeenCreated( CLIENT_ID, true ) ),
|
1174 |
-
] )
|
1175 |
);
|
1176 |
expect( clone3.next().value ).toEqual(
|
1177 |
-
put( actions.setTicketIsLoading( CLIENT_ID, false ) )
|
1178 |
);
|
1179 |
expect( clone3.next().done ).toEqual( true );
|
1180 |
} );
|
@@ -1224,13 +1248,13 @@ describe( 'Ticket Block sagas', () => {
|
|
1224 |
|
1225 |
const gen = cloneableGenerator( sagas.createNewTicket )( action );
|
1226 |
expect( gen.next().value ).toEqual(
|
1227 |
-
call( sagas.setBodyDetails, CLIENT_ID )
|
1228 |
);
|
1229 |
|
1230 |
const body = new FormData();
|
1231 |
|
1232 |
expect( gen.next( body ).value ).toEqual(
|
1233 |
-
put( actions.setTicketIsLoading( CLIENT_ID, true ) )
|
1234 |
);
|
1235 |
expect( gen.next().value ).toEqual(
|
1236 |
call( wpREST, {
|
@@ -1240,7 +1264,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1240 |
method: 'POST',
|
1241 |
body,
|
1242 |
},
|
1243 |
-
} )
|
1244 |
);
|
1245 |
|
1246 |
const clone1 = gen.clone();
|
@@ -1258,7 +1282,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1258 |
};
|
1259 |
|
1260 |
expect( clone1.next( apiResponse1 ).value ).toEqual(
|
1261 |
-
select( selectors.getTicketsSharedCapacity )
|
1262 |
);
|
1263 |
|
1264 |
const clone11 = clone1.clone();
|
@@ -1266,10 +1290,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1266 |
const tempSharedCapacity11 = 100;
|
1267 |
|
1268 |
expect( clone11.next( sharedCapacity11 ).value ).toEqual(
|
1269 |
-
select( selectors.getTicketsTempSharedCapacity )
|
1270 |
);
|
1271 |
expect( clone11.next( tempSharedCapacity11 ).value ).toEqual(
|
1272 |
-
put( actions.setTicketsSharedCapacity( tempSharedCapacity11 ) )
|
1273 |
);
|
1274 |
expect( clone11.next().value ).toEqual(
|
1275 |
all( [
|
@@ -1290,7 +1314,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1290 |
select( selectors.getTicketTempEndTimeInput, props ),
|
1291 |
select( selectors.getTicketTempCapacityType, props ),
|
1292 |
select( selectors.getTicketTempCapacity, props ),
|
1293 |
-
] )
|
1294 |
);
|
1295 |
|
1296 |
expect( clone11.next( [
|
@@ -1343,13 +1367,13 @@ describe( 'Ticket Block sagas', () => {
|
|
1343 |
PROVIDER_CLASS_TO_PROVIDER_MAPPING[ apiResponse1.data.provider_class ],
|
1344 |
) ),
|
1345 |
put( actions.setTicketHasChanges( CLIENT_ID, false ) ),
|
1346 |
-
] )
|
1347 |
);
|
1348 |
expect( clone11.next().value ).toEqual(
|
1349 |
-
fork( sagas.saveTicketWithPostSave, CLIENT_ID )
|
1350 |
);
|
1351 |
expect( clone11.next().value ).toEqual(
|
1352 |
-
put( actions.setTicketIsLoading( CLIENT_ID, false ) )
|
1353 |
);
|
1354 |
expect( clone11.next().done ).toEqual( true );
|
1355 |
|
@@ -1358,7 +1382,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1358 |
const tempSharedCapacity12 = 100;
|
1359 |
|
1360 |
expect( clone12.next( sharedCapacity12 ).value ).toEqual(
|
1361 |
-
select( selectors.getTicketsTempSharedCapacity )
|
1362 |
);
|
1363 |
expect( clone12.next( tempSharedCapacity12 ).value ).toEqual(
|
1364 |
all( [
|
@@ -1379,7 +1403,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1379 |
select( selectors.getTicketTempEndTimeInput, props ),
|
1380 |
select( selectors.getTicketTempCapacityType, props ),
|
1381 |
select( selectors.getTicketTempCapacity, props ),
|
1382 |
-
] )
|
1383 |
);
|
1384 |
|
1385 |
expect( clone12.next( [
|
@@ -1432,13 +1456,13 @@ describe( 'Ticket Block sagas', () => {
|
|
1432 |
PROVIDER_CLASS_TO_PROVIDER_MAPPING[ apiResponse1.data.provider_class ],
|
1433 |
) ),
|
1434 |
put( actions.setTicketHasChanges( CLIENT_ID, false ) ),
|
1435 |
-
] )
|
1436 |
);
|
1437 |
expect( clone12.next().value ).toEqual(
|
1438 |
-
fork( sagas.saveTicketWithPostSave, CLIENT_ID )
|
1439 |
);
|
1440 |
expect( clone12.next().value ).toEqual(
|
1441 |
-
put( actions.setTicketIsLoading( CLIENT_ID, false ) )
|
1442 |
);
|
1443 |
expect( clone12.next().done ).toEqual( true );
|
1444 |
|
@@ -1450,7 +1474,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1450 |
};
|
1451 |
|
1452 |
expect( clone2.next( apiResponse2 ).value ).toEqual(
|
1453 |
-
put( actions.setTicketIsLoading( CLIENT_ID, false ) )
|
1454 |
);
|
1455 |
expect( clone2.next().done ).toEqual( true );
|
1456 |
} );
|
@@ -1487,16 +1511,16 @@ describe( 'Ticket Block sagas', () => {
|
|
1487 |
|
1488 |
const gen = cloneableGenerator( sagas.updateTicket )( action );
|
1489 |
expect( gen.next().value ).toEqual(
|
1490 |
-
call( sagas.setBodyDetails, CLIENT_ID )
|
1491 |
);
|
1492 |
|
1493 |
const body = new FormData();
|
1494 |
|
1495 |
expect( gen.next( body ).value ).toEqual(
|
1496 |
-
select( selectors.getTicketId, props )
|
1497 |
);
|
1498 |
expect( gen.next( TICKET_ID ).value ).toEqual(
|
1499 |
-
put( actions.setTicketIsLoading( CLIENT_ID, true ) )
|
1500 |
);
|
1501 |
|
1502 |
const data = [];
|
@@ -1515,7 +1539,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1515 |
method: 'PUT',
|
1516 |
body: data.join( '&' ),
|
1517 |
},
|
1518 |
-
} )
|
1519 |
);
|
1520 |
|
1521 |
const clone1 = gen.clone();
|
@@ -1526,7 +1550,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1526 |
};
|
1527 |
|
1528 |
expect( clone1.next( apiResponse1 ).value ).toEqual(
|
1529 |
-
put( actions.setTicketIsLoading( CLIENT_ID, false ) )
|
1530 |
);
|
1531 |
expect( clone1.next().done ).toEqual( true );
|
1532 |
|
@@ -1562,7 +1586,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1562 |
select( selectors.getTicketTempEndTimeInput, props ),
|
1563 |
select( selectors.getTicketTempCapacityType, props ),
|
1564 |
select( selectors.getTicketTempCapacity, props ),
|
1565 |
-
] )
|
1566 |
);
|
1567 |
expect( clone2.next( [
|
1568 |
title,
|
@@ -1612,10 +1636,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1612 |
apiResponse2.data.capacity_details.available,
|
1613 |
) ),
|
1614 |
put( actions.setTicketHasChanges( CLIENT_ID, false ) ),
|
1615 |
-
] )
|
1616 |
);
|
1617 |
expect( clone2.next( apiResponse1 ).value ).toEqual(
|
1618 |
-
put( actions.setTicketIsLoading( CLIENT_ID, false ) )
|
1619 |
);
|
1620 |
expect( clone2.next().done ).toEqual( true );
|
1621 |
} );
|
@@ -1635,25 +1659,26 @@ describe( 'Ticket Block sagas', () => {
|
|
1635 |
|
1636 |
const gen = cloneableGenerator( sagas.deleteTicket )( action );
|
1637 |
|
1638 |
-
expect( gen.next().value ).toEqual(
|
1639 |
-
|
1640 |
-
|
|
|
1641 |
|
1642 |
expect( gen.next( true ).value ).toEqual(
|
1643 |
-
select( selectors.getTicketId, props )
|
1644 |
);
|
1645 |
expect( gen.next( TICKET_ID ).value ).toEqual(
|
1646 |
-
select( selectors.getTicketHasBeenCreated, props )
|
1647 |
);
|
1648 |
|
1649 |
const clone1 = gen.clone();
|
1650 |
const hasBeenCreated1 = false;
|
1651 |
|
1652 |
expect( clone1.next( hasBeenCreated1 ).value ).toEqual(
|
1653 |
-
put( actions.setTicketIsSelected( CLIENT_ID, false ) )
|
1654 |
);
|
1655 |
expect( clone1.next().value ).toEqual(
|
1656 |
-
put( actions.removeTicketBlock( CLIENT_ID ) )
|
1657 |
);
|
1658 |
expect( clone1.next().value ).toMatchSnapshot();
|
1659 |
expect( clone1.next().value ).toMatchSnapshot();
|
@@ -1667,10 +1692,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1667 |
];
|
1668 |
|
1669 |
expect( clone2.next( hasBeenCreated2 ).value ).toEqual(
|
1670 |
-
put( actions.setTicketIsSelected( CLIENT_ID, false ) )
|
1671 |
);
|
1672 |
expect( clone2.next().value ).toEqual(
|
1673 |
-
put( actions.removeTicketBlock( CLIENT_ID ) )
|
1674 |
);
|
1675 |
expect( clone2.next().value ).toMatchSnapshot();
|
1676 |
expect( clone2.next().value ).toMatchSnapshot();
|
@@ -1686,7 +1711,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1686 |
method: 'DELETE',
|
1687 |
body: body.join( '&' ),
|
1688 |
},
|
1689 |
-
} )
|
1690 |
);
|
1691 |
expect( clone2.next().done ).toEqual( true );
|
1692 |
} );
|
@@ -1702,10 +1727,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1702 |
const gen = cloneableGenerator( sagas.fetchTicketsHeaderImage )( action );
|
1703 |
|
1704 |
expect( gen.next().value ).toEqual(
|
1705 |
-
put( actions.setTicketsIsSettingsLoading( true ) )
|
1706 |
);
|
1707 |
expect( gen.next().value ).toEqual(
|
1708 |
-
call( wpREST, { path: `media/${ action.payload.id }` } )
|
1709 |
);
|
1710 |
|
1711 |
const clone1 = gen.clone();
|
@@ -1717,7 +1742,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1717 |
};
|
1718 |
|
1719 |
expect( clone1.next( apiResponseBad ).value ).toEqual(
|
1720 |
-
put( actions.setTicketsIsSettingsLoading( false ) )
|
1721 |
);
|
1722 |
expect( clone1.next().done ).toEqual( true );
|
1723 |
|
@@ -1744,10 +1769,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1744 |
id: apiResponseGood.data.id,
|
1745 |
alt: apiResponseGood.data.alt_text,
|
1746 |
src: apiResponseGood.data.media_details.sizes.medium.source_url,
|
1747 |
-
} ) )
|
1748 |
);
|
1749 |
expect( clone2.next().value ).toEqual(
|
1750 |
-
put( actions.setTicketsIsSettingsLoading( false ) )
|
1751 |
);
|
1752 |
expect( clone2.next().done ).toEqual( true );
|
1753 |
} );
|
@@ -1773,10 +1798,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1773 |
|
1774 |
expect( gen.next().value ).toMatchSnapshot();
|
1775 |
expect( gen.next( postId ).value ).toEqual(
|
1776 |
-
put( actions.setTicketsIsSettingsLoading( true ) )
|
1777 |
);
|
1778 |
expect( gen.next().value ).toEqual(
|
1779 |
-
put( rsvpActions.setRSVPIsSettingsLoading( true ) )
|
1780 |
);
|
1781 |
expect( gen.next().value ).toEqual(
|
1782 |
call( wpREST, {
|
@@ -1792,7 +1817,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1792 |
},
|
1793 |
} ),
|
1794 |
},
|
1795 |
-
} )
|
1796 |
);
|
1797 |
|
1798 |
const apiResponse = {
|
@@ -1806,16 +1831,16 @@ describe( 'Ticket Block sagas', () => {
|
|
1806 |
src: action.payload.image.sizes.medium.url,
|
1807 |
};
|
1808 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1809 |
-
put( actions.setTicketsHeaderImage( headerImage ) )
|
1810 |
);
|
1811 |
expect( gen.next().value ).toEqual(
|
1812 |
-
put( rsvpActions.setRSVPHeaderImage( headerImage ) )
|
1813 |
);
|
1814 |
expect( gen.next().value ).toEqual(
|
1815 |
-
put( actions.setTicketsIsSettingsLoading( false ) )
|
1816 |
);
|
1817 |
expect( gen.next().value ).toEqual(
|
1818 |
-
put( rsvpActions.setRSVPIsSettingsLoading( false ) )
|
1819 |
);
|
1820 |
expect( gen.next().done ).toEqual( true );
|
1821 |
} );
|
@@ -1839,10 +1864,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1839 |
|
1840 |
expect( gen.next().value ).toMatchSnapshot();
|
1841 |
expect( gen.next( postId ).value ).toEqual(
|
1842 |
-
put( actions.setTicketsIsSettingsLoading( true ) )
|
1843 |
);
|
1844 |
expect( gen.next().value ).toEqual(
|
1845 |
-
put( rsvpActions.setRSVPIsSettingsLoading( true ) )
|
1846 |
);
|
1847 |
expect( gen.next().value ).toEqual(
|
1848 |
call( wpREST, {
|
@@ -1858,7 +1883,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1858 |
},
|
1859 |
} ),
|
1860 |
},
|
1861 |
-
} )
|
1862 |
);
|
1863 |
|
1864 |
const apiResponse = {
|
@@ -1867,10 +1892,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1867 |
},
|
1868 |
};
|
1869 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1870 |
-
put( actions.setTicketsIsSettingsLoading( false ) )
|
1871 |
);
|
1872 |
expect( gen.next().value ).toEqual(
|
1873 |
-
put( rsvpActions.setRSVPIsSettingsLoading( false ) )
|
1874 |
);
|
1875 |
expect( gen.next().done ).toEqual( true );
|
1876 |
} );
|
@@ -1883,10 +1908,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1883 |
const gen = sagas.deleteTicketsHeaderImage();
|
1884 |
expect( gen.next().value ).toMatchSnapshot();
|
1885 |
expect( gen.next( postId ).value ).toEqual(
|
1886 |
-
put( actions.setTicketsIsSettingsLoading( true ) )
|
1887 |
);
|
1888 |
expect( gen.next().value ).toEqual(
|
1889 |
-
put( rsvpActions.setRSVPIsSettingsLoading( true ) )
|
1890 |
);
|
1891 |
expect( gen.next().value ).toEqual(
|
1892 |
call( wpREST, {
|
@@ -1902,7 +1927,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1902 |
},
|
1903 |
} ),
|
1904 |
},
|
1905 |
-
} )
|
1906 |
);
|
1907 |
|
1908 |
const apiResponse = {
|
@@ -1912,16 +1937,16 @@ describe( 'Ticket Block sagas', () => {
|
|
1912 |
};
|
1913 |
|
1914 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1915 |
-
put( actions.setTicketsHeaderImage( TICKET_HEADER_IMAGE_DEFAULT_STATE ) )
|
1916 |
);
|
1917 |
expect( gen.next().value ).toEqual(
|
1918 |
-
put( rsvpActions.setRSVPHeaderImage( RSVP_HEADER_IMAGE_DEFAULT_STATE ) )
|
1919 |
);
|
1920 |
expect( gen.next().value ).toEqual(
|
1921 |
-
put( actions.setTicketsIsSettingsLoading( false ) )
|
1922 |
);
|
1923 |
expect( gen.next().value ).toEqual(
|
1924 |
-
put( rsvpActions.setRSVPIsSettingsLoading( false ) )
|
1925 |
);
|
1926 |
expect( gen.next().done ).toEqual( true );
|
1927 |
} );
|
@@ -1932,10 +1957,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1932 |
const gen = sagas.deleteTicketsHeaderImage();
|
1933 |
expect( gen.next().value ).toMatchSnapshot();
|
1934 |
expect( gen.next( postId ).value ).toEqual(
|
1935 |
-
put( actions.setTicketsIsSettingsLoading( true ) )
|
1936 |
);
|
1937 |
expect( gen.next().value ).toEqual(
|
1938 |
-
put( rsvpActions.setRSVPIsSettingsLoading( true ) )
|
1939 |
);
|
1940 |
expect( gen.next().value ).toEqual(
|
1941 |
call( wpREST, {
|
@@ -1951,7 +1976,7 @@ describe( 'Ticket Block sagas', () => {
|
|
1951 |
},
|
1952 |
} ),
|
1953 |
},
|
1954 |
-
} )
|
1955 |
);
|
1956 |
|
1957 |
const apiResponse = {
|
@@ -1960,10 +1985,10 @@ describe( 'Ticket Block sagas', () => {
|
|
1960 |
},
|
1961 |
};
|
1962 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1963 |
-
put( actions.setTicketsIsSettingsLoading( false ) )
|
1964 |
);
|
1965 |
expect( gen.next().value ).toEqual(
|
1966 |
-
put( rsvpActions.setRSVPIsSettingsLoading( false ) )
|
1967 |
);
|
1968 |
expect( gen.next().done ).toEqual( true );
|
1969 |
} );
|
@@ -2035,7 +2060,7 @@ describe( 'Ticket Block sagas', () => {
|
|
2035 |
put( actions.setTicketEndTimeInput( CLIENT_ID, endTimeInput ) ),
|
2036 |
put( actions.setTicketCapacityType( CLIENT_ID, capacityType ) ),
|
2037 |
put( actions.setTicketCapacity( CLIENT_ID, capacity ) ),
|
2038 |
-
] )
|
2039 |
);
|
2040 |
expect( gen.next().done ).toEqual( true );
|
2041 |
} );
|
@@ -2107,7 +2132,7 @@ describe( 'Ticket Block sagas', () => {
|
|
2107 |
put( actions.setTicketTempEndTimeInput( CLIENT_ID, endTimeInput ) ),
|
2108 |
put( actions.setTicketTempCapacityType( CLIENT_ID, capacityType ) ),
|
2109 |
put( actions.setTicketTempCapacity( CLIENT_ID, capacity ) ),
|
2110 |
-
] )
|
2111 |
);
|
2112 |
expect( gen.next().done ).toEqual( true );
|
2113 |
} );
|
@@ -2118,13 +2143,13 @@ describe( 'Ticket Block sagas', () => {
|
|
2118 |
const CLIENT_ID = 'tribe';
|
2119 |
const gen = sagas.handleTicketDurationError( CLIENT_ID );
|
2120 |
expect( gen.next().value ).toEqual(
|
2121 |
-
select( selectors.getTicketTempStartDateMoment, { clientId: CLIENT_ID } )
|
2122 |
);
|
2123 |
expect( gen.next( undefined ).value ).toEqual(
|
2124 |
-
select( selectors.getTicketTempEndDateMoment, { clientId: CLIENT_ID } )
|
2125 |
);
|
2126 |
expect( gen.next( undefined ).value ).toEqual(
|
2127 |
-
put( actions.setTicketHasDurationError( CLIENT_ID, true ) )
|
2128 |
);
|
2129 |
expect( gen.next().done ).toEqual( true );
|
2130 |
} );
|
@@ -2145,39 +2170,39 @@ describe( 'Ticket Block sagas', () => {
|
|
2145 |
const END_TIME_SECONDS = 46800;
|
2146 |
const gen = sagas.handleTicketDurationError( CLIENT_ID );
|
2147 |
expect( gen.next().value ).toEqual(
|
2148 |
-
select( selectors.getTicketTempStartDateMoment, { clientId: CLIENT_ID } )
|
2149 |
);
|
2150 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
2151 |
-
select( selectors.getTicketTempEndDateMoment, { clientId: CLIENT_ID } )
|
2152 |
);
|
2153 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
2154 |
-
select( selectors.getTicketTempStartTime, { clientId: CLIENT_ID } )
|
2155 |
);
|
2156 |
expect( gen.next( START_TIME ).value ).toEqual(
|
2157 |
-
select( selectors.getTicketTempEndTime, { clientId: CLIENT_ID } )
|
2158 |
);
|
2159 |
expect( gen.next( END_TIME ).value ).toEqual(
|
2160 |
-
call( timeUtil.toSeconds, START_TIME, timeUtil.TIME_FORMAT_HH_MM_SS )
|
2161 |
);
|
2162 |
expect( gen.next( START_TIME_SECONDS ).value ).toEqual(
|
2163 |
-
call( timeUtil.toSeconds, END_TIME, timeUtil.TIME_FORMAT_HH_MM_SS )
|
2164 |
);
|
2165 |
expect( gen.next( END_TIME_SECONDS ).value ).toEqual(
|
2166 |
-
call( momentUtil.setTimeInSeconds, START_DATE_MOMENT.clone(), START_TIME_SECONDS )
|
2167 |
);
|
2168 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
2169 |
-
call( momentUtil.setTimeInSeconds, END_DATE_MOMENT.clone(), END_TIME_SECONDS )
|
2170 |
);
|
2171 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
2172 |
-
call( [ START_DATE_MOMENT, 'isSameOrAfter' ], END_DATE_MOMENT )
|
2173 |
);
|
2174 |
expect( gen.next( true ).value ).toEqual(
|
2175 |
-
put( actions.setTicketHasDurationError( CLIENT_ID, true ) )
|
2176 |
);
|
2177 |
expect( gen.next().done ).toEqual( true );
|
2178 |
} );
|
2179 |
|
2180 |
-
it( 'should set thas duration error to false if start date time is before end date time', () => {
|
2181 |
const CLIENT_ID = 'tribe';
|
2182 |
const START_DATE_MOMENT = {
|
2183 |
clone: () => {},
|
@@ -2193,34 +2218,34 @@ describe( 'Ticket Block sagas', () => {
|
|
2193 |
const END_TIME_SECONDS = 46800;
|
2194 |
const gen = sagas.handleTicketDurationError( CLIENT_ID );
|
2195 |
expect( gen.next().value ).toEqual(
|
2196 |
-
select( selectors.getTicketTempStartDateMoment, { clientId: CLIENT_ID } )
|
2197 |
);
|
2198 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
2199 |
-
select( selectors.getTicketTempEndDateMoment, { clientId: CLIENT_ID } )
|
2200 |
);
|
2201 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
2202 |
-
select( selectors.getTicketTempStartTime, { clientId: CLIENT_ID } )
|
2203 |
);
|
2204 |
expect( gen.next( START_TIME ).value ).toEqual(
|
2205 |
-
select( selectors.getTicketTempEndTime, { clientId: CLIENT_ID } )
|
2206 |
);
|
2207 |
expect( gen.next( END_TIME ).value ).toEqual(
|
2208 |
-
call( timeUtil.toSeconds, START_TIME, timeUtil.TIME_FORMAT_HH_MM_SS )
|
2209 |
);
|
2210 |
expect( gen.next( START_TIME_SECONDS ).value ).toEqual(
|
2211 |
-
call( timeUtil.toSeconds, END_TIME, timeUtil.TIME_FORMAT_HH_MM_SS )
|
2212 |
);
|
2213 |
expect( gen.next( END_TIME_SECONDS ).value ).toEqual(
|
2214 |
-
call( momentUtil.setTimeInSeconds, START_DATE_MOMENT.clone(), START_TIME_SECONDS )
|
2215 |
);
|
2216 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
2217 |
-
call( momentUtil.setTimeInSeconds, END_DATE_MOMENT.clone(), END_TIME_SECONDS )
|
2218 |
);
|
2219 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
2220 |
-
call( [ START_DATE_MOMENT, 'isSameOrAfter' ], END_DATE_MOMENT )
|
2221 |
);
|
2222 |
expect( gen.next( false ).value ).toEqual(
|
2223 |
-
put( actions.setTicketHasDurationError( CLIENT_ID, false ) )
|
2224 |
);
|
2225 |
expect( gen.next().done ).toEqual( true );
|
2226 |
} );
|
@@ -2237,10 +2262,10 @@ describe( 'Ticket Block sagas', () => {
|
|
2237 |
dayPickerInput: {
|
2238 |
state: {
|
2239 |
value: '',
|
2240 |
-
}
|
2241 |
-
}
|
2242 |
-
}
|
2243 |
-
}
|
2244 |
} );
|
2245 |
|
2246 |
it( 'should handle undefined ticket start date', () => {
|
@@ -2248,13 +2273,16 @@ describe( 'Ticket Block sagas', () => {
|
|
2248 |
expect( gen.next().value ).toEqual( undefined );
|
2249 |
expect( gen.next( undefined ).value ).toEqual( '' );
|
2250 |
expect( gen.next( '' ).value ).toEqual(
|
2251 |
-
put( actions.setTicketTempStartDate( action.payload.clientId, '' ) )
|
2252 |
);
|
2253 |
expect( gen.next().value ).toEqual(
|
2254 |
-
put( actions.setTicketTempStartDateInput(
|
|
|
|
|
|
|
2255 |
);
|
2256 |
expect( gen.next().value ).toEqual(
|
2257 |
-
put( actions.setTicketTempStartDateMoment( action.payload.clientId, undefined ) )
|
2258 |
);
|
2259 |
expect( gen.next().done ).toEqual( true );
|
2260 |
} );
|
@@ -2264,19 +2292,22 @@ describe( 'Ticket Block sagas', () => {
|
|
2264 |
action.payload.dayPickerInput.state.value = 'January 1, 2018';
|
2265 |
const gen = sagas.handleTicketStartDate( action );
|
2266 |
expect( gen.next().value ).toEqual(
|
2267 |
-
call( momentUtil.toMoment, action.payload.date )
|
2268 |
);
|
2269 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
2270 |
-
call( momentUtil.toDatabaseDate, action.payload.date )
|
2271 |
);
|
2272 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
2273 |
-
put( actions.setTicketTempStartDate( action.payload.clientId, action.payload.date ) )
|
2274 |
);
|
2275 |
expect( gen.next().value ).toEqual(
|
2276 |
-
put( actions.setTicketTempStartDateInput(
|
|
|
|
|
|
|
2277 |
);
|
2278 |
expect( gen.next().value ).toEqual(
|
2279 |
-
put( actions.setTicketTempStartDateMoment( action.payload.clientId, action.payload.date ) )
|
2280 |
);
|
2281 |
expect( gen.next().done ).toEqual( true );
|
2282 |
} );
|
@@ -2293,10 +2324,10 @@ describe( 'Ticket Block sagas', () => {
|
|
2293 |
dayPickerInput: {
|
2294 |
state: {
|
2295 |
value: '',
|
2296 |
-
}
|
2297 |
-
}
|
2298 |
-
}
|
2299 |
-
}
|
2300 |
} );
|
2301 |
|
2302 |
it( 'should handle undefined ticket end date', () => {
|
@@ -2304,13 +2335,16 @@ describe( 'Ticket Block sagas', () => {
|
|
2304 |
expect( gen.next().value ).toEqual( undefined );
|
2305 |
expect( gen.next( undefined ).value ).toEqual( '' );
|
2306 |
expect( gen.next( '' ).value ).toEqual(
|
2307 |
-
put( actions.setTicketTempEndDate( action.payload.clientId, '' ) )
|
2308 |
);
|
2309 |
expect( gen.next().value ).toEqual(
|
2310 |
-
put( actions.setTicketTempEndDateInput(
|
|
|
|
|
|
|
2311 |
);
|
2312 |
expect( gen.next().value ).toEqual(
|
2313 |
-
put( actions.setTicketTempEndDateMoment( action.payload.clientId, undefined ) )
|
2314 |
);
|
2315 |
expect( gen.next().done ).toEqual( true );
|
2316 |
} );
|
@@ -2320,19 +2354,22 @@ describe( 'Ticket Block sagas', () => {
|
|
2320 |
action.payload.dayPickerInput.state.value = 'January 1, 2018';
|
2321 |
const gen = sagas.handleTicketEndDate( action );
|
2322 |
expect( gen.next().value ).toEqual(
|
2323 |
-
call( momentUtil.toMoment, action.payload.date )
|
2324 |
);
|
2325 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
2326 |
-
call( momentUtil.toDatabaseDate, action.payload.date )
|
2327 |
);
|
2328 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
2329 |
-
put( actions.setTicketTempEndDate( action.payload.clientId, action.payload.date ) )
|
2330 |
);
|
2331 |
expect( gen.next().value ).toEqual(
|
2332 |
-
put( actions.setTicketTempEndDateInput(
|
|
|
|
|
|
|
2333 |
);
|
2334 |
expect( gen.next().value ).toEqual(
|
2335 |
-
put( actions.setTicketTempEndDateMoment( action.payload.clientId, action.payload.date ) )
|
2336 |
);
|
2337 |
expect( gen.next().done ).toEqual( true );
|
2338 |
} );
|
@@ -2349,10 +2386,10 @@ describe( 'Ticket Block sagas', () => {
|
|
2349 |
const startTime = '01:00';
|
2350 |
const gen = sagas.handleTicketStartTime( action );
|
2351 |
expect( gen.next().value ).toEqual(
|
2352 |
-
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM )
|
2353 |
);
|
2354 |
expect( gen.next( startTime ).value ).toEqual(
|
2355 |
-
put( actions.setTicketTempStartTime( action.payload.clientId, `${ startTime }:00` ) )
|
2356 |
);
|
2357 |
expect( gen.next().done ).toEqual( true );
|
2358 |
} );
|
@@ -2369,16 +2406,16 @@ describe( 'Ticket Block sagas', () => {
|
|
2369 |
};
|
2370 |
const gen = sagas.handleTicketStartTimeInput( action );
|
2371 |
expect( gen.next().value ).toEqual(
|
2372 |
-
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM )
|
2373 |
);
|
2374 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2375 |
-
call( momentUtil.toMoment, startTimeInput, momentUtil.TIME_FORMAT, false )
|
2376 |
);
|
2377 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2378 |
-
call( momentUtil.toTime, startTimeInput )
|
2379 |
);
|
2380 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2381 |
-
put( actions.setTicketTempStartTimeInput( action.payload.clientId, startTimeInput ) )
|
2382 |
);
|
2383 |
expect( gen.next().done ).toEqual( true );
|
2384 |
} );
|
@@ -2395,10 +2432,10 @@ describe( 'Ticket Block sagas', () => {
|
|
2395 |
const endTime = '01:00';
|
2396 |
const gen = sagas.handleTicketEndTime( action );
|
2397 |
expect( gen.next().value ).toEqual(
|
2398 |
-
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM )
|
2399 |
);
|
2400 |
expect( gen.next( endTime ).value ).toEqual(
|
2401 |
-
put( actions.setTicketTempEndTime( action.payload.clientId, `${ endTime }:00` ) )
|
2402 |
);
|
2403 |
expect( gen.next().done ).toEqual( true );
|
2404 |
} );
|
@@ -2415,16 +2452,16 @@ describe( 'Ticket Block sagas', () => {
|
|
2415 |
};
|
2416 |
const gen = sagas.handleTicketStartTimeInput( action );
|
2417 |
expect( gen.next().value ).toEqual(
|
2418 |
-
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM )
|
2419 |
);
|
2420 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2421 |
-
call( momentUtil.toMoment, startTimeInput, momentUtil.TIME_FORMAT, false )
|
2422 |
);
|
2423 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2424 |
-
call( momentUtil.toTime, startTimeInput )
|
2425 |
);
|
2426 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2427 |
-
put( actions.setTicketTempStartTimeInput( action.payload.clientId, startTimeInput ) )
|
2428 |
);
|
2429 |
expect( gen.next().done ).toEqual( true );
|
2430 |
} );
|
@@ -2435,10 +2472,10 @@ describe( 'Ticket Block sagas', () => {
|
|
2435 |
const ticketIds = [ 42 ];
|
2436 |
const gen = cloneableGenerator( sagas.handleTicketMove )();
|
2437 |
expect( gen.next().value ).toEqual(
|
2438 |
-
select( selectors.getTicketsAllClientIds )
|
2439 |
);
|
2440 |
expect( gen.next( ticketIds ).value ).toEqual(
|
2441 |
-
select( moveSelectors.getModalClientId )
|
2442 |
);
|
2443 |
|
2444 |
const clone1 = gen.clone();
|
@@ -2446,10 +2483,10 @@ describe( 'Ticket Block sagas', () => {
|
|
2446 |
|
2447 |
const clone2 = gen.clone();
|
2448 |
expect( clone2.next( 42 ).value ).toEqual(
|
2449 |
-
put( actions.setTicketIsSelected( 42, false ) )
|
2450 |
);
|
2451 |
expect( clone2.next().value ).toEqual(
|
2452 |
-
put( actions.removeTicketBlock( 42 ) )
|
2453 |
);
|
2454 |
expect( clone2.next().value ).toMatchSnapshot();
|
2455 |
expect( clone2.next().done ).toEqual( true );
|
@@ -2458,16 +2495,10 @@ describe( 'Ticket Block sagas', () => {
|
|
2458 |
|
2459 |
// @todo: skipping until we can come back to fix it.
|
2460 |
describe.skip( 'syncTicketSaleEndWithEventStart', () => {
|
2461 |
-
let prevDate,
|
2462 |
beforeEach( () => {
|
2463 |
clientId = 'clientId';
|
2464 |
prevDate = '2018-01-01 00:00:00';
|
2465 |
-
state = {
|
2466 |
-
startDate: 'January 1, 2018',
|
2467 |
-
startTime: '12:34',
|
2468 |
-
endDate: 'January 4, 2018',
|
2469 |
-
endTime: '23:32',
|
2470 |
-
};
|
2471 |
global.tribe = {
|
2472 |
events: {
|
2473 |
data: {
|
@@ -2495,13 +2526,13 @@ describe( 'Ticket Block sagas', () => {
|
|
2495 |
it( 'should not sync', () => {
|
2496 |
const gen = sagas.syncTicketSaleEndWithEventStart( prevDate, clientId );
|
2497 |
expect( gen.next().value ).toEqual(
|
2498 |
-
select( selectors.getTicketTempEndDateMoment, { clientId } )
|
2499 |
);
|
2500 |
expect( gen.next( momentMock ).value ).toEqual(
|
2501 |
-
select( selectors.getTicketEndDateMoment, { clientId } )
|
2502 |
);
|
2503 |
expect( gen.next( momentMock ).value ).toEqual(
|
2504 |
-
call( createDates, prevDate )
|
2505 |
);
|
2506 |
expect( gen.next( { moment: momentMock } ).value ).toMatchSnapshot();
|
2507 |
expect( gen.next( false ).value ).toMatchSnapshot();
|
@@ -2512,23 +2543,23 @@ describe( 'Ticket Block sagas', () => {
|
|
2512 |
it( 'should sync', () => {
|
2513 |
const gen = sagas.syncTicketSaleEndWithEventStart( prevDate, clientId );
|
2514 |
expect( gen.next().value ).toEqual(
|
2515 |
-
select( selectors.getTicketTempEndDateMoment, { clientId } )
|
2516 |
);
|
2517 |
expect( gen.next( momentMock ).value ).toEqual(
|
2518 |
-
select( selectors.getTicketEndDateMoment, { clientId } )
|
2519 |
);
|
2520 |
expect( gen.next( momentMock ).value ).toEqual(
|
2521 |
-
call( createDates, prevDate )
|
2522 |
);
|
2523 |
expect( gen.next( { moment: momentMock } ).value ).toMatchSnapshot();
|
2524 |
expect( gen.next( true ).value ).toMatchSnapshot();
|
2525 |
expect( gen.next( true ).value ).toMatchSnapshot();
|
2526 |
|
2527 |
expect( gen.next( true ).value ).toEqual(
|
2528 |
-
select( global.tribe.events.data.blocks.datetime.selectors.getStart )
|
2529 |
);
|
2530 |
expect( gen.next( '2018-02-02 02:00:00' ).value ).toEqual(
|
2531 |
-
call( createDates, '2018-02-02 02:00:00' )
|
2532 |
);
|
2533 |
|
2534 |
expect( gen.next( {
|
@@ -2573,28 +2604,28 @@ describe( 'Ticket Block sagas', () => {
|
|
2573 |
it( 'should handle start time changes', () => {
|
2574 |
const gen = sagas.handleEventStartDateChanges();
|
2575 |
|
2576 |
-
expect(gen.next().value).toEqual(
|
2577 |
-
call( hasPostTypeChannel )
|
2578 |
);
|
2579 |
-
expect(gen.next(channel).value).toMatchSnapshot();
|
2580 |
-
expect(gen.next().value).toEqual(
|
2581 |
-
call( [ channel, 'close' ] )
|
2582 |
);
|
2583 |
|
2584 |
expect( gen.next().value ).toEqual(
|
2585 |
-
call( isTribeEventPostType )
|
2586 |
);
|
2587 |
|
2588 |
expect( gen.next( true ).value ).toEqual(
|
2589 |
-
select( global.tribe.events.data.blocks.datetime.selectors.getStart )
|
2590 |
);
|
2591 |
|
2592 |
expect( gen.next( '2018-01-01 12:00:00' ).value ).toEqual(
|
2593 |
-
take( [ 'SET_START_DATE_TIME', 'SET_START_TIME' ] )
|
2594 |
);
|
2595 |
|
2596 |
expect( gen.next().value ).toEqual(
|
2597 |
-
fork( sagas.syncTicketsSaleEndWithEventStart, '2018-01-01 12:00:00' )
|
2598 |
);
|
2599 |
|
2600 |
expect( gen.next().done ).toEqual( false );
|
@@ -2613,46 +2644,46 @@ describe( 'Ticket Block sagas', () => {
|
|
2613 |
const gen = sagas.saveTicketWithPostSave( clientId );
|
2614 |
|
2615 |
expect( gen.next().value ).toEqual(
|
2616 |
-
select( selectors.getTicketHasBeenCreated, { clientId } )
|
2617 |
);
|
2618 |
|
2619 |
expect( gen.next( true ).value ).toEqual(
|
2620 |
-
call( createWPEditorSavingChannel )
|
2621 |
);
|
2622 |
|
2623 |
expect( gen.next( channel ).value ).toEqual(
|
2624 |
-
call( createWPEditorNotSavingChannel )
|
2625 |
);
|
2626 |
|
2627 |
expect( gen.next( channel ).value ).toEqual(
|
2628 |
-
take( channel )
|
2629 |
);
|
2630 |
|
2631 |
expect( gen.next().value ).toEqual(
|
2632 |
-
call( sagas.updateTicket, { payload: { clientId } } )
|
2633 |
);
|
2634 |
|
2635 |
expect( gen.next( channel ).value ).toEqual(
|
2636 |
-
take( channel )
|
2637 |
);
|
2638 |
|
2639 |
expect( gen.next( channel ).value ).toEqual(
|
2640 |
-
take( channel )
|
2641 |
);
|
2642 |
|
2643 |
expect( gen.next().value ).toEqual(
|
2644 |
-
call( sagas.updateTicket, { payload: { clientId } } )
|
2645 |
);
|
2646 |
|
2647 |
expect( gen.next( channel ).value ).toEqual(
|
2648 |
-
take( channel )
|
2649 |
);
|
2650 |
} );
|
2651 |
it( 'should do nothing', () => {
|
2652 |
const gen = sagas.saveTicketWithPostSave( clientId );
|
2653 |
|
2654 |
expect( gen.next().value ).toEqual(
|
2655 |
-
select( selectors.getTicketHasBeenCreated, { clientId } )
|
2656 |
);
|
2657 |
|
2658 |
expect( gen.next( false ).done ).toEqual( true );
|
18 |
import watchers, * as sagas from '../sagas';
|
19 |
import * as selectors from '../selectors';
|
20 |
import {
|
21 |
+
DEFAULT_STATE as TICKET_HEADER_IMAGE_DEFAULT_STATE,
|
22 |
} from '../reducers/header-image';
|
23 |
import * as rsvpActions from '@moderntribe/tickets/data/blocks/rsvp/actions';
|
24 |
import {
|
25 |
+
DEFAULT_STATE as RSVP_HEADER_IMAGE_DEFAULT_STATE,
|
26 |
} from '@moderntribe/tickets/data/blocks/rsvp/reducers/header-image';
|
27 |
import { MOVE_TICKET_SUCCESS } from '@moderntribe/tickets/data/shared/move/types';
|
28 |
import * as moveSelectors from '@moderntribe/tickets/data/shared/move/selectors';
|
46 |
SHARED,
|
47 |
TICKET_TYPES,
|
48 |
PROVIDER_CLASS_TO_PROVIDER_MAPPING,
|
49 |
+
WOO_CLASS,
|
50 |
} = constants;
|
51 |
|
52 |
jest.mock( '@wordpress/data', () => {
|
100 |
types.HANDLE_TICKET_START_TIME,
|
101 |
types.HANDLE_TICKET_END_TIME,
|
102 |
MOVE_TICKET_SUCCESS,
|
103 |
+
], sagas.handler ),
|
104 |
);
|
105 |
expect( gen.next().value ).toEqual(
|
106 |
+
fork( sagas.handleEventStartDateChanges ),
|
107 |
);
|
108 |
expect( gen.next().done ).toEqual( true );
|
109 |
} );
|
120 |
action.type = types.SET_TICKETS_INITIAL_STATE;
|
121 |
const gen = sagas.handler( action );
|
122 |
expect( gen.next().value ).toEqual(
|
123 |
+
call( sagas.setTicketsInitialState, action ),
|
124 |
);
|
125 |
expect( gen.next().done ).toEqual( true );
|
126 |
} );
|
129 |
action.type = types.RESET_TICKETS_BLOCK;
|
130 |
const gen = sagas.handler( action );
|
131 |
expect( gen.next().value ).toEqual(
|
132 |
+
call( sagas.resetTicketsBlock ),
|
133 |
);
|
134 |
expect( gen.next().done ).toEqual( true );
|
135 |
} );
|
138 |
action.type = types.SET_TICKET_INITIAL_STATE;
|
139 |
const gen = sagas.handler( action );
|
140 |
expect( gen.next().value ).toEqual(
|
141 |
+
call( sagas.setTicketInitialState, action ),
|
142 |
);
|
143 |
expect( gen.next().done ).toEqual( true );
|
144 |
} );
|
147 |
action.type = types.FETCH_TICKET;
|
148 |
const gen = sagas.handler( action );
|
149 |
expect( gen.next().value ).toEqual(
|
150 |
+
call( sagas.fetchTicket, action ),
|
151 |
);
|
152 |
expect( gen.next().done ).toEqual( true );
|
153 |
} );
|
156 |
action.type = types.CREATE_NEW_TICKET;
|
157 |
const gen = sagas.handler( action );
|
158 |
expect( gen.next().value ).toEqual(
|
159 |
+
call( sagas.createNewTicket, action ),
|
160 |
);
|
161 |
expect( gen.next().done ).toEqual( true );
|
162 |
} );
|
165 |
action.type = types.UPDATE_TICKET;
|
166 |
const gen = sagas.handler( action );
|
167 |
expect( gen.next().value ).toEqual(
|
168 |
+
call( sagas.updateTicket, action ),
|
169 |
);
|
170 |
expect( gen.next().done ).toEqual( true );
|
171 |
} );
|
174 |
action.type = types.DELETE_TICKET;
|
175 |
const gen = sagas.handler( action );
|
176 |
expect( gen.next().value ).toEqual(
|
177 |
+
call( sagas.deleteTicket, action ),
|
178 |
);
|
179 |
expect( gen.next().done ).toEqual( true );
|
180 |
} );
|
183 |
action.type = types.FETCH_TICKETS_HEADER_IMAGE;
|
184 |
const gen = sagas.handler( action );
|
185 |
expect( gen.next().value ).toEqual(
|
186 |
+
call( sagas.fetchTicketsHeaderImage, action ),
|
187 |
);
|
188 |
expect( gen.next().done ).toEqual( true );
|
189 |
} );
|
192 |
action.type = types.UPDATE_TICKETS_HEADER_IMAGE;
|
193 |
const gen = sagas.handler( action );
|
194 |
expect( gen.next().value ).toEqual(
|
195 |
+
call( sagas.updateTicketsHeaderImage, action ),
|
196 |
);
|
197 |
expect( gen.next().done ).toEqual( true );
|
198 |
} );
|
201 |
action.type = types.DELETE_TICKETS_HEADER_IMAGE;
|
202 |
const gen = sagas.handler( action );
|
203 |
expect( gen.next().value ).toEqual(
|
204 |
+
call( sagas.deleteTicketsHeaderImage ),
|
205 |
);
|
206 |
expect( gen.next().done ).toEqual( true );
|
207 |
} );
|
210 |
action.type = types.SET_TICKET_DETAILS;
|
211 |
const gen = sagas.handler( action );
|
212 |
expect( gen.next().value ).toEqual(
|
213 |
+
call( sagas.setTicketDetails, action ),
|
214 |
);
|
215 |
expect( gen.next().done ).toEqual( true );
|
216 |
} );
|
219 |
action.type = types.SET_TICKET_TEMP_DETAILS;
|
220 |
const gen = sagas.handler( action );
|
221 |
expect( gen.next().value ).toEqual(
|
222 |
+
call( sagas.setTicketTempDetails, action ),
|
223 |
);
|
224 |
expect( gen.next().done ).toEqual( true );
|
225 |
} );
|
229 |
action.payload = { clientId: 'tribe' };
|
230 |
const gen = sagas.handler( action );
|
231 |
expect( gen.next().value ).toEqual(
|
232 |
+
call( sagas.handleTicketStartDate, action ),
|
233 |
);
|
234 |
expect( gen.next().value ).toEqual(
|
235 |
+
call( sagas.handleTicketDurationError, action.payload.clientId ),
|
236 |
);
|
237 |
expect( gen.next().value ).toEqual(
|
238 |
+
put( actions.setTicketHasChanges( action.payload.clientId, true ) ),
|
239 |
);
|
240 |
expect( gen.next().done ).toEqual( true );
|
241 |
} );
|
245 |
action.payload = { clientId: 'tribe' };
|
246 |
const gen = sagas.handler( action );
|
247 |
expect( gen.next().value ).toEqual(
|
248 |
+
call( sagas.handleTicketEndDate, action ),
|
249 |
);
|
250 |
expect( gen.next().value ).toEqual(
|
251 |
+
call( sagas.handleTicketDurationError, action.payload.clientId ),
|
252 |
);
|
253 |
expect( gen.next().value ).toEqual(
|
254 |
+
put( actions.setTicketHasChanges( action.payload.clientId, true ) ),
|
255 |
);
|
256 |
expect( gen.next().done ).toEqual( true );
|
257 |
} );
|
261 |
action.payload = { clientId: 'tribe' };
|
262 |
const gen = sagas.handler( action );
|
263 |
expect( gen.next().value ).toEqual(
|
264 |
+
call( sagas.handleTicketStartTime, action ),
|
265 |
);
|
266 |
expect( gen.next().value ).toEqual(
|
267 |
+
call( sagas.handleTicketStartTimeInput, action ),
|
268 |
);
|
269 |
expect( gen.next().value ).toEqual(
|
270 |
+
call( sagas.handleTicketDurationError, action.payload.clientId ),
|
271 |
);
|
272 |
expect( gen.next().value ).toEqual(
|
273 |
+
put( actions.setTicketHasChanges( action.payload.clientId, true ) ),
|
274 |
);
|
275 |
expect( gen.next().done ).toEqual( true );
|
276 |
} );
|
280 |
action.payload = { clientId: 'tribe' };
|
281 |
const gen = sagas.handler( action );
|
282 |
expect( gen.next().value ).toEqual(
|
283 |
+
call( sagas.handleTicketEndTime, action ),
|
284 |
);
|
285 |
expect( gen.next().value ).toEqual(
|
286 |
+
call( sagas.handleTicketEndTimeInput, action ),
|
287 |
);
|
288 |
expect( gen.next().value ).toEqual(
|
289 |
+
call( sagas.handleTicketDurationError, action.payload.clientId ),
|
290 |
);
|
291 |
expect( gen.next().value ).toEqual(
|
292 |
+
put( actions.setTicketHasChanges( action.payload.clientId, true ) ),
|
293 |
);
|
294 |
expect( gen.next().done ).toEqual( true );
|
295 |
} );
|
298 |
action.type = MOVE_TICKET_SUCCESS;
|
299 |
const gen = sagas.handler( action );
|
300 |
expect( gen.next().value ).toEqual(
|
301 |
+
call( sagas.handleTicketMove ),
|
302 |
);
|
303 |
expect( gen.next().done ).toEqual( true );
|
304 |
} );
|
316 |
const tickets = [ 'tribe' ];
|
317 |
const gen = sagas.createMissingTicketBlocks( tickets );
|
318 |
expect( gen.next().value ).toEqual(
|
319 |
+
call( wpDispatch, 'core/editor' ),
|
320 |
);
|
321 |
expect( gen.next( wpDispatchCoreEditor ).value ).toEqual(
|
322 |
+
call( wpSelect, 'core/editor' ),
|
323 |
);
|
324 |
expect( gen.next( wpSelectCoreEditor ).value ).toMatchSnapshot();
|
325 |
expect( gen.next( [] ).done ).toEqual( true );
|
352 |
|
353 |
const gen = cloneableGenerator( sagas.setTicketsInitialState )( action );
|
354 |
expect( gen.next().value ).toEqual(
|
355 |
+
select( selectors.getTicketsIdsInBlocks ),
|
356 |
);
|
357 |
|
358 |
const clone1 = gen.clone();
|
359 |
expect( clone1.next( [] ).value ).toEqual(
|
360 |
+
call( sagas.createMissingTicketBlocks, [ 'tribe' ] ),
|
361 |
);
|
362 |
expect( clone1.next().value ).toEqual(
|
363 |
all( [
|
364 |
put( actions.setTicketsSharedCapacity( SHARED_CAPACITY ) ),
|
365 |
put( actions.setTicketsTempSharedCapacity( SHARED_CAPACITY ) ),
|
366 |
+
] ),
|
367 |
);
|
368 |
expect( clone1.next().value ).toEqual(
|
369 |
+
put( actions.fetchTicketsHeaderImage( HEADER ) ),
|
370 |
);
|
371 |
expect( clone1.next().value ).toEqual(
|
372 |
+
put( actions.setTicketsProvider( PROVIDER ) ),
|
373 |
);
|
374 |
expect( clone1.next().done ).toEqual( true );
|
375 |
|
378 |
all( [
|
379 |
put( actions.setTicketsSharedCapacity( SHARED_CAPACITY ) ),
|
380 |
put( actions.setTicketsTempSharedCapacity( SHARED_CAPACITY ) ),
|
381 |
+
] ),
|
382 |
);
|
383 |
expect( clone2.next().value ).toEqual(
|
384 |
+
put( actions.fetchTicketsHeaderImage( HEADER ) ),
|
385 |
);
|
386 |
expect( clone2.next().value ).toEqual(
|
387 |
+
put( actions.setTicketsProvider( PROVIDER ) ),
|
388 |
);
|
389 |
expect( clone2.next().done ).toEqual( true );
|
390 |
} );
|
414 |
};
|
415 |
const gen = cloneableGenerator( sagas.setTicketsInitialState )( action );
|
416 |
expect( gen.next().value ).toEqual(
|
417 |
+
select( selectors.getTicketsIdsInBlocks ),
|
418 |
);
|
419 |
|
420 |
const clone1 = gen.clone();
|
421 |
expect( clone1.next( [] ).value ).toEqual(
|
422 |
+
call( sagas.createMissingTicketBlocks, [ 'tribe' ] ),
|
423 |
);
|
424 |
expect( clone1.next().value ).toEqual(
|
425 |
+
select( selectors.getDefaultTicketProvider ),
|
426 |
);
|
427 |
expect( clone1.next( DEFAULT_PROVIDER ).value ).toEqual(
|
428 |
+
put( actions.setTicketsProvider( DEFAULT_PROVIDER ) ),
|
429 |
);
|
430 |
expect( clone1.next().done ).toEqual( true );
|
431 |
|
432 |
const clone2 = gen.clone();
|
433 |
expect( clone2.next( [ 'tribe' ] ).value ).toEqual(
|
434 |
+
select( selectors.getDefaultTicketProvider ),
|
435 |
);
|
436 |
expect( clone2.next( DEFAULT_PROVIDER ).value ).toEqual(
|
437 |
+
put( actions.setTicketsProvider( DEFAULT_PROVIDER ) ),
|
438 |
);
|
439 |
expect( clone2.next().done ).toEqual( true );
|
440 |
} );
|
444 |
it( 'should reset tickets block', () => {
|
445 |
const gen = sagas.resetTicketsBlock();
|
446 |
expect( gen.next().value ).toEqual(
|
447 |
+
select( selectors.hasCreatedTickets ),
|
448 |
);
|
449 |
expect( gen.next( false ).value ).toEqual(
|
450 |
all( [
|
451 |
put( actions.removeTicketBlocks() ),
|
452 |
put( actions.setTicketsIsSettingsOpen( false ) ),
|
453 |
+
] ),
|
454 |
);
|
455 |
expect( gen.next().value ).toMatchSnapshot();
|
456 |
expect( gen.next( {} ).value ).toMatchSnapshot();
|
458 |
all( [
|
459 |
put( actions.setTicketsSharedCapacity( '' ) ),
|
460 |
put( actions.setTicketsTempSharedCapacity( '' ) ),
|
461 |
+
] ),
|
462 |
);
|
463 |
expect( gen.next().done ).toEqual( true );
|
464 |
} );
|
466 |
it( 'should not reset tickets block', () => {
|
467 |
const gen = sagas.resetTicketsBlock();
|
468 |
expect( gen.next().value ).toEqual(
|
469 |
+
select( selectors.hasCreatedTickets ),
|
470 |
);
|
471 |
expect( gen.next( true ).value ).toEqual(
|
472 |
all( [
|
473 |
put( actions.removeTicketBlocks() ),
|
474 |
put( actions.setTicketsIsSettingsOpen( false ) ),
|
475 |
+
] ),
|
476 |
);
|
477 |
expect( gen.next().done ).toEqual( true );
|
478 |
} );
|
540 |
const gen = cloneableGenerator( sagas.setTicketInitialState )( action );
|
541 |
expect( gen.next().value ).toMatchSnapshot();
|
542 |
expect( gen.next( publishDate ).value ).toEqual(
|
543 |
+
call( momentUtil.toMoment, publishDate ),
|
544 |
);
|
545 |
expect( gen.next( startMoment ).value ).toEqual(
|
546 |
+
call( momentUtil.toDatabaseDate, startMoment ),
|
547 |
);
|
548 |
expect( gen.next( startDate ).value ).toEqual(
|
549 |
+
call( momentUtil.toDate, startMoment ),
|
550 |
);
|
551 |
expect( gen.next( startDateInput ).value ).toEqual(
|
552 |
+
call( momentUtil.toDatabaseTime, startMoment ),
|
553 |
);
|
554 |
expect( gen.next( startTime ).value ).toEqual(
|
555 |
+
call( momentUtil.toTime, startMoment ),
|
556 |
);
|
557 |
expect( gen.next( startTime ).value ).toEqual(
|
558 |
all( [
|
567 |
put( actions.setTicketTempStartTime( action.payload.clientId, startTime ) ),
|
568 |
put( actions.setTicketTempStartTimeInput( action.payload.clientId, startTime ) ),
|
569 |
put( actions.setTicketHasBeenCreated( action.payload.clientId, HAS_BEEN_CREATED ) ),
|
570 |
+
] ),
|
571 |
);
|
572 |
expect( gen.next().value ).toEqual(
|
573 |
+
select( global.tribe.events.data.blocks.datetime.selectors.getStart ),
|
574 |
+
);
|
575 |
expect( gen.next( eventStart ).value ).toEqual(
|
576 |
+
call( momentUtil.toMoment, eventStart ),
|
577 |
);
|
578 |
expect( gen.next( endMoment ).value ).toEqual(
|
579 |
+
call( momentUtil.toDatabaseDate, endMoment ),
|
580 |
);
|
581 |
expect( gen.next( endDate ).value ).toEqual(
|
582 |
+
call( momentUtil.toDate, endMoment ),
|
583 |
);
|
584 |
expect( gen.next( endDateInput ).value ).toEqual(
|
585 |
+
call( momentUtil.toDatabaseTime, endMoment ),
|
586 |
);
|
587 |
expect( gen.next( endTime ).value ).toEqual(
|
588 |
+
call( momentUtil.toTime, endMoment ),
|
589 |
);
|
590 |
expect( gen.next( endTime ).value ).toEqual(
|
591 |
all( [
|
599 |
put( actions.setTicketTempEndDateMoment( action.payload.clientId, endMoment ) ),
|
600 |
put( actions.setTicketTempEndTime( action.payload.clientId, endTime ) ),
|
601 |
put( actions.setTicketTempEndTimeInput( action.payload.clientId, endTime ) ),
|
602 |
+
] ),
|
603 |
);
|
604 |
expect( gen.next().value ).toEqual(
|
605 |
+
select( plugins.selectors.hasPlugin, plugins.constants.TICKETS_PLUS ),
|
606 |
);
|
607 |
expect( gen.next( false ).value ).toEqual(
|
608 |
+
select( selectors.getTicketsSharedCapacity ),
|
609 |
);
|
610 |
|
611 |
const clone1 = gen.clone();
|
615 |
all( [
|
616 |
put( actions.setTicketId( CLIENT_ID, TICKET_ID ) ),
|
617 |
call( sagas.fetchTicket, { payload: { clientId: CLIENT_ID, ticketId: TICKET_ID } } ),
|
618 |
+
] ),
|
619 |
);
|
620 |
expect( clone1.next().value ).toEqual(
|
621 |
+
call( sagas.handleTicketDurationError, CLIENT_ID ),
|
622 |
);
|
623 |
expect( clone1.next().value ).toEqual(
|
624 |
+
fork( sagas.saveTicketWithPostSave, CLIENT_ID ),
|
625 |
);
|
626 |
expect( clone1.next().done ).toEqual( true );
|
627 |
|
632 |
all( [
|
633 |
put( actions.setTicketCapacity( CLIENT_ID, sharedCapacity ) ),
|
634 |
put( actions.setTicketTempCapacity( CLIENT_ID, sharedCapacity ) ),
|
635 |
+
] ),
|
636 |
);
|
637 |
expect( clone2.next().value ).toEqual(
|
638 |
all( [
|
639 |
put( actions.setTicketId( CLIENT_ID, TICKET_ID ) ),
|
640 |
call( sagas.fetchTicket, { payload: { clientId: CLIENT_ID, ticketId: TICKET_ID } } ),
|
641 |
+
] ),
|
642 |
);
|
643 |
expect( clone2.next().value ).toEqual(
|
644 |
+
call( sagas.handleTicketDurationError, CLIENT_ID ),
|
645 |
);
|
646 |
expect( clone2.next().value ).toEqual(
|
647 |
+
fork( sagas.saveTicketWithPostSave, CLIENT_ID ),
|
648 |
);
|
649 |
expect( clone2.next().done ).toEqual( true );
|
650 |
} );
|
670 |
const gen = cloneableGenerator( sagas.setTicketInitialState )( action );
|
671 |
expect( gen.next().value ).toMatchSnapshot();
|
672 |
expect( gen.next( publishDate ).value ).toEqual(
|
673 |
+
call( momentUtil.toMoment, publishDate ),
|
674 |
);
|
675 |
expect( gen.next( startMoment ).value ).toEqual(
|
676 |
+
call( momentUtil.toDatabaseDate, startMoment ),
|
677 |
);
|
678 |
expect( gen.next( startDate ).value ).toEqual(
|
679 |
+
call( momentUtil.toDate, startMoment ),
|
680 |
);
|
681 |
expect( gen.next( startDateInput ).value ).toEqual(
|
682 |
+
call( momentUtil.toDatabaseTime, startMoment ),
|
683 |
);
|
684 |
expect( gen.next( startTime ).value ).toEqual(
|
685 |
+
call( momentUtil.toTime, startMoment ),
|
686 |
);
|
687 |
expect( gen.next( startTime ).value ).toEqual(
|
688 |
all( [
|
697 |
put( actions.setTicketTempStartTime( action.payload.clientId, startTime ) ),
|
698 |
put( actions.setTicketTempStartTimeInput( action.payload.clientId, startTime ) ),
|
699 |
put( actions.setTicketHasBeenCreated( action.payload.clientId, HAS_BEEN_CREATED ) ),
|
700 |
+
] ),
|
701 |
);
|
702 |
expect( gen.next().value ).toEqual(
|
703 |
+
select( global.tribe.events.data.blocks.datetime.selectors.getStart ),
|
704 |
+
);
|
705 |
expect( gen.next( eventStart ).value ).toEqual(
|
706 |
+
call( momentUtil.toMoment, eventStart ),
|
707 |
);
|
708 |
expect( gen.next( endMoment ).value ).toEqual(
|
709 |
+
call( momentUtil.toDatabaseDate, endMoment ),
|
710 |
);
|
711 |
expect( gen.next( endDate ).value ).toEqual(
|
712 |
+
call( momentUtil.toDate, endMoment ),
|
713 |
);
|
714 |
expect( gen.next( endDateInput ).value ).toEqual(
|
715 |
+
call( momentUtil.toDatabaseTime, endMoment ),
|
716 |
);
|
717 |
expect( gen.next( endTime ).value ).toEqual(
|
718 |
+
call( momentUtil.toTime, endMoment ),
|
719 |
);
|
720 |
expect( gen.next( endTime ).value ).toEqual(
|
721 |
all( [
|
729 |
put( actions.setTicketTempEndDateMoment( action.payload.clientId, endMoment ) ),
|
730 |
put( actions.setTicketTempEndTime( action.payload.clientId, endTime ) ),
|
731 |
put( actions.setTicketTempEndTimeInput( action.payload.clientId, endTime ) ),
|
732 |
+
] ),
|
733 |
);
|
734 |
expect( gen.next().value ).toEqual(
|
735 |
+
select( plugins.selectors.hasPlugin, plugins.constants.TICKETS_PLUS ),
|
736 |
);
|
737 |
expect( gen.next( false ).value ).toEqual(
|
738 |
+
select( selectors.getTicketsSharedCapacity ),
|
739 |
);
|
740 |
|
741 |
const clone1 = gen.clone();
|
742 |
const blankSharedCapacity = '';
|
743 |
|
744 |
expect( clone1.next().value ).toEqual(
|
745 |
+
call( sagas.handleTicketDurationError, CLIENT_ID ),
|
746 |
);
|
747 |
expect( clone1.next().value ).toEqual(
|
748 |
+
fork( sagas.saveTicketWithPostSave, CLIENT_ID ),
|
749 |
);
|
750 |
expect( clone1.next( blankSharedCapacity ).done ).toEqual( true );
|
751 |
|
756 |
all( [
|
757 |
put( actions.setTicketCapacity( CLIENT_ID, sharedCapacity ) ),
|
758 |
put( actions.setTicketTempCapacity( CLIENT_ID, sharedCapacity ) ),
|
759 |
+
] ),
|
760 |
);
|
761 |
expect( clone2.next().value ).toEqual(
|
762 |
+
call( sagas.handleTicketDurationError, CLIENT_ID ),
|
763 |
);
|
764 |
expect( clone2.next().value ).toEqual(
|
765 |
+
fork( sagas.saveTicketWithPostSave, CLIENT_ID ),
|
766 |
);
|
767 |
expect( clone2.next().done ).toEqual( true );
|
768 |
} );
|
788 |
const gen = cloneableGenerator( sagas.setTicketInitialState )( action );
|
789 |
expect( gen.next().value ).toMatchSnapshot();
|
790 |
expect( gen.next( publishDate ).value ).toEqual(
|
791 |
+
call( momentUtil.toMoment, publishDate ),
|
792 |
);
|
793 |
expect( gen.next( startMoment ).value ).toEqual(
|
794 |
+
call( momentUtil.toDatabaseDate, startMoment ),
|
795 |
);
|
796 |
expect( gen.next( startDate ).value ).toEqual(
|
797 |
+
call( momentUtil.toDate, startMoment ),
|
798 |
);
|
799 |
expect( gen.next( startDateInput ).value ).toEqual(
|
800 |
+
call( momentUtil.toDatabaseTime, startMoment ),
|
801 |
);
|
802 |
expect( gen.next( startTime ).value ).toEqual(
|
803 |
+
call( momentUtil.toTime, startMoment ),
|
804 |
);
|
805 |
expect( gen.next( startTime ).value ).toEqual(
|
806 |
all( [
|
815 |
put( actions.setTicketTempStartTime( action.payload.clientId, startTime ) ),
|
816 |
put( actions.setTicketTempStartTimeInput( action.payload.clientId, startTime ) ),
|
817 |
put( actions.setTicketHasBeenCreated( action.payload.clientId, HAS_BEEN_CREATED ) ),
|
818 |
+
] ),
|
819 |
);
|
820 |
expect( gen.next().value ).toEqual(
|
821 |
+
select( global.tribe.events.data.blocks.datetime.selectors.getStart ),
|
822 |
+
);
|
823 |
expect( gen.next( eventStart ).value ).toEqual(
|
824 |
+
call( momentUtil.toMoment, eventStart ),
|
825 |
);
|
826 |
expect( gen.next( endMoment ).value ).toEqual(
|
827 |
+
call( momentUtil.toDatabaseDate, endMoment ),
|
828 |
);
|
829 |
expect( gen.next( endDate ).value ).toEqual(
|
830 |
+
call( momentUtil.toDate, endMoment ),
|
831 |
);
|
832 |
expect( gen.next( endDateInput ).value ).toEqual(
|
833 |
+
call( momentUtil.toDatabaseTime, endMoment ),
|
834 |
);
|
835 |
expect( gen.next( endTime ).value ).toEqual(
|
836 |
+
call( momentUtil.toTime, endMoment ),
|
837 |
);
|
838 |
expect( gen.next( endTime ).value ).toEqual(
|
839 |
all( [
|
847 |
put( actions.setTicketTempEndDateMoment( action.payload.clientId, endMoment ) ),
|
848 |
put( actions.setTicketTempEndTime( action.payload.clientId, endTime ) ),
|
849 |
put( actions.setTicketTempEndTimeInput( action.payload.clientId, endTime ) ),
|
850 |
+
] ),
|
851 |
);
|
852 |
expect( gen.next().value ).toEqual(
|
853 |
+
select( plugins.selectors.hasPlugin, plugins.constants.TICKETS_PLUS ),
|
854 |
);
|
855 |
expect( gen.next( true ).value ).toEqual(
|
856 |
all( [
|
857 |
+
put( actions.setTicketCapacityType(
|
858 |
+
CLIENT_ID,
|
859 |
+
constants.TICKET_TYPES[ constants.SHARED ],
|
860 |
+
) ),
|
861 |
+
put( actions.setTicketTempCapacityType(
|
862 |
+
CLIENT_ID,
|
863 |
+
constants.TICKET_TYPES[ constants.SHARED ],
|
864 |
+
) ),
|
865 |
+
] ),
|
866 |
);
|
867 |
expect( gen.next().value ).toEqual(
|
868 |
+
select( selectors.getTicketsSharedCapacity ),
|
869 |
);
|
870 |
expect( gen.next().value ).toEqual(
|
871 |
+
call( sagas.handleTicketDurationError, CLIENT_ID ),
|
872 |
);
|
873 |
expect( gen.next().value ).toEqual(
|
874 |
+
fork( sagas.saveTicketWithPostSave, CLIENT_ID ),
|
875 |
);
|
876 |
expect( gen.next( '' ).done ).toEqual( true );
|
877 |
} );
|
888 |
|
889 |
expect( gen.next().value ).toMatchSnapshot();
|
890 |
expect( gen.next( rootClientId ).value ).toEqual(
|
891 |
+
select( selectors.getTicketProvider, props ),
|
892 |
);
|
893 |
expect( gen.next().value ).toEqual(
|
894 |
+
select( selectors.getTicketsProvider ),
|
895 |
);
|
896 |
expect( gen.next().value ).toMatchSnapshot();
|
897 |
expect( gen.next( postId ).value ).toEqual(
|
898 |
+
select( selectors.getTicketTempTitle, props ),
|
899 |
);
|
900 |
expect( gen.next().value ).toEqual(
|
901 |
+
select( selectors.getTicketTempDescription, props ),
|
902 |
);
|
903 |
expect( gen.next().value ).toEqual(
|
904 |
+
select( selectors.getTicketTempPrice, props ),
|
905 |
);
|
906 |
expect( gen.next().value ).toEqual(
|
907 |
+
select( selectors.getTicketTempStartDate, props ),
|
908 |
);
|
909 |
expect( gen.next().value ).toEqual(
|
910 |
+
select( selectors.getTicketTempStartTime, props ),
|
911 |
);
|
912 |
expect( gen.next().value ).toEqual(
|
913 |
+
select( selectors.getTicketTempEndDate, props ),
|
914 |
);
|
915 |
expect( gen.next().value ).toEqual(
|
916 |
+
select( selectors.getTicketTempEndTime, props ),
|
917 |
);
|
918 |
expect( gen.next().value ).toEqual(
|
919 |
+
select( selectors.getTicketTempSku, props ),
|
920 |
);
|
921 |
expect( gen.next().value ).toEqual(
|
922 |
+
select( selectors.getTicketTempIACSetting, props ),
|
923 |
);
|
924 |
expect( gen.next().value ).toMatchSnapshot();
|
925 |
expect( gen.next( menuOrder ).value ).toEqual(
|
926 |
+
select( selectors.getTicketTempCapacityType, props ),
|
927 |
);
|
928 |
|
929 |
const clone1 = gen.clone();
|
930 |
const sharedCapacityType = TICKET_TYPES[ SHARED ];
|
931 |
|
932 |
expect( clone1.next( sharedCapacityType ).value ).toEqual(
|
933 |
+
select( selectors.getTicketTempCapacity, props ),
|
934 |
);
|
935 |
expect( clone1.next().value ).toEqual(
|
936 |
+
select( selectors.getTicketsTempSharedCapacity ),
|
937 |
);
|
938 |
expect( clone1.next().done ).toEqual( true );
|
939 |
|
941 |
const independentCapacityType = TICKET_TYPES[ INDEPENDENT ];
|
942 |
|
943 |
expect( clone2.next( independentCapacityType ).value ).toEqual(
|
944 |
+
select( selectors.getTicketTempCapacity, props ),
|
945 |
);
|
946 |
expect( clone2.next().done ).toEqual( true );
|
947 |
} );
|
960 |
|
961 |
const gen = cloneableGenerator( sagas.fetchTicket )( action );
|
962 |
expect( gen.next().value ).toEqual(
|
963 |
+
put( actions.setTicketIsLoading( CLIENT_ID, true ) ),
|
964 |
);
|
965 |
expect( gen.next().value ).toEqual(
|
966 |
call( wpREST, {
|
967 |
path: `tickets/${ TICKET_ID }`,
|
968 |
namespace: 'tribe/tickets/v1',
|
969 |
+
} ),
|
970 |
);
|
971 |
|
972 |
const clone1 = gen.clone();
|
978 |
};
|
979 |
|
980 |
expect( clone1.next( apiResponse1 ).value ).toEqual(
|
981 |
+
put( actions.setTicketIsLoading( CLIENT_ID, false ) ),
|
982 |
);
|
983 |
expect( clone1.next().done ).toEqual( true );
|
984 |
|
1019 |
const endTimeInput2 = '';
|
1020 |
|
1021 |
expect( clone2.next( apiResponse2 ).value ).toEqual(
|
1022 |
+
call( momentUtil.toMoment, apiResponse2.data.available_from ),
|
1023 |
);
|
1024 |
expect( clone2.next( startMoment2 ).value ).toEqual(
|
1025 |
+
call( momentUtil.toDatabaseDate, startMoment2 ),
|
1026 |
);
|
1027 |
expect( clone2.next( startDate2 ).value ).toEqual(
|
1028 |
+
call( momentUtil.toDate, startMoment2 ),
|
1029 |
);
|
1030 |
expect( clone2.next( startDateInput2 ).value ).toEqual(
|
1031 |
+
call( momentUtil.toDatabaseTime, startMoment2 ),
|
1032 |
);
|
1033 |
expect( clone2.next( startTime2 ).value ).toEqual(
|
1034 |
+
call( momentUtil.toTime, startMoment2 ),
|
1035 |
);
|
1036 |
expect( clone2.next( startTimeInput2 ).value ).toEqual(
|
1037 |
+
call( momentUtil.toMoment, '' ),
|
1038 |
);
|
1039 |
|
1040 |
const details2 = {
|
1063 |
put( actions.setTicketTempDetails( CLIENT_ID, details2 ) ),
|
1064 |
put( actions.setTicketSold( CLIENT_ID, apiResponse2.data.totals.sold ) ),
|
1065 |
put( actions.setTicketAvailable( CLIENT_ID, apiResponse2.data.totals.stock ) ),
|
1066 |
+
put( actions.setTicketCurrencySymbol(
|
1067 |
+
CLIENT_ID,
|
1068 |
+
apiResponse2.data.cost_details.currency_symbol,
|
1069 |
+
) ),
|
1070 |
+
put( actions.setTicketCurrencyPosition(
|
1071 |
+
CLIENT_ID,
|
1072 |
+
apiResponse2.data.cost_details.currency_position,
|
1073 |
+
) ),
|
1074 |
put( actions.setTicketProvider( CLIENT_ID, apiResponse2.data.provider ) ),
|
1075 |
+
put( actions.setTicketHasAttendeeInfoFields(
|
1076 |
+
CLIENT_ID,
|
1077 |
+
apiResponse2.data.supports_attendee_information,
|
1078 |
+
) ),
|
1079 |
put( actions.setTicketHasBeenCreated( CLIENT_ID, true ) ),
|
1080 |
+
] ),
|
1081 |
);
|
1082 |
expect( clone2.next().value ).toEqual(
|
1083 |
+
put( actions.setTicketIsLoading( CLIENT_ID, false ) ),
|
1084 |
);
|
1085 |
expect( clone2.next().done ).toEqual( true );
|
1086 |
|
1122 |
const endTimeInput3 = momentUtil.toTime( endMoment3 );
|
1123 |
|
1124 |
expect( clone3.next( apiResponse3 ).value ).toEqual(
|
1125 |
+
call( momentUtil.toMoment, apiResponse3.data.available_from ),
|
1126 |
);
|
1127 |
expect( clone3.next( startMoment3 ).value ).toEqual(
|
1128 |
+
call( momentUtil.toDatabaseDate, startMoment3 ),
|
1129 |
);
|
1130 |
expect( clone3.next( startDate3 ).value ).toEqual(
|
1131 |
+
call( momentUtil.toDate, startMoment3 ),
|
1132 |
);
|
1133 |
expect( clone3.next( startDateInput3 ).value ).toEqual(
|
1134 |
+
call( momentUtil.toDatabaseTime, startMoment3 ),
|
1135 |
);
|
1136 |
expect( clone3.next( startTime3 ).value ).toEqual(
|
1137 |
+
call( momentUtil.toTime, startMoment3 ),
|
1138 |
);
|
1139 |
expect( clone3.next( startTimeInput3 ).value ).toEqual(
|
1140 |
+
call( momentUtil.toMoment, '' ),
|
1141 |
);
|
1142 |
expect( clone3.next( endMoment2 ).value ).toEqual(
|
1143 |
+
call( momentUtil.toMoment, apiResponse3.data.available_until ),
|
1144 |
);
|
1145 |
expect( clone3.next( endMoment3 ).value ).toEqual(
|
1146 |
+
call( momentUtil.toDatabaseDate, endMoment3 ),
|
1147 |
);
|
1148 |
expect( clone3.next( endDate3 ).value ).toEqual(
|
1149 |
+
call( momentUtil.toDate, endMoment3 ),
|
1150 |
);
|
1151 |
expect( clone3.next( endDateInput3 ).value ).toEqual(
|
1152 |
+
call( momentUtil.toDatabaseTime, endMoment3 ),
|
1153 |
);
|
1154 |
expect( clone3.next( startTime3 ).value ).toEqual(
|
1155 |
+
call( momentUtil.toTime, endMoment3 ),
|
1156 |
);
|
1157 |
|
1158 |
const details3 = {
|
1181 |
put( actions.setTicketTempDetails( CLIENT_ID, details3 ) ),
|
1182 |
put( actions.setTicketSold( CLIENT_ID, apiResponse3.data.totals.sold ) ),
|
1183 |
put( actions.setTicketAvailable( CLIENT_ID, apiResponse3.data.totals.stock ) ),
|
1184 |
+
put( actions.setTicketCurrencySymbol(
|
1185 |
+
CLIENT_ID,
|
1186 |
+
apiResponse3.data.cost_details.currency_symbol,
|
1187 |
+
) ),
|
1188 |
+
put( actions.setTicketCurrencyPosition(
|
1189 |
+
CLIENT_ID,
|
1190 |
+
apiResponse3.data.cost_details.currency_position,
|
1191 |
+
) ),
|
1192 |
put( actions.setTicketProvider( CLIENT_ID, apiResponse3.data.provider ) ),
|
1193 |
+
put( actions.setTicketHasAttendeeInfoFields(
|
1194 |
+
CLIENT_ID,
|
1195 |
+
apiResponse3.data.supports_attendee_information,
|
1196 |
+
) ),
|
1197 |
put( actions.setTicketHasBeenCreated( CLIENT_ID, true ) ),
|
1198 |
+
] ),
|
1199 |
);
|
1200 |
expect( clone3.next().value ).toEqual(
|
1201 |
+
put( actions.setTicketIsLoading( CLIENT_ID, false ) ),
|
1202 |
);
|
1203 |
expect( clone3.next().done ).toEqual( true );
|
1204 |
} );
|
1248 |
|
1249 |
const gen = cloneableGenerator( sagas.createNewTicket )( action );
|
1250 |
expect( gen.next().value ).toEqual(
|
1251 |
+
call( sagas.setBodyDetails, CLIENT_ID ),
|
1252 |
);
|
1253 |
|
1254 |
const body = new FormData();
|
1255 |
|
1256 |
expect( gen.next( body ).value ).toEqual(
|
1257 |
+
put( actions.setTicketIsLoading( CLIENT_ID, true ) ),
|
1258 |
);
|
1259 |
expect( gen.next().value ).toEqual(
|
1260 |
call( wpREST, {
|
1264 |
method: 'POST',
|
1265 |
body,
|
1266 |
},
|
1267 |
+
} ),
|
1268 |
);
|
1269 |
|
1270 |
const clone1 = gen.clone();
|
1282 |
};
|
1283 |
|
1284 |
expect( clone1.next( apiResponse1 ).value ).toEqual(
|
1285 |
+
select( selectors.getTicketsSharedCapacity ),
|
1286 |
);
|
1287 |
|
1288 |
const clone11 = clone1.clone();
|
1290 |
const tempSharedCapacity11 = 100;
|
1291 |
|
1292 |
expect( clone11.next( sharedCapacity11 ).value ).toEqual(
|
1293 |
+
select( selectors.getTicketsTempSharedCapacity ),
|
1294 |
);
|
1295 |
expect( clone11.next( tempSharedCapacity11 ).value ).toEqual(
|
1296 |
+
put( actions.setTicketsSharedCapacity( tempSharedCapacity11 ) ),
|
1297 |
);
|
1298 |
expect( clone11.next().value ).toEqual(
|
1299 |
all( [
|
1314 |
select( selectors.getTicketTempEndTimeInput, props ),
|
1315 |
select( selectors.getTicketTempCapacityType, props ),
|
1316 |
select( selectors.getTicketTempCapacity, props ),
|
1317 |
+
] ),
|
1318 |
);
|
1319 |
|
1320 |
expect( clone11.next( [
|
1367 |
PROVIDER_CLASS_TO_PROVIDER_MAPPING[ apiResponse1.data.provider_class ],
|
1368 |
) ),
|
1369 |
put( actions.setTicketHasChanges( CLIENT_ID, false ) ),
|
1370 |
+
] ),
|
1371 |
);
|
1372 |
expect( clone11.next().value ).toEqual(
|
1373 |
+
fork( sagas.saveTicketWithPostSave, CLIENT_ID ),
|
1374 |
);
|
1375 |
expect( clone11.next().value ).toEqual(
|
1376 |
+
put( actions.setTicketIsLoading( CLIENT_ID, false ) ),
|
1377 |
);
|
1378 |
expect( clone11.next().done ).toEqual( true );
|
1379 |
|
1382 |
const tempSharedCapacity12 = 100;
|
1383 |
|
1384 |
expect( clone12.next( sharedCapacity12 ).value ).toEqual(
|
1385 |
+
select( selectors.getTicketsTempSharedCapacity ),
|
1386 |
);
|
1387 |
expect( clone12.next( tempSharedCapacity12 ).value ).toEqual(
|
1388 |
all( [
|
1403 |
select( selectors.getTicketTempEndTimeInput, props ),
|
1404 |
select( selectors.getTicketTempCapacityType, props ),
|
1405 |
select( selectors.getTicketTempCapacity, props ),
|
1406 |
+
] ),
|
1407 |
);
|
1408 |
|
1409 |
expect( clone12.next( [
|
1456 |
PROVIDER_CLASS_TO_PROVIDER_MAPPING[ apiResponse1.data.provider_class ],
|
1457 |
) ),
|
1458 |
put( actions.setTicketHasChanges( CLIENT_ID, false ) ),
|
1459 |
+
] ),
|
1460 |
);
|
1461 |
expect( clone12.next().value ).toEqual(
|
1462 |
+
fork( sagas.saveTicketWithPostSave, CLIENT_ID ),
|
1463 |
);
|
1464 |
expect( clone12.next().value ).toEqual(
|
1465 |
+
put( actions.setTicketIsLoading( CLIENT_ID, false ) ),
|
1466 |
);
|
1467 |
expect( clone12.next().done ).toEqual( true );
|
1468 |
|
1474 |
};
|
1475 |
|
1476 |
expect( clone2.next( apiResponse2 ).value ).toEqual(
|
1477 |
+
put( actions.setTicketIsLoading( CLIENT_ID, false ) ),
|
1478 |
);
|
1479 |
expect( clone2.next().done ).toEqual( true );
|
1480 |
} );
|
1511 |
|
1512 |
const gen = cloneableGenerator( sagas.updateTicket )( action );
|
1513 |
expect( gen.next().value ).toEqual(
|
1514 |
+
call( sagas.setBodyDetails, CLIENT_ID ),
|
1515 |
);
|
1516 |
|
1517 |
const body = new FormData();
|
1518 |
|
1519 |
expect( gen.next( body ).value ).toEqual(
|
1520 |
+
select( selectors.getTicketId, props ),
|
1521 |
);
|
1522 |
expect( gen.next( TICKET_ID ).value ).toEqual(
|
1523 |
+
put( actions.setTicketIsLoading( CLIENT_ID, true ) ),
|
1524 |
);
|
1525 |
|
1526 |
const data = [];
|
1539 |
method: 'PUT',
|
1540 |
body: data.join( '&' ),
|
1541 |
},
|
1542 |
+
} ),
|
1543 |
);
|
1544 |
|
1545 |
const clone1 = gen.clone();
|
1550 |
};
|
1551 |
|
1552 |
expect( clone1.next( apiResponse1 ).value ).toEqual(
|
1553 |
+
put( actions.setTicketIsLoading( CLIENT_ID, false ) ),
|
1554 |
);
|
1555 |
expect( clone1.next().done ).toEqual( true );
|
1556 |
|
1586 |
select( selectors.getTicketTempEndTimeInput, props ),
|
1587 |
select( selectors.getTicketTempCapacityType, props ),
|
1588 |
select( selectors.getTicketTempCapacity, props ),
|
1589 |
+
] ),
|
1590 |
);
|
1591 |
expect( clone2.next( [
|
1592 |
title,
|
1636 |
apiResponse2.data.capacity_details.available,
|
1637 |
) ),
|
1638 |
put( actions.setTicketHasChanges( CLIENT_ID, false ) ),
|
1639 |
+
] ),
|
1640 |
);
|
1641 |
expect( clone2.next( apiResponse1 ).value ).toEqual(
|
1642 |
+
put( actions.setTicketIsLoading( CLIENT_ID, false ) ),
|
1643 |
);
|
1644 |
expect( clone2.next().done ).toEqual( true );
|
1645 |
} );
|
1659 |
|
1660 |
const gen = cloneableGenerator( sagas.deleteTicket )( action );
|
1661 |
|
1662 |
+
expect( gen.next().value ).toEqual( call(
|
1663 |
+
[ window, 'confirm' ],
|
1664 |
+
'Are you sure you want to delete this ticket? It cannot be undone.',
|
1665 |
+
) );
|
1666 |
|
1667 |
expect( gen.next( true ).value ).toEqual(
|
1668 |
+
select( selectors.getTicketId, props ),
|
1669 |
);
|
1670 |
expect( gen.next( TICKET_ID ).value ).toEqual(
|
1671 |
+
select( selectors.getTicketHasBeenCreated, props ),
|
1672 |
);
|
1673 |
|
1674 |
const clone1 = gen.clone();
|
1675 |
const hasBeenCreated1 = false;
|
1676 |
|
1677 |
expect( clone1.next( hasBeenCreated1 ).value ).toEqual(
|
1678 |
+
put( actions.setTicketIsSelected( CLIENT_ID, false ) ),
|
1679 |
);
|
1680 |
expect( clone1.next().value ).toEqual(
|
1681 |
+
put( actions.removeTicketBlock( CLIENT_ID ) ),
|
1682 |
);
|
1683 |
expect( clone1.next().value ).toMatchSnapshot();
|
1684 |
expect( clone1.next().value ).toMatchSnapshot();
|
1692 |
];
|
1693 |
|
1694 |
expect( clone2.next( hasBeenCreated2 ).value ).toEqual(
|
1695 |
+
put( actions.setTicketIsSelected( CLIENT_ID, false ) ),
|
1696 |
);
|
1697 |
expect( clone2.next().value ).toEqual(
|
1698 |
+
put( actions.removeTicketBlock( CLIENT_ID ) ),
|
1699 |
);
|
1700 |
expect( clone2.next().value ).toMatchSnapshot();
|
1701 |
expect( clone2.next().value ).toMatchSnapshot();
|
1711 |
method: 'DELETE',
|
1712 |
body: body.join( '&' ),
|
1713 |
},
|
1714 |
+
} ),
|
1715 |
);
|
1716 |
expect( clone2.next().done ).toEqual( true );
|
1717 |
} );
|
1727 |
const gen = cloneableGenerator( sagas.fetchTicketsHeaderImage )( action );
|
1728 |
|
1729 |
expect( gen.next().value ).toEqual(
|
1730 |
+
put( actions.setTicketsIsSettingsLoading( true ) ),
|
1731 |
);
|
1732 |
expect( gen.next().value ).toEqual(
|
1733 |
+
call( wpREST, { path: `media/${ action.payload.id }` } ),
|
1734 |
);
|
1735 |
|
1736 |
const clone1 = gen.clone();
|
1742 |
};
|
1743 |
|
1744 |
expect( clone1.next( apiResponseBad ).value ).toEqual(
|
1745 |
+
put( actions.setTicketsIsSettingsLoading( false ) ),
|
1746 |
);
|
1747 |
expect( clone1.next().done ).toEqual( true );
|
1748 |
|
1769 |
id: apiResponseGood.data.id,
|
1770 |
alt: apiResponseGood.data.alt_text,
|
1771 |
src: apiResponseGood.data.media_details.sizes.medium.source_url,
|
1772 |
+
} ) ),
|
1773 |
);
|
1774 |
expect( clone2.next().value ).toEqual(
|
1775 |
+
put( actions.setTicketsIsSettingsLoading( false ) ),
|
1776 |
);
|
1777 |
expect( clone2.next().done ).toEqual( true );
|
1778 |
} );
|
1798 |
|
1799 |
expect( gen.next().value ).toMatchSnapshot();
|
1800 |
expect( gen.next( postId ).value ).toEqual(
|
1801 |
+
put( actions.setTicketsIsSettingsLoading( true ) ),
|
1802 |
);
|
1803 |
expect( gen.next().value ).toEqual(
|
1804 |
+
put( rsvpActions.setRSVPIsSettingsLoading( true ) ),
|
1805 |
);
|
1806 |
expect( gen.next().value ).toEqual(
|
1807 |
call( wpREST, {
|
1817 |
},
|
1818 |
} ),
|
1819 |
},
|
1820 |
+
} ),
|
1821 |
);
|
1822 |
|
1823 |
const apiResponse = {
|
1831 |
src: action.payload.image.sizes.medium.url,
|
1832 |
};
|
1833 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1834 |
+
put( actions.setTicketsHeaderImage( headerImage ) ),
|
1835 |
);
|
1836 |
expect( gen.next().value ).toEqual(
|
1837 |
+
put( rsvpActions.setRSVPHeaderImage( headerImage ) ),
|
1838 |
);
|
1839 |
expect( gen.next().value ).toEqual(
|
1840 |
+
put( actions.setTicketsIsSettingsLoading( false ) ),
|
1841 |
);
|
1842 |
expect( gen.next().value ).toEqual(
|
1843 |
+
put( rsvpActions.setRSVPIsSettingsLoading( false ) ),
|
1844 |
);
|
1845 |
expect( gen.next().done ).toEqual( true );
|
1846 |
} );
|
1864 |
|
1865 |
expect( gen.next().value ).toMatchSnapshot();
|
1866 |
expect( gen.next( postId ).value ).toEqual(
|
1867 |
+
put( actions.setTicketsIsSettingsLoading( true ) ),
|
1868 |
);
|
1869 |
expect( gen.next().value ).toEqual(
|
1870 |
+
put( rsvpActions.setRSVPIsSettingsLoading( true ) ),
|
1871 |
);
|
1872 |
expect( gen.next().value ).toEqual(
|
1873 |
call( wpREST, {
|
1883 |
},
|
1884 |
} ),
|
1885 |
},
|
1886 |
+
} ),
|
1887 |
);
|
1888 |
|
1889 |
const apiResponse = {
|
1892 |
},
|
1893 |
};
|
1894 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1895 |
+
put( actions.setTicketsIsSettingsLoading( false ) ),
|
1896 |
);
|
1897 |
expect( gen.next().value ).toEqual(
|
1898 |
+
put( rsvpActions.setRSVPIsSettingsLoading( false ) ),
|
1899 |
);
|
1900 |
expect( gen.next().done ).toEqual( true );
|
1901 |
} );
|
1908 |
const gen = sagas.deleteTicketsHeaderImage();
|
1909 |
expect( gen.next().value ).toMatchSnapshot();
|
1910 |
expect( gen.next( postId ).value ).toEqual(
|
1911 |
+
put( actions.setTicketsIsSettingsLoading( true ) ),
|
1912 |
);
|
1913 |
expect( gen.next().value ).toEqual(
|
1914 |
+
put( rsvpActions.setRSVPIsSettingsLoading( true ) ),
|
1915 |
);
|
1916 |
expect( gen.next().value ).toEqual(
|
1917 |
call( wpREST, {
|
1927 |
},
|
1928 |
} ),
|
1929 |
},
|
1930 |
+
} ),
|
1931 |
);
|
1932 |
|
1933 |
const apiResponse = {
|
1937 |
};
|
1938 |
|
1939 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1940 |
+
put( actions.setTicketsHeaderImage( TICKET_HEADER_IMAGE_DEFAULT_STATE ) ),
|
1941 |
);
|
1942 |
expect( gen.next().value ).toEqual(
|
1943 |
+
put( rsvpActions.setRSVPHeaderImage( RSVP_HEADER_IMAGE_DEFAULT_STATE ) ),
|
1944 |
);
|
1945 |
expect( gen.next().value ).toEqual(
|
1946 |
+
put( actions.setTicketsIsSettingsLoading( false ) ),
|
1947 |
);
|
1948 |
expect( gen.next().value ).toEqual(
|
1949 |
+
put( rsvpActions.setRSVPIsSettingsLoading( false ) ),
|
1950 |
);
|
1951 |
expect( gen.next().done ).toEqual( true );
|
1952 |
} );
|
1957 |
const gen = sagas.deleteTicketsHeaderImage();
|
1958 |
expect( gen.next().value ).toMatchSnapshot();
|
1959 |
expect( gen.next( postId ).value ).toEqual(
|
1960 |
+
put( actions.setTicketsIsSettingsLoading( true ) ),
|
1961 |
);
|
1962 |
expect( gen.next().value ).toEqual(
|
1963 |
+
put( rsvpActions.setRSVPIsSettingsLoading( true ) ),
|
1964 |
);
|
1965 |
expect( gen.next().value ).toEqual(
|
1966 |
call( wpREST, {
|
1976 |
},
|
1977 |
} ),
|
1978 |
},
|
1979 |
+
} ),
|
1980 |
);
|
1981 |
|
1982 |
const apiResponse = {
|
1985 |
},
|
1986 |
};
|
1987 |
expect( gen.next( apiResponse ).value ).toEqual(
|
1988 |
+
put( actions.setTicketsIsSettingsLoading( false ) ),
|
1989 |
);
|
1990 |
expect( gen.next().value ).toEqual(
|
1991 |
+
put( rsvpActions.setRSVPIsSettingsLoading( false ) ),
|
1992 |
);
|
1993 |
expect( gen.next().done ).toEqual( true );
|
1994 |
} );
|
2060 |
put( actions.setTicketEndTimeInput( CLIENT_ID, endTimeInput ) ),
|
2061 |
put( actions.setTicketCapacityType( CLIENT_ID, capacityType ) ),
|
2062 |
put( actions.setTicketCapacity( CLIENT_ID, capacity ) ),
|
2063 |
+
] ),
|
2064 |
);
|
2065 |
expect( gen.next().done ).toEqual( true );
|
2066 |
} );
|
2132 |
put( actions.setTicketTempEndTimeInput( CLIENT_ID, endTimeInput ) ),
|
2133 |
put( actions.setTicketTempCapacityType( CLIENT_ID, capacityType ) ),
|
2134 |
put( actions.setTicketTempCapacity( CLIENT_ID, capacity ) ),
|
2135 |
+
] ),
|
2136 |
);
|
2137 |
expect( gen.next().done ).toEqual( true );
|
2138 |
} );
|
2143 |
const CLIENT_ID = 'tribe';
|
2144 |
const gen = sagas.handleTicketDurationError( CLIENT_ID );
|
2145 |
expect( gen.next().value ).toEqual(
|
2146 |
+
select( selectors.getTicketTempStartDateMoment, { clientId: CLIENT_ID } ),
|
2147 |
);
|
2148 |
expect( gen.next( undefined ).value ).toEqual(
|
2149 |
+
select( selectors.getTicketTempEndDateMoment, { clientId: CLIENT_ID } ),
|
2150 |
);
|
2151 |
expect( gen.next( undefined ).value ).toEqual(
|
2152 |
+
put( actions.setTicketHasDurationError( CLIENT_ID, true ) ),
|
2153 |
);
|
2154 |
expect( gen.next().done ).toEqual( true );
|
2155 |
} );
|
2170 |
const END_TIME_SECONDS = 46800;
|
2171 |
const gen = sagas.handleTicketDurationError( CLIENT_ID );
|
2172 |
expect( gen.next().value ).toEqual(
|
2173 |
+
select( selectors.getTicketTempStartDateMoment, { clientId: CLIENT_ID } ),
|
2174 |
);
|
2175 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
2176 |
+
select( selectors.getTicketTempEndDateMoment, { clientId: CLIENT_ID } ),
|
2177 |
);
|
2178 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
2179 |
+
select( selectors.getTicketTempStartTime, { clientId: CLIENT_ID } ),
|
2180 |
);
|
2181 |
expect( gen.next( START_TIME ).value ).toEqual(
|
2182 |
+
select( selectors.getTicketTempEndTime, { clientId: CLIENT_ID } ),
|
2183 |
);
|
2184 |
expect( gen.next( END_TIME ).value ).toEqual(
|
2185 |
+
call( timeUtil.toSeconds, START_TIME, timeUtil.TIME_FORMAT_HH_MM_SS ),
|
2186 |
);
|
2187 |
expect( gen.next( START_TIME_SECONDS ).value ).toEqual(
|
2188 |
+
call( timeUtil.toSeconds, END_TIME, timeUtil.TIME_FORMAT_HH_MM_SS ),
|
2189 |
);
|
2190 |
expect( gen.next( END_TIME_SECONDS ).value ).toEqual(
|
2191 |
+
call( momentUtil.setTimeInSeconds, START_DATE_MOMENT.clone(), START_TIME_SECONDS ),
|
2192 |
);
|
2193 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
2194 |
+
call( momentUtil.setTimeInSeconds, END_DATE_MOMENT.clone(), END_TIME_SECONDS ),
|
2195 |
);
|
2196 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
2197 |
+
call( [ START_DATE_MOMENT, 'isSameOrAfter' ], END_DATE_MOMENT ),
|
2198 |
);
|
2199 |
expect( gen.next( true ).value ).toEqual(
|
2200 |
+
put( actions.setTicketHasDurationError( CLIENT_ID, true ) ),
|
2201 |
);
|
2202 |
expect( gen.next().done ).toEqual( true );
|
2203 |
} );
|
2204 |
|
2205 |
+
it( 'should set thas duration error to false if start date time is before end date time', () => { // eslint-disable-line max-len
|
2206 |
const CLIENT_ID = 'tribe';
|
2207 |
const START_DATE_MOMENT = {
|
2208 |
clone: () => {},
|
2218 |
const END_TIME_SECONDS = 46800;
|
2219 |
const gen = sagas.handleTicketDurationError( CLIENT_ID );
|
2220 |
expect( gen.next().value ).toEqual(
|
2221 |
+
select( selectors.getTicketTempStartDateMoment, { clientId: CLIENT_ID } ),
|
2222 |
);
|
2223 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
2224 |
+
select( selectors.getTicketTempEndDateMoment, { clientId: CLIENT_ID } ),
|
2225 |
);
|
2226 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
2227 |
+
select( selectors.getTicketTempStartTime, { clientId: CLIENT_ID } ),
|
2228 |
);
|
2229 |
expect( gen.next( START_TIME ).value ).toEqual(
|
2230 |
+
select( selectors.getTicketTempEndTime, { clientId: CLIENT_ID } ),
|
2231 |
);
|
2232 |
expect( gen.next( END_TIME ).value ).toEqual(
|
2233 |
+
call( timeUtil.toSeconds, START_TIME, timeUtil.TIME_FORMAT_HH_MM_SS ),
|
2234 |
);
|
2235 |
expect( gen.next( START_TIME_SECONDS ).value ).toEqual(
|
2236 |
+
call( timeUtil.toSeconds, END_TIME, timeUtil.TIME_FORMAT_HH_MM_SS ),
|
2237 |
);
|
2238 |
expect( gen.next( END_TIME_SECONDS ).value ).toEqual(
|
2239 |
+
call( momentUtil.setTimeInSeconds, START_DATE_MOMENT.clone(), START_TIME_SECONDS ),
|
2240 |
);
|
2241 |
expect( gen.next( START_DATE_MOMENT ).value ).toEqual(
|
2242 |
+
call( momentUtil.setTimeInSeconds, END_DATE_MOMENT.clone(), END_TIME_SECONDS ),
|
2243 |
);
|
2244 |
expect( gen.next( END_DATE_MOMENT ).value ).toEqual(
|
2245 |
+
call( [ START_DATE_MOMENT, 'isSameOrAfter' ], END_DATE_MOMENT ),
|
2246 |
);
|
2247 |
expect( gen.next( false ).value ).toEqual(
|
2248 |
+
put( actions.setTicketHasDurationError( CLIENT_ID, false ) ),
|
2249 |
);
|
2250 |
expect( gen.next().done ).toEqual( true );
|
2251 |
} );
|
2262 |
dayPickerInput: {
|
2263 |
state: {
|
2264 |
value: '',
|
2265 |
+
},
|
2266 |
+
},
|
2267 |
+
},
|
2268 |
+
};
|
2269 |
} );
|
2270 |
|
2271 |
it( 'should handle undefined ticket start date', () => {
|
2273 |
expect( gen.next().value ).toEqual( undefined );
|
2274 |
expect( gen.next( undefined ).value ).toEqual( '' );
|
2275 |
expect( gen.next( '' ).value ).toEqual(
|
2276 |
+
put( actions.setTicketTempStartDate( action.payload.clientId, '' ) ),
|
2277 |
);
|
2278 |
expect( gen.next().value ).toEqual(
|
2279 |
+
put( actions.setTicketTempStartDateInput(
|
2280 |
+
action.payload.clientId,
|
2281 |
+
action.payload.dayPickerInput.state.value,
|
2282 |
+
) ),
|
2283 |
);
|
2284 |
expect( gen.next().value ).toEqual(
|
2285 |
+
put( actions.setTicketTempStartDateMoment( action.payload.clientId, undefined ) ),
|
2286 |
);
|
2287 |
expect( gen.next().done ).toEqual( true );
|
2288 |
} );
|
2292 |
action.payload.dayPickerInput.state.value = 'January 1, 2018';
|
2293 |
const gen = sagas.handleTicketStartDate( action );
|
2294 |
expect( gen.next().value ).toEqual(
|
2295 |
+
call( momentUtil.toMoment, action.payload.date ),
|
2296 |
);
|
2297 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
2298 |
+
call( momentUtil.toDatabaseDate, action.payload.date ),
|
2299 |
);
|
2300 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
2301 |
+
put( actions.setTicketTempStartDate( action.payload.clientId, action.payload.date ) ),
|
2302 |
);
|
2303 |
expect( gen.next().value ).toEqual(
|
2304 |
+
put( actions.setTicketTempStartDateInput(
|
2305 |
+
action.payload.clientId,
|
2306 |
+
action.payload.dayPickerInput.state.value,
|
2307 |
+
) ),
|
2308 |
);
|
2309 |
expect( gen.next().value ).toEqual(
|
2310 |
+
put( actions.setTicketTempStartDateMoment( action.payload.clientId, action.payload.date ) ),
|
2311 |
);
|
2312 |
expect( gen.next().done ).toEqual( true );
|
2313 |
} );
|
2324 |
dayPickerInput: {
|
2325 |
state: {
|
2326 |
value: '',
|
2327 |
+
},
|
2328 |
+
},
|
2329 |
+
},
|
2330 |
+
};
|
2331 |
} );
|
2332 |
|
2333 |
it( 'should handle undefined ticket end date', () => {
|
2335 |
expect( gen.next().value ).toEqual( undefined );
|
2336 |
expect( gen.next( undefined ).value ).toEqual( '' );
|
2337 |
expect( gen.next( '' ).value ).toEqual(
|
2338 |
+
put( actions.setTicketTempEndDate( action.payload.clientId, '' ) ),
|
2339 |
);
|
2340 |
expect( gen.next().value ).toEqual(
|
2341 |
+
put( actions.setTicketTempEndDateInput(
|
2342 |
+
action.payload.clientId,
|
2343 |
+
action.payload.dayPickerInput.state.value,
|
2344 |
+
) ),
|
2345 |
);
|
2346 |
expect( gen.next().value ).toEqual(
|
2347 |
+
put( actions.setTicketTempEndDateMoment( action.payload.clientId, undefined ) ),
|
2348 |
);
|
2349 |
expect( gen.next().done ).toEqual( true );
|
2350 |
} );
|
2354 |
action.payload.dayPickerInput.state.value = 'January 1, 2018';
|
2355 |
const gen = sagas.handleTicketEndDate( action );
|
2356 |
expect( gen.next().value ).toEqual(
|
2357 |
+
call( momentUtil.toMoment, action.payload.date ),
|
2358 |
);
|
2359 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
2360 |
+
call( momentUtil.toDatabaseDate, action.payload.date ),
|
2361 |
);
|
2362 |
expect( gen.next( action.payload.date ).value ).toEqual(
|
2363 |
+
put( actions.setTicketTempEndDate( action.payload.clientId, action.payload.date ) ),
|
2364 |
);
|
2365 |
expect( gen.next().value ).toEqual(
|
2366 |
+
put( actions.setTicketTempEndDateInput(
|
2367 |
+
action.payload.clientId,
|
2368 |
+
action.payload.dayPickerInput.state.value,
|
2369 |
+
) ),
|
2370 |
);
|
2371 |
expect( gen.next().value ).toEqual(
|
2372 |
+
put( actions.setTicketTempEndDateMoment( action.payload.clientId, action.payload.date ) ),
|
2373 |
);
|
2374 |
expect( gen.next().done ).toEqual( true );
|
2375 |
} );
|
2386 |
const startTime = '01:00';
|
2387 |
const gen = sagas.handleTicketStartTime( action );
|
2388 |
expect( gen.next().value ).toEqual(
|
2389 |
+
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM ),
|
2390 |
);
|
2391 |
expect( gen.next( startTime ).value ).toEqual(
|
2392 |
+
put( actions.setTicketTempStartTime( action.payload.clientId, `${ startTime }:00` ) ),
|
2393 |
);
|
2394 |
expect( gen.next().done ).toEqual( true );
|
2395 |
} );
|
2406 |
};
|
2407 |
const gen = sagas.handleTicketStartTimeInput( action );
|
2408 |
expect( gen.next().value ).toEqual(
|
2409 |
+
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM ),
|
2410 |
);
|
2411 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2412 |
+
call( momentUtil.toMoment, startTimeInput, momentUtil.TIME_FORMAT, false ),
|
2413 |
);
|
2414 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2415 |
+
call( momentUtil.toTime, startTimeInput ),
|
2416 |
);
|
2417 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2418 |
+
put( actions.setTicketTempStartTimeInput( action.payload.clientId, startTimeInput ) ),
|
2419 |
);
|
2420 |
expect( gen.next().done ).toEqual( true );
|
2421 |
} );
|
2432 |
const endTime = '01:00';
|
2433 |
const gen = sagas.handleTicketEndTime( action );
|
2434 |
expect( gen.next().value ).toEqual(
|
2435 |
+
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM ),
|
2436 |
);
|
2437 |
expect( gen.next( endTime ).value ).toEqual(
|
2438 |
+
put( actions.setTicketTempEndTime( action.payload.clientId, `${ endTime }:00` ) ),
|
2439 |
);
|
2440 |
expect( gen.next().done ).toEqual( true );
|
2441 |
} );
|
2452 |
};
|
2453 |
const gen = sagas.handleTicketStartTimeInput( action );
|
2454 |
expect( gen.next().value ).toEqual(
|
2455 |
+
call( timeUtil.fromSeconds, action.payload.seconds, timeUtil.TIME_FORMAT_HH_MM ),
|
2456 |
);
|
2457 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2458 |
+
call( momentUtil.toMoment, startTimeInput, momentUtil.TIME_FORMAT, false ),
|
2459 |
);
|
2460 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2461 |
+
call( momentUtil.toTime, startTimeInput ),
|
2462 |
);
|
2463 |
expect( gen.next( startTimeInput ).value ).toEqual(
|
2464 |
+
put( actions.setTicketTempStartTimeInput( action.payload.clientId, startTimeInput ) ),
|
2465 |
);
|
2466 |
expect( gen.next().done ).toEqual( true );
|
2467 |
} );
|
2472 |
const ticketIds = [ 42 ];
|
2473 |
const gen = cloneableGenerator( sagas.handleTicketMove )();
|
2474 |
expect( gen.next().value ).toEqual(
|
2475 |
+
select( selectors.getTicketsAllClientIds ),
|
2476 |
);
|
2477 |
expect( gen.next( ticketIds ).value ).toEqual(
|
2478 |
+
select( moveSelectors.getModalClientId ),
|
2479 |
);
|
2480 |
|
2481 |
const clone1 = gen.clone();
|
2483 |
|
2484 |
const clone2 = gen.clone();
|
2485 |
expect( clone2.next( 42 ).value ).toEqual(
|
2486 |
+
put( actions.setTicketIsSelected( 42, false ) ),
|
2487 |
);
|
2488 |
expect( clone2.next().value ).toEqual(
|
2489 |
+
put( actions.removeTicketBlock( 42 ) ),
|
2490 |
);
|
2491 |
expect( clone2.next().value ).toMatchSnapshot();
|
2492 |
expect( clone2.next().done ).toEqual( true );
|
2495 |
|
2496 |
// @todo: skipping until we can come back to fix it.
|
2497 |
describe.skip( 'syncTicketSaleEndWithEventStart', () => {
|
2498 |
+
let prevDate, momentMock, clientId;
|
2499 |
beforeEach( () => {
|
2500 |
clientId = 'clientId';
|
2501 |
prevDate = '2018-01-01 00:00:00';
|
|
|
|
|
|
|
|
|
|
|
|
|
2502 |
global.tribe = {
|
2503 |
events: {
|
2504 |
data: {
|
2526 |
it( 'should not sync', () => {
|
2527 |
const gen = sagas.syncTicketSaleEndWithEventStart( prevDate, clientId );
|
2528 |
expect( gen.next().value ).toEqual(
|
2529 |
+
select( selectors.getTicketTempEndDateMoment, { clientId } ),
|
2530 |
);
|
2531 |
expect( gen.next( momentMock ).value ).toEqual(
|
2532 |
+
select( selectors.getTicketEndDateMoment, { clientId } ),
|
2533 |
);
|
2534 |
expect( gen.next( momentMock ).value ).toEqual(
|
2535 |
+
call( createDates, prevDate ),
|
2536 |
);
|
2537 |
expect( gen.next( { moment: momentMock } ).value ).toMatchSnapshot();
|
2538 |
expect( gen.next( false ).value ).toMatchSnapshot();
|
2543 |
it( 'should sync', () => {
|
2544 |
const gen = sagas.syncTicketSaleEndWithEventStart( prevDate, clientId );
|
2545 |
expect( gen.next().value ).toEqual(
|
2546 |
+
select( selectors.getTicketTempEndDateMoment, { clientId } ),
|
2547 |
);
|
2548 |
expect( gen.next( momentMock ).value ).toEqual(
|
2549 |
+
select( selectors.getTicketEndDateMoment, { clientId } ),
|
2550 |
);
|
2551 |
expect( gen.next( momentMock ).value ).toEqual(
|
2552 |
+
call( createDates, prevDate ),
|
2553 |
);
|
2554 |
expect( gen.next( { moment: momentMock } ).value ).toMatchSnapshot();
|
2555 |
expect( gen.next( true ).value ).toMatchSnapshot();
|
2556 |
expect( gen.next( true ).value ).toMatchSnapshot();
|
2557 |
|
2558 |
expect( gen.next( true ).value ).toEqual(
|
2559 |
+
select( global.tribe.events.data.blocks.datetime.selectors.getStart ),
|
2560 |
);
|
2561 |
expect( gen.next( '2018-02-02 02:00:00' ).value ).toEqual(
|
2562 |
+
call( createDates, '2018-02-02 02:00:00' ),
|
2563 |
);
|
2564 |
|
2565 |
expect( gen.next( {
|
2604 |
it( 'should handle start time changes', () => {
|
2605 |
const gen = sagas.handleEventStartDateChanges();
|
2606 |
|
2607 |
+
expect( gen.next().value ).toEqual(
|
2608 |
+
call( hasPostTypeChannel ),
|
2609 |
);
|
2610 |
+
expect( gen.next( channel ).value ).toMatchSnapshot();
|
2611 |
+
expect( gen.next().value ).toEqual(
|
2612 |
+
call( [ channel, 'close' ] ),
|
2613 |
);
|
2614 |
|
2615 |
expect( gen.next().value ).toEqual(
|
2616 |
+
call( isTribeEventPostType ),
|
2617 |
);
|
2618 |
|
2619 |
expect( gen.next( true ).value ).toEqual(
|
2620 |
+
select( global.tribe.events.data.blocks.datetime.selectors.getStart ),
|
2621 |
);
|
2622 |
|
2623 |
expect( gen.next( '2018-01-01 12:00:00' ).value ).toEqual(
|
2624 |
+
take( [ 'SET_START_DATE_TIME', 'SET_START_TIME' ] ),
|
2625 |
);
|
2626 |
|
2627 |
expect( gen.next().value ).toEqual(
|
2628 |
+
fork( sagas.syncTicketsSaleEndWithEventStart, '2018-01-01 12:00:00' ),
|
2629 |
);
|
2630 |
|
2631 |
expect( gen.next().done ).toEqual( false );
|
2644 |
const gen = sagas.saveTicketWithPostSave( clientId );
|
2645 |
|
2646 |
expect( gen.next().value ).toEqual(
|
2647 |
+
select( selectors.getTicketHasBeenCreated, { clientId } ),
|
2648 |
);
|
2649 |
|
2650 |
expect( gen.next( true ).value ).toEqual(
|
2651 |
+
call( createWPEditorSavingChannel ),
|
2652 |
);
|
2653 |
|
2654 |
expect( gen.next( channel ).value ).toEqual(
|
2655 |
+
call( createWPEditorNotSavingChannel ),
|
2656 |
);
|
2657 |
|
2658 |
expect( gen.next( channel ).value ).toEqual(
|
2659 |
+
take( channel ),
|
2660 |
);
|
2661 |
|
2662 |
expect( gen.next().value ).toEqual(
|
2663 |
+
call( sagas.updateTicket, { payload: { clientId } } ),
|
2664 |
);
|
2665 |
|
2666 |
expect( gen.next( channel ).value ).toEqual(
|
2667 |
+
take( channel ),
|
2668 |
);
|
2669 |
|
2670 |
expect( gen.next( channel ).value ).toEqual(
|
2671 |
+
take( channel ),
|
2672 |
);
|
2673 |
|
2674 |
expect( gen.next().value ).toEqual(
|
2675 |
+
call( sagas.updateTicket, { payload: { clientId } } ),
|
2676 |
);
|
2677 |
|
2678 |
expect( gen.next( channel ).value ).toEqual(
|
2679 |
+
take( channel ),
|
2680 |
);
|
2681 |
} );
|
2682 |
it( 'should do nothing', () => {
|
2683 |
const gen = sagas.saveTicketWithPostSave( clientId );
|
2684 |
|
2685 |
expect( gen.next().value ).toEqual(
|
2686 |
+
select( selectors.getTicketHasBeenCreated, { clientId } ),
|
2687 |
);
|
2688 |
|
2689 |
expect( gen.next( false ).done ).toEqual( true );
|
src/modules/data/blocks/ticket/__tests__/selectors.test.js
CHANGED
@@ -14,7 +14,7 @@ import {
|
|
14 |
} from '@moderntribe/tickets/data/blocks/ticket/reducers/tickets/ticket/details';
|
15 |
import {
|
16 |
DEFAULT_STATE as TEMP_DETAILS_DEFAULT_STATE,
|
17 |
-
} from '@moderntribe/tickets/data/blocks/ticket/reducers/tickets/ticket/details';
|
18 |
|
19 |
jest.mock( 'moment', () => () => {
|
20 |
const moment = require.requireActual( 'moment' );
|
@@ -41,7 +41,7 @@ describe( 'Ticket block selectors', () => {
|
|
41 |
tempDetails: { ...TEMP_DETAILS_DEFAULT_STATE },
|
42 |
},
|
43 |
},
|
44 |
-
}
|
45 |
},
|
46 |
},
|
47 |
},
|
@@ -452,7 +452,7 @@ describe( 'Ticket block selectors', () => {
|
|
452 |
|
453 |
it( 'should be invalid', () => {
|
454 |
expect( selectors.isTempCapacityValid( state, ownProps ) ).toBe( false );
|
455 |
-
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacity = 'not a number';
|
456 |
expect( selectors.isTempCapacityValid( state, ownProps ) ).toBe( false );
|
457 |
} );
|
458 |
} );
|
@@ -472,27 +472,27 @@ describe( 'Ticket block selectors', () => {
|
|
472 |
|
473 |
describe( 'isTicketValid', () => {
|
474 |
it( 'should be valid when unlimited', () => {
|
475 |
-
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.title = 'Modern Tribe';
|
476 |
-
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacityType = 'unlimited';
|
477 |
expect( selectors.isTicketValid( state, ownProps ) ).toBe( true );
|
478 |
} );
|
479 |
|
480 |
it( 'should be valid when shared', () => {
|
481 |
-
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.title = 'Modern Tribe';
|
482 |
-
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacityType = 'capped';
|
483 |
state.tickets.blocks.ticket.tempSharedCapacity = '10';
|
484 |
expect( selectors.isTicketValid( state, ownProps ) ).toBe( true );
|
485 |
} );
|
486 |
|
487 |
it( 'should be invalid when independent', () => {
|
488 |
-
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacityType = 'own';
|
489 |
-
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.title = 'Modern Tribe';
|
490 |
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacity = '';
|
491 |
expect( selectors.isTicketValid( state, ownProps ) ).toBe( false );
|
492 |
} );
|
493 |
|
494 |
it( 'should be invalid when independent with no title', () => {
|
495 |
-
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacityType = 'own';
|
496 |
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.title = '';
|
497 |
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacity = 1;
|
498 |
expect( selectors.isTicketValid( state, ownProps ) ).toBe( false );
|
14 |
} from '@moderntribe/tickets/data/blocks/ticket/reducers/tickets/ticket/details';
|
15 |
import {
|
16 |
DEFAULT_STATE as TEMP_DETAILS_DEFAULT_STATE,
|
17 |
+
} from '@moderntribe/tickets/data/blocks/ticket/reducers/tickets/ticket/temp-details';
|
18 |
|
19 |
jest.mock( 'moment', () => () => {
|
20 |
const moment = require.requireActual( 'moment' );
|
41 |
tempDetails: { ...TEMP_DETAILS_DEFAULT_STATE },
|
42 |
},
|
43 |
},
|
44 |
+
},
|
45 |
},
|
46 |
},
|
47 |
},
|
452 |
|
453 |
it( 'should be invalid', () => {
|
454 |
expect( selectors.isTempCapacityValid( state, ownProps ) ).toBe( false );
|
455 |
+
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacity = 'not a number'; // eslint-disable-line max-len
|
456 |
expect( selectors.isTempCapacityValid( state, ownProps ) ).toBe( false );
|
457 |
} );
|
458 |
} );
|
472 |
|
473 |
describe( 'isTicketValid', () => {
|
474 |
it( 'should be valid when unlimited', () => {
|
475 |
+
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.title = 'Modern Tribe'; // eslint-disable-line max-len
|
476 |
+
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacityType = 'unlimited'; // eslint-disable-line max-len
|
477 |
expect( selectors.isTicketValid( state, ownProps ) ).toBe( true );
|
478 |
} );
|
479 |
|
480 |
it( 'should be valid when shared', () => {
|
481 |
+
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.title = 'Modern Tribe'; // eslint-disable-line max-len
|
482 |
+
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacityType = 'capped'; // eslint-disable-line max-len
|
483 |
state.tickets.blocks.ticket.tempSharedCapacity = '10';
|
484 |
expect( selectors.isTicketValid( state, ownProps ) ).toBe( true );
|
485 |
} );
|
486 |
|
487 |
it( 'should be invalid when independent', () => {
|
488 |
+
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacityType = 'own'; // eslint-disable-line max-len
|
489 |
+
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.title = 'Modern Tribe'; // eslint-disable-line max-len
|
490 |
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacity = '';
|
491 |
expect( selectors.isTicketValid( state, ownProps ) ).toBe( false );
|
492 |
} );
|
493 |
|
494 |
it( 'should be invalid when independent with no title', () => {
|
495 |
+
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacityType = 'own'; // eslint-disable-line max-len
|
496 |
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.title = '';
|
497 |
state.tickets.blocks.ticket.tickets.byClientId[ 'modern-tribe' ].tempDetails.capacity = 1;
|
498 |
expect( selectors.isTicketValid( state, ownProps ) ).toBe( false );
|
src/modules/data/blocks/ticket/actions.js
CHANGED
@@ -548,7 +548,6 @@ export const handleTicketEndTime = ( clientId, seconds ) => ( {
|
|
548 |
},
|
549 |
} );
|
550 |
|
551 |
-
|
552 |
export const fetchTicket = ( clientId, ticketId ) => ( {
|
553 |
type: types.FETCH_TICKET,
|
554 |
payload: {
|
@@ -575,7 +574,7 @@ export const deleteTicket = ( clientId ) => ( {
|
|
575 |
type: types.DELETE_TICKET,
|
576 |
payload: {
|
577 |
clientId,
|
578 |
-
}
|
579 |
} );
|
580 |
|
581 |
export const setTicketInitialState = ( props ) => ( {
|
548 |
},
|
549 |
} );
|
550 |
|
|
|
551 |
export const fetchTicket = ( clientId, ticketId ) => ( {
|
552 |
type: types.FETCH_TICKET,
|
553 |
payload: {
|
574 |
type: types.DELETE_TICKET,
|
575 |
payload: {
|
576 |
clientId,
|
577 |
+
},
|
578 |
} );
|
579 |
|
580 |
export const setTicketInitialState = ( props ) => ( {
|
src/modules/data/blocks/ticket/constants.js
CHANGED
@@ -21,9 +21,9 @@ export const TC_ORDERS = 'tpp-orders';
|
|
21 |
export const WOO_ORDERS = 'tickets-orders';
|
22 |
|
23 |
export const TICKET_ORDERS_PAGE_SLUG = {
|
24 |
-
[EDD_CLASS]: EDD_ORDERS,
|
25 |
-
[TC_CLASS]: TC_ORDERS,
|
26 |
-
[WOO_CLASS]: WOO_ORDERS,
|
27 |
};
|
28 |
|
29 |
export const UNLIMITED = 'unlimited';
|
21 |
export const WOO_ORDERS = 'tickets-orders';
|
22 |
|
23 |
export const TICKET_ORDERS_PAGE_SLUG = {
|
24 |
+
[ EDD_CLASS ]: EDD_ORDERS,
|
25 |
+
[ TC_CLASS ]: TC_ORDERS,
|
26 |
+
[ WOO_CLASS ]: WOO_ORDERS,
|
27 |
};
|
28 |
|
29 |
export const UNLIMITED = 'unlimited';
|
src/modules/data/blocks/ticket/options.js
CHANGED
@@ -6,7 +6,7 @@ import { __ } from '@wordpress/i18n';
|
|
6 |
/**
|
7 |
* Internal dependencies
|
8 |
*/
|
9 |
-
import { SHARED, INDEPENDENT, UNLIMITED, TICKET_TYPES } from './constants'
|
10 |
|
11 |
export const CAPACITY_TYPE_OPTIONS = [
|
12 |
{
|
6 |
/**
|
7 |
* Internal dependencies
|
8 |
*/
|
9 |
+
import { SHARED, INDEPENDENT, UNLIMITED, TICKET_TYPES } from './constants';
|
10 |
|
11 |
export const CAPACITY_TYPE_OPTIONS = [
|
12 |
{
|
src/modules/data/blocks/ticket/reducers/tickets/ticket/__tests__/details.test.js
CHANGED
@@ -15,27 +15,45 @@ describe( 'Details reducer', () => {
|
|
15 |
} );
|
16 |
|
17 |
it( 'should set the title', () => {
|
18 |
-
expect( reducer(
|
|
|
|
|
|
|
19 |
} );
|
20 |
|
21 |
it( 'should set the description', () => {
|
22 |
-
expect( reducer(
|
|
|
|
|
|
|
23 |
} );
|
24 |
|
25 |
it( 'should set the price', () => {
|
26 |
-
expect( reducer(
|
|
|
|
|
|
|
27 |
} );
|
28 |
|
29 |
it( 'should set the sku', () => {
|
30 |
-
expect( reducer(
|
|
|
|
|
|
|
31 |
} );
|
32 |
|
33 |
it( 'should set the iac setting', () => {
|
34 |
-
expect( reducer(
|
|
|
|
|
|
|
35 |
} );
|
36 |
|
37 |
it( 'should set the start date', () => {
|
38 |
-
expect( reducer(
|
|
|
|
|
|
|
39 |
} );
|
40 |
|
41 |
it( 'should set the start date moment', () => {
|
@@ -46,7 +64,10 @@ describe( 'Details reducer', () => {
|
|
46 |
} );
|
47 |
|
48 |
it( 'should set the end date', () => {
|
49 |
-
expect( reducer(
|
|
|
|
|
|
|
50 |
} );
|
51 |
|
52 |
it( 'should set the end date moment', () => {
|
@@ -57,26 +78,44 @@ describe( 'Details reducer', () => {
|
|
57 |
} );
|
58 |
|
59 |
it( 'should set the start time', () => {
|
60 |
-
expect( reducer(
|
|
|
|
|
|
|
61 |
} );
|
62 |
|
63 |
it( 'should set the end time', () => {
|
64 |
-
expect( reducer(
|
|
|
|
|
|
|
65 |
} );
|
66 |
|
67 |
it( 'should set the start time input', () => {
|
68 |
-
expect( reducer(
|
|
|
|
|
|
|
69 |
} );
|
70 |
|
71 |
it( 'should set the end time input', () => {
|
72 |
-
expect( reducer(
|
|
|
|
|
|
|
73 |
} );
|
74 |
|
75 |
it( 'should set the capacity type', () => {
|
76 |
-
expect( reducer(
|
|
|
|
|
|
|
77 |
} );
|
78 |
|
79 |
it( 'should set the capacity', () => {
|
80 |
-
expect( reducer(
|
|
|
|
|
|
|
81 |
} );
|
82 |
} );
|
15 |
} );
|
16 |
|
17 |
it( 'should set the title', () => {
|
18 |
+
expect( reducer(
|
19 |
+
DEFAULT_STATE,
|
20 |
+
actions.setTicketTitle( 'block-id', 'new title' ),
|
21 |
+
) ).toMatchSnapshot();
|
22 |
} );
|
23 |
|
24 |
it( 'should set the description', () => {
|
25 |
+
expect( reducer(
|
26 |
+
DEFAULT_STATE,
|
27 |
+
actions.setTicketDescription( 'block-id', 'new description' ),
|
28 |
+
) ).toMatchSnapshot();
|
29 |
} );
|
30 |
|
31 |
it( 'should set the price', () => {
|
32 |
+
expect( reducer(
|
33 |
+
DEFAULT_STATE,
|
34 |
+
actions.setTicketPrice( 'block-id', 99 ),
|
35 |
+
) ).toMatchSnapshot();
|
36 |
} );
|
37 |
|
38 |
it( 'should set the sku', () => {
|
39 |
+
expect( reducer(
|
40 |
+
DEFAULT_STATE,
|
41 |
+
actions.setTicketSku( 'block-id', '12345678' ),
|
42 |
+
) ).toMatchSnapshot();
|
43 |
} );
|
44 |
|
45 |
it( 'should set the iac setting', () => {
|
46 |
+
expect( reducer(
|
47 |
+
DEFAULT_STATE,
|
48 |
+
actions.setTicketIACSetting( 'block-id', 'none' ),
|
49 |
+
) ).toMatchSnapshot();
|
50 |
} );
|
51 |
|
52 |
it( 'should set the start date', () => {
|
53 |
+
expect( reducer(
|
54 |
+
DEFAULT_STATE,
|
55 |
+
actions.setTicketStartDate( 'block-id', 'January 1, 2018' ),
|
56 |
+
) ).toMatchSnapshot();
|
57 |
} );
|
58 |
|
59 |
it( 'should set the start date moment', () => {
|
64 |
} );
|
65 |
|
66 |
it( 'should set the end date', () => {
|
67 |
+
expect( reducer(
|
68 |
+
DEFAULT_STATE,
|
69 |
+
actions.setTicketEndDate( 'block-id', 'January 1, 2018' ),
|
70 |
+
) ).toMatchSnapshot();
|
71 |
} );
|
72 |
|
73 |
it( 'should set the end date moment', () => {
|
78 |
} );
|
79 |
|
80 |
it( 'should set the start time', () => {
|
81 |
+
expect( reducer(
|
82 |
+
DEFAULT_STATE,
|
83 |
+
actions.setTicketStartTime( 'block-id', '13:45' ),
|
84 |
+
) ).toMatchSnapshot();
|
85 |
} );
|
86 |
|
87 |
it( 'should set the end time', () => {
|
88 |
+
expect( reducer(
|
89 |
+
DEFAULT_STATE,
|
90 |
+
actions.setTicketEndTime( 'block-id', '13:45' ),
|
91 |
+
) ).toMatchSnapshot();
|
92 |
} );
|
93 |
|
94 |
it( 'should set the start time input', () => {
|
95 |
+
expect( reducer(
|
96 |
+
DEFAULT_STATE,
|
97 |
+
actions.setTicketStartTimeInput( 'block-id', '13:45' ),
|
98 |
+
) ).toMatchSnapshot();
|
99 |
} );
|
100 |
|
101 |
it( 'should set the end time input', () => {
|
102 |
+
expect( reducer(
|
103 |
+
DEFAULT_STATE,
|
104 |
+
actions.setTicketEndTimeInput( 'block-id', '13:45' ),
|
105 |
+
) ).toMatchSnapshot();
|
106 |
} );
|
107 |
|
108 |
it( 'should set the capacity type', () => {
|
109 |
+
expect( reducer(
|
110 |
+
DEFAULT_STATE,
|
111 |
+
actions.setTicketCapacityType( 'block-id', 'unlimited' ),
|
112 |
+
) ).toMatchSnapshot();
|
113 |
} );
|
114 |
|
115 |
it( 'should set the capacity', () => {
|
116 |
+
expect( reducer(
|
117 |
+
DEFAULT_STATE,
|
118 |
+
actions.setTicketCapacity( 'block-id', 20 ),
|
119 |
+
) ).toMatchSnapshot();
|
120 |
} );
|
121 |
} );
|
src/modules/data/blocks/ticket/reducers/tickets/ticket/__tests__/temp-details.test.js
CHANGED
@@ -15,27 +15,45 @@ describe( 'Temp details reducer', () => {
|
|
15 |
} );
|
16 |
|
17 |
it( 'should set the temp title', () => {
|
18 |
-
expect( reducer(
|
|
|
|
|
|
|
19 |
} );
|
20 |
|
21 |
it( 'should set the temp description', () => {
|
22 |
-
expect( reducer(
|
|
|
|
|
|
|
23 |
} );
|
24 |
|
25 |
it( 'should set the temp price', () => {
|
26 |
-
expect( reducer(
|
|
|
|
|
|
|
27 |
} );
|
28 |
|
29 |
it( 'should set the temp sku', () => {
|
30 |
-
expect( reducer(
|
|
|
|
|
|
|
31 |
} );
|
32 |
|
33 |
it( 'should set the temp iac setting', () => {
|
34 |
-
expect( reducer(
|
|
|
|
|
|
|
35 |
} );
|
36 |
|
37 |
it( 'should set the temp start date', () => {
|
38 |
-
expect( reducer(
|
|
|
|
|
|
|
39 |
} );
|
40 |
|
41 |
it( 'should set the temp start date moment', () => {
|
@@ -46,7 +64,10 @@ describe( 'Temp details reducer', () => {
|
|
46 |
} );
|
47 |
|
48 |
it( 'should set the temp end date', () => {
|
49 |
-
expect( reducer(
|
|
|
|
|
|
|
50 |
} );
|
51 |
|
52 |
it( 'should set the temp end date moment', () => {
|
@@ -57,26 +78,44 @@ describe( 'Temp details reducer', () => {
|
|
57 |
} );
|
58 |
|
59 |
it( 'should set the temp start time', () => {
|
60 |
-
expect( reducer(
|
|
|
|
|
|
|
61 |
} );
|
62 |
|
63 |
it( 'should set the temp end time', () => {
|
64 |
-
expect( reducer(
|
|
|
|
|
|
|
65 |
} );
|
66 |
|
67 |
it( 'should set the temp start time input', () => {
|
68 |
-
expect( reducer(
|
|
|
|
|
|
|
69 |
} );
|
70 |
|
71 |
it( 'should set the temp end time input', () => {
|
72 |
-
expect( reducer(
|
|
|
|
|
|
|
73 |
} );
|
74 |
|
75 |
it( 'should set the temp capacity type', () => {
|
76 |
-
expect( reducer(
|
|
|
|
|
|
|
77 |
} );
|
78 |
|
79 |
it( 'should set the temp capacity', () => {
|
80 |
-
expect( reducer(
|
|
|
|
|
|
|
81 |
} );
|
82 |
} );
|
15 |
} );
|
16 |
|
17 |
it( 'should set the temp title', () => {
|
18 |
+
expect( reducer(
|
19 |
+
DEFAULT_STATE,
|
20 |
+
actions.setTicketTempTitle( 'block-id', 'new title' ),
|
21 |
+
) ).toMatchSnapshot();
|
22 |
} );
|
23 |
|
24 |
it( 'should set the temp description', () => {
|
25 |
+
expect( reducer(
|
26 |
+
DEFAULT_STATE,
|
27 |
+
actions.setTicketTempDescription( 'block-id', 'new description' ),
|
28 |
+
) ).toMatchSnapshot();
|
29 |
} );
|
30 |
|
31 |
it( 'should set the temp price', () => {
|
32 |
+
expect( reducer(
|
33 |
+
DEFAULT_STATE,
|
34 |
+
actions.setTicketTempPrice( 'block-id', 99 ),
|
35 |
+
) ).toMatchSnapshot();
|
36 |
} );
|
37 |
|
38 |
it( 'should set the temp sku', () => {
|
39 |
+
expect( reducer(
|
40 |
+
DEFAULT_STATE,
|
41 |
+
actions.setTicketTempSku( 'block-id', '12345678' ),
|
42 |
+
) ).toMatchSnapshot();
|
43 |
} );
|
44 |
|
45 |
it( 'should set the temp iac setting', () => {
|
46 |
+
expect( reducer(
|
47 |
+
DEFAULT_STATE,
|
48 |
+
actions.setTicketTempIACSetting( 'block-id', 'none' ),
|
49 |
+
) ).toMatchSnapshot();
|
50 |
} );
|
51 |
|
52 |
it( 'should set the temp start date', () => {
|
53 |
+
expect( reducer(
|
54 |
+
DEFAULT_STATE,
|
55 |
+
actions.setTicketTempStartDate( 'block-id', 'January 1, 2018' ),
|
56 |
+
) ).toMatchSnapshot();
|
57 |
} );
|
58 |
|
59 |
it( 'should set the temp start date moment', () => {
|
64 |
} );
|
65 |
|
66 |
it( 'should set the temp end date', () => {
|
67 |
+
expect( reducer(
|
68 |
+
DEFAULT_STATE,
|
69 |
+
actions.setTicketTempEndDate( 'block-id', 'January 1, 2018' ),
|
70 |
+
) ).toMatchSnapshot();
|
71 |
} );
|
72 |
|
73 |
it( 'should set the temp end date moment', () => {
|
78 |
} );
|
79 |
|
80 |
it( 'should set the temp start time', () => {
|
81 |
+
expect( reducer(
|
82 |
+
DEFAULT_STATE,
|
83 |
+
actions.setTicketTempStartTime( 'block-id', '13:45' ),
|
84 |
+
) ).toMatchSnapshot();
|
85 |
} );
|
86 |
|
87 |
it( 'should set the temp end time', () => {
|
88 |
+
expect( reducer(
|
89 |
+
DEFAULT_STATE,
|
90 |
+
actions.setTicketTempEndTime( 'block-id', '13:45' ),
|
91 |
+
) ).toMatchSnapshot();
|
92 |
} );
|
93 |
|
94 |
it( 'should set the temp start time input', () => {
|
95 |
+
expect( reducer(
|
96 |
+
DEFAULT_STATE,
|
97 |
+
actions.setTicketTempStartTimeInput( 'block-id', '13:45' ),
|
98 |
+
) ).toMatchSnapshot();
|
99 |
} );
|
100 |
|
101 |
it( 'should set the temp end time input', () => {
|
102 |
+
expect( reducer(
|
103 |
+
DEFAULT_STATE,
|
104 |
+
actions.setTicketTempEndTimeInput( 'block-id', '13:45' ),
|
105 |
+
) ).toMatchSnapshot();
|
106 |
} );
|
107 |
|
108 |
it( 'should set the temp capacity type', () => {
|
109 |
+
expect( reducer(
|
110 |
+
DEFAULT_STATE,
|
111 |
+
actions.setTicketTempCapacityType( 'block-id', 'unlimited' ),
|
112 |
+
) ).toMatchSnapshot();
|
113 |
} );
|
114 |
|
115 |
it( 'should set the temp capacity', () => {
|
116 |
+
expect( reducer(
|
117 |
+
DEFAULT_STATE,
|
118 |
+
actions.setTicketTempCapacity( 'block-id', 20 ),
|
119 |
+
) ).toMatchSnapshot();
|
120 |
} );
|
121 |
} );
|
src/modules/data/blocks/ticket/reducers/tickets/ticket/details.js
CHANGED
@@ -12,8 +12,12 @@ import { globals, moment as momentUtil } from '@moderntribe/common/utils';
|
|
12 |
|
13 |
const datePickerFormat = globals.tecDateSettings().datepickerFormat;
|
14 |
const currentMoment = moment();
|
15 |
-
const bufferDuration = globals.tickets().end_sale_buffer_duration
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
const endMoment = currentMoment.clone().add( bufferDuration, 'hours' ).add( bufferYears, 'years' );
|
18 |
|
19 |
const startDateInput = datePickerFormat
|
12 |
|
13 |
const datePickerFormat = globals.tecDateSettings().datepickerFormat;
|
14 |
const currentMoment = moment();
|
15 |
+
const bufferDuration = globals.tickets().end_sale_buffer_duration
|
16 |
+
? globals.tickets().end_sale_buffer_duration
|
17 |
+
: 2;
|
18 |
+
const bufferYears = globals.tickets().end_sale_buffer_years
|
19 |
+
? globals.tickets().end_sale_buffer_years
|
20 |
+
: 1;
|
21 |
const endMoment = currentMoment.clone().add( bufferDuration, 'hours' ).add( bufferYears, 'years' );
|
22 |
|
23 |
const startDateInput = datePickerFormat
|
src/modules/data/blocks/ticket/reducers/tickets/ticket/temp-details.js
CHANGED
@@ -12,8 +12,12 @@ import { globals, moment as momentUtil } from '@moderntribe/common/utils';
|
|
12 |
|
13 |
const datePickerFormat = globals.tecDateSettings().datepickerFormat;
|
14 |
const currentMoment = moment();
|
15 |
-
const bufferDuration = globals.tickets().end_sale_buffer_duration
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
const endMoment = currentMoment.clone().add( bufferDuration, 'hours' ).add( bufferYears, 'years' );
|
18 |
|
19 |
const startDateInput = datePickerFormat
|
12 |
|
13 |
const datePickerFormat = globals.tecDateSettings().datepickerFormat;
|
14 |
const currentMoment = moment();
|
15 |
+
const bufferDuration = globals.tickets().end_sale_buffer_duration
|
16 |
+
? globals.tickets().end_sale_buffer_duration
|
17 |
+
: 2;
|
18 |
+
const bufferYears = globals.tickets().end_sale_buffer_years
|
19 |
+
? globals.tickets().end_sale_buffer_years
|
20 |
+
: 1;
|
21 |
const endMoment = currentMoment.clone().add( bufferDuration, 'hours' ).add( bufferYears, 'years' );
|
22 |
|
23 |
const startDateInput = datePickerFormat
|
src/modules/data/blocks/ticket/sagas.js
CHANGED
@@ -20,14 +20,14 @@ import * as actions from './actions';
|
|
20 |
import * as selectors from './selectors';
|
21 |
import { DEFAULT_STATE } from './reducer';
|
22 |
import {
|
23 |
-
DEFAULT_STATE as TICKET_HEADER_IMAGE_DEFAULT_STATE
|
24 |
} from './reducers/header-image';
|
25 |
import {
|
26 |
DEFAULT_STATE as TICKET_DEFAULT_STATE,
|
27 |
} from './reducers/tickets/ticket';
|
28 |
import * as rsvpActions from '@moderntribe/tickets/data/blocks/rsvp/actions';
|
29 |
import {
|
30 |
-
DEFAULT_STATE as RSVP_HEADER_IMAGE_DEFAULT_STATE
|
31 |
} from '@moderntribe/tickets/data/blocks/rsvp/reducers/header-image';
|
32 |
import * as utils from '@moderntribe/tickets/data/utils';
|
33 |
import {
|
@@ -47,7 +47,6 @@ import {
|
|
47 |
createDates,
|
48 |
} from '@moderntribe/tickets/data/shared/sagas';
|
49 |
|
50 |
-
|
51 |
const {
|
52 |
UNLIMITED,
|
53 |
SHARED,
|
@@ -55,7 +54,6 @@ const {
|
|
55 |
PROVIDER_CLASS_TO_PROVIDER_MAPPING,
|
56 |
} = constants;
|
57 |
const {
|
58 |
-
tickets: ticketsConfig,
|
59 |
restNonce,
|
60 |
tecDateSettings,
|
61 |
} = globals;
|
@@ -64,7 +62,10 @@ const { wpREST } = api;
|
|
64 |
export function* createMissingTicketBlocks( tickets ) {
|
65 |
const { insertBlock } = yield call( wpDispatch, 'core/editor' );
|
66 |
const { getBlockCount, getBlocks } = yield call( wpSelect, 'core/editor' );
|
67 |
-
const ticketsBlocks = yield call(
|
|
|
|
|
|
|
68 |
|
69 |
ticketsBlocks.forEach( ( { clientId } ) => {
|
70 |
tickets.forEach( ( ticketId ) => {
|
@@ -121,7 +122,10 @@ export function* resetTicketsBlock() {
|
|
121 |
] );
|
122 |
|
123 |
if ( ! hasCreatedTickets ) {
|
124 |
-
const currentMeta = yield call(
|
|
|
|
|
|
|
125 |
const newMeta = {
|
126 |
...currentMeta,
|
127 |
[ utils.KEY_TICKET_CAPACITY ]: '',
|
@@ -139,7 +143,7 @@ export function* setTicketInitialState( action ) {
|
|
139 |
const ticketId = get( 'ticketId', TICKET_DEFAULT_STATE.ticketId );
|
140 |
const hasBeenCreated = get( 'hasBeenCreated', TICKET_DEFAULT_STATE.hasBeenCreated );
|
141 |
|
142 |
-
const datePickerFormat = tecDateSettings().datepickerFormat
|
143 |
const publishDate = yield call( [ wpSelect( 'core/editor' ), 'getEditedPostAttribute' ], 'date' );
|
144 |
const startMoment = yield call( momentUtil.toMoment, publishDate );
|
145 |
const startDate = yield call( momentUtil.toDatabaseDate, startMoment );
|
@@ -170,7 +174,8 @@ export function* setTicketInitialState( action ) {
|
|
170 |
// This try-catch may be redundant given the above if statement.
|
171 |
try {
|
172 |
// NOTE: This requires TEC to be installed, if not installed, do not set an end date
|
173 |
-
|
|
|
174 |
const endMoment = yield call( momentUtil.toMoment, eventStart );
|
175 |
const endDate = yield call( momentUtil.toDatabaseDate, endMoment );
|
176 |
const endDateInput = yield datePickerFormat
|
@@ -197,11 +202,17 @@ export function* setTicketInitialState( action ) {
|
|
197 |
}
|
198 |
}
|
199 |
|
200 |
-
const hasTicketsPlus = yield select(
|
|
|
|
|
|
|
201 |
if ( hasTicketsPlus ) {
|
202 |
yield all( [
|
203 |
put( actions.setTicketCapacityType( clientId, constants.TICKET_TYPES[ constants.SHARED ] ) ),
|
204 |
-
put( actions.setTicketTempCapacityType(
|
|
|
|
|
|
|
205 |
] );
|
206 |
}
|
207 |
|
@@ -227,7 +238,10 @@ export function* setTicketInitialState( action ) {
|
|
227 |
export function* setBodyDetails( clientId ) {
|
228 |
const body = new FormData();
|
229 |
const props = { clientId };
|
230 |
-
const rootClientId = yield call(
|
|
|
|
|
|
|
231 |
const ticketProvider = yield select( selectors.getTicketProvider, props );
|
232 |
const ticketsProvider = yield select( selectors.getTicketsProvider );
|
233 |
|
@@ -242,7 +256,11 @@ export function* setBodyDetails( clientId ) {
|
|
242 |
body.append( 'end_time', yield select( selectors.getTicketTempEndTime, props ) );
|
243 |
body.append( 'sku', yield select( selectors.getTicketTempSku, props ) );
|
244 |
body.append( 'iac', yield select( selectors.getTicketTempIACSetting, props ) );
|
245 |
-
body.append( 'menu_order', yield call(
|
|
|
|
|
|
|
|
|
246 |
|
247 |
const capacityType = yield select( selectors.getTicketTempCapacityType, props );
|
248 |
const capacity = yield select( selectors.getTicketTempCapacity, props );
|
@@ -290,6 +308,7 @@ export function* fetchTicket( action ) {
|
|
290 |
}
|
291 |
|
292 |
if ( response.ok ) {
|
|
|
293 |
const {
|
294 |
totals = {},
|
295 |
available_from,
|
@@ -303,6 +322,7 @@ export function* fetchTicket( action ) {
|
|
303 |
capacity,
|
304 |
supports_attendee_information,
|
305 |
} = ticket;
|
|
|
306 |
|
307 |
const datePickerFormat = tecDateSettings().datepickerFormat;
|
308 |
|
@@ -320,7 +340,7 @@ export function* fetchTicket( action ) {
|
|
320 |
let endTime = '';
|
321 |
let endTimeInput = '';
|
322 |
|
323 |
-
if ( available_until ) {
|
324 |
endMoment = yield call( momentUtil.toMoment, available_until );
|
325 |
endDate = yield call( momentUtil.toDatabaseDate, endMoment );
|
326 |
endDateInput = yield datePickerFormat
|
@@ -363,7 +383,7 @@ export function* fetchTicket( action ) {
|
|
363 |
] );
|
364 |
}
|
365 |
} catch ( e ) {
|
366 |
-
console.error( e )
|
367 |
/**
|
368 |
* @todo handle error scenario
|
369 |
*/
|
@@ -376,7 +396,7 @@ export function* createNewTicket( action ) {
|
|
376 |
const { clientId } = action.payload;
|
377 |
const props = { clientId };
|
378 |
|
379 |
-
const { add_ticket_nonce = '' } = restNonce();
|
380 |
const body = yield call( setBodyDetails, clientId );
|
381 |
body.append( 'add_ticket_nonce', add_ticket_nonce );
|
382 |
|
@@ -395,12 +415,14 @@ export function* createNewTicket( action ) {
|
|
395 |
const sharedCapacity = yield select( selectors.getTicketsSharedCapacity );
|
396 |
const tempSharedCapacity = yield select( selectors.getTicketsTempSharedCapacity );
|
397 |
if (
|
398 |
-
sharedCapacity === ''
|
399 |
-
|
400 |
) {
|
401 |
yield put( actions.setTicketsSharedCapacity( tempSharedCapacity ) );
|
402 |
}
|
403 |
-
const available = ticket.capacity_details.available === -1
|
|
|
|
|
404 |
|
405 |
const [
|
406 |
title,
|
@@ -463,7 +485,10 @@ export function* createNewTicket( action ) {
|
|
463 |
put( actions.setTicketId( clientId, ticket.id ) ),
|
464 |
put( actions.setTicketHasBeenCreated( clientId, true ) ),
|
465 |
put( actions.setTicketAvailable( clientId, available ) ),
|
466 |
-
put( actions.setTicketProvider(
|
|
|
|
|
|
|
467 |
put( actions.setTicketHasChanges( clientId, false ) ),
|
468 |
] );
|
469 |
|
@@ -483,7 +508,7 @@ export function* updateTicket( action ) {
|
|
483 |
const { clientId } = action.payload;
|
484 |
const props = { clientId };
|
485 |
|
486 |
-
const { edit_ticket_nonce = '' } = restNonce();
|
487 |
const body = yield call( setBodyDetails, clientId );
|
488 |
body.append( 'edit_ticket_nonce', edit_ticket_nonce );
|
489 |
|
@@ -509,7 +534,7 @@ export function* updateTicket( action ) {
|
|
509 |
} );
|
510 |
|
511 |
if ( response.ok ) {
|
512 |
-
const { capacity_details } = ticket;
|
513 |
const available = capacity_details.available === -1 ? 0 : capacity_details.available;
|
514 |
|
515 |
const [
|
@@ -589,7 +614,10 @@ export function* deleteTicket( action ) {
|
|
589 |
const { clientId } = action.payload;
|
590 |
const props = { clientId };
|
591 |
|
592 |
-
const shouldDelete = yield call(
|
|
|
|
|
|
|
593 |
|
594 |
if ( shouldDelete ) {
|
595 |
const ticketId = yield select( selectors.getTicketId, props );
|
@@ -601,7 +629,7 @@ export function* deleteTicket( action ) {
|
|
601 |
yield call( [ wpDispatch( 'core/editor' ), 'removeBlocks' ], [ clientId ] );
|
602 |
|
603 |
if ( hasBeenCreated ) {
|
604 |
-
const { remove_ticket_nonce = '' } = restNonce();
|
605 |
const postId = yield call( [ wpSelect( 'core/editor' ), 'getCurrentPostId' ] );
|
606 |
|
607 |
/**
|
@@ -610,7 +638,7 @@ export function* deleteTicket( action ) {
|
|
610 |
*/
|
611 |
const body = [
|
612 |
`${ encodeURIComponent( 'post_id' ) }=${ encodeURIComponent( postId ) }`,
|
613 |
-
`${ encodeURIComponent( 'remove_ticket_nonce' ) }=${ encodeURIComponent( remove_ticket_nonce ) }`,
|
614 |
];
|
615 |
|
616 |
try {
|
@@ -853,9 +881,12 @@ export function* setTicketTempDetails( action ) {
|
|
853 |
|
854 |
/**
|
855 |
* Allows the Ticket to be saved at the same time a post is being saved.
|
856 |
-
* Avoids the user having to open up the Ticket block, and then click update again there,
|
|
|
857 |
*
|
|
|
858 |
* @export
|
|
|
859 |
*/
|
860 |
export function* saveTicketWithPostSave( clientId ) {
|
861 |
let savingChannel, notSavingChannel;
|
@@ -893,24 +924,29 @@ export function* saveTicketWithPostSave( clientId ) {
|
|
893 |
|
894 |
/**
|
895 |
* Will sync all tickets
|
896 |
-
*
|
|
|
897 |
* @export
|
|
|
898 |
*/
|
899 |
export function* syncTicketsSaleEndWithEventStart( prevStartDate ) {
|
900 |
const ticketIds = yield select( selectors.getTicketsAllClientIds );
|
901 |
-
for (let index = 0; index < ticketIds.length; index++) {
|
902 |
-
const clientId = ticketIds[index];
|
903 |
yield call( syncTicketSaleEndWithEventStart, prevStartDate, clientId );
|
904 |
}
|
905 |
}
|
906 |
|
907 |
/**
|
908 |
* Will sync Tickets sale end to be the same as event start date and time, if field has not been manually edited
|
|
|
909 |
* @borrows TEC - Functionality requires TEC to be enabled
|
910 |
-
* @param {
|
|
|
911 |
* @export
|
|
|
912 |
*/
|
913 |
-
export function* syncTicketSaleEndWithEventStart( prevStartDate, clientId ){
|
914 |
try {
|
915 |
const tempEndMoment = yield select( selectors.getTicketTempEndDateMoment, { clientId } );
|
916 |
const endMoment = yield select( selectors.getTicketEndDateMoment, { clientId } );
|
@@ -926,13 +962,19 @@ export function* syncTicketSaleEndWithEventStart( prevStartDate, clientId ){
|
|
926 |
|
927 |
// If initial end and current end are the same, the RSVP has not been modified
|
928 |
const isNotManuallyEdited = yield call( [ tempEndMoment, 'isSame' ], endMoment, 'minute' );
|
929 |
-
const isSyncedToEventStart = yield call(
|
|
|
|
|
|
|
|
|
930 |
const isEvent = yield call( isTribeEventPostType );
|
931 |
|
932 |
// This if statement may be redundant given the try-catch statement above.
|
933 |
// Only run this on events post type.
|
934 |
if ( isEvent && window.tribe.events && isNotManuallyEdited && isSyncedToEventStart ) {
|
935 |
-
const eventStart = yield select(
|
|
|
|
|
936 |
const {
|
937 |
moment: endDateMoment,
|
938 |
date: endDate,
|
@@ -970,8 +1012,10 @@ export function* syncTicketSaleEndWithEventStart( prevStartDate, clientId ){
|
|
970 |
|
971 |
/**
|
972 |
* Listens for event start date and time changes after RSVP block is loaded.
|
|
|
973 |
* @borrows TEC - Functionality requires TEC to be enabled and post type to be event
|
974 |
* @export
|
|
|
975 |
*/
|
976 |
export function* handleEventStartDateChanges() {
|
977 |
try {
|
@@ -982,12 +1026,17 @@ export function* handleEventStartDateChanges() {
|
|
982 |
|
983 |
const isEvent = yield call( isTribeEventPostType );
|
984 |
if ( isEvent && window.tribe.events ) {
|
985 |
-
const {
|
|
|
|
|
|
|
986 |
|
987 |
let syncTask;
|
988 |
while ( true ) {
|
989 |
// Cache current event start date for comparison
|
990 |
-
const eventStart = yield select(
|
|
|
|
|
991 |
|
992 |
// Wait til use changes date or time on TEC datetime block
|
993 |
yield take( [ SET_START_DATE_TIME, SET_START_TIME ] );
|
@@ -1007,19 +1056,44 @@ export function* handleEventStartDateChanges() {
|
|
1007 |
|
1008 |
export function* handleTicketDurationError( clientId ) {
|
1009 |
let hasDurationError = false;
|
1010 |
-
const startDateMoment = yield select(
|
1011 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1012 |
|
1013 |
if ( ! startDateMoment || ! endDateMoment ) {
|
1014 |
hasDurationError = true;
|
1015 |
} else {
|
1016 |
const startTime = yield select( selectors.getTicketTempStartTime, { clientId } );
|
1017 |
const endTime = yield select( selectors.getTicketTempEndTime, { clientId } );
|
1018 |
-
const startTimeSeconds = yield call(
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1023 |
|
1024 |
if ( durationHasError ) {
|
1025 |
hasDurationError = true;
|
@@ -1056,7 +1130,12 @@ export function* handleTicketStartTime( action ) {
|
|
1056 |
export function* handleTicketStartTimeInput( action ) {
|
1057 |
const { clientId, seconds } = action.payload;
|
1058 |
const startTime = yield call( timeUtil.fromSeconds, seconds, timeUtil.TIME_FORMAT_HH_MM );
|
1059 |
-
const startTimeMoment = yield call(
|
|
|
|
|
|
|
|
|
|
|
1060 |
const startTimeInput = yield call( momentUtil.toTime, startTimeMoment );
|
1061 |
yield put( actions.setTicketTempStartTimeInput( clientId, startTimeInput ) );
|
1062 |
}
|
20 |
import * as selectors from './selectors';
|
21 |
import { DEFAULT_STATE } from './reducer';
|
22 |
import {
|
23 |
+
DEFAULT_STATE as TICKET_HEADER_IMAGE_DEFAULT_STATE,
|
24 |
} from './reducers/header-image';
|
25 |
import {
|
26 |
DEFAULT_STATE as TICKET_DEFAULT_STATE,
|
27 |
} from './reducers/tickets/ticket';
|
28 |
import * as rsvpActions from '@moderntribe/tickets/data/blocks/rsvp/actions';
|
29 |
import {
|
30 |
+
DEFAULT_STATE as RSVP_HEADER_IMAGE_DEFAULT_STATE,
|
31 |
} from '@moderntribe/tickets/data/blocks/rsvp/reducers/header-image';
|
32 |
import * as utils from '@moderntribe/tickets/data/utils';
|
33 |
import {
|
47 |
createDates,
|
48 |
} from '@moderntribe/tickets/data/shared/sagas';
|
49 |
|
|
|
50 |
const {
|
51 |
UNLIMITED,
|
52 |
SHARED,
|
54 |
PROVIDER_CLASS_TO_PROVIDER_MAPPING,
|
55 |
} = constants;
|
56 |
const {
|
|
|
57 |
restNonce,
|
58 |
tecDateSettings,
|
59 |
} = globals;
|
62 |
export function* createMissingTicketBlocks( tickets ) {
|
63 |
const { insertBlock } = yield call( wpDispatch, 'core/editor' );
|
64 |
const { getBlockCount, getBlocks } = yield call( wpSelect, 'core/editor' );
|
65 |
+
const ticketsBlocks = yield call(
|
66 |
+
[ getBlocks(), 'filter' ],
|
67 |
+
( block ) => block.name === 'tribe/tickets',
|
68 |
+
);
|
69 |
|
70 |
ticketsBlocks.forEach( ( { clientId } ) => {
|
71 |
tickets.forEach( ( ticketId ) => {
|
122 |
] );
|
123 |
|
124 |
if ( ! hasCreatedTickets ) {
|
125 |
+
const currentMeta = yield call(
|
126 |
+
[ wpSelect( 'core/editor' ), 'getCurrentPostAttribute' ],
|
127 |
+
'meta',
|
128 |
+
);
|
129 |
const newMeta = {
|
130 |
...currentMeta,
|
131 |
[ utils.KEY_TICKET_CAPACITY ]: '',
|
143 |
const ticketId = get( 'ticketId', TICKET_DEFAULT_STATE.ticketId );
|
144 |
const hasBeenCreated = get( 'hasBeenCreated', TICKET_DEFAULT_STATE.hasBeenCreated );
|
145 |
|
146 |
+
const datePickerFormat = tecDateSettings().datepickerFormat;
|
147 |
const publishDate = yield call( [ wpSelect( 'core/editor' ), 'getEditedPostAttribute' ], 'date' );
|
148 |
const startMoment = yield call( momentUtil.toMoment, publishDate );
|
149 |
const startDate = yield call( momentUtil.toDatabaseDate, startMoment );
|
174 |
// This try-catch may be redundant given the above if statement.
|
175 |
try {
|
176 |
// NOTE: This requires TEC to be installed, if not installed, do not set an end date
|
177 |
+
// Ticket purchase window should end when event starts
|
178 |
+
const eventStart = yield select( tribe.events.data.blocks.datetime.selectors.getStart );
|
179 |
const endMoment = yield call( momentUtil.toMoment, eventStart );
|
180 |
const endDate = yield call( momentUtil.toDatabaseDate, endMoment );
|
181 |
const endDateInput = yield datePickerFormat
|
202 |
}
|
203 |
}
|
204 |
|
205 |
+
const hasTicketsPlus = yield select(
|
206 |
+
plugins.selectors.hasPlugin,
|
207 |
+
plugins.constants.TICKETS_PLUS,
|
208 |
+
);
|
209 |
if ( hasTicketsPlus ) {
|
210 |
yield all( [
|
211 |
put( actions.setTicketCapacityType( clientId, constants.TICKET_TYPES[ constants.SHARED ] ) ),
|
212 |
+
put( actions.setTicketTempCapacityType(
|
213 |
+
clientId,
|
214 |
+
constants.TICKET_TYPES[ constants.SHARED ],
|
215 |
+
) ),
|
216 |
] );
|
217 |
}
|
218 |
|
238 |
export function* setBodyDetails( clientId ) {
|
239 |
const body = new FormData();
|
240 |
const props = { clientId };
|
241 |
+
const rootClientId = yield call(
|
242 |
+
[ wpSelect( 'core/editor' ), 'getBlockRootClientId' ],
|
243 |
+
clientId,
|
244 |
+
);
|
245 |
const ticketProvider = yield select( selectors.getTicketProvider, props );
|
246 |
const ticketsProvider = yield select( selectors.getTicketsProvider );
|
247 |
|
256 |
body.append( 'end_time', yield select( selectors.getTicketTempEndTime, props ) );
|
257 |
body.append( 'sku', yield select( selectors.getTicketTempSku, props ) );
|
258 |
body.append( 'iac', yield select( selectors.getTicketTempIACSetting, props ) );
|
259 |
+
body.append( 'menu_order', yield call(
|
260 |
+
[ wpSelect( 'core/editor' ), 'getBlockIndex' ],
|
261 |
+
clientId,
|
262 |
+
rootClientId,
|
263 |
+
) );
|
264 |
|
265 |
const capacityType = yield select( selectors.getTicketTempCapacityType, props );
|
266 |
const capacity = yield select( selectors.getTicketTempCapacity, props );
|
308 |
}
|
309 |
|
310 |
if ( response.ok ) {
|
311 |
+
/* eslint-disable camelcase */
|
312 |
const {
|
313 |
totals = {},
|
314 |
available_from,
|
322 |
capacity,
|
323 |
supports_attendee_information,
|
324 |
} = ticket;
|
325 |
+
/* eslint-enable camelcase */
|
326 |
|
327 |
const datePickerFormat = tecDateSettings().datepickerFormat;
|
328 |
|
340 |
let endTime = '';
|
341 |
let endTimeInput = '';
|
342 |
|
343 |
+
if ( available_until ) { // eslint-disable-line camelcase
|
344 |
endMoment = yield call( momentUtil.toMoment, available_until );
|
345 |
endDate = yield call( momentUtil.toDatabaseDate, endMoment );
|
346 |
endDateInput = yield datePickerFormat
|
383 |
] );
|
384 |
}
|
385 |
} catch ( e ) {
|
386 |
+
console.error( e );
|
387 |
/**
|
388 |
* @todo handle error scenario
|
389 |
*/
|
396 |
const { clientId } = action.payload;
|
397 |
const props = { clientId };
|
398 |
|
399 |
+
const { add_ticket_nonce = '' } = restNonce(); // eslint-disable-line camelcase
|
400 |
const body = yield call( setBodyDetails, clientId );
|
401 |
body.append( 'add_ticket_nonce', add_ticket_nonce );
|
402 |
|
415 |
const sharedCapacity = yield select( selectors.getTicketsSharedCapacity );
|
416 |
const tempSharedCapacity = yield select( selectors.getTicketsTempSharedCapacity );
|
417 |
if (
|
418 |
+
sharedCapacity === '' &&
|
419 |
+
( ! isNaN( tempSharedCapacity ) && tempSharedCapacity > 0 )
|
420 |
) {
|
421 |
yield put( actions.setTicketsSharedCapacity( tempSharedCapacity ) );
|
422 |
}
|
423 |
+
const available = ticket.capacity_details.available === -1
|
424 |
+
? 0
|
425 |
+
: ticket.capacity_details.available;
|
426 |
|
427 |
const [
|
428 |
title,
|
485 |
put( actions.setTicketId( clientId, ticket.id ) ),
|
486 |
put( actions.setTicketHasBeenCreated( clientId, true ) ),
|
487 |
put( actions.setTicketAvailable( clientId, available ) ),
|
488 |
+
put( actions.setTicketProvider(
|
489 |
+
clientId,
|
490 |
+
PROVIDER_CLASS_TO_PROVIDER_MAPPING[ ticket.provider_class ],
|
491 |
+
) ),
|
492 |
put( actions.setTicketHasChanges( clientId, false ) ),
|
493 |
] );
|
494 |
|
508 |
const { clientId } = action.payload;
|
509 |
const props = { clientId };
|
510 |
|
511 |
+
const { edit_ticket_nonce = '' } = restNonce(); // eslint-disable-line camelcase
|
512 |
const body = yield call( setBodyDetails, clientId );
|
513 |
body.append( 'edit_ticket_nonce', edit_ticket_nonce );
|
514 |
|
534 |
} );
|
535 |
|
536 |
if ( response.ok ) {
|
537 |
+
const { capacity_details } = ticket; // eslint-disable-line camelcase
|
538 |
const available = capacity_details.available === -1 ? 0 : capacity_details.available;
|
539 |
|
540 |
const [
|
614 |
const { clientId } = action.payload;
|
615 |
const props = { clientId };
|
616 |
|
617 |
+
const shouldDelete = yield call(
|
618 |
+
[ window, 'confirm' ],
|
619 |
+
__( 'Are you sure you want to delete this ticket? It cannot be undone.', 'event-tickets' ),
|
620 |
+
);
|
621 |
|
622 |
if ( shouldDelete ) {
|
623 |
const ticketId = yield select( selectors.getTicketId, props );
|
629 |
yield call( [ wpDispatch( 'core/editor' ), 'removeBlocks' ], [ clientId ] );
|
630 |
|
631 |
if ( hasBeenCreated ) {
|
632 |
+
const { remove_ticket_nonce = '' } = restNonce(); // eslint-disable-line camelcase
|
633 |
const postId = yield call( [ wpSelect( 'core/editor' ), 'getCurrentPostId' ] );
|
634 |
|
635 |
/**
|
638 |
*/
|
639 |
const body = [
|
640 |
`${ encodeURIComponent( 'post_id' ) }=${ encodeURIComponent( postId ) }`,
|
641 |
+
`${ encodeURIComponent( 'remove_ticket_nonce' ) }=${ encodeURIComponent( remove_ticket_nonce ) }`, // eslint-disable-line max-len
|
642 |
];
|
643 |
|
644 |
try {
|
881 |
|
882 |
/**
|
883 |
* Allows the Ticket to be saved at the same time a post is being saved.
|
884 |
+
* Avoids the user having to open up the Ticket block, and then click update again there,
|
885 |
+
* when changing the event start date.
|
886 |
*
|
887 |
+
* @param {string} clientId Client ID of ticket block
|
888 |
* @export
|
889 |
+
* @yields
|
890 |
*/
|
891 |
export function* saveTicketWithPostSave( clientId ) {
|
892 |
let savingChannel, notSavingChannel;
|
924 |
|
925 |
/**
|
926 |
* Will sync all tickets
|
927 |
+
*
|
928 |
+
* @param {string} prevStartDate Previous start date before latest set date time changes
|
929 |
* @export
|
930 |
+
* @yields
|
931 |
*/
|
932 |
export function* syncTicketsSaleEndWithEventStart( prevStartDate ) {
|
933 |
const ticketIds = yield select( selectors.getTicketsAllClientIds );
|
934 |
+
for ( let index = 0; index < ticketIds.length; index++ ) {
|
935 |
+
const clientId = ticketIds[ index ];
|
936 |
yield call( syncTicketSaleEndWithEventStart, prevStartDate, clientId );
|
937 |
}
|
938 |
}
|
939 |
|
940 |
/**
|
941 |
* Will sync Tickets sale end to be the same as event start date and time, if field has not been manually edited
|
942 |
+
*
|
943 |
* @borrows TEC - Functionality requires TEC to be enabled
|
944 |
+
* @param {string} prevStartDate Previous start date before latest set date time changes
|
945 |
+
* @param {string} clientId Client ID of ticket block
|
946 |
* @export
|
947 |
+
* @yields
|
948 |
*/
|
949 |
+
export function* syncTicketSaleEndWithEventStart( prevStartDate, clientId ) {
|
950 |
try {
|
951 |
const tempEndMoment = yield select( selectors.getTicketTempEndDateMoment, { clientId } );
|
952 |
const endMoment = yield select( selectors.getTicketEndDateMoment, { clientId } );
|
962 |
|
963 |
// If initial end and current end are the same, the RSVP has not been modified
|
964 |
const isNotManuallyEdited = yield call( [ tempEndMoment, 'isSame' ], endMoment, 'minute' );
|
965 |
+
const isSyncedToEventStart = yield call(
|
966 |
+
[ tempEndMoment, 'isSame' ],
|
967 |
+
prevEventStartMoment,
|
968 |
+
'minute',
|
969 |
+
);
|
970 |
const isEvent = yield call( isTribeEventPostType );
|
971 |
|
972 |
// This if statement may be redundant given the try-catch statement above.
|
973 |
// Only run this on events post type.
|
974 |
if ( isEvent && window.tribe.events && isNotManuallyEdited && isSyncedToEventStart ) {
|
975 |
+
const eventStart = yield select(
|
976 |
+
window.tribe.events.data.blocks.datetime.selectors.getStart,
|
977 |
+
);
|
978 |
const {
|
979 |
moment: endDateMoment,
|
980 |
date: endDate,
|
1012 |
|
1013 |
/**
|
1014 |
* Listens for event start date and time changes after RSVP block is loaded.
|
1015 |
+
*
|
1016 |
* @borrows TEC - Functionality requires TEC to be enabled and post type to be event
|
1017 |
* @export
|
1018 |
+
* @yields
|
1019 |
*/
|
1020 |
export function* handleEventStartDateChanges() {
|
1021 |
try {
|
1026 |
|
1027 |
const isEvent = yield call( isTribeEventPostType );
|
1028 |
if ( isEvent && window.tribe.events ) {
|
1029 |
+
const {
|
1030 |
+
SET_START_DATE_TIME,
|
1031 |
+
SET_START_TIME,
|
1032 |
+
} = window.tribe.events.data.blocks.datetime.types;
|
1033 |
|
1034 |
let syncTask;
|
1035 |
while ( true ) {
|
1036 |
// Cache current event start date for comparison
|
1037 |
+
const eventStart = yield select(
|
1038 |
+
window.tribe.events.data.blocks.datetime.selectors.getStart,
|
1039 |
+
);
|
1040 |
|
1041 |
// Wait til use changes date or time on TEC datetime block
|
1042 |
yield take( [ SET_START_DATE_TIME, SET_START_TIME ] );
|
1056 |
|
1057 |
export function* handleTicketDurationError( clientId ) {
|
1058 |
let hasDurationError = false;
|
1059 |
+
const startDateMoment = yield select(
|
1060 |
+
selectors.getTicketTempStartDateMoment,
|
1061 |
+
{ clientId },
|
1062 |
+
);
|
1063 |
+
const endDateMoment = yield select(
|
1064 |
+
selectors.getTicketTempEndDateMoment,
|
1065 |
+
{ clientId },
|
1066 |
+
);
|
1067 |
|
1068 |
if ( ! startDateMoment || ! endDateMoment ) {
|
1069 |
hasDurationError = true;
|
1070 |
} else {
|
1071 |
const startTime = yield select( selectors.getTicketTempStartTime, { clientId } );
|
1072 |
const endTime = yield select( selectors.getTicketTempEndTime, { clientId } );
|
1073 |
+
const startTimeSeconds = yield call(
|
1074 |
+
timeUtil.toSeconds,
|
1075 |
+
startTime,
|
1076 |
+
timeUtil.TIME_FORMAT_HH_MM_SS,
|
1077 |
+
);
|
1078 |
+
const endTimeSeconds = yield call(
|
1079 |
+
timeUtil.toSeconds,
|
1080 |
+
endTime,
|
1081 |
+
timeUtil.TIME_FORMAT_HH_MM_SS,
|
1082 |
+
);
|
1083 |
+
const startDateTimeMoment = yield call(
|
1084 |
+
momentUtil.setTimeInSeconds,
|
1085 |
+
startDateMoment.clone(),
|
1086 |
+
startTimeSeconds,
|
1087 |
+
);
|
1088 |
+
const endDateTimeMoment = yield call(
|
1089 |
+
momentUtil.setTimeInSeconds,
|
1090 |
+
endDateMoment.clone(),
|
1091 |
+
endTimeSeconds,
|
1092 |
+
);
|
1093 |
+
const durationHasError = yield call(
|
1094 |
+
[ startDateTimeMoment, 'isSameOrAfter' ],
|
1095 |
+
endDateTimeMoment,
|
1096 |
+
);
|
1097 |
|
1098 |
if ( durationHasError ) {
|
1099 |
hasDurationError = true;
|
1130 |
export function* handleTicketStartTimeInput( action ) {
|
1131 |
const { clientId, seconds } = action.payload;
|
1132 |
const startTime = yield call( timeUtil.fromSeconds, seconds, timeUtil.TIME_FORMAT_HH_MM );
|
1133 |
+
const startTimeMoment = yield call(
|
1134 |
+
momentUtil.toMoment,
|
1135 |
+
startTime,
|
1136 |
+
momentUtil.TIME_FORMAT,
|
1137 |
+
false,
|
1138 |
+
);
|
1139 |
const startTimeInput = yield call( momentUtil.toTime, startTimeMoment );
|
1140 |
yield put( actions.setTicketTempStartTimeInput( clientId, startTimeInput ) );
|
1141 |
}
|
src/modules/data/blocks/ticket/selectors.js
CHANGED
@@ -130,7 +130,7 @@ export const hasCreatedTickets = createSelector(
|
|
130 |
( tickets ) => tickets.reduce( ( hasCreated, ticket ) => (
|
131 |
hasCreated || ticket.hasBeenCreated
|
132 |
), false ),
|
133 |
-
)
|
134 |
|
135 |
export const getIndependentTickets = createSelector(
|
136 |
[ getTicketsArray ],
|
@@ -162,7 +162,7 @@ export const hasATicketSelected = createSelector(
|
|
162 |
[ getTicketsArray ],
|
163 |
( tickets ) => tickets.reduce( ( selected, ticket ) => (
|
164 |
selected || ticket.isSelected
|
165 |
-
), false),
|
166 |
);
|
167 |
|
168 |
export const getTicketsIdsInBlocks = createSelector(
|
@@ -611,10 +611,22 @@ export const _getTotalAvailable = ( tickets ) => tickets.reduce( ( total, ticket
|
|
611 |
return total + available;
|
612 |
}, 0 );
|
613 |
|
614 |
-
export const getIndependentTicketsCapacity = createSelector(
|
615 |
-
|
616 |
-
|
617 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
618 |
|
619 |
export const getSharedTicketsSold = createSelector( getSharedTickets, _getTotalSold );
|
620 |
export const getSharedTicketsAvailable = createSelector(
|
@@ -670,5 +682,5 @@ export const hasTicketProviders = createSelector(
|
|
670 |
|
671 |
export const canCreateTickets = createSelector(
|
672 |
[ hasTicketProviders, hasValidTicketProvider ],
|
673 |
-
( providers, validDefaultProvider ) => providers && validDefaultProvider
|
674 |
);
|
130 |
( tickets ) => tickets.reduce( ( hasCreated, ticket ) => (
|
131 |
hasCreated || ticket.hasBeenCreated
|
132 |
), false ),
|
133 |
+
);
|
134 |
|
135 |
export const getIndependentTickets = createSelector(
|
136 |
[ getTicketsArray ],
|
162 |
[ getTicketsArray ],
|
163 |
( tickets ) => tickets.reduce( ( selected, ticket ) => (
|
164 |
selected || ticket.isSelected
|
165 |
+
), false ),
|
166 |
);
|
167 |
|
168 |
export const getTicketsIdsInBlocks = createSelector(
|
611 |
return total + available;
|
612 |
}, 0 );
|
613 |
|
614 |
+
export const getIndependentTicketsCapacity = createSelector(
|
615 |
+
getIndependentTickets,
|
616 |
+
_getTotalCapacity,
|
617 |
+
);
|
618 |
+
export const getIndependentTicketsTempCapacity = createSelector(
|
619 |
+
getIndependentTickets,
|
620 |
+
_getTotalTempCapacity,
|
621 |
+
);
|
622 |
+
export const getIndependentTicketsSold = createSelector(
|
623 |
+
getIndependentTickets,
|
624 |
+
_getTotalSold,
|
625 |
+
);
|
626 |
+
export const getIndependentTicketsAvailable = createSelector(
|
627 |
+
getIndependentTickets,
|
628 |
+
_getTotalAvailable,
|
629 |
+
);
|
630 |
|
631 |
export const getSharedTicketsSold = createSelector( getSharedTickets, _getTotalSold );
|
632 |
export const getSharedTicketsAvailable = createSelector(
|
682 |
|
683 |
export const canCreateTickets = createSelector(
|
684 |
[ hasTicketProviders, hasValidTicketProvider ],
|
685 |
+
( providers, validDefaultProvider ) => providers && validDefaultProvider,
|
686 |
);
|
src/modules/data/blocks/ticket/types.js
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
/**
|
2 |
* Internal dependencies
|
3 |
*/
|
@@ -101,4 +102,4 @@ export const CREATE_NEW_TICKET = `${ PREFIX_TICKETS_STORE }/CREATE_NEW_TICKET`;
|
|
101 |
export const UPDATE_TICKET = `${ PREFIX_TICKETS_STORE }/UPDATE_TICKET`;
|
102 |
export const DELETE_TICKET = `${ PREFIX_TICKETS_STORE }/DELETE_TICKET`;
|
103 |
|
104 |
-
export const SET_TICKET_INITIAL_STATE = `${PREFIX_TICKETS_STORE}/SET_TICKET_INITIAL_STATE`;
|
1 |
+
/* eslint-disable max-len */
|
2 |
/**
|
3 |
* Internal dependencies
|
4 |
*/
|
102 |
export const UPDATE_TICKET = `${ PREFIX_TICKETS_STORE }/UPDATE_TICKET`;
|
103 |
export const DELETE_TICKET = `${ PREFIX_TICKETS_STORE }/DELETE_TICKET`;
|
104 |
|
105 |
+
export const SET_TICKET_INITIAL_STATE = `${ PREFIX_TICKETS_STORE }/SET_TICKET_INITIAL_STATE`;
|
src/modules/data/blocks/ticket/utils.js
CHANGED
@@ -7,10 +7,15 @@ const { settings, priceSettings, tickets: ticketsConfig } = globals;
|
|
7 |
/**
|
8 |
* Internal dependencies
|
9 |
*/
|
10 |
-
import {
|
|
|
|
|
|
|
11 |
|
12 |
/**
|
13 |
* Get currency symbol by provider
|
|
|
|
|
14 |
*/
|
15 |
export const getProviderCurrency = ( provider ) => {
|
16 |
const tickets = ticketsConfig();
|
7 |
/**
|
8 |
* Internal dependencies
|
9 |
*/
|
10 |
+
import {
|
11 |
+
getDefaultTicketProvider,
|
12 |
+
getTicketProviders,
|
13 |
+
} from '@moderntribe/tickets/data/blocks/ticket/selectors';
|
14 |
|
15 |
/**
|
16 |
* Get currency symbol by provider
|
17 |
+
*
|
18 |
+
* @param provider The tickets provider class
|
19 |
*/
|
20 |
export const getProviderCurrency = ( provider ) => {
|
21 |
const tickets = ticketsConfig();
|
src/modules/data/shared/__tests__/sagas.test.js
CHANGED
@@ -66,27 +66,27 @@ describe( 'Shared block sagas', () => {
|
|
66 |
const gen = sagas.createDates( date );
|
67 |
|
68 |
expect( gen.next().value ).toEqual(
|
69 |
-
call( [ globals, 'tecDateSettings' ] )
|
70 |
);
|
71 |
|
72 |
expect( gen.next( { datepickerFormat: false } ).value ).toEqual(
|
73 |
-
call( momentUtil.toMoment, date )
|
74 |
);
|
75 |
|
76 |
expect( gen.next( {} ).value ).toEqual(
|
77 |
-
call( momentUtil.toDatabaseDate, {} )
|
78 |
);
|
79 |
|
80 |
expect( gen.next( {} ).value ).toEqual(
|
81 |
-
call( momentUtil.toDate, {} )
|
82 |
);
|
83 |
|
84 |
expect( gen.next( date ).value ).toEqual(
|
85 |
-
call( momentUtil.toDatabaseTime, {} )
|
86 |
);
|
87 |
|
88 |
expect( gen.next( date ).value ).toEqual(
|
89 |
-
call( momentUtil.toTime, {} )
|
90 |
);
|
91 |
|
92 |
expect( gen.next().done ).toEqual( true );
|
@@ -95,27 +95,27 @@ describe( 'Shared block sagas', () => {
|
|
95 |
const gen = sagas.createDates( date );
|
96 |
|
97 |
expect( gen.next().value ).toEqual(
|
98 |
-
call( [ globals, 'tecDateSettings' ] )
|
99 |
);
|
100 |
|
101 |
expect( gen.next( { datepickerFormat: true } ).value ).toEqual(
|
102 |
-
call( momentUtil.toMoment, date )
|
103 |
);
|
104 |
|
105 |
expect( gen.next( {} ).value ).toEqual(
|
106 |
-
call( momentUtil.toDatabaseDate, {} )
|
107 |
);
|
108 |
|
109 |
expect( gen.next( {} ).value ).toEqual(
|
110 |
-
call( momentUtil.toDate, {}, true )
|
111 |
);
|
112 |
|
113 |
expect( gen.next( date ).value ).toEqual(
|
114 |
-
call( momentUtil.toDatabaseTime, {} )
|
115 |
);
|
116 |
|
117 |
expect( gen.next( date ).value ).toEqual(
|
118 |
-
call( momentUtil.toTime, {} )
|
119 |
);
|
120 |
|
121 |
expect( gen.next().done ).toEqual( true );
|
66 |
const gen = sagas.createDates( date );
|
67 |
|
68 |
expect( gen.next().value ).toEqual(
|
69 |
+
call( [ globals, 'tecDateSettings' ] ),
|
70 |
);
|
71 |
|
72 |
expect( gen.next( { datepickerFormat: false } ).value ).toEqual(
|
73 |
+
call( momentUtil.toMoment, date ),
|
74 |
);
|
75 |
|
76 |
expect( gen.next( {} ).value ).toEqual(
|
77 |
+
call( momentUtil.toDatabaseDate, {} ),
|
78 |
);
|
79 |
|
80 |
expect( gen.next( {} ).value ).toEqual(
|
81 |
+
call( momentUtil.toDate, {} ),
|
82 |
);
|
83 |
|
84 |
expect( gen.next( date ).value ).toEqual(
|
85 |
+
call( momentUtil.toDatabaseTime, {} ),
|
86 |
);
|
87 |
|
88 |
expect( gen.next( date ).value ).toEqual(
|
89 |
+
call( momentUtil.toTime, {} ),
|
90 |
);
|
91 |
|
92 |
expect( gen.next().done ).toEqual( true );
|
95 |
const gen = sagas.createDates( date );
|
96 |
|
97 |
expect( gen.next().value ).toEqual(
|
98 |
+
call( [ globals, 'tecDateSettings' ] ),
|
99 |
);
|
100 |
|
101 |
expect( gen.next( { datepickerFormat: true } ).value ).toEqual(
|
102 |
+
call( momentUtil.toMoment, date ),
|
103 |
);
|
104 |
|
105 |
expect( gen.next( {} ).value ).toEqual(
|
106 |
+
call( momentUtil.toDatabaseDate, {} ),
|
107 |
);
|
108 |
|
109 |
expect( gen.next( {} ).value ).toEqual(
|
110 |
+
call( momentUtil.toDate, {}, true ),
|
111 |
);
|
112 |
|
113 |
expect( gen.next( date ).value ).toEqual(
|
114 |
+
call( momentUtil.toDatabaseTime, {} ),
|
115 |
);
|
116 |
|
117 |
expect( gen.next( date ).value ).toEqual(
|
118 |
+
call( momentUtil.toTime, {} ),
|
119 |
);
|
120 |
|
121 |
expect( gen.next().done ).toEqual( true );
|
src/modules/data/shared/move/__tests__/actions.test.js
CHANGED
@@ -5,7 +5,7 @@ import * as actions from '../actions';
|
|
5 |
|
6 |
describe( 'Move Actons', () => {
|
7 |
const keys = Object.keys( actions );
|
8 |
-
const payload = [{}, 1, 2 ];
|
9 |
|
10 |
keys.forEach( ( key ) => {
|
11 |
test( key, () => {
|
5 |
|
6 |
describe( 'Move Actons', () => {
|
7 |
const keys = Object.keys( actions );
|
8 |
+
const payload = [ {}, 1, 2 ];
|
9 |
|
10 |
keys.forEach( ( key ) => {
|
11 |
test( key, () => {
|
src/modules/data/shared/move/__tests__/sagas.test.js
CHANGED
@@ -1,20 +1,11 @@
|
|
1 |
/**
|
2 |
* External Dependencies
|
3 |
*/
|
4 |
-
import {
|
5 |
-
import { delay } from 'redux-saga';
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Wordpress dependencies
|
9 |
-
*/
|
10 |
-
import { select as wpSelect, dispatch as wpDispatch } from '@wordpress/data';
|
11 |
|
12 |
/**
|
13 |
* Internal dependencies
|
14 |
*/
|
15 |
-
import { globals } from '@moderntribe/common/utils';
|
16 |
-
import * as selectors from '@moderntribe/tickets/data/shared/move/selectors';
|
17 |
-
import * as actions from '@moderntribe/tickets/data/shared/move/actions';
|
18 |
import * as types from '../types';
|
19 |
import watchers, * as sagas from '../sagas';
|
20 |
|
@@ -37,7 +28,7 @@ describe( 'Move Sagas', () => {
|
|
37 |
sagas.createBody, {
|
38 |
a: 1,
|
39 |
check: undefined,
|
40 |
-
} )
|
41 |
);
|
42 |
|
43 |
expect( gen.next( 'a=1&check=undefined' ).value ).toMatchSnapshot();
|
1 |
/**
|
2 |
* External Dependencies
|
3 |
*/
|
4 |
+
import { call } from 'redux-saga/effects';
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
/**
|
7 |
* Internal dependencies
|
8 |
*/
|
|
|
|
|
|
|
9 |
import * as types from '../types';
|
10 |
import watchers, * as sagas from '../sagas';
|
11 |
|
28 |
sagas.createBody, {
|
29 |
a: 1,
|
30 |
check: undefined,
|
31 |
+
} ),
|
32 |
);
|
33 |
|
34 |
expect( gen.next( 'a=1&check=undefined' ).value ).toMatchSnapshot();
|
src/modules/data/shared/move/actions.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*/
|
5 |
import * as types from './types';
|
6 |
|
7 |
-
export const showModal = ( ticketId, clientId
|
8 |
type: types.SHOW_MODAL,
|
9 |
payload: { ticketId, clientId },
|
10 |
} );
|
4 |
*/
|
5 |
import * as types from './types';
|
6 |
|
7 |
+
export const showModal = ( ticketId, clientId ) => ( {
|
8 |
type: types.SHOW_MODAL,
|
9 |
payload: { ticketId, clientId },
|
10 |
} );
|
src/modules/data/shared/move/reducers/__tests__/modal.test.js
CHANGED
@@ -15,22 +15,22 @@ describe( 'Move modal reducer', () => {
|
|
15 |
|
16 |
it( 'should set data', () => {
|
17 |
expect(
|
18 |
-
reducer( undefined, actions.setModalData( { post_type: 'some' } ) )
|
19 |
).toMatchSnapshot();
|
20 |
} );
|
21 |
it( 'should move ticket', () => {
|
22 |
expect(
|
23 |
-
reducer( undefined, { type: types.MOVE_TICKET } )
|
24 |
).toMatchSnapshot();
|
25 |
} );
|
26 |
it( 'should move ticket with success', () => {
|
27 |
expect(
|
28 |
-
reducer( undefined, { type: types.MOVE_TICKET_SUCCESS } )
|
29 |
).toMatchSnapshot();
|
30 |
} );
|
31 |
it( 'should move ticket with error', () => {
|
32 |
expect(
|
33 |
-
reducer( undefined, { type: types.MOVE_TICKET_ERROR } )
|
34 |
).toMatchSnapshot();
|
35 |
} );
|
36 |
} );
|
15 |
|
16 |
it( 'should set data', () => {
|
17 |
expect(
|
18 |
+
reducer( undefined, actions.setModalData( { post_type: 'some' } ) ),
|
19 |
).toMatchSnapshot();
|
20 |
} );
|
21 |
it( 'should move ticket', () => {
|
22 |
expect(
|
23 |
+
reducer( undefined, { type: types.MOVE_TICKET } ),
|
24 |
).toMatchSnapshot();
|
25 |
} );
|
26 |
it( 'should move ticket with success', () => {
|
27 |
expect(
|
28 |
+
reducer( undefined, { type: types.MOVE_TICKET_SUCCESS } ),
|
29 |
).toMatchSnapshot();
|
30 |
} );
|
31 |
it( 'should move ticket with error', () => {
|
32 |
expect(
|
33 |
+
reducer( undefined, { type: types.MOVE_TICKET_ERROR } ),
|
34 |
).toMatchSnapshot();
|
35 |
} );
|
36 |
} );
|
src/modules/data/shared/move/reducers/__tests__/postTypes.test.js
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
* Internal dependencies
|
3 |
*/
|
4 |
import reducer, { DEFAULT_STATE } from '../posts';
|
5 |
-
import * as actions from '../../actions';
|
6 |
import * as types from '../../types';
|
7 |
|
8 |
describe( 'Move postTypes reducer', () => {
|
@@ -11,17 +10,17 @@ describe( 'Move postTypes reducer', () => {
|
|
11 |
} );
|
12 |
it( 'should fetch types', () => {
|
13 |
expect(
|
14 |
-
reducer( undefined, { type: types.FETCH_POST_TYPES } )
|
15 |
).toMatchSnapshot();
|
16 |
} );
|
17 |
it( 'should fetch types with success', () => {
|
18 |
expect(
|
19 |
-
reducer( undefined, { type: types.FETCH_POST_TYPES_SUCCESS, data: { posts: { a: 1 } } } )
|
20 |
).toMatchSnapshot();
|
21 |
} );
|
22 |
it( 'should fetch types with error', () => {
|
23 |
expect(
|
24 |
-
reducer( undefined, { type: types.FETCH_POST_TYPES_ERROR } )
|
25 |
).toMatchSnapshot();
|
26 |
} );
|
27 |
} );
|
2 |
* Internal dependencies
|
3 |
*/
|
4 |
import reducer, { DEFAULT_STATE } from '../posts';
|
|
|
5 |
import * as types from '../../types';
|
6 |
|
7 |
describe( 'Move postTypes reducer', () => {
|
10 |
} );
|
11 |
it( 'should fetch types', () => {
|
12 |
expect(
|
13 |
+
reducer( undefined, { type: types.FETCH_POST_TYPES } ),
|
14 |
).toMatchSnapshot();
|
15 |
} );
|
16 |
it( 'should fetch types with success', () => {
|
17 |
expect(
|
18 |
+
reducer( undefined, { type: types.FETCH_POST_TYPES_SUCCESS, data: { posts: { a: 1 } } } ),
|
19 |
).toMatchSnapshot();
|
20 |
} );
|
21 |
it( 'should fetch types with error', () => {
|
22 |
expect(
|
23 |
+
reducer( undefined, { type: types.FETCH_POST_TYPES_ERROR } ),
|
24 |
).toMatchSnapshot();
|
25 |
} );
|
26 |
} );
|
src/modules/data/shared/move/reducers/__tests__/posts.test.js
CHANGED
@@ -15,22 +15,22 @@ describe( 'Move posts reducer', () => {
|
|
15 |
|
16 |
it( 'should set data', () => {
|
17 |
expect(
|
18 |
-
reducer( undefined, actions.setModalData( { post_type: 'some' } ) )
|
19 |
).toMatchSnapshot();
|
20 |
} );
|
21 |
it( 'should fetch choices', () => {
|
22 |
expect(
|
23 |
-
reducer( undefined, { type: types.FETCH_POST_CHOICES } )
|
24 |
).toMatchSnapshot();
|
25 |
} );
|
26 |
it( 'should fetch choices with success', () => {
|
27 |
expect(
|
28 |
-
reducer( undefined, { type: types.FETCH_POST_CHOICES_SUCCESS, data: { posts: { a: 1 } } } )
|
29 |
).toMatchSnapshot();
|
30 |
} );
|
31 |
it( 'should fetch choices with error', () => {
|
32 |
expect(
|
33 |
-
reducer( undefined, { type: types.FETCH_POST_CHOICES_ERROR } )
|
34 |
).toMatchSnapshot();
|
35 |
} );
|
36 |
} );
|
15 |
|
16 |
it( 'should set data', () => {
|
17 |
expect(
|
18 |
+
reducer( undefined, actions.setModalData( { post_type: 'some' } ) ),
|
19 |
).toMatchSnapshot();
|
20 |
} );
|
21 |
it( 'should fetch choices', () => {
|
22 |
expect(
|
23 |
+
reducer( undefined, { type: types.FETCH_POST_CHOICES } ),
|
24 |
).toMatchSnapshot();
|
25 |
} );
|
26 |
it( 'should fetch choices with success', () => {
|
27 |
expect(
|
28 |
+
reducer( undefined, { type: types.FETCH_POST_CHOICES_SUCCESS, data: { posts: { a: 1 } } } ),
|
29 |
).toMatchSnapshot();
|
30 |
} );
|
31 |
it( 'should fetch choices with error', () => {
|
32 |
expect(
|
33 |
+
reducer( undefined, { type: types.FETCH_POST_CHOICES_ERROR } ),
|
34 |
).toMatchSnapshot();
|
35 |
} );
|
36 |
} );
|
src/modules/data/shared/move/reducers/__tests__/ui.test.js
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
* Internal dependencies
|
3 |
*/
|
4 |
import reducer, { DEFAULT_STATE } from '../posts';
|
5 |
-
import * as actions from '../../actions';
|
6 |
import * as types from '../../types';
|
7 |
|
8 |
describe( 'Move UI reducer', () => {
|
@@ -11,12 +10,12 @@ describe( 'Move UI reducer', () => {
|
|
11 |
} );
|
12 |
it( 'should fetch types', () => {
|
13 |
expect(
|
14 |
-
reducer( undefined, { type: types.SHOW_MODAL } )
|
15 |
).toMatchSnapshot();
|
16 |
} );
|
17 |
it( 'should fetch types with success', () => {
|
18 |
expect(
|
19 |
-
reducer( undefined, { type: types.HIDE_MODAL } )
|
20 |
).toMatchSnapshot();
|
21 |
} );
|
22 |
} );
|
2 |
* Internal dependencies
|
3 |
*/
|
4 |
import reducer, { DEFAULT_STATE } from '../posts';
|
|
|
5 |
import * as types from '../../types';
|
6 |
|
7 |
describe( 'Move UI reducer', () => {
|
10 |
} );
|
11 |
it( 'should fetch types', () => {
|
12 |
expect(
|
13 |
+
reducer( undefined, { type: types.SHOW_MODAL } ),
|
14 |
).toMatchSnapshot();
|
15 |
} );
|
16 |
it( 'should fetch types with success', () => {
|
17 |
expect(
|
18 |
+
reducer( undefined, { type: types.HIDE_MODAL } ),
|
19 |
).toMatchSnapshot();
|
20 |
} );
|
21 |
} );
|
src/modules/data/shared/move/sagas.js
CHANGED
@@ -8,7 +8,7 @@ import { delay } from 'redux-saga';
|
|
8 |
/**
|
9 |
* Wordpress dependencies
|
10 |
*/
|
11 |
-
import { select as wpSelect
|
12 |
|
13 |
/**
|
14 |
* Internal dependencies
|
@@ -48,7 +48,9 @@ export function* _fetch( params ) {
|
|
48 |
|
49 |
/**
|
50 |
* Fetches usable oost types
|
51 |
-
*
|
|
|
|
|
52 |
*/
|
53 |
export function* fetchPostTypes() {
|
54 |
try {
|
@@ -75,12 +77,13 @@ export function* fetchPostTypes() {
|
|
75 |
* Fetches filtered posts based on criteria
|
76 |
*
|
77 |
* @export
|
|
|
78 |
* @param {*} {
|
79 |
* ignore,
|
80 |
* post_type,
|
81 |
* search_terms = '',
|
82 |
* }
|
83 |
-
* @returns {
|
84 |
*/
|
85 |
export function* fetchPostChoices( {
|
86 |
ignore,
|
@@ -114,12 +117,13 @@ export function* fetchPostChoices( {
|
|
114 |
* Moves ticket/RSVP from one post to another
|
115 |
*
|
116 |
* @export
|
|
|
117 |
* @param {*} {
|
118 |
* src_post_id,
|
119 |
* ticket_type_id,
|
120 |
* target_post_id,
|
121 |
* }
|
122 |
-
* @returns {
|
123 |
*/
|
124 |
export function* moveTicket( {
|
125 |
src_post_id,
|
8 |
/**
|
9 |
* Wordpress dependencies
|
10 |
*/
|
11 |
+
import { select as wpSelect } from '@wordpress/data';
|
12 |
|
13 |
/**
|
14 |
* Internal dependencies
|
48 |
|
49 |
/**
|
50 |
* Fetches usable oost types
|
51 |
+
*
|
52 |
+
* @yields
|
53 |
+
* @returns {object} JSON response
|
54 |
*/
|
55 |
export function* fetchPostTypes() {
|
56 |
try {
|
77 |
* Fetches filtered posts based on criteria
|
78 |
*
|
79 |
* @export
|
80 |
+
* @yields
|
81 |
* @param {*} {
|
82 |
* ignore,
|
83 |
* post_type,
|
84 |
* search_terms = '',
|
85 |
* }
|
86 |
+
* @returns {object} JSON response
|
87 |
*/
|
88 |
export function* fetchPostChoices( {
|
89 |
ignore,
|
117 |
* Moves ticket/RSVP from one post to another
|
118 |
*
|
119 |
* @export
|
120 |
+
* @yields
|
121 |
* @param {*} {
|
122 |
* src_post_id,
|
123 |
* ticket_type_id,
|
124 |
* target_post_id,
|
125 |
* }
|
126 |
+
* @returns {object} JSON response
|
127 |
*/
|
128 |
export function* moveTicket( {
|
129 |
src_post_id,
|
src/modules/data/shared/move/selectors.js
CHANGED
@@ -11,7 +11,10 @@ export const _getPosts = createSelector( getMove, move => move.posts );
|
|
11 |
export const _getModal = createSelector( getMove, move => move.modal );
|
12 |
|
13 |
export const isModalShowing = createSelector( _getUI, ui => ui.showModal );
|
14 |
-
export const isFetchingPostTypes = createSelector(
|
|
|
|
|
|
|
15 |
export const isFetchingPosts = createSelector( _getPosts, posts => posts.isFetching );
|
16 |
|
17 |
export const getPostTypes = createSelector( _getPostTypes, postTypes => postTypes.posts );
|
@@ -39,10 +42,10 @@ export const isModalSubmitting = createSelector( _getModal, modal => modal.isSub
|
|
39 |
|
40 |
export const getPostTypeOptionValue = createSelector(
|
41 |
[ getPostTypeOptions, getModalPostType ],
|
42 |
-
( postTypeOptions, postType ) => find( postTypeOptions, [ 'value', postType ] )
|
43 |
);
|
44 |
|
45 |
export const hasSelectedPost = createSelector(
|
46 |
[ getPostOptions, getModalTarget ],
|
47 |
-
( posts, target ) => !! ( target && find( posts, [ 'value', target ] ) )
|
48 |
);
|
11 |
export const _getModal = createSelector( getMove, move => move.modal );
|
12 |
|
13 |
export const isModalShowing = createSelector( _getUI, ui => ui.showModal );
|
14 |
+
export const isFetchingPostTypes = createSelector(
|
15 |
+
_getPostTypes,
|
16 |
+
postTypes => postTypes.isFetching,
|
17 |
+
);
|
18 |
export const isFetchingPosts = createSelector( _getPosts, posts => posts.isFetching );
|
19 |
|
20 |
export const getPostTypes = createSelector( _getPostTypes, postTypes => postTypes.posts );
|
42 |
|
43 |
export const getPostTypeOptionValue = createSelector(
|
44 |
[ getPostTypeOptions, getModalPostType ],
|
45 |
+
( postTypeOptions, postType ) => find( postTypeOptions, [ 'value', postType ] ),
|
46 |
);
|
47 |
|
48 |
export const hasSelectedPost = createSelector(
|
49 |
[ getPostOptions, getModalTarget ],
|
50 |
+
( posts, target ) => !! ( target && find( posts, [ 'value', target ] ) ),
|
51 |
);
|
src/modules/data/shared/sagas.js
CHANGED
@@ -101,8 +101,9 @@ export function createWPEditorNotSavingChannel() {
|
|
101 |
* Create date objects used throughout sagas
|
102 |
*
|
103 |
* @export
|
104 |
-
* @
|
105 |
-
* @
|
|
|
106 |
*/
|
107 |
export function* createDates( date ) {
|
108 |
const { datepickerFormat } = yield call( [ globals, 'tecDateSettings' ] );
|
101 |
* Create date objects used throughout sagas
|
102 |
*
|
103 |
* @export
|
104 |
+
* @yields
|
105 |
+
* @param {string} date datetime string
|
106 |
+
* @returns {object} Object of dates/moments
|
107 |
*/
|
108 |
export function* createDates( date ) {
|
109 |
const { datepickerFormat } = yield call( [ globals, 'tecDateSettings' ] );
|
src/modules/elements/action-button/__tests__/element.test.js
CHANGED
@@ -16,14 +16,14 @@ const Icon = () => ( <span role="img" aria-label="Emoji">🦖</span> );
|
|
16 |
describe( 'ActionButton', () => {
|
17 |
test( 'component rendered', () => {
|
18 |
const component = renderer.create(
|
19 |
-
<ActionButton icon={ <Icon /> }>Custom Action</ActionButton
|
20 |
);
|
21 |
expect( component.toJSON() ).toMatchSnapshot();
|
22 |
} );
|
23 |
|
24 |
test( 'component rendered with the correct class when icon is on the right', () => {
|
25 |
const component = renderer.create(
|
26 |
-
<ActionButton icon={ <Icon /> } position={ positions.right }>Custom Action</ActionButton
|
27 |
);
|
28 |
expect( component.toJSON() ).toMatchSnapshot();
|
29 |
} );
|
@@ -41,7 +41,7 @@ describe( 'ActionButton', () => {
|
|
41 |
|
42 |
test( 'component rendered as link', () => {
|
43 |
const component = renderer.create(
|
44 |
-
<ActionButton asLink={ true } icon={ <Icon /> } href="#">Test Action</ActionButton
|
45 |
);
|
46 |
expect( component.toJSON() ).toMatchSnapshot();
|
47 |
} );
|
16 |
describe( 'ActionButton', () => {
|
17 |
test( 'component rendered', () => {
|
18 |
const component = renderer.create(
|
19 |
+
<ActionButton icon={ <Icon /> }>Custom Action</ActionButton>,
|
20 |
);
|
21 |
expect( component.toJSON() ).toMatchSnapshot();
|
22 |
} );
|
23 |
|
24 |
test( 'component rendered with the correct class when icon is on the right', () => {
|
25 |
const component = renderer.create(
|
26 |
+
<ActionButton icon={ <Icon /> } position={ positions.right }>Custom Action</ActionButton>,
|
27 |
);
|
28 |
expect( component.toJSON() ).toMatchSnapshot();
|
29 |
} );
|
41 |
|
42 |
test( 'component rendered as link', () => {
|
43 |
const component = renderer.create(
|
44 |
+
<ActionButton asLink={ true } icon={ <Icon /> } href="#">Test Action</ActionButton>,
|
45 |
);
|
46 |
expect( component.toJSON() ).toMatchSnapshot();
|
47 |
} );
|
src/modules/elements/action-button/element.js
CHANGED
@@ -53,7 +53,7 @@ const ActionButton = ( {
|
|
53 |
}
|
54 |
|
55 |
return elemProps;
|
56 |
-
}
|
57 |
|
58 |
return (
|
59 |
<Element
|
@@ -64,7 +64,7 @@ const ActionButton = ( {
|
|
64 |
<span className="tribe-editor__action-button__label">{ children }</span>
|
65 |
</Element>
|
66 |
);
|
67 |
-
}
|
68 |
|
69 |
ActionButton.propTypes = {
|
70 |
asLink: PropTypes.bool,
|
53 |
}
|
54 |
|
55 |
return elemProps;
|
56 |
+
};
|
57 |
|
58 |
return (
|
59 |
<Element
|
64 |
<span className="tribe-editor__action-button__label">{ children }</span>
|
65 |
</Element>
|
66 |
);
|
67 |
+
};
|
68 |
|
69 |
ActionButton.propTypes = {
|
70 |
asLink: PropTypes.bool,
|
src/modules/elements/action-dashboard/element.js
CHANGED
@@ -24,12 +24,11 @@ const ActionDashboard = ( {
|
|
24 |
showCancel,
|
25 |
showConfirm,
|
26 |
} ) => {
|
27 |
-
|
28 |
const actionsList = ( actions && !! actions.length ) && (
|
29 |
<div className="tribe-editor__action-dashboard__group-left">
|
30 |
{ actions.map( ( action, index ) => (
|
31 |
<span
|
32 |
-
key={ `action-${index}` }
|
33 |
className="tribe-editor__action-dashboard__action-wrapper"
|
34 |
>
|
35 |
{ action }
|
@@ -75,7 +74,7 @@ const ActionDashboard = ( {
|
|
75 |
{ actionsList }
|
76 |
{ groupRight }
|
77 |
</section>
|
78 |
-
)
|
79 |
};
|
80 |
|
81 |
ActionDashboard.defaultProps = {
|
24 |
showCancel,
|
25 |
showConfirm,
|
26 |
} ) => {
|
|
|
27 |
const actionsList = ( actions && !! actions.length ) && (
|
28 |
<div className="tribe-editor__action-dashboard__group-left">
|
29 |
{ actions.map( ( action, index ) => (
|
30 |
<span
|
31 |
+
key={ `action-${ index }` }
|
32 |
className="tribe-editor__action-dashboard__action-wrapper"
|
33 |
>
|
34 |
{ action }
|
74 |
{ actionsList }
|
75 |
{ groupRight }
|
76 |
</section>
|
77 |
+
);
|
78 |
};
|
79 |
|
80 |
ActionDashboard.defaultProps = {
|
src/modules/elements/attendees-registration/element.js
CHANGED
@@ -8,6 +8,7 @@ import PropTypes from 'prop-types';
|
|
8 |
* Wordpress dependencies
|
9 |
*/
|
10 |
import { Spinner } from '@wordpress/components';
|
|
|
11 |
|
12 |
/**
|
13 |
* Internal dependencies
|
@@ -58,6 +59,7 @@ class AttendeesRegistration extends PureComponent {
|
|
58 |
onLoad={ () => onIframeLoad( this.iframe.current ) }
|
59 |
ref={ this.iframe }
|
60 |
src={ iframeURL }
|
|
|
61 |
>
|
62 |
</iframe>
|
63 |
<div className="tribe-editor__attendee-registration__modal-overlay">
|
8 |
* Wordpress dependencies
|
9 |
*/
|
10 |
import { Spinner } from '@wordpress/components';
|
11 |
+
import { __ } from '@wordpress/i18n';
|
12 |
|
13 |
/**
|
14 |
* Internal dependencies
|
59 |
onLoad={ () => onIframeLoad( this.iframe.current ) }
|
60 |
ref={ this.iframe }
|
61 |
src={ iframeURL }
|
62 |
+
title={ __( 'Attendee registration', 'event-tickets' ) }
|
63 |
>
|
64 |
</iframe>
|
65 |
<div className="tribe-editor__attendee-registration__modal-overlay">
|
src/modules/elements/date-time-range-picker/element.js
CHANGED
@@ -240,7 +240,7 @@ class DateTimeRangePicker extends Component {
|
|
240 |
<TimePicker { ...this.getToTimePickerProps() } />
|
241 |
</div>
|
242 |
</div>
|
243 |
-
)
|
244 |
}
|
245 |
}
|
246 |
|
240 |
<TimePicker { ...this.getToTimePickerProps() } />
|
241 |
</div>
|
242 |
</div>
|
243 |
+
);
|
244 |
}
|
245 |
}
|
246 |
|
src/modules/elements/inactive-block/__tests__/element.test.js
CHANGED
@@ -20,7 +20,9 @@ describe( 'Disabled Tickets', () => {
|
|
20 |
} );
|
21 |
|
22 |
it( 'renders the component with classes', () => {
|
23 |
-
const tree = renderer.create(
|
|
|
|
|
24 |
expect( tree.toJSON() ).toMatchSnapshot();
|
25 |
} );
|
26 |
|
@@ -30,7 +32,9 @@ describe( 'Disabled Tickets', () => {
|
|
30 |
} );
|
31 |
|
32 |
it( 'renders the component with description', () => {
|
33 |
-
const tree = renderer.create(
|
|
|
|
|
34 |
expect( tree.toJSON() ).toMatchSnapshot();
|
35 |
} );
|
36 |
|
20 |
} );
|
21 |
|
22 |
it( 'renders the component with classes', () => {
|
23 |
+
const tree = renderer.create(
|
24 |
+
<InactiveBlock layout={ LAYOUT.rsvp } className="custom-class" />,
|
25 |
+
);
|
26 |
expect( tree.toJSON() ).toMatchSnapshot();
|
27 |
} );
|
28 |
|
32 |
} );
|
33 |
|
34 |
it( 'renders the component with description', () => {
|
35 |
+
const tree = renderer.create(
|
36 |
+
<InactiveBlock layout={ LAYOUT.rsvp } description="Custom Description" />,
|
37 |
+
);
|
38 |
expect( tree.toJSON() ).toMatchSnapshot();
|
39 |
} );
|
40 |
|
src/modules/elements/label-with-tooltip/__tests__/element.test.js
CHANGED
@@ -28,7 +28,7 @@ describe( 'Tooltip Element', () => {
|
|
28 |
tooltipPosition: 'bottom left',
|
29 |
tooltipText: 'here is the tooltip text',
|
30 |
};
|
31 |
-
const component = renderer.create( <LabelWithTooltip { ...props } />)
|
32 |
-
expect( component.toJSON() ).toMatchSnapshot()
|
33 |
} );
|
34 |
} );
|
28 |
tooltipPosition: 'bottom left',
|
29 |
tooltipText: 'here is the tooltip text',
|
30 |
};
|
31 |
+
const component = renderer.create( <LabelWithTooltip { ...props } /> );
|
32 |
+
expect( component.toJSON() ).toMatchSnapshot();
|
33 |
} );
|
34 |
} );
|
src/modules/elements/move-modal/container.js
CHANGED
@@ -9,11 +9,11 @@ import { compose } from 'redux';
|
|
9 |
*/
|
10 |
import { withStore } from '@moderntribe/common/hoc';
|
11 |
import * as selectors from '@moderntribe/tickets/data/shared/move/selectors';
|
12 |
-
import { INITIALIZE_MODAL,
|
13 |
import { hideModal, setModalData } from '@moderntribe/tickets/data/shared/move/actions';
|
14 |
import Template from './template';
|
15 |
|
16 |
-
const mapStateToProps = ( state
|
17 |
hasSelectedPost: selectors.hasSelectedPost( state ),
|
18 |
isFetchingPosts: selectors.isFetchingPosts( state ),
|
19 |
isFetchingPostTypes: selectors.isFetchingPostTypes( state ),
|
@@ -25,7 +25,7 @@ const mapStateToProps = ( state, ownProps ) => ( {
|
|
25 |
search: selectors.getModalSearch( state ),
|
26 |
} );
|
27 |
|
28 |
-
const mapDispatchToProps = ( dispatch
|
29 |
initialize: () => dispatch( { type: INITIALIZE_MODAL } ),
|
30 |
hideModal: () => dispatch( hideModal() ),
|
31 |
onSearchChange: ( e ) => dispatch( setModalData( { search_terms: e.target.value } ) ),
|
9 |
*/
|
10 |
import { withStore } from '@moderntribe/common/hoc';
|
11 |
import * as selectors from '@moderntribe/tickets/data/shared/move/selectors';
|
12 |
+
import { INITIALIZE_MODAL, SUBMIT_MODAL } from '@moderntribe/tickets/data/shared/move/types';
|
13 |
import { hideModal, setModalData } from '@moderntribe/tickets/data/shared/move/actions';
|
14 |
import Template from './template';
|
15 |
|
16 |
+
const mapStateToProps = ( state ) => ( {
|
17 |
hasSelectedPost: selectors.hasSelectedPost( state ),
|
18 |
isFetchingPosts: selectors.isFetchingPosts( state ),
|
19 |
isFetchingPostTypes: selectors.isFetchingPostTypes( state ),
|
25 |
search: selectors.getModalSearch( state ),
|
26 |
} );
|
27 |
|
28 |
+
const mapDispatchToProps = ( dispatch ) => ( {
|
29 |
initialize: () => dispatch( { type: INITIALIZE_MODAL } ),
|
30 |
hideModal: () => dispatch( hideModal() ),
|
31 |
onSearchChange: ( e ) => dispatch( setModalData( { search_terms: e.target.value } ) ),
|
src/modules/elements/move-modal/template.js
CHANGED
@@ -83,7 +83,10 @@ export default class MoveModal extends PureComponent {
|
|
83 |
/>
|
84 |
|
85 |
<label htmlFor="search">
|
86 |
-
{ __(
|
|
|
|
|
|
|
87 |
</label>
|
88 |
<Input
|
89 |
id="search"
|
83 |
/>
|
84 |
|
85 |
<label htmlFor="search">
|
86 |
+
{ __(
|
87 |
+
'You can also enter keywords to help find the target event by title or description',
|
88 |
+
'event-tickets',
|
89 |
+
) }
|
90 |
</label>
|
91 |
<Input
|
92 |
id="search"
|
src/modules/elements/numeric-label/__tests__/element.test.js
CHANGED
@@ -26,28 +26,28 @@ describe( 'NumericLabel', () => {
|
|
26 |
count={ 0 }
|
27 |
fallback="My fallback value"
|
28 |
useFallback={ false }
|
29 |
-
|
30 |
);
|
31 |
expect( component.toJSON() ).toMatchSnapshot();
|
32 |
} );
|
33 |
|
34 |
test( 'render with singular label', () => {
|
35 |
const component = renderer.create(
|
36 |
-
<NumericLabel count={ 0 } singular="Just %d item"
|
37 |
);
|
38 |
expect( component.toJSON() ).toBe( null );
|
39 |
} );
|
40 |
|
41 |
test( 'render with empty and fallback', () => {
|
42 |
const component = renderer.create(
|
43 |
-
<NumericLabel count={ 0 } singular="Just %d item" fallback={ '' }
|
44 |
);
|
45 |
expect( component.toJSON() ).toBe( '' );
|
46 |
} );
|
47 |
|
48 |
test( 'render with negative number', () => {
|
49 |
const component = renderer.create(
|
50 |
-
<NumericLabel count={ -10 }
|
51 |
);
|
52 |
expect( component.toJSON() ).toBe( null );
|
53 |
} );
|
@@ -57,7 +57,7 @@ describe( 'NumericLabel', () => {
|
|
57 |
<NumericLabel
|
58 |
count={ 1 }
|
59 |
singular="Just Item"
|
60 |
-
|
61 |
);
|
62 |
expect( component.toJSON() ).toMatchSnapshot();
|
63 |
} );
|
@@ -67,7 +67,7 @@ describe( 'NumericLabel', () => {
|
|
67 |
<NumericLabel
|
68 |
count={ 1 }
|
69 |
singular="Just %d Item"
|
70 |
-
|
71 |
);
|
72 |
expect( component.toJSON() ).toMatchSnapshot();
|
73 |
} );
|
@@ -77,7 +77,7 @@ describe( 'NumericLabel', () => {
|
|
77 |
<NumericLabel
|
78 |
count={ 1 }
|
79 |
singular="Just %d Item %d more text over here"
|
80 |
-
|
81 |
);
|
82 |
expect( component.toJSON() ).toMatchSnapshot();
|
83 |
} );
|
@@ -87,7 +87,7 @@ describe( 'NumericLabel', () => {
|
|
87 |
<NumericLabel
|
88 |
count={ 3 }
|
89 |
plural="We have items"
|
90 |
-
|
91 |
);
|
92 |
expect( component.toJSON() ).toMatchSnapshot();
|
93 |
} );
|
@@ -97,7 +97,7 @@ describe( 'NumericLabel', () => {
|
|
97 |
<NumericLabel
|
98 |
count={ 3 }
|
99 |
plural="We have %d items"
|
100 |
-
|
101 |
);
|
102 |
expect( component.toJSON() ).toMatchSnapshot();
|
103 |
} );
|
@@ -107,7 +107,7 @@ describe( 'NumericLabel', () => {
|
|
107 |
<NumericLabel
|
108 |
count={ 3 }
|
109 |
plural="We have %d items, more %d items over here"
|
110 |
-
|
111 |
);
|
112 |
expect( component.toJSON() ).toMatchSnapshot();
|
113 |
} );
|
@@ -119,7 +119,7 @@ describe( 'NumericLabel', () => {
|
|
119 |
includeZero={ true }
|
120 |
singular="We have %d item"
|
121 |
plural="We have %d items"
|
122 |
-
|
123 |
);
|
124 |
expect( component.toJSON() ).toMatchSnapshot();
|
125 |
} );
|
26 |
count={ 0 }
|
27 |
fallback="My fallback value"
|
28 |
useFallback={ false }
|
29 |
+
/>,
|
30 |
);
|
31 |
expect( component.toJSON() ).toMatchSnapshot();
|
32 |
} );
|
33 |
|
34 |
test( 'render with singular label', () => {
|
35 |
const component = renderer.create(
|
36 |
+
<NumericLabel count={ 0 } singular="Just %d item" />,
|
37 |
);
|
38 |
expect( component.toJSON() ).toBe( null );
|
39 |
} );
|
40 |
|
41 |
test( 'render with empty and fallback', () => {
|
42 |
const component = renderer.create(
|
43 |
+
<NumericLabel count={ 0 } singular="Just %d item" fallback={ '' } />,
|
44 |
);
|
45 |
expect( component.toJSON() ).toBe( '' );
|
46 |
} );
|
47 |
|
48 |
test( 'render with negative number', () => {
|
49 |
const component = renderer.create(
|
50 |
+
<NumericLabel count={ -10 } />,
|
51 |
);
|
52 |
expect( component.toJSON() ).toBe( null );
|
53 |
} );
|
57 |
<NumericLabel
|
58 |
count={ 1 }
|
59 |
singular="Just Item"
|
60 |
+
/>,
|
61 |
);
|
62 |
expect( component.toJSON() ).toMatchSnapshot();
|
63 |
} );
|
67 |
<NumericLabel
|
68 |
count={ 1 }
|
69 |
singular="Just %d Item"
|
70 |
+
/>,
|
71 |
);
|
72 |
expect( component.toJSON() ).toMatchSnapshot();
|
73 |
} );
|
77 |
<NumericLabel
|
78 |
count={ 1 }
|
79 |
singular="Just %d Item %d more text over here"
|
80 |
+
/>,
|
81 |
);
|
82 |
expect( component.toJSON() ).toMatchSnapshot();
|
83 |
} );
|
87 |
<NumericLabel
|
88 |
count={ 3 }
|
89 |
plural="We have items"
|
90 |
+
/>,
|
91 |
);
|
92 |
expect( component.toJSON() ).toMatchSnapshot();
|
93 |
} );
|
97 |
<NumericLabel
|
98 |
count={ 3 }
|
99 |
plural="We have %d items"
|
100 |
+
/>,
|
101 |
);
|
102 |
expect( component.toJSON() ).toMatchSnapshot();
|
103 |
} );
|
107 |
<NumericLabel
|
108 |
count={ 3 }
|
109 |
plural="We have %d items, more %d items over here"
|
110 |
+
/>,
|
111 |
);
|
112 |
expect( component.toJSON() ).toMatchSnapshot();
|
113 |
} );
|
119 |
includeZero={ true }
|
120 |
singular="We have %d item"
|
121 |
plural="We have %d items"
|
122 |
+
/>,
|
123 |
);
|
124 |
expect( component.toJSON() ).toMatchSnapshot();
|
125 |
} );
|
src/modules/elements/numeric-label/element.js
CHANGED
@@ -15,13 +15,14 @@ import classNames from 'classnames';
|
|
15 |
*
|
16 |
* Labels need to have a %d on it where the number will be replaced
|
17 |
*
|
18 |
-
* @param {
|
19 |
-
* @param {
|
20 |
-
* @param {
|
21 |
-
* @param {
|
22 |
-
* @param {string}
|
23 |
-
* @param {
|
24 |
-
* @param {*} fallback The value to be returned if count is zero or negative
|
|
|
25 |
* @returns {*} return fallback if count is zero or negative otherwise singular or plural
|
26 |
*/
|
27 |
const NumericLabel = ( {
|
@@ -34,10 +35,10 @@ const NumericLabel = ( {
|
|
34 |
useFallback,
|
35 |
} ) => {
|
36 |
if (
|
37 |
-
useFallback
|
38 |
-
|
39 |
-
( includeZero && ! ( count >= 0 ) )
|
40 |
-
|
41 |
)
|
42 |
) {
|
43 |
return fallback;
|
@@ -52,7 +53,7 @@ const NumericLabel = ( {
|
|
52 |
{ after && <span className="tribe-editor__numeric-label--after">{ after }</span> }
|
53 |
</span>
|
54 |
);
|
55 |
-
}
|
56 |
|
57 |
NumericLabel.propTypes = {
|
58 |
className: PropTypes.oneOfType( [
|
@@ -65,7 +66,7 @@ NumericLabel.propTypes = {
|
|
65 |
singular: PropTypes.string,
|
66 |
plural: PropTypes.string,
|
67 |
useFallback: PropTypes.any,
|
68 |
-
}
|
69 |
|
70 |
NumericLabel.defaultProps = {
|
71 |
count: 0,
|
@@ -75,6 +76,6 @@ NumericLabel.defaultProps = {
|
|
75 |
className: '',
|
76 |
fallback: null,
|
77 |
useFallback: true,
|
78 |
-
}
|
79 |
|
80 |
export default NumericLabel;
|
15 |
*
|
16 |
* Labels need to have a %d on it where the number will be replaced
|
17 |
*
|
18 |
+
* @param {object} props The props passed to this component
|
19 |
+
* @param {string | Array | object} props.className The class of the element
|
20 |
+
* @param {number} props.count The amount to be compared
|
21 |
+
* @param {boolean} props.includeZero If true, zero is included in count
|
22 |
+
* @param {string} props.singular The label for the singular case
|
23 |
+
* @param {string} props.plural The label for the plural case
|
24 |
+
* @param {*} props.fallback The value to be returned if count is zero or negative
|
25 |
+
* @param {boolean} props.useFallback If true, fallback is used.
|
26 |
* @returns {*} return fallback if count is zero or negative otherwise singular or plural
|
27 |
*/
|
28 |
const NumericLabel = ( {
|
35 |
useFallback,
|
36 |
} ) => {
|
37 |
if (
|
38 |
+
useFallback &&
|
39 |
+
(
|
40 |
+
( includeZero && ! ( count >= 0 ) ) ||
|
41 |
+
( ! includeZero && ! ( count > 0 ) )
|
42 |
)
|
43 |
) {
|
44 |
return fallback;
|
53 |
{ after && <span className="tribe-editor__numeric-label--after">{ after }</span> }
|
54 |
</span>
|
55 |
);
|
56 |
+
};
|
57 |
|
58 |
NumericLabel.propTypes = {
|
59 |
className: PropTypes.oneOfType( [
|
66 |
singular: PropTypes.string,
|
67 |
plural: PropTypes.string,
|
68 |
useFallback: PropTypes.any,
|
69 |
+
};
|
70 |
|
71 |
NumericLabel.defaultProps = {
|
72 |
count: 0,
|
76 |
className: '',
|
77 |
fallback: null,
|
78 |
useFallback: true,
|
79 |
+
};
|
80 |
|
81 |
export default NumericLabel;
|
src/modules/elements/settings-dashboard/__tests__/element.test.js
CHANGED
@@ -35,13 +35,17 @@ describe( 'Settings Dashboard Element', () => {
|
|
35 |
|
36 |
it( 'renders settings dashboard with close button disabled', () => {
|
37 |
const closeButtonDisabled = true;
|
38 |
-
const component = renderer.create(
|
|
|
|
|
39 |
expect( component.toJSON() ).toMatchSnapshot();
|
40 |
} );
|
41 |
|
42 |
it( 'renders settings dashboard with close button label', () => {
|
43 |
const closeButtonLabel = <span>Close Button Label</span>;
|
44 |
-
const component = renderer.create(
|
|
|
|
|
45 |
expect( component.toJSON() ).toMatchSnapshot();
|
46 |
} );
|
47 |
|
35 |
|
36 |
it( 'renders settings dashboard with close button disabled', () => {
|
37 |
const closeButtonDisabled = true;
|
38 |
+
const component = renderer.create(
|
39 |
+
<SettingsDashboard closeButtonDisabled={ closeButtonDisabled } />,
|
40 |
+
);
|
41 |
expect( component.toJSON() ).toMatchSnapshot();
|
42 |
} );
|
43 |
|
44 |
it( 'renders settings dashboard with close button label', () => {
|
45 |
const closeButtonLabel = <span>Close Button Label</span>;
|
46 |
+
const component = renderer.create(
|
47 |
+
<SettingsDashboard closeButtonLabel={ closeButtonLabel } />,
|
48 |
+
);
|
49 |
expect( component.toJSON() ).toMatchSnapshot();
|
50 |
} );
|
51 |
|
src/modules/elements/warning-button/__tests__/element.test.js
CHANGED
@@ -13,7 +13,7 @@ import { Button } from '@moderntribe/common/elements';
|
|
13 |
describe( 'WarningButton', () => {
|
14 |
test( 'component rendered', () => {
|
15 |
const component = renderer.create(
|
16 |
-
<WarningButton icon="no">Warning</WarningButton
|
17 |
);
|
18 |
expect( component.toJSON() ).toMatchSnapshot();
|
19 |
} );
|
13 |
describe( 'WarningButton', () => {
|
14 |
test( 'component rendered', () => {
|
15 |
const component = renderer.create(
|
16 |
+
<WarningButton icon="no">Warning</WarningButton>,
|
17 |
);
|
18 |
expect( component.toJSON() ).toMatchSnapshot();
|
19 |
} );
|
src/resources/css/app/blocks.css
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
.tribe-editor__settings-dashboard{background-color:#f8f9fb;position:relative}.tribe-editor__settings-dashboard__header{display:flex;justify-content:space-between;align-items:center;padding:15px 14px;height:68px}.tribe-editor__settings-dashboard .tribe-editor__settings-dashboard__close-button,.tribe-editor__settings-dashboard__header-left{flex:none;display:flex;align-items:center;font-size:15px;line-height:18px;letter-spacing:.38px}.tribe-editor__settings-dashboard__header-left>svg{fill:#009fd4;margin-right:6px}.tribe-editor__settings-dashboard__header-left>svg path{fill:#009fd4}.tribe-editor__settings-dashboard__header-left-text{color:#141827}.tribe-editor__settings-dashboard__close-button>svg{fill:#a2aab2;margin-right:6px}.tribe-editor__settings-dashboard__close-button>svg path{fill:#a2aab2}.tribe-editor__settings-dashboard__close-button:focus>svg,.tribe-editor__settings-dashboard__close-button:hover>svg{fill:#009fd4;margin-right:6px}.tribe-editor__settings-dashboard__close-button:focus>svg path,.tribe-editor__settings-dashboard__close-button:hover>svg path{fill:#009fd4}.tribe-editor__settings-dashboard__close-button:disabled:focus>svg,.tribe-editor__settings-dashboard__close-button:disabled:focus>svg path,.tribe-editor__settings-dashboard__close-button:disabled:hover>svg,.tribe-editor__settings-dashboard__close-button:disabled:hover>svg path,.tribe-editor__settings-dashboard__close-button:disabled>svg,.tribe-editor__settings-dashboard__close-button:disabled>svg path{fill:#aeb4bb}.tribe-editor__settings-dashboard__close-button-text{color:#8d949b}.tribe-editor__settings-dashboard__close-button:focus .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:hover .tribe-editor__settings-dashboard__close-button-text{color:#009fd4}.tribe-editor__settings-dashboard__close-button:disabled .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:disabled:focus .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:disabled:hover .tribe-editor__settings-dashboard__close-button-text{color:#aeb4bb}.tribe-editor__settings-dashboard__content{padding:25px 14px}@media (min-width:600px){.tribe-editor__settings-dashboard__header{padding:15px 28px}.tribe-editor__settings-dashboard__content{padding:25px 28px}}
|
9 |
.tribe-editor__warning-button{align-items:center;display:flex}.tribe-editor__warning-button-text{color:#e7563b;font-size:15px;font-weight:700;letter-spacing:.38px;line-height:18px}.tribe-editor__tickets--loading .tribe-editor__warning-button-text{color:#aeb4bb}svg.tribe-editor__warning-button-icon{fill:#e7563b;height:17px;margin-right:5px;width:17px}.tribe-editor__tickets--loading svg.tribe-editor__warning-button-icon{fill:#aeb4bb}
|
10 |
.tribe-editor__rsvp-container-header__counters{flex:none;display:flex}.tribe-editor__rsvp-container-header__going-counter,.tribe-editor__rsvp-container-header__not-going-counter{flex:none}.tribe-editor__rsvp-container-header__going-counter{margin-right:25px}.tribe-editor__rsvp-container-header__going-counter:last-child{margin-right:0}
|
11 |
-
.tribe-editor__rsvp .tribe-editor__container-panel__header{display:flex;align-items:center}.tribe-editor__rsvp-container-header__header-details{flex:auto}.tribe-editor__rsvp .tribe-editor__rsvp-container .tribe-editor__rsvp-container-header__title{color:#141827;margin:0;padding-top:3px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__rsvp .tribe-editor__rsvp-container .tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-container-header__title{color:#aeb4bb}.tribe-editor__rsvp-container-header__title-input-wrapper{display:flex}.tribe-editor__rsvp-container-header__title-input-wrapper svg{flex:none;margin:6px 0 0 10px;fill:#8d949b}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input{
|
12 |
.tribe-editor__rsvp-duration__duration-label{flex:none;position:relative;width:95px;z-index:1}.tribe-editor__rsvp-duration__duration-label .tribe-editor__labeled-item__label{color:#545d66;font-size:15px;font-weight:700;letter-spacing:.38px;line-height:18px}.tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-duration__duration-label .tribe-editor__labeled-item__label{color:#aeb4bb}.tribe-editor__rsvp-duration__duration-label .tribe-editor__label-with-tooltip__tooltip-label{margin-left:5px}svg.tribe-editor__rsvp-duration__duration-tooltip-label{width:17px;height:17px;fill:#a2aab2}.tribe-editor__rsvp-container--disabled svg.tribe-editor__rsvp-duration__duration-tooltip-label{fill:#aeb4bb}
|
13 |
.tribe-editor__rsvp-duration__duration-picker{flex:1;margin-left:-42px}.tribe-editor__rsvp-container--disabled .tribe-editor__date-time-range-picker .tribe-editor__date-time-range-picker__separator{color:#aeb4bb}
|
14 |
.tribe-editor__rsvp-duration{align-items:flex-start;display:flex;flex-wrap:wrap}.tribe-editor__rsvp-duration .tribe-editor__timepicker-label-container{border-width:1px;border-color:#e1e3e6}.tribe-editor__rsvp-duration .tribe-editor__timepicker-label-container .tribe-editor__btn-input{padding-top:11px;padding-bottom:10px;font-size:14px}.tribe-editor__rsvp-duration__error{color:red;flex:none;font-size:15px;line-height:18px;margin-top:10px;padding-left:108px;width:100%}
|
@@ -31,8 +31,7 @@
|
|
31 |
.tribe-editor__tickets-controls-provider legend{font-weight:700;margin-bottom:10px;padding:0}
|
32 |
.tribe-editor__tickets{font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif}.tribe-editor__tickets .block-list-appender{display:none}.tribe-editor__tickets--loading{display:flex;align-items:center;justify-content:center;padding:20px}.tribe-editor__tickets .components-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);float:none;margin:0;opacity:.8}
|
33 |
.tribe-editor__ticket{margin:-19px 0;border:1px solid #e1e3e6;position:relative;font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif}.tribe-editor__ticket--selected{border:1px solid #b1b5b8}.tribe-editor__ticket .components-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);float:none;margin:0;opacity:.8}
|
34 |
-
.tribe-editor__ticket__container-header-title{display:flex}.tribe-editor__ticket__container-header-title .tribe-editor__ticket__container-header-clipboard-tooltip{flex:none;height:20px;margin:6px 0 0 10px}.tribe-editor__ticket__container-header-title>svg{flex:none;margin:6px 0 0 10px;opacity:0;transition:opacity .2s ease}.is-hovered[data-type="tribe/tickets-item"] .tribe-editor__ticket__container-header-title>svg,.tribe-editor__ticket--selected .tribe-editor__ticket__container-header-title>svg{opacity:1}.tribe-editor__ticket__container-header-title svg{fill:#8d949b}.tribe-editor__ticket .tribe-editor__ticket__container .tribe-editor__ticket__container-header-title-label{flex:none;max-width:calc(100% - 28px);color:#141827;margin:0;padding-top:3px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__ticket .tribe-editor__ticket__container .tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-title-label{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input{
|
35 |
-
/* !important required to override styles from react-input-autosize */display:flex!important;margin:0;padding-top:3px}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input>*{flex:none}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input>input{background-color:transparent;color:#000;margin:0;padding:0;border:none;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input>input:disabled{color:#aeb4bb}
|
36 |
.tribe-editor__ticket__container-header-description{display:block;color:#545d66;padding-top:7px;font-size:12px;line-height:18px;letter-spacing:.04px}.tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-description{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input{display:flex;background-color:transparent;color:#545d66;margin:0;padding:0;border:none;font-size:12px;max-height:108px;line-height:18px;letter-spacing:.04px;width:100%}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:disabled{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:focus,.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:hover{box-shadow:none;outline:none}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input>*{flex:none}
|
37 |
.tribe-editor__ticket__container-header-price{flex:none;min-width:65px;color:#141827;margin:0 20px 0 15px;padding-bottom:5px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px;text-align:center}.tribe-editor__ticket--selected .tribe-editor__ticket__container-header-price{margin-right:118px}.tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-price{color:#aeb4bb}.tribe-editor__ticket__container-header-price-input>input[type=number]{background-color:transparent;color:#141827;margin:0;padding:0;border:none;font-family:inherit;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__ticket__container-header-price-input>input[type=number]:disabled{color:#aeb4bb}
|
38 |
.tribe-editor__quantity-bar{border:1px solid #e1e3e6;position:relative;height:10px;margin:5px 0}.tribe-editor__quantity-bar__bar--capacity,.tribe-editor__quantity-bar__bar--shared-sold,.tribe-editor__quantity-bar__bar--sold{position:absolute;left:0;top:0;bottom:0}.tribe-editor__quantity-bar__bar--capacity{z-index:3}.tribe-editor__quantity-bar__bar--capacity:after{width:1px;content:"";height:20px;position:absolute;background-color:#009fd4;right:0;top:-5px}.tribe-editor__quantity-bar__bar--sold{background-color:#009fd4;z-index:2}.tribe-editor__quantity-bar__bar--shared-sold{background-color:#c9ebf7;z-index:1}.tribe-editor__quantity-bar__bar-label{position:absolute;right:0;bottom:-20px;transform:translateX(50%);font-size:12px;line-height:1;color:#545d66}
|
8 |
.tribe-editor__settings-dashboard{background-color:#f8f9fb;position:relative}.tribe-editor__settings-dashboard__header{display:flex;justify-content:space-between;align-items:center;padding:15px 14px;height:68px}.tribe-editor__settings-dashboard .tribe-editor__settings-dashboard__close-button,.tribe-editor__settings-dashboard__header-left{flex:none;display:flex;align-items:center;font-size:15px;line-height:18px;letter-spacing:.38px}.tribe-editor__settings-dashboard__header-left>svg{fill:#009fd4;margin-right:6px}.tribe-editor__settings-dashboard__header-left>svg path{fill:#009fd4}.tribe-editor__settings-dashboard__header-left-text{color:#141827}.tribe-editor__settings-dashboard__close-button>svg{fill:#a2aab2;margin-right:6px}.tribe-editor__settings-dashboard__close-button>svg path{fill:#a2aab2}.tribe-editor__settings-dashboard__close-button:focus>svg,.tribe-editor__settings-dashboard__close-button:hover>svg{fill:#009fd4;margin-right:6px}.tribe-editor__settings-dashboard__close-button:focus>svg path,.tribe-editor__settings-dashboard__close-button:hover>svg path{fill:#009fd4}.tribe-editor__settings-dashboard__close-button:disabled:focus>svg,.tribe-editor__settings-dashboard__close-button:disabled:focus>svg path,.tribe-editor__settings-dashboard__close-button:disabled:hover>svg,.tribe-editor__settings-dashboard__close-button:disabled:hover>svg path,.tribe-editor__settings-dashboard__close-button:disabled>svg,.tribe-editor__settings-dashboard__close-button:disabled>svg path{fill:#aeb4bb}.tribe-editor__settings-dashboard__close-button-text{color:#8d949b}.tribe-editor__settings-dashboard__close-button:focus .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:hover .tribe-editor__settings-dashboard__close-button-text{color:#009fd4}.tribe-editor__settings-dashboard__close-button:disabled .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:disabled:focus .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:disabled:hover .tribe-editor__settings-dashboard__close-button-text{color:#aeb4bb}.tribe-editor__settings-dashboard__content{padding:25px 14px}@media (min-width:600px){.tribe-editor__settings-dashboard__header{padding:15px 28px}.tribe-editor__settings-dashboard__content{padding:25px 28px}}
|
9 |
.tribe-editor__warning-button{align-items:center;display:flex}.tribe-editor__warning-button-text{color:#e7563b;font-size:15px;font-weight:700;letter-spacing:.38px;line-height:18px}.tribe-editor__tickets--loading .tribe-editor__warning-button-text{color:#aeb4bb}svg.tribe-editor__warning-button-icon{fill:#e7563b;height:17px;margin-right:5px;width:17px}.tribe-editor__tickets--loading svg.tribe-editor__warning-button-icon{fill:#aeb4bb}
|
10 |
.tribe-editor__rsvp-container-header__counters{flex:none;display:flex}.tribe-editor__rsvp-container-header__going-counter,.tribe-editor__rsvp-container-header__not-going-counter{flex:none}.tribe-editor__rsvp-container-header__going-counter{margin-right:25px}.tribe-editor__rsvp-container-header__going-counter:last-child{margin-right:0}
|
11 |
+
.tribe-editor__rsvp .tribe-editor__container-panel__header{display:flex;align-items:center}.tribe-editor__rsvp-container-header__header-details{flex:auto}.tribe-editor__rsvp .tribe-editor__rsvp-container .tribe-editor__rsvp-container-header__title{color:#141827;margin:0;padding-top:3px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__rsvp .tribe-editor__rsvp-container .tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-container-header__title{color:#aeb4bb}.tribe-editor__rsvp-container-header__title-input-wrapper{align-items:baseline;display:flex}.tribe-editor__rsvp-container-header__title-input-wrapper svg{flex:none;margin:6px 0 0 10px;fill:#8d949b}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input{background-color:transparent;border:none;color:#000;font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif;font-size:21px;font-weight:700;letter-spacing:.16px;line-height:25px;margin:3px 0 0;padding:0;resize:none;width:calc(95% - 26px)}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:focus,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:hover{background-color:#fff}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:disabled,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:disabled:focus,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:disabled:hover{background-color:transparent;color:#aeb4bb}.tribe-editor__rsvp-container-header__description{display:block;color:#545d66;padding-top:7px;font-size:12px;line-height:18px;letter-spacing:.04px}.tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-container-header__description{color:#aeb4bb}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input{display:flex;width:95%;background-color:transparent;color:#5d5d5d;margin:0;padding:0;border:none;font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif;font-size:12px;line-height:18px;letter-spacing:.04px;max-height:108px}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:focus,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:hover{background-color:transparent;box-shadow:none}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:disabled,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:disabled:focus,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:disabled:hover{background-color:transparent;color:#aeb4bb}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input>*{flex:none}.tribe-editor__rsvp-container-header__capacity-label{display:flex;color:#545d66;padding-top:15px;line-height:18px}.tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-container-header__capacity-label{color:#aeb4bb}.tribe-editor__rsvp-container-header__capacity-label .tribe-editor__numeric-label--count{flex:none;font-weight:700;font-size:18px;letter-spacing:.05px}.tribe-editor__rsvp-container-header__capacity-label .tribe-editor__numeric-label--after{flex:none;margin-left:2px;font-size:12px;letter-spacing:.04px;white-space:pre}.tribe-editor__rsvp-container-header__capacity-label-fallback{display:block;font-size:12px;line-height:18px;letter-spacing:.04px;color:#545d66;padding-top:15px}.tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-container-header__capacity-label-fallback{color:#aeb4bb}
|
12 |
.tribe-editor__rsvp-duration__duration-label{flex:none;position:relative;width:95px;z-index:1}.tribe-editor__rsvp-duration__duration-label .tribe-editor__labeled-item__label{color:#545d66;font-size:15px;font-weight:700;letter-spacing:.38px;line-height:18px}.tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-duration__duration-label .tribe-editor__labeled-item__label{color:#aeb4bb}.tribe-editor__rsvp-duration__duration-label .tribe-editor__label-with-tooltip__tooltip-label{margin-left:5px}svg.tribe-editor__rsvp-duration__duration-tooltip-label{width:17px;height:17px;fill:#a2aab2}.tribe-editor__rsvp-container--disabled svg.tribe-editor__rsvp-duration__duration-tooltip-label{fill:#aeb4bb}
|
13 |
.tribe-editor__rsvp-duration__duration-picker{flex:1;margin-left:-42px}.tribe-editor__rsvp-container--disabled .tribe-editor__date-time-range-picker .tribe-editor__date-time-range-picker__separator{color:#aeb4bb}
|
14 |
.tribe-editor__rsvp-duration{align-items:flex-start;display:flex;flex-wrap:wrap}.tribe-editor__rsvp-duration .tribe-editor__timepicker-label-container{border-width:1px;border-color:#e1e3e6}.tribe-editor__rsvp-duration .tribe-editor__timepicker-label-container .tribe-editor__btn-input{padding-top:11px;padding-bottom:10px;font-size:14px}.tribe-editor__rsvp-duration__error{color:red;flex:none;font-size:15px;line-height:18px;margin-top:10px;padding-left:108px;width:100%}
|
31 |
.tribe-editor__tickets-controls-provider legend{font-weight:700;margin-bottom:10px;padding:0}
|
32 |
.tribe-editor__tickets{font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif}.tribe-editor__tickets .block-list-appender{display:none}.tribe-editor__tickets--loading{display:flex;align-items:center;justify-content:center;padding:20px}.tribe-editor__tickets .components-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);float:none;margin:0;opacity:.8}
|
33 |
.tribe-editor__ticket{margin:-19px 0;border:1px solid #e1e3e6;position:relative;font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif}.tribe-editor__ticket--selected{border:1px solid #b1b5b8}.tribe-editor__ticket .components-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);float:none;margin:0;opacity:.8}
|
34 |
+
.tribe-editor__ticket__container-header-title{align-items:baseline;display:flex}.tribe-editor__ticket__container-header-title .tribe-editor__ticket__container-header-clipboard-tooltip{flex:none;height:20px;margin:6px 0 0 10px}.tribe-editor__ticket__container-header-title>svg{flex:none;margin:6px 0 0 10px;opacity:0;transition:opacity .2s ease}.is-hovered[data-type="tribe/tickets-item"] .tribe-editor__ticket__container-header-title>svg,.tribe-editor__ticket--selected .tribe-editor__ticket__container-header-title>svg{opacity:1}.tribe-editor__ticket__container-header-title svg{fill:#8d949b}.tribe-editor__ticket .tribe-editor__ticket__container .tribe-editor__ticket__container-header-title-label{flex:none;max-width:calc(100% - 28px);color:#141827;margin:0;padding-top:3px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__ticket .tribe-editor__ticket__container .tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-title-label{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input{background-color:transparent;border:none;color:#000;font-size:21px;font-weight:700;letter-spacing:.16px;line-height:25px;margin:3px 0 0;padding:0;resize:none;width:calc(95% - 26px)}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input:focus,.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input:hover{background-color:#fff}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input:disabled,.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input:disabled:focus,.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input:disabled:hover{background-color:transparent;color:#aeb4bb}
|
|
|
35 |
.tribe-editor__ticket__container-header-description{display:block;color:#545d66;padding-top:7px;font-size:12px;line-height:18px;letter-spacing:.04px}.tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-description{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input{display:flex;background-color:transparent;color:#545d66;margin:0;padding:0;border:none;font-size:12px;max-height:108px;line-height:18px;letter-spacing:.04px;width:100%}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:disabled{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:focus,.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:hover{box-shadow:none;outline:none}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input>*{flex:none}
|
36 |
.tribe-editor__ticket__container-header-price{flex:none;min-width:65px;color:#141827;margin:0 20px 0 15px;padding-bottom:5px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px;text-align:center}.tribe-editor__ticket--selected .tribe-editor__ticket__container-header-price{margin-right:118px}.tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-price{color:#aeb4bb}.tribe-editor__ticket__container-header-price-input>input[type=number]{background-color:transparent;color:#141827;margin:0;padding:0;border:none;font-family:inherit;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__ticket__container-header-price-input>input[type=number]:disabled{color:#aeb4bb}
|
37 |
.tribe-editor__quantity-bar{border:1px solid #e1e3e6;position:relative;height:10px;margin:5px 0}.tribe-editor__quantity-bar__bar--capacity,.tribe-editor__quantity-bar__bar--shared-sold,.tribe-editor__quantity-bar__bar--sold{position:absolute;left:0;top:0;bottom:0}.tribe-editor__quantity-bar__bar--capacity{z-index:3}.tribe-editor__quantity-bar__bar--capacity:after{width:1px;content:"";height:20px;position:absolute;background-color:#009fd4;right:0;top:-5px}.tribe-editor__quantity-bar__bar--sold{background-color:#009fd4;z-index:2}.tribe-editor__quantity-bar__bar--shared-sold{background-color:#c9ebf7;z-index:1}.tribe-editor__quantity-bar__bar-label{position:absolute;right:0;bottom:-20px;transform:translateX(50%);font-size:12px;line-height:1;color:#545d66}
|
src/resources/css/app/blocks.min.css
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
.tribe-editor__settings-dashboard{background-color:#f8f9fb;position:relative}.tribe-editor__settings-dashboard__header{display:flex;justify-content:space-between;align-items:center;padding:15px 14px;height:68px}.tribe-editor__settings-dashboard .tribe-editor__settings-dashboard__close-button,.tribe-editor__settings-dashboard__header-left{flex:none;display:flex;align-items:center;font-size:15px;line-height:18px;letter-spacing:.38px}.tribe-editor__settings-dashboard__header-left>svg{fill:#009fd4;margin-right:6px}.tribe-editor__settings-dashboard__header-left>svg path{fill:#009fd4}.tribe-editor__settings-dashboard__header-left-text{color:#141827}.tribe-editor__settings-dashboard__close-button>svg{fill:#a2aab2;margin-right:6px}.tribe-editor__settings-dashboard__close-button>svg path{fill:#a2aab2}.tribe-editor__settings-dashboard__close-button:focus>svg,.tribe-editor__settings-dashboard__close-button:hover>svg{fill:#009fd4;margin-right:6px}.tribe-editor__settings-dashboard__close-button:focus>svg path,.tribe-editor__settings-dashboard__close-button:hover>svg path{fill:#009fd4}.tribe-editor__settings-dashboard__close-button:disabled:focus>svg,.tribe-editor__settings-dashboard__close-button:disabled:focus>svg path,.tribe-editor__settings-dashboard__close-button:disabled:hover>svg,.tribe-editor__settings-dashboard__close-button:disabled:hover>svg path,.tribe-editor__settings-dashboard__close-button:disabled>svg,.tribe-editor__settings-dashboard__close-button:disabled>svg path{fill:#aeb4bb}.tribe-editor__settings-dashboard__close-button-text{color:#8d949b}.tribe-editor__settings-dashboard__close-button:focus .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:hover .tribe-editor__settings-dashboard__close-button-text{color:#009fd4}.tribe-editor__settings-dashboard__close-button:disabled .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:disabled:focus .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:disabled:hover .tribe-editor__settings-dashboard__close-button-text{color:#aeb4bb}.tribe-editor__settings-dashboard__content{padding:25px 14px}@media (min-width:600px){.tribe-editor__settings-dashboard__header{padding:15px 28px}.tribe-editor__settings-dashboard__content{padding:25px 28px}}
|
9 |
.tribe-editor__warning-button{align-items:center;display:flex}.tribe-editor__warning-button-text{color:#e7563b;font-size:15px;font-weight:700;letter-spacing:.38px;line-height:18px}.tribe-editor__tickets--loading .tribe-editor__warning-button-text{color:#aeb4bb}svg.tribe-editor__warning-button-icon{fill:#e7563b;height:17px;margin-right:5px;width:17px}.tribe-editor__tickets--loading svg.tribe-editor__warning-button-icon{fill:#aeb4bb}
|
10 |
.tribe-editor__rsvp-container-header__counters{flex:none;display:flex}.tribe-editor__rsvp-container-header__going-counter,.tribe-editor__rsvp-container-header__not-going-counter{flex:none}.tribe-editor__rsvp-container-header__going-counter{margin-right:25px}.tribe-editor__rsvp-container-header__going-counter:last-child{margin-right:0}
|
11 |
-
.tribe-editor__rsvp .tribe-editor__container-panel__header{display:flex;align-items:center}.tribe-editor__rsvp-container-header__header-details{flex:auto}.tribe-editor__rsvp .tribe-editor__rsvp-container .tribe-editor__rsvp-container-header__title{color:#141827;margin:0;padding-top:3px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__rsvp .tribe-editor__rsvp-container .tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-container-header__title{color:#aeb4bb}.tribe-editor__rsvp-container-header__title-input-wrapper{display:flex}.tribe-editor__rsvp-container-header__title-input-wrapper svg{flex:none;margin:6px 0 0 10px;fill:#8d949b}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input{
|
12 |
.tribe-editor__rsvp-duration__duration-label{flex:none;position:relative;width:95px;z-index:1}.tribe-editor__rsvp-duration__duration-label .tribe-editor__labeled-item__label{color:#545d66;font-size:15px;font-weight:700;letter-spacing:.38px;line-height:18px}.tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-duration__duration-label .tribe-editor__labeled-item__label{color:#aeb4bb}.tribe-editor__rsvp-duration__duration-label .tribe-editor__label-with-tooltip__tooltip-label{margin-left:5px}svg.tribe-editor__rsvp-duration__duration-tooltip-label{width:17px;height:17px;fill:#a2aab2}.tribe-editor__rsvp-container--disabled svg.tribe-editor__rsvp-duration__duration-tooltip-label{fill:#aeb4bb}
|
13 |
.tribe-editor__rsvp-duration__duration-picker{flex:1;margin-left:-42px}.tribe-editor__rsvp-container--disabled .tribe-editor__date-time-range-picker .tribe-editor__date-time-range-picker__separator{color:#aeb4bb}
|
14 |
.tribe-editor__rsvp-duration{align-items:flex-start;display:flex;flex-wrap:wrap}.tribe-editor__rsvp-duration .tribe-editor__timepicker-label-container{border-width:1px;border-color:#e1e3e6}.tribe-editor__rsvp-duration .tribe-editor__timepicker-label-container .tribe-editor__btn-input{padding-top:11px;padding-bottom:10px;font-size:14px}.tribe-editor__rsvp-duration__error{color:red;flex:none;font-size:15px;line-height:18px;margin-top:10px;padding-left:108px;width:100%}
|
@@ -31,8 +31,7 @@
|
|
31 |
.tribe-editor__tickets-controls-provider legend{font-weight:700;margin-bottom:10px;padding:0}
|
32 |
.tribe-editor__tickets{font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif}.tribe-editor__tickets .block-list-appender{display:none}.tribe-editor__tickets--loading{display:flex;align-items:center;justify-content:center;padding:20px}.tribe-editor__tickets .components-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);float:none;margin:0;opacity:.8}
|
33 |
.tribe-editor__ticket{margin:-19px 0;border:1px solid #e1e3e6;position:relative;font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif}.tribe-editor__ticket--selected{border:1px solid #b1b5b8}.tribe-editor__ticket .components-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);float:none;margin:0;opacity:.8}
|
34 |
-
.tribe-editor__ticket__container-header-title{display:flex}.tribe-editor__ticket__container-header-title .tribe-editor__ticket__container-header-clipboard-tooltip{flex:none;height:20px;margin:6px 0 0 10px}.tribe-editor__ticket__container-header-title>svg{flex:none;margin:6px 0 0 10px;opacity:0;transition:opacity .2s ease}.is-hovered[data-type="tribe/tickets-item"] .tribe-editor__ticket__container-header-title>svg,.tribe-editor__ticket--selected .tribe-editor__ticket__container-header-title>svg{opacity:1}.tribe-editor__ticket__container-header-title svg{fill:#8d949b}.tribe-editor__ticket .tribe-editor__ticket__container .tribe-editor__ticket__container-header-title-label{flex:none;max-width:calc(100% - 28px);color:#141827;margin:0;padding-top:3px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__ticket .tribe-editor__ticket__container .tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-title-label{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input{
|
35 |
-
/* !important required to override styles from react-input-autosize */display:flex!important;margin:0;padding-top:3px}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input>*{flex:none}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input>input{background-color:transparent;color:#000;margin:0;padding:0;border:none;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input>input:disabled{color:#aeb4bb}
|
36 |
.tribe-editor__ticket__container-header-description{display:block;color:#545d66;padding-top:7px;font-size:12px;line-height:18px;letter-spacing:.04px}.tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-description{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input{display:flex;background-color:transparent;color:#545d66;margin:0;padding:0;border:none;font-size:12px;max-height:108px;line-height:18px;letter-spacing:.04px;width:100%}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:disabled{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:focus,.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:hover{box-shadow:none;outline:none}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input>*{flex:none}
|
37 |
.tribe-editor__ticket__container-header-price{flex:none;min-width:65px;color:#141827;margin:0 20px 0 15px;padding-bottom:5px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px;text-align:center}.tribe-editor__ticket--selected .tribe-editor__ticket__container-header-price{margin-right:118px}.tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-price{color:#aeb4bb}.tribe-editor__ticket__container-header-price-input>input[type=number]{background-color:transparent;color:#141827;margin:0;padding:0;border:none;font-family:inherit;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__ticket__container-header-price-input>input[type=number]:disabled{color:#aeb4bb}
|
38 |
.tribe-editor__quantity-bar{border:1px solid #e1e3e6;position:relative;height:10px;margin:5px 0}.tribe-editor__quantity-bar__bar--capacity,.tribe-editor__quantity-bar__bar--shared-sold,.tribe-editor__quantity-bar__bar--sold{position:absolute;left:0;top:0;bottom:0}.tribe-editor__quantity-bar__bar--capacity{z-index:3}.tribe-editor__quantity-bar__bar--capacity:after{width:1px;content:"";height:20px;position:absolute;background-color:#009fd4;right:0;top:-5px}.tribe-editor__quantity-bar__bar--sold{background-color:#009fd4;z-index:2}.tribe-editor__quantity-bar__bar--shared-sold{background-color:#c9ebf7;z-index:1}.tribe-editor__quantity-bar__bar-label{position:absolute;right:0;bottom:-20px;transform:translateX(50%);font-size:12px;line-height:1;color:#545d66}
|
8 |
.tribe-editor__settings-dashboard{background-color:#f8f9fb;position:relative}.tribe-editor__settings-dashboard__header{display:flex;justify-content:space-between;align-items:center;padding:15px 14px;height:68px}.tribe-editor__settings-dashboard .tribe-editor__settings-dashboard__close-button,.tribe-editor__settings-dashboard__header-left{flex:none;display:flex;align-items:center;font-size:15px;line-height:18px;letter-spacing:.38px}.tribe-editor__settings-dashboard__header-left>svg{fill:#009fd4;margin-right:6px}.tribe-editor__settings-dashboard__header-left>svg path{fill:#009fd4}.tribe-editor__settings-dashboard__header-left-text{color:#141827}.tribe-editor__settings-dashboard__close-button>svg{fill:#a2aab2;margin-right:6px}.tribe-editor__settings-dashboard__close-button>svg path{fill:#a2aab2}.tribe-editor__settings-dashboard__close-button:focus>svg,.tribe-editor__settings-dashboard__close-button:hover>svg{fill:#009fd4;margin-right:6px}.tribe-editor__settings-dashboard__close-button:focus>svg path,.tribe-editor__settings-dashboard__close-button:hover>svg path{fill:#009fd4}.tribe-editor__settings-dashboard__close-button:disabled:focus>svg,.tribe-editor__settings-dashboard__close-button:disabled:focus>svg path,.tribe-editor__settings-dashboard__close-button:disabled:hover>svg,.tribe-editor__settings-dashboard__close-button:disabled:hover>svg path,.tribe-editor__settings-dashboard__close-button:disabled>svg,.tribe-editor__settings-dashboard__close-button:disabled>svg path{fill:#aeb4bb}.tribe-editor__settings-dashboard__close-button-text{color:#8d949b}.tribe-editor__settings-dashboard__close-button:focus .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:hover .tribe-editor__settings-dashboard__close-button-text{color:#009fd4}.tribe-editor__settings-dashboard__close-button:disabled .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:disabled:focus .tribe-editor__settings-dashboard__close-button-text,.tribe-editor__settings-dashboard__close-button:disabled:hover .tribe-editor__settings-dashboard__close-button-text{color:#aeb4bb}.tribe-editor__settings-dashboard__content{padding:25px 14px}@media (min-width:600px){.tribe-editor__settings-dashboard__header{padding:15px 28px}.tribe-editor__settings-dashboard__content{padding:25px 28px}}
|
9 |
.tribe-editor__warning-button{align-items:center;display:flex}.tribe-editor__warning-button-text{color:#e7563b;font-size:15px;font-weight:700;letter-spacing:.38px;line-height:18px}.tribe-editor__tickets--loading .tribe-editor__warning-button-text{color:#aeb4bb}svg.tribe-editor__warning-button-icon{fill:#e7563b;height:17px;margin-right:5px;width:17px}.tribe-editor__tickets--loading svg.tribe-editor__warning-button-icon{fill:#aeb4bb}
|
10 |
.tribe-editor__rsvp-container-header__counters{flex:none;display:flex}.tribe-editor__rsvp-container-header__going-counter,.tribe-editor__rsvp-container-header__not-going-counter{flex:none}.tribe-editor__rsvp-container-header__going-counter{margin-right:25px}.tribe-editor__rsvp-container-header__going-counter:last-child{margin-right:0}
|
11 |
+
.tribe-editor__rsvp .tribe-editor__container-panel__header{display:flex;align-items:center}.tribe-editor__rsvp-container-header__header-details{flex:auto}.tribe-editor__rsvp .tribe-editor__rsvp-container .tribe-editor__rsvp-container-header__title{color:#141827;margin:0;padding-top:3px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__rsvp .tribe-editor__rsvp-container .tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-container-header__title{color:#aeb4bb}.tribe-editor__rsvp-container-header__title-input-wrapper{align-items:baseline;display:flex}.tribe-editor__rsvp-container-header__title-input-wrapper svg{flex:none;margin:6px 0 0 10px;fill:#8d949b}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input{background-color:transparent;border:none;color:#000;font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif;font-size:21px;font-weight:700;letter-spacing:.16px;line-height:25px;margin:3px 0 0;padding:0;resize:none;width:calc(95% - 26px)}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:focus,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:hover{background-color:#fff}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:disabled,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:disabled:focus,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:disabled:hover{background-color:transparent;color:#aeb4bb}.tribe-editor__rsvp-container-header__description{display:block;color:#545d66;padding-top:7px;font-size:12px;line-height:18px;letter-spacing:.04px}.tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-container-header__description{color:#aeb4bb}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input{display:flex;width:95%;background-color:transparent;color:#5d5d5d;margin:0;padding:0;border:none;font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif;font-size:12px;line-height:18px;letter-spacing:.04px;max-height:108px}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:focus,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:hover{background-color:transparent;box-shadow:none}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:disabled,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:disabled:focus,.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:disabled:hover{background-color:transparent;color:#aeb4bb}.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input>*{flex:none}.tribe-editor__rsvp-container-header__capacity-label{display:flex;color:#545d66;padding-top:15px;line-height:18px}.tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-container-header__capacity-label{color:#aeb4bb}.tribe-editor__rsvp-container-header__capacity-label .tribe-editor__numeric-label--count{flex:none;font-weight:700;font-size:18px;letter-spacing:.05px}.tribe-editor__rsvp-container-header__capacity-label .tribe-editor__numeric-label--after{flex:none;margin-left:2px;font-size:12px;letter-spacing:.04px;white-space:pre}.tribe-editor__rsvp-container-header__capacity-label-fallback{display:block;font-size:12px;line-height:18px;letter-spacing:.04px;color:#545d66;padding-top:15px}.tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-container-header__capacity-label-fallback{color:#aeb4bb}
|
12 |
.tribe-editor__rsvp-duration__duration-label{flex:none;position:relative;width:95px;z-index:1}.tribe-editor__rsvp-duration__duration-label .tribe-editor__labeled-item__label{color:#545d66;font-size:15px;font-weight:700;letter-spacing:.38px;line-height:18px}.tribe-editor__rsvp-container--disabled .tribe-editor__rsvp-duration__duration-label .tribe-editor__labeled-item__label{color:#aeb4bb}.tribe-editor__rsvp-duration__duration-label .tribe-editor__label-with-tooltip__tooltip-label{margin-left:5px}svg.tribe-editor__rsvp-duration__duration-tooltip-label{width:17px;height:17px;fill:#a2aab2}.tribe-editor__rsvp-container--disabled svg.tribe-editor__rsvp-duration__duration-tooltip-label{fill:#aeb4bb}
|
13 |
.tribe-editor__rsvp-duration__duration-picker{flex:1;margin-left:-42px}.tribe-editor__rsvp-container--disabled .tribe-editor__date-time-range-picker .tribe-editor__date-time-range-picker__separator{color:#aeb4bb}
|
14 |
.tribe-editor__rsvp-duration{align-items:flex-start;display:flex;flex-wrap:wrap}.tribe-editor__rsvp-duration .tribe-editor__timepicker-label-container{border-width:1px;border-color:#e1e3e6}.tribe-editor__rsvp-duration .tribe-editor__timepicker-label-container .tribe-editor__btn-input{padding-top:11px;padding-bottom:10px;font-size:14px}.tribe-editor__rsvp-duration__error{color:red;flex:none;font-size:15px;line-height:18px;margin-top:10px;padding-left:108px;width:100%}
|
31 |
.tribe-editor__tickets-controls-provider legend{font-weight:700;margin-bottom:10px;padding:0}
|
32 |
.tribe-editor__tickets{font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif}.tribe-editor__tickets .block-list-appender{display:none}.tribe-editor__tickets--loading{display:flex;align-items:center;justify-content:center;padding:20px}.tribe-editor__tickets .components-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);float:none;margin:0;opacity:.8}
|
33 |
.tribe-editor__ticket{margin:-19px 0;border:1px solid #e1e3e6;position:relative;font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif}.tribe-editor__ticket--selected{border:1px solid #b1b5b8}.tribe-editor__ticket .components-spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);float:none;margin:0;opacity:.8}
|
34 |
+
.tribe-editor__ticket__container-header-title{align-items:baseline;display:flex}.tribe-editor__ticket__container-header-title .tribe-editor__ticket__container-header-clipboard-tooltip{flex:none;height:20px;margin:6px 0 0 10px}.tribe-editor__ticket__container-header-title>svg{flex:none;margin:6px 0 0 10px;opacity:0;transition:opacity .2s ease}.is-hovered[data-type="tribe/tickets-item"] .tribe-editor__ticket__container-header-title>svg,.tribe-editor__ticket--selected .tribe-editor__ticket__container-header-title>svg{opacity:1}.tribe-editor__ticket__container-header-title svg{fill:#8d949b}.tribe-editor__ticket .tribe-editor__ticket__container .tribe-editor__ticket__container-header-title-label{flex:none;max-width:calc(100% - 28px);color:#141827;margin:0;padding-top:3px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__ticket .tribe-editor__ticket__container .tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-title-label{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input{background-color:transparent;border:none;color:#000;font-size:21px;font-weight:700;letter-spacing:.16px;line-height:25px;margin:3px 0 0;padding:0;resize:none;width:calc(95% - 26px)}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input:focus,.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input:hover{background-color:#fff}.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input:disabled,.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input:disabled:focus,.tribe-editor__ticket .tribe-editor__ticket__container-header-title-input:disabled:hover{background-color:transparent;color:#aeb4bb}
|
|
|
35 |
.tribe-editor__ticket__container-header-description{display:block;color:#545d66;padding-top:7px;font-size:12px;line-height:18px;letter-spacing:.04px}.tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-description{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input{display:flex;background-color:transparent;color:#545d66;margin:0;padding:0;border:none;font-size:12px;max-height:108px;line-height:18px;letter-spacing:.04px;width:100%}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:disabled{color:#aeb4bb}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:focus,.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input:hover{box-shadow:none;outline:none}.tribe-editor__ticket .tribe-editor__ticket__container-header-description-input>*{flex:none}
|
36 |
.tribe-editor__ticket__container-header-price{flex:none;min-width:65px;color:#141827;margin:0 20px 0 15px;padding-bottom:5px;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px;text-align:center}.tribe-editor__ticket--selected .tribe-editor__ticket__container-header-price{margin-right:118px}.tribe-editor__ticket--disabled .tribe-editor__ticket__container-header-price{color:#aeb4bb}.tribe-editor__ticket__container-header-price-input>input[type=number]{background-color:transparent;color:#141827;margin:0;padding:0;border:none;font-family:inherit;font-weight:700;font-size:21px;line-height:25px;letter-spacing:.16px}.tribe-editor__ticket__container-header-price-input>input[type=number]:disabled{color:#aeb4bb}
|
37 |
.tribe-editor__quantity-bar{border:1px solid #e1e3e6;position:relative;height:10px;margin:5px 0}.tribe-editor__quantity-bar__bar--capacity,.tribe-editor__quantity-bar__bar--shared-sold,.tribe-editor__quantity-bar__bar--sold{position:absolute;left:0;top:0;bottom:0}.tribe-editor__quantity-bar__bar--capacity{z-index:3}.tribe-editor__quantity-bar__bar--capacity:after{width:1px;content:"";height:20px;position:absolute;background-color:#009fd4;right:0;top:-5px}.tribe-editor__quantity-bar__bar--sold{background-color:#009fd4;z-index:2}.tribe-editor__quantity-bar__bar--shared-sold{background-color:#c9ebf7;z-index:1}.tribe-editor__quantity-bar__bar-label{position:absolute;right:0;bottom:-20px;transform:translateX(50%);font-size:12px;line-height:1;color:#545d66}
|
src/resources/css/attendees.css
CHANGED
@@ -14,20 +14,20 @@
|
|
14 |
* @since 4.9
|
15 |
*/
|
16 |
.tribe-block__attendees {
|
17 |
-
margin-top: 30px;
|
18 |
margin-bottom: 30px;
|
|
|
19 |
}
|
20 |
.tribe-block__attendees img {
|
21 |
border-radius: 100%;
|
22 |
display: inline-block;
|
23 |
-
width: 60px;
|
24 |
height: 60px;
|
|
|
25 |
}
|
26 |
.tribe-block__attendees__title {
|
27 |
display: block;
|
28 |
-
font-style: normal;
|
29 |
font-family: 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
|
30 |
font-size: 21px;
|
|
|
31 |
font-weight: bold;
|
32 |
line-height: normal;
|
33 |
}
|
14 |
* @since 4.9
|
15 |
*/
|
16 |
.tribe-block__attendees {
|
|
|
17 |
margin-bottom: 30px;
|
18 |
+
margin-top: 30px;
|
19 |
}
|
20 |
.tribe-block__attendees img {
|
21 |
border-radius: 100%;
|
22 |
display: inline-block;
|
|
|
23 |
height: 60px;
|
24 |
+
width: 60px;
|
25 |
}
|
26 |
.tribe-block__attendees__title {
|
27 |
display: block;
|
|
|
28 |
font-family: 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
|
29 |
font-size: 21px;
|
30 |
+
font-style: normal;
|
31 |
font-weight: bold;
|
32 |
line-height: normal;
|
33 |
}
|
src/resources/css/attendees.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.tribe-block__attendees{margin-
|
1 |
+
.tribe-block__attendees{margin-bottom:30px;margin-top:30px}.tribe-block__attendees img{border-radius:100%;display:inline-block;height:60px;width:60px}.tribe-block__attendees__title{display:block;font-family:Helvetica Neue,Helvetica,-apple-system,BlinkMacSystemFont,Roboto,Arial,sans-serif;font-size:21px;font-style:normal;font-weight:700;line-height:normal}
|
src/resources/css/common-responsive.css
CHANGED
@@ -324,12 +324,12 @@
|
|
324 |
.accordion-header {
|
325 |
background: none;
|
326 |
border: 0;
|
|
|
327 |
color: inherit;
|
328 |
cursor: pointer;
|
329 |
font-size: 12px;
|
330 |
font-weight: bold;
|
331 |
padding: 10px 20px;
|
332 |
-
box-sizing: border-box;
|
333 |
position: relative;
|
334 |
text-align: left;
|
335 |
width: 100%;
|
@@ -343,26 +343,26 @@
|
|
343 |
content: '\f132';
|
344 |
font-family: 'dashicons';
|
345 |
font-size: 10px;
|
346 |
-
line-height: 17px;
|
347 |
font-weight: 400;
|
348 |
height: 14px;
|
349 |
left: 0;
|
|
|
350 |
padding: 0;
|
|
|
351 |
position: absolute;
|
|
|
352 |
top: 12px;
|
353 |
width: 15px;
|
354 |
-
text-align: center;
|
355 |
-
padding-right: 1px;
|
356 |
}
|
357 |
|
358 |
.accordion-header:after {
|
359 |
-
content: '';
|
360 |
border-bottom: 1px solid #ddd;
|
|
|
361 |
position: absolute;
|
362 |
right: 0;
|
363 |
-
width: 80%;
|
364 |
top: 50%;
|
365 |
transform: translateY(-50%);
|
|
|
366 |
}
|
367 |
|
368 |
.accordion-header.is-active:before {
|
@@ -378,15 +378,15 @@
|
|
378 |
background: none;
|
379 |
}
|
380 |
|
381 |
-
.tribe-tickets-editor-history
|
382 |
width: calc(100% - 80px);
|
383 |
}
|
384 |
|
385 |
-
.tribe_attendee_meta
|
386 |
width: calc(100% - 170px);
|
387 |
}
|
388 |
|
389 |
-
.tribe_advanced_meta
|
390 |
width: calc(100% - 105px);
|
391 |
}
|
392 |
|
@@ -441,24 +441,24 @@
|
|
441 |
z-index: var(--tec-z-index-spinner-container);
|
442 |
}
|
443 |
|
444 |
-
.tribe-common .tribe-tickets__notice {
|
445 |
-
padding: var(--tec-spacer-3);
|
446 |
background-color: var(--tec-color-background-secondary);
|
447 |
border-radius: var(--tec-border-radius-default);
|
448 |
margin: var(--tec-spacer-4) 0;
|
|
|
449 |
}
|
450 |
|
451 |
-
.tribe-common .tribe-tickets__notice > *:last-child {
|
452 |
-
padding-bottom: 0;
|
453 |
margin-bottom: 0;
|
|
|
454 |
}
|
455 |
|
456 |
-
.tribe-common .tribe-tickets-notice__title {
|
457 |
margin: 0;
|
458 |
position: relative;
|
459 |
}
|
460 |
|
461 |
-
.tribe-common .tribe-tickets-notice__title:empty {
|
462 |
display: none;
|
463 |
}
|
464 |
|
@@ -466,24 +466,21 @@
|
|
466 |
Error Notices
|
467 |
*/
|
468 |
|
469 |
-
.tribe-common .tribe-tickets__notice--error {
|
470 |
background-color: var(--tec-color-background-error);
|
471 |
display: none;
|
472 |
padding-left: 50px;
|
473 |
-
}
|
474 |
-
|
475 |
-
.tribe-common .tribe-tickets__notice--error .tribe-tickets-notice__title {
|
476 |
position: relative;
|
477 |
}
|
478 |
|
479 |
-
.tribe-common .tribe-tickets__notice--error .
|
480 |
-
background-image: url(
|
481 |
background-size: contain;
|
482 |
content: '';
|
483 |
height: var(--tec-spacer-3);
|
484 |
-
left:
|
485 |
position: absolute;
|
486 |
-
top:
|
487 |
width: var(--tec-spacer-3);
|
488 |
}
|
489 |
|
@@ -491,7 +488,7 @@
|
|
491 |
"Barred" Notices (visible side borders)
|
492 |
*/
|
493 |
|
494 |
-
.tribe-common .tribe-tickets__notice--barred {
|
495 |
background-color: var(--tec-color-background);
|
496 |
border: var(--tec-spacer-0) solid var(--tec-color-border-secondary);
|
497 |
border-bottom: 0;
|
@@ -500,12 +497,12 @@
|
|
500 |
padding: 0 var(--tec-spacer-2);
|
501 |
}
|
502 |
|
503 |
-
.tribe-common .tribe-tickets__notice--barred-left {
|
504 |
border-right: 0;
|
505 |
padding: 0 0 0 var(--tec-spacer-2);
|
506 |
}
|
507 |
|
508 |
-
.tribe-common .tribe-tickets__notice--barred-right {
|
509 |
border-left: 0;
|
510 |
padding: 0 var(--tec-spacer-2) 0 0;
|
511 |
}
|
@@ -533,8 +530,8 @@
|
|
533 |
border-radius: var(--tec-border-radius-default);
|
534 |
box-shadow: var(--tec-box-shadow-tooltip);
|
535 |
height: auto !important;
|
536 |
-
padding: var(--tec-spacer-5);
|
537 |
max-width: 254px;
|
|
|
538 |
}
|
539 |
|
540 |
.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box {
|
@@ -720,6 +717,8 @@
|
|
720 |
|
721 |
/* From: base/skeleton/forms/_text.pcss */
|
722 |
|
|
|
|
|
723 |
/* From: base/skeleton/grid/_rows.pcss */
|
724 |
|
725 |
/* -------------------------------------------------------------------------
|
324 |
.accordion-header {
|
325 |
background: none;
|
326 |
border: 0;
|
327 |
+
box-sizing: border-box;
|
328 |
color: inherit;
|
329 |
cursor: pointer;
|
330 |
font-size: 12px;
|
331 |
font-weight: bold;
|
332 |
padding: 10px 20px;
|
|
|
333 |
position: relative;
|
334 |
text-align: left;
|
335 |
width: 100%;
|
343 |
content: '\f132';
|
344 |
font-family: 'dashicons';
|
345 |
font-size: 10px;
|
|
|
346 |
font-weight: 400;
|
347 |
height: 14px;
|
348 |
left: 0;
|
349 |
+
line-height: 17px;
|
350 |
padding: 0;
|
351 |
+
padding-right: 1px;
|
352 |
position: absolute;
|
353 |
+
text-align: center;
|
354 |
top: 12px;
|
355 |
width: 15px;
|
|
|
|
|
356 |
}
|
357 |
|
358 |
.accordion-header:after {
|
|
|
359 |
border-bottom: 1px solid #ddd;
|
360 |
+
content: '';
|
361 |
position: absolute;
|
362 |
right: 0;
|
|
|
363 |
top: 50%;
|
364 |
transform: translateY(-50%);
|
365 |
+
width: 80%;
|
366 |
}
|
367 |
|
368 |
.accordion-header.is-active:before {
|
378 |
background: none;
|
379 |
}
|
380 |
|
381 |
+
.tribe-tickets-editor-history:after {
|
382 |
width: calc(100% - 80px);
|
383 |
}
|
384 |
|
385 |
+
.tribe_attendee_meta:after {
|
386 |
width: calc(100% - 170px);
|
387 |
}
|
388 |
|
389 |
+
.tribe_advanced_meta:after {
|
390 |
width: calc(100% - 105px);
|
391 |
}
|
392 |
|
441 |
z-index: var(--tec-z-index-spinner-container);
|
442 |
}
|
443 |
|
444 |
+
.tribe-common .tribe-tickets__notice, .event-tickets .tribe-tickets__notice {
|
|
|
445 |
background-color: var(--tec-color-background-secondary);
|
446 |
border-radius: var(--tec-border-radius-default);
|
447 |
margin: var(--tec-spacer-4) 0;
|
448 |
+
padding: var(--tec-spacer-3);
|
449 |
}
|
450 |
|
451 |
+
.tribe-common .tribe-tickets__notice > *:last-child, .event-tickets .tribe-tickets__notice > *:last-child {
|
|
|
452 |
margin-bottom: 0;
|
453 |
+
padding-bottom: 0;
|
454 |
}
|
455 |
|
456 |
+
.tribe-common .tribe-tickets-notice__title, .event-tickets .tribe-tickets-notice__title {
|
457 |
margin: 0;
|
458 |
position: relative;
|
459 |
}
|
460 |
|
461 |
+
.tribe-common .tribe-tickets-notice__title:empty, .event-tickets .tribe-tickets-notice__title:empty {
|
462 |
display: none;
|
463 |
}
|
464 |
|
466 |
Error Notices
|
467 |
*/
|
468 |
|
469 |
+
.tribe-common .tribe-tickets__notice--error, .event-tickets .tribe-tickets__notice--error {
|
470 |
background-color: var(--tec-color-background-error);
|
471 |
display: none;
|
472 |
padding-left: 50px;
|
|
|
|
|
|
|
473 |
position: relative;
|
474 |
}
|
475 |
|
476 |
+
.tribe-common .tribe-tickets__notice--error:before, .event-tickets .tribe-tickets__notice--error:before {
|
477 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");
|
478 |
background-size: contain;
|
479 |
content: '';
|
480 |
height: var(--tec-spacer-3);
|
481 |
+
left: var(--tec-spacer-4);
|
482 |
position: absolute;
|
483 |
+
top: var(--tec-spacer-4);
|
484 |
width: var(--tec-spacer-3);
|
485 |
}
|
486 |
|
488 |
"Barred" Notices (visible side borders)
|
489 |
*/
|
490 |
|
491 |
+
.tribe-common .tribe-tickets__notice--barred, .event-tickets .tribe-tickets__notice--barred {
|
492 |
background-color: var(--tec-color-background);
|
493 |
border: var(--tec-spacer-0) solid var(--tec-color-border-secondary);
|
494 |
border-bottom: 0;
|
497 |
padding: 0 var(--tec-spacer-2);
|
498 |
}
|
499 |
|
500 |
+
.tribe-common .tribe-tickets__notice--barred-left, .event-tickets .tribe-tickets__notice--barred-left {
|
501 |
border-right: 0;
|
502 |
padding: 0 0 0 var(--tec-spacer-2);
|
503 |
}
|
504 |
|
505 |
+
.tribe-common .tribe-tickets__notice--barred-right, .event-tickets .tribe-tickets__notice--barred-right {
|
506 |
border-left: 0;
|
507 |
padding: 0 var(--tec-spacer-2) 0 0;
|
508 |
}
|
530 |
border-radius: var(--tec-border-radius-default);
|
531 |
box-shadow: var(--tec-box-shadow-tooltip);
|
532 |
height: auto !important;
|
|
|
533 |
max-width: 254px;
|
534 |
+
padding: var(--tec-spacer-5);
|
535 |
}
|
536 |
|
537 |
.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box {
|
717 |
|
718 |
/* From: base/skeleton/forms/_text.pcss */
|
719 |
|
720 |
+
/* stylelint-disable-line no-duplicate-selectors */
|
721 |
+
|
722 |
/* From: base/skeleton/grid/_rows.pcss */
|
723 |
|
724 |
/* -------------------------------------------------------------------------
|
src/resources/css/common-responsive.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.accordion-header{background:none;border:0;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;box-sizing:border-box;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;line-height:17px;font-weight:400;height:14px;left:0;padding:0;position:absolute;top:12px;width:15px;text-align:center;padding-right:1px}.accordion-header:after{content:"";border-bottom:1px solid #ddd;position:absolute;right:0;width:80%;top:50%;transform:translateY(-50%)}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common .tribe-tickets__notice{padding:var(--tec-spacer-3);background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0}.tribe-common .tribe-tickets__notice>:last-child{padding-bottom:0;margin-bottom:0}.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.tribe-common .tribe-tickets-notice__title:empty{display:none}.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px}.tribe-common .tribe-tickets__notice--error .tribe-tickets-notice__title{position:relative}.tribe-common .tribe-tickets__notice--error .tribe-tickets-notice__title:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:calc(var(--tec-spacer-7)*-1);position:absolute;top:2px;width:var(--tec-spacer-3)}.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;padding:var(--tec-spacer-5);max-width:254px}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.tribe-theme-twentytwenty .event-tickets{background-color:transparent}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}.event-tickets .tribe-common-form-control-text__input{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0}.event-tickets .tribe-common-b1{font-size:var(--tec-font-size-3);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-b2{font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-b3{font-size:var(--tec-font-size-1);line-height:var(--tec-line-height-0)}.event-tickets .tribe-common-h1{font-size:var(--tec-font-size-10);line-height:var(--tec-line-height-0)}.event-tickets .tribe-common-h2{font-size:var(--tec-font-size-9);line-height:var(--tec-line-height-0)}.event-tickets .tribe-common-h3{font-size:var(--tec-font-size-8);line-height:var(--tec-line-height-1)}.event-tickets .tribe-common-h4{font-size:var(--tec-font-size-7);line-height:var(--tec-line-height-1)}.event-tickets .tribe-common-b1--min-medium,.event-tickets .tribe-common-h6{font-size:var(--tec-font-size-3);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-b2--min-medium{font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-b3--min-medium{font-size:var(--tec-font-size-1);line-height:var(--tec-line-height-0)}.event-tickets .tribe-common-h3--min-medium{font-size:var(--tec-font-size-8);line-height:var(--tec-line-height-1)}.event-tickets .tribe-common-h4--min-medium{font-size:var(--tec-font-size-7);line-height:var(--tec-line-height-1)}.event-tickets .tribe-common-h5--min-medium{font-size:var(--tec-font-size-4);line-height:var(--tec-line-height-2)}.event-tickets .tribe-common-h6--min-medium{font-size:var(--tec-font-size-3);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-h7--min-medium{font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-form-control-text__input{padding:var(--tec-spacer-4) var(--tec-spacer-4) var(--tec-spacer-4) var(--tec-spacer-8)}.event-tickets .tribe-common-g-row--gutters{margin-left:var(--tec-grid-gutter-half-negative);margin-right:var(--tec-grid-gutter-half-negative)}.event-tickets .tribe-common-g-row--gutters>.tribe-common-g-col{padding-left:var(--tec-grid-gutter-half);padding-right:var(--tec-grid-gutter-half)}}
|
1 |
+
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.tribe-theme-twentytwenty .event-tickets{background-color:transparent}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}.event-tickets .tribe-common-form-control-text__input{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0}.event-tickets .tribe-common-b1{font-size:var(--tec-font-size-3);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-b2{font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-b3{font-size:var(--tec-font-size-1);line-height:var(--tec-line-height-0)}.event-tickets .tribe-common-h1{font-size:var(--tec-font-size-10);line-height:var(--tec-line-height-0)}.event-tickets .tribe-common-h2{font-size:var(--tec-font-size-9);line-height:var(--tec-line-height-0)}.event-tickets .tribe-common-h3{font-size:var(--tec-font-size-8);line-height:var(--tec-line-height-1)}.event-tickets .tribe-common-h4{font-size:var(--tec-font-size-7);line-height:var(--tec-line-height-1)}.event-tickets .tribe-common-b1--min-medium,.event-tickets .tribe-common-h6{font-size:var(--tec-font-size-3);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-b2--min-medium{font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-b3--min-medium{font-size:var(--tec-font-size-1);line-height:var(--tec-line-height-0)}.event-tickets .tribe-common-h3--min-medium{font-size:var(--tec-font-size-8);line-height:var(--tec-line-height-1)}.event-tickets .tribe-common-h4--min-medium{font-size:var(--tec-font-size-7);line-height:var(--tec-line-height-1)}.event-tickets .tribe-common-h5--min-medium{font-size:var(--tec-font-size-4);line-height:var(--tec-line-height-2)}.event-tickets .tribe-common-h6--min-medium{font-size:var(--tec-font-size-3);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-h7--min-medium{font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3)}.event-tickets .tribe-common-form-control-text__input{padding:var(--tec-spacer-4) var(--tec-spacer-4) var(--tec-spacer-4) var(--tec-spacer-8)}.event-tickets .tribe-common-g-row--gutters{margin-left:var(--tec-grid-gutter-half-negative);margin-right:var(--tec-grid-gutter-half-negative)}.event-tickets .tribe-common-g-row--gutters>.tribe-common-g-col{padding-left:var(--tec-grid-gutter-half);padding-right:var(--tec-grid-gutter-half)}}
|
src/resources/css/details.css
CHANGED
@@ -11,13 +11,17 @@
|
|
11 |
.tribe__details__poly .tribe__details__summary:before {
|
12 |
content: '\25bc';
|
13 |
}
|
|
|
14 |
.tribe__details__poly .tribe__details__content {
|
15 |
display: none;
|
16 |
}
|
|
|
17 |
.tribe__details__poly.tribe__details--open .tribe__details__content {
|
18 |
display: block;
|
19 |
}
|
|
|
20 |
@media (min-width: 768px) {
|
|
|
21 |
.tribe__details__poly .tribe__details__poly.tribe__details--mobile .tribe__details__summary {
|
22 |
display: none;
|
23 |
}
|
11 |
.tribe__details__poly .tribe__details__summary:before {
|
12 |
content: '\25bc';
|
13 |
}
|
14 |
+
|
15 |
.tribe__details__poly .tribe__details__content {
|
16 |
display: none;
|
17 |
}
|
18 |
+
|
19 |
.tribe__details__poly.tribe__details--open .tribe__details__content {
|
20 |
display: block;
|
21 |
}
|
22 |
+
|
23 |
@media (min-width: 768px) {
|
24 |
+
|
25 |
.tribe__details__poly .tribe__details__poly.tribe__details--mobile .tribe__details__summary {
|
26 |
display: none;
|
27 |
}
|
src/resources/css/freemius.css
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
*/
|
10 |
|
11 |
.events-cal #fs_connect, .toplevel_page_tribe-common #fs_connect, .toplevel_page_tribe-help #fs_connect, .toplevel_page_tribe-app-shop #fs_connect {
|
12 |
-
background-color: #
|
13 |
margin: 20px 20px 0 2px;
|
14 |
max-width: 1200px;
|
15 |
position: relative;
|
@@ -78,7 +78,7 @@
|
|
78 |
}
|
79 |
|
80 |
.events-cal #fs_connect .fs-visual .fs-site-icon:before, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon:before, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon:before, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon:before {
|
81 |
-
background-image: url(
|
82 |
background-position: center center;
|
83 |
background-repeat: no-repeat;
|
84 |
background-size: 85%;
|
@@ -94,7 +94,7 @@
|
|
94 |
}
|
95 |
|
96 |
.events-cal #fs_connect .fs-visual .fs-plugin-icon:before, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon:before, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon:before, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon:before {
|
97 |
-
background-image: url(
|
98 |
background-position: center center;
|
99 |
background-repeat: no-repeat;
|
100 |
background-size: 75%;
|
@@ -106,12 +106,11 @@
|
|
106 |
}
|
107 |
|
108 |
.events-cal #fs_connect .fs-visual .fs-connect-logo, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-connect-logo, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-connect-logo, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-connect-logo {
|
109 |
-
background-image: url(
|
110 |
background-position: center center;
|
111 |
background-repeat: no-repeat;
|
112 |
background-size: 80%;
|
113 |
box-sizing: border-box;
|
114 |
-
-moz-box-sizing: border-box;
|
115 |
display: block;
|
116 |
height: 80px;
|
117 |
padding-left: 60px;
|
@@ -143,7 +142,7 @@
|
|
143 |
}
|
144 |
|
145 |
.events-cal #fs_connect .fs-content .tribe-powered-by-freemius, .toplevel_page_tribe-common #fs_connect .fs-content .tribe-powered-by-freemius, .toplevel_page_tribe-help #fs_connect .fs-content .tribe-powered-by-freemius, .toplevel_page_tribe-app-shop #fs_connect .fs-content .tribe-powered-by-freemius {
|
146 |
-
background-image: url(
|
147 |
background-position: right center;
|
148 |
background-repeat: no-repeat;
|
149 |
background-size: 100px;
|
@@ -198,9 +197,7 @@
|
|
198 |
}
|
199 |
|
200 |
.events-cal #fs_connect .fs-permissions.fs-open, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open {
|
201 |
-
box-shadow:
|
202 |
-
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
203 |
-
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
204 |
padding: 20px 35px;
|
205 |
position: absolute;
|
206 |
}
|
@@ -216,7 +213,7 @@
|
|
216 |
padding-bottom: 10px;
|
217 |
}
|
218 |
|
219 |
-
.events-cal #fs_connect .fs-permissions.fs-open ul li .dashicons, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul li .dashicons, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul li .dashicons, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul li .dashicons {
|
220 |
padding-right: 15px;
|
221 |
}
|
222 |
|
@@ -226,20 +223,20 @@
|
|
226 |
background-size: 65%;
|
227 |
}
|
228 |
|
229 |
-
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons:before, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons:before, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons:before, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons:before {
|
230 |
content: '';
|
231 |
}
|
232 |
|
233 |
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users {
|
234 |
-
background-image: url(
|
235 |
}
|
236 |
|
237 |
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings {
|
238 |
-
background-image: url(
|
239 |
}
|
240 |
|
241 |
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial {
|
242 |
-
background-image: url(
|
243 |
}
|
244 |
|
245 |
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,
|
@@ -250,7 +247,7 @@
|
|
250 |
.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-menu,
|
251 |
.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,
|
252 |
.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-menu {
|
253 |
-
background-image: url(
|
254 |
}
|
255 |
|
256 |
.events-cal #fs_connect .fs-terms, .toplevel_page_tribe-common #fs_connect .fs-terms, .toplevel_page_tribe-help #fs_connect .fs-terms, .toplevel_page_tribe-app-shop #fs_connect .fs-terms {
|
9 |
*/
|
10 |
|
11 |
.events-cal #fs_connect, .toplevel_page_tribe-common #fs_connect, .toplevel_page_tribe-help #fs_connect, .toplevel_page_tribe-app-shop #fs_connect {
|
12 |
+
background-color: #fff;
|
13 |
margin: 20px 20px 0 2px;
|
14 |
max-width: 1200px;
|
15 |
position: relative;
|
78 |
}
|
79 |
|
80 |
.events-cal #fs_connect .fs-visual .fs-site-icon:before, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon:before, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon:before, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon:before {
|
81 |
+
background-image: url('../images/event-tickets.svg');
|
82 |
background-position: center center;
|
83 |
background-repeat: no-repeat;
|
84 |
background-size: 85%;
|
94 |
}
|
95 |
|
96 |
.events-cal #fs_connect .fs-visual .fs-plugin-icon:before, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon:before, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon:before, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon:before {
|
97 |
+
background-image: url('../icons/stethoscope.svg');
|
98 |
background-position: center center;
|
99 |
background-repeat: no-repeat;
|
100 |
background-size: 75%;
|
106 |
}
|
107 |
|
108 |
.events-cal #fs_connect .fs-visual .fs-connect-logo, .toplevel_page_tribe-common #fs_connect .fs-visual .fs-connect-logo, .toplevel_page_tribe-help #fs_connect .fs-visual .fs-connect-logo, .toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-connect-logo {
|
109 |
+
background-image: url('../icons/mailplane.svg');
|
110 |
background-position: center center;
|
111 |
background-repeat: no-repeat;
|
112 |
background-size: 80%;
|
113 |
box-sizing: border-box;
|
|
|
114 |
display: block;
|
115 |
height: 80px;
|
116 |
padding-left: 60px;
|
142 |
}
|
143 |
|
144 |
.events-cal #fs_connect .fs-content .tribe-powered-by-freemius, .toplevel_page_tribe-common #fs_connect .fs-content .tribe-powered-by-freemius, .toplevel_page_tribe-help #fs_connect .fs-content .tribe-powered-by-freemius, .toplevel_page_tribe-app-shop #fs_connect .fs-content .tribe-powered-by-freemius {
|
145 |
+
background-image: url('../icons/freemius-logo.svg');
|
146 |
background-position: right center;
|
147 |
background-repeat: no-repeat;
|
148 |
background-size: 100px;
|
197 |
}
|
198 |
|
199 |
.events-cal #fs_connect .fs-permissions.fs-open, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open {
|
200 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
|
|
|
201 |
padding: 20px 35px;
|
202 |
position: absolute;
|
203 |
}
|
213 |
padding-bottom: 10px;
|
214 |
}
|
215 |
|
216 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul li .dashicons, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul li .dashicons, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul li .dashicons, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul li .dashicons { /* stylelint-disable-line max-nesting-depth */
|
217 |
padding-right: 15px;
|
218 |
}
|
219 |
|
223 |
background-size: 65%;
|
224 |
}
|
225 |
|
226 |
+
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons:before, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons:before, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons:before, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons:before { /* stylelint-disable-line max-nesting-depth */
|
227 |
content: '';
|
228 |
}
|
229 |
|
230 |
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users {
|
231 |
+
background-image: url('../icons/user.svg');
|
232 |
}
|
233 |
|
234 |
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings {
|
235 |
+
background-image: url('../icons/settings.svg');
|
236 |
}
|
237 |
|
238 |
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial, .toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial, .toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial, .toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial {
|
239 |
+
background-image: url('../icons/megaphone.svg');
|
240 |
}
|
241 |
|
242 |
.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,
|
247 |
.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-menu,
|
248 |
.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,
|
249 |
.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-menu {
|
250 |
+
background-image: url('../icons/plug.svg');
|
251 |
}
|
252 |
|
253 |
.events-cal #fs_connect .fs-terms, .toplevel_page_tribe-common #fs_connect .fs-terms, .toplevel_page_tribe-help #fs_connect .fs-terms, .toplevel_page_tribe-app-shop #fs_connect .fs-terms {
|
src/resources/css/freemius.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.events-cal #fs_connect,.toplevel_page_tribe-app-shop #fs_connect,.toplevel_page_tribe-common #fs_connect,.toplevel_page_tribe-help #fs_connect{background-color:#fff;margin:20px 20px 0 2px;max-width:1200px;position:relative;width:auto}.events-cal #fs_connect .fs-visual,.toplevel_page_tribe-app-shop #fs_connect .fs-visual,.toplevel_page_tribe-common #fs_connect .fs-visual,.toplevel_page_tribe-help #fs_connect .fs-visual{align-content:center;align-items:center;background-color:transparent;display:flex;margin:0 35px;padding:20px 0 0}.events-cal #fs_connect .fs-visual .fs-connect-logo,.events-cal #fs_connect .fs-visual .fs-first.dashicons-plus,.events-cal #fs_connect .fs-visual .fs-plugin-icon,.events-cal #fs_connect .fs-visual .fs-second.dashicons-plus,.events-cal #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-first.dashicons-plus,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-second.dashicons-plus,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-first.dashicons-plus,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-second.dashicons-plus,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-first.dashicons-plus,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-second.dashicons-plus,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon{border:0;bottom:auto;left:auto;margin:0;position:relative;right:auto;top:auto;width:auto}.events-cal #fs_connect .fs-visual .fs-plugin-icon,.events-cal #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon{width:60px}.events-cal #fs_connect .fs-visual .dashicons-plus,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .dashicons-plus,.toplevel_page_tribe-common #fs_connect .fs-visual .dashicons-plus,.toplevel_page_tribe-help #fs_connect .fs-visual .dashicons-plus{color:#17a0d6;padding-left:4px;padding-right:4px;width:auto}.events-cal #fs_connect .fs-visual .fs-site-icon .dashicons,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon .dashicons,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon .dashicons,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon .dashicons{visibility:hidden}.events-cal #fs_connect .fs-visual .fs-site-icon:before,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon:before,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon:before,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon:before{background-image:url(../images/event-tickets.svg);background-position:50%;background-repeat:no-repeat;background-size:85%;content:"";display:block;height:100%;position:absolute;width:100%}.events-cal #fs_connect .fs-visual .fs-plugin-icon img,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon img,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon img,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon img{visibility:hidden}.events-cal #fs_connect .fs-visual .fs-plugin-icon:before,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon:before,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon:before,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon:before{background-image:url(../icons/stethoscope.svg);background-position:50%;background-repeat:no-repeat;background-size:75%;content:"";display:block;height:100%;position:absolute;width:100%}.events-cal #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-connect-logo{background-image:url(../icons/mailplane.svg);background-position:50%;background-repeat:no-repeat;background-size:80%;box-sizing:border-box;-moz-box-sizing:border-box;display:block;height:80px;padding-left:60px;width:60px}.events-cal #fs_connect .fs-content,.toplevel_page_tribe-app-shop #fs_connect .fs-content,.toplevel_page_tribe-common #fs_connect .fs-content,.toplevel_page_tribe-help #fs_connect .fs-content{padding:20px 35px}.events-cal #fs_connect .fs-content h3,.toplevel_page_tribe-app-shop #fs_connect .fs-content h3,.toplevel_page_tribe-common #fs_connect .fs-content h3,.toplevel_page_tribe-help #fs_connect .fs-content h3{font-size:1.7em;margin-top:0}.events-cal #fs_connect .fs-content p,.toplevel_page_tribe-app-shop #fs_connect .fs-content p,.toplevel_page_tribe-common #fs_connect .fs-content p,.toplevel_page_tribe-help #fs_connect .fs-content p{margin-bottom:20px}.events-cal #fs_connect .fs-content p:first-child,.events-cal #fs_connect .fs-content p:last-child,.toplevel_page_tribe-app-shop #fs_connect .fs-content p:first-child,.toplevel_page_tribe-app-shop #fs_connect .fs-content p:last-child,.toplevel_page_tribe-common #fs_connect .fs-content p:first-child,.toplevel_page_tribe-common #fs_connect .fs-content p:last-child,.toplevel_page_tribe-help #fs_connect .fs-content p:first-child,.toplevel_page_tribe-help #fs_connect .fs-content p:last-child{margin-bottom:0}.events-cal #fs_connect .fs-content .tribe-powered-by-freemius,.toplevel_page_tribe-app-shop #fs_connect .fs-content .tribe-powered-by-freemius,.toplevel_page_tribe-common #fs_connect .fs-content .tribe-powered-by-freemius,.toplevel_page_tribe-help #fs_connect .fs-content .tribe-powered-by-freemius{background-image:url(../icons/freemius-logo.svg);background-position:100%;background-repeat:no-repeat;background-size:100px;font-size:1.1em;font-style:italic;height:30px;line-height:30px;position:absolute;right:45px;top:25px;width:184px}.events-cal #fs_connect .fs-actions,.toplevel_page_tribe-app-shop #fs_connect .fs-actions,.toplevel_page_tribe-common #fs_connect .fs-actions,.toplevel_page_tribe-help #fs_connect .fs-actions{background-color:#f3f3f3;display:flex;flex-flow:row wrap;padding:20px 35px}.events-cal #fs_connect .fs-actions form,.toplevel_page_tribe-app-shop #fs_connect .fs-actions form,.toplevel_page_tribe-common #fs_connect .fs-actions form,.toplevel_page_tribe-help #fs_connect .fs-actions form{float:none;margin-right:15px;order:1}.events-cal #fs_connect .fs-actions #skip_activation,.toplevel_page_tribe-app-shop #fs_connect .fs-actions #skip_activation,.toplevel_page_tribe-common #fs_connect .fs-actions #skip_activation,.toplevel_page_tribe-help #fs_connect .fs-actions #skip_activation{float:none;order:2}.events-cal #fs_connect .fs-actions .button,.toplevel_page_tribe-app-shop #fs_connect .fs-actions .button,.toplevel_page_tribe-common #fs_connect .fs-actions .button,.toplevel_page_tribe-help #fs_connect .fs-actions .button{height:auto;padding:7px 35px}.events-cal #fs_connect .fs-actions .button.button-primary,.toplevel_page_tribe-app-shop #fs_connect .fs-actions .button.button-primary,.toplevel_page_tribe-common #fs_connect .fs-actions .button.button-primary,.toplevel_page_tribe-help #fs_connect .fs-actions .button.button-primary{padding-left:35px;padding-right:35px}.events-cal #fs_connect .fs-permissions,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions,.toplevel_page_tribe-common #fs_connect .fs-permissions,.toplevel_page_tribe-help #fs_connect .fs-permissions{padding:0;position:relative}.events-cal #fs_connect .fs-permissions .fs-trigger,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions .fs-trigger,.toplevel_page_tribe-common #fs_connect .fs-permissions .fs-trigger,.toplevel_page_tribe-help #fs_connect .fs-permissions .fs-trigger{left:380px;padding:10px;position:absolute;top:-65px}.events-cal #fs_connect .fs-permissions.fs-open,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open{box-shadow:0 1px 2px rgba(0,0,0,.3);-moz-box-shadow:0 1px 2px rgba(0,0,0,.3);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);padding:20px 35px;position:absolute}.events-cal #fs_connect .fs-permissions.fs-open ul,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul{display:flex;flex-wrap:wrap;margin:0}.events-cal #fs_connect .fs-permissions.fs-open ul li,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul li,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul li,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul li{flex:0 50%;padding-bottom:10px}.events-cal #fs_connect .fs-permissions.fs-open ul li .dashicons,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul li .dashicons,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul li .dashicons,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul li .dashicons{padding-right:15px}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons{background-position:0;background-repeat:no-repeat;background-size:65%}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons:before,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons:before,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons:before,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons:before{content:""}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users{background-image:url(../icons/user.svg)}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings{background-image:url(../icons/settings.svg)}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial{background-image:url(../icons/megaphone.svg)}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-menu,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-menu,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-menu,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-menu{background-image:url(../icons/plug.svg)}.events-cal #fs_connect .fs-terms,.toplevel_page_tribe-app-shop #fs_connect .fs-terms,.toplevel_page_tribe-common #fs_connect .fs-terms,.toplevel_page_tribe-help #fs_connect .fs-terms{background-color:transparent;bottom:30px;position:absolute;right:10px;width:240px}
|
1 |
+
.events-cal #fs_connect,.toplevel_page_tribe-app-shop #fs_connect,.toplevel_page_tribe-common #fs_connect,.toplevel_page_tribe-help #fs_connect{background-color:#fff;margin:20px 20px 0 2px;max-width:1200px;position:relative;width:auto}.events-cal #fs_connect .fs-visual,.toplevel_page_tribe-app-shop #fs_connect .fs-visual,.toplevel_page_tribe-common #fs_connect .fs-visual,.toplevel_page_tribe-help #fs_connect .fs-visual{align-content:center;align-items:center;background-color:transparent;display:flex;margin:0 35px;padding:20px 0 0}.events-cal #fs_connect .fs-visual .fs-connect-logo,.events-cal #fs_connect .fs-visual .fs-first.dashicons-plus,.events-cal #fs_connect .fs-visual .fs-plugin-icon,.events-cal #fs_connect .fs-visual .fs-second.dashicons-plus,.events-cal #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-first.dashicons-plus,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-second.dashicons-plus,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-first.dashicons-plus,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-second.dashicons-plus,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-first.dashicons-plus,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-second.dashicons-plus,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon{border:0;bottom:auto;left:auto;margin:0;position:relative;right:auto;top:auto;width:auto}.events-cal #fs_connect .fs-visual .fs-plugin-icon,.events-cal #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon{width:60px}.events-cal #fs_connect .fs-visual .dashicons-plus,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .dashicons-plus,.toplevel_page_tribe-common #fs_connect .fs-visual .dashicons-plus,.toplevel_page_tribe-help #fs_connect .fs-visual .dashicons-plus{color:#17a0d6;padding-left:4px;padding-right:4px;width:auto}.events-cal #fs_connect .fs-visual .fs-site-icon .dashicons,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon .dashicons,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon .dashicons,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon .dashicons{visibility:hidden}.events-cal #fs_connect .fs-visual .fs-site-icon:before,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-site-icon:before,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-site-icon:before,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-site-icon:before{background-image:url(../images/event-tickets.svg);background-position:50%;background-repeat:no-repeat;background-size:85%;content:"";display:block;height:100%;position:absolute;width:100%}.events-cal #fs_connect .fs-visual .fs-plugin-icon img,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon img,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon img,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon img{visibility:hidden}.events-cal #fs_connect .fs-visual .fs-plugin-icon:before,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-plugin-icon:before,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-plugin-icon:before,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-plugin-icon:before{background-image:url(../icons/stethoscope.svg);background-position:50%;background-repeat:no-repeat;background-size:75%;content:"";display:block;height:100%;position:absolute;width:100%}.events-cal #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-app-shop #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-common #fs_connect .fs-visual .fs-connect-logo,.toplevel_page_tribe-help #fs_connect .fs-visual .fs-connect-logo{background-image:url(../icons/mailplane.svg);background-position:50%;background-repeat:no-repeat;background-size:80%;box-sizing:border-box;display:block;height:80px;padding-left:60px;width:60px}.events-cal #fs_connect .fs-content,.toplevel_page_tribe-app-shop #fs_connect .fs-content,.toplevel_page_tribe-common #fs_connect .fs-content,.toplevel_page_tribe-help #fs_connect .fs-content{padding:20px 35px}.events-cal #fs_connect .fs-content h3,.toplevel_page_tribe-app-shop #fs_connect .fs-content h3,.toplevel_page_tribe-common #fs_connect .fs-content h3,.toplevel_page_tribe-help #fs_connect .fs-content h3{font-size:1.7em;margin-top:0}.events-cal #fs_connect .fs-content p,.toplevel_page_tribe-app-shop #fs_connect .fs-content p,.toplevel_page_tribe-common #fs_connect .fs-content p,.toplevel_page_tribe-help #fs_connect .fs-content p{margin-bottom:20px}.events-cal #fs_connect .fs-content p:first-child,.events-cal #fs_connect .fs-content p:last-child,.toplevel_page_tribe-app-shop #fs_connect .fs-content p:first-child,.toplevel_page_tribe-app-shop #fs_connect .fs-content p:last-child,.toplevel_page_tribe-common #fs_connect .fs-content p:first-child,.toplevel_page_tribe-common #fs_connect .fs-content p:last-child,.toplevel_page_tribe-help #fs_connect .fs-content p:first-child,.toplevel_page_tribe-help #fs_connect .fs-content p:last-child{margin-bottom:0}.events-cal #fs_connect .fs-content .tribe-powered-by-freemius,.toplevel_page_tribe-app-shop #fs_connect .fs-content .tribe-powered-by-freemius,.toplevel_page_tribe-common #fs_connect .fs-content .tribe-powered-by-freemius,.toplevel_page_tribe-help #fs_connect .fs-content .tribe-powered-by-freemius{background-image:url(../icons/freemius-logo.svg);background-position:100%;background-repeat:no-repeat;background-size:100px;font-size:1.1em;font-style:italic;height:30px;line-height:30px;position:absolute;right:45px;top:25px;width:184px}.events-cal #fs_connect .fs-actions,.toplevel_page_tribe-app-shop #fs_connect .fs-actions,.toplevel_page_tribe-common #fs_connect .fs-actions,.toplevel_page_tribe-help #fs_connect .fs-actions{background-color:#f3f3f3;display:flex;flex-flow:row wrap;padding:20px 35px}.events-cal #fs_connect .fs-actions form,.toplevel_page_tribe-app-shop #fs_connect .fs-actions form,.toplevel_page_tribe-common #fs_connect .fs-actions form,.toplevel_page_tribe-help #fs_connect .fs-actions form{float:none;margin-right:15px;order:1}.events-cal #fs_connect .fs-actions #skip_activation,.toplevel_page_tribe-app-shop #fs_connect .fs-actions #skip_activation,.toplevel_page_tribe-common #fs_connect .fs-actions #skip_activation,.toplevel_page_tribe-help #fs_connect .fs-actions #skip_activation{float:none;order:2}.events-cal #fs_connect .fs-actions .button,.toplevel_page_tribe-app-shop #fs_connect .fs-actions .button,.toplevel_page_tribe-common #fs_connect .fs-actions .button,.toplevel_page_tribe-help #fs_connect .fs-actions .button{height:auto;padding:7px 35px}.events-cal #fs_connect .fs-actions .button.button-primary,.toplevel_page_tribe-app-shop #fs_connect .fs-actions .button.button-primary,.toplevel_page_tribe-common #fs_connect .fs-actions .button.button-primary,.toplevel_page_tribe-help #fs_connect .fs-actions .button.button-primary{padding-left:35px;padding-right:35px}.events-cal #fs_connect .fs-permissions,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions,.toplevel_page_tribe-common #fs_connect .fs-permissions,.toplevel_page_tribe-help #fs_connect .fs-permissions{padding:0;position:relative}.events-cal #fs_connect .fs-permissions .fs-trigger,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions .fs-trigger,.toplevel_page_tribe-common #fs_connect .fs-permissions .fs-trigger,.toplevel_page_tribe-help #fs_connect .fs-permissions .fs-trigger{left:380px;padding:10px;position:absolute;top:-65px}.events-cal #fs_connect .fs-permissions.fs-open,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open{box-shadow:0 1px 2px rgba(0,0,0,.3);padding:20px 35px;position:absolute}.events-cal #fs_connect .fs-permissions.fs-open ul,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul{display:flex;flex-wrap:wrap;margin:0}.events-cal #fs_connect .fs-permissions.fs-open ul li,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul li,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul li,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul li{flex:0 50%;padding-bottom:10px}.events-cal #fs_connect .fs-permissions.fs-open ul li .dashicons,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul li .dashicons,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul li .dashicons,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul li .dashicons{padding-right:15px}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons{background-position:0;background-repeat:no-repeat;background-size:65%}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons:before,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons:before,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons:before,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons:before{content:""}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-users{background-image:url(../icons/user.svg)}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-settings{background-image:url(../icons/settings.svg)}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-testimonial{background-image:url(../icons/megaphone.svg)}.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.events-cal #fs_connect .fs-permissions.fs-open ul .dashicons-menu,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.toplevel_page_tribe-app-shop #fs_connect .fs-permissions.fs-open ul .dashicons-menu,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.toplevel_page_tribe-common #fs_connect .fs-permissions.fs-open ul .dashicons-menu,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-admin-plugins,.toplevel_page_tribe-help #fs_connect .fs-permissions.fs-open ul .dashicons-menu{background-image:url(../icons/plug.svg)}.events-cal #fs_connect .fs-terms,.toplevel_page_tribe-app-shop #fs_connect .fs-terms,.toplevel_page_tribe-common #fs_connect .fs-terms,.toplevel_page_tribe-help #fs_connect .fs-terms{background-color:transparent;bottom:30px;position:absolute;right:10px;width:240px}
|
src/resources/css/rsvp-v1.css
CHANGED
@@ -136,11 +136,13 @@
|
|
136 |
}
|
137 |
|
138 |
.tribe-answer select {
|
139 |
-
background: white;
|
140 |
border: 1px solid #ddd;
|
141 |
height: 30px;
|
142 |
line-height: 1;
|
143 |
margin-left: 5px;
|
|
|
|
|
144 |
}
|
145 |
|
146 |
.tribe-rsvp h2 {
|
136 |
}
|
137 |
|
138 |
.tribe-answer select {
|
139 |
+
background-color: white;
|
140 |
border: 1px solid #ddd;
|
141 |
height: 30px;
|
142 |
line-height: 1;
|
143 |
margin-left: 5px;
|
144 |
+
padding-bottom: 0;
|
145 |
+
padding-top: 0;
|
146 |
}
|
147 |
|
148 |
.tribe-rsvp h2 {
|
src/resources/css/rsvp-v1.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.tribe-rsvp{padding:20px 0}.tribe-tickets-attendee{padding:10px}.tribe-events-style-full .tribe-events-tickets .tribe-tickets-attendee table,.tribe-events-style-full .tribe-events-tickets .tribe-tickets-attendee td,.tribe-events-style-full .tribe-events-tickets .tribe-tickets-attendee tr,.tribe-events-tickets .tribe-tickets-attendee table,.tribe-events-tickets .tribe-tickets-attendee td,.tribe-events-tickets .tribe-tickets-attendee tr{border:0}.tribe-rsvp-message-display .tribe-rsvp-messages{display:block}.tribe-rsvp-messages{display:none;padding:10px 10px 5px}.tribe-rsvp-message{border-radius:3px;border-style:solid;border-width:1px;font-size:12px;margin:0 0 5px;padding:0 .6em}.tribe-rsvp-message-success{background-color:#ffffe0;border-color:#e6db55}.tribe-rsvp-message-error{background-color:#ffebe8;border-color:#c00}.tribe-tickets-quantity{width:100%}.tickets-unavailable{font-style:italic}.tribe-rsvp-list{list-style:none;padding:0;margin:0}.tribe-rsvp-list>.tribe-item{min-height:105px;padding:20px;border:1px solid #ededed;border-bottom:0}.tribe-rsvp-list>.tribe-item:last-child{border-bottom:1px solid #ededed;margin-bottom:20px}.tribe-rsvp-list>.tribe-item.tribe-disabled{background-color:#efefef;border-color:#ddd;color:#717171}.tribe-rsvp-list>.tribe-item.tribe-disabled:last-child{border-bottom-color:#ddd}.tribe-rsvp-list>.tribe-item .tribe-answer{float:right;display:inline-block}.tribe-rsvp-list>.tribe-item table{border:0;margin:0}.tribe-rsvp-list>.tribe-item td{border:0}.list-attendee{color:#999;display:inline-block;letter-spacing:1px;text-transform:uppercase}.tribe-submit-tickets-form{margin-top:20px}.user-details{margin:0 0 1.5em}.user-details p{margin:0 0 .5em}.tribe-answer{line-height:2}.tribe-answer .type-label{margin-bottom:0;padding-right:.5em}.tribe-answer label{display:block}.tribe-answer select{background:#fff;border:1px solid #ddd;height:30px;line-height:1;margin-left:5px}.tribe-rsvp h2{margin-bottom:20px;line-height:1.2}.event-tickets-meta-label{font-weight:700;margin:0 1em 0 0}.tribe-theme-parent-twentysixteen .comment-content a,.tribe-theme-parent-twentysixteen .entry-content a,.tribe-theme-parent-twentysixteen .entry-footer a:hover,.tribe-theme-parent-twentysixteen .entry-summary a,.tribe-theme-parent-twentysixteen .logged-in-as a,.tribe-theme-parent-twentysixteen .pingback .comment-body>a,.tribe-theme-parent-twentysixteen .site-info a:hover,.tribe-theme-parent-twentysixteen .taxonomy-description a,.tribe-theme-parent-twentysixteen .textwidget a,.tribe-theme-twentysixteen .comment-content a,.tribe-theme-twentysixteen .entry-content a,.tribe-theme-twentysixteen .entry-footer a:hover,.tribe-theme-twentysixteen .entry-summary a,.tribe-theme-twentysixteen .logged-in-as a,.tribe-theme-twentysixteen .pingback .comment-body>a,.tribe-theme-twentysixteen .site-info a:hover,.tribe-theme-twentysixteen .taxonomy-description a,.tribe-theme-twentysixteen .textwidget a{box-shadow:none}.tribe-events-tickets-title.tribe--rsvp{margin:0}.tribe-events-style-full.tribe-events-style-theme h2.tribe-events-tickets-title{font-size:90%}.tribe-link-view-attendee{margin:15px 0}.tribe-events-tickets{background:var(--tec-color-background-secondary);border:0;border-radius:3px;max-width:100%;position:relative}.tribe-events-tickets table,.tribe-events-tickets td,.tribe-events-tickets th{border:0}.tribe-events-tickets tr{display:flex;flex-flow:row wrap}.tribe-events-tickets tr:not(:first-child){border-top:2px solid #dfdfdf}.tribe-events-tickets td{flex:none;padding:8px 10px;width:100%;word-break:normal}.tribe-events-tickets td.tickets_name{font-weight:700}.tribe-events-tickets td.quantity,.tribe-events-tickets td.woocommerce{order:2}.tribe-events-tickets td.quantity input[type=number],.tribe-events-tickets td.woocommerce input[type=number]{background-color:#fff;border-radius:3px;margin-bottom:5px;padding:5px 10px;text-align:left}.tribe-events-tickets td.tickets_submit{order:3}.tribe-events-tickets td.tickets_submit .tribe-button{margin:0 0 10px}.tribe-events-tickets .woocommerce.add-to-cart .tribe-button{margin:10px 0}.tribe-events-tickets .tribe-link-tickets-message{background:hsla(0,0%,78%,.8);bottom:0;left:0;position:absolute;right:0;text-align:center;top:0}.tribe-events-tickets .tribe-link-tickets-message .no-javascript-msg{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:90%}.tribe-events-tickets .tribe-tickets-remaining{color:var(--tec-color-text-secondary);display:block;font-size:11px}.tribe-events-tickets .tribe-tickets-attendees-list-optout label{color:var(--tec-color-text-secondary);font-size:13px}.tribe-events-tickets .tribe-tickets-attendees-list-optout input[type=checkbox]+label,.tribe-events-tickets .tribe-tickets-attendees-list-optout input[type=radio]+label{display:inline-block}.tribe-events-tickets .tickets_description,.tribe-events-tickets .tickets_name,.tribe-events-tickets .tickets_name p,.tribe-events-tickets .tickets_price{color:var(--tec-color-text-secondary);font-size:15px;padding:16px 10px}.tribe-events-tickets input[type=date],.tribe-events-tickets input[type=datetime-local],.tribe-events-tickets input[type=email],.tribe-events-tickets input[type=month],.tribe-events-tickets input[type=number],.tribe-events-tickets input[type=password],.tribe-events-tickets input[type=search],.tribe-events-tickets input[type=tel],.tribe-events-tickets input[type=text],.tribe-events-tickets input[type=time],.tribe-events-tickets input[type=url],.tribe-events-tickets input[type=week],.tribe-events-tickets select,.tribe-events-tickets textarea{background:#fff;width:100%}.tribe-events-tickets header{height:auto}.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta,.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row{display:none}.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta>td,.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row>td,.tribe-tickets-has-rsvp.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta,.tribe-tickets-has-rsvp.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row{display:block}.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta tr,.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row tr{border:0}.tribe-block__rsvp{font-family:var(--tec-font-family-sans-serif);margin-bottom:30px;margin-top:30px;max-width:580px;position:relative}.tribe-block__rsvp__ticket{border:1px solid #e1e3e6;display:flex;flex-wrap:wrap;position:relative;width:100%}.tribe-block__rsvp__icon{align-items:center;background:#fff;border-bottom:1px dashed #b5bcc2;color:#434343;display:flex;flex:none;flex-direction:column;font-size:14px;font-weight:700;line-height:17px;padding:20px 17px;width:100%}.tribe-block__rsvp__icon svg{margin-bottom:7px}.tribe-block__rsvp__content{background-color:#f5f8f9;flex:auto}.tribe-block__rsvp__details{padding:25px 20px 20px}.tribe-block__rsvp__title{color:#000;font-size:21px;font-weight:700;line-height:28px;margin-bottom:12px}.tribe-block__rsvp__description{color:#545d66;font-size:14px;line-height:18px;margin-bottom:15px}.tribe-block__rsvp__availability{color:#545d66;display:flex;align-items:center;font-size:12px;line-height:18px}.tribe-block__rsvp__quantity{font-size:18px;font-weight:700;margin-right:6px}.tribe-block__rsvp__status{display:flex;flex-wrap:nowrap;padding:0 20px 25px;text-align:center}.tribe-block__rsvp__status>span{flex:none;margin-right:15px;width:calc(50% - 7.5px)}.tribe-block__rsvp__status>span:last-child{margin-right:0}.tribe-block__rsvp__status-button{align-items:center;border:1px solid #545d66;border-radius:4px;background:#fff;color:#545d66;display:flex;font-family:var(--tec-font-family-sans-serif);font-size:14px;font-weight:700;height:44px;justify-content:center;line-height:1;padding:0;width:100%}.tribe-block__rsvp__status-button svg{margin-left:9px}.tribe-block__rsvp__status-button:focus,.tribe-block__rsvp__status-button:hover{background:#fff;border:1px solid #000;color:#000}.tribe-block__rsvp__status-button.tribe-active{border:1px solid #000;color:#000}.tribe-block__rsvp__status-button.tribe-inactive{border:1px solid #e1e3e6;color:#a2aab2}.tribe-block__rsvp__status-button.tribe-inactive:focus,.tribe-block__rsvp__status-button.tribe-inactive:hover{background:#fff;border:1px solid #545d66;color:#545d66}.tribe-block__rsvp__status-button[disabled=disabled]{cursor:default}.tribe-block__rsvp__going-icon,.tribe-block__rsvp__not-going-icon{fill:#a2aab2}.tribe-active .tribe-block__rsvp__going-icon,.tribe-active .tribe-block__rsvp__not-going-icon,.tribe-block__rsvp__status-button:focus .tribe-block__rsvp__going-icon,.tribe-block__rsvp__status-button:focus .tribe-block__rsvp__not-going-icon,.tribe-block__rsvp__status-button:hover .tribe-block__rsvp__going-icon,.tribe-block__rsvp__status-button:hover .tribe-block__rsvp__not-going-icon{fill:#191e23}.tribe-inactive .tribe-block__rsvp__going-icon,.tribe-inactive .tribe-block__rsvp__not-going-icon{fill:#e1e3e6}.tribe-inactive:focus .tribe-block__rsvp__going-icon,.tribe-inactive:focus .tribe-block__rsvp__not-going-icon,.tribe-inactive:hover .tribe-block__rsvp__going-icon,.tribe-inactive:hover .tribe-block__rsvp__not-going-icon{fill:#a2aab2}.tribe-block__rsvp__form{padding:0 20px}.tribe-block__rsvp__form form{border-top:1px solid #e1e3e6;display:flex;padding:30px 0}.tribe-left{flex:none}.tribe-block__rsvp__number-input{padding-right:20px}.tribe-block__rsvp__number-input-inner{align-items:center;display:flex}.tribe-block__rsvp__number-input-inner input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:none;color:#000;font-family:var(--tec-font-family-sans-serif);font-size:30px;font-weight:700;height:40px;max-width:48px;padding:4px 0;text-align:center}.tribe-block__rsvp__number-input-inner input[type=number]::-webkit-inner-spin-button,.tribe-block__rsvp__number-input-inner input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none}.tribe-block__rsvp__number-input-label{display:block;font-size:14px;font-weight:700;line-height:18px;margin-top:9px;text-align:center}.tribe-block__rsvp__number-input-button{background-color:transparent;height:30px;padding:0;position:relative;width:20px}.tribe-block__rsvp__number-input-button:after,.tribe-block__rsvp__number-input-button:before{background-color:#aeb4bb;content:"";height:2px;position:absolute;width:10px}.tribe-block__rsvp__number-input-button:focus,.tribe-block__rsvp__number-input-button:hover{background:none}.tribe-block__rsvp__number-input-button:focus:after,.tribe-block__rsvp__number-input-button:focus:before,.tribe-block__rsvp__number-input-button:hover:after,.tribe-block__rsvp__number-input-button:hover:before{background-color:#545d66}.tribe-block__rsvp__number-input-button--minus{margin-left:-10px}.tribe-block__rsvp__number-input-button--minus:after,.tribe-block__rsvp__number-input-button--minus:before{right:0}.tribe-block__rsvp__number-input-button--plus{margin-right:-10px}.tribe-block__rsvp__number-input-button--plus:after,.tribe-block__rsvp__number-input-button--plus:before{left:0}.tribe-block__rsvp__number-input-button--plus:after{transform:rotate(90deg)}.tribe-right{flex:auto}.tribe-right input[type=email],.tribe-right input[type=text]{border-color:#e1e3e6;color:#000;display:block;font-family:var(--tec-font-family-sans-serif);font-size:16px;height:40px;line-height:18px;margin-bottom:15px;padding:10px 15px;width:100%}.tribe-right input[type=email]:-ms-input-placeholder,.tribe-right input[type=text]:-ms-input-placeholder{color:#a2aab2}.tribe-right input[type=email]::placeholder,.tribe-right input[type=text]::placeholder{color:#a2aab2}.tribe-right label{cursor:pointer;font-size:14px;font-weight:400}.tribe-right label[for^=tribe-tickets-attendees-list-optout]{align-items:flex-start;display:flex;margin:0 0 15px;padding-top:7px}.tribe-right label[for^=tribe-tickets-attendees-list-optout] input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #e1e3e6;border-radius:0;cursor:pointer;flex:none;height:16px;margin:1px 10px 0 0;width:16px}.tribe-right label[for^=tribe-tickets-attendees-list-optout] input[type=checkbox]:focus{box-shadow:0 0 0 1px #e1e3e6;outline:2px solid transparent;outline-offset:-2px}.tribe-right label[for^=tribe-tickets-attendees-list-optout] input[type=checkbox]:checked:before{color:#009fd4;content:"\f147";display:inline-block;float:left;font:normal 21px/1 dashicons;margin:-3px 0 0 -4px;speak:none;vertical-align:middle;width:16px}.tribe-tickets-meta-option-label{color:#000;font-size:14px;line-height:18px;font-weight:400}.tribe-block__rsvp__message__error,.tribe-block__rsvp__message__success{color:#000;font-size:14px;line-height:18px;padding:20px}.tribe-block__rsvp__message__error{background:#ffebe8;border:1px solid #c00;display:none;margin-bottom:20px}.tribe-block__rsvp__message__success{background:#ecfae5;border:1px solid #1bd800;margin-top:20px}.tribe-block__rsvp__submit-button{background:#009fd4;color:#fff;font-family:var(--tec-font-family-sans-serif);font-size:15px;font-weight:700;line-height:18px;margin:10px 0 0;padding:10px 23px}.tribe-block__rsvp__submit-button:focus,.tribe-block__rsvp__submit-button:hover{background:#007bb4}.tribe-block__rsvp__submit-button:disabled{cursor:not-allowed;background:#a2aab2}.tribe-block__rsvp__form__attendee-meta{margin:0}.tribe-block__rsvp__form__attendee-meta td,.tribe-block__rsvp__form__attendee-meta th{padding:0;border:none;word-break:normal}.tribe-common-c-loader.tribe-block__rsvp__loading{align-items:center;background:hsla(0,0%,100%,.7);height:100%;justify-content:center;left:0;margin:0;padding:0;position:absolute;text-align:center;top:0;width:100%;z-index:99}.tribe-common-c-loader.tribe-block__rsvp__loading svg{max-width:70px;position:absolute;top:35%}.tribe-common-c-loader.tribe-block__rsvp__loading svg circle{fill:#888}@media only screen and (min-width:768px){.tribe-events-tickets tr{display:table-row}}@media (min-width:768px){.tribe-events-tickets td{width:auto}.tribe-events-tickets td.quantity input[type=number],.tribe-events-tickets td.woocommerce input[type=number]{width:4.375em}.tribe-events-tickets .woocommerce.add-to-cart{padding:16px}.tribe-events-tickets .woocommerce.add-to-cart .tribe-button{margin:10px}.tribe-events-tickets input[type=date],.tribe-events-tickets input[type=datetime-local],.tribe-events-tickets input[type=email],.tribe-events-tickets input[type=month],.tribe-events-tickets input[type=number],.tribe-events-tickets input[type=password],.tribe-events-tickets input[type=search],.tribe-events-tickets input[type=tel],.tribe-events-tickets input[type=text],.tribe-events-tickets input[type=time],.tribe-events-tickets input[type=url],.tribe-events-tickets input[type=week],.tribe-events-tickets select,.tribe-events-tickets textarea{width:auto}.tribe-tickets-has-rsvp.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta,.tribe-tickets-has-rsvp.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row{display:table-row}.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta>td,.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row>td{display:table-cell}}@media (min-width:600px){.tribe-block__rsvp__ticket{align-items:stretch;flex-wrap:nowrap}.tribe-block__rsvp__icon{border-bottom:none;border-right:1px dashed #b5bcc2;padding:28px 17px;width:84px}.tribe-block__rsvp__number-input-inner input[type=number]{font-size:36px;height:48px}.tribe-block__rsvp__message__success{padding:10px 30px;text-align:center}}
|
1 |
+
.tribe-rsvp{padding:20px 0}.tribe-tickets-attendee{padding:10px}.tribe-events-style-full .tribe-events-tickets .tribe-tickets-attendee table,.tribe-events-style-full .tribe-events-tickets .tribe-tickets-attendee td,.tribe-events-style-full .tribe-events-tickets .tribe-tickets-attendee tr,.tribe-events-tickets .tribe-tickets-attendee table,.tribe-events-tickets .tribe-tickets-attendee td,.tribe-events-tickets .tribe-tickets-attendee tr{border:0}.tribe-rsvp-message-display .tribe-rsvp-messages{display:block}.tribe-rsvp-messages{display:none;padding:10px 10px 5px}.tribe-rsvp-message{border-radius:3px;border-style:solid;border-width:1px;font-size:12px;margin:0 0 5px;padding:0 .6em}.tribe-rsvp-message-success{background-color:#ffffe0;border-color:#e6db55}.tribe-rsvp-message-error{background-color:#ffebe8;border-color:#c00}.tribe-tickets-quantity{width:100%}.tickets-unavailable{font-style:italic}.tribe-rsvp-list{list-style:none;padding:0;margin:0}.tribe-rsvp-list>.tribe-item{min-height:105px;padding:20px;border:1px solid #ededed;border-bottom:0}.tribe-rsvp-list>.tribe-item:last-child{border-bottom:1px solid #ededed;margin-bottom:20px}.tribe-rsvp-list>.tribe-item.tribe-disabled{background-color:#efefef;border-color:#ddd;color:#717171}.tribe-rsvp-list>.tribe-item.tribe-disabled:last-child{border-bottom-color:#ddd}.tribe-rsvp-list>.tribe-item .tribe-answer{float:right;display:inline-block}.tribe-rsvp-list>.tribe-item table{border:0;margin:0}.tribe-rsvp-list>.tribe-item td{border:0}.list-attendee{color:#999;display:inline-block;letter-spacing:1px;text-transform:uppercase}.tribe-submit-tickets-form{margin-top:20px}.user-details{margin:0 0 1.5em}.user-details p{margin:0 0 .5em}.tribe-answer{line-height:2}.tribe-answer .type-label{margin-bottom:0;padding-right:.5em}.tribe-answer label{display:block}.tribe-answer select{background-color:#fff;border:1px solid #ddd;height:30px;line-height:1;margin-left:5px;padding-bottom:0;padding-top:0}.tribe-rsvp h2{margin-bottom:20px;line-height:1.2}.event-tickets-meta-label{font-weight:700;margin:0 1em 0 0}.tribe-theme-parent-twentysixteen .comment-content a,.tribe-theme-parent-twentysixteen .entry-content a,.tribe-theme-parent-twentysixteen .entry-footer a:hover,.tribe-theme-parent-twentysixteen .entry-summary a,.tribe-theme-parent-twentysixteen .logged-in-as a,.tribe-theme-parent-twentysixteen .pingback .comment-body>a,.tribe-theme-parent-twentysixteen .site-info a:hover,.tribe-theme-parent-twentysixteen .taxonomy-description a,.tribe-theme-parent-twentysixteen .textwidget a,.tribe-theme-twentysixteen .comment-content a,.tribe-theme-twentysixteen .entry-content a,.tribe-theme-twentysixteen .entry-footer a:hover,.tribe-theme-twentysixteen .entry-summary a,.tribe-theme-twentysixteen .logged-in-as a,.tribe-theme-twentysixteen .pingback .comment-body>a,.tribe-theme-twentysixteen .site-info a:hover,.tribe-theme-twentysixteen .taxonomy-description a,.tribe-theme-twentysixteen .textwidget a{box-shadow:none}.tribe-events-tickets-title.tribe--rsvp{margin:0}.tribe-events-style-full.tribe-events-style-theme h2.tribe-events-tickets-title{font-size:90%}.tribe-link-view-attendee{margin:15px 0}.tribe-events-tickets{background:var(--tec-color-background-secondary);border:0;border-radius:3px;max-width:100%;position:relative}.tribe-events-tickets table,.tribe-events-tickets td,.tribe-events-tickets th{border:0}.tribe-events-tickets tr{display:flex;flex-flow:row wrap}.tribe-events-tickets tr:not(:first-child){border-top:2px solid #dfdfdf}.tribe-events-tickets td{flex:none;padding:8px 10px;width:100%;word-break:normal}.tribe-events-tickets td.tickets_name{font-weight:700}.tribe-events-tickets td.quantity,.tribe-events-tickets td.woocommerce{order:2}.tribe-events-tickets td.quantity input[type=number],.tribe-events-tickets td.woocommerce input[type=number]{background-color:#fff;border-radius:3px;margin-bottom:5px;padding:5px 10px;text-align:left}.tribe-events-tickets td.tickets_submit{order:3}.tribe-events-tickets td.tickets_submit .tribe-button{margin:0 0 10px}.tribe-events-tickets .woocommerce.add-to-cart .tribe-button{margin:10px 0}.tribe-events-tickets .tribe-link-tickets-message{background:hsla(0,0%,78%,.8);bottom:0;left:0;position:absolute;right:0;text-align:center;top:0}.tribe-events-tickets .tribe-link-tickets-message .no-javascript-msg{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:90%}.tribe-events-tickets .tribe-tickets-remaining{color:var(--tec-color-text-secondary);display:block;font-size:11px}.tribe-events-tickets .tribe-tickets-attendees-list-optout label{color:var(--tec-color-text-secondary);font-size:13px}.tribe-events-tickets .tribe-tickets-attendees-list-optout input[type=checkbox]+label,.tribe-events-tickets .tribe-tickets-attendees-list-optout input[type=radio]+label{display:inline-block}.tribe-events-tickets .tickets_description,.tribe-events-tickets .tickets_name,.tribe-events-tickets .tickets_name p,.tribe-events-tickets .tickets_price{color:var(--tec-color-text-secondary);font-size:15px;padding:16px 10px}.tribe-events-tickets input[type=date],.tribe-events-tickets input[type=datetime-local],.tribe-events-tickets input[type=email],.tribe-events-tickets input[type=month],.tribe-events-tickets input[type=number],.tribe-events-tickets input[type=password],.tribe-events-tickets input[type=search],.tribe-events-tickets input[type=tel],.tribe-events-tickets input[type=text],.tribe-events-tickets input[type=time],.tribe-events-tickets input[type=url],.tribe-events-tickets input[type=week],.tribe-events-tickets select,.tribe-events-tickets textarea{background:#fff;width:100%}.tribe-events-tickets header{height:auto}.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta,.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row{display:none}.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta>td,.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row>td,.tribe-tickets-has-rsvp.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta,.tribe-tickets-has-rsvp.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row{display:block}.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta tr,.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row tr{border:0}.tribe-block__rsvp{font-family:var(--tec-font-family-sans-serif);margin-bottom:30px;margin-top:30px;max-width:580px;position:relative}.tribe-block__rsvp__ticket{border:1px solid #e1e3e6;display:flex;flex-wrap:wrap;position:relative;width:100%}.tribe-block__rsvp__icon{align-items:center;background:#fff;border-bottom:1px dashed #b5bcc2;color:#434343;display:flex;flex:none;flex-direction:column;font-size:14px;font-weight:700;line-height:17px;padding:20px 17px;width:100%}.tribe-block__rsvp__icon svg{margin-bottom:7px}.tribe-block__rsvp__content{background-color:#f5f8f9;flex:auto}.tribe-block__rsvp__details{padding:25px 20px 20px}.tribe-block__rsvp__title{color:#000;font-size:21px;font-weight:700;line-height:28px;margin-bottom:12px}.tribe-block__rsvp__description{color:#545d66;font-size:14px;line-height:18px;margin-bottom:15px}.tribe-block__rsvp__availability{color:#545d66;display:flex;align-items:center;font-size:12px;line-height:18px}.tribe-block__rsvp__quantity{font-size:18px;font-weight:700;margin-right:6px}.tribe-block__rsvp__status{display:flex;flex-wrap:nowrap;padding:0 20px 25px;text-align:center}.tribe-block__rsvp__status>span{flex:none;margin-right:15px;width:calc(50% - 7.5px)}.tribe-block__rsvp__status>span:last-child{margin-right:0}.tribe-block__rsvp__status-button{align-items:center;border:1px solid #545d66;border-radius:4px;background:#fff;color:#545d66;display:flex;font-family:var(--tec-font-family-sans-serif);font-size:14px;font-weight:700;height:44px;justify-content:center;line-height:1;padding:0;width:100%}.tribe-block__rsvp__status-button svg{margin-left:9px}.tribe-block__rsvp__status-button:focus,.tribe-block__rsvp__status-button:hover{background:#fff;border:1px solid #000;color:#000}.tribe-block__rsvp__status-button.tribe-active{border:1px solid #000;color:#000}.tribe-block__rsvp__status-button.tribe-inactive{border:1px solid #e1e3e6;color:#a2aab2}.tribe-block__rsvp__status-button.tribe-inactive:focus,.tribe-block__rsvp__status-button.tribe-inactive:hover{background:#fff;border:1px solid #545d66;color:#545d66}.tribe-block__rsvp__status-button[disabled=disabled]{cursor:default}.tribe-block__rsvp__going-icon,.tribe-block__rsvp__not-going-icon{fill:#a2aab2}.tribe-active .tribe-block__rsvp__going-icon,.tribe-active .tribe-block__rsvp__not-going-icon,.tribe-block__rsvp__status-button:focus .tribe-block__rsvp__going-icon,.tribe-block__rsvp__status-button:focus .tribe-block__rsvp__not-going-icon,.tribe-block__rsvp__status-button:hover .tribe-block__rsvp__going-icon,.tribe-block__rsvp__status-button:hover .tribe-block__rsvp__not-going-icon{fill:#191e23}.tribe-inactive .tribe-block__rsvp__going-icon,.tribe-inactive .tribe-block__rsvp__not-going-icon{fill:#e1e3e6}.tribe-inactive:focus .tribe-block__rsvp__going-icon,.tribe-inactive:focus .tribe-block__rsvp__not-going-icon,.tribe-inactive:hover .tribe-block__rsvp__going-icon,.tribe-inactive:hover .tribe-block__rsvp__not-going-icon{fill:#a2aab2}.tribe-block__rsvp__form{padding:0 20px}.tribe-block__rsvp__form form{border-top:1px solid #e1e3e6;display:flex;padding:30px 0}.tribe-left{flex:none}.tribe-block__rsvp__number-input{padding-right:20px}.tribe-block__rsvp__number-input-inner{align-items:center;display:flex}.tribe-block__rsvp__number-input-inner input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:none;color:#000;font-family:var(--tec-font-family-sans-serif);font-size:30px;font-weight:700;height:40px;max-width:48px;padding:4px 0;text-align:center}.tribe-block__rsvp__number-input-inner input[type=number]::-webkit-inner-spin-button,.tribe-block__rsvp__number-input-inner input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none}.tribe-block__rsvp__number-input-label{display:block;font-size:14px;font-weight:700;line-height:18px;margin-top:9px;text-align:center}.tribe-block__rsvp__number-input-button{background-color:transparent;height:30px;padding:0;position:relative;width:20px}.tribe-block__rsvp__number-input-button:after,.tribe-block__rsvp__number-input-button:before{background-color:#aeb4bb;content:"";height:2px;position:absolute;width:10px}.tribe-block__rsvp__number-input-button:focus,.tribe-block__rsvp__number-input-button:hover{background:none}.tribe-block__rsvp__number-input-button:focus:after,.tribe-block__rsvp__number-input-button:focus:before,.tribe-block__rsvp__number-input-button:hover:after,.tribe-block__rsvp__number-input-button:hover:before{background-color:#545d66}.tribe-block__rsvp__number-input-button--minus{margin-left:-10px}.tribe-block__rsvp__number-input-button--minus:after,.tribe-block__rsvp__number-input-button--minus:before{right:0}.tribe-block__rsvp__number-input-button--plus{margin-right:-10px}.tribe-block__rsvp__number-input-button--plus:after,.tribe-block__rsvp__number-input-button--plus:before{left:0}.tribe-block__rsvp__number-input-button--plus:after{transform:rotate(90deg)}.tribe-right{flex:auto}.tribe-right input[type=email],.tribe-right input[type=text]{border-color:#e1e3e6;color:#000;display:block;font-family:var(--tec-font-family-sans-serif);font-size:16px;height:40px;line-height:18px;margin-bottom:15px;padding:10px 15px;width:100%}.tribe-right input[type=email]:-ms-input-placeholder,.tribe-right input[type=text]:-ms-input-placeholder{color:#a2aab2}.tribe-right input[type=email]::placeholder,.tribe-right input[type=text]::placeholder{color:#a2aab2}.tribe-right label{cursor:pointer;font-size:14px;font-weight:400}.tribe-right label[for^=tribe-tickets-attendees-list-optout]{align-items:flex-start;display:flex;margin:0 0 15px;padding-top:7px}.tribe-right label[for^=tribe-tickets-attendees-list-optout] input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #e1e3e6;border-radius:0;cursor:pointer;flex:none;height:16px;margin:1px 10px 0 0;width:16px}.tribe-right label[for^=tribe-tickets-attendees-list-optout] input[type=checkbox]:focus{box-shadow:0 0 0 1px #e1e3e6;outline:2px solid transparent;outline-offset:-2px}.tribe-right label[for^=tribe-tickets-attendees-list-optout] input[type=checkbox]:checked:before{color:#009fd4;content:"\f147";display:inline-block;float:left;font:normal 21px/1 dashicons;margin:-3px 0 0 -4px;speak:none;vertical-align:middle;width:16px}.tribe-tickets-meta-option-label{color:#000;font-size:14px;line-height:18px;font-weight:400}.tribe-block__rsvp__message__error,.tribe-block__rsvp__message__success{color:#000;font-size:14px;line-height:18px;padding:20px}.tribe-block__rsvp__message__error{background:#ffebe8;border:1px solid #c00;display:none;margin-bottom:20px}.tribe-block__rsvp__message__success{background:#ecfae5;border:1px solid #1bd800;margin-top:20px}.tribe-block__rsvp__submit-button{background:#009fd4;color:#fff;font-family:var(--tec-font-family-sans-serif);font-size:15px;font-weight:700;line-height:18px;margin:10px 0 0;padding:10px 23px}.tribe-block__rsvp__submit-button:focus,.tribe-block__rsvp__submit-button:hover{background:#007bb4}.tribe-block__rsvp__submit-button:disabled{cursor:not-allowed;background:#a2aab2}.tribe-block__rsvp__form__attendee-meta{margin:0}.tribe-block__rsvp__form__attendee-meta td,.tribe-block__rsvp__form__attendee-meta th{padding:0;border:none;word-break:normal}.tribe-common-c-loader.tribe-block__rsvp__loading{align-items:center;background:hsla(0,0%,100%,.7);height:100%;justify-content:center;left:0;margin:0;padding:0;position:absolute;text-align:center;top:0;width:100%;z-index:99}.tribe-common-c-loader.tribe-block__rsvp__loading svg{max-width:70px;position:absolute;top:35%}.tribe-common-c-loader.tribe-block__rsvp__loading svg circle{fill:#888}@media only screen and (min-width:768px){.tribe-events-tickets tr{display:table-row}}@media (min-width:768px){.tribe-events-tickets td{width:auto}.tribe-events-tickets td.quantity input[type=number],.tribe-events-tickets td.woocommerce input[type=number]{width:4.375em}.tribe-events-tickets .woocommerce.add-to-cart{padding:16px}.tribe-events-tickets .woocommerce.add-to-cart .tribe-button{margin:10px}.tribe-events-tickets input[type=date],.tribe-events-tickets input[type=datetime-local],.tribe-events-tickets input[type=email],.tribe-events-tickets input[type=month],.tribe-events-tickets input[type=number],.tribe-events-tickets input[type=password],.tribe-events-tickets input[type=search],.tribe-events-tickets input[type=tel],.tribe-events-tickets input[type=text],.tribe-events-tickets input[type=time],.tribe-events-tickets input[type=url],.tribe-events-tickets input[type=week],.tribe-events-tickets select,.tribe-events-tickets textarea{width:auto}.tribe-tickets-has-rsvp.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta,.tribe-tickets-has-rsvp.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row{display:table-row}.tribe-events-tickets-rsvp tr.tribe-event-tickets-plus-meta>td,.tribe-events-tickets-rsvp tr.tribe-tickets-meta-row>td{display:table-cell}}@media (min-width:600px){.tribe-block__rsvp__ticket{align-items:stretch;flex-wrap:nowrap}.tribe-block__rsvp__icon{border-bottom:none;border-right:1px dashed #b5bcc2;padding:28px 17px;width:84px}.tribe-block__rsvp__number-input-inner input[type=number]{font-size:36px;height:48px}.tribe-block__rsvp__message__success{padding:10px 30px;text-align:center}}
|
src/resources/css/rsvp.css
CHANGED
@@ -321,12 +321,12 @@
|
|
321 |
.accordion-header {
|
322 |
background: none;
|
323 |
border: 0;
|
|
|
324 |
color: inherit;
|
325 |
cursor: pointer;
|
326 |
font-size: 12px;
|
327 |
font-weight: bold;
|
328 |
padding: 10px 20px;
|
329 |
-
box-sizing: border-box;
|
330 |
position: relative;
|
331 |
text-align: left;
|
332 |
width: 100%;
|
@@ -340,26 +340,26 @@
|
|
340 |
content: '\f132';
|
341 |
font-family: 'dashicons';
|
342 |
font-size: 10px;
|
343 |
-
line-height: 17px;
|
344 |
font-weight: 400;
|
345 |
height: 14px;
|
346 |
left: 0;
|
|
|
347 |
padding: 0;
|
|
|
348 |
position: absolute;
|
|
|
349 |
top: 12px;
|
350 |
width: 15px;
|
351 |
-
text-align: center;
|
352 |
-
padding-right: 1px;
|
353 |
}
|
354 |
|
355 |
.accordion-header:after {
|
356 |
-
content: '';
|
357 |
border-bottom: 1px solid #ddd;
|
|
|
358 |
position: absolute;
|
359 |
right: 0;
|
360 |
-
width: 80%;
|
361 |
top: 50%;
|
362 |
transform: translateY(-50%);
|
|
|
363 |
}
|
364 |
|
365 |
.accordion-header.is-active:before {
|
@@ -375,15 +375,15 @@
|
|
375 |
background: none;
|
376 |
}
|
377 |
|
378 |
-
.tribe-tickets-editor-history
|
379 |
width: calc(100% - 80px);
|
380 |
}
|
381 |
|
382 |
-
.tribe_attendee_meta
|
383 |
width: calc(100% - 170px);
|
384 |
}
|
385 |
|
386 |
-
.tribe_advanced_meta
|
387 |
width: calc(100% - 105px);
|
388 |
}
|
389 |
|
@@ -438,24 +438,24 @@
|
|
438 |
z-index: var(--tec-z-index-spinner-container);
|
439 |
}
|
440 |
|
441 |
-
.tribe-common .tribe-tickets__notice {
|
442 |
-
padding: var(--tec-spacer-3);
|
443 |
background-color: var(--tec-color-background-secondary);
|
444 |
border-radius: var(--tec-border-radius-default);
|
445 |
margin: var(--tec-spacer-4) 0;
|
|
|
446 |
}
|
447 |
|
448 |
-
.tribe-common .tribe-tickets__notice > *:last-child {
|
449 |
-
padding-bottom: 0;
|
450 |
margin-bottom: 0;
|
|
|
451 |
}
|
452 |
|
453 |
-
.tribe-common .tribe-tickets-notice__title {
|
454 |
margin: 0;
|
455 |
position: relative;
|
456 |
}
|
457 |
|
458 |
-
.tribe-common .tribe-tickets-notice__title:empty {
|
459 |
display: none;
|
460 |
}
|
461 |
|
@@ -463,24 +463,21 @@
|
|
463 |
Error Notices
|
464 |
*/
|
465 |
|
466 |
-
.tribe-common .tribe-tickets__notice--error {
|
467 |
background-color: var(--tec-color-background-error);
|
468 |
display: none;
|
469 |
padding-left: 50px;
|
470 |
-
}
|
471 |
-
|
472 |
-
.tribe-common .tribe-tickets__notice--error .tribe-tickets-notice__title {
|
473 |
position: relative;
|
474 |
}
|
475 |
|
476 |
-
.tribe-common .tribe-tickets__notice--error .
|
477 |
-
background-image: url(
|
478 |
background-size: contain;
|
479 |
content: '';
|
480 |
height: var(--tec-spacer-3);
|
481 |
-
left:
|
482 |
position: absolute;
|
483 |
-
top:
|
484 |
width: var(--tec-spacer-3);
|
485 |
}
|
486 |
|
@@ -488,7 +485,7 @@
|
|
488 |
"Barred" Notices (visible side borders)
|
489 |
*/
|
490 |
|
491 |
-
.tribe-common .tribe-tickets__notice--barred {
|
492 |
background-color: var(--tec-color-background);
|
493 |
border: var(--tec-spacer-0) solid var(--tec-color-border-secondary);
|
494 |
border-bottom: 0;
|
@@ -497,12 +494,12 @@
|
|
497 |
padding: 0 var(--tec-spacer-2);
|
498 |
}
|
499 |
|
500 |
-
.tribe-common .tribe-tickets__notice--barred-left {
|
501 |
border-right: 0;
|
502 |
padding: 0 0 0 var(--tec-spacer-2);
|
503 |
}
|
504 |
|
505 |
-
.tribe-common .tribe-tickets__notice--barred-right {
|
506 |
border-left: 0;
|
507 |
padding: 0 var(--tec-spacer-2) 0 0;
|
508 |
}
|
@@ -530,8 +527,8 @@
|
|
530 |
border-radius: var(--tec-border-radius-default);
|
531 |
box-shadow: var(--tec-box-shadow-tooltip);
|
532 |
height: auto !important;
|
533 |
-
padding: var(--tec-spacer-5);
|
534 |
max-width: 254px;
|
|
|
535 |
}
|
536 |
|
537 |
.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box {
|
@@ -651,21 +648,18 @@
|
|
651 |
|
652 |
.event-tickets .tribe-tickets__rsvp-wrapper {
|
653 |
background-color: var(--tec-color-background);
|
654 |
-
border-radius: var(--tec-border-radius-default);
|
655 |
border: 1px solid var(--tec-color-border-secondary);
|
|
|
|
|
656 |
max-width: 580px;
|
657 |
overflow: hidden;
|
658 |
position: relative;
|
659 |
-
width: 100%;
|
660 |
transition: all 0.3s ease;
|
661 |
-
|
662 |
}
|
663 |
|
664 |
.event-tickets .tribe-tickets__rsvp {
|
665 |
-
padding
|
666 |
-
padding-right: var(--tec-grid-gutter-small-half);
|
667 |
-
padding-top: var(--tec-spacer-10);
|
668 |
-
padding-bottom: var(--tec-spacer-10);
|
669 |
}
|
670 |
|
671 |
/**
|
@@ -675,11 +669,11 @@
|
|
675 |
*/
|
676 |
|
677 |
.event-tickets .tribe-tickets__rsvp-details-wrapper {
|
678 |
-
|
679 |
display: flex;
|
|
|
680 |
justify-content: center;
|
681 |
text-align: center;
|
682 |
-
align-items: center;
|
683 |
}
|
684 |
|
685 |
.event-tickets .tribe-tickets__rsvp-details {
|
@@ -727,11 +721,11 @@
|
|
727 |
*/
|
728 |
|
729 |
.event-tickets .tribe-tickets__rsvp-actions-wrapper {
|
730 |
-
|
731 |
display: flex;
|
|
|
732 |
justify-content: center;
|
733 |
text-align: center;
|
734 |
-
align-items: center;
|
735 |
}
|
736 |
|
737 |
.event-tickets .tribe-tickets__rsvp-actions {
|
@@ -784,21 +778,21 @@
|
|
784 |
* ------------------------------------------------------------------------- */
|
785 |
|
786 |
.event-tickets .tribe-tickets__rsvp-actions-success-going {
|
787 |
-
display: flex;
|
788 |
align-items: center;
|
|
|
789 |
justify-content: center;
|
790 |
}
|
791 |
|
792 |
.event-tickets .tribe-tickets__rsvp-actions-success-going-check-icon {
|
793 |
background-color: var(--tec-color-accent-primary);
|
794 |
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.6.1L3.9 6.8 1.4 4.3c-.1-.1-.3-.1-.4 0l-.8.8c-.1.1-.1.3 0 .4l3.4 3.4c.2.1.4.1.5 0l7.7-7.7c.1-.1.1-.3 0-.4L11 .1c-.1-.1-.3-.1-.4 0z' fill='%23fff'/%3E%3C/svg%3E");
|
795 |
-
background-repeat: no-repeat;
|
796 |
background-position: center;
|
|
|
797 |
border-radius: 100%;
|
798 |
display: inline-block;
|
799 |
height: var(--tec-spacer-7);
|
800 |
-
width: var(--tec-spacer-7);
|
801 |
margin: 0 var(--tec-spacer-0);
|
|
|
802 |
}
|
803 |
|
804 |
.event-tickets .tribe-tickets__rsvp-actions-success-going-text {
|
@@ -807,9 +801,9 @@
|
|
807 |
}
|
808 |
|
809 |
.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle {
|
810 |
-
margin-top: var(--tec-spacer-4);
|
811 |
display: flex;
|
812 |
justify-content: center;
|
|
|
813 |
}
|
814 |
|
815 |
.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle-input {
|
@@ -833,10 +827,10 @@
|
|
833 |
*/
|
834 |
|
835 |
.event-tickets .tribe-tickets__rsvp-message {
|
836 |
-
display: flex;
|
837 |
align-items: center;
|
838 |
background-color: var(--tec-color-accent-primary-background);
|
839 |
border-radius: var(--tec-border-radius-default);
|
|
|
840 |
padding: var(--tec-spacer-4) var(--tec-spacer-3);
|
841 |
}
|
842 |
|
@@ -847,9 +841,9 @@
|
|
847 |
|
848 |
.event-tickets .tribe-tickets__rsvp-message--success-icon {
|
849 |
display: inline-block;
|
850 |
-
width: var(--tec-spacer-3);
|
851 |
height: var(--tec-spacer-3);
|
852 |
margin-right: var(--tec-spacer-2);
|
|
|
853 |
}
|
854 |
|
855 |
.event-tickets .tribe-tickets__rsvp-message--success-icon path {
|
@@ -867,8 +861,8 @@
|
|
867 |
}
|
868 |
|
869 |
.event-tickets .tribe-tickets__rsvp-message--must-login-icon circle#dot, .event-tickets .tribe-tickets__rsvp-message--error-icon circle#dot {
|
870 |
-
stroke: transparent;
|
871 |
fill: var(--tec-color-icon-active);
|
|
|
872 |
}
|
873 |
|
874 |
.event-tickets .tribe-tickets__rsvp-message--must-login-icon path, .event-tickets .tribe-tickets__rsvp-message--error-icon path {
|
@@ -909,8 +903,8 @@
|
|
909 |
}
|
910 |
|
911 |
.event-tickets .tribe-tickets__rsvp-form-buttons {
|
912 |
-
display: flex;
|
913 |
align-items: baseline;
|
|
|
914 |
justify-content: flex-end;
|
915 |
padding-top: var(--tec-spacer-4);
|
916 |
}
|
@@ -949,8 +943,8 @@
|
|
949 |
}
|
950 |
|
951 |
.event-tickets .tribe-tickets__rsvp-ar-sidebar-wrapper {
|
952 |
-
flex: none;
|
953 |
display: flex;
|
|
|
954 |
}
|
955 |
|
956 |
.event-tickets .tribe-tickets__rsvp-ar-sidebar {
|
@@ -961,8 +955,8 @@
|
|
961 |
}
|
962 |
|
963 |
.event-tickets .tribe-tickets__rsvp-ar-quantity {
|
964 |
-
display: flex;
|
965 |
align-items: center;
|
|
|
966 |
margin-top: var(--tec-spacer-4);
|
967 |
}
|
968 |
|
@@ -984,8 +978,8 @@
|
|
984 |
text-align: center;
|
985 |
}
|
986 |
|
987 |
-
.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type="number"]
|
988 |
-
.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type="number"]
|
989 |
-webkit-appearance: none;
|
990 |
appearance: none;
|
991 |
}
|
@@ -1009,8 +1003,8 @@
|
|
1009 |
content: '';
|
1010 |
height: 2px;
|
1011 |
left: 9px;
|
1012 |
-
top: 12px; /* Fix for IE11 */
|
1013 |
position: absolute;
|
|
|
1014 |
width: 8px;
|
1015 |
}
|
1016 |
|
@@ -1053,7 +1047,6 @@
|
|
1053 |
height: 17px;
|
1054 |
margin-right: var(--tec-spacer-5);
|
1055 |
width: 14px;
|
1056 |
-
|
1057 |
}
|
1058 |
|
1059 |
.event-tickets .tribe-tickets__rsvp-ar-guest-icon path {
|
@@ -1062,14 +1055,14 @@
|
|
1062 |
}
|
1063 |
|
1064 |
.event-tickets .tribe-tickets__rsvp-ar-form-wrapper {
|
1065 |
-
background-color: #
|
1066 |
-
flex: none;
|
1067 |
display: flex;
|
|
|
1068 |
}
|
1069 |
|
1070 |
.event-tickets .tribe-tickets__rsvp-ar-form {
|
1071 |
-
width: 100%;
|
1072 |
padding: var(--tec-spacer-5) 0;
|
|
|
1073 |
}
|
1074 |
|
1075 |
.event-tickets .tribe-tickets__rsvp-ar-form .tribe-tickets__form {
|
@@ -1097,10 +1090,7 @@
|
|
1097 |
}
|
1098 |
|
1099 |
.event-tickets .tribe-tickets__rsvp {
|
1100 |
-
padding
|
1101 |
-
padding-right: var(--tec-grid-gutter-half);
|
1102 |
-
padding-top: var(--tec-spacer-5);
|
1103 |
-
padding-bottom: var(--tec-spacer-5)
|
1104 |
}
|
1105 |
|
1106 |
.event-tickets .tribe-tickets__rsvp-details-wrapper {
|
@@ -1222,7 +1212,6 @@
|
|
1222 |
height: 14px;
|
1223 |
margin-right: var(--tec-spacer-0);
|
1224 |
width: 11px
|
1225 |
-
|
1226 |
}
|
1227 |
|
1228 |
.event-tickets .tribe-tickets__rsvp-ar-form-wrapper {
|
321 |
.accordion-header {
|
322 |
background: none;
|
323 |
border: 0;
|
324 |
+
box-sizing: border-box;
|
325 |
color: inherit;
|
326 |
cursor: pointer;
|
327 |
font-size: 12px;
|
328 |
font-weight: bold;
|
329 |
padding: 10px 20px;
|
|
|
330 |
position: relative;
|
331 |
text-align: left;
|
332 |
width: 100%;
|
340 |
content: '\f132';
|
341 |
font-family: 'dashicons';
|
342 |
font-size: 10px;
|
|
|
343 |
font-weight: 400;
|
344 |
height: 14px;
|
345 |
left: 0;
|
346 |
+
line-height: 17px;
|
347 |
padding: 0;
|
348 |
+
padding-right: 1px;
|
349 |
position: absolute;
|
350 |
+
text-align: center;
|
351 |
top: 12px;
|
352 |
width: 15px;
|
|
|
|
|
353 |
}
|
354 |
|
355 |
.accordion-header:after {
|
|
|
356 |
border-bottom: 1px solid #ddd;
|
357 |
+
content: '';
|
358 |
position: absolute;
|
359 |
right: 0;
|
|
|
360 |
top: 50%;
|
361 |
transform: translateY(-50%);
|
362 |
+
width: 80%;
|
363 |
}
|
364 |
|
365 |
.accordion-header.is-active:before {
|
375 |
background: none;
|
376 |
}
|
377 |
|
378 |
+
.tribe-tickets-editor-history:after {
|
379 |
width: calc(100% - 80px);
|
380 |
}
|
381 |
|
382 |
+
.tribe_attendee_meta:after {
|
383 |
width: calc(100% - 170px);
|
384 |
}
|
385 |
|
386 |
+
.tribe_advanced_meta:after {
|
387 |
width: calc(100% - 105px);
|
388 |
}
|
389 |
|
438 |
z-index: var(--tec-z-index-spinner-container);
|
439 |
}
|
440 |
|
441 |
+
.tribe-common .tribe-tickets__notice, .event-tickets .tribe-tickets__notice {
|
|
|
442 |
background-color: var(--tec-color-background-secondary);
|
443 |
border-radius: var(--tec-border-radius-default);
|
444 |
margin: var(--tec-spacer-4) 0;
|
445 |
+
padding: var(--tec-spacer-3);
|
446 |
}
|
447 |
|
448 |
+
.tribe-common .tribe-tickets__notice > *:last-child, .event-tickets .tribe-tickets__notice > *:last-child {
|
|
|
449 |
margin-bottom: 0;
|
450 |
+
padding-bottom: 0;
|
451 |
}
|
452 |
|
453 |
+
.tribe-common .tribe-tickets-notice__title, .event-tickets .tribe-tickets-notice__title {
|
454 |
margin: 0;
|
455 |
position: relative;
|
456 |
}
|
457 |
|
458 |
+
.tribe-common .tribe-tickets-notice__title:empty, .event-tickets .tribe-tickets-notice__title:empty {
|
459 |
display: none;
|
460 |
}
|
461 |
|
463 |
Error Notices
|
464 |
*/
|
465 |
|
466 |
+
.tribe-common .tribe-tickets__notice--error, .event-tickets .tribe-tickets__notice--error {
|
467 |
background-color: var(--tec-color-background-error);
|
468 |
display: none;
|
469 |
padding-left: 50px;
|
|
|
|
|
|
|
470 |
position: relative;
|
471 |
}
|
472 |
|
473 |
+
.tribe-common .tribe-tickets__notice--error:before, .event-tickets .tribe-tickets__notice--error:before {
|
474 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");
|
475 |
background-size: contain;
|
476 |
content: '';
|
477 |
height: var(--tec-spacer-3);
|
478 |
+
left: var(--tec-spacer-4);
|
479 |
position: absolute;
|
480 |
+
top: var(--tec-spacer-4);
|
481 |
width: var(--tec-spacer-3);
|
482 |
}
|
483 |
|
485 |
"Barred" Notices (visible side borders)
|
486 |
*/
|
487 |
|
488 |
+
.tribe-common .tribe-tickets__notice--barred, .event-tickets .tribe-tickets__notice--barred {
|
489 |
background-color: var(--tec-color-background);
|
490 |
border: var(--tec-spacer-0) solid var(--tec-color-border-secondary);
|
491 |
border-bottom: 0;
|
494 |
padding: 0 var(--tec-spacer-2);
|
495 |
}
|
496 |
|
497 |
+
.tribe-common .tribe-tickets__notice--barred-left, .event-tickets .tribe-tickets__notice--barred-left {
|
498 |
border-right: 0;
|
499 |
padding: 0 0 0 var(--tec-spacer-2);
|
500 |
}
|
501 |
|
502 |
+
.tribe-common .tribe-tickets__notice--barred-right, .event-tickets .tribe-tickets__notice--barred-right {
|
503 |
border-left: 0;
|
504 |
padding: 0 var(--tec-spacer-2) 0 0;
|
505 |
}
|
527 |
border-radius: var(--tec-border-radius-default);
|
528 |
box-shadow: var(--tec-box-shadow-tooltip);
|
529 |
height: auto !important;
|
|
|
530 |
max-width: 254px;
|
531 |
+
padding: var(--tec-spacer-5);
|
532 |
}
|
533 |
|
534 |
.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box {
|
648 |
|
649 |
.event-tickets .tribe-tickets__rsvp-wrapper {
|
650 |
background-color: var(--tec-color-background);
|
|
|
651 |
border: 1px solid var(--tec-color-border-secondary);
|
652 |
+
border-radius: var(--tec-border-radius-default);
|
653 |
+
margin-top: var(--tec-spacer-6);
|
654 |
max-width: 580px;
|
655 |
overflow: hidden;
|
656 |
position: relative;
|
|
|
657 |
transition: all 0.3s ease;
|
658 |
+
width: 100%;
|
659 |
}
|
660 |
|
661 |
.event-tickets .tribe-tickets__rsvp {
|
662 |
+
padding: var(--tec-spacer-10) var(--tec-grid-gutter-small-half);
|
|
|
|
|
|
|
663 |
}
|
664 |
|
665 |
/**
|
669 |
*/
|
670 |
|
671 |
.event-tickets .tribe-tickets__rsvp-details-wrapper {
|
672 |
+
align-items: center;
|
673 |
display: flex;
|
674 |
+
flex: none;
|
675 |
justify-content: center;
|
676 |
text-align: center;
|
|
|
677 |
}
|
678 |
|
679 |
.event-tickets .tribe-tickets__rsvp-details {
|
721 |
*/
|
722 |
|
723 |
.event-tickets .tribe-tickets__rsvp-actions-wrapper {
|
724 |
+
align-items: center;
|
725 |
display: flex;
|
726 |
+
flex: none;
|
727 |
justify-content: center;
|
728 |
text-align: center;
|
|
|
729 |
}
|
730 |
|
731 |
.event-tickets .tribe-tickets__rsvp-actions {
|
778 |
* ------------------------------------------------------------------------- */
|
779 |
|
780 |
.event-tickets .tribe-tickets__rsvp-actions-success-going {
|
|
|
781 |
align-items: center;
|
782 |
+
display: flex;
|
783 |
justify-content: center;
|
784 |
}
|
785 |
|
786 |
.event-tickets .tribe-tickets__rsvp-actions-success-going-check-icon {
|
787 |
background-color: var(--tec-color-accent-primary);
|
788 |
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.6.1L3.9 6.8 1.4 4.3c-.1-.1-.3-.1-.4 0l-.8.8c-.1.1-.1.3 0 .4l3.4 3.4c.2.1.4.1.5 0l7.7-7.7c.1-.1.1-.3 0-.4L11 .1c-.1-.1-.3-.1-.4 0z' fill='%23fff'/%3E%3C/svg%3E");
|
|
|
789 |
background-position: center;
|
790 |
+
background-repeat: no-repeat;
|
791 |
border-radius: 100%;
|
792 |
display: inline-block;
|
793 |
height: var(--tec-spacer-7);
|
|
|
794 |
margin: 0 var(--tec-spacer-0);
|
795 |
+
width: var(--tec-spacer-7);
|
796 |
}
|
797 |
|
798 |
.event-tickets .tribe-tickets__rsvp-actions-success-going-text {
|
801 |
}
|
802 |
|
803 |
.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle {
|
|
|
804 |
display: flex;
|
805 |
justify-content: center;
|
806 |
+
margin-top: var(--tec-spacer-4);
|
807 |
}
|
808 |
|
809 |
.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle-input {
|
827 |
*/
|
828 |
|
829 |
.event-tickets .tribe-tickets__rsvp-message {
|
|
|
830 |
align-items: center;
|
831 |
background-color: var(--tec-color-accent-primary-background);
|
832 |
border-radius: var(--tec-border-radius-default);
|
833 |
+
display: flex;
|
834 |
padding: var(--tec-spacer-4) var(--tec-spacer-3);
|
835 |
}
|
836 |
|
841 |
|
842 |
.event-tickets .tribe-tickets__rsvp-message--success-icon {
|
843 |
display: inline-block;
|
|
|
844 |
height: var(--tec-spacer-3);
|
845 |
margin-right: var(--tec-spacer-2);
|
846 |
+
width: var(--tec-spacer-3);
|
847 |
}
|
848 |
|
849 |
.event-tickets .tribe-tickets__rsvp-message--success-icon path {
|
861 |
}
|
862 |
|
863 |
.event-tickets .tribe-tickets__rsvp-message--must-login-icon circle#dot, .event-tickets .tribe-tickets__rsvp-message--error-icon circle#dot {
|
|
|
864 |
fill: var(--tec-color-icon-active);
|
865 |
+
stroke: transparent;
|
866 |
}
|
867 |
|
868 |
.event-tickets .tribe-tickets__rsvp-message--must-login-icon path, .event-tickets .tribe-tickets__rsvp-message--error-icon path {
|
903 |
}
|
904 |
|
905 |
.event-tickets .tribe-tickets__rsvp-form-buttons {
|
|
|
906 |
align-items: baseline;
|
907 |
+
display: flex;
|
908 |
justify-content: flex-end;
|
909 |
padding-top: var(--tec-spacer-4);
|
910 |
}
|
943 |
}
|
944 |
|
945 |
.event-tickets .tribe-tickets__rsvp-ar-sidebar-wrapper {
|
|
|
946 |
display: flex;
|
947 |
+
flex: none;
|
948 |
}
|
949 |
|
950 |
.event-tickets .tribe-tickets__rsvp-ar-sidebar {
|
955 |
}
|
956 |
|
957 |
.event-tickets .tribe-tickets__rsvp-ar-quantity {
|
|
|
958 |
align-items: center;
|
959 |
+
display: flex;
|
960 |
margin-top: var(--tec-spacer-4);
|
961 |
}
|
962 |
|
978 |
text-align: center;
|
979 |
}
|
980 |
|
981 |
+
.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type="number"]:-webkit-inner-spin-button,
|
982 |
+
.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type="number"]:-webkit-outer-spin-button {
|
983 |
-webkit-appearance: none;
|
984 |
appearance: none;
|
985 |
}
|
1003 |
content: '';
|
1004 |
height: 2px;
|
1005 |
left: 9px;
|
|
|
1006 |
position: absolute;
|
1007 |
+
top: 12px; /* Fix for IE11 */
|
1008 |
width: 8px;
|
1009 |
}
|
1010 |
|
1047 |
height: 17px;
|
1048 |
margin-right: var(--tec-spacer-5);
|
1049 |
width: 14px;
|
|
|
1050 |
}
|
1051 |
|
1052 |
.event-tickets .tribe-tickets__rsvp-ar-guest-icon path {
|
1055 |
}
|
1056 |
|
1057 |
.event-tickets .tribe-tickets__rsvp-ar-form-wrapper {
|
1058 |
+
background-color: #f6f7f9;
|
|
|
1059 |
display: flex;
|
1060 |
+
flex: none;
|
1061 |
}
|
1062 |
|
1063 |
.event-tickets .tribe-tickets__rsvp-ar-form {
|
|
|
1064 |
padding: var(--tec-spacer-5) 0;
|
1065 |
+
width: 100%;
|
1066 |
}
|
1067 |
|
1068 |
.event-tickets .tribe-tickets__rsvp-ar-form .tribe-tickets__form {
|
1090 |
}
|
1091 |
|
1092 |
.event-tickets .tribe-tickets__rsvp {
|
1093 |
+
padding: var(--tec-spacer-5) var(-tec-grid-gutter-half)
|
|
|
|
|
|
|
1094 |
}
|
1095 |
|
1096 |
.event-tickets .tribe-tickets__rsvp-details-wrapper {
|
1212 |
height: 14px;
|
1213 |
margin-right: var(--tec-spacer-0);
|
1214 |
width: 11px
|
|
|
1215 |
}
|
1216 |
|
1217 |
.event-tickets .tribe-tickets__rsvp-ar-form-wrapper {
|
src/resources/css/rsvp.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.accordion-header{background:none;border:0;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;box-sizing:border-box;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;line-height:17px;font-weight:400;height:14px;left:0;padding:0;position:absolute;top:12px;width:15px;text-align:center;padding-right:1px}.accordion-header:after{content:"";border-bottom:1px solid #ddd;position:absolute;right:0;width:80%;top:50%;transform:translateY(-50%)}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common .tribe-tickets__notice{padding:var(--tec-spacer-3);background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0}.tribe-common .tribe-tickets__notice>:last-child{padding-bottom:0;margin-bottom:0}.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.tribe-common .tribe-tickets-notice__title:empty{display:none}.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px}.tribe-common .tribe-tickets__notice--error .tribe-tickets-notice__title{position:relative}.tribe-common .tribe-tickets__notice--error .tribe-tickets-notice__title:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:calc(var(--tec-spacer-7)*-1);position:absolute;top:2px;width:var(--tec-spacer-3)}.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;padding:var(--tec-spacer-5);max-width:254px}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.event-tickets .tribe-tickets__rsvp-wrapper{background-color:var(--tec-color-background);border-radius:var(--tec-border-radius-default);border:1px solid var(--tec-color-border-secondary);max-width:580px;overflow:hidden;position:relative;width:100%;transition:all .3s ease;margin-top:var(--tec-spacer-6)}.event-tickets .tribe-tickets__rsvp{padding:var(--tec-spacer-10) var(--tec-grid-gutter-small-half)}.event-tickets .tribe-tickets__rsvp-details-wrapper{flex:none;display:flex;justify-content:center;text-align:center;align-items:center}.event-tickets .tribe-tickets__rsvp-details{text-align:center;width:100%}.event-tickets .tribe-tickets__rsvp-description{color:var(--tec-color-text-secondary);margin-top:var(--tec-spacer-1)}.event-tickets .tribe-tickets__rsvp-attendance{display:flex;flex-direction:column;margin-top:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-attendance-number{font-size:var(--tec-font-size-9)}.event-tickets .tribe-tickets__rsvp-attendance-number.tribe-tickets__rsvp-attendance-number--no-description{font-size:var(--tec-font-size-10)}.event-tickets .tribe-tickets__rsvp-attendance-going{color:var(--tec-color-text-secondary)}.event-tickets .tribe-tickets__rsvp-availability{color:var(--tec-color-text-secondary);margin-top:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-availability-days-left,.event-tickets .tribe-tickets__rsvp-availability-quantity{color:var(--tec-color-text-primary)}.event-tickets .tribe-tickets__rsvp-actions-wrapper{flex:none;display:flex;justify-content:center;text-align:center;align-items:center}.event-tickets .tribe-tickets__rsvp-actions{border-top:1px dashed var(--tec-color-border-secondary);margin-top:var(--tec-spacer-10);padding:var(--tec-spacer-10) 0;width:100%}.event-tickets .tribe-tickets__rsvp-actions .tribe-common-c-btn{max-width:125px}.event-tickets .tribe-tickets__rsvp-actions-button-going,.event-tickets .tribe-tickets__rsvp-actions-button-not-going{font-family:var(--tec-font-family-sans-serif)}.event-tickets .tribe-tickets__rsvp-actions-rsvp-going{margin-top:var(--tec-spacer-2)}.event-tickets .tribe-tickets__rsvp-actions-rsvp-not-going{margin-top:var(--tec-spacer-8)}.event-tickets .tribe-tickets__rsvp-actions-button-not-going{font-size:var(--tec-font-size-2)}.event-tickets .tribe-tickets__rsvp-actions-full{padding:var(--tec-spacer-12) var(--tec-spacer-7) var(--tec-spacer-11)}.event-tickets .tribe-tickets__rsvp-actions-full-text{color:var(--tec-color-text-secondary);text-transform:uppercase}.event-tickets .tribe-tickets__rsvp-actions-success-going{display:flex;align-items:center;justify-content:center}.event-tickets .tribe-tickets__rsvp-actions-success-going-check-icon{background-color:var(--tec-color-accent-primary);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.6.1L3.9 6.8 1.4 4.3c-.1-.1-.3-.1-.4 0l-.8.8c-.1.1-.1.3 0 .4l3.4 3.4c.2.1.4.1.5 0l7.7-7.7c.1-.1.1-.3 0-.4L11 .1c-.1-.1-.3-.1-.4 0z' fill='%23fff'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;border-radius:100%;display:inline-block;height:var(--tec-spacer-7);width:var(--tec-spacer-7);margin:0 var(--tec-spacer-0)}.event-tickets .tribe-tickets__rsvp-actions-success-going-text{margin-left:var(--tec-spacer-1);text-transform:capitalize}.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle{margin-top:var(--tec-spacer-4);display:flex;justify-content:center}.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle-input{flex:none}.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle-label{text-align:left}.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle-label-underline{cursor:help;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.event-tickets .tribe-tickets__rsvp-message{display:flex;align-items:center;background-color:var(--tec-color-accent-primary-background);border-radius:var(--tec-border-radius-default);padding:var(--tec-spacer-4) var(--tec-spacer-3)}.event-tickets .tribe-tickets__rsvp-message--error,.event-tickets .tribe-tickets__rsvp-message--error.tribe-tickets__rsvp-message{background-color:var(--tec-color-background-error)}.event-tickets .tribe-tickets__rsvp-message--success-icon{display:inline-block;width:var(--tec-spacer-3);height:var(--tec-spacer-3);margin-right:var(--tec-spacer-2)}.event-tickets .tribe-tickets__rsvp-message--success-icon path{stroke:var(--tec-color-icon-active)}.event-tickets .tribe-tickets__rsvp-message--error-icon,.event-tickets .tribe-tickets__rsvp-message--must-login-icon{display:inline-block;margin-right:var(--tec-spacer-2)}.event-tickets .tribe-tickets__rsvp-message--error-icon circle,.event-tickets .tribe-tickets__rsvp-message--must-login-icon circle{stroke:var(--tec-color-icon-active)}.event-tickets .tribe-tickets__rsvp-message--error-icon circle#dot,.event-tickets .tribe-tickets__rsvp-message--must-login-icon circle#dot{stroke:transparent;fill:var(--tec-color-icon-active)}.event-tickets .tribe-tickets__rsvp-message--error-icon path,.event-tickets .tribe-tickets__rsvp-message--must-login-icon path{stroke:var(--tec-color-icon-active)}.event-tickets .tribe-tickets__rsvp-message-link{color:var(--tec-color-accent-primary)}.event-tickets .tribe-common-c-btn:disabled{background-color:var(--tec-color-accent-primary);cursor:not-allowed}.event-tickets button.tribe-common-cta:disabled{cursor:not-allowed}.event-tickets .tribe-tickets__rsvp-form-wrapper{padding:var(--tec-spacer-5)}.event-tickets .tribe-tickets__rsvp-form-title{border-bottom:1px dashed var(--tec-color-border-secondary);padding-bottom:var(--tec-spacer-5)}.event-tickets .tribe-tickets__rsvp-form-content{margin-bottom:var(--tec-spacer-1);margin-top:var(--tec-spacer-8)}.event-tickets .tribe-tickets__rsvp-form-buttons{display:flex;align-items:baseline;justify-content:flex-end;padding-top:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-form-buttons>*{margin-left:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-form-button{width:auto}.event-tickets .tribe-tickets__rsvp-form-button--cancel{color:var(--tec-color-text-secondary)}.event-tickets .tribe-tickets__rsvp-form-button--cancel:focus,.event-tickets .tribe-tickets__rsvp-form-button--cancel:hover{color:var(--tec-color-text-primary)}.event-tickets .tribe-tickets__rsvp-form-button--submit{padding-left:var(--tec-spacer-6);padding-right:var(--tec-spacer-6)}.event-tickets .tribe-tickets__rsvp-ar{padding-left:var(--tec-grid-gutter-small-half);padding-right:var(--tec-grid-gutter-small-half)}.event-tickets .tribe-tickets__rsvp-ar-sidebar-wrapper{flex:none;display:flex}.event-tickets .tribe-tickets__rsvp-ar-sidebar{border-bottom:1px dashed var(--tec-color-border-secondary);margin-top:var(--tec-spacer-5);padding:var(--tec-spacer-5) 0;width:100%}.event-tickets .tribe-tickets__rsvp-ar-quantity{display:flex;align-items:center;margin-top:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-ar-quantity-input{align-items:center;display:flex;margin-left:var(--tec-spacer-3)}.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:none;height:var(--tec-spacer-8);max-width:var(--tec-spacer-8);padding:var(--tec-spacer-0) 0;text-align:center}.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type=number]::-webkit-inner-spin-button,.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none}.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number{background-color:transparent;border:1px solid var(--tec-color-border-default);border-radius:50%;flex:none;height:28px;padding:0;position:relative;width:28px}.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number:after,.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number:before{background-color:var(--tec-color-icon-active);content:"";height:2px;left:9px;top:12px;position:absolute;width:8px}.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number:focus,.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number:hover{background:none;border-color:var(--tec-color-border-active)}.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number--plus:after{transform:rotate(90deg)}.event-tickets .tribe-tickets__rsvp-ar-guest-list{margin-top:var(--tec-spacer-7)!important}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item{display:inline-block}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button--inactive:focus,.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button--inactive:hover,.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button:focus,.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button:hover{color:var(--tec-color-text-primary)}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button--inactive{color:var(--tec-color-text-secondary)}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button--inactive .tribe-tickets__rsvp-ar-guest-icon path{fill:var(--tec-color-icon-disabled);stroke:var(--tec-color-icon-disabled)}.event-tickets .tribe-tickets__rsvp-ar-guest-icon{display:inline-block;height:17px;margin-right:var(--tec-spacer-5);width:14px}.event-tickets .tribe-tickets__rsvp-ar-guest-icon path{fill:var(--tec-color-icon-active);stroke:var(--tec-color-icon-active)}.event-tickets .tribe-tickets__rsvp-ar-form-wrapper{background-color:#f6f7f9;flex:none;display:flex}.event-tickets .tribe-tickets__rsvp-ar-form{width:100%;padding:var(--tec-spacer-5) 0}.event-tickets .tribe-tickets__rsvp-ar-form .tribe-tickets__form{margin-top:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-ar-form-title{color:var(--tec-color-text-secondary)}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}.event-tickets .tribe-tickets__rsvp{padding:var(--tec-spacer-5) var(--tec-grid-gutter-half)}.event-tickets .tribe-tickets__rsvp-details-wrapper{width:calc(var(--tec-grid-width-1-of-8)*5)}.event-tickets .tribe-tickets__rsvp-details{text-align:left;text-align:initial}.event-tickets .tribe-tickets__rsvp-description{margin-top:var(--tec-spacer-2)}.event-tickets .tribe-tickets__rsvp-attendance{margin-top:var(--tec-spacer-5)}.event-tickets .tribe-tickets__rsvp-attendance-number{font-size:var(--tec-font-size-7)}.event-tickets .tribe-tickets__rsvp-availability{margin-top:var(--tec-spacer-5)}.event-tickets .tribe-tickets__rsvp-actions-wrapper{border-left:1px dashed var(--tec-color-border-secondary);width:calc(var(--tec-grid-width-1-of-8)*3)}.event-tickets .tribe-tickets__rsvp-actions{border-top:0;margin-top:0;padding:0}.event-tickets .tribe-tickets__rsvp-actions-rsvp-not-going{margin-top:var(--tec-spacer-5)}.event-tickets .tribe-tickets__rsvp-actions-button-not-going{font-size:var(--tec-font-size-1)}.event-tickets .tribe-tickets__rsvp-actions-full{padding:0 var(--tec-spacer-7)}.event-tickets .tribe-tickets__rsvp-actions-success-going{justify-content:flex-start}.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle{justify-content:flex-start;margin-top:var(--tec-spacer-1)}.event-tickets .tribe-tickets__rsvp-message{padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__rsvp-form-title{border:none;padding-bottom:0}.event-tickets .tribe-tickets__rsvp-form-content{margin-top:var(--tec-spacer-5)}.event-tickets .tribe-tickets__form input[type=number].tribe-tickets__rsvp-form-input-number{max-width:140px}.event-tickets .tribe-tickets__rsvp-ar{flex-direction:row-reverse;padding-left:var(--tec-grid-gutter-half);padding-right:var(--tec-grid-gutter-half)}.event-tickets .tribe-tickets__rsvp-ar-sidebar-wrapper{border-left:1px dashed var(--tec-color-border-secondary);width:calc(var(--tec-grid-width-1-of-8)*3)}.event-tickets .tribe-tickets__rsvp-ar-sidebar{border:0;margin-top:0;padding-left:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-ar-quantity{display:block}.event-tickets .tribe-tickets__rsvp-ar-quantity-input{margin-left:0}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item{display:block}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item:not(:first-of-type){margin-top:var(--tec-spacer-7)}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-title{clip:auto;height:auto;margin:0;position:static;width:auto}.event-tickets .tribe-tickets__rsvp-ar-guest-icon{height:14px;margin-right:var(--tec-spacer-0);width:11px}.event-tickets .tribe-tickets__rsvp-ar-form-wrapper{width:calc(var(--tec-grid-width-1-of-8)*5)}.event-tickets .tribe-tickets__rsvp-ar-form{text-align:left;text-align:initial}}@media (prefers-reduced-motion:reduce){.event-tickets .tribe-tickets__rsvp-wrapper{transition:none}}@media (min-width:600px){.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type=number]{height:var(--tec-spacer-8)}}
|
1 |
+
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.event-tickets .tribe-tickets__rsvp-wrapper{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-secondary);border-radius:var(--tec-border-radius-default);margin-top:var(--tec-spacer-6);max-width:580px;overflow:hidden;position:relative;transition:all .3s ease;width:100%}.event-tickets .tribe-tickets__rsvp{padding:var(--tec-spacer-10) var(--tec-grid-gutter-small-half)}.event-tickets .tribe-tickets__rsvp-details-wrapper{align-items:center;display:flex;flex:none;justify-content:center;text-align:center}.event-tickets .tribe-tickets__rsvp-details{text-align:center;width:100%}.event-tickets .tribe-tickets__rsvp-description{color:var(--tec-color-text-secondary);margin-top:var(--tec-spacer-1)}.event-tickets .tribe-tickets__rsvp-attendance{display:flex;flex-direction:column;margin-top:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-attendance-number{font-size:var(--tec-font-size-9)}.event-tickets .tribe-tickets__rsvp-attendance-number.tribe-tickets__rsvp-attendance-number--no-description{font-size:var(--tec-font-size-10)}.event-tickets .tribe-tickets__rsvp-attendance-going{color:var(--tec-color-text-secondary)}.event-tickets .tribe-tickets__rsvp-availability{color:var(--tec-color-text-secondary);margin-top:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-availability-days-left,.event-tickets .tribe-tickets__rsvp-availability-quantity{color:var(--tec-color-text-primary)}.event-tickets .tribe-tickets__rsvp-actions-wrapper{align-items:center;display:flex;flex:none;justify-content:center;text-align:center}.event-tickets .tribe-tickets__rsvp-actions{border-top:1px dashed var(--tec-color-border-secondary);margin-top:var(--tec-spacer-10);padding:var(--tec-spacer-10) 0;width:100%}.event-tickets .tribe-tickets__rsvp-actions .tribe-common-c-btn{max-width:125px}.event-tickets .tribe-tickets__rsvp-actions-button-going,.event-tickets .tribe-tickets__rsvp-actions-button-not-going{font-family:var(--tec-font-family-sans-serif)}.event-tickets .tribe-tickets__rsvp-actions-rsvp-going{margin-top:var(--tec-spacer-2)}.event-tickets .tribe-tickets__rsvp-actions-rsvp-not-going{margin-top:var(--tec-spacer-8)}.event-tickets .tribe-tickets__rsvp-actions-button-not-going{font-size:var(--tec-font-size-2)}.event-tickets .tribe-tickets__rsvp-actions-full{padding:var(--tec-spacer-12) var(--tec-spacer-7) var(--tec-spacer-11)}.event-tickets .tribe-tickets__rsvp-actions-full-text{color:var(--tec-color-text-secondary);text-transform:uppercase}.event-tickets .tribe-tickets__rsvp-actions-success-going{align-items:center;display:flex;justify-content:center}.event-tickets .tribe-tickets__rsvp-actions-success-going-check-icon{background-color:var(--tec-color-accent-primary);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.6.1L3.9 6.8 1.4 4.3c-.1-.1-.3-.1-.4 0l-.8.8c-.1.1-.1.3 0 .4l3.4 3.4c.2.1.4.1.5 0l7.7-7.7c.1-.1.1-.3 0-.4L11 .1c-.1-.1-.3-.1-.4 0z' fill='%23fff'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;border-radius:100%;display:inline-block;height:var(--tec-spacer-7);margin:0 var(--tec-spacer-0);width:var(--tec-spacer-7)}.event-tickets .tribe-tickets__rsvp-actions-success-going-text{margin-left:var(--tec-spacer-1);text-transform:capitalize}.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle{display:flex;justify-content:center;margin-top:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle-input{flex:none}.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle-label{text-align:left}.event-tickets .tribe-tickets__rsvp-actions-success-going-toggle-label-underline{cursor:help;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.event-tickets .tribe-tickets__rsvp-message{align-items:center;background-color:var(--tec-color-accent-primary-background);border-radius:var(--tec-border-radius-default);display:flex;padding:var(--tec-spacer-4) var(--tec-spacer-3)}.event-tickets .tribe-tickets__rsvp-message--error,.event-tickets .tribe-tickets__rsvp-message--error.tribe-tickets__rsvp-message{background-color:var(--tec-color-background-error)}.event-tickets .tribe-tickets__rsvp-message--success-icon{display:inline-block;height:var(--tec-spacer-3);margin-right:var(--tec-spacer-2);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__rsvp-message--success-icon path{stroke:var(--tec-color-icon-active)}.event-tickets .tribe-tickets__rsvp-message--error-icon,.event-tickets .tribe-tickets__rsvp-message--must-login-icon{display:inline-block;margin-right:var(--tec-spacer-2)}.event-tickets .tribe-tickets__rsvp-message--error-icon circle,.event-tickets .tribe-tickets__rsvp-message--must-login-icon circle{stroke:var(--tec-color-icon-active)}.event-tickets .tribe-tickets__rsvp-message--error-icon circle#dot,.event-tickets .tribe-tickets__rsvp-message--must-login-icon circle#dot{fill:var(--tec-color-icon-active);stroke:transparent}.event-tickets .tribe-tickets__rsvp-message--error-icon path,.event-tickets .tribe-tickets__rsvp-message--must-login-icon path{stroke:var(--tec-color-icon-active)}.event-tickets .tribe-tickets__rsvp-message-link{color:var(--tec-color-accent-primary)}.event-tickets .tribe-common-c-btn:disabled{background-color:var(--tec-color-accent-primary);cursor:not-allowed}.event-tickets button.tribe-common-cta:disabled{cursor:not-allowed}.event-tickets .tribe-tickets__rsvp-form-wrapper{padding:var(--tec-spacer-5)}.event-tickets .tribe-tickets__rsvp-form-title{border-bottom:1px dashed var(--tec-color-border-secondary);padding-bottom:var(--tec-spacer-5)}.event-tickets .tribe-tickets__rsvp-form-content{margin-bottom:var(--tec-spacer-1);margin-top:var(--tec-spacer-8)}.event-tickets .tribe-tickets__rsvp-form-buttons{align-items:baseline;display:flex;justify-content:flex-end;padding-top:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-form-buttons>*{margin-left:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-form-button{width:auto}.event-tickets .tribe-tickets__rsvp-form-button--cancel{color:var(--tec-color-text-secondary)}.event-tickets .tribe-tickets__rsvp-form-button--cancel:focus,.event-tickets .tribe-tickets__rsvp-form-button--cancel:hover{color:var(--tec-color-text-primary)}.event-tickets .tribe-tickets__rsvp-form-button--submit{padding-left:var(--tec-spacer-6);padding-right:var(--tec-spacer-6)}.event-tickets .tribe-tickets__rsvp-ar{padding-left:var(--tec-grid-gutter-small-half);padding-right:var(--tec-grid-gutter-small-half)}.event-tickets .tribe-tickets__rsvp-ar-sidebar-wrapper{display:flex;flex:none}.event-tickets .tribe-tickets__rsvp-ar-sidebar{border-bottom:1px dashed var(--tec-color-border-secondary);margin-top:var(--tec-spacer-5);padding:var(--tec-spacer-5) 0;width:100%}.event-tickets .tribe-tickets__rsvp-ar-quantity{align-items:center;display:flex;margin-top:var(--tec-spacer-4)}.event-tickets .tribe-tickets__rsvp-ar-quantity-input{align-items:center;display:flex;margin-left:var(--tec-spacer-3)}.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:none;height:var(--tec-spacer-8);max-width:var(--tec-spacer-8);padding:var(--tec-spacer-0) 0;text-align:center}.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type=number]:-webkit-inner-spin-button,.event-tickets .tribe-tickets__rsvp-ar-quantity-input input[type=number]:-webkit-outer-spin-button{-webkit-appearance:none;appearance:none}.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number{background-color:transparent;border:1px solid var(--tec-color-border-default);border-radius:50%;flex:none;height:28px;padding:0;position:relative;width:28px}.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number:after,.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number:before{background-color:var(--tec-color-icon-active);content:"";height:2px;left:9px;position:absolute;top:12px;width:8px}.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number:focus,.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number:hover{background:none;border-color:var(--tec-color-border-active)}.event-tickets .tribe-tickets__rsvp-ar-quantity-input-number--plus:after{transform:rotate(90deg)}.event-tickets .tribe-tickets__rsvp-ar-guest-list{margin-top:var(--tec-spacer-7)!important}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item{display:inline-block}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button--inactive:focus,.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button--inactive:hover,.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button:focus,.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button:hover{color:var(--tec-color-text-primary)}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button--inactive{color:var(--tec-color-text-secondary)}.event-tickets .tribe-tickets__rsvp-ar-guest-list-item-button--inactive .tribe-tickets__rsvp-ar-guest-icon path{fill:var(--tec-color-icon-disabled);stroke:var(--tec-color-icon-disabled)}.event-tickets .tribe-tickets__rsvp-ar
|