From 97150a7b6a4f4b1ebb2212557e93250d4f958819 Mon Sep 17 00:00:00 2001 From: KISS Date: Thu, 1 Nov 2018 11:22:42 -0400 Subject: [PATCH 01/15] GNY-968_404-page --- wp-content/themes/guny/functions.php | 1 + wp-content/themes/guny/views/list.twig | 43 +++++++++++-------- .../themes/guny/views/partials/404.twig | 3 ++ 3 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 wp-content/themes/guny/views/partials/404.twig diff --git a/wp-content/themes/guny/functions.php b/wp-content/themes/guny/functions.php index ad18bd2e6..0d46e84fd 100644 --- a/wp-content/themes/guny/functions.php +++ b/wp-content/themes/guny/functions.php @@ -129,6 +129,7 @@ function add_to_context ( $context ) { } $context['is_archive'] = is_archive(); $context['current_url'] = strtok($_SERVER["REQUEST_URI"],'?'); + $context['is_404'] = is_404(); return $context; } diff --git a/wp-content/themes/guny/views/list.twig b/wp-content/themes/guny/views/list.twig index 7139df815..3e538612c 100644 --- a/wp-content/themes/guny/views/list.twig +++ b/wp-content/themes/guny/views/list.twig @@ -1,34 +1,43 @@ {% extends "base.twig" %} {% block content %} - {% if 'events' in current_url %} {% set v_page = 'events' %} {% elseif 'programs' in current_url %} {% set v_page = 'programs' %} + {% elseif is_404 %} + {% set v_page = '404' %} {% endif %}
{% block hero %} {% endblock %}
- -
- {% block before_list %} - {% endblock %} - {% block post_list %} - {% for post in posts %} - {% include ['partials/teaser-'~post.post_type~'.twig', 'partials/teaser.twig'] %} - {% endfor %} - {% endblock %} - - {% block after_list %} - {% endblock %} -
+ {% if not is_404 %} + +
+ {% block before_list %} + {% endblock %} + + {% block post_list %} + {% for post in posts %} + {% include ['partials/teaser-'~post.post_type~'.twig', 'partials/teaser.twig'] %} + {% endfor %} + {% endblock %} + + {% block after_list %} + {% endblock %} +
+ {% endif %} + + {% if is_404 %} + {% include 'partials/404.twig' %} + {% endif %} +
{% endblock %} \ No newline at end of file diff --git a/wp-content/themes/guny/views/partials/404.twig b/wp-content/themes/guny/views/partials/404.twig new file mode 100644 index 000000000..cb3f6c8ec --- /dev/null +++ b/wp-content/themes/guny/views/partials/404.twig @@ -0,0 +1,3 @@ +{% block content %} + Sorry, we couldn't find what you're looking for. +{% endblock %} \ No newline at end of file From 2841af80c4ec56de53fd0a33483bf0adb8f0ecbd Mon Sep 17 00:00:00 2001 From: KISS Date: Thu, 1 Nov 2018 14:03:47 -0400 Subject: [PATCH 02/15] GNY-968_corrected-if-check --- wp-content/themes/guny/views/list.twig | 55 ++++++++++++-------------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/wp-content/themes/guny/views/list.twig b/wp-content/themes/guny/views/list.twig index 3e538612c..85138177b 100644 --- a/wp-content/themes/guny/views/list.twig +++ b/wp-content/themes/guny/views/list.twig @@ -5,39 +5,34 @@ {% set v_page = 'events' %} {% elseif 'programs' in current_url %} {% set v_page = 'programs' %} - {% elseif is_404 %} - {% set v_page = '404' %} {% endif %} -
- {% block hero %} - {% endblock %} -
+ {% if is_404 %} + {% include 'partials/404.twig' %} + {% else %} +
+ {% block hero %} + {% endblock %} +
- {% if not is_404 %} - -
- {% block before_list %} - {% endblock %} + +
+ {% block before_list %} + {% endblock %} - {% block post_list %} - {% for post in posts %} - {% include ['partials/teaser-'~post.post_type~'.twig', 'partials/teaser.twig'] %} - {% endfor %} - {% endblock %} + {% block post_list %} + {% for post in posts %} + {% include ['partials/teaser-'~post.post_type~'.twig', 'partials/teaser.twig'] %} + {% endfor %} + {% endblock %} - {% block after_list %} - {% endblock %} -
- {% endif %} - - {% if is_404 %} - {% include 'partials/404.twig' %} - {% endif %} - -
-
+ {% block after_list %} + {% endblock %} +
+ + + {% endif %} {% endblock %} \ No newline at end of file From e1208975ac59e62a32d80a76d14215217be4c8f2 Mon Sep 17 00:00:00 2001 From: kimpenguin Date: Mon, 5 Nov 2018 11:18:51 -0500 Subject: [PATCH 03/15] adding multi-filter functions to afterschool with updates to wp rest api routes and fields --- wp-content/mu-plugins/gu-post-types.php | 4 +- .../themes/guny/archive-afterschool-guide.php | 2 +- wp-content/themes/guny/assets/js/bundle.js | 395 +- ...source-bf63dc63f118186a89ec6ba1b0dd3e82.js | 23110 --------------- ...ce-bf63dc63f118186a89ec6ba1b0dd3e82.min.js | 8 - ...source-dbb1dee3fefec022d77fa3a8fb6dca0d.js | 23205 ++++++++++++++++ ...ce-dbb1dee3fefec022d77fa3a8fb6dca0d.min.js | 8 + wp-content/themes/guny/functions.php | 1 + .../includes/REST/guny_rest_afterschool.php | 87 + wp-content/themes/guny/src/js/main.js | 6 +- .../{programs.js => programs-multi-filter.js} | 81 +- ...guide.twig => list-afterschool-guide.twig} | 123 +- .../themes/guny/views/list-program.twig | 3 + wp-content/themes/guny/views/list.twig | 4 +- .../guny/views/partials/tax-filters.twig | 71 + 15 files changed, 23767 insertions(+), 23341 deletions(-) delete mode 100644 wp-content/themes/guny/assets/js/source-bf63dc63f118186a89ec6ba1b0dd3e82.js delete mode 100644 wp-content/themes/guny/assets/js/source-bf63dc63f118186a89ec6ba1b0dd3e82.min.js create mode 100644 wp-content/themes/guny/assets/js/source-dbb1dee3fefec022d77fa3a8fb6dca0d.js create mode 100644 wp-content/themes/guny/assets/js/source-dbb1dee3fefec022d77fa3a8fb6dca0d.min.js create mode 100644 wp-content/themes/guny/includes/REST/guny_rest_afterschool.php rename wp-content/themes/guny/src/js/modules/{programs.js => programs-multi-filter.js} (72%) rename wp-content/themes/guny/views/{filter-afterschool-guide.twig => list-afterschool-guide.twig} (80%) create mode 100644 wp-content/themes/guny/views/partials/tax-filters.twig diff --git a/wp-content/mu-plugins/gu-post-types.php b/wp-content/mu-plugins/gu-post-types.php index 5e669fb9a..c1485342d 100644 --- a/wp-content/mu-plugins/gu-post-types.php +++ b/wp-content/mu-plugins/gu-post-types.php @@ -162,6 +162,7 @@ function create_post_types() { 'public' => true, 'menu_position' => 25, 'menu_icon' => 'dashicons-awards', + 'show_in_rest' => true, 'supports' => array('title', 'excerpt', 'editor'), 'has_archive' => true, 'rewrite' => array( @@ -221,7 +222,8 @@ function create_taxonomies() { array( 'label' => __( 'Program Categories' ), 'hierarchical' => true, - 'rewrite' => false + 'rewrite' => false, + 'show_in_rest' => true ) ); diff --git a/wp-content/themes/guny/archive-afterschool-guide.php b/wp-content/themes/guny/archive-afterschool-guide.php index 36c3cf20f..252321b5a 100644 --- a/wp-content/themes/guny/archive-afterschool-guide.php +++ b/wp-content/themes/guny/archive-afterschool-guide.php @@ -18,4 +18,4 @@ $context['reset_link'] = AfterschoolGuides\get_reset_link(); $context['pagination'] = AfterschoolGuides\get_pagination(); -Timber::render(array('filter-afterschool-guide.twig'), $context); +Timber::render(array('list-afterschool-guide.twig'), $context); diff --git a/wp-content/themes/guny/assets/js/bundle.js b/wp-content/themes/guny/assets/js/bundle.js index c88a6cae4..d9b3d7666 100644 --- a/wp-content/themes/guny/assets/js/bundle.js +++ b/wp-content/themes/guny/assets/js/bundle.js @@ -2984,12 +2984,12 @@ var config = ({ /** * Show production mode tip message on boot? */ - productionTip: "production" !== 'production', + productionTip: "development" !== 'production', /** * Whether to enable devtools */ - devtools: "production" !== 'production', + devtools: "development" !== 'production', /** * Whether to record perf @@ -3192,7 +3192,7 @@ var tip = noop; var generateComponentTrace = (noop); // work around flow check var formatComponentName = (noop); -if (false) { +if (true) { var hasConsole = typeof console !== 'undefined'; var classifyRE = /(?:^|[-_])(\w)/g; var classify = function (str) { return str @@ -3619,7 +3619,7 @@ function defineReactive ( return } /* eslint-enable no-self-compare */ - if (false) { + if ("development" !== 'production' && customSetter) { customSetter(); } if (setter) { @@ -3639,7 +3639,8 @@ function defineReactive ( * already exist. */ function set (target, key, val) { - if (false + if ("development" !== 'production' && + (isUndef(target) || isPrimitive(target)) ) { warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target)))); } @@ -3654,7 +3655,7 @@ function set (target, key, val) { } var ob = (target).__ob__; if (target._isVue || (ob && ob.vmCount)) { - "production" !== 'production' && warn( + "development" !== 'production' && warn( 'Avoid adding reactive properties to a Vue instance or its root $data ' + 'at runtime - declare it upfront in the data option.' ); @@ -3673,7 +3674,8 @@ function set (target, key, val) { * Delete a property and trigger change if necessary. */ function del (target, key) { - if (false + if ("development" !== 'production' && + (isUndef(target) || isPrimitive(target)) ) { warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target)))); } @@ -3683,7 +3685,7 @@ function del (target, key) { } var ob = (target).__ob__; if (target._isVue || (ob && ob.vmCount)) { - "production" !== 'production' && warn( + "development" !== 'production' && warn( 'Avoid deleting properties on a Vue instance or its root $data ' + '- just set it to null.' ); @@ -3725,7 +3727,7 @@ var strats = config.optionMergeStrategies; /** * Options with restrictions */ -if (false) { +if (true) { strats.el = strats.propsData = function (parent, child, vm, key) { if (!vm) { warn( @@ -3809,7 +3811,7 @@ strats.data = function ( ) { if (!vm) { if (childVal && typeof childVal !== 'function') { - "production" !== 'production' && warn( + "development" !== 'production' && warn( 'The "data" option should be a function ' + 'that returns a per-instance value in component ' + 'definitions.', @@ -3859,7 +3861,7 @@ function mergeAssets ( ) { var res = Object.create(parentVal || null); if (childVal) { - "production" !== 'production' && assertObjectType(key, childVal, vm); + "development" !== 'production' && assertObjectType(key, childVal, vm); return extend(res, childVal) } else { return res @@ -3887,7 +3889,7 @@ strats.watch = function ( if (childVal === nativeWatch) { childVal = undefined; } /* istanbul ignore if */ if (!childVal) { return Object.create(parentVal || null) } - if (false) { + if (true) { assertObjectType(key, childVal, vm); } if (!parentVal) { return childVal } @@ -3918,7 +3920,7 @@ strats.computed = function ( vm, key ) { - if (childVal && "production" !== 'production') { + if (childVal && "development" !== 'production') { assertObjectType(key, childVal, vm); } if (!parentVal) { return childVal } @@ -3979,7 +3981,7 @@ function normalizeProps (options, vm) { if (typeof val === 'string') { name = camelize(val); res[name] = { type: null }; - } else if (false) { + } else if (true) { warn('props must be strings when using array syntax.'); } } @@ -3991,7 +3993,7 @@ function normalizeProps (options, vm) { ? val : { type: val }; } - } else if (false) { + } else if (true) { warn( "Invalid value for option \"props\": expected an Array or an Object, " + "but got " + (toRawType(props)) + ".", @@ -4019,7 +4021,7 @@ function normalizeInject (options, vm) { ? extend({ from: key }, val) : { from: val }; } - } else if (false) { + } else if (true) { warn( "Invalid value for option \"inject\": expected an Array or an Object, " + "but got " + (toRawType(inject)) + ".", @@ -4062,7 +4064,7 @@ function mergeOptions ( child, vm ) { - if (false) { + if (true) { checkComponents(child); } @@ -4123,7 +4125,7 @@ function resolveAsset ( if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } // fallback to prototype chain var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; - if (false) { + if ("development" !== 'production' && warnMissing && !res) { warn( 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, options @@ -4168,7 +4170,7 @@ function validateProp ( toggleObserving(prevShouldObserve); } if ( - false + true ) { assertProp(prop, key, value, vm, absent); } @@ -4185,7 +4187,7 @@ function getPropDefaultValue (vm, prop, key) { } var def = prop.default; // warn against non-factory defaults for Object & Array - if (false) { + if ("development" !== 'production' && isObject(def)) { warn( 'Invalid default value for prop "' + key + '": ' + 'Props with type Object/Array must use a factory function ' + @@ -4346,7 +4348,7 @@ function globalHandleError (err, vm, info) { } function logError (err, vm, info) { - if (false) { + if (true) { warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); } /* istanbul ignore else */ @@ -4476,7 +4478,7 @@ function nextTick (cb, ctx) { var mark; var measure; -if (false) { +if (true) { var perf = inBrowser && window.performance; /* istanbul ignore if */ if ( @@ -4500,7 +4502,7 @@ if (false) { var initProxy; -if (false) { +if (true) { var allowedGlobals = makeMap( 'Infinity,undefined,NaN,isFinite,isNaN,' + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + @@ -4658,7 +4660,7 @@ function updateListeners ( event = normalizeEvent(name); /* istanbul ignore if */ if (isUndef(cur)) { - "production" !== 'production' && warn( + "development" !== 'production' && warn( "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), vm ); @@ -4735,7 +4737,7 @@ function extractPropsFromVNodeData ( if (isDef(attrs) || isDef(props)) { for (var key in propOptions) { var altKey = hyphenate(key); - if (false) { + if (true) { var keyInLowerCase = key.toLowerCase(); if ( key !== keyInLowerCase && @@ -4938,7 +4940,7 @@ function resolveAsyncComponent ( }); var reject = once(function (reason) { - "production" !== 'production' && warn( + "development" !== 'production' && warn( "Failed to resolve async component: " + (String(factory)) + (reason ? ("\nReason: " + reason) : '') ); @@ -4981,7 +4983,7 @@ function resolveAsyncComponent ( setTimeout(function () { if (isUndef(factory.resolved)) { reject( - false + true ? ("timeout (" + (res.timeout) + "ms)") : null ); @@ -5130,7 +5132,7 @@ function eventsMixin (Vue) { Vue.prototype.$emit = function (event) { var vm = this; - if (false) { + if (true) { var lowerCaseEvent = event.toLowerCase(); if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) { tip( @@ -5357,7 +5359,7 @@ function mountComponent ( vm.$el = el; if (!vm.$options.render) { vm.$options.render = createEmptyVNode; - if (false) { + if (true) { /* istanbul ignore if */ if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') || vm.$options.el || el) { @@ -5379,7 +5381,7 @@ function mountComponent ( var updateComponent; /* istanbul ignore if */ - if (false) { + if ("development" !== 'production' && config.performance && mark) { updateComponent = function () { var name = vm._name; var id = vm._uid; @@ -5424,7 +5426,7 @@ function updateChildComponent ( parentVnode, renderChildren ) { - if (false) { + if (true) { isUpdatingChildComponent = true; } @@ -5478,7 +5480,7 @@ function updateChildComponent ( vm.$forceUpdate(); } - if (false) { + if (true) { isUpdatingChildComponent = false; } } @@ -5562,7 +5564,7 @@ var index = 0; function resetSchedulerState () { index = queue.length = activatedChildren.length = 0; has = {}; - if (false) { + if (true) { circular = {}; } waiting = flushing = false; @@ -5593,7 +5595,7 @@ function flushSchedulerQueue () { has[id] = null; watcher.run(); // in dev build, check and stop circular updates. - if (false) { + if ("development" !== 'production' && has[id] != null) { circular[id] = (circular[id] || 0) + 1; if (circular[id] > MAX_UPDATE_COUNT) { warn( @@ -5721,7 +5723,7 @@ var Watcher = function Watcher ( this.newDeps = []; this.depIds = new _Set(); this.newDepIds = new _Set(); - this.expression = false + this.expression = true ? expOrFn.toString() : ''; // parse expression for getter @@ -5731,7 +5733,7 @@ var Watcher = function Watcher ( this.getter = parsePath(expOrFn); if (!this.getter) { this.getter = function () {}; - "production" !== 'production' && warn( + "development" !== 'production' && warn( "Failed watching path: \"" + expOrFn + "\" " + 'Watcher only accepts simple dot-delimited paths. ' + 'For full control, use a function instead.', @@ -5946,7 +5948,7 @@ function initProps (vm, propsOptions) { keys.push(key); var value = validateProp(key, propsOptions, propsData, vm); /* istanbul ignore else */ - if (false) { + if (true) { var hyphenatedKey = hyphenate(key); if (isReservedAttribute(hyphenatedKey) || config.isReservedAttr(hyphenatedKey)) { @@ -5988,7 +5990,7 @@ function initData (vm) { : data || {}; if (!isPlainObject(data)) { data = {}; - "production" !== 'production' && warn( + "development" !== 'production' && warn( 'data functions should return an object:\n' + 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm @@ -6001,7 +6003,7 @@ function initData (vm) { var i = keys.length; while (i--) { var key = keys[i]; - if (false) { + if (true) { if (methods && hasOwn(methods, key)) { warn( ("Method \"" + key + "\" has already been defined as a data property."), @@ -6010,7 +6012,7 @@ function initData (vm) { } } if (props && hasOwn(props, key)) { - "production" !== 'production' && warn( + "development" !== 'production' && warn( "The data property \"" + key + "\" is already declared as a prop. " + "Use prop default value instead.", vm @@ -6047,7 +6049,7 @@ function initComputed (vm, computed) { for (var key in computed) { var userDef = computed[key]; var getter = typeof userDef === 'function' ? userDef : userDef.get; - if (false) { + if ("development" !== 'production' && getter == null) { warn( ("Getter is missing for computed property \"" + key + "\"."), vm @@ -6069,7 +6071,7 @@ function initComputed (vm, computed) { // at instantiation here. if (!(key in vm)) { defineComputed(vm, key, userDef); - } else if (false) { + } else if (true) { if (key in vm.$data) { warn(("The computed property \"" + key + "\" is already defined in data."), vm); } else if (vm.$options.props && key in vm.$options.props) { @@ -6100,7 +6102,8 @@ function defineComputed ( ? userDef.set : noop; } - if (false) { + if ("development" !== 'production' && + sharedPropertyDefinition.set === noop) { sharedPropertyDefinition.set = function () { warn( ("Computed property \"" + key + "\" was assigned to but it has no setter."), @@ -6129,7 +6132,7 @@ function createComputedGetter (key) { function initMethods (vm, methods) { var props = vm.$options.props; for (var key in methods) { - if (false) { + if (true) { if (methods[key] == null) { warn( "Method \"" + key + "\" has an undefined value in the component definition. " + @@ -6191,7 +6194,7 @@ function stateMixin (Vue) { dataDef.get = function () { return this._data }; var propsDef = {}; propsDef.get = function () { return this._props }; - if (false) { + if (true) { dataDef.set = function (newData) { warn( 'Avoid replacing instance root $data. ' + @@ -6247,7 +6250,7 @@ function initInjections (vm) { toggleObserving(false); Object.keys(result).forEach(function (key) { /* istanbul ignore else */ - if (false) { + if (true) { defineReactive(vm, key, result[key], function () { warn( "Avoid mutating an injected value directly since the changes will be " + @@ -6292,7 +6295,7 @@ function resolveInject (inject, vm) { result[key] = typeof provideDefault === 'function' ? provideDefault.call(vm) : provideDefault; - } else if (false) { + } else if (true) { warn(("Injection \"" + key + "\" not found"), vm); } } @@ -6351,7 +6354,7 @@ function renderSlot ( if (scopedSlotFn) { // scoped slot props = props || {}; if (bindObject) { - if (false) { + if ("development" !== 'production' && !isObject(bindObject)) { warn( 'slot v-bind without argument expects an Object', this @@ -6364,7 +6367,7 @@ function renderSlot ( var slotNodes = this.$slots[name]; // warn duplicate slot usage if (slotNodes) { - if (false) { + if ("development" !== 'production' && slotNodes._rendered) { warn( "Duplicate presence of slot \"" + name + "\" found in the same render tree " + "- this will likely cause render errors.", @@ -6439,7 +6442,7 @@ function bindObjectProps ( ) { if (value) { if (!isObject(value)) { - "production" !== 'production' && warn( + "development" !== 'production' && warn( 'v-bind without argument expects an Object or Array value', this ); @@ -6545,7 +6548,7 @@ function markStaticNode (node, key, isOnce) { function bindObjectListeners (data, value) { if (value) { if (!isPlainObject(value)) { - "production" !== 'production' && warn( + "development" !== 'production' && warn( 'v-on without argument expects an Object value', this ); @@ -6818,7 +6821,7 @@ function createComponent ( // if at this stage it's not a constructor or an async component factory, // reject. if (typeof Ctor !== 'function') { - if (false) { + if (true) { warn(("Invalid Component definition: " + (String(Ctor))), context); } return @@ -6977,7 +6980,7 @@ function _createElement ( normalizationType ) { if (isDef(data) && isDef((data).__ob__)) { - "production" !== 'production' && warn( + "development" !== 'production' && warn( "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" + 'Always create fresh vnode data objects in each render!', context @@ -6993,7 +6996,8 @@ function _createElement ( return createEmptyVNode() } // warn against non-primitive key - if (false + if ("development" !== 'production' && + isDef(data) && isDef(data.key) && !isPrimitive(data.key) ) { { warn( @@ -7107,7 +7111,7 @@ function initRender (vm) { var parentData = parentVnode && parentVnode.data; /* istanbul ignore else */ - if (false) { + if (true) { defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () { !isUpdatingChildComponent && warn("$attrs is readonly.", vm); }, true); @@ -7135,7 +7139,7 @@ function renderMixin (Vue) { var _parentVnode = ref._parentVnode; // reset _rendered flag on slots for duplicate slot check - if (false) { + if (true) { for (var key in vm.$slots) { // $flow-disable-line vm.$slots[key]._rendered = false; @@ -7158,7 +7162,7 @@ function renderMixin (Vue) { // return error render result, // or previous vnode to prevent render error causing blank component /* istanbul ignore else */ - if (false) { + if (true) { if (vm.$options.renderError) { try { vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e); @@ -7175,7 +7179,7 @@ function renderMixin (Vue) { } // return empty vnode in case the render function errored out if (!(vnode instanceof VNode)) { - if (false) { + if ("development" !== 'production' && Array.isArray(vnode)) { warn( 'Multiple root nodes returned from render function. Render function ' + 'should return a single root node.', @@ -7202,7 +7206,7 @@ function initMixin (Vue) { var startTag, endTag; /* istanbul ignore if */ - if (false) { + if ("development" !== 'production' && config.performance && mark) { startTag = "vue-perf-start:" + (vm._uid); endTag = "vue-perf-end:" + (vm._uid); mark(startTag); @@ -7224,7 +7228,7 @@ function initMixin (Vue) { ); } /* istanbul ignore else */ - if (false) { + if (true) { initProxy(vm); } else { vm._renderProxy = vm; @@ -7241,7 +7245,7 @@ function initMixin (Vue) { callHook(vm, 'created'); /* istanbul ignore if */ - if (false) { + if ("development" !== 'production' && config.performance && mark) { vm._name = formatComponentName(vm, false); mark(endTag); measure(("vue " + (vm._name) + " init"), startTag, endTag); @@ -7332,7 +7336,8 @@ function dedupe (latest, extended, sealed) { } function Vue (options) { - if (false + if ("development" !== 'production' && + !(this instanceof Vue) ) { warn('Vue is a constructor and should be called with the `new` keyword'); } @@ -7400,7 +7405,7 @@ function initExtend (Vue) { } var name = extendOptions.name || Super.options.name; - if (false) { + if ("development" !== 'production' && name) { validateComponentName(name); } @@ -7483,7 +7488,7 @@ function initAssetRegisters (Vue) { return this.options[type + 's'][id] } else { /* istanbul ignore if */ - if (false) { + if ("development" !== 'production' && type === 'component') { validateComponentName(id); } if (type === 'component' && isPlainObject(definition)) { @@ -7640,7 +7645,7 @@ function initGlobalAPI (Vue) { // config var configDef = {}; configDef.get = function () { return config; }; - if (false) { + if (true) { configDef.set = function () { warn( 'Do not replace the Vue.config object, set individual fields instead.' @@ -7907,7 +7912,7 @@ function query (el) { if (typeof el === 'string') { var selected = document.querySelector(el); if (!selected) { - "production" !== 'production' && warn( + "development" !== 'production' && warn( 'Cannot find element: ' + el ); return document.createElement('div') @@ -8170,7 +8175,7 @@ function createPatchFunction (backend) { var children = vnode.children; var tag = vnode.tag; if (isDef(tag)) { - if (false) { + if (true) { if (data && data.pre) { creatingElmInVPre++; } @@ -8198,7 +8203,7 @@ function createPatchFunction (backend) { insert(parentElm, vnode.elm, refElm); } - if (false) { + if ("development" !== 'production' && data && data.pre) { creatingElmInVPre--; } } else if (isTrue(vnode.isComment)) { @@ -8285,7 +8290,7 @@ function createPatchFunction (backend) { function createChildren (vnode, children, insertedVnodeQueue) { if (Array.isArray(children)) { - if (false) { + if (true) { checkDuplicateKeys(children); } for (var i = 0; i < children.length; ++i) { @@ -8419,7 +8424,7 @@ function createPatchFunction (backend) { // during leaving transitions var canMove = !removeOnly; - if (false) { + if (true) { checkDuplicateKeys(newCh); } @@ -8593,7 +8598,7 @@ function createPatchFunction (backend) { return true } // assert node match - if (false) { + if (true) { if (!assertNodeMatch(elm, vnode, inVPre)) { return false } @@ -8616,7 +8621,9 @@ function createPatchFunction (backend) { if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) { if (i !== elm.innerHTML) { /* istanbul ignore if */ - if (false + if ("development" !== 'production' && + typeof console !== 'undefined' && + !hydrationBailed ) { hydrationBailed = true; console.warn('Parent: ', elm); @@ -8640,7 +8647,9 @@ function createPatchFunction (backend) { // longer than the virtual children list. if (!childrenMatch || childNode) { /* istanbul ignore if */ - if (false + if ("development" !== 'production' && + typeof console !== 'undefined' && + !hydrationBailed ) { hydrationBailed = true; console.warn('Parent: ', elm); @@ -8713,7 +8722,7 @@ function createPatchFunction (backend) { if (hydrate(oldVnode, vnode, insertedVnodeQueue)) { invokeInsertHook(vnode, insertedVnodeQueue, true); return oldVnode - } else if (false) { + } else if (true) { warn( 'The client-side rendered virtual DOM tree is not matching ' + 'server-rendered content. This is likely caused by incorrect ' + @@ -9201,7 +9210,8 @@ function addHandler ( // warn prevent and passive modifier /* istanbul ignore if */ if ( - false + "development" !== 'production' && warn && + modifiers.prevent && modifiers.passive ) { warn( 'passive and prevent can\'t be used together. ' + @@ -9480,7 +9490,7 @@ function model ( var tag = el.tag; var type = el.attrsMap.type; - if (false) { + if (true) { // inputs with type="file" are read only and setting the input's // value will throw an error. if (tag === 'input' && type === 'file') { @@ -9507,7 +9517,7 @@ function model ( genComponentModel(el, value, modifiers); // component v-model doesn't need extra runtime return false - } else if (false) { + } else if (true) { warn$1( "<" + (el.tag) + " v-model=\"" + value + "\">: " + "v-model is not supported on this element type. " + @@ -9589,7 +9599,7 @@ function genDefaultModel ( // warn if v-bind:value conflicts with v-model // except for inputs with v-bind:type - if (false) { + if (true) { var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value']; var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type']; if (value$1 && !typeBinding) { @@ -10297,7 +10307,7 @@ function enter (vnode, toggleDisplay) { : duration ); - if (false) { + if ("development" !== 'production' && explicitEnterDuration != null) { checkDuration(explicitEnterDuration, 'enter', vnode); } @@ -10405,7 +10415,7 @@ function leave (vnode, rm) { : duration ); - if (false) { + if ("development" !== 'production' && isDef(explicitLeaveDuration)) { checkDuration(explicitLeaveDuration, 'leave', vnode); } @@ -10632,7 +10642,7 @@ function actuallySetSelected (el, binding, vm) { var value = binding.value; var isMultiple = el.multiple; if (isMultiple && !Array.isArray(value)) { - "production" !== 'production' && warn( + "development" !== 'production' && warn( "