@iamproperty/components 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,36 +1,42 @@
1
1
  {
2
2
  "name": "@iamproperty/components",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "private": false,
5
5
  "description": "Component library for iamproperty",
6
6
  "author": {
7
7
  "name": "iamproperty"
8
8
  },
9
- "license": "UNLICENSED",
10
9
  "scripts": {
11
- "dev": "npm run serve",
12
10
  "serve": "vue-cli-service serve docs/main.js",
13
11
  "build": "vue-cli-service build --target lib src/index.js",
14
- "build:docs": "vue-cli-service build docs/main.js",
15
12
  "test:unit": "vue-cli-service test:unit",
16
- "test:visual": "cross-env TEST_MODE=visual vue-cli-service test:unit --forceExit --detectOpenHandles",
17
- "test:approve": "cross-env TEST_MODE=visual vue-cli-service test:unit --forceExit --detectOpenHandles --updateSnapshot",
18
- "test": "npm run test:unit && npm run test:visual",
19
13
  "lint": "vue-cli-service lint",
20
- "compile:sass": "sass assets/sass/main.scss assets/css/style.min.css --style=compressed && sass assets/sass/core.scss assets/css/core.min.css --style=compressed",
14
+ "audit": "node local_modules/audit.js",
15
+ "build:docs": "vue-cli-service build docs/main.js",
21
16
  "compile:js": "rollup --environment BUNDLE:true --config rollup.config.js --sourcemap && terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=assets/js/scripts.bundle.js.map,includeSources,url=scripts.bundle.min.js.map\" --output assets/js/scripts.bundle.min.js assets/js/scripts.bundle.js",
17
+ "compile:sass": "sass assets/sass/main.scss assets/css/style.min.css --style=compressed && sass assets/sass/core.scss assets/css/core.min.css --style=compressed",
18
+ "dev": "npm run serve",
22
19
  "prepack": "npm run build",
23
- "audit": "node local_modules/audit.js",
24
- "pull-request": "npm run test:unit && npm run test:approve && npm run compile:sass && npm run compile:js && npm run audit"
20
+ "pull-request": "npm run test:unit && npm run test:approve && npm run compile:sass && npm run compile:js && npm run audit",
21
+ "test": "npm run test:unit && npm run test:visual",
22
+ "test:approve": "cross-env TEST_MODE=visual vue-cli-service test:unit --forceExit --detectOpenHandles --updateSnapshot",
23
+ "test:visual": "cross-env TEST_MODE=visual vue-cli-service test:unit --forceExit --detectOpenHandles"
25
24
  },
26
25
  "main": "dist/components.umd.js",
26
+ "files": [
27
+ "assets/*",
28
+ "dist/*",
29
+ "src/*"
30
+ ],
27
31
  "dependencies": {
32
+ "@babel/plugin-transform-runtime": "^7.16.7",
28
33
  "@vue/eslint-config-standard": "^6.1.0",
29
34
  "bootstrap": "^5.1.3",
30
35
  "glob": "^7.2.0",
31
36
  "sass": "^1.45.1",
32
37
  "sass-loader": "^10.2.0",
33
38
  "vue": "^2.6.14",
39
+ "vue-loader": "^15.9.8",
34
40
  "vue-markdown-loader": "^2.5.0",
35
41
  "vue-router": "^3.5.3"
36
42
  },
@@ -44,13 +50,13 @@
44
50
  "@rollup/plugin-commonjs": "^19.0.0",
45
51
  "@rollup/plugin-node-resolve": "^13.1.1",
46
52
  "@rollup/plugin-replace": "^2.4.2",
47
- "@vue/cli-plugin-babel": "^4.5.15",
48
- "@vue/cli-plugin-eslint": "^4.5.15",
53
+ "@vue/cli-plugin-babel": "^3.12.1",
54
+ "@vue/cli-plugin-eslint": "^3.1.1",
49
55
  "@vue/cli-plugin-router": "^4.5.15",
50
56
  "@vue/cli-plugin-unit-jest": "^4.5.15",
51
57
  "@vue/cli-service": "^4.5.15",
52
58
  "@vue/test-utils": "^1.3.0",
53
- "babel-jest": "^27.4.5",
59
+ "cache-loader": "^4.1.0",
54
60
  "cross-env": "^7.0.3",
55
61
  "eslint": "^7.32.0",
56
62
  "eslint-plugin-import": "^2.25.3",
@@ -68,21 +74,17 @@
68
74
  "rollup": "^2.62.0",
69
75
  "rollup-plugin-istanbul": "^3.0.0",
70
76
  "sass-true": "^6.0.1",
71
- "serve": "^12.0.1",
77
+ "serve": "^13.0.2",
72
78
  "terser": "5.1.0",
73
- "vue-loader": "^15.9.8",
74
- "vue-svg-loader": "^0.16.0",
75
- "vue-template-compiler": "^2.6.14"
79
+ "vue-svg-loader": "^0.10.0",
80
+ "vue-template-compiler": "^2.6.14",
81
+ "webpack": "^4.46.0"
76
82
  },
83
+ "license": "UNLICENSED",
84
+ "localURL": "http://localhost:8080",
77
85
  "registry-url": "https://registry.npmjs.com",
78
86
  "repository": {
79
87
  "type": "git",
80
88
  "url": "git://github.com/iamproperty/iamproperty-vue-component-library.git"
81
- },
82
- "files": [
83
- "assets/*",
84
- "dist/*",
85
- "src/*"
86
- ],
87
- "localURL": "http://localhost:8080"
89
+ }
88
90
  }
@@ -36,15 +36,19 @@ export default {
36
36
 
37
37
  for (const [key, value] of Object.entries(this.$slots.default)) {
38
38
 
39
- let tabTitle = value.componentOptions.propsData.title;
40
-
41
- let tab = {
42
- name: this.tabsID,
43
- id: this.tabsID+"_tab"+i++,
44
- tabTitle: tabTitle
39
+ // Check if the value in the object is actually a tab and has the correct data
40
+ if(value.componentOptions && value.componentOptions.propsData && value.componentOptions.propsData.title){
41
+
42
+ let tabTitle = value.componentOptions.propsData.title;
43
+
44
+ let tab = {
45
+ name: this.tabsID,
46
+ id: this.tabsID+"_tab"+i++,
47
+ tabTitle: tabTitle
48
+ }
49
+
50
+ tabLinks.push(tab);
45
51
  }
46
-
47
- tabLinks.push(tab);
48
52
  }
49
53
 
50
54
  return tabLinks;
@@ -0,0 +1,11 @@
1
+ ### Usage
2
+
3
+ ```
4
+ <YoutubeVideo video="lROFZaJcVug" ></YoutubeVideo>
5
+ ```
6
+
7
+ ### Properties
8
+
9
+ | Option | Type | Default Value | Description |
10
+ | ------ | ---- | ------------- | ----------- |
11
+ | video | String | property | Video id from youtube |
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <div class="youtube-embed ratio ratio-16x9" ref="wrapper">
3
+ <a :href="`https://www.youtube.com/watch?v=${video}`" target="_blank" title="Investments Video" :data-id="video">
4
+ <img :src="`https://img.youtube.com/vi/${video}/maxresdefault.jpg`" alt="">
5
+ <span class="btn btn-secondary">Play Video</span>
6
+ </a>
7
+ </div>
8
+ </template>
9
+ <script>
10
+ import youtubeVideo from '../../../assets/js/modules/youtubevideo.js'
11
+
12
+ export default {
13
+ name: 'YoutuveVideo',
14
+ props: {
15
+ video: {
16
+ type: String,
17
+ required: true
18
+ }
19
+ },
20
+ mounted(){
21
+ new youtubeVideo(this.$refs.wrapper);
22
+ }
23
+ }
24
+ </script>
Binary file
Binary file
@@ -1,3 +0,0 @@
1
- img {
2
- max-width: 100%;
3
- }
Binary file
Binary file