@rolatech/angular-inventory 17.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +7 -0
  2. package/esm2022/index.mjs +2 -0
  3. package/esm2022/lib/components/inventory-content/inventory-content.component.mjs +12 -0
  4. package/esm2022/lib/components/inventory-layout/inventory-layout.component.mjs +14 -0
  5. package/esm2022/lib/components/inventory-location-add/inventory-location-add.component.mjs +70 -0
  6. package/esm2022/lib/components/inventory-location-item/inventory-location-item.component.mjs +68 -0
  7. package/esm2022/lib/components/inventory-location-map/inventory-location-map.component.mjs +113 -0
  8. package/esm2022/lib/components/inventory-product-item/inventory-product-item.component.mjs +17 -0
  9. package/esm2022/lib/interfaces/inventory-location.mjs +2 -0
  10. package/esm2022/lib/pages/inventory/inventory.component.mjs +12 -0
  11. package/esm2022/lib/pages/inventory-location/inventory-location.component.mjs +36 -0
  12. package/esm2022/lib/pages/inventory-location-detail/inventory-location-detail.component.mjs +57 -0
  13. package/esm2022/lib/pages/inventory-product/inventory-product.component.mjs +42 -0
  14. package/esm2022/lib/pages/inventory.routes.mjs +30 -0
  15. package/esm2022/rolatech-angular-inventory.mjs +5 -0
  16. package/fesm2022/rolatech-angular-inventory-inventory-content.component-EJCf2GA1.mjs +15 -0
  17. package/fesm2022/rolatech-angular-inventory-inventory-content.component-EJCf2GA1.mjs.map +1 -0
  18. package/fesm2022/rolatech-angular-inventory-inventory-location-add.component-D4iDeA1P.mjs +73 -0
  19. package/fesm2022/rolatech-angular-inventory-inventory-location-add.component-D4iDeA1P.mjs.map +1 -0
  20. package/fesm2022/rolatech-angular-inventory-inventory-location-detail.component-DnLIaY7g.mjs +124 -0
  21. package/fesm2022/rolatech-angular-inventory-inventory-location-detail.component-DnLIaY7g.mjs.map +1 -0
  22. package/fesm2022/rolatech-angular-inventory-inventory-location-map.component-BOXpZPhp.mjs +116 -0
  23. package/fesm2022/rolatech-angular-inventory-inventory-location-map.component-BOXpZPhp.mjs.map +1 -0
  24. package/fesm2022/rolatech-angular-inventory-inventory-location.component-Flz7eXKs.mjs +39 -0
  25. package/fesm2022/rolatech-angular-inventory-inventory-location.component-Flz7eXKs.mjs.map +1 -0
  26. package/fesm2022/rolatech-angular-inventory-inventory-product.component-BpcOSm7L.mjs +58 -0
  27. package/fesm2022/rolatech-angular-inventory-inventory-product.component-BpcOSm7L.mjs.map +1 -0
  28. package/fesm2022/rolatech-angular-inventory-inventory.component-g02tvIZb.mjs +15 -0
  29. package/fesm2022/rolatech-angular-inventory-inventory.component-g02tvIZb.mjs.map +1 -0
  30. package/fesm2022/rolatech-angular-inventory.mjs +50 -0
  31. package/fesm2022/rolatech-angular-inventory.mjs.map +1 -0
  32. package/index.d.ts +1 -0
  33. package/lib/components/inventory-content/inventory-content.component.d.ts +5 -0
  34. package/lib/components/inventory-layout/inventory-layout.component.d.ts +5 -0
  35. package/lib/components/inventory-location-add/inventory-location-add.component.d.ts +13 -0
  36. package/lib/components/inventory-location-item/inventory-location-item.component.d.ts +14 -0
  37. package/lib/components/inventory-location-map/inventory-location-map.component.d.ts +29 -0
  38. package/lib/components/inventory-product-item/inventory-product-item.component.d.ts +14 -0
  39. package/lib/interfaces/inventory-location.d.ts +27 -0
  40. package/lib/pages/inventory/inventory.component.d.ts +5 -0
  41. package/lib/pages/inventory-location/inventory-location.component.d.ts +13 -0
  42. package/lib/pages/inventory-location-detail/inventory-location-detail.component.d.ts +15 -0
  43. package/lib/pages/inventory-product/inventory-product.component.d.ts +14 -0
  44. package/lib/pages/inventory.routes.d.ts +2 -0
  45. package/package.json +25 -0
  46. package/themes/_default.scss +1 -0
@@ -0,0 +1,116 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, Inject } from '@angular/core';
3
+ import * as i1 from '@angular/material/dialog';
4
+ import { MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog';
5
+ import * as i1$1 from '@angular/forms';
6
+ import { FormsModule } from '@angular/forms';
7
+ import * as i5 from '@angular/material/button';
8
+ import { MatButtonModule } from '@angular/material/button';
9
+ import * as i4 from '@angular/material/core';
10
+ import { MatOptionModule } from '@angular/material/core';
11
+ import * as i2 from '@angular/material/form-field';
12
+ import { MatFormFieldModule } from '@angular/material/form-field';
13
+ import * as i7 from '@angular/material/icon';
14
+ import { MatIconModule } from '@angular/material/icon';
15
+ import * as i6 from '@angular/material/input';
16
+ import { MatInputModule } from '@angular/material/input';
17
+ import * as i3 from '@angular/material/select';
18
+ import { MatSelectModule } from '@angular/material/select';
19
+
20
+ class InventoryLocationMapComponent {
21
+ constructor(dialogRef, data) {
22
+ this.dialogRef = dialogRef;
23
+ this.data = data;
24
+ this.infoWindowList = Array(10);
25
+ this.cities = ['北京', '上海'];
26
+ this.region = '北京';
27
+ }
28
+ ngOnInit() {
29
+ this.init();
30
+ }
31
+ init() {
32
+ const map = new window.TMap.Map(document.getElementById('map-container'), {
33
+ // 地图的中心地理坐标。
34
+ center: new window.TMap.LatLng(40.0402718, 116.2735831),
35
+ resizeEnable: true,
36
+ zoom: 14,
37
+ });
38
+ const markers = new window.TMap.MultiMarker({
39
+ map: map,
40
+ geometries: [],
41
+ });
42
+ this.map = map;
43
+ this.markers = markers;
44
+ }
45
+ onSearchChange(event) {
46
+ const value = event.target.value;
47
+ const suggest = new window.TMap.service.Suggestion({
48
+ pageSize: 15, // 返回结果每页条目数
49
+ region: this.region, // 限制城市范围
50
+ regionFix: true, // 搜索无结果时是否固定在当前城市
51
+ });
52
+ if (value) {
53
+ suggest
54
+ .getSuggestions({ keyword: value, location: this.map.getCenter() })
55
+ .then((result) => {
56
+ this.lists = result.data;
57
+ })
58
+ .catch((error) => { });
59
+ }
60
+ }
61
+ setLocation(index) {
62
+ this.infoWindowList.forEach((infoWindow) => {
63
+ infoWindow.close();
64
+ });
65
+ this.infoWindowList.length = 0;
66
+ const item = this.lists[index];
67
+ this.selectedLocation = item;
68
+ this.lists = [];
69
+ this.markers.setGeometries([]);
70
+ this.markers.updateGeometries([
71
+ {
72
+ id: '0', // 点标注数据数组
73
+ position: item.location,
74
+ },
75
+ ]);
76
+ const infoWindow = new window.TMap.InfoWindow({
77
+ map: this.map,
78
+ position: item.location,
79
+ content: `<h3>${item.title}</h3><p>地址:${item.address}</p>`,
80
+ offset: { x: 0, y: -50 },
81
+ });
82
+ this.infoWindowList.push(infoWindow);
83
+ this.map.setCenter(item.location);
84
+ this.markers.on('click', (e) => {
85
+ this.infoWindowList[Number(e.geometry.id)].open();
86
+ });
87
+ }
88
+ onNoClick() {
89
+ this.dialogRef.close();
90
+ }
91
+ selectionChange(event) { }
92
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationMapComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
93
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: InventoryLocationMapComponent, isStandalone: true, selector: "rolatech-inventory-location-map", ngImport: i0, template: "@if (data.title) {\n <h2 mat-dialog-title>{{ data.title }}</h2>\n}\n<div mat-dialog-content>\n <div class=\"h-full\">\n <div class=\"relative h-full\">\n <div id=\"map-container\" class=\"h-full\"></div>\n <div class=\"absolute bg-white z-[9999] top-[30px] left-[30px]\">\n <div class=\"flex gap-3 px-3 pt-3\">\n <mat-form-field appearance=\"fill\" [style.width.px]=\"180\">\n <mat-label>\u57CE\u5E02</mat-label>\n <mat-select #select=\"matSelect\" [(ngModel)]=\"region\" (selectionChange)=\"selectionChange($event)\">\n @for (city of cities; track city) {\n <mat-option [value]=\"city\">\n {{ city }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <input matInput placeholder=\"\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22\" (input)=\"onSearchChange($event)\" />\n </mat-form-field>\n </div>\n <div class=\"max-h-[320px] overflow-scroll pb-3 bg-white\">\n @for (item of lists; track item; let index = $index) {\n <div (click)=\"setLocation(index)\" class=\"cursor-pointer\">\n <div class=\"p-3 flex items-center gap-2 hover:bg-[--rt-raised-background]\">\n <mat-icon fontIcon=\"location_on\"></mat-icon>\n <div class=\"text-sm font-thin\">{{ item.title }}</div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n</div>\n<div mat-dialog-actions align=\"end\">\n <button mat-button mat-dialog-close>\u53D6\u6D88</button>\n <button mat-flat-button [mat-dialog-close]=\"selectedLocation\" cdkFocusInitial>\u786E\u5B9A</button>\n</div>\n", styles: ["mat-form-field{width:100%;margin-bottom:-1.25em}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] }); }
94
+ }
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationMapComponent, decorators: [{
96
+ type: Component,
97
+ args: [{ selector: 'rolatech-inventory-location-map', standalone: true, imports: [
98
+ MatDialogTitle,
99
+ MatDialogContent,
100
+ MatFormFieldModule,
101
+ MatSelectModule,
102
+ FormsModule,
103
+ MatOptionModule,
104
+ MatInputModule,
105
+ MatIconModule,
106
+ MatDialogActions,
107
+ MatButtonModule,
108
+ MatDialogClose,
109
+ ], template: "@if (data.title) {\n <h2 mat-dialog-title>{{ data.title }}</h2>\n}\n<div mat-dialog-content>\n <div class=\"h-full\">\n <div class=\"relative h-full\">\n <div id=\"map-container\" class=\"h-full\"></div>\n <div class=\"absolute bg-white z-[9999] top-[30px] left-[30px]\">\n <div class=\"flex gap-3 px-3 pt-3\">\n <mat-form-field appearance=\"fill\" [style.width.px]=\"180\">\n <mat-label>\u57CE\u5E02</mat-label>\n <mat-select #select=\"matSelect\" [(ngModel)]=\"region\" (selectionChange)=\"selectionChange($event)\">\n @for (city of cities; track city) {\n <mat-option [value]=\"city\">\n {{ city }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <input matInput placeholder=\"\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22\" (input)=\"onSearchChange($event)\" />\n </mat-form-field>\n </div>\n <div class=\"max-h-[320px] overflow-scroll pb-3 bg-white\">\n @for (item of lists; track item; let index = $index) {\n <div (click)=\"setLocation(index)\" class=\"cursor-pointer\">\n <div class=\"p-3 flex items-center gap-2 hover:bg-[--rt-raised-background]\">\n <mat-icon fontIcon=\"location_on\"></mat-icon>\n <div class=\"text-sm font-thin\">{{ item.title }}</div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n</div>\n<div mat-dialog-actions align=\"end\">\n <button mat-button mat-dialog-close>\u53D6\u6D88</button>\n <button mat-flat-button [mat-dialog-close]=\"selectedLocation\" cdkFocusInitial>\u786E\u5B9A</button>\n</div>\n", styles: ["mat-form-field{width:100%;margin-bottom:-1.25em}\n"] }]
110
+ }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
111
+ type: Inject,
112
+ args: [MAT_DIALOG_DATA]
113
+ }] }] });
114
+
115
+ export { InventoryLocationMapComponent as I };
116
+ //# sourceMappingURL=rolatech-angular-inventory-inventory-location-map.component-BOXpZPhp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-inventory-inventory-location-map.component-BOXpZPhp.mjs","sources":["../../../../libs/angular-inventory/src/lib/components/inventory-location-map/inventory-location-map.component.ts","../../../../libs/angular-inventory/src/lib/components/inventory-location-map/inventory-location-map.component.html"],"sourcesContent":["import { Component, Inject, OnInit } from '@angular/core';\nimport {\n MatDialogRef,\n MAT_DIALOG_DATA,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogTitle,\n} from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatOptionModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\n\ndeclare global {\n interface Window {\n qq: any;\n TMap: any;\n }\n}\n\n@Component({\n selector: 'rolatech-inventory-location-map',\n standalone: true,\n imports: [\n MatDialogTitle,\n MatDialogContent,\n MatFormFieldModule,\n MatSelectModule,\n FormsModule,\n MatOptionModule,\n MatInputModule,\n MatIconModule,\n MatDialogActions,\n MatButtonModule,\n MatDialogClose,\n ],\n templateUrl: './inventory-location-map.component.html',\n styleUrl: './inventory-location-map.component.scss',\n})\nexport class InventoryLocationMapComponent implements OnInit {\n map: any;\n markers: any;\n lists: any;\n infoWindowList = Array(10);\n selectedLocation: any;\n cities: string[] = ['北京', '上海'];\n region = '北京';\n constructor(\n public dialogRef: MatDialogRef<InventoryLocationMapComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n ) {}\n\n ngOnInit(): void {\n this.init();\n }\n\n init() {\n const map = new window.TMap.Map(document.getElementById('map-container'), {\n // 地图的中心地理坐标。\n center: new window.TMap.LatLng(40.0402718, 116.2735831),\n resizeEnable: true,\n zoom: 14,\n });\n const markers = new window.TMap.MultiMarker({\n map: map,\n geometries: [],\n });\n this.map = map;\n this.markers = markers;\n }\n onSearchChange(event: any) {\n const value = event.target.value;\n const suggest = new window.TMap.service.Suggestion({\n pageSize: 15, // 返回结果每页条目数\n region: this.region, // 限制城市范围\n regionFix: true, // 搜索无结果时是否固定在当前城市\n });\n if (value) {\n suggest\n .getSuggestions({ keyword: value, location: this.map.getCenter() })\n .then((result: any) => {\n this.lists = result.data;\n })\n .catch((error: any) => {});\n }\n }\n setLocation(index: any) {\n this.infoWindowList.forEach((infoWindow) => {\n infoWindow.close();\n });\n this.infoWindowList.length = 0;\n const item = this.lists[index];\n this.selectedLocation = item;\n this.lists = [];\n this.markers.setGeometries([]);\n this.markers.updateGeometries([\n {\n id: '0', // 点标注数据数组\n position: item.location,\n },\n ]);\n\n const infoWindow = new window.TMap.InfoWindow({\n map: this.map,\n position: item.location,\n content: `<h3>${item.title}</h3><p>地址:${item.address}</p>`,\n offset: { x: 0, y: -50 },\n });\n this.infoWindowList.push(infoWindow);\n this.map.setCenter(item.location);\n this.markers.on('click', (e: any) => {\n this.infoWindowList[Number(e.geometry.id)].open();\n });\n }\n onNoClick(): void {\n this.dialogRef.close();\n }\n selectionChange(event: any) {}\n}\n","@if (data.title) {\n <h2 mat-dialog-title>{{ data.title }}</h2>\n}\n<div mat-dialog-content>\n <div class=\"h-full\">\n <div class=\"relative h-full\">\n <div id=\"map-container\" class=\"h-full\"></div>\n <div class=\"absolute bg-white z-[9999] top-[30px] left-[30px]\">\n <div class=\"flex gap-3 px-3 pt-3\">\n <mat-form-field appearance=\"fill\" [style.width.px]=\"180\">\n <mat-label>城市</mat-label>\n <mat-select #select=\"matSelect\" [(ngModel)]=\"region\" (selectionChange)=\"selectionChange($event)\">\n @for (city of cities; track city) {\n <mat-option [value]=\"city\">\n {{ city }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <input matInput placeholder=\"输入关键字搜索\" (input)=\"onSearchChange($event)\" />\n </mat-form-field>\n </div>\n <div class=\"max-h-[320px] overflow-scroll pb-3 bg-white\">\n @for (item of lists; track item; let index = $index) {\n <div (click)=\"setLocation(index)\" class=\"cursor-pointer\">\n <div class=\"p-3 flex items-center gap-2 hover:bg-[--rt-raised-background]\">\n <mat-icon fontIcon=\"location_on\"></mat-icon>\n <div class=\"text-sm font-thin\">{{ item.title }}</div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n</div>\n<div mat-dialog-actions align=\"end\">\n <button mat-button mat-dialog-close>取消</button>\n <button mat-flat-button [mat-dialog-close]=\"selectedLocation\" cdkFocusInitial>确定</button>\n</div>\n"],"names":["i5","i8"],"mappings":";;;;;;;;;;;;;;;;;;;MA2Ca,6BAA6B,CAAA;IAQxC,WACS,CAAA,SAAsD,EAC7B,IAAS,EAAA;QADlC,IAAS,CAAA,SAAA,GAAT,SAAS,CAA6C;QAC7B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAK;AAN3C,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC;AAE3B,QAAA,IAAA,CAAA,MAAM,GAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAChC,IAAM,CAAA,MAAA,GAAG,IAAI,CAAC;KAIV;IAEJ,QAAQ,GAAA;QACN,IAAI,CAAC,IAAI,EAAE,CAAC;KACb;IAED,IAAI,GAAA;AACF,QAAA,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE;;YAExE,MAAM,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC;AACvD,YAAA,YAAY,EAAE,IAAI;AAClB,YAAA,IAAI,EAAE,EAAE;AACT,SAAA,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;AAC1C,YAAA,GAAG,EAAE,GAAG;AACR,YAAA,UAAU,EAAE,EAAE;AACf,SAAA,CAAC,CAAC;AACH,QAAA,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;AACf,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KACxB;AACD,IAAA,cAAc,CAAC,KAAU,EAAA;AACvB,QAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QACjC,MAAM,OAAO,GAAG,IAAI,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A,gBAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKL,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAnBzC,SAAS;+BACE,iCAAiC,EAAA,UAAA,EAC/B,IAAI,EACP,OAAA,EAAA;wBACP,cAAc;wBACd,gBAAgB;wBAChB,kBAAkB;wBAClB,eAAe;wBACf,WAAW;wBACX,eAAe;wBACf,cAAc;wBACd,aAAa;wBACb,gBAAgB;wBAChB,eAAe;wBACf,cAAc;AACf,qBAAA,EAAA,QAAA,EAAA,+uDAAA,EAAA,MAAA,EAAA,CAAA,oDAAA,CAAA,EAAA,CAAA;;0BAcE,MAAM;2BAAC,eAAe,CAAA;;;;;"}
@@ -0,0 +1,39 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Component } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { ToolbarComponent } from '@rolatech/angular-components';
5
+ import { I as InventoryContentComponent } from './rolatech-angular-inventory-inventory-content.component-EJCf2GA1.mjs';
6
+ import { InventoryService } from '@rolatech/angular-services';
7
+ import { RouterLink } from '@angular/router';
8
+ import { MatIcon } from '@angular/material/icon';
9
+ import * as i5 from '@angular/material/button';
10
+ import { MatButtonModule } from '@angular/material/button';
11
+
12
+ class InventoryLocationComponent {
13
+ constructor() {
14
+ this.inventoryService = inject(InventoryService);
15
+ this.locations = [];
16
+ }
17
+ ngOnInit() {
18
+ this.findLocations();
19
+ }
20
+ findLocations() {
21
+ this.inventoryService.findLocations({}).subscribe({
22
+ next: (res) => {
23
+ this.locations = res.data;
24
+ },
25
+ });
26
+ }
27
+ addLocation(data) {
28
+ this.inventoryService.addLocation(data);
29
+ }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
31
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: InventoryLocationComponent, isStandalone: true, selector: "rolatech-inventory-location", ngImport: i0, template: "<rolatech-inventory-content>\n <rolatech-toolbar title=\"\u4ED3\u5E93\u8BBE\u7F6E\" class=\"hidden md:block\" divider>\n <div class=\"flex items-center gap-2\">\n <button mat-stroked-button routerLink=\"./add\">\n <mat-icon>add</mat-icon>\n \u521B\u5EFA\u4ED3\u5E93\n </button>\n </div>\n </rolatech-toolbar>\n <div class=\"divide-y\">\n @for (item of locations; track $index) {\n <div [routerLink]=\"item.id\" class=\"flex items-center px-1 h-11 hover:cursor-pointer hover:bg-[--rt-raised-background]\">\n <div class=\"font-bold\">{{ item.name }}</div>\n <div></div>\n </div>\n }\n </div>\n</rolatech-inventory-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: InventoryContentComponent, selector: "rolatech-inventory-content" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLocationComponent, decorators: [{
34
+ type: Component,
35
+ args: [{ selector: 'rolatech-inventory-location', standalone: true, imports: [CommonModule, ToolbarComponent, InventoryContentComponent, RouterLink, MatButtonModule, MatIcon], template: "<rolatech-inventory-content>\n <rolatech-toolbar title=\"\u4ED3\u5E93\u8BBE\u7F6E\" class=\"hidden md:block\" divider>\n <div class=\"flex items-center gap-2\">\n <button mat-stroked-button routerLink=\"./add\">\n <mat-icon>add</mat-icon>\n \u521B\u5EFA\u4ED3\u5E93\n </button>\n </div>\n </rolatech-toolbar>\n <div class=\"divide-y\">\n @for (item of locations; track $index) {\n <div [routerLink]=\"item.id\" class=\"flex items-center px-1 h-11 hover:cursor-pointer hover:bg-[--rt-raised-background]\">\n <div class=\"font-bold\">{{ item.name }}</div>\n <div></div>\n </div>\n }\n </div>\n</rolatech-inventory-content>\n" }]
36
+ }] });
37
+
38
+ export { InventoryLocationComponent };
39
+ //# sourceMappingURL=rolatech-angular-inventory-inventory-location.component-Flz7eXKs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-inventory-inventory-location.component-Flz7eXKs.mjs","sources":["../../../../libs/angular-inventory/src/lib/pages/inventory-location/inventory-location.component.ts","../../../../libs/angular-inventory/src/lib/pages/inventory-location/inventory-location.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ToolbarComponent } from '@rolatech/angular-components';\nimport { InventoryContentComponent } from '../../components/inventory-content/inventory-content.component';\nimport { InventoryService } from '@rolatech/angular-services';\nimport { Location } from '../../interfaces/inventory-location';\nimport { RouterLink } from '@angular/router';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n selector: 'rolatech-inventory-location',\n standalone: true,\n imports: [CommonModule, ToolbarComponent, InventoryContentComponent, RouterLink, MatButtonModule, MatIcon],\n templateUrl: './inventory-location.component.html',\n styleUrl: './inventory-location.component.scss',\n})\nexport class InventoryLocationComponent implements OnInit {\n inventoryService = inject(InventoryService);\n locations: Location[] = [];\n\n ngOnInit(): void {\n this.findLocations();\n }\n findLocations() {\n this.inventoryService.findLocations({}).subscribe({\n next: (res) => {\n this.locations = res.data;\n },\n });\n }\n addLocation(data) {\n this.inventoryService.addLocation(data);\n }\n}\n","<rolatech-inventory-content>\n <rolatech-toolbar title=\"仓库设置\" class=\"hidden md:block\" divider>\n <div class=\"flex items-center gap-2\">\n <button mat-stroked-button routerLink=\"./add\">\n <mat-icon>add</mat-icon>\n 创建仓库\n </button>\n </div>\n </rolatech-toolbar>\n <div class=\"divide-y\">\n @for (item of locations; track $index) {\n <div [routerLink]=\"item.id\" class=\"flex items-center px-1 h-11 hover:cursor-pointer hover:bg-[--rt-raised-background]\">\n <div class=\"font-bold\">{{ item.name }}</div>\n <div></div>\n </div>\n }\n </div>\n</rolatech-inventory-content>\n"],"names":[],"mappings":";;;;;;;;;;;MAiBa,0BAA0B,CAAA;AAPvC,IAAA,WAAA,GAAA;AAQE,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC5C,IAAS,CAAA,SAAA,GAAe,EAAE,CAAC;AAe5B,KAAA;IAbC,QAAQ,GAAA;QACN,IAAI,CAAC,aAAa,EAAE,CAAC;KACtB;IACD,aAAa,GAAA;QACX,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC;AAChD,YAAA,IAAI,EAAE,CAAC,GAAG,KAAI;AACZ,gBAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;aAC3B;AACF,SAAA,CAAC,CAAC;KACJ;AACD,IAAA,WAAW,CAAC,IAAI,EAAA;AACd,QAAA,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KACzC;8GAhBU,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,ECjBvC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6BAAA,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
+ import * as i0 from '@angular/core';
2
+ import { input, model, Component, ViewEncapsulation, inject } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { AngularComponentsModule, ImagePlaceholderComponent, ThumbnailComponent, ImageComponent, BaseComponent, ToolbarComponent } from '@rolatech/angular-components';
5
+ import { I as InventoryContentComponent } from './rolatech-angular-inventory-inventory-content.component-EJCf2GA1.mjs';
6
+ import { InventoryService, ProductService } from '@rolatech/angular-services';
7
+ import _ from 'lodash';
8
+ import { AngularCommonModule } from '@rolatech/angular-common';
9
+ import { RouterLink } from '@angular/router';
10
+
11
+ class InventoryProductItemComponent {
12
+ constructor() {
13
+ this.product = input.required();
14
+ this.amount = model();
15
+ }
16
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryProductItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: InventoryProductItemComponent, isStandalone: true, selector: "rolatech-inventory-product-item", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: true, isRequired: true, transformFunction: null }, amount: { classPropertyName: "amount", publicName: "amount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { amount: "amountChange" }, ngImport: i0, template: "<div class=\"flex items-center p-2 justify-between\">\n <div class=\"flex\">\n @if (product().media) {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"product().media[0].url + '!w400'\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n } @else {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n <rolatech-image-placeholder></rolatech-image-placeholder>\n </div>\n }\n <div>{{ product().name }}</div>\n </div>\n <!-- <div>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"h-12\">\n <mat-label> \u6570\u91CF </mat-label>\n <input matInput />\n </mat-form-field>\n </div> -->\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: ImagePlaceholderComponent, selector: "rolatech-image-placeholder" }], encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [ThumbnailComponent]] }); }
18
+ }
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryProductItemComponent, decorators: [{
20
+ type: Component,
21
+ args: [{ selector: 'rolatech-inventory-product-item', standalone: true, imports: [AngularCommonModule, AngularComponentsModule, ThumbnailComponent, ImageComponent, ImagePlaceholderComponent], encapsulation: ViewEncapsulation.None, template: "<div class=\"flex items-center p-2 justify-between\">\n <div class=\"flex\">\n @if (product().media) {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"product().media[0].url + '!w400'\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n } @else {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n <rolatech-image-placeholder></rolatech-image-placeholder>\n </div>\n }\n <div>{{ product().name }}</div>\n </div>\n <!-- <div>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"h-12\">\n <mat-label> \u6570\u91CF </mat-label>\n <input matInput />\n </mat-form-field>\n </div> -->\n</div>\n" }]
22
+ }] });
23
+
24
+ class InventoryProductComponent extends BaseComponent {
25
+ constructor() {
26
+ super(...arguments);
27
+ this.inventoryService = inject(InventoryService);
28
+ this.productService = inject(ProductService);
29
+ this.products = [];
30
+ }
31
+ ngOnInit() {
32
+ this.findInventoryItem();
33
+ }
34
+ findInventoryItem() {
35
+ this.inventoryService.findMyInventoryItems({}).subscribe({
36
+ next: (res) => {
37
+ const productIds = _.uniq(_.map(res.data, 'productId'));
38
+ this.findProductsByIds(productIds);
39
+ },
40
+ });
41
+ }
42
+ findProductsByIds(ids) {
43
+ this.productService.findByIds(ids).subscribe({
44
+ next: (res) => {
45
+ this.products = res.data;
46
+ },
47
+ });
48
+ }
49
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryProductComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
50
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: InventoryProductComponent, isStandalone: true, selector: "rolatech-inventory-product", usesInheritance: true, ngImport: i0, template: "<rolatech-inventory-content>\n <rolatech-toolbar title=\"\u5546\u54C1\u5E93\u5B58\" class=\"hidden md:block\" divider></rolatech-toolbar>\n <div class=\"divide-y\">\n @for (item of products; track $index) {\n <rolatech-inventory-product-item\n class=\"block cursor-pointer hover:bg-[--rt-raised-background]\"\n [product]=\"item\"\n [routerLink]=\"['/products', item.id, 'manage', 'inventory']\"\n ></rolatech-inventory-product-item>\n }\n </div>\n</rolatech-inventory-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: InventoryContentComponent, selector: "rolatech-inventory-content" }, { kind: "component", type: InventoryProductItemComponent, selector: "rolatech-inventory-product-item", inputs: ["product", "amount"], outputs: ["amountChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], encapsulation: i0.ViewEncapsulation.None }); }
51
+ }
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryProductComponent, decorators: [{
53
+ type: Component,
54
+ args: [{ selector: 'rolatech-inventory-product', standalone: true, imports: [CommonModule, ToolbarComponent, InventoryContentComponent, InventoryProductItemComponent, RouterLink], encapsulation: ViewEncapsulation.None, template: "<rolatech-inventory-content>\n <rolatech-toolbar title=\"\u5546\u54C1\u5E93\u5B58\" class=\"hidden md:block\" divider></rolatech-toolbar>\n <div class=\"divide-y\">\n @for (item of products; track $index) {\n <rolatech-inventory-product-item\n class=\"block cursor-pointer hover:bg-[--rt-raised-background]\"\n [product]=\"item\"\n [routerLink]=\"['/products', item.id, 'manage', 'inventory']\"\n ></rolatech-inventory-product-item>\n }\n </div>\n</rolatech-inventory-content>\n" }]
55
+ }] });
56
+
57
+ export { InventoryProductComponent };
58
+ //# sourceMappingURL=rolatech-angular-inventory-inventory-product.component-BpcOSm7L.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-inventory-inventory-product.component-BpcOSm7L.mjs","sources":["../../../../libs/angular-inventory/src/lib/components/inventory-product-item/inventory-product-item.component.ts","../../../../libs/angular-inventory/src/lib/components/inventory-product-item/inventory-product-item.component.html","../../../../libs/angular-inventory/src/lib/pages/inventory-product/inventory-product.component.ts","../../../../libs/angular-inventory/src/lib/pages/inventory-product/inventory-product.component.html"],"sourcesContent":["import { Component, input, model, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n AngularComponentsModule,\n ImageComponent,\n ImagePlaceholderComponent,\n ThumbnailComponent,\n} from '@rolatech/angular-components';\nimport { AngularCommonModule } from '@rolatech/angular-common';\n\nexport interface InventoryProduct {\n name: string;\n media: InventoryProductMedia[];\n}\nexport interface InventoryProductMedia {\n url: string;\n}\n\n@Component({\n selector: 'rolatech-inventory-product-item',\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule, ThumbnailComponent, ImageComponent, ImagePlaceholderComponent],\n templateUrl: './inventory-product-item.component.html',\n styleUrl: './inventory-product-item.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class InventoryProductItemComponent {\n product = input.required<InventoryProduct>();\n amount = model<any>();\n}\n","<div class=\"flex items-center p-2 justify-between\">\n <div class=\"flex\">\n @if (product().media) {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"product().media[0].url + '!w400'\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n } @else {\n <div class=\"min-w-24 w-36 object-cover aspect-video rounded-lg mr-3\">\n <rolatech-image-placeholder></rolatech-image-placeholder>\n </div>\n }\n <div>{{ product().name }}</div>\n </div>\n <!-- <div>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"h-12\">\n <mat-label> 数量 </mat-label>\n <input matInput />\n </mat-form-field>\n </div> -->\n</div>\n","import { Component, inject, OnInit, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BaseComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { InventoryContentComponent } from '../../components/inventory-content/inventory-content.component';\nimport { InventoryService, ProductService } from '@rolatech/angular-services';\nimport _ from 'lodash';\nimport { InventoryProductItemComponent } from '../../components/inventory-product-item/inventory-product-item.component';\nimport { RouterLink } from '@angular/router';\n@Component({\n selector: 'rolatech-inventory-product',\n standalone: true,\n imports: [CommonModule, ToolbarComponent, InventoryContentComponent, InventoryProductItemComponent, RouterLink],\n templateUrl: './inventory-product.component.html',\n styleUrl: './inventory-product.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class InventoryProductComponent extends BaseComponent implements OnInit {\n inventoryService = inject(InventoryService);\n productService = inject(ProductService);\n products: any = [];\n ngOnInit(): void {\n this.findInventoryItem();\n }\n findInventoryItem() {\n this.inventoryService.findMyInventoryItems({}).subscribe({\n next: (res) => {\n const productIds = _.uniq(_.map(res.data, 'productId'));\n this.findProductsByIds(productIds);\n },\n });\n }\n findProductsByIds(ids: Array<string>) {\n this.productService.findByIds(ids).subscribe({\n next: (res) => {\n this.products = res.data;\n },\n });\n }\n}\n","<rolatech-inventory-content>\n <rolatech-toolbar title=\"商品库存\" class=\"hidden md:block\" divider></rolatech-toolbar>\n <div class=\"divide-y\">\n @for (item of products; track $index) {\n <rolatech-inventory-product-item\n class=\"block cursor-pointer hover:bg-[--rt-raised-background]\"\n [product]=\"item\"\n [routerLink]=\"['/products', item.id, 'manage', 'inventory']\"\n ></rolatech-inventory-product-item>\n }\n </div>\n</rolatech-inventory-content>\n"],"names":[],"mappings":";;;;;;;;;;MA0Ba,6BAA6B,CAAA;AAR1C,IAAA,WAAA,GAAA;AASE,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAoB,CAAC;QAC7C,IAAM,CAAA,MAAA,GAAG,KAAK,EAAO,CAAC;AACvB,KAAA;8GAHY,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAA7B,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iCAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,MAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC1B1C,y6BAwBA,EDHY,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA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AA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAKnG,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBARrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,cAC1B,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,UAAU,CAAC,EAGhG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,wgBAAA,EAAA,CAAA;;;;;"}
@@ -0,0 +1,15 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ViewEncapsulation } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+
5
+ class InventoryComponent {
6
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: InventoryComponent, isStandalone: true, selector: "rolatech-inventory", ngImport: i0, template: "<p>inventory works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None }); }
8
+ }
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryComponent, decorators: [{
10
+ type: Component,
11
+ args: [{ selector: 'rolatech-inventory', standalone: true, imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "<p>inventory works!</p>\n" }]
12
+ }] });
13
+
14
+ export { InventoryComponent };
15
+ //# sourceMappingURL=rolatech-angular-inventory-inventory.component-g02tvIZb.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-inventory-inventory.component-g02tvIZb.mjs","sources":["../../../../libs/angular-inventory/src/lib/pages/inventory/inventory.component.ts","../../../../libs/angular-inventory/src/lib/pages/inventory/inventory.component.html"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'rolatech-inventory',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './inventory.component.html',\n styleUrl: './inventory.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class InventoryComponent {}\n","<p>inventory works!</p>\n"],"names":[],"mappings":";;;;MAWa,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECX/B,2BACA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDKY,YAAY,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAKX,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAR9B,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAClB,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,CAAC,EAAA,aAAA,EAGR,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,2BAAA,EAAA,CAAA;;;;;"}
@@ -0,0 +1,50 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ViewEncapsulation } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import * as i1 from '@angular/router';
5
+ import { RouterModule } from '@angular/router';
6
+
7
+ class InventoryLayoutComponent {
8
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: InventoryLayoutComponent, isStandalone: true, selector: "rolatech-inventory-layout", ngImport: i0, template: "<div class=\"flex flex-col md:flex-row m-auto\">\n <div\n class=\"min-w-[256px] px-3 md:px-0 flex flex-row md:flex-col md:h-full items-center md:items-start h-16 overflow-x-scroll overflow-y-hidden scrollbar-hide whitespace-pre\"\n >\n <div class=\"flex flex-row md:flex-col md:w-full\">\n <div class=\"hidden md:flex text-xl font-bold h-14 items-center px-2\">\u5E93\u5B58\u8BBE\u7F6E</div>\n <a routerLink=\"./locations\" routerLinkActive=\"manage-active\" class=\"p-2\">\u4ED3\u5E93\u8BBE\u7F6E</a>\n </div>\n <div class=\"flex flex-row md:flex-col md:w-full\">\n <div class=\"hidden md:flex text-xl font-bold h-14 items-center px-2\">\u5546\u54C1\u5E93\u5B58</div>\n <a routerLink=\"./products\" routerLinkActive=\"manage-active\" class=\"p-2\">\u5546\u54C1</a>\n <!-- <a routerLink=\"./inventory\" routerLinkActive=\"manage-active\" class=\"p-2\">\u5E93\u5B58\u8BBE\u7F6E</a> -->\n </div>\n </div>\n <div class=\"w-full\">\n <router-outlet></router-outlet>\n </div>\n</div>\n", styles: [".manage-active{background-color:var(--rt-10-percent-layer, rgba(0, 0, 0, .05));box-shadow:4px 0 var(--rt-base-background-inverse, #000) inset;font-weight:600}@media (max-width: 768px){.manage-active{box-shadow:inset 0 -4px 0 0 var(--rt-base-background-inverse, #000)}}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], encapsulation: i0.ViewEncapsulation.None }); }
10
+ }
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: InventoryLayoutComponent, decorators: [{
12
+ type: Component,
13
+ args: [{ selector: 'rolatech-inventory-layout', standalone: true, imports: [CommonModule, RouterModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col md:flex-row m-auto\">\n <div\n class=\"min-w-[256px] px-3 md:px-0 flex flex-row md:flex-col md:h-full items-center md:items-start h-16 overflow-x-scroll overflow-y-hidden scrollbar-hide whitespace-pre\"\n >\n <div class=\"flex flex-row md:flex-col md:w-full\">\n <div class=\"hidden md:flex text-xl font-bold h-14 items-center px-2\">\u5E93\u5B58\u8BBE\u7F6E</div>\n <a routerLink=\"./locations\" routerLinkActive=\"manage-active\" class=\"p-2\">\u4ED3\u5E93\u8BBE\u7F6E</a>\n </div>\n <div class=\"flex flex-row md:flex-col md:w-full\">\n <div class=\"hidden md:flex text-xl font-bold h-14 items-center px-2\">\u5546\u54C1\u5E93\u5B58</div>\n <a routerLink=\"./products\" routerLinkActive=\"manage-active\" class=\"p-2\">\u5546\u54C1</a>\n <!-- <a routerLink=\"./inventory\" routerLinkActive=\"manage-active\" class=\"p-2\">\u5E93\u5B58\u8BBE\u7F6E</a> -->\n </div>\n </div>\n <div class=\"w-full\">\n <router-outlet></router-outlet>\n </div>\n</div>\n", styles: [".manage-active{background-color:var(--rt-10-percent-layer, rgba(0, 0, 0, .05));box-shadow:4px 0 var(--rt-base-background-inverse, #000) inset;font-weight:600}@media (max-width: 768px){.manage-active{box-shadow:inset 0 -4px 0 0 var(--rt-base-background-inverse, #000)}}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}\n"] }]
14
+ }] });
15
+
16
+ const inventoryRoutes = [
17
+ {
18
+ path: '',
19
+ component: InventoryLayoutComponent,
20
+ children: [
21
+ {
22
+ path: '',
23
+ loadComponent: () => import('./rolatech-angular-inventory-inventory.component-g02tvIZb.mjs').then((c) => c.InventoryComponent),
24
+ },
25
+ {
26
+ path: 'locations',
27
+ loadComponent: () => import('./rolatech-angular-inventory-inventory-location.component-Flz7eXKs.mjs').then((c) => c.InventoryLocationComponent),
28
+ },
29
+ {
30
+ path: 'locations/add',
31
+ loadComponent: () => import('./rolatech-angular-inventory-inventory-location-add.component-D4iDeA1P.mjs').then((c) => c.InventoryLocationAddComponent),
32
+ },
33
+ {
34
+ path: 'locations/:id',
35
+ loadComponent: () => import('./rolatech-angular-inventory-inventory-location-detail.component-DnLIaY7g.mjs').then((c) => c.InventoryLocationDetailComponent),
36
+ },
37
+ {
38
+ path: 'products',
39
+ loadComponent: () => import('./rolatech-angular-inventory-inventory-product.component-BpcOSm7L.mjs').then((c) => c.InventoryProductComponent),
40
+ },
41
+ ],
42
+ },
43
+ ];
44
+
45
+ /**
46
+ * Generated bundle index. Do not edit.
47
+ */
48
+
49
+ export { inventoryRoutes };
50
+ //# sourceMappingURL=rolatech-angular-inventory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-inventory.mjs","sources":["../../../../libs/angular-inventory/src/lib/components/inventory-layout/inventory-layout.component.ts","../../../../libs/angular-inventory/src/lib/components/inventory-layout/inventory-layout.component.html","../../../../libs/angular-inventory/src/lib/pages/inventory.routes.ts","../../../../libs/angular-inventory/src/rolatech-angular-inventory.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\n\n@Component({\n selector: 'rolatech-inventory-layout',\n standalone: true,\n imports: [CommonModule, RouterModule],\n templateUrl: './inventory-layout.component.html',\n styleUrl: './inventory-layout.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class InventoryLayoutComponent {}\n","<div class=\"flex flex-col md:flex-row m-auto\">\n <div\n class=\"min-w-[256px] px-3 md:px-0 flex flex-row md:flex-col md:h-full items-center md:items-start h-16 overflow-x-scroll overflow-y-hidden scrollbar-hide whitespace-pre\"\n >\n <div class=\"flex flex-row md:flex-col md:w-full\">\n <div class=\"hidden md:flex text-xl font-bold h-14 items-center px-2\">库存设置</div>\n <a routerLink=\"./locations\" routerLinkActive=\"manage-active\" class=\"p-2\">仓库设置</a>\n </div>\n <div class=\"flex flex-row md:flex-col md:w-full\">\n <div class=\"hidden md:flex text-xl font-bold h-14 items-center px-2\">商品库存</div>\n <a routerLink=\"./products\" routerLinkActive=\"manage-active\" class=\"p-2\">商品</a>\n <!-- <a routerLink=\"./inventory\" routerLinkActive=\"manage-active\" class=\"p-2\">库存设置</a> -->\n </div>\n </div>\n <div class=\"w-full\">\n <router-outlet></router-outlet>\n </div>\n</div>\n","import { Routes } from '@angular/router';\nimport { InventoryLayoutComponent } from '../components/inventory-layout/inventory-layout.component';\n\nexport const inventoryRoutes: Routes = [\n {\n path: '',\n component: InventoryLayoutComponent,\n children: [\n {\n path: '',\n loadComponent: () => import('./inventory/inventory.component').then((c) => c.InventoryComponent),\n },\n {\n path: 'locations',\n loadComponent: () =>\n import('./inventory-location/inventory-location.component').then((c) => c.InventoryLocationComponent),\n },\n {\n path: 'locations/add',\n loadComponent: () =>\n import('../components/inventory-location-add/inventory-location-add.component').then(\n (c) => c.InventoryLocationAddComponent,\n ),\n },\n {\n path: 'locations/:id',\n loadComponent: () =>\n import('./inventory-location-detail/inventory-location-detail.component').then(\n (c) => c.InventoryLocationDetailComponent,\n ),\n },\n {\n path: 'products',\n loadComponent: () => import('./inventory-product/inventory-product.component').then((c) => c.InventoryProductComponent),\n },\n ],\n },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAYa,wBAAwB,CAAA;8GAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,ECZrC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,sgCAkBA,EDXY,MAAA,EAAA,CAAA,6XAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,8BAAE,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,QAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAA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C,gCAAgC,CAC1C;AACJ,aAAA;AACD,YAAA;AACE,gBAAA,IAAI,EAAE,UAAU;AAChB,gBAAA,aAAa,EAAE,MAAM,OAAO,uEAAiD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,yBAAyB,CAAC;AACxH,aAAA;AACF,SAAA;AACF,KAAA;;;ACpCH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { inventoryRoutes } from './lib/pages/inventory.routes';
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class InventoryContentComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryContentComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryContentComponent, "rolatech-inventory-content", never, {}, {}, never, ["rolatech-toolbar", "*"], true, never>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class InventoryLayoutComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryLayoutComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryLayoutComponent, "rolatech-inventory-layout", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,13 @@
1
+ import { InventoryService, NavigationService } from '@rolatech/angular-services';
2
+ import { MatDialog } from '@angular/material/dialog';
3
+ import * as i0 from "@angular/core";
4
+ export declare class InventoryLocationAddComponent {
5
+ inventoryService: InventoryService;
6
+ dialog: MatDialog;
7
+ navigationService: NavigationService;
8
+ location: any;
9
+ selectLocation(): void;
10
+ add(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryLocationAddComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryLocationAddComponent, "rolatech-inventory-location-add", never, {}, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,14 @@
1
+ import { Location } from '../../interfaces/inventory-location';
2
+ import { MatDialog } from '@angular/material/dialog';
3
+ import * as i0 from "@angular/core";
4
+ export declare class InventoryLocationItemComponent {
5
+ location: import("@angular/core").InputSignal<Location>;
6
+ dialog: MatDialog;
7
+ save: import("@angular/core").OutputEmitterRef<Location>;
8
+ delete: import("@angular/core").OutputEmitterRef<Location>;
9
+ selectLocation(): void;
10
+ onSave(): void;
11
+ onDelete(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryLocationItemComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryLocationItemComponent, "rolatech-inventory-location-item", never, { "location": { "alias": "location"; "required": true; "isSignal": true; }; }, { "save": "save"; "delete": "delete"; }, never, never, true, never>;
14
+ }
@@ -0,0 +1,29 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { MatDialogRef } from '@angular/material/dialog';
3
+ import * as i0 from "@angular/core";
4
+ declare global {
5
+ interface Window {
6
+ qq: any;
7
+ TMap: any;
8
+ }
9
+ }
10
+ export declare class InventoryLocationMapComponent implements OnInit {
11
+ dialogRef: MatDialogRef<InventoryLocationMapComponent>;
12
+ data: any;
13
+ map: any;
14
+ markers: any;
15
+ lists: any;
16
+ infoWindowList: any[];
17
+ selectedLocation: any;
18
+ cities: string[];
19
+ region: string;
20
+ constructor(dialogRef: MatDialogRef<InventoryLocationMapComponent>, data: any);
21
+ ngOnInit(): void;
22
+ init(): void;
23
+ onSearchChange(event: any): void;
24
+ setLocation(index: any): void;
25
+ onNoClick(): void;
26
+ selectionChange(event: any): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryLocationMapComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryLocationMapComponent, "rolatech-inventory-location-map", never, {}, {}, never, never, true, never>;
29
+ }
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ export interface InventoryProduct {
3
+ name: string;
4
+ media: InventoryProductMedia[];
5
+ }
6
+ export interface InventoryProductMedia {
7
+ url: string;
8
+ }
9
+ export declare class InventoryProductItemComponent {
10
+ product: import("@angular/core").InputSignal<InventoryProduct>;
11
+ amount: import("@angular/core").ModelSignal<any>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryProductItemComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryProductItemComponent, "rolatech-inventory-product-item", never, { "product": { "alias": "product"; "required": true; "isSignal": true; }; "amount": { "alias": "amount"; "required": false; "isSignal": true; }; }, { "amount": "amountChange"; }, never, never, true, never>;
14
+ }
@@ -0,0 +1,27 @@
1
+ export interface Location {
2
+ id: string;
3
+ name: string;
4
+ description: string;
5
+ contact: string;
6
+ email: string;
7
+ phone: string;
8
+ country: string;
9
+ province: string;
10
+ city: string;
11
+ district: string;
12
+ street: string;
13
+ detail: string;
14
+ latitude: string;
15
+ longitude: string;
16
+ media: LocationMedia[];
17
+ isUploading?: boolean;
18
+ }
19
+ export interface LocationMedia {
20
+ id: string;
21
+ url: string;
22
+ alt: string;
23
+ width?: number;
24
+ height?: number;
25
+ uuid?: string;
26
+ selected?: boolean;
27
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class InventoryComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryComponent, "rolatech-inventory", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,13 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { InventoryService } from '@rolatech/angular-services';
3
+ import { Location } from '../../interfaces/inventory-location';
4
+ import * as i0 from "@angular/core";
5
+ export declare class InventoryLocationComponent implements OnInit {
6
+ inventoryService: InventoryService;
7
+ locations: Location[];
8
+ ngOnInit(): void;
9
+ findLocations(): void;
10
+ addLocation(data: any): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryLocationComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryLocationComponent, "rolatech-inventory-location", never, {}, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,15 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BaseComponent } from '@rolatech/angular-components';
3
+ import { Location } from '../../interfaces/inventory-location';
4
+ import { InventoryService } from '@rolatech/angular-services';
5
+ import * as i0 from "@angular/core";
6
+ export declare class InventoryLocationDetailComponent extends BaseComponent implements OnInit {
7
+ inventoryService: InventoryService;
8
+ location: Location;
9
+ ngOnInit(): void;
10
+ get(): void;
11
+ onLocationSave(e: any): void;
12
+ onLocationDetele(location: any): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryLocationDetailComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryLocationDetailComponent, "rolatech-inventory-location-detail", never, {}, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,14 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BaseComponent } from '@rolatech/angular-components';
3
+ import { InventoryService, ProductService } from '@rolatech/angular-services';
4
+ import * as i0 from "@angular/core";
5
+ export declare class InventoryProductComponent extends BaseComponent implements OnInit {
6
+ inventoryService: InventoryService;
7
+ productService: ProductService;
8
+ products: any;
9
+ ngOnInit(): void;
10
+ findInventoryItem(): void;
11
+ findProductsByIds(ids: Array<string>): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryProductComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<InventoryProductComponent, "rolatech-inventory-product", never, {}, {}, never, never, true, never>;
14
+ }
@@ -0,0 +1,2 @@
1
+ import { Routes } from '@angular/router';
2
+ export declare const inventoryRoutes: Routes;
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@rolatech/angular-inventory",
3
+ "version": "17.0.2",
4
+ "peerDependencies": {
5
+ "@angular/common": "^17.1.0",
6
+ "@angular/core": "^17.1.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "sideEffects": false,
12
+ "module": "fesm2022/rolatech-angular-inventory.mjs",
13
+ "typings": "index.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./index.d.ts",
20
+ "esm2022": "./esm2022/rolatech-angular-inventory.mjs",
21
+ "esm": "./esm2022/rolatech-angular-inventory.mjs",
22
+ "default": "./fesm2022/rolatech-angular-inventory.mjs"
23
+ }
24
+ }
25
+ }