From 337a1230c84d9619a90490622e48e1c48c3b65db Mon Sep 17 00:00:00 2001 From: Pawel Korczak Date: Tue, 5 Dec 2023 07:57:24 +0100 Subject: [PATCH 1/3] chore: update methods to lodash 4 version --- .idea/extension-tao-blueprints.iml | 10 ++++ .idea/modules.xml | 8 +++ .idea/php.xml | 22 ++++++++ .idea/vcs.xml | 6 ++ .idea/workspace.xml | 56 +++++++++++++++++++ views/js/component/editor/editor.js | 6 +- .../editor/propertySelector/selector.js | 2 +- 7 files changed, 106 insertions(+), 4 deletions(-) create mode 100644 .idea/extension-tao-blueprints.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/php.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/extension-tao-blueprints.iml b/.idea/extension-tao-blueprints.iml new file mode 100644 index 0000000..1cd56c7 --- /dev/null +++ b/.idea/extension-tao-blueprints.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b7cd64e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..8e445c2 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..cd1de85 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,56 @@ + + + + + + + + + + $PROJECT_DIR$/composer.json + + + + + + + + + + + + + + + + + 1701759181211 + + + + + + \ No newline at end of file diff --git a/views/js/component/editor/editor.js b/views/js/component/editor/editor.js index a21f269..a8386e9 100644 --- a/views/js/component/editor/editor.js +++ b/views/js/component/editor/editor.js @@ -97,7 +97,7 @@ define([ }; this.config.data.selection = selection; - distributor = distributorComponent($distributorContainer, _.pick(this.config, ['data'])) + distributor = distributorComponent($distributorContainer, _.pickBy(this.config, ['data'])) .on('render', function(){ self.enable(); @@ -116,7 +116,7 @@ define([ * @returns {Object} the values with the selected property and the selection. */ getValues : function getValues() { - var values = _.pick(this.config.data, ['selection', 'property']); + var values = _.pickBy(this.config.data, ['selection', 'property']); if(distributor){ values.selection = distributor.getValues(); } @@ -136,7 +136,7 @@ define([ $distributorContainer = $('.distributor-container', $component); $propertySelectorContainer = $('.property-selector-container', $component); - distributor = distributorComponent($distributorContainer, _.pick(config, 'data')); + distributor = distributorComponent($distributorContainer, _.pickBy(config, 'data')); selector = propertySelectorComponent($propertySelectorContainer, { uri: config.data.property.uri, label: config.data.property.label, diff --git a/views/js/component/editor/propertySelector/selector.js b/views/js/component/editor/propertySelector/selector.js index 6301999..3b99bc1 100644 --- a/views/js/component/editor/propertySelector/selector.js +++ b/views/js/component/editor/propertySelector/selector.js @@ -38,7 +38,7 @@ define([ */ var buildTree = function buildTree(data){ var nodeToListItem = function nodeToListItem(acc , node){ - var item = _.pick(node, ['uri', 'label']); + var item = _.pickBy(node, ['uri', 'label']); if(node.children && node.children.length){ item.childList = _.reduce(node.children, nodeToListItem, ''); } From 105466048f20b6aa3b241909f2de3dec5cc9e1f3 Mon Sep 17 00:00:00 2001 From: Pawel Korczak Date: Thu, 21 Dec 2023 00:11:53 +0100 Subject: [PATCH 2/3] fix: remove .idea directory --- .idea/extension-tao-blueprints.iml | 10 ------ .idea/modules.xml | 8 ----- .idea/php.xml | 22 ------------ .idea/vcs.xml | 6 ---- .idea/workspace.xml | 56 ------------------------------ 5 files changed, 102 deletions(-) delete mode 100644 .idea/extension-tao-blueprints.iml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/php.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml diff --git a/.idea/extension-tao-blueprints.iml b/.idea/extension-tao-blueprints.iml deleted file mode 100644 index 1cd56c7..0000000 --- a/.idea/extension-tao-blueprints.iml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index b7cd64e..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml deleted file mode 100644 index 8e445c2..0000000 --- a/.idea/php.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index cd1de85..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - $PROJECT_DIR$/composer.json - - - - - - - - - - - - - - - - - 1701759181211 - - - - - - \ No newline at end of file From 081f0360acfcbdf374b1e78e6761cb6bcee70668 Mon Sep 17 00:00:00 2001 From: Pawel Korczak Date: Tue, 26 Dec 2023 12:49:18 +0100 Subject: [PATCH 3/3] fix: lodash pick --- views/js/component/editor/editor.js | 6 +++--- views/js/component/editor/propertySelector/selector.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/views/js/component/editor/editor.js b/views/js/component/editor/editor.js index a8386e9..a21f269 100644 --- a/views/js/component/editor/editor.js +++ b/views/js/component/editor/editor.js @@ -97,7 +97,7 @@ define([ }; this.config.data.selection = selection; - distributor = distributorComponent($distributorContainer, _.pickBy(this.config, ['data'])) + distributor = distributorComponent($distributorContainer, _.pick(this.config, ['data'])) .on('render', function(){ self.enable(); @@ -116,7 +116,7 @@ define([ * @returns {Object} the values with the selected property and the selection. */ getValues : function getValues() { - var values = _.pickBy(this.config.data, ['selection', 'property']); + var values = _.pick(this.config.data, ['selection', 'property']); if(distributor){ values.selection = distributor.getValues(); } @@ -136,7 +136,7 @@ define([ $distributorContainer = $('.distributor-container', $component); $propertySelectorContainer = $('.property-selector-container', $component); - distributor = distributorComponent($distributorContainer, _.pickBy(config, 'data')); + distributor = distributorComponent($distributorContainer, _.pick(config, 'data')); selector = propertySelectorComponent($propertySelectorContainer, { uri: config.data.property.uri, label: config.data.property.label, diff --git a/views/js/component/editor/propertySelector/selector.js b/views/js/component/editor/propertySelector/selector.js index 3b99bc1..6301999 100644 --- a/views/js/component/editor/propertySelector/selector.js +++ b/views/js/component/editor/propertySelector/selector.js @@ -38,7 +38,7 @@ define([ */ var buildTree = function buildTree(data){ var nodeToListItem = function nodeToListItem(acc , node){ - var item = _.pickBy(node, ['uri', 'label']); + var item = _.pick(node, ['uri', 'label']); if(node.children && node.children.length){ item.childList = _.reduce(node.children, nodeToListItem, ''); }