first commit

This commit is contained in:
dwindown
2025-08-21 20:39:34 +07:00
commit 58c1497171
576 changed files with 177044 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){var e,t=["scroll","wheel","touchstart","touchmove","touchenter","touchend","touchleave","mouseout","mouseleave","mouseup","mousedown","mousemove","mouseenter","mousewheel","mouseover","pointermove","pointerenter","pointerleave","pointerdown","pointerup","animationstart","animationend","animationiteration","transitionstart","transitionend","transitionrun","transitioncancel"];if(function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}()){var n=EventTarget.prototype.addEventListener;e=n,EventTarget.prototype.addEventListener=function(n,o,i){var r,s="object"==typeof i&&null!==i,a=s?i.capture:i;(i=s?function(e){var t=Object.getOwnPropertyDescriptor(e,"passive");return t&&!0!==t.writable&&void 0===t.set?Object.assign({},e):e}(i):{}).passive=void 0!==(r=i.passive)?r:-1!==("undefined"!=typeof window&&window.defaultPassiveEvents_supportedPassiveEvents?window.defaultPassiveEvents_supportedPassiveEvents:t).indexOf(n)&&!0,i.capture=void 0!==a&&a,e.call(this,n,o,i)},EventTarget.prototype.addEventListener._original=e}});
//# sourceMappingURL=index.umd.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,32 @@
var wpcfto_get_image_mixin = {
data: function () {
return {
image_url: '',
}
},
created() {
if (this.$options.propsData.fields.type === 'image') {
this.get_image_url(this.$options.propsData.field_value);
}
},
methods: {
get_image_url(image_id) {
this.$http.get(stm_wpcfto_ajaxurl + '?action=wpcfto_get_image_url&nonce=' + stm_wpcfto_nonces['get_image_url'] + '&image_id=' + image_id).then(function (response) {
this.image_url = response.body;
});
},
wpcfto_checkURL(url) {
return (url.match(/\.(jpeg|jpg|gif|png)$/) != null);
}
}
};
function WpcftoIsJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
}
//# sourceMappingURL=../sourcemap/mixins.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,56 @@
window.validationMixin = {
methods: {
isVisible() {
// If fields or dependencies do not exist, field is visible
if (!this.fields || !Array.isArray(this.fields.dependencies)) {
return true;
}
// dependencies is an array, safe to use every()
return this.fields.dependencies.every(dep => {
if (!dep || !dep.field) return true;
const depValue = this.$parent?.$refs[dep.field]?.value;
return depValue === dep.value;
});
},
validateField() {
// Check if fields exists before accessing it
if (!this.fields) {
return true; // If fields is undefined, consider validation passed
}
const visible = this.isVisible();
const required = this.fields.required === true;
const value = this.field_value;
// Must be unique for each field instance!
const uniqueFieldId = this.field_id || (this.fields && this.fields.field_id);
const isValid = !required || (visible && value !== undefined && value !== null && value !== '');
// Only emit if we have a field_id
if (uniqueFieldId) {
this.$root.$emit('field-validation', {
fieldId: uniqueFieldId,
isValid
});
}
return isValid;
}
},
watch: {
field_value() {
// Only call validateField if it exists
if (typeof this.validateField === 'function') {
this.validateField();
const isValid = this.validateField();
}
}
},
mounted() {
// Only call validateField if it exists
if (typeof this.validateField === 'function') {
this.validateField();
}
}
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

11965
vendor/wpcfto/metaboxes/assets/js/vue.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long