diff --git a/CHANGELOG.md b/CHANGELOG.md index f5c9dca3..5631accd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 1.3.6 + +### Added +- fetch polyfill with whatwg-fetch + +### Changed +- Store related bugs are fixed +- Dropdown related bugs in ObjectForm / ObjectFormField +- eslint-plugin-vue to 7.0.0-alpha.7 +- Dropdown updated + - emit string as value (Fomantic dropdown default) + ## 1.3.5 ### Added diff --git a/demo/Demo.vue b/demo/Demo.vue index 2492e782..b3ca5fad 100644 --- a/demo/Demo.vue +++ b/demo/Demo.vue @@ -4,8 +4,8 @@
- - + +
diff --git a/demo/examples/dummy.dropdown.js b/demo/examples/dummy.dropdown.js new file mode 100644 index 00000000..9b9defe8 --- /dev/null +++ b/demo/examples/dummy.dropdown.js @@ -0,0 +1,914 @@ +export const filters = [ + { + field: 'product.SCT_Division__c', + object: 'Product2', + name: 'Division', + val: '', + options: [ + { + value: 'Others', + text: 'Others' + }, + { + value: 'Hexal', + text: 'Hexal' + }, + { + value: '1A Pharma', + text: '1A Pharma' + }, + { + value: 'Novartis CH', + text: 'Novartis CH' + }, + { + value: 'Novartis DG', + text: 'Novartis DG' + }, + { + value: 'EBEWE', + text: 'EBEWE' + }, + { + value: 'Novartis PH', + text: 'Novartis PH' + } + ] + }, + { + field: 'product.SCT_Brand__c', + object: 'Product2', + name: 'Brand', + val: '', + options: [ + { + value: 'qw10', + text: 'qw10' + }, + { + value: 'qw11', + text: 'qw11' + }, + { + value: 'qw12', + text: 'qw12' + }, + { + value: 'qw13', + text: 'qw13' + }, + { + value: 'qw14', + text: 'qw14' + }, + { + value: 'qw15', + text: 'qw15' + }, + { + value: 'qw16', + text: 'qw16' + }, + { + value: 'qw18', + text: 'qw18' + }, + { + value: 'qw19', + text: 'qw19' + }, + { + value: 'qw81', + text: 'qw81' + }, + { + value: 'qw20', + text: 'qw20' + }, + { + value: 'qw21', + text: 'qw21' + }, + { + value: 'qw22', + text: 'qw22' + }, + { + value: 'qw23', + text: 'qw23' + }, + { + value: 'qw24', + text: 'qw24' + }, + { + value: 'qw25', + text: 'qw25' + }, + { + value: 'qw26', + text: 'qw26' + }, + { + value: 'qw27', + text: 'qw27' + }, + { + value: 'qw28', + text: 'qw28' + }, + { + value: 'qw29', + text: 'qw29' + }, + { + value: 'qw30', + text: 'qw30' + }, + { + value: 'qw32', + text: 'qw32' + }, + { + value: 'qw33', + text: 'qw33' + }, + { + value: 'qw34', + text: 'qw34' + }, + { + value: 'qw35', + text: 'qw35' + }, + { + value: 'qw36', + text: 'qw36' + }, + { + value: 'qw40', + text: 'qw40' + }, + { + value: 'qw45', + text: 'qw45' + }, + { + value: 'qw54', + text: 'qw54' + }, + { + value: 'qw51', + text: 'qw51' + }, + { + value: 'qw47', + text: 'qw47' + }, + { + value: 'qw50', + text: 'qw50' + }, + { + value: 'qw67', + text: 'qw67' + }, + { + value: 'qw60', + text: 'qw60' + }, + { + value: 'qw95', + text: 'qw95' + }, + { + value: 'qw80', + text: 'qw80' + }, + { + value: 'qw99', + text: 'qw99' + }, + { + value: 'qw61', + text: 'qw61' + }, + { + value: 'qw57', + text: 'qw57' + }, + { + value: 'qw48', + text: 'qw48' + }, + { + value: 'qw42', + text: 'qw42' + }, + { + value: 'qw92', + text: 'qw92' + }, + { + value: 'qw106', + text: 'qw106' + }, + { + value: 'qw103', + text: 'qw103' + }, + { + value: 'qw93', + text: 'qw93' + }, + { + value: 'qw102', + text: 'qw102' + }, + { + value: 'qw78', + text: 'qw78' + }, + { + value: 'qw79', + text: 'qw79' + }, + { + value: 'qw100', + text: 'qw100' + }, + { + value: 'qw104', + text: 'qw104' + }, + { + value: 'qw96', + text: 'qw96' + }, + { + value: 'qw39', + text: 'qw39' + }, + { + value: 'qw44', + text: 'qw44' + }, + { + value: 'qw94', + text: 'qw94' + }, + { + value: 'qw101', + text: 'qw101' + }, + { + value: 'qw55', + text: 'qw55' + }, + { + value: 'qw68', + text: 'qw68' + }, + { + value: 'qw105', + text: 'qw105' + }, + { + value: 'qw77', + text: 'qw77' + }, + { + value: 'qw90', + text: 'qw90' + }, + { + value: 'qw38', + text: 'qw38' + }, + { + value: 'qw64', + text: 'qw64' + }, + { + value: 'qw70', + text: 'qw70' + }, + { + value: 'qw91', + text: 'qw91' + }, + { + value: 'qw56', + text: 'qw56' + }, + { + value: 'qw43', + text: 'qw43' + }, + { + value: 'qw49', + text: 'qw49' + }, + { + value: 'qw59', + text: 'qw59' + }, + { + value: 'qw46', + text: 'qw46' + }, + { + value: 'qw98', + text: 'qw98' + }, + { + value: 'qw62', + text: 'qw62' + }, + { + value: 'qw63', + text: 'qw63' + }, + { + value: 'qw58', + text: 'qw58' + }, + { + value: 'qw97', + text: 'qw97' + }, + { + value: 'qw65', + text: 'qw65' + }, + { + value: 'qw1', + text: 'qw1' + }, + { + value: 'qw8', + text: 'qw8' + }, + { + value: 'qw9', + text: 'qw9' + }, + { + value: 'qw17', + text: 'qw17' + }, + { + value: 'qw31', + text: 'qw31' + }, + { + value: 'qw37', + text: 'qw37' + }, + { + value: 'qw41', + text: 'qw41' + }, + { + value: 'qw82', + text: 'qw82' + }, + { + value: 'qw52', + text: 'qw52' + }, + { + value: 'qw66', + text: 'qw66' + }, + { + value: 'qw53', + text: 'qw53' + }, + { + value: 'qw107', + text: 'qw107' + }, + { + value: 'qw69', + text: 'qw69' + }, + { + value: 'qw71', + text: 'qw71' + }, + { + value: 'qw73', + text: 'qw73' + }, + { + value: 'qw76', + text: 'qw76' + }, + { + value: 'qw85', + text: 'qw85' + }, + { + value: 'qw74', + text: 'qw74' + }, + { + value: 'qw75', + text: 'qw75' + }, + { + value: 'qw72', + text: 'qw72' + }, + { + value: 'qw86', + text: 'qw86' + }, + { + value: 'qw87', + text: 'qw87' + }, + { + value: 'qw88', + text: 'qw88' + }, + { + value: 'qw83', + text: 'qw83' + }, + { + value: 'qw84', + text: 'qw84' + }, + { + value: 'qw89', + text: 'qw89' + } + ] + }, + { + field: 'product.SCT_Dosage_Form__c', + object: 'Product2', + name: 'Dosage Form', + val: '', + options: [ + { + value: 'TABLET, FILM-COATED', + text: 'TABLET, FILM-COATED' + }, + { + value: 'TABLET', + text: 'TABLET' + }, + { + value: 'HARD GELATINE CAPSULE', + text: 'HARD GELATINE CAPSULE' + }, + { + value: 'LIQUID IN SYRINGE', + text: 'LIQUID IN SYRINGE' + }, + { + value: 'TABLET, PROLONGED RELEASE', + text: 'TABLET, PROLONGED RELEASE' + }, + { + value: 'TABLET, GASTRO-RESISTANT', + text: 'TABLET, GASTRO-RESISTANT' + }, + { + value: 'TABLET, ORAL DISINTEGRATING', + text: 'TABLET, ORAL DISINTEGRATING' + }, + { + value: 'LIQUID AS DROPS', + text: 'LIQUID AS DROPS' + }, + { + value: 'POWDER FOR SOLUTION FOR INJECTION/INFUSION', + text: 'POWDER FOR SOLUTION FOR INJECTION/INFUSION' + }, + { + value: 'LIQUID IN AMPOULE', + text: 'LIQUID IN AMPOULE' + }, + { + value: 'TABLET, SUGAR-COATED', + text: 'TABLET, SUGAR-COATED' + } + ] + }, + { + field: 'product.SCT_Molecule__c', + object: 'Product2', + name: 'Molecule', + val: '', + options: [ + { + value: 'qw10', + text: 'qw10' + }, + { + value: 'qw11', + text: 'qw11' + }, + { + value: 'qw12', + text: 'qw12' + }, + { + value: 'qw13', + text: 'qw13' + }, + { + value: 'qw14', + text: 'qw14' + }, + { + value: 'qw15', + text: 'qw15' + }, + { + value: 'qw16', + text: 'qw16' + }, + { + value: 'qw18', + text: 'qw18' + }, + { + value: 'qw19', + text: 'qw19' + }, + { + value: 'qw81', + text: 'qw81' + }, + { + value: 'qw20', + text: 'qw20' + }, + { + value: 'qw21', + text: 'qw21' + }, + { + value: 'qw22', + text: 'qw22' + }, + { + value: 'qw23', + text: 'qw23' + }, + { + value: 'qw24', + text: 'qw24' + }, + { + value: 'qw25', + text: 'qw25' + }, + { + value: 'qw26', + text: 'qw26' + }, + { + value: 'qw27', + text: 'qw27' + }, + { + value: 'qw28', + text: 'qw28' + }, + { + value: 'qw29', + text: 'qw29' + }, + { + value: 'qw30', + text: 'qw30' + }, + { + value: 'qw32', + text: 'qw32' + }, + { + value: 'qw33', + text: 'qw33' + }, + { + value: 'qw34', + text: 'qw34' + }, + { + value: 'qw35', + text: 'qw35' + }, + { + value: 'qw36', + text: 'qw36' + }, + { + value: 'qw40', + text: 'qw40' + }, + { + value: 'qw45', + text: 'qw45' + }, + { + value: 'qw54', + text: 'qw54' + }, + { + value: 'qw51', + text: 'qw51' + }, + { + value: 'qw47', + text: 'qw47' + }, + { + value: 'qw50', + text: 'qw50' + }, + { + value: 'qw67', + text: 'qw67' + }, + { + value: 'qw60', + text: 'qw60' + }, + { + value: 'qw95', + text: 'qw95' + }, + { + value: 'qw80', + text: 'qw80' + }, + { + value: 'qw99', + text: 'qw99' + }, + { + value: 'qw61', + text: 'qw61' + }, + { + value: 'qw57', + text: 'qw57' + }, + { + value: 'qw48', + text: 'qw48' + }, + { + value: 'qw42', + text: 'qw42' + }, + { + value: 'qw92', + text: 'qw92' + }, + { + value: 'qw106', + text: 'qw106' + }, + { + value: 'qw103', + text: 'qw103' + }, + { + value: 'qw93', + text: 'qw93' + }, + { + value: 'qw102', + text: 'qw102' + }, + { + value: 'qw78', + text: 'qw78' + }, + { + value: 'qw79', + text: 'qw79' + }, + { + value: 'qw100', + text: 'qw100' + }, + { + value: 'qw104', + text: 'qw104' + }, + { + value: 'qw96', + text: 'qw96' + }, + { + value: 'qw39', + text: 'qw39' + }, + { + value: 'qw44', + text: 'qw44' + }, + { + value: 'qw94', + text: 'qw94' + }, + { + value: 'qw101', + text: 'qw101' + }, + { + value: 'qw55', + text: 'qw55' + }, + { + value: 'qw68', + text: 'qw68' + }, + { + value: 'qw105', + text: 'qw105' + }, + { + value: 'qw77', + text: 'qw77' + }, + { + value: 'qw90', + text: 'qw90' + }, + { + value: 'qw38', + text: 'qw38' + }, + { + value: 'qw64', + text: 'qw64' + }, + { + value: 'qw70', + text: 'qw70' + }, + { + value: 'qw91', + text: 'qw91' + }, + { + value: 'qw56', + text: 'qw56' + }, + { + value: 'qw43', + text: 'qw43' + }, + { + value: 'qw49', + text: 'qw49' + }, + { + value: 'qw59', + text: 'qw59' + }, + { + value: 'qw46', + text: 'qw46' + }, + { + value: 'qw98', + text: 'qw98' + }, + { + value: 'qw62', + text: 'qw62' + }, + { + value: 'qw63', + text: 'qw63' + }, + { + value: 'qw58', + text: 'qw58' + }, + { + value: 'qw97', + text: 'qw97' + }, + { + value: 'qw65', + text: 'qw65' + }, + { + value: 'qw1', + text: 'qw1' + }, + { + value: 'qw8', + text: 'qw8' + }, + { + value: 'qw9', + text: 'qw9' + }, + { + value: 'qw17', + text: 'qw17' + }, + { + value: 'qw31', + text: 'qw31' + }, + { + value: 'qw37', + text: 'qw37' + }, + { + value: 'qw41', + text: 'qw41' + }, + { + value: 'qw82', + text: 'qw82' + }, + { + value: 'qw52', + text: 'qw52' + }, + { + value: 'qw66', + text: 'qw66' + }, + { + value: 'qw53', + text: 'qw53' + }, + { + value: 'qw107', + text: 'qw107' + }, + { + value: 'qw69', + text: 'qw69' + }, + { + value: 'qw71', + text: 'qw71' + }, + { + value: 'qw73', + text: 'qw73' + }, + { + value: 'qw76', + text: 'qw76' + }, + { + value: 'qw85', + text: 'qw85' + }, + { + value: 'qw74', + text: 'qw74' + }, + { + value: 'qw75', + text: 'qw75' + }, + { + value: 'qw72', + text: 'qw72' + }, + { + value: 'qw86', + text: 'qw86' + }, + { + value: 'qw87', + text: 'qw87' + }, + { + value: 'qw88', + text: 'qw88' + }, + { + value: 'qw83', + text: 'qw83' + }, + { + value: 'qw84', + text: 'qw84' + }, + { + value: 'qw89', + text: 'qw89' + } + ] + } +] diff --git a/docs/debug/android.md b/docs/debug/android.md index 6d0c7839..512d364a 100644 --- a/docs/debug/android.md +++ b/docs/debug/android.md @@ -34,8 +34,7 @@ And place it in your header of your `public/index.html` file. - open this url: `chrome://inspect/#devices` and connect to your webview - open console and enter: `window.location = "192.168.0.2:8000"` (replace 192.168.0.2 with your IP address) -This will no open the version you `serve` and the `devtools` should be able to pick up your components tree -and your pinia store. +This will no open the version you `serve` and the `devtools` should be able to pick up your components tree. To download the DB from the simulator run: diff --git a/docs/debug/ios.md b/docs/debug/ios.md index beeb1775..27ee140b 100644 --- a/docs/debug/ios.md +++ b/docs/debug/ios.md @@ -28,8 +28,7 @@ Be sure you have something like this in your public/index.html header: - connect safari debugger to webview -This will no open the version you `build` and the `devtools` should be able to pick up your components tree -and your pinia store. +This will no open the version you `build` and the `devtools` should be able to pick up your components tree. Warning: You still need to refresh (command R from Safari debugger) to reload new versions diff --git a/docs/sdk-install.md b/docs/sdk-install.md index c72fc7ea..7a503097 100644 --- a/docs/sdk-install.md +++ b/docs/sdk-install.md @@ -5,7 +5,6 @@ On your project, be sure that you have these dependencies installed ``` - "vue": "^2.6.11" -- "pinia": "0.0.5" - "@vue/composition-api": "^0.5.0" - "sass": "^1.26.3" (devDependency) - "sass-loader": "^8.0.2" (devDependency) @@ -21,4 +20,11 @@ On your project, be sure that you have these dependencies installed ```bash npm install @pitcher/vue-sdk ``` + +Make sure that you have +```javascript +transpileDependencies: ['@pitcher/vue-sdk', 'fuse.js'] +``` +in your vue.config.js as a root property. + \ No newline at end of file diff --git a/package.json b/package.json index 33ba49a7..b5e18f6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pitcher/vue-sdk", - "version": "1.3.5", + "version": "1.3.6", "description": "VueJS Development Tools for the use in Pitcher Impact", "author": "Pitcher AG", "bin": { @@ -26,6 +26,8 @@ "whatwg-fetch": "^3.0.0" }, "devDependencies": { + "@vue/composition-api": "^0.6.6", + "vue": "^2.6.11", "@babel/cli": "^7.8.4", "@google-cloud/translate": "^6.0.0", "@pitcher/easygettext": "^2.10.1", @@ -34,14 +36,13 @@ "@vue/cli-plugin-eslint": "~4.3.0", "@vue/cli-plugin-unit-jest": "^4.3.1", "@vue/cli-service": "^4.4.1", - "@vue/composition-api": "^0.6.6", "@vue/eslint-config-prettier": "^6.0.0", "@vue/test-utils": "1.0.0-beta.31", "babel-eslint": "^10.1.0", "cross-env": "^7.0.2", "eslint": "^7.2.0", "eslint-plugin-prettier": "^3.1.1", - "eslint-plugin-vue": "^7.0.0-alpha.6", + "eslint-plugin-vue": "^7.0.0-alpha.7", "full-icu": "^1.3.1", "gettext-parser": "^4.0.3", "husky": "^4.2.5", @@ -53,7 +54,6 @@ "rimraf": "^3.0.2", "sass": "^1.26.3", "sass-loader": "^8.0.2", - "vue": "^2.6.11", "vue-template-compiler": "^2.6.11" }, "peerDependencies": { diff --git a/src/components/Dropdown.vue b/src/components/Dropdown.vue index 6bd021d9..6e7b0661 100644 --- a/src/components/Dropdown.vue +++ b/src/components/Dropdown.vue @@ -142,13 +142,6 @@ export default { hasDefaultSlot: !!slots.default }) - const selectedValue = computed(() => { - if (Array.isArray(props.value)) { - return props.value.join(',') - } - return props.value - }) - const dropdownAttr = computed(() => ({ class: { fluid: props.fluid, @@ -239,7 +232,6 @@ export default { if (props.multiple || refs.dropdown.className.includes('multiple')) { const split = value.split(',') - emit('input', split) // usage with items if (props.items) { returnValue = props.items.filter(item => { @@ -250,8 +242,6 @@ export default { }) } } else { - emit('input', value) - // usage with items if (props.items) { returnValue = state.isSingleItem @@ -259,6 +249,7 @@ export default { : props.items.find(item => item[props.itemValue] === value) } } + emit('input', value) emit('onSelected', returnValue) } }, @@ -288,7 +279,6 @@ export default { return { ...toRefs(state), - selectedValue, dropdownAttr, listItems, clearBtnAttr, diff --git a/src/components/ObjectForm.vue b/src/components/ObjectForm.vue index d525748c..0200f617 100644 --- a/src/components/ObjectForm.vue +++ b/src/components/ObjectForm.vue @@ -17,9 +17,9 @@ diff --git a/src/components/ObjectFormField.vue b/src/components/ObjectFormField.vue index 5e8dd766..f3bc02a2 100644 --- a/src/components/ObjectFormField.vue +++ b/src/components/ObjectFormField.vue @@ -30,7 +30,7 @@ :multiple="typ === 'multipicklist'" @input="$emit('input', $event)" :value="value" - :options="field.references" + :items="field.references" add-class="selection" /> @@ -61,12 +61,7 @@ type="number" readonly="readonly" step="any"--> - + @@ -74,10 +69,11 @@ import { computed, ref } from '@vue/composition-api' import Dropdown from './Dropdown' import Calendar from './Calendar' +import Checkbox from './Checkbox' export default { name: 'ObjectFormField', - components: { Calendar, Dropdown }, + components: { Checkbox, Calendar, Dropdown }, props: { field: { required: true }, index: { diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 56e221fa..5a6179c9 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -6,30 +6,27 @@