diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index a48d56f..12d6f88 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1 +1 @@ -!function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s="./client/src/bundles/bundle.js")}({"./client/src/boot/index.js":function(t,e,n){"use strict";var o=n("./client/src/boot/registerComponents.js"),r=function(t){return t&&t.__esModule?t:{default:t}}(o);window.document.addEventListener("DOMContentLoaded",function(){(0,r.default)()})},"./client/src/boot/registerComponents.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(o);e.default=function(){r.default.component.registerMany({})}},"./client/src/bundles/bundle.js":function(t,e,n){"use strict";n("./client/src/legacy/entwine/index.js"),n("./client/src/boot/index.js")},"./client/src/legacy/entwine/BootstrapReactComponent.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var r=n(3),i=o(r),s=n(1),u=o(s),c=n(2),a=o(c),l=n(0);o(l).default.ready(function(){i.default.entwine("ss",function(t){t(".js-injector-boot .bootstrap-component").entwine({Component:null,onmatch:function(){var t=this.closest(".cms-content").attr("id"),e=t?{context:t}:{},n=this.data("component"),o=(0,l.loadComponent)(n,e);this.setComponent(o),this._super(),this.refresh()},refresh:function(){var t=this.getProps(),e=this.getComponent();a.default.render(u.default.createElement(e,t),this[0])},getProps:function(){return t(this).data("props")||{}},onunmatch:function(){a.default.unmountComponentAtNode(this[0])}})})})},"./client/src/legacy/entwine/BootstrapReactFormField.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var r=n(3),i=o(r),s=n(1),u=o(s),c=n(2),a=o(c),l=n(0);o(l).default.ready(function(){i.default.entwine("ss",function(t){t(".js-injector-boot .react-form-field").entwine({Component:null,Value:null,HiddenInput:null,onmatch:function(){var e=this.closest(".cms-content").attr("id"),n=e?{context:e}:{},o=this.data("component"),r=(0,l.loadComponent)(o,n);this.setComponent(r);var i=this.data("hidden-input-id");if(i){var s=t("#"+i);this.setHiddenInput(s)}this._super(),this.refresh()},refresh:function(){var t=this.getProps(),e=this.getComponent();a.default.render(u.default.createElement(e,t),this[0])},handleChange:function(t,e){var n=e.value,o=this.getHiddenInput();o&&(o.val(n),o.trigger("change")),this.setValue(n),this.refresh()},getProps:function(){var e=t(this).data("props")||{},n=this.getValue();return null!==n&&(e.value=n),e.onChange=this.handleChange.bind(this),e},onunmatch:function(){a.default.unmountComponentAtNode(this[0])}})})})},"./client/src/legacy/entwine/index.js":function(t,e,n){"use strict";n("./client/src/legacy/entwine/BootstrapReactComponent.js"),n("./client/src/legacy/entwine/BootstrapReactFormField.js")},0:function(t,e){t.exports=Injector},1:function(t,e){t.exports=React},2:function(t,e){t.exports=ReactDom},3:function(t,e){t.exports=jQuery}}); \ No newline at end of file +!function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s="./client/src/bundles/bundle.js")}({"./client/src/boot/index.js":function(t,e,n){"use strict";var o=n("./client/src/boot/registerComponents.js"),r=function(t){return t&&t.__esModule?t:{default:t}}(o);window.document.addEventListener("DOMContentLoaded",function(){(0,r.default)()})},"./client/src/boot/registerComponents.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(o);e.default=function(){r.default.component.registerMany({})}},"./client/src/bundles/bundle.js":function(t,e,n){"use strict";n("./client/src/legacy/entwine/index.js"),n("./client/src/boot/index.js")},"./client/src/legacy/entwine/BootstrapReactComponent.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var r=n(3),i=o(r),s=n(1),c=o(s),u=n(2),a=o(u),l=n(0);o(l).default.ready(function(){i.default.entwine("ss",function(t){t(".js-injector-boot .bootstrap-component").entwine({Component:null,onmatch:function(){var t=this.closest(".cms-content").attr("id"),e=t?{context:t}:{},n=this.data("component"),o=(0,l.loadComponent)(n,e);this.setComponent(o),this._super(),this.refresh()},refresh:function(){var t=this.getProps(),e=this.getComponent();a.default.render(c.default.createElement(e,t),this[0])},getProps:function(){return t(this).data("props")||{}},onunmatch:function(){a.default.unmountComponentAtNode(this[0])}})})})},"./client/src/legacy/entwine/BootstrapReactFormField.js":function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var r=Object.assign||function(t){for(var e=1;e {\n registerComponents();\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/boot/index.js","/* eslint-disable import/no-extraneous-dependencies */\nimport Injector from 'lib/Injector';\n\nexport default () => {\n Injector.component.registerMany({\n // List your React components here so Injector is aware of them\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/boot/registerComponents.js","// Include any legacy Entwine wrappers\nrequire('../legacy/entwine/');\n\n// Include boot entrypoint\nrequire('boot');\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/bundles/bundle.js","/* global ss */\n/* eslint-disable import/no-extraneous-dependencies */\nimport jQuery from 'jquery';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Injector, { loadComponent } from 'lib/Injector';\n\nInjector.ready(() => {\n jQuery.entwine('ss', ($) => {\n $('.js-injector-boot .bootstrap-component').entwine({\n\n Component: null,\n\n onmatch() {\n const cmsContent = this.closest('.cms-content').attr('id');\n const context = (cmsContent)\n ? { context: cmsContent }\n : {};\n\n const componentName = this.data('component');\n const Component = loadComponent(componentName, context);\n\n this.setComponent(Component);\n this._super();\n this.refresh();\n },\n\n refresh() {\n const props = this.getProps();\n const Component = this.getComponent();\n ReactDOM.render(, this[0]);\n },\n\n /**\n * Find the selected node and get attributes associated to attach the data to the form\n *\n * @returns {Object}\n */\n getProps() {\n return $(this).data('props') || {};\n },\n\n /**\n * Remove the component when unmatching\n */\n onunmatch() {\n ReactDOM.unmountComponentAtNode(this[0]);\n },\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/legacy/entwine/BootstrapReactComponent.js","/* global ss */\n/* eslint-disable import/no-extraneous-dependencies */\nimport jQuery from 'jquery';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Injector, { loadComponent } from 'lib/Injector';\n\nInjector.ready(() => {\n jQuery.entwine('ss', ($) => {\n $('.js-injector-boot .react-form-field').entwine({\n\n Component: null,\n Value: null,\n HiddenInput: null,\n\n onmatch() {\n const cmsContent = this.closest('.cms-content').attr('id');\n const context = (cmsContent)\n ? { context: cmsContent }\n : {};\n\n const componentName = this.data('component');\n const Component = loadComponent(componentName, context);\n this.setComponent(Component);\n\n const hiddenInputId = this.data('hidden-input-id');\n console.dir(hiddenInputId);\n if (hiddenInputId) {\n const input = $('#' + hiddenInputId )\n console.dir(input);\n this.setHiddenInput(input);\n }\n\n this._super();\n this.refresh();\n },\n\n refresh() {\n const props = this.getProps();\n const Component = this.getComponent();\n ReactDOM.render(, this[0]);\n },\n\n handleChange(event, {id, value}) {\n const input = this.getHiddenInput();\n if (input) {\n input.val(value);\n input.trigger('change');\n }\n this.setValue(value);\n this.refresh();\n },\n\n /**\n * Find the selected node and get attributes associated to attach the data to the form\n *\n * @returns {Object}\n */\n getProps() {\n const props = $(this).data('props') || {};\n const value = this.getValue();\n if (value !== null) {\n props.value = value;\n }\n props.onChange = this.handleChange.bind(this)\n return props;\n },\n\n /**\n * Remove the component when unmatching\n */\n onunmatch() {\n ReactDOM.unmountComponentAtNode(this[0]);\n },\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/legacy/entwine/BootstrapReactFormField.js","require('./BootstrapReactComponent');\nrequire('./BootstrapReactFormField');\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/legacy/entwine/index.js","module.exports = Injector;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"Injector\"\n// module id = 0\n// module chunks = 0","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 1\n// module chunks = 0","module.exports = ReactDom;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ReactDom\"\n// module id = 2\n// module chunks = 0","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 3\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 8aecf64731047409c1b5","webpack:///./client/src/boot/index.js","webpack:///./client/src/boot/registerComponents.js","webpack:///./client/src/bundles/bundle.js","webpack:///./client/src/legacy/entwine/BootstrapReactComponent.js","webpack:///./client/src/legacy/entwine/BootstrapReactFormField.js","webpack:///./client/src/legacy/entwine/index.js","webpack:///external \"Injector\"","webpack:///external \"React\"","webpack:///external \"ReactDom\"","webpack:///external \"jQuery\""],"names":["window","document","addEventListener","Injector","component","registerMany","require","ready","jQuery","entwine","$","Component","onmatch","cmsContent","closest","attr","context","componentName","data","setComponent","_super","refresh","props","getProps","getComponent","ReactDOM","render","onunmatch","unmountComponentAtNode","Value","HiddenInput","hiddenInputId","input","setHiddenInput","handleChange","event","value","getHiddenInput","val","trigger","setValue","getValue","onChange","bind"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAE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AAL,EAAlB;AACAC,2BAASC,MAAT,CAAgB,8BAAC,SAAD,eAAeJ,KAAf,IAAsB,cAAtB,IAAhB,EAAkD,KAAK,CAAL,CAAlD;AACD,OA9B8C;AAgC/CY,kBAhC+C,wBAgClCC,KAhCkC,QAgChB;AAAA,YAATC,KAAS,QAATA,KAAS;;AAC7B,YAAMJ,QAAQ,KAAKK,cAAL,EAAd;AACA,YAAIL,KAAJ,EAAW;AACTA,gBAAMM,GAAN,CAAUF,KAAV;AACAJ,gBAAMO,OAAN,CAAc,QAAd;AACD;AACD,aAAKC,QAAL,CAAcJ,KAAd;AACA,aAAKf,OAAL;AACD,OAxC8C;AA+C/CE,cA/C+C,sBA+CpC;AACT,YAAMD,QAAQZ,EAAE,IAAF,EAAQQ,IAAR,CAAa,OAAb,KAAyB,EAAvC;AACA,YAAMkB,QAAQ,KAAKK,QAAL,EAAd;AACA,YAAIL,UAAU,IAAd,EAAoB;AAClBd,gBAAMc,KAAN,GAAcA,KAAd;AACD;AACDd,cAAMoB,QAAN,GAAiB,KAAKR,YAAL,CAAkBS,IAAlB,CAAuB,IAAvB,CAAjB;AACA,eAAOrB,KAAP;AACD,OAvD8C;AA4D/CK,eA5D+C,uBA4DnC;AACVF,2BAASG,sBAAT,CAAgC,KAAK,CAAL,CAAhC;AACD;AA9D8C,KAAjD;AAgED,GAjED;AAkED,CAnED,E;;;;;;;;;;ACPAtB,mBAAOA,CAAC,wDAAR;AACAA,mBAAOA,CAAC,wDAAR,E;;;;;;;ACDA,0B;;;;;;;ACAA,uB;;;;;;;ACAA,0B;;;;;;;ACAA,wB","file":"js/bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./client/src/bundles/bundle.js\");\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8aecf64731047409c1b5","/* global window */\nimport registerComponents from 'boot/registerComponents';\n\nwindow.document.addEventListener('DOMContentLoaded', () => {\n registerComponents();\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/boot/index.js","/* eslint-disable import/no-extraneous-dependencies */\nimport Injector from 'lib/Injector';\n\nexport default () => {\n Injector.component.registerMany({\n // List your React components here so Injector is aware of them\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/boot/registerComponents.js","// Include any legacy Entwine wrappers\nrequire('../legacy/entwine/');\n\n// Include boot entrypoint\nrequire('boot');\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/bundles/bundle.js","/* global ss */\n/* eslint-disable import/no-extraneous-dependencies */\nimport jQuery from 'jquery';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Injector, { loadComponent } from 'lib/Injector';\n\nInjector.ready(() => {\n jQuery.entwine('ss', ($) => {\n $('.js-injector-boot .bootstrap-component').entwine({\n\n Component: null,\n\n onmatch() {\n const cmsContent = this.closest('.cms-content').attr('id');\n const context = (cmsContent)\n ? { context: cmsContent }\n : {};\n\n const componentName = this.data('component');\n const Component = loadComponent(componentName, context);\n\n this.setComponent(Component);\n this._super();\n this.refresh();\n },\n\n refresh() {\n const props = this.getProps();\n const Component = this.getComponent();\n ReactDOM.render(, this[0]);\n },\n\n /**\n * Find the selected node and get attributes associated to attach the data to the form\n *\n * @returns {Object}\n */\n getProps() {\n return $(this).data('props') || {};\n },\n\n /**\n * Remove the component when unmatching\n */\n onunmatch() {\n ReactDOM.unmountComponentAtNode(this[0]);\n },\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/legacy/entwine/BootstrapReactComponent.js","/* global ss */\n/* eslint-disable import/no-extraneous-dependencies */\nimport jQuery from 'jquery';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Injector, { loadComponent } from 'lib/Injector';\n\nInjector.ready(() => {\n jQuery.entwine('ss', ($) => {\n $('.js-injector-boot .react-form-field').entwine({\n\n Component: null,\n Value: null,\n HiddenInput: null,\n\n onmatch() {\n const cmsContent = this.closest('.cms-content').attr('id');\n const context = (cmsContent)\n ? { context: cmsContent }\n : {};\n\n const componentName = this.data('component');\n const Component = loadComponent(componentName, context);\n this.setComponent(Component);\n\n const hiddenInputId = this.data('hidden-input-id');\n if (hiddenInputId) {\n const input = $(`#${hiddenInputId}`);\n this.setHiddenInput(input);\n }\n\n this._super();\n this.refresh();\n },\n\n refresh() {\n const props = this.getProps();\n const Component = this.getComponent();\n ReactDOM.render(, this[0]);\n },\n\n handleChange(event, { value }) {\n const input = this.getHiddenInput();\n if (input) {\n input.val(value);\n input.trigger('change');\n }\n this.setValue(value);\n this.refresh();\n },\n\n /**\n * Find the selected node and get attributes associated to attach the data to the form\n *\n * @returns {Object}\n */\n getProps() {\n const props = $(this).data('props') || {};\n const value = this.getValue();\n if (value !== null) {\n props.value = value;\n }\n props.onChange = this.handleChange.bind(this);\n return props;\n },\n\n /**\n * Remove the component when unmatching\n */\n onunmatch() {\n ReactDOM.unmountComponentAtNode(this[0]);\n },\n });\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/legacy/entwine/BootstrapReactFormField.js","require('./BootstrapReactComponent');\nrequire('./BootstrapReactFormField');\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/legacy/entwine/index.js","module.exports = Injector;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"Injector\"\n// module id = 0\n// module chunks = 0","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 1\n// module chunks = 0","module.exports = ReactDom;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ReactDom\"\n// module id = 2\n// module chunks = 0","module.exports = jQuery;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"jQuery\"\n// module id = 3\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/client/src/legacy/entwine/BootstrapReactFormField.js b/client/src/legacy/entwine/BootstrapReactFormField.js index 265ac8a..7e4aadf 100644 --- a/client/src/legacy/entwine/BootstrapReactFormField.js +++ b/client/src/legacy/entwine/BootstrapReactFormField.js @@ -36,7 +36,7 @@ Injector.ready(() => { refresh() { const props = this.getProps(); const Component = this.getComponent(); - ReactDOM.render(, this[0]); + ReactDOM.render(, this[0]); }, handleChange(event, { value }) { diff --git a/src/ReactFormField.php b/src/ReactFormField.php index 24cb370..5114dc5 100644 --- a/src/ReactFormField.php +++ b/src/ReactFormField.php @@ -49,8 +49,9 @@ public function getProps(): array 'extraClass' => $this->extraClass(), 'id' => $this->ID(), 'disabled' => $this->isDisabled(), - 'readonly' => $this->isReadonly(), - 'autofocus' => $this->isAutofocus() + 'readOnly' => $this->isReadonly(), + 'autofocus' => $this->isAutofocus(), + 'title' => $this->title ]; } diff --git a/yarn.lock b/yarn.lock index 65a436c..7dfb126 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2531,7 +2531,7 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" -debuglog@*, debuglog@^1.0.1: +debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= @@ -4533,7 +4533,7 @@ imports-loader@^0.6.5: loader-utils "0.2.x" source-map "0.1.x" -imurmurhash@*, imurmurhash@^0.1.4: +imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= @@ -6005,11 +6005,6 @@ lodash._basecopy@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" integrity sha1-jaDmqHbPNEwK2KVIghEd08XHyjY= -lodash._baseindexof@*: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" - integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw= - lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" @@ -6018,16 +6013,11 @@ lodash._baseuniq@~4.6.0: lodash._createset "~4.0.0" lodash._root "~3.0.0" -lodash._bindcallback@*, lodash._bindcallback@^3.0.0: +lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4= -lodash._cacheindexof@*: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" - integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI= - lodash._createassigner@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11" @@ -6037,19 +6027,12 @@ lodash._createassigner@^3.0.0: lodash._isiterateecall "^3.0.0" lodash.restparam "^3.0.0" -lodash._createcache@*: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" - integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM= - dependencies: - lodash._getnative "^3.0.0" - lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= -lodash._getnative@*, lodash._getnative@^3.0.0: +lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= @@ -6150,7 +6133,7 @@ lodash.memoize@^4.1.2: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= -lodash.restparam@*, lodash.restparam@^3.0.0: +lodash.restparam@^3.0.0: version "3.6.1" resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=