diff --git a/report-builder/package-lock.json b/report-builder/package-lock.json index 0c5af03..93c44ff 100644 --- a/report-builder/package-lock.json +++ b/report-builder/package-lock.json @@ -26,7 +26,8 @@ "@codemirror/state": "^6.4.0", "@codemirror/theme-one-dark": "^6.1.2", "@codemirror/view": "^6.23.0", - "@luzmo/ngx-embed": "^6.2.0-beta.2", + "@luzmo/dashboard-contents-types": "^1.0.5", + "@luzmo/ngx-embed": "6.3.8", "@luzmo/nodejs-sdk": "^1.2.2", "@ngneat/until-destroy": "^10.0.0", "@ngrx/signals": "^18.0.0-rc.1", @@ -2264,14 +2265,16 @@ } }, "node_modules/@lit-labs/ssr-dom-shim": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.0.tgz", - "integrity": "sha512-yWJKmpGE6lUURKAaIltoPIE/wrbY3TEkqQt+X0m+7fQNnAv0keydnYvbiJFP1PnMhizmIWRWOG5KLhYyc/xl+g==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.1.tgz", + "integrity": "sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==", + "license": "BSD-3-Clause" }, "node_modules/@lit/reactive-element": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.4.tgz", "integrity": "sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==", + "license": "BSD-3-Clause", "dependencies": { "@lit-labs/ssr-dom-shim": "^1.2.0" } @@ -2354,23 +2357,41 @@ "win32" ] }, + "node_modules/@luzmo/dashboard-contents-types": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@luzmo/dashboard-contents-types/-/dashboard-contents-types-1.0.5.tgz", + "integrity": "sha512-FOSVYosfwfHILj6uhjZ8pwY8buX8UZiWKYbvtwc1nUdoYdFqpm7wW71ttXhYKOB8O9nMRYm/YE/2oXcZv8CgXw==", + "dependencies": { + "leaflet": "1.9.4", + "tslib": "^2.3.0" + } + }, "node_modules/@luzmo/embed": { - "version": "5.1.3-beta.10", - "resolved": "https://registry.npmjs.org/@luzmo/embed/-/embed-5.1.3-beta.10.tgz", - "integrity": "sha512-OV8CGDuO4+R+yymM7O+jNt46LjhVpwbj/TjeJd+CjaCFvMfemmFCqfj9qgCDAKQIASi2McgR3CakzFmw7iyTfw==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/@luzmo/embed/-/embed-6.1.8.tgz", + "integrity": "sha512-0tgGa69jME3tfS/H+h/rsxYVfpH9ak99y31rsjZSV9I7mEXq8+tgBISs43Awq06Mmz1poj/kY3SufsXsaUTSiA==", "dependencies": { - "@luzmo/shared-embed": "5.0.8-beta.8", - "lit": "3.1.2", - "zod-validation-error": "3.2.0" + "@luzmo/dashboard-contents-types": "1.0.3", + "@luzmo/shared-embed": "5.1.6", + "lit": "3.1.2" + } + }, + "node_modules/@luzmo/embed/node_modules/@luzmo/dashboard-contents-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@luzmo/dashboard-contents-types/-/dashboard-contents-types-1.0.3.tgz", + "integrity": "sha512-UH2489sGqa8IpZG1KI4+EyYIYOfaO3Z/g8kqjrH2zthucjfk9xLW51T8QKDrK3hVNs7Hp+yEf7gVtP2Rwq4Bsw==", + "dependencies": { + "leaflet": "1.9.4", + "tslib": "^2.3.0" } }, "node_modules/@luzmo/ngx-embed": { - "version": "6.2.0-beta.2", - "resolved": "https://registry.npmjs.org/@luzmo/ngx-embed/-/ngx-embed-6.2.0-beta.2.tgz", - "integrity": "sha512-WToal85TqgF1d/Tfw5bBfr6/XrEVVx4/bFnK7shPMradDU9zhuZb/RGW7R25fS+dAtUbm1jOuoUNtlm5h7nmKw==", + "version": "6.3.8", + "resolved": "https://registry.npmjs.org/@luzmo/ngx-embed/-/ngx-embed-6.3.8.tgz", + "integrity": "sha512-J/6F236UjIWYkSm87dwwAF7toAXc1AY4b01QH7jzqYdOfncgCBZTG4r71pPh8in/J2yiI+LZ6s2th7qycEJ3iA==", "dependencies": { - "@luzmo/embed": "5.1.3-beta.10", - "@luzmo/shared-embed": "5.0.8-beta.8", + "@luzmo/embed": "6.1.8", + "@luzmo/shared-embed": "5.1.6", "tslib": "^2.6.2" }, "peerDependencies": { @@ -2388,19 +2409,20 @@ } }, "node_modules/@luzmo/shared-embed": { - "version": "5.0.8-beta.8", - "resolved": "https://registry.npmjs.org/@luzmo/shared-embed/-/shared-embed-5.0.8-beta.8.tgz", - "integrity": "sha512-3r05si4xoztOTWLgQTL/nl8RJZDN2sFgOf/0M56Aib0zoSJaWHJHhZ8AtadJUUlBv39FP1p1JugUvNJ4bW64CA==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@luzmo/shared-embed/-/shared-embed-5.1.6.tgz", + "integrity": "sha512-o1misrxEdZlp9NPJL1VQpBi1lYTV0IQrnn+LkDNMinPrUfZ8A9c8qctFooiglHH9MC9dCaNMJcKiNZ6YDqY2Uw==", "dependencies": { - "zod": "3.23.6" + "@luzmo/dashboard-contents-types": "1.0.3" } }, - "node_modules/@luzmo/shared-embed/node_modules/zod": { - "version": "3.23.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.6.tgz", - "integrity": "sha512-RTHJlZhsRbuA8Hmp/iNL7jnfc4nZishjsanDAfEY1QpDQZCahUp3xDzl+zfweE9BklxMUcgBgS1b7Lvie/ZVwA==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" + "node_modules/@luzmo/shared-embed/node_modules/@luzmo/dashboard-contents-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@luzmo/dashboard-contents-types/-/dashboard-contents-types-1.0.3.tgz", + "integrity": "sha512-UH2489sGqa8IpZG1KI4+EyYIYOfaO3Z/g8kqjrH2zthucjfk9xLW51T8QKDrK3hVNs7Hp+yEf7gVtP2Rwq4Bsw==", + "dependencies": { + "leaflet": "1.9.4", + "tslib": "^2.3.0" } }, "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { @@ -3550,7 +3572,8 @@ "node_modules/@types/trusted-types": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", - "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==" + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT" }, "node_modules/@types/webxr": { "version": "0.5.15", @@ -7087,6 +7110,12 @@ "node": ">=10" } }, + "node_modules/leaflet": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==", + "license": "BSD-2-Clause" + }, "node_modules/less": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/less/-/less-4.2.0.tgz", @@ -7307,6 +7336,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/lit/-/lit-3.1.2.tgz", "integrity": "sha512-VZx5iAyMtX7CV4K8iTLdCkMaYZ7ipjJZ0JcSdJ0zIdGxxyurjIn7yuuSxNBD7QmjvcNJwr0JS4cAdAtsy7gZ6w==", + "license": "BSD-3-Clause", "dependencies": { "@lit/reactive-element": "^2.0.4", "lit-element": "^4.0.4", @@ -7314,19 +7344,21 @@ } }, "node_modules/lit-element": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.0.5.tgz", - "integrity": "sha512-iTWskWZEtn9SyEf4aBG6rKT8GABZMrTWop1+jopsEOgEcugcXJGKuX5bEbkq9qfzY+XB4MAgCaSPwnNpdsNQ3Q==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.1.1.tgz", + "integrity": "sha512-HO9Tkkh34QkTeUmEdNYhMT8hzLid7YlMlATSi1q4q17HE5d9mrrEHJ/o8O2D0cMi182zK1F3v7x0PWFjrhXFew==", + "license": "BSD-3-Clause", "dependencies": { "@lit-labs/ssr-dom-shim": "^1.2.0", "@lit/reactive-element": "^2.0.4", - "lit-html": "^3.1.2" + "lit-html": "^3.2.0" } }, "node_modules/lit-html": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.1.3.tgz", - "integrity": "sha512-FwIbqDD8O/8lM4vUZ4KvQZjPPNx7V1VhT7vmRB8RBAO0AU6wuTVdoXiu2CivVjEGdugvcbPNBLtPE1y0ifplHA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.2.1.tgz", + "integrity": "sha512-qI/3lziaPMSKsrwlxH/xMgikhQ0EGOX2ICU73Bi/YHFvz2j/yMCIrw4+puF2IpQ4+upd3EWbvnHM9+PnJn48YA==", + "license": "BSD-3-Clause", "dependencies": { "@types/trusted-types": "^2.0.2" } @@ -11301,26 +11333,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", - "peer": true, - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-validation-error": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.2.0.tgz", - "integrity": "sha512-cYlPR6zuyrgmu2wRTdumEAJGuwI7eHVHGT+VyneAQxmRAKtGRL1/7pjz4wfLhz4J05f5qoSZc3rGacswgyTjjw==", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "zod": "^3.18.0" - } - }, "node_modules/zone.js": { "version": "0.14.10", "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.10.tgz", diff --git a/report-builder/package.json b/report-builder/package.json index c3c4691..46a18de 100755 --- a/report-builder/package.json +++ b/report-builder/package.json @@ -28,7 +28,8 @@ "@codemirror/state": "^6.4.0", "@codemirror/theme-one-dark": "^6.1.2", "@codemirror/view": "^6.23.0", - "@luzmo/ngx-embed": "^6.2.0-beta.2", + "@luzmo/dashboard-contents-types": "^1.0.5", + "@luzmo/ngx-embed": "6.3.8", "@luzmo/nodejs-sdk": "^1.2.2", "@ngneat/until-destroy": "^10.0.0", "@ngrx/signals": "^18.0.0-rc.1", diff --git a/report-builder/src/app/report-builder/chart-panel/chart-config-panel/ai-chart-input/ai-chart-input.component.ts b/report-builder/src/app/report-builder/chart-panel/chart-config-panel/ai-chart-input/ai-chart-input.component.ts index d328b77..0258a0f 100644 --- a/report-builder/src/app/report-builder/chart-panel/chart-config-panel/ai-chart-input/ai-chart-input.component.ts +++ b/report-builder/src/app/report-builder/chart-panel/chart-config-panel/ai-chart-input/ai-chart-input.component.ts @@ -11,8 +11,8 @@ import { tap } from 'rxjs/operators'; import { CHARTS } from '../../../shared/constants/charts.constant'; import { SlotsDisplayComponent } from '../slots-display/slots-display.component'; import { ChartPickerComponent } from '../chart-picker/chart-picker.component'; -import { Slot } from '../../../shared/models/models'; import { ItemType } from '@luzmo/ngx-embed'; +import { Slot } from '@luzmo/dashboard-contents-types'; @Component({ selector: 'app-ai-chart', @@ -55,9 +55,9 @@ export class AiChartInputComponent { generatedChartDef.slots.forEach((slot) => { const slotFound = slots.find((s: Slot) => s.name === slot.name); if (slotFound) { - slotFound.formattedName = slot?.formattedName; + slotFound.label = slot?.label; slotFound.type = slot?.type; - slotFound.acceptsMultiple = slot?.acceptsMultiple; + slotFound.canAcceptMultipleColumns = slot?.canAcceptMultipleColumns; } else { slots.push(slot); diff --git a/report-builder/src/app/report-builder/chart-panel/chart-config-panel/slots-display/slots-display.component.html b/report-builder/src/app/report-builder/chart-panel/chart-config-panel/slots-display/slots-display.component.html index b1a7f6d..6243d95 100644 --- a/report-builder/src/app/report-builder/chart-panel/chart-config-panel/slots-display/slots-display.component.html +++ b/report-builder/src/app/report-builder/chart-panel/chart-config-panel/slots-display/slots-display.component.html @@ -1,7 +1,7 @@
@for (slot of chartService.slots(); track slot) {
-
{{ slot.formattedName }}
+
{{ slot.label }}
@for (slotContent of slot.content; track slotContent) {
{{ slotContent.label['en'] }}
- delete
} - @if (slot.acceptsMultiple || (slot.content.length === 0 && !slot.acceptsMultiple)) { + @if (slot.canAcceptMultipleColumns || (slot.content.length === 0 && !slot.canAcceptMultipleColumns)) {
} -
\ No newline at end of file +
diff --git a/report-builder/src/app/report-builder/chart-panel/chart-config-panel/slots-display/slots-display.component.ts b/report-builder/src/app/report-builder/chart-panel/chart-config-panel/slots-display/slots-display.component.ts index 3f52c95..729ad40 100644 --- a/report-builder/src/app/report-builder/chart-panel/chart-config-panel/slots-display/slots-display.component.ts +++ b/report-builder/src/app/report-builder/chart-panel/chart-config-panel/slots-display/slots-display.component.ts @@ -7,8 +7,8 @@ import { CdkDropListGroup } from '@angular/cdk/drag-drop'; import { ChartService } from '../../../shared/services/chart.service'; -import { Slot } from '../../../shared/models/models'; import { COLUMN_TYPE_ICONS } from '../../../shared/constants/charts.constant'; +import { GenericSlotContent, Slot } from '@luzmo/dashboard-contents-types'; @Component({ selector: 'app-slots-display', @@ -24,7 +24,7 @@ export class SlotsDisplayComponent { drop(event: CdkDragDrop) { const column = event.item.data; const slotName: Slot['name'] = event.container.id.replace('data-drop-', '') as Slot['name']; - const slotContent: Slot['content'][number] = { + const slotContent: GenericSlotContent = { label: column.name, set: column.securable_id, column: column.id, @@ -45,7 +45,7 @@ export class SlotsDisplayComponent { const column = event.item.data; const slotNameTemp = event.container.id.replace('data-replace-', ''); const slotName = slotNameTemp.substring(0, slotNameTemp.lastIndexOf('-')) as Slot['name']; - + const slotContent: Slot['content'][number] = { label: column.name, set: column.securable_id, diff --git a/report-builder/src/app/report-builder/chart-view/chart-view.component.html b/report-builder/src/app/report-builder/chart-view/chart-view.component.html index 4766a55..1122f89 100644 --- a/report-builder/src/app/report-builder/chart-view/chart-view.component.html +++ b/report-builder/src/app/report-builder/chart-view/chart-view.component.html @@ -17,6 +17,7 @@ style="height: 40vh; max-width: 80rem" class="flex justify-center w-full p-5" > + @@ -45,6 +46,7 @@
+
diff --git a/report-builder/src/app/report-builder/shared/constants/charts.constant.ts b/report-builder/src/app/report-builder/shared/constants/charts.constant.ts index 89b801b..2ff4086 100644 --- a/report-builder/src/app/report-builder/shared/constants/charts.constant.ts +++ b/report-builder/src/app/report-builder/shared/constants/charts.constant.ts @@ -10,6 +10,15 @@ // pivot table // speedometer +import { + areaChartSlotsConfig, + barChartSlotsConfig, + bubbleChartSlotsConfig, + columnChartSlotsConfig, + donutChartSlotsConfig, + lineChartSlotsConfig, + treemapChartSlotsConfig +} from '@luzmo/dashboard-contents-types'; import { Chart } from '../models/models'; import { PALETTES } from './color-palettes.constant'; @@ -36,7 +45,7 @@ export const COLORPALETTES = () => { default: 'default', transformFn: (value: any) => { const palette = PALETTES.find(p => p.key === value); - return { + return { theme: { mainColor: palette ? palette.colors[0] : PALETTES[0].colors[0], colors: palette ? palette.colors : PALETTES[0].colors @@ -156,29 +165,7 @@ export const CHARTS = (): Chart[] => { colorPalette: COLORPALETTES(), colors: [], }, - slots: [ - { - formattedName: 'Category', - name: 'x-axis', - type: 'category', - acceptsMultiple: false, - content: [] - }, - { - formattedName: 'Measure', - name: 'measure', - type: 'measure', - acceptsMultiple: true, - content: [] - }, - { - formattedName: 'Group by', - name: 'legend', - type: 'legend', - acceptsMultiple: false, - content: [] - } - ] + slots: columnChartSlotsConfig }, { type: 'bar-chart', @@ -210,29 +197,7 @@ export const CHARTS = (): Chart[] => { colorPalette: COLORPALETTES(), colors: [], }, - slots: [ - { - formattedName: 'Category', - name: 'y-axis', - type: 'category', - acceptsMultiple: false, - content: [] - }, - { - formattedName: 'Measure', - name: 'measure', - type: 'measure', - acceptsMultiple: true, - content: [] - }, - { - formattedName: 'Group by', - name: 'legend', - type: 'legend', - acceptsMultiple: false, - content: [] - } - ] + slots: barChartSlotsConfig }, { type: 'line-chart', @@ -248,29 +213,7 @@ export const CHARTS = (): Chart[] => { legendPosition: LEGENDPOSITION(), colorPalette: COLORPALETTES() }, - slots: [ - { - formattedName: 'Category', - name: 'x-axis', - type: 'category', - acceptsMultiple: false, - content: [] - }, - { - formattedName: 'Measure', - name: 'measure', - type: 'measure', - acceptsMultiple: true, - content: [] - }, - { - formattedName: 'Group by', - name: 'legend', - type: 'legend', - acceptsMultiple: false, - content: [] - } - ] + slots: lineChartSlotsConfig }, // { // type: 'scatter-plot', @@ -292,29 +235,7 @@ export const CHARTS = (): Chart[] => { legendPosition: LEGENDPOSITION(), colorPalette: COLORPALETTES() }, - slots: [ - { - formattedName: 'Category', - name: 'x-axis', - type: 'category', - acceptsMultiple: false, - content: [] - }, - { - formattedName: 'Measure', - name: 'measure', - type: 'measure', - acceptsMultiple: true, - content: [] - }, - { - formattedName: 'Group by', - name: 'legend', - type: 'legend', - acceptsMultiple: false, - content: [] - } - ] + slots: areaChartSlotsConfig }, { type: 'donut-chart', @@ -328,22 +249,7 @@ export const CHARTS = (): Chart[] => { legendPosition: LEGENDPOSITION(), colorPalette: COLORPALETTES() }, - slots: [ - { - formattedName: 'Category', - name: 'category', - type: 'category', - acceptsMultiple: false, - content: [] - }, - { - formattedName: 'Measure', - name: 'measure', - type: 'measure', - acceptsMultiple: true, - content: [] - } - ] + slots: donutChartSlotsConfig }, { type: 'donut-chart', @@ -362,22 +268,7 @@ export const CHARTS = (): Chart[] => { variableAxis: MANUALAXISRANGE(), colorPalette: COLORPALETTES() }, - slots: [ - { - formattedName: 'Category', - name: 'category', - type: 'category', - acceptsMultiple: false, - content: [] - }, - { - formattedName: 'Measure', - name: 'measure', - type: 'measure', - acceptsMultiple: true, - content: [] - } - ] + slots: donutChartSlotsConfig }, { type: 'bubble-chart', @@ -403,29 +294,7 @@ export const CHARTS = (): Chart[] => { colorPalette: COLORPALETTES(), colors: [], }, - slots: [ - { - formattedName: 'Category', - name: 'category', - type: 'category', - acceptsMultiple: false, - content: [] - }, - { - formattedName: 'Measure', - name: 'measure', - type: 'measure', - acceptsMultiple: false, - content: [] - }, - { - formattedName: 'Group by', - name: 'color', - type: 'legend', - acceptsMultiple: false, - content: [] - } - ] + slots: bubbleChartSlotsConfig }, { type: 'treemap-chart', @@ -451,29 +320,7 @@ export const CHARTS = (): Chart[] => { colorPalette: COLORPALETTES(), colors: [], }, - slots: [ - { - formattedName: 'Category', - name: 'category', - type: 'category', - acceptsMultiple: false, - content: [] - }, - { - formattedName: 'Measure', - name: 'measure', - type: 'measure', - acceptsMultiple: false, - content: [] - }, - { - formattedName: 'Group by', - name: 'color', - type: 'legend', - acceptsMultiple: false, - content: [] - } - ] + slots: treemapChartSlotsConfig }, // { // type: 'evolution-number', @@ -505,5 +352,8 @@ export const CHARTS = (): Chart[] => { // icon: 'speed', // settings: {}, // }, - ]; + ].map(chart => ({ + ...chart, + slots: chart.slots.map(slot => ({ ...slot, content: [] })) + } as Chart)); } diff --git a/report-builder/src/app/report-builder/shared/models/models.ts b/report-builder/src/app/report-builder/shared/models/models.ts index 6f5a122..6c069ad 100644 --- a/report-builder/src/app/report-builder/shared/models/models.ts +++ b/report-builder/src/app/report-builder/shared/models/models.ts @@ -1,20 +1,5 @@ import { ItemType } from "@luzmo/ngx-embed"; -import { ColumnType } from "src/app/shared/models/colum.model"; - -export type Slot = { - acceptsMultiple: boolean; - content: { - label: Record; - set: string; - column: string; - type: ColumnType; - subtype: string; - format: string; - }[]; - formattedName: string; - name: 'y-axis' | 'measure' | 'legend' | 'x-axis' | 'evolution' | 'row' | 'column' | 'columns' | 'category' | 'target' | 'color' | 'geo' | 'route' | 'order' | 'source' | 'destination' | 'size' | 'name' | 'levels' | 'open' | 'high' | 'low' | 'close' | 'coordinates' | 'identifier'; - type: string; -} +import { Slot } from "@luzmo/dashboard-contents-types"; export type Chart = { type: ItemType, @@ -24,4 +9,4 @@ export type Chart = { settings: any; slots: Slot[]; filters?: any[]; -} \ No newline at end of file +} diff --git a/report-builder/src/app/report-builder/shared/services/chart.service.ts b/report-builder/src/app/report-builder/shared/services/chart.service.ts index 77d0ad9..4ae1fc4 100644 --- a/report-builder/src/app/report-builder/shared/services/chart.service.ts +++ b/report-builder/src/app/report-builder/shared/services/chart.service.ts @@ -1,8 +1,9 @@ import { computed, Injectable } from '@angular/core'; import { patchState, signalState } from '@ngrx/signals'; import { CHARTS } from '../constants/charts.constant'; -import { Chart, Slot } from '../models/models'; +import { Chart } from '../models/models'; import { FilterSlot, Value } from "../../chart-panel/filters-panel/filters-panel.component"; +import { Slot } from '@luzmo/dashboard-contents-types'; type ChartState = { name: Chart['name']; @@ -124,7 +125,7 @@ export class ChartService { } undo(): void { - + } redo(): void { @@ -176,4 +177,3 @@ export class ChartService { ] as any; } } - diff --git a/report-builder/tsconfig.json b/report-builder/tsconfig.json index 9eb059f..253f703 100755 --- a/report-builder/tsconfig.json +++ b/report-builder/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "./dist/out-tsc", "forceConsistentCasingInFileNames": true, "esModuleInterop": true, - "strict": true, + "strict": false, "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true,