@kigi/components 1.8.3-beta.2 → 1.8.4

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@kigi/components",
3
- "version": "1.8.3-beta.2",
3
+ "version": "1.8.4",
4
4
  "description": "@kigi/components",
5
5
  "main": "src/components/index.ts",
6
6
  "scripts": {
@@ -20,7 +20,10 @@
20
20
  <div class="mbg-h-c-tone-loading"
21
21
  ng-if="$ctrl.card.loading === true"
22
22
  disable-animate></div>
23
- <div ng-class="{'flex flex-column': $ctrl.card.items && $ctrl.card.items.length > 0}">
23
+
24
+ <div ng-repeat="cardItem in $ctrl.card.items"
25
+ ng-if="$ctrl.card && $ctrl.card.items"
26
+ ng-class="{'flex flex-column': $ctrl.card.items && $ctrl.card.items.length > 0}">
24
27
  <div class="mbg-h-c-tone-v-real-value"
25
28
  ng-show="$ctrl.card.loading !== true && $ctrl.hideValue !== true"
26
29
  disable-animate
@@ -35,13 +38,28 @@
35
38
  </div>
36
39
 
37
40
  <div class="mbg-h-c-tone-v-real-value"
38
- ng-style="{'color': item.color, 'font-weight': item.weight || 400}"
39
- ng-repeat="item in $ctrl.card.items"
41
+ ng-style="{'color': item.color, 'font-weight': item.weight || 400, 'font-style': item.fontStyle}"
42
+ ng-repeat="item in cardItem"
40
43
  ng-show="$ctrl.card.loading !== true && $ctrl.hideValue !== true"
41
44
  disable-animate>
42
45
  {{ item.value }}
43
46
  </div>
44
47
  </div>
48
+ <div ng-if="$ctrl.card && !$ctrl.card.items"
49
+ ng-class="{'flex flex-column': $ctrl.card.items && $ctrl.card.items.length > 0}">
50
+ <div class="mbg-h-c-tone-v-real-value"
51
+ ng-show="$ctrl.card.loading !== true && $ctrl.hideValue !== true"
52
+ disable-animate
53
+ ng-class="{ greey: $ctrl.card.greyColor}">
54
+ {{ $ctrl.card.value }}
55
+ </div>
56
+
57
+ <div class="mbg-h-c-tone-v-hide-value"
58
+ ng-show="$ctrl.card.loading !== true && $ctrl.hideValue === true"
59
+ disable-animate>
60
+ {{ $ctrl.randomEmoji }}
61
+ </div>
62
+ </div>
45
63
  </div>
46
64
  <div ng-if="$ctrl.card.enableHideValues && $ctrl.card.loading !== true"
47
65
  class="mbg-h-c-tone-show"
@@ -1,5 +1,6 @@
1
1
  import './typeone.scss'
2
2
  import template from './typeone.html'
3
+ import { isArray } from '@uirouter/angularjs'
3
4
 
4
5
  class MbgCardTypeOneController {
5
6
  public hideValue: boolean
@@ -27,6 +28,9 @@ class MbgCardTypeOneController {
27
28
  this.card.setNewValue = (value) => {
28
29
  this.setValue(value)
29
30
  }
31
+ if (this.card.items && this.card.items.length > 0 && !isArray(this.card.items[0])) {
32
+ this.card.items = [this.card.items]
33
+ }
30
34
  }
31
35
 
32
36
  renderIcon() {