@yoobic/yobi 8.3.0-36 → 8.3.0-37

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.
Files changed (25) hide show
  1. package/dist/cjs/yoo-entity.cjs.entry.js +6 -7
  2. package/dist/cjs/yoo-form-autocomplete.cjs.entry.js +3 -2
  3. package/dist/cjs/yoo-form-multi-input.cjs.entry.js +4 -0
  4. package/dist/cjs/yoo-mission-score.cjs.entry.js +1 -1
  5. package/dist/collection/components/entities/card-placeholder/card-placeholder.js +1 -1
  6. package/dist/collection/components/entities/entity/constants/index.js +0 -1
  7. package/dist/collection/components/entities/entity/entity.js +7 -7
  8. package/dist/collection/components/form/form-autocomplete/form-autocomplete.js +4 -3
  9. package/dist/collection/components/form/form-autocomplete-dialog/form-autocomplete-dialog.js +1 -1
  10. package/dist/collection/components/form/form-multi-input/form-multi-input.js +4 -0
  11. package/dist/collection/components/form/form-table/form-table.js +1 -1
  12. package/dist/collection/components/form/slides-media/slides-media.js +1 -1
  13. package/dist/collection/components/grid/grid/grid.js +2 -2
  14. package/dist/collection/feature-operate/mission/mission-score/mission-score.js +1 -1
  15. package/dist/design-system/yoo-entity.entry.js +6 -7
  16. package/dist/design-system/yoo-form-autocomplete.entry.js +3 -2
  17. package/dist/design-system/yoo-form-multi-input.entry.js +4 -0
  18. package/dist/design-system/yoo-mission-score.entry.js +1 -1
  19. package/dist/esm/yoo-entity.entry.js +6 -7
  20. package/dist/esm/yoo-form-autocomplete.entry.js +3 -2
  21. package/dist/esm/yoo-form-multi-input.entry.js +4 -0
  22. package/dist/esm/yoo-mission-score.entry.js +1 -1
  23. package/dist/types/components/entities/entity/entity.d.ts +1 -1
  24. package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/ui/card/card.type.d.ts +1 -1
  25. package/package.json +1 -1
@@ -29,7 +29,6 @@ const entitySimpleCardLists = [
29
29
  'googlemaps',
30
30
  'groups',
31
31
  'icons',
32
- 'incentives',
33
32
  'language',
34
33
  'locationtypes',
35
34
  'markas',
@@ -82,6 +81,9 @@ const YooEntityComponent = class {
82
81
  this.secondaryActionsDropdown = false;
83
82
  this.extraClass = '';
84
83
  }
84
+ get isSimpleCardList() {
85
+ return this.displayType === 'card-list-simple' || (entitySimpleCardLists === null || entitySimpleCardLists === void 0 ? void 0 : entitySimpleCardLists.includes(this.entityType));
86
+ }
85
87
  async forceUpdate(emitEvent) {
86
88
  index.forceUpdate(this);
87
89
  this.emitEventOnDidUpdate = emitEvent;
@@ -95,9 +97,6 @@ const YooEntityComponent = class {
95
97
  onEntityClosed() {
96
98
  this.closed.emit(true);
97
99
  }
98
- isSimpleCardList(entityType) {
99
- return entitySimpleCardLists.indexOf(entityType) >= 0;
100
- }
101
100
  getCustomModelValue(key, data, fields) {
102
101
  const field = fields.find((f) => f.name === key);
103
102
  if ((field === null || field === void 0 ? void 0 : field.type) === index$1.FormFieldType.user && data[key]) {
@@ -230,7 +229,7 @@ const YooEntityComponent = class {
230
229
  else if (this.displayType === 'card-feed-row') {
231
230
  return this.renderCardFeedRow();
232
231
  }
233
- else if (this.displayType === 'card-list' || this.displayType === 'card-map') {
232
+ else if (this.displayType === 'card-list' || this.displayType === 'card-list-simple' || this.displayType === 'card-map') {
234
233
  return this.renderCardList(extraClasses);
235
234
  }
236
235
  else if (this.displayType === 'card-list-color' || this.displayType === 'card-cell-color') {
@@ -2023,7 +2022,7 @@ const YooEntityComponent = class {
2023
2022
  entry.icon = this.item.icon;
2024
2023
  entry.iconColor = this.item.iconColor;
2025
2024
  entry.avatarColor = this.item.avatarColor;
2026
- if (overlays.isWeb(this.host) && this.isSimpleCardList(this.entityType)) {
2025
+ if (overlays.isWeb(this.host) && this.isSimpleCardList) {
2027
2026
  entry.avatarSize = 'small';
2028
2027
  }
2029
2028
  }
@@ -2113,7 +2112,7 @@ const YooEntityComponent = class {
2113
2112
  [this.entityType]: true
2114
2113
  }, isCollapsed: this.isMap || this.host.classList.contains('no-kpi'), onListCollapsed: (ev) => this.onListCollapsed(ev) }));
2115
2114
  }
2116
- else if (this.entityType && !this.isSimpleCardList(this.entityType) && !this.isWebAutocomplete()) {
2115
+ else if (this.entityType && !this.isSimpleCardList && !this.isWebAutocomplete()) {
2117
2116
  return (index.h("yoo-card-list", { entry: entry, class: {
2118
2117
  'selection-mode': this.host.classList.contains('check-selected') || this.host.classList.contains('check-unselected'),
2119
2118
  autocomplete: this.host.classList.contains('autocomplete'),
@@ -340,9 +340,10 @@ const YooFormAutocompleteComponent = class {
340
340
  if (['emails', 'tags'].includes(this.entityType) || this.allowCustomTag) {
341
341
  return 'card-tag';
342
342
  }
343
- else {
344
- return 'card-list';
343
+ if (this.entityType === 'incentives') {
344
+ return 'card-list-simple';
345
345
  }
346
+ return 'card-list';
346
347
  }
347
348
  getEntityType() {
348
349
  return (this.allowCustomTag || this.tag) && !['emails', 'groups'].includes(this.entityType) ? 'tag' : this.entityType;
@@ -106,6 +106,10 @@ const YooFormMultiInputComponent = class {
106
106
  this.focusTo = null;
107
107
  }
108
108
  componentWillRender() {
109
+ var _a, _b;
110
+ if (this.isSimpleArray && !Array.isArray((_a = this.value) === null || _a === void 0 ? void 0 : _a[0])) {
111
+ this.value = ((_b = this.value) === null || _b === void 0 ? void 0 : _b[0]) ? [this.value] : [[]];
112
+ }
109
113
  this.destroyDragAndDrop();
110
114
  // helps to control re-rendering when row has been added by 'enter' pressing
111
115
  if (this.tempMinRows !== undefined) {
@@ -81,7 +81,7 @@ const YooMissionScoreComponent = class {
81
81
  maxValue: isPercentage ? 100 : total,
82
82
  metric: isPercentage ? 'percentage' : 'points',
83
83
  allowNonAvailableValue: true,
84
- numberDecimalAfterComaProgressValue: 2,
84
+ numberDecimalAfterComaProgressValue: 0,
85
85
  percentValueColorScheme: isPercentage,
86
86
  ...(!isPercentage && { class: 'app-color' })
87
87
  },
@@ -323,7 +323,7 @@ export class YooCardPlaceholderComponent {
323
323
  "mutable": false,
324
324
  "complexType": {
325
325
  "original": "CardType",
326
- "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
326
+ "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-list-simple\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
327
327
  "references": {
328
328
  "CardType": {
329
329
  "location": "import",
@@ -10,7 +10,6 @@ export const entitySimpleCardLists = [
10
10
  'googlemaps',
11
11
  'groups',
12
12
  'icons',
13
- 'incentives',
14
13
  'language',
15
14
  'locationtypes',
16
15
  'markas',
@@ -18,6 +18,9 @@ export class YooEntityComponent {
18
18
  this.secondaryActionsDropdown = false;
19
19
  this.extraClass = '';
20
20
  }
21
+ get isSimpleCardList() {
22
+ return this.displayType === 'card-list-simple' || (entitySimpleCardLists === null || entitySimpleCardLists === void 0 ? void 0 : entitySimpleCardLists.includes(this.entityType));
23
+ }
21
24
  async forceUpdate(emitEvent) {
22
25
  forceUpdate(this);
23
26
  this.emitEventOnDidUpdate = emitEvent;
@@ -31,9 +34,6 @@ export class YooEntityComponent {
31
34
  onEntityClosed() {
32
35
  this.closed.emit(true);
33
36
  }
34
- isSimpleCardList(entityType) {
35
- return entitySimpleCardLists.indexOf(entityType) >= 0;
36
- }
37
37
  getCustomModelValue(key, data, fields) {
38
38
  const field = fields.find((f) => f.name === key);
39
39
  if ((field === null || field === void 0 ? void 0 : field.type) === FormFieldType.user && data[key]) {
@@ -166,7 +166,7 @@ export class YooEntityComponent {
166
166
  else if (this.displayType === 'card-feed-row') {
167
167
  return this.renderCardFeedRow();
168
168
  }
169
- else if (this.displayType === 'card-list' || this.displayType === 'card-map') {
169
+ else if (this.displayType === 'card-list' || this.displayType === 'card-list-simple' || this.displayType === 'card-map') {
170
170
  return this.renderCardList(extraClasses);
171
171
  }
172
172
  else if (this.displayType === 'card-list-color' || this.displayType === 'card-cell-color') {
@@ -1973,7 +1973,7 @@ export class YooEntityComponent {
1973
1973
  entry.icon = this.item.icon;
1974
1974
  entry.iconColor = this.item.iconColor;
1975
1975
  entry.avatarColor = this.item.avatarColor;
1976
- if (isWeb(this.host) && this.isSimpleCardList(this.entityType)) {
1976
+ if (isWeb(this.host) && this.isSimpleCardList) {
1977
1977
  entry.avatarSize = 'small';
1978
1978
  }
1979
1979
  }
@@ -2063,7 +2063,7 @@ export class YooEntityComponent {
2063
2063
  [this.entityType]: true
2064
2064
  }, isCollapsed: this.isMap || this.host.classList.contains('no-kpi'), onListCollapsed: (ev) => this.onListCollapsed(ev) }));
2065
2065
  }
2066
- else if (this.entityType && !this.isSimpleCardList(this.entityType) && !this.isWebAutocomplete()) {
2066
+ else if (this.entityType && !this.isSimpleCardList && !this.isWebAutocomplete()) {
2067
2067
  return (h("yoo-card-list", { entry: entry, class: {
2068
2068
  'selection-mode': this.host.classList.contains('check-selected') || this.host.classList.contains('check-unselected'),
2069
2069
  autocomplete: this.host.classList.contains('autocomplete'),
@@ -2644,7 +2644,7 @@ export class YooEntityComponent {
2644
2644
  "mutable": false,
2645
2645
  "complexType": {
2646
2646
  "original": "CardType",
2647
- "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
2647
+ "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-list-simple\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
2648
2648
  "references": {
2649
2649
  "CardType": {
2650
2650
  "location": "import",
@@ -319,9 +319,10 @@ export class YooFormAutocompleteComponent {
319
319
  if (['emails', 'tags'].includes(this.entityType) || this.allowCustomTag) {
320
320
  return 'card-tag';
321
321
  }
322
- else {
323
- return 'card-list';
322
+ if (this.entityType === 'incentives') {
323
+ return 'card-list-simple';
324
324
  }
325
+ return 'card-list';
325
326
  }
326
327
  getEntityType() {
327
328
  return (this.allowCustomTag || this.tag) && !['emails', 'groups'].includes(this.entityType) ? 'tag' : this.entityType;
@@ -1566,7 +1567,7 @@ export class YooFormAutocompleteComponent {
1566
1567
  "mutable": false,
1567
1568
  "complexType": {
1568
1569
  "original": "CardType",
1569
- "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
1570
+ "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-list-simple\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
1570
1571
  "references": {
1571
1572
  "CardType": {
1572
1573
  "location": "import",
@@ -448,7 +448,7 @@ export class YooFormAutocompleteDialogComponent {
448
448
  "mutable": false,
449
449
  "complexType": {
450
450
  "original": "CardType",
451
- "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
451
+ "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-list-simple\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
452
452
  "references": {
453
453
  "CardType": {
454
454
  "location": "import",
@@ -99,6 +99,10 @@ export class YooFormMultiInputComponent {
99
99
  this.focusTo = null;
100
100
  }
101
101
  componentWillRender() {
102
+ var _a, _b;
103
+ if (this.isSimpleArray && !Array.isArray((_a = this.value) === null || _a === void 0 ? void 0 : _a[0])) {
104
+ this.value = ((_b = this.value) === null || _b === void 0 ? void 0 : _b[0]) ? [this.value] : [[]];
105
+ }
102
106
  this.destroyDragAndDrop();
103
107
  // helps to control re-rendering when row has been added by 'enter' pressing
104
108
  if (this.tempMinRows !== undefined) {
@@ -456,7 +456,7 @@ export class YooFormTableComponent {
456
456
  "mutable": false,
457
457
  "complexType": {
458
458
  "original": "CardType",
459
- "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
459
+ "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-list-simple\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
460
460
  "references": {
461
461
  "CardType": {
462
462
  "location": "import",
@@ -905,7 +905,7 @@ export class YooSlidesMediaComponent {
905
905
  "mutable": false,
906
906
  "complexType": {
907
907
  "original": "CardType",
908
- "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
908
+ "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-list-simple\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
909
909
  "references": {
910
910
  "CardType": {
911
911
  "location": "import",
@@ -3359,7 +3359,7 @@ export class YooGridComponent {
3359
3359
  "mutable": true,
3360
3360
  "complexType": {
3361
3361
  "original": "CardType",
3362
- "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
3362
+ "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-list-simple\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
3363
3363
  "references": {
3364
3364
  "CardType": {
3365
3365
  "location": "import",
@@ -6601,7 +6601,7 @@ export class YooGridComponent {
6601
6601
  },
6602
6602
  "complexType": {
6603
6603
  "original": "CardType",
6604
- "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
6604
+ "resolved": "\"calendar\" | \"card-calendar\" | \"card-battle\" | \"card-battle-result\" | \"card-campaign\" | \"card-cell\" | \"card-cell-color\" | \"card-cell-image\" | \"card-chat\" | \"card-course\" | \"card-course-info\" | \"card-course-row\" | \"card-course-row-compact\" | \"card-default\" | \"card-feed\" | \"card-feed-row\" | \"card-file\" | \"card-grid\" | \"card-image\" | \"card-inbox\" | \"card-inbox-ongoing\" | \"card-incentive\" | \"card-incentive-rank\" | \"card-kanban\" | \"card-list\" | \"card-list-color\" | \"card-list-simple\" | \"card-location\" | \"card-map\" | \"card-media\" | \"card-menu\" | \"card-notification\" | \"card-plan\" | \"card-recommendation\" | \"card-sticky\" | \"card-tag\" | \"card-tag-single\" | \"card-template\" | \"kanban\" | \"tree\"",
6605
6605
  "references": {
6606
6606
  "CardType": {
6607
6607
  "location": "import",
@@ -68,7 +68,7 @@ export class YooMissionScoreComponent {
68
68
  maxValue: isPercentage ? 100 : total,
69
69
  metric: isPercentage ? 'percentage' : 'points',
70
70
  allowNonAvailableValue: true,
71
- numberDecimalAfterComaProgressValue: 2,
71
+ numberDecimalAfterComaProgressValue: 0,
72
72
  percentValueColorScheme: isPercentage,
73
73
  ...(!isPercentage && { class: 'app-color' })
74
74
  },
@@ -25,7 +25,6 @@ const entitySimpleCardLists = [
25
25
  'googlemaps',
26
26
  'groups',
27
27
  'icons',
28
- 'incentives',
29
28
  'language',
30
29
  'locationtypes',
31
30
  'markas',
@@ -78,6 +77,9 @@ const YooEntityComponent = class {
78
77
  this.secondaryActionsDropdown = false;
79
78
  this.extraClass = '';
80
79
  }
80
+ get isSimpleCardList() {
81
+ return this.displayType === 'card-list-simple' || (entitySimpleCardLists === null || entitySimpleCardLists === void 0 ? void 0 : entitySimpleCardLists.includes(this.entityType));
82
+ }
81
83
  async forceUpdate(emitEvent) {
82
84
  forceUpdate(this);
83
85
  this.emitEventOnDidUpdate = emitEvent;
@@ -91,9 +93,6 @@ const YooEntityComponent = class {
91
93
  onEntityClosed() {
92
94
  this.closed.emit(true);
93
95
  }
94
- isSimpleCardList(entityType) {
95
- return entitySimpleCardLists.indexOf(entityType) >= 0;
96
- }
97
96
  getCustomModelValue(key, data, fields) {
98
97
  const field = fields.find((f) => f.name === key);
99
98
  if ((field === null || field === void 0 ? void 0 : field.type) === FormFieldType.user && data[key]) {
@@ -226,7 +225,7 @@ const YooEntityComponent = class {
226
225
  else if (this.displayType === 'card-feed-row') {
227
226
  return this.renderCardFeedRow();
228
227
  }
229
- else if (this.displayType === 'card-list' || this.displayType === 'card-map') {
228
+ else if (this.displayType === 'card-list' || this.displayType === 'card-list-simple' || this.displayType === 'card-map') {
230
229
  return this.renderCardList(extraClasses);
231
230
  }
232
231
  else if (this.displayType === 'card-list-color' || this.displayType === 'card-cell-color') {
@@ -2019,7 +2018,7 @@ const YooEntityComponent = class {
2019
2018
  entry.icon = this.item.icon;
2020
2019
  entry.iconColor = this.item.iconColor;
2021
2020
  entry.avatarColor = this.item.avatarColor;
2022
- if (isWeb(this.host) && this.isSimpleCardList(this.entityType)) {
2021
+ if (isWeb(this.host) && this.isSimpleCardList) {
2023
2022
  entry.avatarSize = 'small';
2024
2023
  }
2025
2024
  }
@@ -2109,7 +2108,7 @@ const YooEntityComponent = class {
2109
2108
  [this.entityType]: true
2110
2109
  }, isCollapsed: this.isMap || this.host.classList.contains('no-kpi'), onListCollapsed: (ev) => this.onListCollapsed(ev) }));
2111
2110
  }
2112
- else if (this.entityType && !this.isSimpleCardList(this.entityType) && !this.isWebAutocomplete()) {
2111
+ else if (this.entityType && !this.isSimpleCardList && !this.isWebAutocomplete()) {
2113
2112
  return (h("yoo-card-list", { entry: entry, class: {
2114
2113
  'selection-mode': this.host.classList.contains('check-selected') || this.host.classList.contains('check-unselected'),
2115
2114
  autocomplete: this.host.classList.contains('autocomplete'),
@@ -336,9 +336,10 @@ const YooFormAutocompleteComponent = class {
336
336
  if (['emails', 'tags'].includes(this.entityType) || this.allowCustomTag) {
337
337
  return 'card-tag';
338
338
  }
339
- else {
340
- return 'card-list';
339
+ if (this.entityType === 'incentives') {
340
+ return 'card-list-simple';
341
341
  }
342
+ return 'card-list';
342
343
  }
343
344
  getEntityType() {
344
345
  return (this.allowCustomTag || this.tag) && !['emails', 'groups'].includes(this.entityType) ? 'tag' : this.entityType;
@@ -102,6 +102,10 @@ const YooFormMultiInputComponent = class {
102
102
  this.focusTo = null;
103
103
  }
104
104
  componentWillRender() {
105
+ var _a, _b;
106
+ if (this.isSimpleArray && !Array.isArray((_a = this.value) === null || _a === void 0 ? void 0 : _a[0])) {
107
+ this.value = ((_b = this.value) === null || _b === void 0 ? void 0 : _b[0]) ? [this.value] : [[]];
108
+ }
105
109
  this.destroyDragAndDrop();
106
110
  // helps to control re-rendering when row has been added by 'enter' pressing
107
111
  if (this.tempMinRows !== undefined) {
@@ -77,7 +77,7 @@ const YooMissionScoreComponent = class {
77
77
  maxValue: isPercentage ? 100 : total,
78
78
  metric: isPercentage ? 'percentage' : 'points',
79
79
  allowNonAvailableValue: true,
80
- numberDecimalAfterComaProgressValue: 2,
80
+ numberDecimalAfterComaProgressValue: 0,
81
81
  percentValueColorScheme: isPercentage,
82
82
  ...(!isPercentage && { class: 'app-color' })
83
83
  },
@@ -25,7 +25,6 @@ const entitySimpleCardLists = [
25
25
  'googlemaps',
26
26
  'groups',
27
27
  'icons',
28
- 'incentives',
29
28
  'language',
30
29
  'locationtypes',
31
30
  'markas',
@@ -78,6 +77,9 @@ const YooEntityComponent = class {
78
77
  this.secondaryActionsDropdown = false;
79
78
  this.extraClass = '';
80
79
  }
80
+ get isSimpleCardList() {
81
+ return this.displayType === 'card-list-simple' || (entitySimpleCardLists === null || entitySimpleCardLists === void 0 ? void 0 : entitySimpleCardLists.includes(this.entityType));
82
+ }
81
83
  async forceUpdate(emitEvent) {
82
84
  forceUpdate(this);
83
85
  this.emitEventOnDidUpdate = emitEvent;
@@ -91,9 +93,6 @@ const YooEntityComponent = class {
91
93
  onEntityClosed() {
92
94
  this.closed.emit(true);
93
95
  }
94
- isSimpleCardList(entityType) {
95
- return entitySimpleCardLists.indexOf(entityType) >= 0;
96
- }
97
96
  getCustomModelValue(key, data, fields) {
98
97
  const field = fields.find((f) => f.name === key);
99
98
  if ((field === null || field === void 0 ? void 0 : field.type) === FormFieldType.user && data[key]) {
@@ -226,7 +225,7 @@ const YooEntityComponent = class {
226
225
  else if (this.displayType === 'card-feed-row') {
227
226
  return this.renderCardFeedRow();
228
227
  }
229
- else if (this.displayType === 'card-list' || this.displayType === 'card-map') {
228
+ else if (this.displayType === 'card-list' || this.displayType === 'card-list-simple' || this.displayType === 'card-map') {
230
229
  return this.renderCardList(extraClasses);
231
230
  }
232
231
  else if (this.displayType === 'card-list-color' || this.displayType === 'card-cell-color') {
@@ -2019,7 +2018,7 @@ const YooEntityComponent = class {
2019
2018
  entry.icon = this.item.icon;
2020
2019
  entry.iconColor = this.item.iconColor;
2021
2020
  entry.avatarColor = this.item.avatarColor;
2022
- if (isWeb(this.host) && this.isSimpleCardList(this.entityType)) {
2021
+ if (isWeb(this.host) && this.isSimpleCardList) {
2023
2022
  entry.avatarSize = 'small';
2024
2023
  }
2025
2024
  }
@@ -2109,7 +2108,7 @@ const YooEntityComponent = class {
2109
2108
  [this.entityType]: true
2110
2109
  }, isCollapsed: this.isMap || this.host.classList.contains('no-kpi'), onListCollapsed: (ev) => this.onListCollapsed(ev) }));
2111
2110
  }
2112
- else if (this.entityType && !this.isSimpleCardList(this.entityType) && !this.isWebAutocomplete()) {
2111
+ else if (this.entityType && !this.isSimpleCardList && !this.isWebAutocomplete()) {
2113
2112
  return (h("yoo-card-list", { entry: entry, class: {
2114
2113
  'selection-mode': this.host.classList.contains('check-selected') || this.host.classList.contains('check-unselected'),
2115
2114
  autocomplete: this.host.classList.contains('autocomplete'),
@@ -336,9 +336,10 @@ const YooFormAutocompleteComponent = class {
336
336
  if (['emails', 'tags'].includes(this.entityType) || this.allowCustomTag) {
337
337
  return 'card-tag';
338
338
  }
339
- else {
340
- return 'card-list';
339
+ if (this.entityType === 'incentives') {
340
+ return 'card-list-simple';
341
341
  }
342
+ return 'card-list';
342
343
  }
343
344
  getEntityType() {
344
345
  return (this.allowCustomTag || this.tag) && !['emails', 'groups'].includes(this.entityType) ? 'tag' : this.entityType;
@@ -102,6 +102,10 @@ const YooFormMultiInputComponent = class {
102
102
  this.focusTo = null;
103
103
  }
104
104
  componentWillRender() {
105
+ var _a, _b;
106
+ if (this.isSimpleArray && !Array.isArray((_a = this.value) === null || _a === void 0 ? void 0 : _a[0])) {
107
+ this.value = ((_b = this.value) === null || _b === void 0 ? void 0 : _b[0]) ? [this.value] : [[]];
108
+ }
105
109
  this.destroyDragAndDrop();
106
110
  // helps to control re-rendering when row has been added by 'enter' pressing
107
111
  if (this.tempMinRows !== undefined) {
@@ -77,7 +77,7 @@ const YooMissionScoreComponent = class {
77
77
  maxValue: isPercentage ? 100 : total,
78
78
  metric: isPercentage ? 'percentage' : 'points',
79
79
  allowNonAvailableValue: true,
80
- numberDecimalAfterComaProgressValue: 2,
80
+ numberDecimalAfterComaProgressValue: 0,
81
81
  percentValueColorScheme: isPercentage,
82
82
  ...(!isPercentage && { class: 'app-color' })
83
83
  },
@@ -52,10 +52,10 @@ export declare class YooEntityComponent {
52
52
  embeddedEntityClicked: EventEmitter<any>;
53
53
  host: HTMLYooEntityElement;
54
54
  private emitEventOnDidUpdate;
55
+ private get isSimpleCardList();
55
56
  forceUpdate(emitEvent?: boolean): Promise<void>;
56
57
  componentDidUpdate(): void;
57
58
  onEntityClosed(): void;
58
- isSimpleCardList(entityType: EntityType): boolean;
59
59
  getCustomModelValue(key: string, data: any, fields: IFormField[]): any;
60
60
  onListCollapsed(event: CustomEvent<{
61
61
  collapsed: boolean;
@@ -2,5 +2,5 @@ import { EntityType, IEntity } from '../../entities';
2
2
  import { TSize } from '../../types';
3
3
  import { ICardListEntry } from './card-list.interface';
4
4
  import { ICardMediaEntry } from './card-media.interface';
5
- export declare type CardType = 'calendar' | 'card-calendar' | 'card-battle' | 'card-battle-result' | 'card-campaign' | 'card-cell' | 'card-cell-color' | 'card-cell-image' | 'card-chat' | 'card-course' | 'card-course-info' | 'card-course-row' | 'card-course-row-compact' | 'card-default' | 'card-feed' | 'card-feed-row' | 'card-file' | 'card-grid' | 'card-image' | 'card-inbox' | 'card-inbox-ongoing' | 'card-incentive' | 'card-incentive-rank' | 'card-kanban' | 'card-list' | 'card-list-color' | 'card-location' | 'card-map' | 'card-media' | 'card-menu' | 'card-notification' | 'card-plan' | 'card-recommendation' | 'card-sticky' | 'card-tag' | 'card-tag-single' | 'card-template' | 'kanban' | 'tree';
5
+ export declare type CardType = 'calendar' | 'card-calendar' | 'card-battle' | 'card-battle-result' | 'card-campaign' | 'card-cell' | 'card-cell-color' | 'card-cell-image' | 'card-chat' | 'card-course' | 'card-course-info' | 'card-course-row' | 'card-course-row-compact' | 'card-default' | 'card-feed' | 'card-feed-row' | 'card-file' | 'card-grid' | 'card-image' | 'card-inbox' | 'card-inbox-ongoing' | 'card-incentive' | 'card-incentive-rank' | 'card-kanban' | 'card-list' | 'card-list-color' | 'card-list-simple' | 'card-location' | 'card-map' | 'card-media' | 'card-menu' | 'card-notification' | 'card-plan' | 'card-recommendation' | 'card-sticky' | 'card-tag' | 'card-tag-single' | 'card-template' | 'kanban' | 'tree';
6
6
  export declare type TEntityMapping = (item: IEntity, entityType: EntityType, displayType: CardType, displaySize?: TSize, useCellOverlay?: boolean) => ICardListEntry | ICardMediaEntry | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoobic/yobi",
3
- "version": "8.3.0-36",
3
+ "version": "8.3.0-37",
4
4
  "description": "Yobi - Yoobic Design System",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs.js",