@xxmachina/components 19.0.0-preview.16 → 19.0.0-preview.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/xxmachina-components-molecules-daily-cell.mjs +1 -1
- package/fesm2022/xxmachina-components-molecules-daily-cell.mjs.map +1 -1
- package/fesm2022/xxmachina-components-molecules-weekly-header.mjs +2 -2
- package/fesm2022/xxmachina-components-organisms-calendar-section.mjs +2 -2
- package/fesm2022/xxmachina-components-pages-command.mjs +2 -2
- package/fesm2022/xxmachina-components-pages-query.mjs +2 -2
- package/fesm2022/xxmachina-components-routes-queries.mjs +1 -1
- package/fesm2022/xxmachina-components-routes-queries.mjs.map +1 -1
- package/fesm2022/xxmachina-components-routes-resources-resource.routes-DzGgwitX.mjs.map +1 -1
- package/fesm2022/xxmachina-components-routes-resources.mjs +1 -1
- package/fesm2022/xxmachina-components-routes-resources.mjs.map +1 -1
- package/fesm2022/xxmachina-components-services-contract.mjs +1 -1
- package/fesm2022/xxmachina-components-services-contract.mjs.map +1 -1
- package/fesm2022/xxmachina-components-services-invoice.mjs +1 -1
- package/fesm2022/xxmachina-components-services-invoice.mjs.map +1 -1
- package/fesm2022/xxmachina-components-services-order.mjs +1 -1
- package/fesm2022/xxmachina-components-services-order.mjs.map +1 -1
- package/fesm2022/xxmachina-components-services-partner.mjs +1 -1
- package/fesm2022/xxmachina-components-services-partner.mjs.map +1 -1
- package/molecules/daily-cell/daily-cell.molecule.d.ts +1 -1
- package/package.json +9 -9
- package/services/invoice/invoice.service.d.ts +1 -1
- package/services/order/order.service.d.ts +1 -1
|
@@ -4,7 +4,7 @@ import * as i1 from '@angular/common';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/material/tooltip';
|
|
6
6
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
7
|
-
import { Schedule, isConflict } from '@xxmachina/common/domain/models
|
|
7
|
+
import { Schedule, isConflict } from '@xxmachina/common/domain/models';
|
|
8
8
|
import dayjs from 'dayjs';
|
|
9
9
|
|
|
10
10
|
class PercentagePipe {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xxmachina-components-molecules-daily-cell.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/molecules/daily-cell/daily-cell.molecule.ts","../../../../../packages/@xxmachina/components/src/lib/molecules/daily-cell/xxmachina-components-molecules-daily-cell.ts"],"sourcesContent":["import { Component, Input, Pipe, PipeTransform } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { Schedule, isConflict } from '@xxmachina/common/domain/models
|
|
1
|
+
{"version":3,"file":"xxmachina-components-molecules-daily-cell.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/molecules/daily-cell/daily-cell.molecule.ts","../../../../../packages/@xxmachina/components/src/lib/molecules/daily-cell/xxmachina-components-molecules-daily-cell.ts"],"sourcesContent":["import { Component, Input, Pipe, PipeTransform } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { Schedule, isConflict } from '@xxmachina/common/domain/models';\nimport dayjs from 'dayjs';\n\n@Pipe({standalone: true, name: 'percentage'})\nexport class PercentagePipe implements PipeTransform {\n transform(date: dayjs.Dayjs, base: dayjs.Dayjs) {\n if (date.date() > base.date()) return 100;\n const day = 60 * 60 * 24;\n return (date.hour() * 60 * 60 + date.minute() * 60 + date.second()) / day * 100;\n }\n}\n\n@Pipe({standalone: true, name: 'filterByDate', pure: true})\nexport class FilterByDatePipe implements PipeTransform {\n transform(schedules: Schedule[], date: dayjs.Dayjs = dayjs()) {\n const dateSchedule = Schedule.from({\n id: null,\n startAt: date?.clone()?.startOf('day'),\n endAt: date?.clone()?.endOf('day'),\n });\n const filtered = schedules.filter(schedule => {\n return isConflict(schedule, dateSchedule)\n });\n return filtered;\n }\n}\n\n@Pipe({standalone: true, name: 'tooltipText', pure: true})\nexport class ScheduleToolTipTextPipe implements PipeTransform {\n transform(schedule: Schedule): string {\n return `${schedule.startAt.format('HH:mm')} ~ ${schedule.endAt.format('HH:mm')} ${schedule.name} `;\n }\n}\n\n@Component({\n standalone: true,\n selector: 'molecules-daily-cell',\n imports: [\n CommonModule,\n MatTooltipModule,\n PercentagePipe,\n FilterByDatePipe,\n ScheduleToolTipTextPipe,\n ],\n template: `\n <div class=\"background\">\n <div \n class=\"schedule-band\" \n *ngFor=\"let schedule of schedules | filterByDate:date;\"\n [matTooltip]=\"schedule | tooltipText\"\n matTooltipPosition=\"above\"\n [style.background-color]=\"schedule?.color ?? '#F2E7FE'\"\n [style.left.%]=\"schedule.startAt | percentage:date\"\n [style.width.%]=\"(schedule.endAt | percentage:date) - (schedule.startAt | percentage:date)\"\n ></div>\n </div>\n\n <div class=\"date box\" [ngStyle]=\"{\n 'background-color': marked && markingColor,\n 'color': marked && 'white'\n }\">\n <span class=\"date\" *ngIf=\"displayDate\">{{ date | date: 'd' }}</span>\n </div>\n\n <!-- <div class=\"schedules-container\">\n <span *ngFor=\"let schedule of schedules | filterByDate:date;\">\n {{ getScheduleText(schedule) }}\n </span>\n <span *ngIf=\"!schedules?.length\">{{ noSchedulesText }}</span>\n </div> -->\n `,\n styleUrls: ['./daily-cell.molecule.scss']\n})\nexport class DailyCellMolecule {\n\n @Input() date: dayjs.Dayjs;\n @Input() schedules: Schedule[];\n @Input() displayDate = true;\n @Input() noSchedulesText = 'noSchedulesText'\n @Input() toolTipText = 'toolTipText';\n @Input() marked = 'transparent';\n @Input() markingColor = 'red';\n\n getScheduleText(schedule: Schedule) {\n return `${getTimeText(schedule.startAt)} ~ ${getTimeText(schedule.endAt, schedule.startAt)}`;\n }\n\n getToolTipText(schedules: Schedule[]): string {\n return schedules.map(s => this.getScheduleText(s)).join(' ');\n }\n\n}\n\nfunction getTimeText(time: dayjs.Dayjs, base: dayjs.Dayjs = time) {\n return (base.isBefore(time) && time.format('HH:mm') === '00:00')\n ? '24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}}</span>
|
|
14
14
|
</div>
|
|
15
|
-
`, isInline: true, styles: [":host{display:block;--primary-color: #404040;--primary-color-SCOPED-IN-
|
|
15
|
+
`, isInline: true, styles: [":host{display:block;--primary-color: #404040;--primary-color-SCOPED-IN-YEdYTE1x: var(--primary-color);--secondary-color: #B0B0B0;--secondary-color-SCOPED-IN-YEdYTE1x: var(--secondary-color)}:host{display:grid;width:100%;grid-template-columns:repeat(7,1fr);background-color:var(--primary-color-SCOPED-IN-YEdYTE1x)}:host .day-container{display:flex;justify-content:center;align-items:center;color:#fff;font-weight:700;width:calc(hvar(--width) / 7)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] }); }
|
|
16
16
|
}
|
|
17
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WeeklyHeaderMolecule, decorators: [{
|
|
18
18
|
type: Component,
|
|
@@ -22,7 +22,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
22
22
|
<div class="day-container" *ngFor="let day of ['日', '月', '火', '水', '木', '金', '土']">
|
|
23
23
|
<span>{{ day }}</span>
|
|
24
24
|
</div>
|
|
25
|
-
`, styles: [":host{display:block;--primary-color: #404040;--primary-color-SCOPED-IN-
|
|
25
|
+
`, styles: [":host{display:block;--primary-color: #404040;--primary-color-SCOPED-IN-YEdYTE1x: var(--primary-color);--secondary-color: #B0B0B0;--secondary-color-SCOPED-IN-YEdYTE1x: var(--secondary-color)}:host{display:grid;width:100%;grid-template-columns:repeat(7,1fr);background-color:var(--primary-color-SCOPED-IN-YEdYTE1x)}:host .day-container{display:flex;justify-content:center;align-items:center;color:#fff;font-weight:700;width:calc(hvar(--width) / 7)}\n"] }]
|
|
26
26
|
}], ctorParameters: () => [] });
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -58,7 +58,7 @@ class CalendarSectionOrganism {
|
|
|
58
58
|
></molecules-daily-cell>
|
|
59
59
|
</ng-container>
|
|
60
60
|
</div>
|
|
61
|
-
`, isInline: true, styles: [":host{display:block;--row: 80px;--row-SCOPED-IN-
|
|
61
|
+
`, isInline: true, styles: [":host{display:block;--row: 80px;--row-SCOPED-IN-jX0jnmtQ: var(--row);--row-num: 0;--row-num-SCOPED-IN-jX0jnmtQ: var(--row-num);--border-color: #9E9E9E;--border-color-SCOPED-IN-jX0jnmtQ: var(--border-color);--primary-color: #404040;--primary-color-SCOPED-IN-jX0jnmtQ: var(--primary-color);--secondary-color: #B0B0B0;--secondary-color-SCOPED-IN-jX0jnmtQ: var(--secondary-color)}:host{width:100%;height:auto}:host .calendar.header molecules-weekly-header{--height: 32px}:host .calendar.contents{display:grid;width:var(--width);border:1px solid var(--border-color-SCOPED-IN-jX0jnmtQ);grid-gap:1px;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(var(--row-num-SCOPED-IN-jX0jnmtQ),var(--row-SCOPED-IN-jX0jnmtQ));box-sizing:border-box;background-color:var(--border-color-SCOPED-IN-jX0jnmtQ)}:host .calendar.contents molecules-daily-cell{--width: calc((var(--width) - 8px) / 7);--height: var(--row-SCOPED-IN-jX0jnmtQ);background-color:#fff}:host .calendar.description{display:flex;justify-content:flex-end;width:var(--width);height:32px;padding-right:16px}:host .calendar.description .description.container{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;font-size:12px}:host .calendar.description .description.container .circle{display:flex;width:20px;height:20px;justify-content:center;align-items:center;border-radius:50%;color:#fff;background:#00f}:host .calendar.description .description.container label{padding-left:4px;padding-right:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: DailyCellMolecule, selector: "molecules-daily-cell", inputs: ["date", "schedules", "displayDate", "noSchedulesText", "toolTipText", "marked", "markingColor"] }, { kind: "component", type: WeeklyHeaderMolecule, selector: "molecules-weekly-header" }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
62
62
|
}
|
|
63
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: CalendarSectionOrganism, decorators: [{
|
|
64
64
|
type: Component,
|
|
@@ -92,7 +92,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
92
92
|
></molecules-daily-cell>
|
|
93
93
|
</ng-container>
|
|
94
94
|
</div>
|
|
95
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;--row: 80px;--row-SCOPED-IN-
|
|
95
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;--row: 80px;--row-SCOPED-IN-jX0jnmtQ: var(--row);--row-num: 0;--row-num-SCOPED-IN-jX0jnmtQ: var(--row-num);--border-color: #9E9E9E;--border-color-SCOPED-IN-jX0jnmtQ: var(--border-color);--primary-color: #404040;--primary-color-SCOPED-IN-jX0jnmtQ: var(--primary-color);--secondary-color: #B0B0B0;--secondary-color-SCOPED-IN-jX0jnmtQ: var(--secondary-color)}:host{width:100%;height:auto}:host .calendar.header molecules-weekly-header{--height: 32px}:host .calendar.contents{display:grid;width:var(--width);border:1px solid var(--border-color-SCOPED-IN-jX0jnmtQ);grid-gap:1px;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(var(--row-num-SCOPED-IN-jX0jnmtQ),var(--row-SCOPED-IN-jX0jnmtQ));box-sizing:border-box;background-color:var(--border-color-SCOPED-IN-jX0jnmtQ)}:host .calendar.contents molecules-daily-cell{--width: calc((var(--width) - 8px) / 7);--height: var(--row-SCOPED-IN-jX0jnmtQ);background-color:#fff}:host .calendar.description{display:flex;justify-content:flex-end;width:var(--width);height:32px;padding-right:16px}:host .calendar.description .description.container{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;font-size:12px}:host .calendar.description .description.container .circle{display:flex;width:20px;height:20px;justify-content:center;align-items:center;border-radius:50%;color:#fff;background:#00f}:host .calendar.description .description.container label{padding-left:4px;padding-right:8px}\n"] }]
|
|
96
96
|
}], propDecorators: { label: [{
|
|
97
97
|
type: Input
|
|
98
98
|
}], displayDays: [{
|
|
@@ -280,7 +280,7 @@ class CommandPage extends NgAtomicComponent {
|
|
|
280
280
|
</frames-tabs>
|
|
281
281
|
</templates-form>
|
|
282
282
|
</frames-router-outlet>
|
|
283
|
-
`, isInline: true, styles: [":host{width:100%;height:100%;display:block;--page-width-lv1-SCOPED-IN-command-
|
|
283
|
+
`, isInline: true, styles: [":host{width:100%;height:100%;display:block;--page-width-lv1-SCOPED-IN-command-cakZ: var(--page-width-lv1)}:host .template{--first-content-height: 0px;width:var(--page-width-lv1-SCOPED-IN-command-cakZ)}:host .template div[dashboard]{padding:0;box-sizing:border-box}\n"], dependencies: [{ kind: "component", type: RouterOutletFrame, selector: "frames-router-outlet", outputs: ["events"] }, { kind: "component", type: FormTemplate, selector: "templates-form" }, { kind: "component", type: TabsFrame, selector: "frames-tabs", inputs: ["labels"] }, { kind: "component", type: CommandFormGroup, selector: "groups-command-form", inputs: ["apiJsonUrls"] }, { kind: "component", type: QueryFormGroup, selector: "groups-query-form", inputs: ["keyActions"] }] }); }
|
|
284
284
|
}
|
|
285
285
|
__decorate([
|
|
286
286
|
Effect(FormTemplateStore.ActionId.FILE_SELECTED),
|
|
@@ -329,7 +329,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
329
329
|
'formFieldMap',
|
|
330
330
|
]
|
|
331
331
|
},
|
|
332
|
-
], styles: [":host{width:100%;height:100%;display:block;--page-width-lv1-SCOPED-IN-command-
|
|
332
|
+
], styles: [":host{width:100%;height:100%;display:block;--page-width-lv1-SCOPED-IN-command-cakZ: var(--page-width-lv1)}:host .template{--first-content-height: 0px;width:var(--page-width-lv1-SCOPED-IN-command-cakZ)}:host .template div[dashboard]{padding:0;box-sizing:border-box}\n"] }]
|
|
333
333
|
}], propDecorators: { onFileSelected: [] } });
|
|
334
334
|
|
|
335
335
|
/**
|
|
@@ -403,7 +403,7 @@ class QueryPage extends NgAtomicComponent {
|
|
|
403
403
|
<groups-query-form dashboard (action)="dispatch($event)" />
|
|
404
404
|
</templates-index>
|
|
405
405
|
</frames-router-outlet>
|
|
406
|
-
`, isInline: true, styles: ["@charset \"UTF-8\";:host{width:100%;height:100%;display:block;--page-width-lv1-SCOPED-IN-query-
|
|
406
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";:host{width:100%;height:100%;display:block;--page-width-lv1-SCOPED-IN-query-YcHN: var(--page-width-lv1)}:host templates-index{--first-content-height: 300px;padding-left:0;box-sizing:border-box;transition:padding-left .3s}:host templates-index div[navDashboard]{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding:16px;box-sizing:border-box}:host templates-index div[navDashboard] ng-atomic-form-section-builder{--horizontal-padding: 0}\n"], dependencies: [{ kind: "component", type: IndexTemplate, selector: "templates-index" }, { kind: "component", type: RouterOutletFrame, selector: "frames-router-outlet", outputs: ["events"] }, { kind: "component", type: NgAtomicFormSectionBuilder, selector: "ng-atomic-form-section-builder", inputs: ["form", "formFlatExcludes", "fieldMap"] }, { kind: "component", type: QueryFormGroup, selector: "groups-query-form", inputs: ["keyActions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
407
407
|
}
|
|
408
408
|
__decorate([
|
|
409
409
|
Effect(IndexTemplateStore.ActionId.BACK),
|
|
@@ -473,7 +473,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
473
473
|
'variablesFormFieldMap',
|
|
474
474
|
]
|
|
475
475
|
},
|
|
476
|
-
], styles: ["@charset \"UTF-8\";:host{width:100%;height:100%;display:block;--page-width-lv1-SCOPED-IN-query-
|
|
476
|
+
], styles: ["@charset \"UTF-8\";:host{width:100%;height:100%;display:block;--page-width-lv1-SCOPED-IN-query-YcHN: var(--page-width-lv1)}:host templates-index{--first-content-height: 300px;padding-left:0;box-sizing:border-box;transition:padding-left .3s}:host templates-index div[navDashboard]{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding:16px;box-sizing:border-box}:host templates-index div[navDashboard] ng-atomic-form-section-builder{--horizontal-padding: 0}\n"] }]
|
|
477
477
|
}], ctorParameters: () => [], propDecorators: { back: [], navigateToIframe: [], expandPage: [] } });
|
|
478
478
|
|
|
479
479
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject, computed, effect } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { Query } from '@xxmachina/common/domain/models';
|
|
4
|
-
import { QueryHasuraRepository } from '@xxmachina/common/
|
|
4
|
+
import { QueryHasuraRepository } from '@xxmachina/common/infra/repository/hasura/query';
|
|
5
5
|
import { provideDataAccessor, defaultDataAccessor } from '@ng-atomic/common/pipes/data-accessor';
|
|
6
6
|
import { AppService } from '@ng-atomic/common/services/app';
|
|
7
7
|
import { injectAll } from '@ng-atomic/common/stores/entities';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xxmachina-components-routes-queries.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/routes/queries/queries.routes.ts","../../../../../packages/@xxmachina/components/src/lib/routes/queries/xxmachina-components-routes-queries.ts"],"sourcesContent":["import { computed, effect, inject } from '@angular/core';\nimport { ActivatedRoute, Routes } from '@angular/router';\nimport { Query } from '@xxmachina/common/domain/models';\nimport { QueryHasuraRepository } from '@xxmachina/common/
|
|
1
|
+
{"version":3,"file":"xxmachina-components-routes-queries.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/routes/queries/queries.routes.ts","../../../../../packages/@xxmachina/components/src/lib/routes/queries/xxmachina-components-routes-queries.ts"],"sourcesContent":["import { computed, effect, inject } from '@angular/core';\nimport { ActivatedRoute, Routes } from '@angular/router';\nimport { Query } from '@xxmachina/common/domain/models';\nimport { QueryHasuraRepository } from '@xxmachina/common/infra/repository/hasura/query';\nimport { defaultDataAccessor, provideDataAccessor } from '@ng-atomic/common/pipes/data-accessor';\nimport { AppService } from '@ng-atomic/common/services/app';\nimport { injectAll } from '@ng-atomic/common/stores/entities';\nimport { AppFrameStore } from '@ng-atomic/components/frames/app';\nimport { IndexPage, IndexPageStore } from '@ng-atomic/components/pages/_index';\nimport { applyToInput, provideEffect } from '@ng-atomic/core';\nimport { plainToInstanceWithValid } from '@nx-ddd/core';\nimport dayjs, { isDayjs } from 'dayjs';\n\nenum ActionId {\n\tEXPORT_QUERIES = '[@xxmachina/app] EXPORT_QUERIES',\n\tIMPORT_QUERIES = '[@xxmachina/app] IMPORT_QUERIES',\n}\n\nexport default <Routes>[\n\t{\n\t\tpath: '',\n\t\tcomponent: IndexPage,\n\t\tloadChildren: () => import('./pages/pages.routes'),\n\t\tdata: { preload: true },\n\t\tproviders: [\n\t\t\tprovideDataAccessor(() => (item: Query, key) => {\n\t\t\t\tswitch (key) {\n\t\t\t\t\tcase 'description': return item?.graphql?.query;\n\t\t\t\t\tcase 'subLine': return item?.createdAt?.format('YYYY/MM/DD HH:mm:ss');\n\t\t\t\t\tdefault: return defaultDataAccessor(item, key);\n\t\t\t\t}\n\t\t\t}, {merge: false}),\n\t\t\tIndexPageStore.provideDefault(),\n\t\t\tIndexPageStore.Config.provide(() => {\n\t\t\t\tconst route = inject(ActivatedRoute);\n\t\t\t\treturn config => ({\n\t\t\t\t\t...config,\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...config.style,\n\t\t\t\t\t\twidth: 'var(--page-width-lv1)',\n\t\t\t\t\t},\n\t\t\t\t\tnavEndActions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'menu',\n\t\t\t\t\t\t\ticon: 'more_vert',\n\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tid: AppFrameStore.ActionId.NAVIGATE,\n\t\t\t\t\t\t\t\t\ticon: 'add',\n\t\t\t\t\t\t\t\t\tname: 'クエリの作成',\n\t\t\t\t\t\t\t\t\tpayload: {commands: ['new'], extras: {relativeTo: route}},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tid: ActionId.EXPORT_QUERIES,\n\t\t\t\t\t\t\t\t\ticon: 'download',\n\t\t\t\t\t\t\t\t\tname: 'クエリのエクスポート'\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tid: ActionId.IMPORT_QUERIES,\n\t\t\t\t\t\t\t\t\ticon: 'upload',\n\t\t\t\t\t\t\t\t\tname: 'クエリのインポート'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\ttitle: 'クエリ一覧',\n\t\t\t\t\ttype: 'list',\n\t\t\t\t\ttableChildrenKey: null,\n\t\t\t\t\tgroupedBy: null,\n\t\t\t\t})\n\t\t\t}),\n\t\t\tIndexPageStore.Initializer.provide((store) => {\n\t\t\t\tconst queries = injectAll(Query);\n\t\t\t\tconst compare = (a, b) => {\n\t\t\t\t\tif (isDayjs(a.createdAt) && isDayjs(b.createdAt)) {\n\t\t\t\t\t\treturn a.createdAt.isBefore(b.createdAt) ? 1 : -1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn a.createdAt < b.createdAt ? 1 : -1;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tfunction isISO8601(value) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn dayjs(value).toISOString() === value;\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst itemsMap = computed(() => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'名前付き': {\n\t\t\t\t\t\t\titems: queries().filter((query) => !isISO8601(query.title)).sort(compare),\n\t\t\t\t\t\t\titemsLength: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'履歴': {\n\t\t\t\t\t\t\titems: queries().filter((query) => query).sort(compare),\n\t\t\t\t\t\t\titemsLength: 0,\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\teffect(() => { applyToInput(store, 'itemsMap', itemsMap()); });\n\t\t\t}),\n\t\t\tprovideEffect(ActionId.EXPORT_QUERIES, () => {\n\t\t\t\tconst store = inject(IndexPageStore);\n\t\t\t\tconst app = inject(AppService);\n\t\t\t\treturn () => {\n\t\t\t\t\tapp.clipboard.copy(JSON.stringify(store.itemsMap()['名前付き'].items, null, 2));\n\t\t\t\t\tapp.snackBar.open('JSONをコピーしました');\n\t\t\t\t}\n\t\t\t}),\n\t\t\tprovideEffect(ActionId.IMPORT_QUERIES, () => {\n\t\t\t\tconst repo = inject(QueryHasuraRepository);\n\t\t\t\tconst app = inject(AppService);\n\t\t\t\treturn () => {\n\t\t\t\t\tconst json = prompt('JSONを貼り付けてください');\n\t\t\t\t\tif (!json) return;\t\n\t\t\t\t\tconst items = JSON.parse(json) as any[];\n\t\t\t\t\tconst queries = items.map(item => plainToInstanceWithValid(Query, item));\n\t\t\t\t\tapp.loading.await(() => {\n\t\t\t\t\t\treturn repo.saveMany(queries).then(() => {\n\t\t\t\t\t\t\tapp.snackBar.open('クエリをインポートしました');\n\t\t\t\t\t\t}).catch((error) => {\n\t\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\t\tapp.snackBar.open('クエリのインポートに失敗しました');\n\t\t\t\t\t\t});\n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AAClC,iBAAC;AACF,aAAC,CAAC;AACF,YAAA,aAAa,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAK;AAC3C,gBAAA,MAAM,IAAI,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC1C,gBAAA,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;AAC9B,gBAAA,OAAO,MAAK;AACX,oBAAA,MAAM,IAAI,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACrC,oBAAA,IAAI,CAAC,IAAI;wBAAE;oBACX,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAU;AACvC,oBAAA,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,wBAAwB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACxE,oBAAA,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,MAAK;wBACtB,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAK;AACvC,4BAAA,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;AACnC,yBAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAI;AAClB,4BAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AACpB,4BAAA,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC;AACtC,yBAAC,CAAC;AACH,qBAAC,CAAC;AACH,iBAAC;AACF,aAAC,CAAC;AACF;AACD;CACD;;ACpID;;AAEG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xxmachina-components-routes-resources-resource.routes-DzGgwitX.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/routes/resources/pages/resource/resource.routes.ts"],"sourcesContent":["import { S } from '@angular/cdk/keycodes';\nimport { computed, effect, inject } from '@angular/core';\nimport { FormBuilder } from '@angular/forms';\nimport { Routes } from '@angular/router';\nimport { Resource } from '@xxmachina/common/domain/models';\nimport { ResourceHasuraRepository } from '@xxmachina/common/
|
|
1
|
+
{"version":3,"file":"xxmachina-components-routes-resources-resource.routes-DzGgwitX.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/routes/resources/pages/resource/resource.routes.ts"],"sourcesContent":["import { S } from '@angular/cdk/keycodes';\nimport { computed, effect, inject } from '@angular/core';\nimport { FormBuilder } from '@angular/forms';\nimport { Routes } from '@angular/router';\nimport { Resource } from '@xxmachina/common/domain/models';\nimport { ResourceHasuraRepository } from '@xxmachina/common/infra/repository/hasura/resource';\nimport { provideLangMap, provideModelName } from '@ng-atomic/common/pipes/domain';\nimport { FormFieldMap } from '@ng-atomic/common/pipes/smart-field';\nimport { AppService } from '@ng-atomic/common/services/app';\nimport { injectEntityStore, injectOne } from '@ng-atomic/common/stores/entities';\nimport { computedRawValue, getValue, injectRouteParam } from '@ng-atomic/common/utils';\n// import { ResourcePage } from './resource.page';\nimport { FormPage, FormPageStore, provideEntityIdName } from '@ng-atomic/components/pages/form';\nimport { applyToInput, provideEffect } from '@ng-atomic/core';\nimport { getLangMap } from '@nx-ddd/common/domain';\n\nexport default <Routes>[\n\t{\n\t\tpath: '',\n\t\tcomponent: FormPage,\n\t\t// loadChildren: () => import('./pages/pages.routes').then(m => m.routes)\n\t\tproviders: [\n\t\t\tprovideModelName(() => 'リソース'),\n\t\t\tprovideEntityIdName('resourceId'),\n\t\t\tFormPageStore.provideDefault(),\n\t\t\tFormPageStore.Initializer.provide((store) => {\n\t\t\t\tconst fb = inject(FormBuilder).nonNullable;\n\t\t\t\tconst form = fb.group({\n\t\t\t\t\tid: [''],\n\t\t\t\t\tprojectId: [''],\n\t\t\t\t\tname: [''],\n\t\t\t\t\ttype: ['graphql'],\n\t\t\t\t\topenapi: fb.group({\n\t\t\t\t\t\turl: [''],\n\t\t\t\t\t}),\n\t\t\t\t\tgraphql: fb.group({\n\t\t\t\t\t\turl: [''],\n\t\t\t\t\t}),\n\t\t\t\t\tcreatedAt: [{value: '', disabled: true}],\n\t\t\t\t\tupdatedAt: [{value: '', disabled: true}],\n\t\t\t\t});\n\t\t\t\tapplyToInput(store, 'form', form);\n\t\t\t}),\n\t\t\tFormPageStore.Initializer.provide((store) => {\n\t\t\t\tconst value = computedRawValue(() => store.form())\n\t\t\t\tconst formFieldMap = computed<FormFieldMap>(() => ({\n\t\t\t\t\tid: { type: 'hidden' },\n\t\t\t\t\tprojectId: { type: 'hidden' },\n\t\t\t\t\tname: { type: 'text' },\n\t\t\t\t\ttype: {\n\t\t\t\t\t\ttype: 'select',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{ name: 'GraphQL', value: 'graphql' },\n\t\t\t\t\t\t\t{ name: 'OpenAPI', value: 'openapi' },\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t\t'openapi.url': { type: value()?.type === 'openapi' ? 'text' : 'hidden' },\n\t\t\t\t\t'graphql.url': { type: value()?.type === 'graphql' ? 'text' : 'hidden' },\n\t\t\t\t\tcreatedAt: {\n\t\t\t\t\t\ttype: 'date',\n\t\t\t\t\t},\n\t\t\t\t\tupdatedAt: {\n\t\t\t\t\t\ttype: 'date',\n\t\t\t\t\t},\n\t\t\t\t}));\n\t\t\t\teffect(() => {\n\t\t\t\t\tapplyToInput(store, 'fieldMap', formFieldMap());\n\t\t\t\t});\n\t\t\t}),\n\t\t\tFormPageStore.Initializer.provide((store) => {\n\t\t\t\tconst resourceId = injectRouteParam('resourceId');\n\t\t\t\tconst resource = injectOne(Resource, { id: resourceId });\n\t\t\t\teffect(() => {\n\t\t\t\t\tconsole.debug('resourceId:', resourceId());\n\t\t\t\t\tconsole.debug('resource:', resource());\n\t\t\t\t\tstore.form().patchValue(resource());\n\t\t\t\t});\n\t\t\t}),\n\t\t\tprovideEffect(FormPageStore.ActionId.CREATE, () => {\n\t\t\t\tconst entity = injectEntityStore(Resource);\n\t\t\t\tconst app = inject(AppService);\n\t\t\t\tconst store = inject(FormPageStore);\n\t\t\t\treturn () => {\n\t\t\t\t\tconst value = store.form().getRawValue();\n\t\t\t\t\tconsole.debug('value:', value);\n\t\t\t\t\tapp.loading.await(() => {\n\t\t\t\t\t\treturn entity.create({\n\t\t\t\t\t\t\tid: undefined,\n\t\t\t\t\t\t\tprojectId: 'default',\n\t\t\t\t\t\t\ttype: value.type,\n\t\t\t\t\t\t\tname: value.name,\n\t\t\t\t\t\t\topenapi: value.openapi,\n\t\t\t\t\t\t\tgraphql: value.graphql,\n\t\t\t\t\t\t\tcreatedAt: undefined,\n\t\t\t\t\t\t\tupdatedAt: undefined,\n\t\t\t\t\t\t}).then(() => {\n\t\t\t\t\t\t\tapp.snackBar.open('リソースを作成しました');\n\t\t\t\t\t\t}).catch((error) => {\n\t\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\t\tapp.snackBar.open('リソースの作成に失敗しました');\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t}),\n\t\t\tprovideEffect(FormPageStore.ActionId.UPDATE, () => {\n\t\t\t\tconst entity = injectEntityStore(Resource);\n\t\t\t\tconst app = inject(AppService);\n\t\t\t\tconst store = inject(FormPageStore);\n\t\t\t\tconst resourceId = injectRouteParam('resourceId');\n\t\t\t\treturn () => {\n\t\t\t\t\tconst value = store.form().getRawValue();\n\t\t\t\t\tconsole.debug('value:', value);\n\t\t\t\t\tapp.loading.await(() => {\n\t\t\t\t\t\treturn entity.update({\n\t\t\t\t\t\t\tid: resourceId(),\n\t\t\t\t\t\t\tprojectId: 'default',\n\t\t\t\t\t\t\ttype: value.type,\n\t\t\t\t\t\t\tname: value.name,\n\t\t\t\t\t\t\topenapi: value.openapi,\n\t\t\t\t\t\t\tgraphql: value.graphql,\n\t\t\t\t\t\t\tcreatedAt: undefined,\n\t\t\t\t\t\t\tupdatedAt: undefined,\n\t\t\t\t\t\t}).then(() => {\n\t\t\t\t\t\t\tapp.snackBar.open('リソースを更新しました');\n\t\t\t\t\t\t}).catch((error) => {\n\t\t\t\t\t\t\tconsole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AC,CAAC;AACH,qBAAC,CAAC;AACH,iBAAC;AACF,aAAC,CAAC;AACF;AACD;CACD;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { effect, inject } from '@angular/core';
|
|
2
2
|
import { Resource, ResourceHelper } from '@xxmachina/common/domain/models';
|
|
3
|
-
import { ResourceHasuraRepository } from '@xxmachina/common/
|
|
3
|
+
import { ResourceHasuraRepository } from '@xxmachina/common/infra/repository/hasura/resource';
|
|
4
4
|
import { provideDataAccessor } from '@ng-atomic/common/pipes/data-accessor';
|
|
5
5
|
import { provideLangMap } from '@ng-atomic/common/pipes/domain';
|
|
6
6
|
import { AppService } from '@ng-atomic/common/services/app';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xxmachina-components-routes-resources.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/routes/resources/resources.routes.ts","../../../../../packages/@xxmachina/components/src/lib/routes/resources/xxmachina-components-routes-resources.ts"],"sourcesContent":["import { effect, inject } from '@angular/core';\nimport { Routes } from '@angular/router';\nimport { Resource, ResourceHelper } from '@xxmachina/common/domain/models';\nimport { ResourceHasuraRepository } from '@xxmachina/common/
|
|
1
|
+
{"version":3,"file":"xxmachina-components-routes-resources.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/routes/resources/resources.routes.ts","../../../../../packages/@xxmachina/components/src/lib/routes/resources/xxmachina-components-routes-resources.ts"],"sourcesContent":["import { effect, inject } from '@angular/core';\nimport { Routes } from '@angular/router';\nimport { Resource, ResourceHelper } from '@xxmachina/common/domain/models';\nimport { ResourceHasuraRepository } from '@xxmachina/common/infra/repository/hasura/resource';\nimport { provideDataAccessor } from '@ng-atomic/common/pipes/data-accessor';\nimport { provideLangMap } from '@ng-atomic/common/pipes/domain';\nimport { AppService } from '@ng-atomic/common/services/app';\nimport { injectAll } from '@ng-atomic/common/stores/entities';\nimport { buildColumns, injectIndexForm } from '@ng-atomic/components/organisms/table';\nimport { IndexPage, IndexPageStore } from '@ng-atomic/components/pages/_index';\nimport { applyToInput, provideEffect } from '@ng-atomic/core';\nimport { getLangMap } from '@nx-ddd/common/domain';\nimport { plainToInstanceWithValid } from '@nx-ddd/core';\n\nenum ActionId {\n\tEXPORT_RESOURCES = '[@xxmachina/app] EXPORT_RESOURCES',\n\tIMPORT_RESOURCES = '[@xxmachina/app] IMPORT_RESOURCES',\n}\n\nexport default <Routes>[\n\t{\n\t\tpath: '',\n\t\tcomponent: IndexPage,\n\t\tloadChildren: () => import('./pages/pages.routes'),\n\t\tproviders: [\n\t\t\tprovideLangMap(() => getLangMap(Resource, {\n\t\t\t\tdescription: '説明',\n\t\t\t\t'graphql.url': 'GraphQL URL',\n\t\t\t\t'openapi.url': 'OpenAPI URL',\n\t\t\t})),\n\t\t\tprovideDataAccessor(() => {\n\t\t\t\treturn (item: Resource, key) => {\n\t\t\t\t\tswitch (key) {\n\t\t\t\t\t\tcase 'description':\n\t\t\t\t\t\t\treturn ResourceHelper.getDescription(item);\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn item[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}),\n\t\t\tIndexPageStore.provideDefault(),\n\t\t\tIndexPageStore.Config.provide(() => {\n\t\t\t\treturn config => ({\n\t\t\t\t\t...config,\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...config.style,\n\t\t\t\t\t\twidth: 'var(--page-width-lv2)',\n\t\t\t\t\t},\n\t\t\t\t\ttitle: 'リソース一覧',\n\t\t\t\t\tnavEndActions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'menu',\n\t\t\t\t\t\t\ticon: 'more_vert',\n\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tid: IndexPageStore.ActionId.ADD,\n\t\t\t\t\t\t\t\t\tname: '追加',\n\t\t\t\t\t\t\t\t\ticon: 'add',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tid: ActionId.EXPORT_RESOURCES,\n\t\t\t\t\t\t\t\t\ticon: 'download',\n\t\t\t\t\t\t\t\t\tname: 'リソースのエクスポート'\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tid: ActionId.IMPORT_RESOURCES,\n\t\t\t\t\t\t\t\t\ticon: 'upload',\n\t\t\t\t\t\t\t\t\tname: 'リソースのインポート'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\titemActions: (item: Resource) => [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: IndexPageStore.ActionId.DETAIL,\n\t\t\t\t\t\t\tname: '詳細',\n\t\t\t\t\t\t\ticon: 'open_in_new',\n\t\t\t\t\t\t\tpayload: item,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t}),\n\t\t\tIndexPageStore.Initializer.provide((store) => {\n\t\t\t\tconst form = injectIndexForm({\n\t\t\t\t\tcolumns: buildColumns([\n\t\t\t\t\t\t'id', 'name', 'type', 'description', '__actions'\n\t\t\t\t\t])\n\t\t\t\t})\n\t\t\t\tapplyToInput(store, 'form', form);\n\t\t\t\tconst resources = injectAll(Resource);\n\t\t\t\teffect(() => {\n\t\t\t\t\tapplyToInput(store, 'items', resources());\n\t\t\t\t});\n\t\t\t}),\n\t\t\tprovideEffect(ActionId.EXPORT_RESOURCES, () => {\n\t\t\t\tconst store = inject(IndexPageStore);\n\t\t\t\tconst app = inject(AppService);\n\t\t\t\treturn () => {\n\t\t\t\t\tapp.clipboard.copy(JSON.stringify(store.items(), null, 2));\n\t\t\t\t\tapp.snackBar.open('JSONをコピーしました');\n\t\t\t\t}\n\t\t\t}),\n\t\t\tprovideEffect(ActionId.IMPORT_RESOURCES, () => {\n\t\t\t\tconst repo = inject(ResourceHasuraRepository);\n\t\t\t\tconst app = inject(AppService);\n\t\t\t\treturn () => {\n\t\t\t\t\tconst json = prompt('JSONを貼り付けてください');\n\t\t\t\t\tif (!json) return;\t\n\t\t\t\t\tconst items = JSON.parse(json) as any[];\n\t\t\t\t\tconst queries = items.map(item => plainToInstanceWithValid(Resource, item));\n\t\t\t\t\tapp.loading.await(() => {\n\t\t\t\t\t\treturn repo.saveMany(queries).then(() => {\n\t\t\t\t\t\t\tapp.snackBar.open('リソースをインポートしました');\n\t\t\t\t\t\t}).catch((error) => {\n\t\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\t\tapp.snackBar.open('リソースのインポートに失敗しました');\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}),\n\t\t]\n\t}\n];","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAcA,IAAK,QAGJ;AAHD,CAAA,UAAK,QAAQ,EAAA;AACZ,IAAA,QAAA,CAAA,kBAAA,CAAA,GAAA,mCAAsD;AACtD,IAAA,QAAA,CAAA,kBAAA,CAAA,GAAA,mCAAsD;AACvD,CAAC,EAHI,QAAQ,KAAR,QAAQ,GAGZ,EAAA,CAAA,CAAA;AAED,uBAAuB;AACtB,IAAA;AACC,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,SAAS;AACpB,QAAA,YAAY,EAAE,MAAM,OAAO,mEAAsB,CAAC;AAClD,QAAA,SAAS,EAAE;AACV,YAAA,cAAc,CAAC,MAAM,UAAU,CAAC,QAAQ,EAAE;AACzC,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,aAAa,EAAE,aAAa;AAC5B,gBAAA,aAAa,EAAE,aAAa;AAC5B,aAAA,CAAC,CAAC;YACH,mBAAmB,CAAC,MAAK;AACxB,gBAAA,OAAO,CAAC,IAAc,EAAE,GAAG,KAAI;oBAC9B,QAAQ,GAAG;AACV,wBAAA,KAAK,aAAa;AACjB,4BAAA,OAAO,cAAc,CAAC,cAAc,C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AAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC3E,oBAAA,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,MAAK;wBACtB,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAK;AACvC,4BAAA,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC;AACpC,yBAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAI;AAClB,4BAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AACpB,4BAAA,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC;AACvC,yBAAC,CAAC;AACH,qBAAC,CAAC;AACH,iBAAC;AACF,aAAC,CAAC;AACF;AACD;CACD;;AC1HD;;AAEG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
3
|
import { GraphqlService } from '@xxmachina/components/services/graphql';
|
|
4
|
-
import { Contract } from '@xxmachina/common/domain
|
|
4
|
+
import { Contract } from '@xxmachina/common/domain-invoice';
|
|
5
5
|
import { map } from 'rxjs';
|
|
6
6
|
|
|
7
7
|
class ContractService {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xxmachina-components-services-contract.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/services/contract/contract.service.ts","../../../../../packages/@xxmachina/components/src/lib/services/contract/xxmachina-components-services-contract.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { GraphqlService } from '@xxmachina/components/services/graphql';\nimport { Contract } from '@xxmachina/common/domain
|
|
1
|
+
{"version":3,"file":"xxmachina-components-services-contract.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/services/contract/contract.service.ts","../../../../../packages/@xxmachina/components/src/lib/services/contract/xxmachina-components-services-contract.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { GraphqlService } from '@xxmachina/components/services/graphql';\nimport { Contract } from '@xxmachina/common/domain-invoice';\nimport { map } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class ContractService {\n private graphql = inject(GraphqlService);\n list() {\n return this.graphql.graphql({\n query: `query { contracts { id no title issueDate orderIds } }`,\n }).pipe(\n map((data => data?.data?.contracts ?? [])),\n map((contracts) => contracts.map((contract: any) => Contract.from({...contract}))),\n )\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAMa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC;AASzC;IARC,IAAI,GAAA;AACF,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;AAC1B,YAAA,KAAK,EAAE,CAAwD,sDAAA,CAAA;SAChE,CAAC,CAAC,IAAI,CACL,GAAG,EAAE,IAAI,IAAI,IAAI,EAAE,IAAI,EAAE,SAAS,IAAI,EAAE,EAAE,EAC1C,GAAG,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,QAAa,KAAK,QAAQ,CAAC,IAAI,CAAC,EAAC,GAAG,QAAQ,EAAC,CAAC,CAAC,CAAC,CACnF;;8GARQ,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA,CAAA;;2FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACLlC;;AAEG;;;;"}
|
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
3
|
import { GraphqlService } from '@xxmachina/components/services/graphql';
|
|
4
4
|
import { map, lastValueFrom } from 'rxjs';
|
|
5
|
-
import { Invoice, Order } from '@xxmachina/common/domain
|
|
5
|
+
import { Invoice, Order } from '@xxmachina/common/domain-invoice/models';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
7
|
import { plainToInstance } from 'class-transformer';
|
|
8
8
|
import { HttpClient } from '@angular/common/http';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xxmachina-components-services-invoice.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/services/invoice/invoice.service.ts","../../../../../packages/@xxmachina/components/src/lib/services/invoice/xxmachina-components-services-invoice.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { GraphqlService } from '@xxmachina/components/services/graphql';\nimport { Observable, lastValueFrom, map } from 'rxjs';\nimport { Invoice, Order } from '@xxmachina/common/domain
|
|
1
|
+
{"version":3,"file":"xxmachina-components-services-invoice.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/services/invoice/invoice.service.ts","../../../../../packages/@xxmachina/components/src/lib/services/invoice/xxmachina-components-services-invoice.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { GraphqlService } from '@xxmachina/components/services/graphql';\nimport { Observable, lastValueFrom, map } from 'rxjs';\nimport { Invoice, Order } from '@xxmachina/common/domain-invoice/models';\nimport dayjs from 'dayjs';\nimport { plainToInstance } from 'class-transformer';\nimport { HttpClient } from '@angular/common/http';\n\nconst query = `\nquery {\n invoices{\n id\n no\n title\n subject\n customerId\n vendorId\n amount\n dueDate\n orderIds\n customer {\n id\n name\n type\n address\n postalCode\n email\n billingEmail\n billingContact\n phoneNumber\n contact\n suffix\n bankAccount\n }\n vendor {\n id\n name\n type\n address\n postalCode\n email\n billingEmail\n billingContact\n phoneNumber\n contact\n suffix\n bankAccount\n }\n orders {\n id\n title\n eclId\n customerId\n vendorId\n contractId\n invoiceId\n startDate\n endDate\n unitPrice\n unit\n quantity\n amountInput\n amount\n statusIn\n statusOut\n }\n }\n}\n`;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class InvoiceService {\n readonly graphql = inject(GraphqlService);\n readonly http = inject(HttpClient);\n\n list(): Observable<Invoice[]> {\n return this.graphql.graphql({\n query: `query { invoices{ id no title subject customerId vendorId amount dueDate orderIds } }`,\n }).pipe(\n map((data => data?.data?.invoices ?? [])),\n map((invoices) => invoices.map((invoice: any) => plainToInstance(Invoice, {\n ...invoice,\n no: parseInt(invoice.no, 10),\n }))),\n );\n }\n\n getInvoices(): Observable<Invoice[]> {\n return this.graphql.graphql({query}).pipe(\n map((data => data?.data?.invoices ?? [])),\n map((invoices) => invoices.map((invoice: any) => Invoice.from({\n ...invoice,\n no: parseInt(invoice.no, 10),\n dueDate: dayjs(invoice.dueDate),\n orders: invoice.orders.map((order: any) => Order.from({\n ...order,\n startDate: dayjs(order.startDate),\n endDate: dayjs(order.endDate),\n })),\n }))),\n )\n }\n\n async download(invoice: Invoice): Promise<void> {\n return lastValueFrom(this.http.post('/api/invoices/pdf', invoice, {\n responseType: 'blob',\n observe: 'response',\n })).then((res) => {\n const url = URL.createObjectURL(res.body);\n const a = document.createElement('a');\n a.href = url;\n a.download = decodeURIComponent(res.headers.get('content-disposition').split('filename=')[1]);\n a.click();\n URL.revokeObjectURL(url);\n });\n }\n\n async send(invoice: Invoice): Promise<void> {\n return lastValueFrom(this.http.post<void>(`/api/invoices/send`, invoice));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAQA,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Db;MAKY,cAAc,CAAA;AAH3B,IAAA,WAAA,GAAA;AAIW,QAAA,IAAA,CAA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BAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACxED;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
3
|
import { GraphqlService } from '@xxmachina/components/services/graphql';
|
|
4
|
-
import { Order } from '@xxmachina/common/domain
|
|
4
|
+
import { Order } from '@xxmachina/common/domain-invoice/models';
|
|
5
5
|
import { map } from 'rxjs';
|
|
6
6
|
|
|
7
7
|
class OrderService {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xxmachina-components-services-order.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/services/order/order.service.ts","../../../../../packages/@xxmachina/components/src/lib/services/order/xxmachina-components-services-order.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { GraphqlService } from '@xxmachina/components/services/graphql';\nimport { Order } from '@xxmachina/common/domain
|
|
1
|
+
{"version":3,"file":"xxmachina-components-services-order.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/services/order/order.service.ts","../../../../../packages/@xxmachina/components/src/lib/services/order/xxmachina-components-services-order.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { GraphqlService } from '@xxmachina/components/services/graphql';\nimport { Order } from '@xxmachina/common/domain-invoice/models';\nimport { Observable, map } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrderService {\n readonly graphql = inject(GraphqlService);\n\n list(): Observable<Order[]> {\n return this.graphql.graphql({\n query: `query { orders {\n id title eclId customerId vendorId\n contractId invoiceId startDate endDate unitPrice unit\n quantity amountInput amount statusIn statusOut\n } }`,\n }).pipe(\n map((data => data?.data?.orders ?? [])),\n map((orders) => orders.map((order: any) => Order.from({\n ...order,\n }))),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,YAAY,CAAA;AAHzB,IAAA,WAAA,GAAA;AAIW,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC;AAgB1C;IAdC,IAAI,GAAA;AACF,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;AAC1B,YAAA,KAAK,EAAE,CAAA;;;;AAIH,SAAA,CAAA;AACL,SAAA,CAAC,CAAC,IAAI,CACL,GAAG,EAAE,IAAI,IAAI,IAAI,EAAE,IAAI,EAAE,MAAM,IAAI,EAAE,EAAE,EACvC,GAAG,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,KAAU,KAAK,KAAK,CAAC,IAAI,CAAC;AACpD,YAAA,GAAG,KAAK;SACT,CAAC,CAAC,CAAC,CACL;;8GAfQ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cAFX,MAAM,EAAA,CAAA,CAAA;;2FAEP,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
|
-
import { Partner } from '@xxmachina/common/domain
|
|
3
|
+
import { Partner } from '@xxmachina/common/domain-invoice/models';
|
|
4
4
|
import { GraphqlService } from '@xxmachina/components/services/graphql';
|
|
5
5
|
import { map } from 'rxjs';
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xxmachina-components-services-partner.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/services/partner/partner.service.ts","../../../../../packages/@xxmachina/components/src/lib/services/partner/xxmachina-components-services-partner.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { Partner } from '@xxmachina/common/domain
|
|
1
|
+
{"version":3,"file":"xxmachina-components-services-partner.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/services/partner/partner.service.ts","../../../../../packages/@xxmachina/components/src/lib/services/partner/xxmachina-components-services-partner.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { Partner } from '@xxmachina/common/domain-invoice/models';\nimport { GraphqlService } from '@xxmachina/components/services/graphql';\nimport { map } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class PartnerService {\n private graphql = inject(GraphqlService);\n list() {\n return this.graphql.graphql({\n query: `query { partners {\n id\n name\n type\n address\n postalCode\n email\n billingEmail\n billingContact\n phoneNumber\n contact\n suffix\n bankAccount\n } }`\n }).pipe(\n map((data => data?.data?.partners ?? [])),\n map((partners) => partners.map((partner: any) => Partner.from({...partner}))),\n )\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAMa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC;AAsBzC;IArBC,IAAI,GAAA;AACF,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;AAC1B,YAAA,KAAK,EAAE,CAAA;;;;;;;;;;;;;AAaH,SAAA;SACL,CAAC,CAAC,IAAI,CACL,GAAG,EAAE,IAAI,IAAI,IAAI,EAAE,IAAI,EAAE,QAAQ,IAAI,EAAE,EAAE,EACzC,GAAG,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAY,KAAK,OAAO,CAAC,IAAI,CAAC,EAAC,GAAG,OAAO,EAAC,CAAC,CAAC,CAAC,CAC9E;;8GArBQ,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADD,MAAM,EAAA,CAAA,CAAA;;2FACnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACLlC;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { Schedule } from '@xxmachina/common/domain/models
|
|
2
|
+
import { Schedule } from '@xxmachina/common/domain/models';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class PercentagePipe implements PipeTransform {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xxmachina/components",
|
|
3
|
-
"version": "19.0.0-preview.
|
|
3
|
+
"version": "19.0.0-preview.18",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"types": "./pages/command/index.d.ts",
|
|
63
63
|
"default": "./fesm2022/xxmachina-components-pages-command.mjs"
|
|
64
64
|
},
|
|
65
|
-
"./pages/query": {
|
|
66
|
-
"types": "./pages/query/index.d.ts",
|
|
67
|
-
"default": "./fesm2022/xxmachina-components-pages-query.mjs"
|
|
68
|
-
},
|
|
69
65
|
"./routes/commands": {
|
|
70
66
|
"types": "./routes/commands/index.d.ts",
|
|
71
67
|
"default": "./fesm2022/xxmachina-components-routes-commands.mjs"
|
|
72
68
|
},
|
|
69
|
+
"./pages/query": {
|
|
70
|
+
"types": "./pages/query/index.d.ts",
|
|
71
|
+
"default": "./fesm2022/xxmachina-components-pages-query.mjs"
|
|
72
|
+
},
|
|
73
73
|
"./routes/pages": {
|
|
74
74
|
"types": "./routes/pages/index.d.ts",
|
|
75
75
|
"default": "./fesm2022/xxmachina-components-routes-pages.mjs"
|
|
@@ -130,14 +130,14 @@
|
|
|
130
130
|
"types": "./services/link/index.d.ts",
|
|
131
131
|
"default": "./fesm2022/xxmachina-components-services-link.mjs"
|
|
132
132
|
},
|
|
133
|
-
"./services/openapi": {
|
|
134
|
-
"types": "./services/openapi/index.d.ts",
|
|
135
|
-
"default": "./fesm2022/xxmachina-components-services-openapi.mjs"
|
|
136
|
-
},
|
|
137
133
|
"./services/order": {
|
|
138
134
|
"types": "./services/order/index.d.ts",
|
|
139
135
|
"default": "./fesm2022/xxmachina-components-services-order.mjs"
|
|
140
136
|
},
|
|
137
|
+
"./services/openapi": {
|
|
138
|
+
"types": "./services/openapi/index.d.ts",
|
|
139
|
+
"default": "./fesm2022/xxmachina-components-services-openapi.mjs"
|
|
140
|
+
},
|
|
141
141
|
"./services/partner": {
|
|
142
142
|
"types": "./services/partner/index.d.ts",
|
|
143
143
|
"default": "./fesm2022/xxmachina-components-services-partner.mjs"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphqlService } from '@xxmachina/components/services/graphql';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Invoice } from '@xxmachina/common/domain
|
|
3
|
+
import { Invoice } from '@xxmachina/common/domain-invoice/models';
|
|
4
4
|
import { HttpClient } from '@angular/common/http';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class InvoiceService {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphqlService } from '@xxmachina/components/services/graphql';
|
|
2
|
-
import { Order } from '@xxmachina/common/domain
|
|
2
|
+
import { Order } from '@xxmachina/common/domain-invoice/models';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class OrderService {
|