@ankhorage/templates 6.1.0 → 7.0.1
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/commands.d.ts +6 -2
- package/dist/commands.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/api.d.ts +3 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/api.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/api.js +18 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/api.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.d.ts +165 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.js +138 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.d.ts +33 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.js +80 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.js +32 -125
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.js.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/catalogScreenBody.d.ts +3 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/catalogScreenBody.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/catalogScreenBody.js +44 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/catalogScreenBody.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/contentScreen.d.ts +29 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/contentScreen.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/contentScreen.js +32 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/contentScreen.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productCreateScreenBody.d.ts +3 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productCreateScreenBody.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productCreateScreenBody.js +88 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productCreateScreenBody.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productDetailScreenBody.d.ts +8 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productDetailScreenBody.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productDetailScreenBody.js +96 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productDetailScreenBody.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.d.ts +3 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.js +20 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.js +24 -385
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.js.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/settingsScreen.d.ts +8 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/settingsScreen.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/settingsScreen.js +44 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/settingsScreen.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/template.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/template.js +2 -5
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/template.js.map +1 -1
- package/package.json +14 -15
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.d.ts +0 -3
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.d.ts.map +0 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.js +0 -14
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.js.map +0 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/externalDataSource.d.ts +0 -3
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/externalDataSource.d.ts.map +0 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/externalDataSource.js +0 -46
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/externalDataSource.js.map +0 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/generatedApi.d.ts +0 -3
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/generatedApi.d.ts.map +0 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/generatedApi.js +0 -43
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/generatedApi.js.map +0 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { createSection, createZoraNode } from '../../../../shared';
|
|
2
|
+
export const nutritionProductDetailOperation = {
|
|
3
|
+
apiId: 'nutrition',
|
|
4
|
+
endpointId: 'products',
|
|
5
|
+
operationId: 'products.read',
|
|
6
|
+
};
|
|
7
|
+
function createDetailValueCard(args) {
|
|
8
|
+
return createZoraNode(args.id, 'Card', {
|
|
9
|
+
eyebrow: args.label,
|
|
10
|
+
title: args.placeholder,
|
|
11
|
+
tone: 'outline',
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
const DETAIL_FIELDS = [
|
|
15
|
+
['name', 'Name', 'Loading name...'],
|
|
16
|
+
['brand', 'Brand', 'Loading brand...'],
|
|
17
|
+
['package-label', 'Package label', 'Loading package label...'],
|
|
18
|
+
['barcode', 'Barcode', 'Loading barcode...'],
|
|
19
|
+
['barcode-type', 'Barcode type', 'Loading barcode type...'],
|
|
20
|
+
['created-at', 'Created at', 'Loading created timestamp...'],
|
|
21
|
+
['updated-at', 'Updated at', 'Loading updated timestamp...'],
|
|
22
|
+
];
|
|
23
|
+
const NUTRITION_FIELDS = [
|
|
24
|
+
['nutrition-basis', 'Basis', 'Loading basis...'],
|
|
25
|
+
['energy-kj', 'Energy (kJ)', 'Loading energy...'],
|
|
26
|
+
['energy-kcal', 'Energy (kcal)', 'Loading energy...'],
|
|
27
|
+
['fat-g', 'Fat (g)', 'Loading fat...'],
|
|
28
|
+
['saturated-fat-g', 'Saturated fat (g)', 'Loading saturated fat...'],
|
|
29
|
+
['carbohydrates-g', 'Carbohydrates (g)', 'Loading carbohydrates...'],
|
|
30
|
+
['sugars-g', 'Sugars (g)', 'Loading sugars...'],
|
|
31
|
+
['fiber-g', 'Fiber (g)', 'Loading fiber...'],
|
|
32
|
+
['protein-g', 'Protein (g)', 'Loading protein...'],
|
|
33
|
+
['salt-g', 'Salt (g)', 'Loading salt...'],
|
|
34
|
+
];
|
|
35
|
+
function createValueCards(idPrefix, fields) {
|
|
36
|
+
return fields.map(([id, label, placeholder]) => createDetailValueCard({ id: `${idPrefix}-detail-${id}-value`, label, placeholder }));
|
|
37
|
+
}
|
|
38
|
+
function createImageRefList(idPrefix) {
|
|
39
|
+
return {
|
|
40
|
+
id: `${idPrefix}-detail-image-ref-list`,
|
|
41
|
+
type: 'Panel',
|
|
42
|
+
props: {
|
|
43
|
+
title: 'Product images',
|
|
44
|
+
description: 'Each block reflects one image ref returned by the Nutrition API.',
|
|
45
|
+
tone: 'subtle',
|
|
46
|
+
},
|
|
47
|
+
repeat: {
|
|
48
|
+
source: {
|
|
49
|
+
kind: 'operation',
|
|
50
|
+
operation: nutritionProductDetailOperation,
|
|
51
|
+
path: 'product.imageRefs',
|
|
52
|
+
},
|
|
53
|
+
itemAlias: 'imageRef',
|
|
54
|
+
keyPath: 'path',
|
|
55
|
+
},
|
|
56
|
+
children: [
|
|
57
|
+
createDetailValueCard({
|
|
58
|
+
id: `${idPrefix}-detail-image-ref-kind-value`,
|
|
59
|
+
label: 'Kind',
|
|
60
|
+
placeholder: 'Loading image kind...',
|
|
61
|
+
}),
|
|
62
|
+
createDetailValueCard({
|
|
63
|
+
id: `${idPrefix}-detail-image-ref-bucket-value`,
|
|
64
|
+
label: 'Bucket',
|
|
65
|
+
placeholder: 'Loading bucket...',
|
|
66
|
+
}),
|
|
67
|
+
createDetailValueCard({
|
|
68
|
+
id: `${idPrefix}-detail-image-ref-path-value`,
|
|
69
|
+
label: 'Path',
|
|
70
|
+
placeholder: 'Loading path...',
|
|
71
|
+
}),
|
|
72
|
+
createDetailValueCard({
|
|
73
|
+
id: `${idPrefix}-detail-image-ref-public-url-value`,
|
|
74
|
+
label: 'Public URL',
|
|
75
|
+
placeholder: 'Loading image URL...',
|
|
76
|
+
}),
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export function createNutritionProductDetailBody(idPrefix) {
|
|
81
|
+
return [
|
|
82
|
+
createSection(`${idPrefix}-detail-summary-section`, {
|
|
83
|
+
title: 'Product details',
|
|
84
|
+
description: 'Loaded through the Nutrition API using the current route parameter ID.',
|
|
85
|
+
}, createValueCards(idPrefix, DETAIL_FIELDS)),
|
|
86
|
+
createSection(`${idPrefix}-detail-nutrition-section`, {
|
|
87
|
+
title: 'Nutrition facts',
|
|
88
|
+
description: 'Bindings read the cached Nutrition API product response.',
|
|
89
|
+
}, createValueCards(idPrefix, NUTRITION_FIELDS)),
|
|
90
|
+
createSection(`${idPrefix}-detail-images-section`, {
|
|
91
|
+
title: 'Image refs',
|
|
92
|
+
description: 'Product image refs render from the cached Nutrition API response.',
|
|
93
|
+
}, [createImageRefList(idPrefix)]),
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=productDetailScreenBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productDetailScreenBody.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/productDetailScreenBody.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAiB,MAAM,oBAAoB,CAAC;AAElF,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,KAAK,EAAE,WAAW;IAClB,UAAU,EAAE,UAAU;IACtB,WAAW,EAAE,eAAe;CACU,CAAC;AAEzC,SAAS,qBAAqB,CAAC,IAI9B;IACC,OAAO,cAAc,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE;QACrC,OAAO,EAAE,IAAI,CAAC,KAAK;QACnB,KAAK,EAAE,IAAI,CAAC,WAAW;QACvB,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,aAAa,GAAG;IACpB,CAAC,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;IACnC,CAAC,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC;IACtC,CAAC,eAAe,EAAE,eAAe,EAAE,0BAA0B,CAAC;IAC9D,CAAC,SAAS,EAAE,SAAS,EAAE,oBAAoB,CAAC;IAC5C,CAAC,cAAc,EAAE,cAAc,EAAE,yBAAyB,CAAC;IAC3D,CAAC,YAAY,EAAE,YAAY,EAAE,8BAA8B,CAAC;IAC5D,CAAC,YAAY,EAAE,YAAY,EAAE,8BAA8B,CAAC;CACpD,CA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,EAAE;YACR,qBAAqB,CAAC;gBACpB,EAAE,EAAE,GAAG,QAAQ,8BAA8B;gBAC7C,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,uBAAuB;aACrC,CAAC;YACF,qBAAqB,CAAC;gBACpB,EAAE,EAAE,GAAG,QAAQ,gCAAgC;gBAC/C,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mBAAmB;aACjC,CAAC;YACF,qBAAqB,CAAC;gBACpB,EAAE,EAAE,GAAG,QAAQ,8BAA8B;gBAC7C,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,iBAAiB;aAC/B,CAAC;YACF,qBAAqB,CAAC;gBACpB,EAAE,EAAE,GAAG,QAAQ,oCAAoC;gBACnD,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,sBAAsB;aACpC,CAAC;SACH;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,QAAgB;IAC/D,OAAO;QACL,aAAa,CACX,GAAG,QAAQ,yBAAyB,EACpC;YACE,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,wEAAwE;SACtF,EACD,gBAAgB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAC1C;QACD,aAAa,CACX,GAAG,QAAQ,2BAA2B,EACtC;YACE,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,0DAA0D;SACxE,EACD,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAC7C;QACD,aAAa,CACX,GAAG,QAAQ,wBAAwB,EACnC;YACE,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,mEAAmE;SACjF,EACD,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAC/B;KACF,CAAC;AACJ,CAAC"}
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanScreenBody.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnE,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,CAkBpE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createZoraNode } from '../../../../shared';
|
|
2
|
+
export function createNutritionScanBody(idPrefix) {
|
|
3
|
+
return [
|
|
4
|
+
createZoraNode(`${idPrefix}-scan-scanner`, 'BarcodeScannerView', {
|
|
5
|
+
permissionStatus: 'unknown',
|
|
6
|
+
title: 'Scan product barcode',
|
|
7
|
+
description: 'Point the camera at a barcode to look up or add a product.',
|
|
8
|
+
overlayTitle: 'Align barcode',
|
|
9
|
+
overlayDescription: 'Hold the barcode inside the frame. Scanning starts automatically.',
|
|
10
|
+
cornerLabel: 'EAN',
|
|
11
|
+
requestPermissionLabel: 'Allow camera access',
|
|
12
|
+
manualEntryLabel: 'Enter barcode manually',
|
|
13
|
+
}),
|
|
14
|
+
createZoraNode(`${idPrefix}-scan-lookup-notice`, 'Notice', {
|
|
15
|
+
title: 'Lookup behavior',
|
|
16
|
+
description: 'GET /products/by-barcode/:barcode opens product detail on 200, opens create with a prefilled barcode on 404, and surfaces retry messaging for invalid input or backend unavailability.',
|
|
17
|
+
}),
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=scanScreenBody.js.map
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanScreenBody.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,oBAAoB,CAAC;AAEnE,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,OAAO;QACL,cAAc,CAAC,GAAG,QAAQ,eAAe,EAAE,oBAAoB,EAAE;YAC/D,gBAAgB,EAAE,SAAS;YAC3B,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EAAE,4DAA4D;YACzE,YAAY,EAAE,eAAe;YAC7B,kBAAkB,EAAE,mEAAmE;YACvF,WAAW,EAAE,KAAK;YAClB,sBAAsB,EAAE,qBAAqB;YAC7C,gBAAgB,EAAE,wBAAwB;SAC3C,CAAC;QACF,cAAc,CAAC,GAAG,QAAQ,qBAAqB,EAAE,QAAQ,EAAE;YACzD,KAAK,EAAE,iBAAiB;YACxB,WAAW,EACT,wLAAwL;SAC3L,CAAC;KACH,CAAC;AACJ,CAAC"}
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAS3D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAI9D,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,6BAA6B,GACvC,WAAW,CAAC,SAAS,CAAC,CA6ExB"}
|
|
@@ -1,446 +1,85 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createNutritionCatalogBody } from './catalogScreenBody';
|
|
2
2
|
import { nutritionCatalogScanContent } from './content';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
function createContentScreen(args) {
|
|
9
|
-
const idSegment = args.name.toLowerCase().replaceAll(' ', '-');
|
|
10
|
-
const body = args.body ?? createSectionCards(args.idPrefix, idSegment, args.content.sections);
|
|
11
|
-
return createScreen({
|
|
12
|
-
id: args.screenId,
|
|
13
|
-
name: args.name,
|
|
14
|
-
title: args.content.title,
|
|
15
|
-
description: args.content.description,
|
|
16
|
-
root: createScreenRoot(`${args.idPrefix}-${idSegment}-screen`, { width: 'wide' }, [
|
|
17
|
-
createZoraNode(`${args.idPrefix}-${idSegment}-header`, 'SectionHeader', {
|
|
18
|
-
eyebrow: args.content.eyebrow,
|
|
19
|
-
title: args.content.title,
|
|
20
|
-
description: args.content.description,
|
|
21
|
-
}),
|
|
22
|
-
...body,
|
|
23
|
-
]),
|
|
24
|
-
dataLoaders: args.dataLoaders,
|
|
25
|
-
requires: args.requires,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
function createSectionCards(idPrefix, idSegment, sections) {
|
|
29
|
-
return sections.map((section, sectionIndex) => createSection(`${idPrefix}-${idSegment}-section-${sectionIndex + 1}`, { title: section.title, description: section.description }, [
|
|
30
|
-
createZoraNode(`${idPrefix}-${idSegment}-panel-${sectionIndex + 1}`, 'Panel', { title: section.title, description: section.description, tone: 'subtle' }, section.cards.map((card, cardIndex) => createZoraNode(`${idPrefix}-${idSegment}-card-${sectionIndex + 1}-${cardIndex + 1}`, 'Card', {
|
|
31
|
-
eyebrow: card.eyebrow,
|
|
32
|
-
title: card.title,
|
|
33
|
-
description: card.description,
|
|
34
|
-
tone: 'outline',
|
|
35
|
-
}))),
|
|
36
|
-
]));
|
|
37
|
-
}
|
|
38
|
-
function createDetailValueCard(args) {
|
|
39
|
-
return createZoraNode(args.id, 'Card', {
|
|
40
|
-
eyebrow: args.label,
|
|
41
|
-
title: args.placeholder,
|
|
42
|
-
tone: 'outline',
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function createProductsBody(idPrefix) {
|
|
46
|
-
return [
|
|
47
|
-
createZoraNode(`${idPrefix}-products-search-field`, 'FormField', {
|
|
48
|
-
label: 'Search products',
|
|
49
|
-
description: 'Search by product name, brand, barcode, or package label.',
|
|
50
|
-
}),
|
|
51
|
-
createZoraNode(`${idPrefix}-products-search-input`, 'Input', {
|
|
52
|
-
placeholder: 'Search product name, brand, or barcode...',
|
|
53
|
-
autoCapitalize: 'none',
|
|
54
|
-
size: 'm',
|
|
55
|
-
}),
|
|
56
|
-
createSection(`${idPrefix}-products-grid-section`, {
|
|
57
|
-
title: 'Products',
|
|
58
|
-
description: 'Available products in the shared nutrition catalog.',
|
|
59
|
-
}, [
|
|
60
|
-
{
|
|
61
|
-
id: `${idPrefix}-products-grid`,
|
|
62
|
-
type: 'Grid',
|
|
63
|
-
repeat: {
|
|
64
|
-
source: {
|
|
65
|
-
kind: 'operation',
|
|
66
|
-
operation: {
|
|
67
|
-
dataSourceId: 'nutrition-products',
|
|
68
|
-
endpointId: 'products',
|
|
69
|
-
operationId: 'products.list',
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
itemAlias: 'item',
|
|
73
|
-
keyPath: 'id',
|
|
74
|
-
empty: [
|
|
75
|
-
createZoraNode(`${idPrefix}-products-empty-state`, 'Notice', {
|
|
76
|
-
title: 'No products found',
|
|
77
|
-
description: 'Scan a barcode or create a product to start building the catalog.',
|
|
78
|
-
}),
|
|
79
|
-
],
|
|
80
|
-
},
|
|
81
|
-
children: [createZoraNode(`${idPrefix}-product-card-template`, 'ProductCard')],
|
|
82
|
-
},
|
|
83
|
-
]),
|
|
84
|
-
];
|
|
85
|
-
}
|
|
86
|
-
function createScanBody(idPrefix) {
|
|
87
|
-
return [
|
|
88
|
-
createZoraNode(`${idPrefix}-scan-scanner`, 'BarcodeScannerView', {
|
|
89
|
-
permissionStatus: 'unknown',
|
|
90
|
-
title: 'Scan product barcode',
|
|
91
|
-
description: 'Point the camera at a barcode to look up or add a product.',
|
|
92
|
-
overlayTitle: 'Align barcode',
|
|
93
|
-
overlayDescription: 'Hold the barcode inside the frame. Scanning starts automatically.',
|
|
94
|
-
cornerLabel: 'EAN',
|
|
95
|
-
requestPermissionLabel: 'Allow camera access',
|
|
96
|
-
manualEntryLabel: 'Enter barcode manually',
|
|
97
|
-
}),
|
|
98
|
-
createZoraNode(`${idPrefix}-scan-lookup-notice`, 'Notice', {
|
|
99
|
-
title: 'Lookup behavior',
|
|
100
|
-
description: 'GET /products/by-barcode/:barcode opens product detail on 200, opens create with a prefilled barcode on 404, and should surface retry messaging for 400 or 503 responses.',
|
|
101
|
-
}),
|
|
102
|
-
];
|
|
103
|
-
}
|
|
104
|
-
function createProductDetailBody(idPrefix) {
|
|
105
|
-
return [
|
|
106
|
-
createSection(`${idPrefix}-detail-summary-section`, {
|
|
107
|
-
title: 'Product details',
|
|
108
|
-
description: 'Loaded through the generated product read operation using the current route param ID.',
|
|
109
|
-
}, [
|
|
110
|
-
createDetailValueCard({
|
|
111
|
-
id: `${idPrefix}-detail-name-value`,
|
|
112
|
-
label: 'Name',
|
|
113
|
-
placeholder: 'Loading name...',
|
|
114
|
-
}),
|
|
115
|
-
createDetailValueCard({
|
|
116
|
-
id: `${idPrefix}-detail-brand-value`,
|
|
117
|
-
label: 'Brand',
|
|
118
|
-
placeholder: 'Loading brand...',
|
|
119
|
-
}),
|
|
120
|
-
createDetailValueCard({
|
|
121
|
-
id: `${idPrefix}-detail-package-label-value`,
|
|
122
|
-
label: 'Package label',
|
|
123
|
-
placeholder: 'Loading package label...',
|
|
124
|
-
}),
|
|
125
|
-
createDetailValueCard({
|
|
126
|
-
id: `${idPrefix}-detail-barcode-value`,
|
|
127
|
-
label: 'Barcode',
|
|
128
|
-
placeholder: 'Loading barcode...',
|
|
129
|
-
}),
|
|
130
|
-
createDetailValueCard({
|
|
131
|
-
id: `${idPrefix}-detail-barcode-type-value`,
|
|
132
|
-
label: 'Barcode type',
|
|
133
|
-
placeholder: 'Loading barcode type...',
|
|
134
|
-
}),
|
|
135
|
-
createDetailValueCard({
|
|
136
|
-
id: `${idPrefix}-detail-created-at-value`,
|
|
137
|
-
label: 'Created at',
|
|
138
|
-
placeholder: 'Loading created timestamp...',
|
|
139
|
-
}),
|
|
140
|
-
createDetailValueCard({
|
|
141
|
-
id: `${idPrefix}-detail-updated-at-value`,
|
|
142
|
-
label: 'Updated at',
|
|
143
|
-
placeholder: 'Loading updated timestamp...',
|
|
144
|
-
}),
|
|
145
|
-
]),
|
|
146
|
-
createSection(`${idPrefix}-detail-nutrition-section`, {
|
|
147
|
-
title: 'Nutrition facts',
|
|
148
|
-
description: 'Synchronous bindings read the cached product nutrition facts fields.',
|
|
149
|
-
}, [
|
|
150
|
-
createDetailValueCard({
|
|
151
|
-
id: `${idPrefix}-detail-nutrition-basis-value`,
|
|
152
|
-
label: 'Basis',
|
|
153
|
-
placeholder: 'Loading basis...',
|
|
154
|
-
}),
|
|
155
|
-
createDetailValueCard({
|
|
156
|
-
id: `${idPrefix}-detail-energy-kj-value`,
|
|
157
|
-
label: 'Energy (kJ)',
|
|
158
|
-
placeholder: 'Loading energy...',
|
|
159
|
-
}),
|
|
160
|
-
createDetailValueCard({
|
|
161
|
-
id: `${idPrefix}-detail-energy-kcal-value`,
|
|
162
|
-
label: 'Energy (kcal)',
|
|
163
|
-
placeholder: 'Loading energy...',
|
|
164
|
-
}),
|
|
165
|
-
createDetailValueCard({
|
|
166
|
-
id: `${idPrefix}-detail-fat-g-value`,
|
|
167
|
-
label: 'Fat (g)',
|
|
168
|
-
placeholder: 'Loading fat...',
|
|
169
|
-
}),
|
|
170
|
-
createDetailValueCard({
|
|
171
|
-
id: `${idPrefix}-detail-saturated-fat-g-value`,
|
|
172
|
-
label: 'Saturated fat (g)',
|
|
173
|
-
placeholder: 'Loading saturated fat...',
|
|
174
|
-
}),
|
|
175
|
-
createDetailValueCard({
|
|
176
|
-
id: `${idPrefix}-detail-carbohydrates-g-value`,
|
|
177
|
-
label: 'Carbohydrates (g)',
|
|
178
|
-
placeholder: 'Loading carbohydrates...',
|
|
179
|
-
}),
|
|
180
|
-
createDetailValueCard({
|
|
181
|
-
id: `${idPrefix}-detail-sugars-g-value`,
|
|
182
|
-
label: 'Sugars (g)',
|
|
183
|
-
placeholder: 'Loading sugars...',
|
|
184
|
-
}),
|
|
185
|
-
createDetailValueCard({
|
|
186
|
-
id: `${idPrefix}-detail-fiber-g-value`,
|
|
187
|
-
label: 'Fiber (g)',
|
|
188
|
-
placeholder: 'Loading fiber...',
|
|
189
|
-
}),
|
|
190
|
-
createDetailValueCard({
|
|
191
|
-
id: `${idPrefix}-detail-protein-g-value`,
|
|
192
|
-
label: 'Protein (g)',
|
|
193
|
-
placeholder: 'Loading protein...',
|
|
194
|
-
}),
|
|
195
|
-
createDetailValueCard({
|
|
196
|
-
id: `${idPrefix}-detail-salt-g-value`,
|
|
197
|
-
label: 'Salt (g)',
|
|
198
|
-
placeholder: 'Loading salt...',
|
|
199
|
-
}),
|
|
200
|
-
]),
|
|
201
|
-
createSection(`${idPrefix}-detail-images-section`, {
|
|
202
|
-
title: 'Image refs',
|
|
203
|
-
description: 'Cached product image refs render synchronously from the loader result.',
|
|
204
|
-
}, [
|
|
205
|
-
{
|
|
206
|
-
id: `${idPrefix}-detail-image-ref-list`,
|
|
207
|
-
type: 'Panel',
|
|
208
|
-
props: {
|
|
209
|
-
title: 'Product images',
|
|
210
|
-
description: 'Each block reflects one image ref from the current product imageRefs field.',
|
|
211
|
-
tone: 'subtle',
|
|
212
|
-
},
|
|
213
|
-
repeat: {
|
|
214
|
-
source: {
|
|
215
|
-
kind: 'operation',
|
|
216
|
-
operation: productDetailLoaderOperation,
|
|
217
|
-
path: 'imageRefs',
|
|
218
|
-
},
|
|
219
|
-
itemAlias: 'imageRef',
|
|
220
|
-
keyPath: 'path',
|
|
221
|
-
},
|
|
222
|
-
children: [
|
|
223
|
-
createDetailValueCard({
|
|
224
|
-
id: `${idPrefix}-detail-image-ref-kind-value`,
|
|
225
|
-
label: 'Kind',
|
|
226
|
-
placeholder: 'Loading image kind...',
|
|
227
|
-
}),
|
|
228
|
-
createDetailValueCard({
|
|
229
|
-
id: `${idPrefix}-detail-image-ref-bucket-value`,
|
|
230
|
-
label: 'Bucket',
|
|
231
|
-
placeholder: 'Loading bucket...',
|
|
232
|
-
}),
|
|
233
|
-
createDetailValueCard({
|
|
234
|
-
id: `${idPrefix}-detail-image-ref-path-value`,
|
|
235
|
-
label: 'Path',
|
|
236
|
-
placeholder: 'Loading path...',
|
|
237
|
-
}),
|
|
238
|
-
createDetailValueCard({
|
|
239
|
-
id: `${idPrefix}-detail-image-ref-public-url-value`,
|
|
240
|
-
label: 'Public URL',
|
|
241
|
-
placeholder: 'Loading image URL...',
|
|
242
|
-
}),
|
|
243
|
-
],
|
|
244
|
-
},
|
|
245
|
-
]),
|
|
246
|
-
];
|
|
247
|
-
}
|
|
248
|
-
function createProductFormPreview(idPrefix) {
|
|
249
|
-
return createZoraNode(`${idPrefix}-create-form-panel`, 'Panel', {
|
|
250
|
-
title: 'Direct product create form',
|
|
251
|
-
description: 'Create a product directly when barcode lookup does not find a match.',
|
|
252
|
-
tone: 'subtle',
|
|
253
|
-
}, [
|
|
254
|
-
createZoraNode(`${idPrefix}-create-barcode-field`, 'FormField', {
|
|
255
|
-
label: 'Barcode',
|
|
256
|
-
description: 'Prefilled from scan or manual entry; normalized before the generated create operation.',
|
|
257
|
-
required: true,
|
|
258
|
-
}),
|
|
259
|
-
createZoraNode(`${idPrefix}-create-barcode-input`, 'Input', {
|
|
260
|
-
placeholder: '7612345678901',
|
|
261
|
-
keyboardType: 'number-pad',
|
|
262
|
-
size: 'm',
|
|
263
|
-
}),
|
|
264
|
-
createZoraNode(`${idPrefix}-create-name-field`, 'FormField', {
|
|
265
|
-
label: 'Product name',
|
|
266
|
-
description: 'Required by the minimal request.',
|
|
267
|
-
required: true,
|
|
268
|
-
}),
|
|
269
|
-
createZoraNode(`${idPrefix}-create-name-input`, 'Input', {
|
|
270
|
-
placeholder: 'Product name',
|
|
271
|
-
size: 'm',
|
|
272
|
-
}),
|
|
273
|
-
createZoraNode(`${idPrefix}-create-brand-field`, 'FormField', {
|
|
274
|
-
label: 'Brand',
|
|
275
|
-
description: 'Optional product brand.',
|
|
276
|
-
}),
|
|
277
|
-
createZoraNode(`${idPrefix}-create-brand-input`, 'Input', {
|
|
278
|
-
placeholder: 'Brand',
|
|
279
|
-
size: 'm',
|
|
280
|
-
}),
|
|
281
|
-
createZoraNode(`${idPrefix}-create-package-label-field`, 'FormField', {
|
|
282
|
-
label: 'Package label',
|
|
283
|
-
description: 'Optional package text such as 500ml or 6 x 33cl.',
|
|
284
|
-
}),
|
|
285
|
-
createZoraNode(`${idPrefix}-create-package-label-input`, 'Input', {
|
|
286
|
-
placeholder: '500ml',
|
|
287
|
-
size: 'm',
|
|
288
|
-
}),
|
|
289
|
-
createZoraNode(`${idPrefix}-create-nutrition-basis-field`, 'FormField', {
|
|
290
|
-
label: 'nutritionFacts.basis',
|
|
291
|
-
description: 'Use per_100g, per_100ml, or per_serving.',
|
|
292
|
-
}),
|
|
293
|
-
createZoraNode(`${idPrefix}-create-nutrition-basis-input`, 'Input', {
|
|
294
|
-
placeholder: 'per_100g',
|
|
295
|
-
autoCapitalize: 'none',
|
|
296
|
-
size: 'm',
|
|
297
|
-
}),
|
|
298
|
-
createZoraNode(`${idPrefix}-create-nutrition-facts-field`, 'FormField', {
|
|
299
|
-
label: 'nutritionFacts',
|
|
300
|
-
description: 'Structured numeric fields such as energyKcal, proteinG, carbohydratesG, sugarsG, fatG, and saltG.',
|
|
301
|
-
}),
|
|
302
|
-
createZoraNode(`${idPrefix}-create-nutrition-facts-input`, 'Input', {
|
|
303
|
-
placeholder: '{"energyKcal": 42, "proteinG": 3.4}',
|
|
304
|
-
autoCapitalize: 'none',
|
|
305
|
-
size: 'm',
|
|
306
|
-
}),
|
|
307
|
-
createZoraNode(`${idPrefix}-create-image-refs-field`, 'FormField', {
|
|
308
|
-
label: 'imageRefs',
|
|
309
|
-
description: 'Structured storage refs with bucket, path, kind, publicUrl, width, and height.',
|
|
310
|
-
}),
|
|
311
|
-
createZoraNode(`${idPrefix}-create-image-refs-input`, 'Input', {
|
|
312
|
-
placeholder: '[{"bucket":"nutrition","path":"products/front.jpg"}]',
|
|
313
|
-
autoCapitalize: 'none',
|
|
314
|
-
size: 'm',
|
|
315
|
-
}),
|
|
316
|
-
createZoraNode(`${idPrefix}-create-duplicate-notice`, 'Notice', {
|
|
317
|
-
title: 'Duplicate barcode handling',
|
|
318
|
-
description: 'Barcode uniqueness is enforced by the generated database operation; duplicate inserts surface as database-operation diagnostics.',
|
|
319
|
-
}),
|
|
320
|
-
createZoraNode(`${idPrefix}-create-submit-button`, 'Button', {
|
|
321
|
-
children: 'Create product',
|
|
322
|
-
color: 'primary',
|
|
323
|
-
size: 'm',
|
|
324
|
-
fullWidth: true,
|
|
325
|
-
}),
|
|
326
|
-
createZoraNode(`${idPrefix}-create-error-notice`, 'Notice', {
|
|
327
|
-
title: 'Validation and availability',
|
|
328
|
-
description: 'The generated app should surface invalid input and database-operation diagnostics without assuming HTTP status codes.',
|
|
329
|
-
}),
|
|
330
|
-
]);
|
|
331
|
-
}
|
|
3
|
+
import { createNutritionContentScreen } from './contentScreen';
|
|
4
|
+
import { createNutritionProductCreateBody } from './productCreateScreenBody';
|
|
5
|
+
import { createNutritionProductDetailBody, nutritionProductDetailOperation, } from './productDetailScreenBody';
|
|
6
|
+
import { createNutritionScanBody } from './scanScreenBody';
|
|
7
|
+
import { createNutritionSettingsScreen } from './settingsScreen';
|
|
332
8
|
export function createNutritionCatalogScanScreens(seed, idPrefix, screenIds) {
|
|
333
9
|
return {
|
|
334
|
-
[screenIds.catalog]:
|
|
10
|
+
[screenIds.catalog]: createNutritionContentScreen({
|
|
335
11
|
idPrefix,
|
|
336
12
|
screenId: screenIds.catalog,
|
|
337
13
|
name: 'Products',
|
|
338
14
|
content: nutritionCatalogScanContent.catalog,
|
|
339
|
-
body:
|
|
15
|
+
body: createNutritionCatalogBody(idPrefix),
|
|
340
16
|
}),
|
|
341
|
-
[screenIds.scan]:
|
|
17
|
+
[screenIds.scan]: createNutritionContentScreen({
|
|
342
18
|
idPrefix,
|
|
343
19
|
screenId: screenIds.scan,
|
|
344
20
|
name: 'Scan',
|
|
345
21
|
content: nutritionCatalogScanContent.scan,
|
|
346
|
-
body:
|
|
22
|
+
body: createNutritionScanBody(idPrefix),
|
|
347
23
|
requires: {
|
|
348
24
|
permissions: [{ permission: 'camera' }],
|
|
349
25
|
capabilities: [{ capability: 'barcodeScanner' }],
|
|
350
26
|
},
|
|
351
27
|
}),
|
|
352
|
-
[screenIds.stats]:
|
|
28
|
+
[screenIds.stats]: createNutritionContentScreen({
|
|
353
29
|
idPrefix,
|
|
354
30
|
screenId: screenIds.stats,
|
|
355
31
|
name: 'Stats',
|
|
356
32
|
content: nutritionCatalogScanContent.stats,
|
|
357
33
|
}),
|
|
358
|
-
[screenIds.profile]:
|
|
34
|
+
[screenIds.profile]: createNutritionContentScreen({
|
|
359
35
|
idPrefix,
|
|
360
36
|
screenId: screenIds.profile,
|
|
361
37
|
name: 'Profile',
|
|
362
38
|
content: nutritionCatalogScanContent.profile,
|
|
363
39
|
}),
|
|
364
|
-
[screenIds.detail]:
|
|
40
|
+
[screenIds.detail]: createNutritionContentScreen({
|
|
365
41
|
idPrefix,
|
|
366
42
|
screenId: screenIds.detail,
|
|
367
43
|
name: 'Product Detail',
|
|
368
44
|
content: nutritionCatalogScanContent.detail,
|
|
369
|
-
body:
|
|
45
|
+
body: createNutritionProductDetailBody(idPrefix),
|
|
370
46
|
dataLoaders: [
|
|
371
47
|
{
|
|
372
48
|
kind: 'operation',
|
|
373
49
|
id: 'product-detail',
|
|
374
|
-
operation:
|
|
50
|
+
operation: nutritionProductDetailOperation,
|
|
375
51
|
input: {
|
|
376
52
|
id: {
|
|
377
53
|
kind: 'source',
|
|
378
|
-
source: {
|
|
379
|
-
kind: 'context',
|
|
380
|
-
path: 'route.params.id',
|
|
381
|
-
},
|
|
54
|
+
source: { kind: 'context', path: 'route.params.id' },
|
|
382
55
|
},
|
|
383
56
|
},
|
|
384
57
|
},
|
|
385
58
|
],
|
|
386
59
|
}),
|
|
387
|
-
[screenIds.create]:
|
|
60
|
+
[screenIds.create]: createNutritionContentScreen({
|
|
388
61
|
idPrefix,
|
|
389
62
|
screenId: screenIds.create,
|
|
390
63
|
name: 'Create',
|
|
391
64
|
content: nutritionCatalogScanContent.create,
|
|
392
|
-
body:
|
|
65
|
+
body: createNutritionProductCreateBody(idPrefix),
|
|
393
66
|
}),
|
|
394
|
-
[screenIds.signIn]:
|
|
67
|
+
[screenIds.signIn]: createNutritionContentScreen({
|
|
395
68
|
idPrefix,
|
|
396
69
|
screenId: screenIds.signIn,
|
|
397
70
|
name: 'Sign In',
|
|
398
71
|
content: nutritionCatalogScanContent.signIn,
|
|
399
72
|
}),
|
|
400
|
-
[screenIds.signUp]:
|
|
73
|
+
[screenIds.signUp]: createNutritionContentScreen({
|
|
401
74
|
idPrefix,
|
|
402
75
|
screenId: screenIds.signUp,
|
|
403
76
|
name: 'Sign Up',
|
|
404
77
|
content: nutritionCatalogScanContent.signUp,
|
|
405
78
|
}),
|
|
406
|
-
[screenIds.settings]:
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
description: nutritionCatalogScanContent.settings.description,
|
|
411
|
-
root: createScreenRoot(`${idPrefix}-settings-screen`, { width: 'default' }, [
|
|
412
|
-
createZoraNode(`${idPrefix}-settings-header`, 'SectionHeader', {
|
|
413
|
-
eyebrow: nutritionCatalogScanContent.settings.eyebrow,
|
|
414
|
-
title: nutritionCatalogScanContent.settings.title,
|
|
415
|
-
description: nutritionCatalogScanContent.settings.description,
|
|
416
|
-
}),
|
|
417
|
-
createSettingsSection(`${idPrefix}-settings-api`, 'Nutrition API', 'Runtime nutrition product lookup and CRUD should go through the nutrition API.', [
|
|
418
|
-
{
|
|
419
|
-
id: 'base-url-row',
|
|
420
|
-
title: 'API base URL',
|
|
421
|
-
description: 'Defaults to https://api.ankhorage.com/v1/nutrition.',
|
|
422
|
-
meta: 'runtime',
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
id: 'health-row',
|
|
426
|
-
title: 'Health check',
|
|
427
|
-
description: 'GET /health verifies that the nutrition backend is reachable.',
|
|
428
|
-
meta: 'health',
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
id: 'product-create-row',
|
|
432
|
-
title: 'Product create endpoint',
|
|
433
|
-
description: 'POST /products creates a product directly from the app.',
|
|
434
|
-
meta: 'create',
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
id: 'client-row',
|
|
438
|
-
title: 'Client defaults',
|
|
439
|
-
description: `${seed.appName} uses de-CH locale and normalizes barcode input before nutrition API lookup.`,
|
|
440
|
-
meta: 'de-CH',
|
|
441
|
-
},
|
|
442
|
-
]),
|
|
443
|
-
]),
|
|
79
|
+
[screenIds.settings]: createNutritionSettingsScreen({
|
|
80
|
+
seed,
|
|
81
|
+
idPrefix,
|
|
82
|
+
screenId: screenIds.settings,
|
|
444
83
|
}),
|
|
445
84
|
};
|
|
446
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screens.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,cAAc,GAEf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AAsBxD,MAAM,4BAA4B,GAAG;IACnC,YAAY,EAAE,oBAAoB;IAClC,UAAU,EAAE,UAAU;IACtB,WAAW,EAAE,eAAe;CACpB,CAAC;AAEX,SAAS,mBAAmB,CAAC,IAQ5B;IACC,MAAM,SAAS,GAAG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EAAE,QAAQ;qBACf;oBACD;wBACE,EAAE,EAAE,oBAAoB;wBACxB,KAAK,EAAE,yBAAyB;wBAChC,WAAW,EAAE,yDAAyD;wBACtE,IAAI,EAAE,QAAQ;qBACf;oBACD;wBACE,EAAE,EAAE,YAAY;wBAChB,KAAK,EAAE,iBAAiB;wBACxB,WAAW,EAAE,GAAG,IAAI,CAAC,OAAO,8EAA8E;wBAC1G,IAAI,EAAE,OAAO;qBACd;iBACF,CACF;aACF,CAAC;SACH,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"screens.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EACL,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,UAAU,iCAAiC,CAC/C,IAAkB,EAClB,QAAgB,EAChB,SAAwC;IAExC,OAAO;QACL,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,4BAA4B,CAAC;YAChD,QAAQ;YACR,QAAQ,EAAE,SAAS,CAAC,OAAO;YAC3B,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,2BAA2B,CAAC,OAAO;YAC5C,IAAI,EAAE,0BAA0B,CAAC,QAAQ,CAAC;SAC3C,CAAC;QACF,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,4BAA4B,CAAC;YAC7C,QAAQ;YACR,QAAQ,EAAE,S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AAS,CAAC,MAAM;YAC1B,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,2BAA2B,CAAC,MAAM;YAC3C,IAAI,EAAE,gCAAgC,CAAC,QAAQ,CAAC;SACjD,CAAC;QACF,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,4BAA4B,CAAC;YAC/C,QAAQ;YACR,QAAQ,EAAE,SAAS,CAAC,MAAM;YAC1B,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,2BAA2B,CAAC,MAAM;SAC5C,CAAC;QACF,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,4BAA4B,CAAC;YAC/C,QAAQ;YACR,QAAQ,EAAE,SAAS,CAAC,MAAM;YAC1B,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,2BAA2B,CAAC,MAAM;SAC5C,CAAC;QACF,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,6BAA6B,CAAC;YAClD,IAAI;YACJ,QAAQ;YACR,QAAQ,EAAE,SAAS,CAAC,QAAQ;SAC7B,CAAC;KACH,CAAC;AACJ,CAAC"}
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/settingsScreen.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AppManifest } from '@ankhorage/contracts';
|
|
2
|
+
import type { TemplateSeed } from '../../../starter.types';
|
|
3
|
+
export declare function createNutritionSettingsScreen(args: {
|
|
4
|
+
readonly seed: TemplateSeed;
|
|
5
|
+
readonly idPrefix: string;
|
|
6
|
+
readonly screenId: string;
|
|
7
|
+
}): AppManifest['screens'][string];
|
|
8
|
+
//# sourceMappingURL=settingsScreen.d.ts.map
|