@luzmo/analytics-components-kit 1.0.1-alpha.87 → 1.0.1-alpha.90

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 (203) hide show
  1. package/angular/components/display-settings-binning.component.ts +2 -2
  2. package/angular/components/display-settings-datetime.component.ts +2 -2
  3. package/angular/components/display-settings-grand-totals.component.ts +2 -2
  4. package/angular/components/display-settings-numeric.component.ts +2 -2
  5. package/angular/components/display-settings.component.ts +3 -3
  6. package/angular/components/draggable-data-item/index.ts +1 -0
  7. package/angular/components/draggable-data-item/types.ts +42 -0
  8. package/angular/components/draggable-data-item-level/index.ts +1 -0
  9. package/angular/components/draggable-data-item-level/types.ts +15 -0
  10. package/angular/components/draggable-data-item-level.component.ts +4 -10
  11. package/angular/components/draggable-data-item.component.ts +4 -10
  12. package/angular/components/droppable-slot/index.ts +1 -0
  13. package/angular/components/droppable-slot/types.ts +16 -0
  14. package/angular/components/droppable-slot.component.ts +5 -3
  15. package/angular/components/slot-menu/index.ts +1 -0
  16. package/angular/components/slot-menu/types.ts +31 -0
  17. package/angular/components/slot-menu-list.component.ts +2 -2
  18. package/angular/components/slot-menu.component.ts +3 -3
  19. package/angular/esm/components/display-settings-binning.component.d.ts +2 -1
  20. package/angular/esm/components/display-settings-datetime.component.d.ts +2 -2
  21. package/angular/esm/components/display-settings-grand-totals.component.d.ts +2 -1
  22. package/angular/esm/components/display-settings-numeric.component.d.ts +2 -1
  23. package/angular/esm/components/display-settings.component.d.ts +3 -3
  24. package/angular/esm/components/draggable-data-item/index.d.ts +1 -0
  25. package/angular/esm/components/draggable-data-item/index.js +1 -0
  26. package/angular/esm/components/draggable-data-item/types.d.ts +21 -0
  27. package/angular/esm/components/draggable-data-item/types.js +1 -0
  28. package/angular/esm/components/draggable-data-item-level/index.d.ts +1 -0
  29. package/angular/esm/components/draggable-data-item-level/index.js +1 -0
  30. package/angular/esm/components/draggable-data-item-level/types.d.ts +12 -0
  31. package/angular/esm/components/draggable-data-item-level/types.js +1 -0
  32. package/angular/esm/components/draggable-data-item-level.component.d.ts +9 -7
  33. package/angular/esm/components/draggable-data-item-level.component.js +2 -17
  34. package/angular/esm/components/draggable-data-item.component.d.ts +9 -7
  35. package/angular/esm/components/draggable-data-item.component.js +2 -17
  36. package/angular/esm/components/droppable-slot/index.d.ts +1 -0
  37. package/angular/esm/components/droppable-slot/index.js +1 -0
  38. package/angular/esm/components/droppable-slot/types.d.ts +9 -0
  39. package/angular/esm/components/droppable-slot/types.js +1 -0
  40. package/angular/esm/components/droppable-slot.component.d.ts +5 -4
  41. package/angular/esm/components/droppable-slot.component.js +7 -2
  42. package/angular/esm/components/slot-menu/index.d.ts +1 -0
  43. package/angular/esm/components/slot-menu/index.js +1 -0
  44. package/angular/esm/components/slot-menu/types.d.ts +25 -0
  45. package/angular/esm/components/slot-menu/types.js +1 -0
  46. package/angular/esm/components/slot-menu-list.component.d.ts +2 -1
  47. package/angular/esm/components/slot-menu.component.d.ts +3 -3
  48. package/angular/esm/types.d.ts +9 -3
  49. package/angular/tsconfig.json +3 -0
  50. package/angular/types.ts +24 -3
  51. package/angular/utils/base/base.d.ts +16 -0
  52. package/angular/utils/base/focus-visible.d.ts +29 -0
  53. package/angular/utils/base/focusable.d.ts +58 -0
  54. package/angular/utils/base/index.d.ts +4 -0
  55. package/angular/utils/base/sized-mixin.d.ts +17 -0
  56. package/angular/utils/color/color-palettes.d.ts +17 -0
  57. package/angular/utils/color/extrapolate-color.d.ts +1 -0
  58. package/angular/utils/data/load-draggable-items-for-datasets.d.ts +24 -0
  59. package/angular/utils/data-broker/index.d.ts +191 -0
  60. package/angular/utils/data-item-types/calculate-data-item-icon.d.ts +10 -0
  61. package/angular/utils/data-item-types/tests/calculate-data-item-icon.test.d.ts +1 -0
  62. package/angular/utils/drag/draggable.d.ts +13 -0
  63. package/angular/utils/filters/expressions.d.ts +15 -0
  64. package/angular/utils/filters/index.d.ts +1 -0
  65. package/angular/utils/formatter/calculate-duration.d.ts +2 -0
  66. package/angular/utils/formatter/decompose-numeric-format.d.ts +11 -0
  67. package/angular/utils/formatter/default-local-formats.d.ts +20 -0
  68. package/angular/utils/formatter/formats/cs.d.ts +20 -0
  69. package/angular/utils/formatter/formats/da.d.ts +20 -0
  70. package/angular/utils/formatter/formats/de.d.ts +21 -0
  71. package/angular/utils/formatter/formats/en-GB.d.ts +21 -0
  72. package/angular/utils/formatter/formats/en-US.d.ts +1 -0
  73. package/angular/utils/formatter/formats/en.d.ts +1 -0
  74. package/angular/utils/formatter/formats/es.d.ts +54 -0
  75. package/angular/utils/formatter/formats/fi.d.ts +20 -0
  76. package/angular/utils/formatter/formats/fr.d.ts +54 -0
  77. package/angular/utils/formatter/formats/he.d.ts +20 -0
  78. package/angular/utils/formatter/formats/hu.d.ts +20 -0
  79. package/angular/utils/formatter/formats/it.d.ts +54 -0
  80. package/angular/utils/formatter/formats/ja.d.ts +20 -0
  81. package/angular/utils/formatter/formats/ko.d.ts +20 -0
  82. package/angular/utils/formatter/formats/mk.d.ts +20 -0
  83. package/angular/utils/formatter/formats/nl.d.ts +21 -0
  84. package/angular/utils/formatter/formats/no.d.ts +21 -0
  85. package/angular/utils/formatter/formats/pl.d.ts +20 -0
  86. package/angular/utils/formatter/formats/pt.d.ts +20 -0
  87. package/angular/utils/formatter/formats/ru.d.ts +20 -0
  88. package/angular/utils/formatter/formats/sv.d.ts +20 -0
  89. package/angular/utils/formatter/formats/tr.d.ts +21 -0
  90. package/angular/utils/formatter/formats/zh-CN.d.ts +20 -0
  91. package/angular/utils/formatter/formats/zh-TW.d.ts +20 -0
  92. package/angular/utils/formatter/formatter.d.ts +9 -0
  93. package/angular/utils/formatter/localize.d.ts +3 -0
  94. package/angular/utils/formatter/smart-datetime-formats.const.d.ts +36 -0
  95. package/angular/utils/get-css-variable.d.ts +1 -0
  96. package/angular/utils/index.d.ts +7 -0
  97. package/angular/utils/localize/set-locale.d.ts +7 -0
  98. package/angular/utils/map-tile-providers/index.d.ts +93 -0
  99. package/angular/utils/store/slot-context.d.ts +4 -0
  100. package/angular/utils/store/slot-store.d.ts +39 -0
  101. package/angular/utils/switch-item/index.d.ts +14 -0
  102. package/angular/utils/themes/bliss.d.ts +43 -0
  103. package/angular/utils/themes/classic-dark.d.ts +34 -0
  104. package/angular/utils/themes/classic.d.ts +43 -0
  105. package/angular/utils/themes/default-dark.d.ts +46 -0
  106. package/angular/utils/themes/default.d.ts +46 -0
  107. package/angular/utils/themes/index.d.ts +3 -0
  108. package/angular/utils/themes/orion.d.ts +44 -0
  109. package/angular/utils/themes/pinky.d.ts +42 -0
  110. package/angular/utils/themes/radiant.d.ts +42 -0
  111. package/angular/utils/themes/royale.d.ts +36 -0
  112. package/angular/utils/themes/seasonal.d.ts +43 -0
  113. package/angular/utils/themes/urban.d.ts +44 -0
  114. package/angular/utils/themes/vivid.d.ts +42 -0
  115. package/angular/utils/time/formats.const.d.ts +4 -0
  116. package/angular/utils/time/periods.const.d.ts +15 -0
  117. package/angular/utils/transformations/convert-data-item-to-slot-content.d.ts +9 -0
  118. package/angular/utils/transformations/convert-datasets-to-draggable-items.d.ts +17 -0
  119. package/angular/utils/transformations/tests/convert-data-item-to-slot-content.test.d.ts +1 -0
  120. package/angular/utils/transformations/tests/convert-datasets-to-draggable-items.test.d.ts +1 -0
  121. package/angular/utils/types/type-check.d.ts +7 -0
  122. package/components/ai-chat-message-assistant/index.cjs +1 -1
  123. package/components/ai-chat-message-assistant/index.js +0 -1
  124. package/components/calculate-data-item-icon-DMDhKq_m.js +147 -0
  125. package/components/{calculate-data-item-icon-CX4VW9Km.cjs → calculate-data-item-icon-DtVGbet3.cjs} +1 -1
  126. package/components/dataset-selector-list/index.cjs +1 -1
  127. package/components/dataset-selector-list/index.js +1 -1
  128. package/components/display-settings/display-settings.d.ts +4 -2
  129. package/components/display-settings/index.cjs +1 -1
  130. package/components/display-settings/index.js +1 -1
  131. package/components/display-settings-binning/display-settings-binning.d.ts +2 -1
  132. package/components/display-settings-datetime/display-settings-datetime.d.ts +2 -1
  133. package/components/display-settings-datetime/index.cjs +1 -1
  134. package/components/display-settings-datetime/index.js +4 -4
  135. package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +2 -1
  136. package/components/display-settings-numeric/display-settings-numeric.d.ts +2 -1
  137. package/components/display-settings-numeric/index.cjs +10 -10
  138. package/components/display-settings-numeric/index.js +5 -5
  139. package/components/draggable-data-item/draggable-data-item.d.ts +5 -7
  140. package/components/draggable-data-item/index.cjs +14 -22
  141. package/components/draggable-data-item/index.d.ts +1 -0
  142. package/components/draggable-data-item/index.js +80 -88
  143. package/components/draggable-data-item/types.d.ts +21 -0
  144. package/components/draggable-data-item-level/draggable-data-item-level.d.ts +4 -6
  145. package/components/draggable-data-item-level/helpers/generate-preview.d.ts +9 -1
  146. package/components/draggable-data-item-level/index.cjs +13 -13
  147. package/components/draggable-data-item-level/index.js +84 -102
  148. package/components/draggable-data-item-level/types.d.ts +12 -0
  149. package/components/droppable-slot/droppable-slot.d.ts +4 -2
  150. package/components/droppable-slot/index.cjs +13 -13
  151. package/components/droppable-slot/index.d.ts +1 -0
  152. package/components/droppable-slot/index.js +198 -199
  153. package/components/droppable-slot/types.d.ts +9 -0
  154. package/components/{en-CtCctD2c.js → en-D3ihEGXg.js} +67 -67
  155. package/components/{en--a5SfjnM.cjs → en-DZcn_iz_.cjs} +1 -1
  156. package/components/{en-GB-CXVKFWyH.cjs → en-GB-TqvgIw9B.cjs} +1 -1
  157. package/components/{en-GB-CbNfyZMo.js → en-GB-ialeqj_z.js} +1 -1
  158. package/components/filter-data-item-picker/index.cjs +1 -1
  159. package/components/filter-data-item-picker/index.js +1 -1
  160. package/components/filter-item/index.cjs +1 -1
  161. package/components/filter-item/index.js +8 -8
  162. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  163. package/components/filter-value-picker-hierarchy/index.js +1 -1
  164. package/components/filter-value-picker-numeric/index.cjs +1 -1
  165. package/components/filter-value-picker-numeric/index.js +1 -1
  166. package/components/{get-css-variable-CuDaWSjr.cjs → get-css-variable-COd1d84B.cjs} +3 -3
  167. package/components/{get-css-variable-DEf4GhTH.js → get-css-variable-CdwF98oh.js} +31 -31
  168. package/components/grid/index.cjs +1 -7
  169. package/components/grid/index.js +0 -7
  170. package/components/{index-BUal0r_D.cjs → index-BekTY3Em.cjs} +1 -1
  171. package/components/index-CFL6gmIu.cjs +20 -0
  172. package/components/{index-3WsfvkZF.js → index-CqKpf0B8.js} +1 -1
  173. package/components/{index-BGb_wRRW.js → index-DNPULp4A.js} +177 -188
  174. package/components/index.cjs +1 -1
  175. package/components/index.js +26 -24
  176. package/components/slot-contents-picker/index.cjs +1 -1
  177. package/components/slot-contents-picker/index.js +2 -2
  178. package/components/slot-menu/index.cjs +1 -1
  179. package/components/slot-menu/index.d.ts +1 -0
  180. package/components/slot-menu/index.js +64 -69
  181. package/components/slot-menu/slot-menu.d.ts +7 -6
  182. package/components/slot-menu/types.d.ts +25 -0
  183. package/components/slot-menu-list/index.cjs +1 -1
  184. package/components/slot-menu-list/index.js +2 -2
  185. package/components/slot-menu-list/slot-menu-list.d.ts +2 -1
  186. package/components/utils.cjs +1 -1
  187. package/components/utils.js +129 -62
  188. package/custom-elements.json +123 -126
  189. package/item-definitions/slicer-filter/slicer-filter-options.config.d.ts +1 -1
  190. package/package.json +1 -1
  191. package/types.d.ts +9 -3
  192. package/utils/data/load-draggable-items-for-datasets.d.ts +24 -0
  193. package/utils/data-broker/index.d.ts +69 -66
  194. package/utils/data-item-types/calculate-data-item-icon.d.ts +8 -2
  195. package/utils/data-item-types/tests/calculate-data-item-icon.test.d.ts +1 -0
  196. package/utils/index.d.ts +2 -0
  197. package/utils/transformations/convert-data-item-to-slot-content.d.ts +9 -0
  198. package/utils/transformations/convert-datasets-to-draggable-items.d.ts +17 -0
  199. package/utils/transformations/tests/convert-data-item-to-slot-content.test.d.ts +1 -0
  200. package/utils/transformations/tests/convert-datasets-to-draggable-items.test.d.ts +1 -0
  201. package/components/calculate-data-item-icon-C8CbsMQf.js +0 -139
  202. package/components/index-D1Y5TRsH.cjs +0 -20
  203. package/utils/types/column.types.d.ts +0 -57
@@ -1,5 +1,5 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
-
2
+ import type { GenericSlotContent } from '../types';
3
3
 
4
4
  @Component({
5
5
  selector: 'luzmo-display-settings-binning',
@@ -15,7 +15,7 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from
15
15
  })
16
16
  export class DisplaySettingsBinningComponent {
17
17
  @Input() language?: string;
18
- @Input() slotContent?: any;
18
+ @Input() slotContent?: GenericSlotContent;
19
19
  @Input() size?: any;
20
20
  @Output() slotContentChanged = new EventEmitter<CustomEvent>();
21
21
  }
@@ -1,5 +1,5 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
- import type { ElementSize } from '../types';
2
+ import type { ElementSize, GenericSlotContent } from '../types';
3
3
 
4
4
  @Component({
5
5
  selector: 'luzmo-display-settings-datetime',
@@ -18,6 +18,6 @@ export class DisplaySettingsDatetimeComponent {
18
18
  @Input() language?: string;
19
19
  @Input() contentLanguage?: string;
20
20
  @Input() size?: ElementSize;
21
- @Input() slotContent?: any;
21
+ @Input() slotContent?: GenericSlotContent;
22
22
  @Output() slotContentChanged = new EventEmitter<CustomEvent>();
23
23
  }
@@ -1,5 +1,5 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
-
2
+ import type { GenericSlotContent } from '../types';
3
3
 
4
4
  @Component({
5
5
  selector: 'luzmo-display-settings-grand-totals',
@@ -15,7 +15,7 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from
15
15
  })
16
16
  export class DisplaySettingsGrandTotalsComponent {
17
17
  @Input() language?: string;
18
- @Input() slotContent?: any;
18
+ @Input() slotContent?: GenericSlotContent;
19
19
  @Input() size?: any;
20
20
  @Output() slotContentChanged = new EventEmitter<CustomEvent>();
21
21
  }
@@ -1,5 +1,5 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
-
2
+ import type { MeasureColumnsItem } from '../types';
3
3
 
4
4
  @Component({
5
5
  selector: 'luzmo-display-settings-numeric',
@@ -19,7 +19,7 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from
19
19
  export class DisplaySettingsNumericComponent {
20
20
  @Input() language?: string;
21
21
  @Input() slotContent?: any;
22
- @Input() measureColumns?: any[];
22
+ @Input() measureColumns?: MeasureColumnsItem[];
23
23
  @Input() isAggregationDisabled?: boolean;
24
24
  @Input() isCumulativeSumEnabled?: boolean;
25
25
  @Input() size?: any;
@@ -1,5 +1,5 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
- import type { PeriodOverPeriodCondition } from '../types';
2
+ import type { PeriodOverPeriodCondition, GenericSlotContent, MeasureColumnsItem } from '../types';
3
3
 
4
4
  @Component({
5
5
  selector: 'luzmo-display-settings',
@@ -37,8 +37,8 @@ export class DisplaySettingsComponent {
37
37
  @Input() periodOverPeriodUiType?: PeriodOverPeriodCondition | null;
38
38
  @Input() showRemoveButton?: boolean;
39
39
  @Input() slotType?: string;
40
- @Input() slotContent?: any;
41
- @Input() measureColumns?: any[];
40
+ @Input() slotContent?: GenericSlotContent;
41
+ @Input() measureColumns?: MeasureColumnsItem[];
42
42
  @Input() size?: any;
43
43
  @Output() slotContentChanged = new EventEmitter<CustomEvent>();
44
44
  @Output() removeSlotContent = new EventEmitter<CustomEvent>();
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,42 @@
1
+ import { Column, Currency, Formula, HierarchyLevel } from '@luzmo/dashboard-contents-types';
2
+
3
+ export type ColumnItemData = {
4
+ type: Column['type'];
5
+ name: Column['name'];
6
+ datasetId: string;
7
+ formulaId?: never;
8
+ columnId: Column['id'];
9
+ level?: number;
10
+ hierarchyLevels?: Pick<HierarchyLevel, 'id' | 'level' | 'name'>[];
11
+ currency?: Pick<Currency, 'id' | 'name' | 'symbol'>;
12
+ } & Partial<Pick<Column,
13
+ | 'description'
14
+ | 'subtype'
15
+ | 'format'
16
+ | 'lowestLevel'
17
+ | 'highestLevel'
18
+ | 'hierarchy_enabled'
19
+ | 'duration_levels'
20
+ | 'duration_format'
21
+ | 'expression'
22
+ >>;
23
+
24
+ export type FormulaItemData = {
25
+ type: Formula['type'];
26
+ name: Formula['name'];
27
+ datasetId: string;
28
+ formulaId: Formula['id'];
29
+ columnId?: never;
30
+ level?: number;
31
+ currency?: Pick<Currency, 'id' | 'name' | 'symbol'>;
32
+ } & Partial<Pick<Formula,
33
+ | 'description'
34
+ | 'subtype'
35
+ | 'format'
36
+ | 'lowestLevel'
37
+ | 'duration_levels'
38
+ | 'duration_format'
39
+ | 'expression'
40
+ >>;
41
+
42
+ export type DraggableDataItemData = ColumnItemData | FormulaItemData;
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,15 @@
1
+ import type { DraggableDataItemData } from '../draggable-data-item/types';
2
+
3
+ export interface DataItemDroppedEventDetail {
4
+ data: DraggableDataItemData;
5
+ }
6
+
7
+ export interface DataItemDragStartedEventDetail {
8
+ data: DraggableDataItemData;
9
+ }
10
+
11
+ export interface SlotMenuHighlightEventDetail {
12
+ columnId?: string;
13
+ level?: number;
14
+ formulaId?: string;
15
+ }
@@ -1,5 +1,5 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
-
2
+ import type { DraggableDataItemData } from '../types';
3
3
 
4
4
  @Component({
5
5
  selector: 'luzmo-draggable-data-item-level',
@@ -11,9 +11,6 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from
11
11
  [attr.sublevel]="sublevel"
12
12
  [attr.language]="language"
13
13
  [attr.disabled]="disabled"
14
- [attr.label]="label"
15
- [attr.description]="description"
16
- [attr.secondary-icon-type]="secondaryIconType"
17
14
  [attr.data]="data"
18
15
  [attr.size]="size"
19
16
  (data-item-dropped)="dataItemDropped.emit($event)"
@@ -27,11 +24,8 @@ export class DraggableDataItemLevelComponent {
27
24
  @Input() sublevel?: boolean;
28
25
  @Input() language?: string;
29
26
  @Input() disabled?: boolean;
30
- @Input() label?: string;
31
- @Input() description?: string;
32
- @Input() secondaryIconType?: 'derived' | 'formula';
33
- @Input() data?: any;
27
+ @Input() data?: DraggableDataItemData;
34
28
  @Input() size?: any;
35
- @Output() dataItemDropped = new EventEmitter<CustomEvent>();
36
- @Output() dataItemDragStarted = new EventEmitter<CustomEvent>();
29
+ @Output() dataItemDropped = new EventEmitter<CustomEvent<{data: DraggableDataItemData}>>();
30
+ @Output() dataItemDragStarted = new EventEmitter<CustomEvent<{data: DraggableDataItemData}>>();
37
31
  }
@@ -1,5 +1,5 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
-
2
+ import type { DraggableDataItemData } from '../types';
3
3
 
4
4
  @Component({
5
5
  selector: 'luzmo-draggable-data-item',
@@ -11,9 +11,6 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from
11
11
  [attr.disabled]="disabled"
12
12
  [attr.hide-sublevels]="hideSublevels"
13
13
  [attr.hide-type-icon]="hideTypeIcon"
14
- [attr.secondary-icon-type]="secondaryIconType"
15
- [attr.label]="label"
16
- [attr.description]="description"
17
14
  [attr.data]="data"
18
15
  [attr.size]="size"
19
16
  (data-item-dropped)="dataItemDropped.emit($event)"
@@ -27,11 +24,8 @@ export class DraggableDataItemComponent {
27
24
  @Input() disabled?: boolean;
28
25
  @Input() hideSublevels?: boolean;
29
26
  @Input() hideTypeIcon?: boolean;
30
- @Input() secondaryIconType?: 'derived' | 'formula';
31
- @Input() label?: string;
32
- @Input() description?: string;
33
- @Input() data?: any;
27
+ @Input() data?: DraggableDataItemData;
34
28
  @Input() size?: any;
35
- @Output() dataItemDropped = new EventEmitter<CustomEvent>();
36
- @Output() dataItemDragStarted = new EventEmitter<CustomEvent>();
29
+ @Output() dataItemDropped = new EventEmitter<CustomEvent<{data: DraggableDataItemData}>>();
30
+ @Output() dataItemDragStarted = new EventEmitter<CustomEvent<{data: DraggableDataItemData}>>();
37
31
  }
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,16 @@
1
+ import {
2
+ ColumnType,
3
+ FormulaType,
4
+ GenericSlotContent,
5
+ SlotConfig
6
+ } from '@luzmo/dashboard-contents-types';
7
+
8
+ export type DroppableSlotConfiguration = Omit<SlotConfig, 'acceptableColumnTypes' | 'canAcceptMultipleColumns'> & {
9
+ acceptableDataItemTypes?: (ColumnType | FormulaType)[];
10
+ canAcceptMultipleDataItems?: boolean;
11
+ };
12
+
13
+ export interface SlotContentsChangedEventDetail {
14
+ slotContents: GenericSlotContent[];
15
+ linkedDatasetsIds: string[];
16
+ }
@@ -1,5 +1,5 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
- import type { VizItemType, SlotName, VizItemSlots, Placement } from '../types';
2
+ import type { VizItemType, SlotName, DroppableSlotConfiguration, VizItemSlots, Placement, SlotContentsChangedEventDetail } from '../types';
3
3
 
4
4
  @Component({
5
5
  selector: 'luzmo-droppable-slot',
@@ -13,6 +13,7 @@ import type { VizItemType, SlotName, VizItemSlots, Placement } from '../types';
13
13
  [attr.label]="label"
14
14
  [attr.language]="language"
15
15
  [attr.drag-boundary]="dragBoundary"
16
+ [attr.rotate]="rotate"
16
17
  [attr.api-url]="apiUrl"
17
18
  [attr.auth-key]="authKey"
18
19
  [attr.auth-token]="authToken"
@@ -31,11 +32,12 @@ import type { VizItemType, SlotName, VizItemSlots, Placement } from '../types';
31
32
  export class DroppableSlotComponent {
32
33
  @Input() itemType?: VizItemType;
33
34
  @Input() slotName?: SlotName;
34
- @Input() slotConfiguration?: any;
35
+ @Input() slotConfiguration?: DroppableSlotConfiguration;
35
36
  @Input() slotsContents?: VizItemSlots;
36
37
  @Input() label?: string;
37
38
  @Input() language?: string;
38
39
  @Input() dragBoundary?: string;
40
+ @Input() rotate?: boolean;
39
41
  @Input() apiUrl?: string;
40
42
  @Input() authKey?: string;
41
43
  @Input() authToken?: string;
@@ -47,5 +49,5 @@ export class DroppableSlotComponent {
47
49
  @Output() slotMenuInactive = new EventEmitter<CustomEvent>();
48
50
  @Output() slotMenuActive = new EventEmitter<CustomEvent>();
49
51
  @Output() slotMenuHighlight = new EventEmitter<CustomEvent>();
50
- @Output() slotContentsChanged = new EventEmitter<CustomEvent>();
52
+ @Output() slotContentsChanged = new EventEmitter<CustomEvent<SlotContentsChangedEventDetail>>();
51
53
  }
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,31 @@
1
+ import { GenericSlotContent } from '@luzmo/dashboard-contents-types';
2
+ import { DatasetColumnMetadata } from '@utils/data-broker';
3
+ import type { SlotContentsChangedEventDetail } from '../droppable-slot/types';
4
+
5
+ export type { SlotContentsChangedEventDetail } from '../droppable-slot/types';
6
+
7
+ export interface MeasureColumnsItem {
8
+ datasetId: string;
9
+ datasetName: Record<string, string>;
10
+ columns: DatasetColumnMetadata[];
11
+ }
12
+
13
+ export interface SlotMenuActiveEventDetail {
14
+ datasetId: string;
15
+ }
16
+
17
+ export interface SlotMenuHighlightEventDetail {
18
+ datasetId: string;
19
+ level: number;
20
+ columnId?: string;
21
+ formulaId?: string;
22
+ }
23
+
24
+ export interface SlotContentChangedEventDetail {
25
+ slotContent: SlotContentsChangedEventDetail['slotContents'][number];
26
+ }
27
+
28
+ export interface SlotListChangedEventDetail {
29
+ slotContents: GenericSlotContent[];
30
+ activeIndex: number;
31
+ }
@@ -1,5 +1,5 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
-
2
+ import type { GenericSlotContent } from '../types';
3
3
 
4
4
  @Component({
5
5
  selector: 'luzmo-slot-menu-list',
@@ -18,7 +18,7 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from
18
18
  export class SlotMenuListComponent {
19
19
  @Input() language?: string;
20
20
  @Input() contentLanguage?: string;
21
- @Input() slotContents?: any;
21
+ @Input() slotContents?: GenericSlotContent[];
22
22
  @Input() activeIndex?: number;
23
23
  @Input() size?: any;
24
24
 
@@ -1,5 +1,5 @@
1
1
  import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
- import type { SlotName, GenericSlotContent } from '../types';
2
+ import type { SlotName, VizItemType, GenericSlotContent } from '../types';
3
3
 
4
4
  @Component({
5
5
  selector: 'luzmo-slot-menu',
@@ -38,9 +38,9 @@ import type { SlotName, GenericSlotContent } from '../types';
38
38
  export class SlotMenuComponent {
39
39
  @Input() language?: string;
40
40
  @Input() contentLanguage?: string;
41
- @Input() slotType?: string;
41
+ @Input() slotType?: 'numeric' | 'categorical' | 'mixed';
42
42
  @Input() slotName?: SlotName;
43
- @Input() itemType?: string;
43
+ @Input() itemType?: VizItemType;
44
44
  @Input() noDrag?: boolean;
45
45
  @Input() noClose?: boolean;
46
46
  @Input() variant?: 'popup' | 'draggable' | 'default';
@@ -1,8 +1,9 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ import type { GenericSlotContent } from '../types';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class DisplaySettingsBinningComponent {
4
5
  language?: string;
5
- slotContent?: any;
6
+ slotContent?: GenericSlotContent;
6
7
  size?: any;
7
8
  slotContentChanged: EventEmitter<CustomEvent<any>>;
8
9
  static ɵfac: i0.ɵɵFactoryDeclaration<DisplaySettingsBinningComponent, never>;
@@ -1,11 +1,11 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import type { ElementSize } from '../types';
2
+ import type { ElementSize, GenericSlotContent } from '../types';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class DisplaySettingsDatetimeComponent {
5
5
  language?: string;
6
6
  contentLanguage?: string;
7
7
  size?: ElementSize;
8
- slotContent?: any;
8
+ slotContent?: GenericSlotContent;
9
9
  slotContentChanged: EventEmitter<CustomEvent<any>>;
10
10
  static ɵfac: i0.ɵɵFactoryDeclaration<DisplaySettingsDatetimeComponent, never>;
11
11
  static ɵcmp: i0.ɵɵComponentDeclaration<DisplaySettingsDatetimeComponent, "luzmo-display-settings-datetime", never, { "language": { "alias": "language"; "required": false; }; "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "size": { "alias": "size"; "required": false; }; "slotContent": { "alias": "slotContent"; "required": false; }; }, { "slotContentChanged": "slotContentChanged"; }, never, ["*"], true, never>;
@@ -1,8 +1,9 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ import type { GenericSlotContent } from '../types';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class DisplaySettingsGrandTotalsComponent {
4
5
  language?: string;
5
- slotContent?: any;
6
+ slotContent?: GenericSlotContent;
6
7
  size?: any;
7
8
  slotContentChanged: EventEmitter<CustomEvent<any>>;
8
9
  static ɵfac: i0.ɵɵFactoryDeclaration<DisplaySettingsGrandTotalsComponent, never>;
@@ -1,9 +1,10 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ import type { MeasureColumnsItem } from '../types';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class DisplaySettingsNumericComponent {
4
5
  language?: string;
5
6
  slotContent?: any;
6
- measureColumns?: any[];
7
+ measureColumns?: MeasureColumnsItem[];
7
8
  isAggregationDisabled?: boolean;
8
9
  isCumulativeSumEnabled?: boolean;
9
10
  size?: any;
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import type { PeriodOverPeriodCondition } from '../types';
2
+ import type { PeriodOverPeriodCondition, GenericSlotContent, MeasureColumnsItem } from '../types';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class DisplaySettingsComponent {
5
5
  language?: string;
@@ -13,8 +13,8 @@ export declare class DisplaySettingsComponent {
13
13
  periodOverPeriodUiType?: PeriodOverPeriodCondition | null;
14
14
  showRemoveButton?: boolean;
15
15
  slotType?: string;
16
- slotContent?: any;
17
- measureColumns?: any[];
16
+ slotContent?: GenericSlotContent;
17
+ measureColumns?: MeasureColumnsItem[];
18
18
  size?: any;
19
19
  slotContentChanged: EventEmitter<CustomEvent<any>>;
20
20
  removeSlotContent: EventEmitter<CustomEvent<any>>;
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,21 @@
1
+ import { Column, Currency, Formula, HierarchyLevel } from '@luzmo/dashboard-contents-types';
2
+ export type ColumnItemData = {
3
+ type: Column['type'];
4
+ name: Column['name'];
5
+ datasetId: string;
6
+ formulaId?: never;
7
+ columnId: Column['id'];
8
+ level?: number;
9
+ hierarchyLevels?: Pick<HierarchyLevel, 'id' | 'level' | 'name'>[];
10
+ currency?: Pick<Currency, 'id' | 'name' | 'symbol'>;
11
+ } & Partial<Pick<Column, 'description' | 'subtype' | 'format' | 'lowestLevel' | 'highestLevel' | 'hierarchy_enabled' | 'duration_levels' | 'duration_format' | 'expression'>>;
12
+ export type FormulaItemData = {
13
+ type: Formula['type'];
14
+ name: Formula['name'];
15
+ datasetId: string;
16
+ formulaId: Formula['id'];
17
+ columnId?: never;
18
+ level?: number;
19
+ currency?: Pick<Currency, 'id' | 'name' | 'symbol'>;
20
+ } & Partial<Pick<Formula, 'description' | 'subtype' | 'format' | 'lowestLevel' | 'duration_levels' | 'duration_format' | 'expression'>>;
21
+ export type DraggableDataItemData = ColumnItemData | FormulaItemData;
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,12 @@
1
+ import type { DraggableDataItemData } from '../draggable-data-item/types';
2
+ export interface DataItemDroppedEventDetail {
3
+ data: DraggableDataItemData;
4
+ }
5
+ export interface DataItemDragStartedEventDetail {
6
+ data: DraggableDataItemData;
7
+ }
8
+ export interface SlotMenuHighlightEventDetail {
9
+ columnId?: string;
10
+ level?: number;
11
+ formulaId?: string;
12
+ }
@@ -1,4 +1,5 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ import type { DraggableDataItemData } from '../types';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class DraggableDataItemLevelComponent {
4
5
  variant?: 'highlight' | 'normal';
@@ -6,13 +7,14 @@ export declare class DraggableDataItemLevelComponent {
6
7
  sublevel?: boolean;
7
8
  language?: string;
8
9
  disabled?: boolean;
9
- label?: string;
10
- description?: string;
11
- secondaryIconType?: 'derived' | 'formula';
12
- data?: any;
10
+ data?: DraggableDataItemData;
13
11
  size?: any;
14
- dataItemDropped: EventEmitter<CustomEvent<any>>;
15
- dataItemDragStarted: EventEmitter<CustomEvent<any>>;
12
+ dataItemDropped: EventEmitter<CustomEvent<{
13
+ data: DraggableDataItemData;
14
+ }>>;
15
+ dataItemDragStarted: EventEmitter<CustomEvent<{
16
+ data: DraggableDataItemData;
17
+ }>>;
16
18
  static ɵfac: i0.ɵɵFactoryDeclaration<DraggableDataItemLevelComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<DraggableDataItemLevelComponent, "luzmo-draggable-data-item-level", never, { "variant": { "alias": "variant"; "required": false; }; "hideTypeIcon": { "alias": "hideTypeIcon"; "required": false; }; "sublevel": { "alias": "sublevel"; "required": false; }; "language": { "alias": "language"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; "description": { "alias": "description"; "required": false; }; "secondaryIconType": { "alias": "secondaryIconType"; "required": false; }; "data": { "alias": "data"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "dataItemDropped": "dataItemDropped"; "dataItemDragStarted": "dataItemDragStarted"; }, never, ["*"], true, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<DraggableDataItemLevelComponent, "luzmo-draggable-data-item-level", never, { "variant": { "alias": "variant"; "required": false; }; "hideTypeIcon": { "alias": "hideTypeIcon"; "required": false; }; "sublevel": { "alias": "sublevel"; "required": false; }; "language": { "alias": "language"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "data": { "alias": "data"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "dataItemDropped": "dataItemDropped"; "dataItemDragStarted": "dataItemDragStarted"; }, never, ["*"], true, never>;
18
20
  }
@@ -6,29 +6,23 @@ export class DraggableDataItemLevelComponent {
6
6
  sublevel;
7
7
  language;
8
8
  disabled;
9
- label;
10
- description;
11
- secondaryIconType;
12
9
  data;
13
10
  size;
14
11
  dataItemDropped = new EventEmitter();
15
12
  dataItemDragStarted = new EventEmitter();
16
13
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: DraggableDataItemLevelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
17
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.3", type: DraggableDataItemLevelComponent, isStandalone: true, selector: "luzmo-draggable-data-item-level", inputs: { variant: "variant", hideTypeIcon: "hideTypeIcon", sublevel: "sublevel", language: "language", disabled: "disabled", label: "label", description: "description", secondaryIconType: "secondaryIconType", data: "data", size: "size" }, outputs: { dataItemDropped: "dataItemDropped", dataItemDragStarted: "dataItemDragStarted" }, ngImport: i0, template: `<luzmo-draggable-data-item-level
14
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.3", type: DraggableDataItemLevelComponent, isStandalone: true, selector: "luzmo-draggable-data-item-level", inputs: { variant: "variant", hideTypeIcon: "hideTypeIcon", sublevel: "sublevel", language: "language", disabled: "disabled", data: "data", size: "size" }, outputs: { dataItemDropped: "dataItemDropped", dataItemDragStarted: "dataItemDragStarted" }, ngImport: i0, template: `<luzmo-draggable-data-item-level
18
15
  [attr.variant]="variant"
19
16
  [attr.hide-type-icon]="hideTypeIcon"
20
17
  [attr.sublevel]="sublevel"
21
18
  [attr.language]="language"
22
19
  [attr.disabled]="disabled"
23
- [attr.label]="label"
24
- [attr.description]="description"
25
- [attr.secondary-icon-type]="secondaryIconType"
26
20
  [attr.data]="data"
27
21
  [attr.size]="size"
28
22
  (data-item-dropped)="dataItemDropped.emit($event)"
29
23
  (data-item-drag-started)="dataItemDragStarted.emit($event)">
30
24
  <ng-content></ng-content>
31
- </luzmo-draggable-data-item-level>`, isInline: true, dependencies: [{ kind: "component", type: DraggableDataItemLevelComponent, selector: "luzmo-draggable-data-item-level", inputs: ["variant", "hideTypeIcon", "sublevel", "language", "disabled", "label", "description", "secondaryIconType", "data", "size"], outputs: ["dataItemDropped", "dataItemDragStarted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
25
+ </luzmo-draggable-data-item-level>`, isInline: true, dependencies: [{ kind: "component", type: DraggableDataItemLevelComponent, selector: "luzmo-draggable-data-item-level", inputs: ["variant", "hideTypeIcon", "sublevel", "language", "disabled", "data", "size"], outputs: ["dataItemDropped", "dataItemDragStarted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
32
26
  }
33
27
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: DraggableDataItemLevelComponent, decorators: [{
34
28
  type: Component,
@@ -42,9 +36,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImpor
42
36
  [attr.sublevel]="sublevel"
43
37
  [attr.language]="language"
44
38
  [attr.disabled]="disabled"
45
- [attr.label]="label"
46
- [attr.description]="description"
47
- [attr.secondary-icon-type]="secondaryIconType"
48
39
  [attr.data]="data"
49
40
  [attr.size]="size"
50
41
  (data-item-dropped)="dataItemDropped.emit($event)"
@@ -62,12 +53,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImpor
62
53
  type: Input
63
54
  }], disabled: [{
64
55
  type: Input
65
- }], label: [{
66
- type: Input
67
- }], description: [{
68
- type: Input
69
- }], secondaryIconType: [{
70
- type: Input
71
56
  }], data: [{
72
57
  type: Input
73
58
  }], size: [{
@@ -1,4 +1,5 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ import type { DraggableDataItemData } from '../types';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class DraggableDataItemComponent {
4
5
  variant?: 'highlight' | 'normal';
@@ -6,13 +7,14 @@ export declare class DraggableDataItemComponent {
6
7
  disabled?: boolean;
7
8
  hideSublevels?: boolean;
8
9
  hideTypeIcon?: boolean;
9
- secondaryIconType?: 'derived' | 'formula';
10
- label?: string;
11
- description?: string;
12
- data?: any;
10
+ data?: DraggableDataItemData;
13
11
  size?: any;
14
- dataItemDropped: EventEmitter<CustomEvent<any>>;
15
- dataItemDragStarted: EventEmitter<CustomEvent<any>>;
12
+ dataItemDropped: EventEmitter<CustomEvent<{
13
+ data: DraggableDataItemData;
14
+ }>>;
15
+ dataItemDragStarted: EventEmitter<CustomEvent<{
16
+ data: DraggableDataItemData;
17
+ }>>;
16
18
  static ɵfac: i0.ɵɵFactoryDeclaration<DraggableDataItemComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<DraggableDataItemComponent, "luzmo-draggable-data-item", never, { "variant": { "alias": "variant"; "required": false; }; "language": { "alias": "language"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hideSublevels": { "alias": "hideSublevels"; "required": false; }; "hideTypeIcon": { "alias": "hideTypeIcon"; "required": false; }; "secondaryIconType": { "alias": "secondaryIconType"; "required": false; }; "label": { "alias": "label"; "required": false; }; "description": { "alias": "description"; "required": false; }; "data": { "alias": "data"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "dataItemDropped": "dataItemDropped"; "dataItemDragStarted": "dataItemDragStarted"; }, never, ["*"], true, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<DraggableDataItemComponent, "luzmo-draggable-data-item", never, { "variant": { "alias": "variant"; "required": false; }; "language": { "alias": "language"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hideSublevels": { "alias": "hideSublevels"; "required": false; }; "hideTypeIcon": { "alias": "hideTypeIcon"; "required": false; }; "data": { "alias": "data"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "dataItemDropped": "dataItemDropped"; "dataItemDragStarted": "dataItemDragStarted"; }, never, ["*"], true, never>;
18
20
  }