@xxmachina/components 19.0.0-preview.12 → 19.0.0-preview.13
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-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-commands.mjs +1 -1
- package/fesm2022/xxmachina-components-routes-commands.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/package.json +1 -1
|
@@ -12,7 +12,7 @@ class WeeklyHeaderMolecule {
|
|
|
12
12
|
<div class="day-container" *ngFor="let day of ['日', '月', '火', '水', '木', '金', '土']">
|
|
13
13
|
<span>{{ day }}</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-xS55m9cz: var(--primary-color);--secondary-color: #B0B0B0;--secondary-color-SCOPED-IN-xS55m9cz: var(--secondary-color)}:host{display:grid;width:100%;grid-template-columns:repeat(7,1fr);background-color:var(--primary-color-SCOPED-IN-xS55m9cz)}: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-xS55m9cz: var(--primary-color);--secondary-color: #B0B0B0;--secondary-color-SCOPED-IN-xS55m9cz: var(--secondary-color)}:host{display:grid;width:100%;grid-template-columns:repeat(7,1fr);background-color:var(--primary-color-SCOPED-IN-xS55m9cz)}: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-lYNBlrjN: var(--row);--row-num: 0;--row-num-SCOPED-IN-lYNBlrjN: var(--row-num);--border-color: #9E9E9E;--border-color-SCOPED-IN-lYNBlrjN: var(--border-color);--primary-color: #404040;--primary-color-SCOPED-IN-lYNBlrjN: var(--primary-color);--secondary-color: #B0B0B0;--secondary-color-SCOPED-IN-lYNBlrjN: 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-lYNBlrjN);grid-gap:1px;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(var(--row-num-SCOPED-IN-lYNBlrjN),var(--row-SCOPED-IN-lYNBlrjN));box-sizing:border-box;background-color:var(--border-color-SCOPED-IN-lYNBlrjN)}:host .calendar.contents molecules-daily-cell{--width: calc((var(--width) - 8px) / 7);--height: var(--row-SCOPED-IN-lYNBlrjN);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-lYNBlrjN: var(--row);--row-num: 0;--row-num-SCOPED-IN-lYNBlrjN: var(--row-num);--border-color: #9E9E9E;--border-color-SCOPED-IN-lYNBlrjN: var(--border-color);--primary-color: #404040;--primary-color-SCOPED-IN-lYNBlrjN: var(--primary-color);--secondary-color: #B0B0B0;--secondary-color-SCOPED-IN-lYNBlrjN: 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-lYNBlrjN);grid-gap:1px;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(var(--row-num-SCOPED-IN-lYNBlrjN),var(--row-SCOPED-IN-lYNBlrjN));box-sizing:border-box;background-color:var(--border-color-SCOPED-IN-lYNBlrjN)}:host .calendar.contents molecules-daily-cell{--width: calc((var(--width) - 8px) / 7);--height: var(--row-SCOPED-IN-lYNBlrjN);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-VO0R: var(--page-width-lv1)}:host .template{--first-content-height: 0px;width:var(--page-width-lv1-SCOPED-IN-command-VO0R)}: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-VO0R: var(--page-width-lv1)}:host .template{--first-content-height: 0px;width:var(--page-width-lv1-SCOPED-IN-command-VO0R)}: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-SeGs: 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-SeGs: 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
|
/**
|
|
@@ -5,7 +5,7 @@ import { provideDataAccessor } from '@ng-atomic/common/pipes/data-accessor';
|
|
|
5
5
|
import { provideLangMap } from '@ng-atomic/common/pipes/domain';
|
|
6
6
|
import { IndexPageStore, IndexPage } from '@ng-atomic/components/pages/_index';
|
|
7
7
|
import { provideEffect, applyToInput } from '@ng-atomic/core';
|
|
8
|
-
import { getLangMap } from '@nx-ddd/common/domain
|
|
8
|
+
import { getLangMap } from '@nx-ddd/common/domain';
|
|
9
9
|
import { get } from 'lodash-es';
|
|
10
10
|
|
|
11
11
|
var ActionId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xxmachina-components-routes-commands.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/routes/commands/commands.routes.ts","../../../../../packages/@xxmachina/components/src/lib/routes/commands/xxmachina-components-routes-commands.ts"],"sourcesContent":["import { effect, inject } from '@angular/core';\nimport { Routes } from '@angular/router';\nimport { WebAPiRequestCommand } from '@xxmachina/common/domain/models';\nimport { CommandService } from '@xxmachina/components/services/command';\nimport { provideDataAccessor } from '@ng-atomic/common/pipes/data-accessor';\nimport { provideLangMap } from '@ng-atomic/common/pipes/domain';\nimport { IndexPage, IndexPageStore } from '@ng-atomic/components/pages/_index';\nimport { applyToInput, provideEffect } from '@ng-atomic/core';\nimport { getLangMap } from '@nx-ddd/common/domain
|
|
1
|
+
{"version":3,"file":"xxmachina-components-routes-commands.mjs","sources":["../../../../../packages/@xxmachina/components/src/lib/routes/commands/commands.routes.ts","../../../../../packages/@xxmachina/components/src/lib/routes/commands/xxmachina-components-routes-commands.ts"],"sourcesContent":["import { effect, inject } from '@angular/core';\nimport { Routes } from '@angular/router';\nimport { WebAPiRequestCommand } from '@xxmachina/common/domain/models';\nimport { CommandService } from '@xxmachina/components/services/command';\nimport { provideDataAccessor } from '@ng-atomic/common/pipes/data-accessor';\nimport { provideLangMap } from '@ng-atomic/common/pipes/domain';\nimport { IndexPage, IndexPageStore } from '@ng-atomic/components/pages/_index';\nimport { applyToInput, provideEffect } from '@ng-atomic/core';\nimport { getLangMap } from '@nx-ddd/common/domain';\nimport { get } from 'lodash-es';\n\nenum ActionId {\n\tREFRESH = 'refresh',\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(WebAPiRequestCommand, {\n\t\t\t\tno: 'No',\n\t\t\t\tid: 'ID',\n\t\t\t\ttitle: 'コマンド名',\n\t\t\t\tmethod: 'メソッド',\n\t\t\t\tendpoint: 'エンドポイント',\n\t\t\t\tdescription: '説明',\n\t\t\t\tauthorization: '認証',\n\t\t\t\tgroups: '認可(グループ)'\n\t\t\t})),\n\t\t\tprovideDataAccessor(() => (item, key, index) => {\n\t\t\t\tswitch (key) {\n\t\t\t\t\tcase 'no': return item['index'] + 1;\n\t\t\t\t\tcase 'title': return get(item, 'name');\n\t\t\t\t\tcase 'description': return get(item, ['description']);\n\t\t\t\t\tcase 'method': return get(item, ['webApiRequest', 'method']);\n\t\t\t\t\tcase 'endpoint': return get(item, ['webApiRequest', 'path']);\n\t\t\t\t\tcase 'authorization': return '◯';\n\t\t\t\t\tcase 'groups': {\n\t\t\t\t\t\tconst securities = get(item, ['webApiRequest', 'security']) as {groups: string[]}[];\n\t\t\t\t\t\tconst groupIds = securities.map((s) => s.groups).flat()\n\t\t\t\t\t\t\t.map(id => id.startsWith('2ac') ? '管理者' : '記入者');\n\t\t\t\t\t\treturn groupIds.join(', ');\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\ttype: 'list',\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\t// width: 'var(--page-width-lv3)',\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{ id: ActionId.REFRESH, name: '更新', icon: 'refresh' },\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t}),\n\t\t\tIndexPageStore.Config.provide(() => (config) => ({\n\t\t\t\t...config,\n\t\t\t\ttype: 'table',\n\t\t\t\tstyle: {\n\t\t\t\t\t...config.style,\n\t\t\t\t\twidth: 'var(--page-width-lv3)'\n\t\t\t\t}\n\t\t\t})),\n\t\t\tIndexPageStore.provideColumnsInitializer(() => [\n\t\t\t\t'no',\n\t\t\t\t'id',\n\t\t\t\t'title',\n\t\t\t\t'endpoint',\n\t\t\t\t'method',\n\t\t\t\t'description',\n\t\t\t\t'authorization',\n\t\t\t\t'groups',\n\t\t\t\t'__actions',\n\t\t\t]),\n\t\t\tIndexPageStore.Initializer.provide((store) => {\n\t\t\t\tconst service = inject(CommandService);\n\t\t\t\teffect(() => {\n\t\t\t\t\tapplyToInput(store, 'items', service.commands().map((command, i) => ({ ...command, index: i })));\n\t\t\t\t});\n\t\t\t}),\n\t\t\tprovideEffect(ActionId.REFRESH, () => {\n\t\t\t\tconst commandService = inject(CommandService);\n\t\t\t\treturn () => { commandService.refresh(); };\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":";;;;;;;;;;AAWA,IAAK,QAEJ;AAFD,CAAA,UAAK,QAAQ,EAAA;AACZ,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACpB,CAAC,EAFI,QAAQ,KAAR,QAAQ,GAEZ,EAAA,CAAA,CAAA;AAED,sBAAuB;AACtB,IAAA;AACC,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,SAAS;AACpB,QAAA,YAAY,EAAE,MAAM,OAAO,kEAAsB,CAAC;AAClD,QAAA,SAAS,EAAE;AACV,YAAA,cAAc,CAAC,MAAM,UAAU,CAAC,oBAAoB,EAAE;AACrD,gBAAA,EAAE,EAAE,IAAI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,QAAQ,CAAC,OAAO,EAAE,MAAK;AACpC,gBAAA,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;gBAC7C,OAAO,MAAK,EAAG,cAAc,CAAC,OAAO,EAAE,CAAC,EAAE;AAC3C,aAAC,CAAC;AACF;AACD;CACD;;AC9FD;;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/infrastructure/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
|
|
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/infrastructure/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.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];"],"names":[],"mappings":";;;;;;;;;;AAgBA,sBAAuB;AACtB,IAAA;AACC,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,QAAQ;;AAEnB,QAAA,SAAS,EAAE;AACV,YAAA,gBAAgB,CAAC,MAAM,MAAM,CAAC;YAC9B,mBAAmB,CAAC,YAAY,CAAC;YACjC,aAAa,CAAC,cAAc,EAAE;YAC9B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AM,UAAU,GAAG,gBAAgB,CAAC,YAAY,CAAC;AACjD,gBAAA,OAAO,MAAK;oBACX,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;AACxC,oBAAA,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC;AAC9B,oBAAA,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,MAAK;wBACtB,OAAO,MAAM,CAAC,MAAM,CAAC;4BACpB,EAAE,EAAE,UAAU,EAAE;AAChB,4BAAA,SAAS,EAAE,SAAS;4BACpB,IAAI,EAAE,KAAK,CAAC,IAAI;4BAChB,IAAI,EAAE,KAAK,CAAC,IAAI;4BAChB,OAAO,EAAE,KAAK,CAAC,OAAO;4BACtB,OAAO,EAAE,KAAK,CAAC,OAAO;AACtB,4BAAA,SAAS,EAAE,SAAS;AACpB,4BAAA,SAAS,EAAE,SAAS;AACpB,yBAAA,CAAC,CAAC,IAAI,CAAC,MAAK;AACZ,4BAAA,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC;AACjC,yBAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAI;AAClB,4BAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AACpB,4BAAA,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC;AACpC,yBAAC,CAAC;AACH,qBAAC,CAAC;AACH,iBAAC;AACF,aAAC,CAAC;AACF;AACD;CACD;;;;"}
|
|
@@ -8,7 +8,7 @@ import { injectAll } from '@ng-atomic/common/stores/entities';
|
|
|
8
8
|
import { injectIndexForm, buildColumns } from '@ng-atomic/components/organisms/table';
|
|
9
9
|
import { IndexPageStore, IndexPage } from '@ng-atomic/components/pages/_index';
|
|
10
10
|
import { provideEffect, applyToInput } from '@ng-atomic/core';
|
|
11
|
-
import { getLangMap } from '@nx-ddd/common/domain
|
|
11
|
+
import { getLangMap } from '@nx-ddd/common/domain';
|
|
12
12
|
import { plainToInstanceWithValid } from '@nx-ddd/core';
|
|
13
13
|
|
|
14
14
|
var ActionId;
|
|
@@ -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/infrastructure/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
|
|
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/infrastructure/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,CAAC,IAAI,CAAC;AAC3C,wBAAA;AACC,4BAAA,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