MCPcopy
hub / github.com/QwikDev/partytown / w

Function w

tests/integrations/hubspot/shell.js:8445–8557  ·  view source on GitHub ↗
(o)

Source from the content-addressed store, hash-verified

8443 );
8444 },
8445 w = function (o) {
8446 var s = this,
8447 l = s.config(o);
8448 s._onMouseDown = function (e) {
8449 if (s._v) {
8450 var t = (e = e || window.event).target || e.srcElement;
8451 if (t) {
8452 if (!c(t.parentNode, 'is-disabled')) {
8453 if (c(t, 'pika-button') && !c(t, 'is-empty')) {
8454 s.setDate(
8455 new Date(
8456 t.getAttribute('data-pika-year'),
8457 t.getAttribute('data-pika-month'),
8458 t.getAttribute('data-pika-day')
8459 )
8460 );
8461 l.bound &&
8462 a(function () {
8463 s.hide();
8464 l.field && l.field.blur();
8465 }, 100);
8466 return;
8467 }
8468 c(t, 'pika-prev') ? s.prevMonth() : c(t, 'pika-next') && s.nextMonth();
8469 }
8470 if (c(t, 'pika-select')) s._c = !0;
8471 else {
8472 if (!e.preventDefault) {
8473 e.returnValue = !1;
8474 return !1;
8475 }
8476 e.preventDefault();
8477 }
8478 }
8479 }
8480 };
8481 s._onChange = function (e) {
8482 var t = (e = e || window.event).target || e.srcElement;
8483 t &&
8484 (c(t, 'pika-select-month')
8485 ? s.gotoMonth(t.value)
8486 : c(t, 'pika-select-year') && s.gotoYear(t.value));
8487 };
8488 s._onInputChange = function (n) {
8489 var i;
8490 if (n.firedBy !== s) {
8491 i = t
8492 ? (i = e(l.field.value, l.format)) && i.isValid()
8493 ? i.toDate()
8494 : null
8495 : new Date(Date.parse(l.field.value));
8496 f(i) && s.setDate(i);
8497 s._v || s.show();
8498 }
8499 };
8500 s._onInputFocus = function () {
8501 s.show();
8502 };

Callers 2

shell.jsFile · 0.70

Calls 9

setAttributeMethod · 0.80
appendChildMethod · 0.80
insertBeforeMethod · 0.80
cFunction · 0.70
aFunction · 0.70
eFunction · 0.70
fFunction · 0.70
rFunction · 0.70
getAttributeMethod · 0.45

Tested by

no test coverage detected