@ankhorage/templates 1.8.3 → 1.8.5
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 +14 -0
- package/README.md +8 -7
- package/dist/templates/shared/route.d.ts +5 -3
- package/dist/templates/shared/route.d.ts.map +1 -1
- package/dist/templates/shared/route.js +4 -2
- package/dist/templates/shared/route.js.map +1 -1
- package/dist/templates/starter/categories/food-drink/index.js +1 -1
- package/dist/templates/starter/categories/food-drink/index.js.map +1 -1
- 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 +179 -99
- 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/content.d.ts +2 -30
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/content.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/content.js +26 -72
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/content.js.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.js +29 -12
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.js.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/routes.d.ts +2 -4
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/routes.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/routes.js +33 -18
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/routes.js.map +1 -1
- 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 +121 -36
- 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/template.js +2 -2
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/template.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,24 +2,24 @@ export const nutritionCatalogScanContent = {
|
|
|
2
2
|
catalog: {
|
|
3
3
|
eyebrow: 'Signed-in nutrition catalog',
|
|
4
4
|
title: 'Catalog products',
|
|
5
|
-
description: 'Signed-in scanners browse the shared Swiss product catalog, scan barcodes, and create missing products directly through the
|
|
5
|
+
description: 'Signed-in scanners browse the shared Swiss product catalog, scan barcodes, and create missing products directly through the nutrition API.',
|
|
6
6
|
sections: [
|
|
7
7
|
{
|
|
8
|
-
title: '
|
|
8
|
+
title: 'Product catalog',
|
|
9
9
|
description: 'The whole app is protected by global auth. Product browsing happens after sign-in.',
|
|
10
10
|
cards: [
|
|
11
11
|
{
|
|
12
12
|
eyebrow: 'Known product',
|
|
13
13
|
title: 'Bio Greek Yogurt 250 g',
|
|
14
|
-
description: 'Example product card with brand, package label, barcode, and
|
|
14
|
+
description: 'Example product card with brand, package label, barcode, and nutritionFacts metadata.',
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
eyebrow: 'Known product',
|
|
18
18
|
title: 'Haferdrink Barista 1 l',
|
|
19
|
-
description: 'Products are read through the API
|
|
19
|
+
description: 'Products are read through the nutrition API, not directly from Supabase.',
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
eyebrow: '
|
|
22
|
+
eyebrow: 'Catalog growth',
|
|
23
23
|
title: 'Missing supermarket products',
|
|
24
24
|
description: 'Missing barcodes can be turned into real products immediately from the create screen.',
|
|
25
25
|
},
|
|
@@ -32,12 +32,12 @@ export const nutritionCatalogScanContent = {
|
|
|
32
32
|
{
|
|
33
33
|
eyebrow: 'Action',
|
|
34
34
|
title: 'Scan barcode',
|
|
35
|
-
description: 'Open the scanner, normalize barcode digits, and look up the product through the
|
|
35
|
+
description: 'Open the scanner, normalize barcode digits, and look up the product through the nutrition API.',
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
eyebrow: 'Create path',
|
|
39
39
|
title: 'Direct product creation',
|
|
40
|
-
description: 'When a barcode is unknown, the app opens a direct product create form instead of
|
|
40
|
+
description: 'When a barcode is unknown, the app opens a direct product create form instead of any intermediate queue.',
|
|
41
41
|
},
|
|
42
42
|
],
|
|
43
43
|
},
|
|
@@ -46,21 +46,21 @@ export const nutritionCatalogScanContent = {
|
|
|
46
46
|
detail: {
|
|
47
47
|
eyebrow: 'Published product',
|
|
48
48
|
title: 'Product detail',
|
|
49
|
-
description: 'Show barcode, brand,
|
|
49
|
+
description: 'Show barcode, brand, packageLabel, imageRefs, and nutritionFacts from the nutrition API.',
|
|
50
50
|
sections: [
|
|
51
51
|
{
|
|
52
52
|
title: 'Product summary',
|
|
53
|
-
description: 'A product detail screen for
|
|
53
|
+
description: 'A product detail screen for the current NutritionProduct DTO.',
|
|
54
54
|
cards: [
|
|
55
55
|
{
|
|
56
56
|
eyebrow: 'Primary barcode',
|
|
57
|
-
title: '7612345678901 ·
|
|
57
|
+
title: '7612345678901 · ean_13',
|
|
58
58
|
description: 'Barcode values are normalized by removing non-digits before lookup.',
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
eyebrow: 'Stable DTO',
|
|
62
|
-
title: '
|
|
63
|
-
description: 'The detail payload exposes packageLabel, nutritionFacts, imageRefs, and soft-delete
|
|
62
|
+
title: 'Product-centric response shape',
|
|
63
|
+
description: 'The detail payload exposes packageLabel, nutritionFacts, imageRefs, createdAt, updatedAt, and optional soft-delete metadata.',
|
|
64
64
|
},
|
|
65
65
|
],
|
|
66
66
|
},
|
|
@@ -83,13 +83,13 @@ export const nutritionCatalogScanContent = {
|
|
|
83
83
|
{
|
|
84
84
|
eyebrow: 'Fallback',
|
|
85
85
|
title: 'Manual barcode entry',
|
|
86
|
-
description: '
|
|
86
|
+
description: 'Manual entry should use the same lookup path as the scanner on web, simulator, denied camera permission, or damaged retail labels.',
|
|
87
87
|
},
|
|
88
88
|
],
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
title: 'Lookup branch',
|
|
92
|
-
description: 'After scanning, call GET /
|
|
92
|
+
description: 'After scanning, call GET /products/by-barcode/:barcode.',
|
|
93
93
|
cards: [
|
|
94
94
|
{
|
|
95
95
|
eyebrow: 'Found',
|
|
@@ -105,10 +105,10 @@ export const nutritionCatalogScanContent = {
|
|
|
105
105
|
},
|
|
106
106
|
],
|
|
107
107
|
},
|
|
108
|
-
|
|
108
|
+
create: {
|
|
109
109
|
eyebrow: 'Direct create flow',
|
|
110
110
|
title: 'Create product',
|
|
111
|
-
description: 'Collect the minimal data needed to create a nutrition product directly through the
|
|
111
|
+
description: 'Collect the minimal data needed to create a nutrition product directly through the nutrition API.',
|
|
112
112
|
sections: [
|
|
113
113
|
{
|
|
114
114
|
title: 'Required fields',
|
|
@@ -116,31 +116,31 @@ export const nutritionCatalogScanContent = {
|
|
|
116
116
|
cards: [
|
|
117
117
|
{
|
|
118
118
|
eyebrow: 'Product identity',
|
|
119
|
-
title: '
|
|
119
|
+
title: 'barcode, name, brand',
|
|
120
120
|
description: 'The barcode is prefilled from the scanner or manual input.',
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
eyebrow: 'Packaging',
|
|
124
|
-
title: '
|
|
124
|
+
title: 'packageLabel',
|
|
125
125
|
description: 'Store package text such as 500ml, 1L, or 6 x 33cl.',
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
|
-
eyebrow: '
|
|
129
|
-
title: '
|
|
130
|
-
description: '
|
|
128
|
+
eyebrow: 'Structured data',
|
|
129
|
+
title: 'nutritionFacts and imageRefs',
|
|
130
|
+
description: 'Use the current DTO fields directly so create requests can match the live product contract.',
|
|
131
131
|
},
|
|
132
132
|
],
|
|
133
133
|
},
|
|
134
134
|
],
|
|
135
135
|
},
|
|
136
|
-
|
|
136
|
+
stats: {
|
|
137
137
|
eyebrow: 'Catalog progress',
|
|
138
138
|
title: 'Stats',
|
|
139
139
|
description: 'Use this screen for catalog growth, scan throughput, and contributor-facing nutrition app metrics.',
|
|
140
140
|
sections: [
|
|
141
141
|
{
|
|
142
142
|
title: 'Suggested metrics',
|
|
143
|
-
description: 'This starter
|
|
143
|
+
description: 'This starter keeps metrics focused on the product catalog and scanner flow.',
|
|
144
144
|
cards: [
|
|
145
145
|
{
|
|
146
146
|
eyebrow: 'Catalog',
|
|
@@ -159,7 +159,7 @@ export const nutritionCatalogScanContent = {
|
|
|
159
159
|
profile: {
|
|
160
160
|
eyebrow: 'Scanner profile',
|
|
161
161
|
title: 'Profile',
|
|
162
|
-
description: 'Show signed-in scanner profile, stats, invite status, and sign-out action.',
|
|
162
|
+
description: 'Show signed-in scanner profile, catalog stats, invite status, and sign-out action.',
|
|
163
163
|
sections: [
|
|
164
164
|
{
|
|
165
165
|
title: 'Profile data',
|
|
@@ -179,52 +179,6 @@ export const nutritionCatalogScanContent = {
|
|
|
179
179
|
},
|
|
180
180
|
],
|
|
181
181
|
},
|
|
182
|
-
success: {
|
|
183
|
-
eyebrow: 'Product created',
|
|
184
|
-
title: 'Thanks - product created',
|
|
185
|
-
description: 'The API returns the created product directly, so the app can open detail or continue scanning immediately.',
|
|
186
|
-
sections: [
|
|
187
|
-
{
|
|
188
|
-
title: 'Next actions',
|
|
189
|
-
description: 'Keep contributors in the scan loop.',
|
|
190
|
-
cards: [
|
|
191
|
-
{
|
|
192
|
-
eyebrow: 'Continue',
|
|
193
|
-
title: 'Scan another product',
|
|
194
|
-
description: 'Return to the scan screen for fast in-store collection.',
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
eyebrow: 'Ranking',
|
|
198
|
-
title: 'Open product detail',
|
|
199
|
-
description: 'Show the freshly created product and let the scanner add more metadata later.',
|
|
200
|
-
},
|
|
201
|
-
],
|
|
202
|
-
},
|
|
203
|
-
],
|
|
204
|
-
},
|
|
205
|
-
queue: {
|
|
206
|
-
eyebrow: 'Offline-ready shell',
|
|
207
|
-
title: 'Create queue',
|
|
208
|
-
description: 'A simple local queue abstraction prepares the signed-in app for offline retry without losing direct-create field data.',
|
|
209
|
-
sections: [
|
|
210
|
-
{
|
|
211
|
-
title: 'Queue states',
|
|
212
|
-
description: 'Use ZORA cards and notices for pending, failed, and submitted items.',
|
|
213
|
-
cards: [
|
|
214
|
-
{
|
|
215
|
-
eyebrow: 'Pending',
|
|
216
|
-
title: 'Waiting for connection',
|
|
217
|
-
description: 'Create requests can be stored locally until the gateway is reachable again.',
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
eyebrow: 'Failed',
|
|
221
|
-
title: 'Retry required',
|
|
222
|
-
description: 'Keep failures visible instead of silently dropping scanner data.',
|
|
223
|
-
},
|
|
224
|
-
],
|
|
225
|
-
},
|
|
226
|
-
],
|
|
227
|
-
},
|
|
228
182
|
signIn: {
|
|
229
183
|
eyebrow: 'Restricted access',
|
|
230
184
|
title: 'Sign in',
|
|
@@ -246,7 +200,7 @@ export const nutritionCatalogScanContent = {
|
|
|
246
200
|
signUp: {
|
|
247
201
|
eyebrow: 'Join scanner app',
|
|
248
202
|
title: 'Create scanner account',
|
|
249
|
-
description: 'Create an account with display name
|
|
203
|
+
description: 'Create an account with display name before scanning.',
|
|
250
204
|
sections: [
|
|
251
205
|
{
|
|
252
206
|
title: 'Profile creation',
|
|
@@ -264,7 +218,7 @@ export const nutritionCatalogScanContent = {
|
|
|
264
218
|
settings: {
|
|
265
219
|
eyebrow: 'Nutrition app settings',
|
|
266
220
|
title: 'Settings',
|
|
267
|
-
description: 'Configuration for API
|
|
221
|
+
description: 'Configuration for nutrition API base URL, locale, profile table, and nutrition scanner auth.',
|
|
268
222
|
sections: [
|
|
269
223
|
{
|
|
270
224
|
title: 'Runtime configuration',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/content.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE;QACP,OAAO,EAAE,6BAA6B;QACtC,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/content.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE;QACP,OAAO,EAAE,6BAA6B;QACtC,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,4IAA4I;QAC9I,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EACT,oFAAoF;gBACtF,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,eAAe;wBACxB,KAAK,EAAE,wBAAwB;wBAC/B,WAAW,EACT,uFAAuF;qBAC1F;oBACD;wBACE,OAAO,EAAE,eAAe;wBACxB,KAAK,EAAE,wBAAwB;wBAC/B,WAAW,EAAE,0EAA0E;qBACxF;oBACD;wBACE,OAAO,EAAE,gBAAgB;wBACzB,KAAK,EAAE,8BAA8B;wBACrC,WAAW,EACT,uFAAuF;qBAC1F;iBACF;aACF;YACD;gBACE,KAAK,EAAE,cAAc;gBACrB,WAAW,EACT,kGAAkG;gBACpG,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,QAAQ;wBACjB,KAAK,EAAE,cAAc;wBACrB,WAAW,EACT,gGAAgG;qBACnG;oBACD;wBACE,OAAO,EAAE,aAAa;wBACtB,KAAK,EAAE,yBAAyB;wBAChC,WAAW,EACT,0GAA0G;qBAC7G;iBACF;aACF;SACF;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE,mBAAmB;QAC5B,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,0FAA0F;QAC5F,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,+DAA+D;gBAC5E,KAAK,EAAE;oB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;IACD,MAAM,EAAE;QACN,OAAO,EAAE,kBAAkB;QAC3B,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,sDAAsD;QACnE,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,uEAAuE;gBACpF,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,iBAAiB;wBAC1B,KAAK,EAAE,+BAA+B;wBACtC,WAAW,EACT,kFAAkF;qBACrF;iBACF;aACF;SACF;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,wBAAwB;QACjC,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,8FAA8F;QAChG,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,uBAAuB;gBAC9B,WAAW,EAAE,+DAA+D;gBAC5E,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,sBAAsB;wBAC7B,WAAW,EAAE,kDAAkD;qBAChE;iBACF;aACF;SACF;KACF;CACsD,CAAC"}
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSources.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,wBAAgB,qCAAqC,IAAI,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"dataSources.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,wBAAgB,qCAAqC,IAAI,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAgG/F"}
|
|
@@ -7,13 +7,30 @@ export function createNutritionCatalogScanDataSources() {
|
|
|
7
7
|
description: 'Runtime data-source bindings for nutrition product browsing, lookup, and CRUD.',
|
|
8
8
|
baseUrl: 'https://api.ankhorage.com/v1/nutrition',
|
|
9
9
|
endpoints: {
|
|
10
|
+
health: {
|
|
11
|
+
id: 'health',
|
|
12
|
+
kind: 'http',
|
|
13
|
+
path: '/health',
|
|
14
|
+
operations: {
|
|
15
|
+
'nutrition.health': {
|
|
16
|
+
id: 'nutrition.health',
|
|
17
|
+
endpointId: 'health',
|
|
18
|
+
name: 'Nutrition health',
|
|
19
|
+
description: 'Checks whether the nutrition API is available.',
|
|
20
|
+
protocol: 'http',
|
|
21
|
+
intent: 'read',
|
|
22
|
+
method: 'GET',
|
|
23
|
+
path: '/health',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
10
27
|
products: {
|
|
11
28
|
id: 'products',
|
|
12
29
|
kind: 'http',
|
|
13
30
|
path: '/products',
|
|
14
31
|
operations: {
|
|
15
|
-
'products.list': {
|
|
16
|
-
id: 'products.list',
|
|
32
|
+
'nutrition.products.list': {
|
|
33
|
+
id: 'nutrition.products.list',
|
|
17
34
|
endpointId: 'products',
|
|
18
35
|
name: 'List products',
|
|
19
36
|
description: 'Lists catalog products for the products grid.',
|
|
@@ -22,8 +39,8 @@ export function createNutritionCatalogScanDataSources() {
|
|
|
22
39
|
method: 'GET',
|
|
23
40
|
path: '/products',
|
|
24
41
|
},
|
|
25
|
-
'products.
|
|
26
|
-
id: 'products.
|
|
42
|
+
'nutrition.products.getById': {
|
|
43
|
+
id: 'nutrition.products.getById',
|
|
27
44
|
endpointId: 'products',
|
|
28
45
|
name: 'Read product detail',
|
|
29
46
|
description: 'Reads a single product detail entry by ID.',
|
|
@@ -32,8 +49,8 @@ export function createNutritionCatalogScanDataSources() {
|
|
|
32
49
|
method: 'GET',
|
|
33
50
|
path: '/products/:id',
|
|
34
51
|
},
|
|
35
|
-
'products.
|
|
36
|
-
id: 'products.
|
|
52
|
+
'nutrition.products.getByBarcode': {
|
|
53
|
+
id: 'nutrition.products.getByBarcode',
|
|
37
54
|
endpointId: 'products',
|
|
38
55
|
name: 'Lookup product by barcode',
|
|
39
56
|
description: 'Looks up a product by scanned barcode.',
|
|
@@ -42,8 +59,8 @@ export function createNutritionCatalogScanDataSources() {
|
|
|
42
59
|
method: 'GET',
|
|
43
60
|
path: '/products/by-barcode/:barcode',
|
|
44
61
|
},
|
|
45
|
-
'products.create': {
|
|
46
|
-
id: 'products.create',
|
|
62
|
+
'nutrition.products.create': {
|
|
63
|
+
id: 'nutrition.products.create',
|
|
47
64
|
endpointId: 'products',
|
|
48
65
|
name: 'Create nutrition product',
|
|
49
66
|
description: 'Creates a product directly from the create screen.',
|
|
@@ -52,8 +69,8 @@ export function createNutritionCatalogScanDataSources() {
|
|
|
52
69
|
method: 'POST',
|
|
53
70
|
path: '/products',
|
|
54
71
|
},
|
|
55
|
-
'products.update': {
|
|
56
|
-
id: 'products.update',
|
|
72
|
+
'nutrition.products.update': {
|
|
73
|
+
id: 'nutrition.products.update',
|
|
57
74
|
endpointId: 'products',
|
|
58
75
|
name: 'Update nutrition product',
|
|
59
76
|
description: 'Updates an existing product by ID.',
|
|
@@ -62,8 +79,8 @@ export function createNutritionCatalogScanDataSources() {
|
|
|
62
79
|
method: 'PATCH',
|
|
63
80
|
path: '/products/:id',
|
|
64
81
|
},
|
|
65
|
-
'products.delete': {
|
|
66
|
-
id: 'products.delete',
|
|
82
|
+
'nutrition.products.delete': {
|
|
83
|
+
id: 'nutrition.products.delete',
|
|
67
84
|
endpointId: 'products',
|
|
68
85
|
name: 'Delete nutrition product',
|
|
69
86
|
description: 'Soft deletes a product by ID.',
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSources.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qCAAqC;IACnD,OAAO;QACL,eAAe,EAAE;YACf,EAAE,EAAE,eAAe;YACnB,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,gFAAgF;YAC7F,OAAO,EAAE,wCAAwC;YACjD,SAAS,EAAE;gBACT,QAAQ,EAAE;oBACR,EAAE,EAAE,UAAU;oBACd,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,WAAW;oBACjB,UAAU,EAAE;wBACV,
|
|
1
|
+
{"version":3,"file":"dataSources.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qCAAqC;IACnD,OAAO;QACL,eAAe,EAAE;YACf,EAAE,EAAE,eAAe;YACnB,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,gFAAgF;YAC7F,OAAO,EAAE,wCAAwC;YACjD,SAAS,EAAE;gBACT,MAAM,EAAE;oBACN,EAAE,EAAE,QAAQ;oBACZ,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE;wBACV,kBAAkB,EAAE;4BAClB,EAAE,EAAE,kBAAkB;4BACtB,UAAU,EAAE,QAAQ;4BACpB,IAAI,EAAE,kBAAkB;4BACxB,WAAW,EAAE,gDAAgD;4BAC7D,QAAQ,EAAE,MAAM;4BAChB,MAAM,EAAE,MAAM;4BACd,MAAM,EAAE,KAAK;4BACb,IAAI,EAAE,SAAS;yBAChB;qBACF;iBACF;gBACD,QAAQ,EAAE;oBACR,EAAE,EAAE,UAAU;oBACd,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,WAAW;oBACjB,UAAU,EAAE;wBACV,yBAAyB,EAAE;4BACzB,EAAE,EAAE,yBAAyB;4BAC7B,UAAU,EAAE,UAAU;4BACtB,IAAI,EAAE,eAAe;4BACrB,WAAW,EA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AAM;4BAChB,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,QAAQ;4BAChB,IAAI,EAAE,eAAe;yBACtB;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -3,10 +3,8 @@ export interface NutritionCatalogScanScreenIds {
|
|
|
3
3
|
readonly catalog: string;
|
|
4
4
|
readonly detail: string;
|
|
5
5
|
readonly scan: string;
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly queue: string;
|
|
9
|
-
readonly leaderboard: string;
|
|
6
|
+
readonly create: string;
|
|
7
|
+
readonly stats: string;
|
|
10
8
|
readonly profile: string;
|
|
11
9
|
readonly signIn: string;
|
|
12
10
|
readonly signUp: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,MAAM,GACf,6BAA6B,CAY/B;AAED,wBAAgB,mCAAmC,CACjD,SAAS,EAAE,6BAA6B,GACvC,WAAW,CAAC,WAAW,CAAC,CA4D1B"}
|
|
@@ -4,10 +4,8 @@ export function createNutritionCatalogScanScreenIds(idPrefix) {
|
|
|
4
4
|
catalog: `${idPrefix}-catalog`,
|
|
5
5
|
detail: `${idPrefix}-detail`,
|
|
6
6
|
scan: `${idPrefix}-scan`,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
queue: `${idPrefix}-queue`,
|
|
10
|
-
leaderboard: `${idPrefix}-leaderboard`,
|
|
7
|
+
create: `${idPrefix}-create`,
|
|
8
|
+
stats: `${idPrefix}-stats`,
|
|
11
9
|
profile: `${idPrefix}-profile`,
|
|
12
10
|
signIn: `${idPrefix}-sign-in`,
|
|
13
11
|
signUp: `${idPrefix}-sign-up`,
|
|
@@ -17,13 +15,42 @@ export function createNutritionCatalogScanScreenIds(idPrefix) {
|
|
|
17
15
|
export function createNutritionCatalogScanNavigator(screenIds) {
|
|
18
16
|
return {
|
|
19
17
|
type: 'tabs',
|
|
20
|
-
initialRouteName: '
|
|
18
|
+
initialRouteName: 'products',
|
|
21
19
|
routes: [
|
|
22
20
|
createRoute({
|
|
23
21
|
name: 'index',
|
|
22
|
+
path: '/',
|
|
24
23
|
screenId: screenIds.catalog,
|
|
25
24
|
label: 'Products',
|
|
25
|
+
hideInTabBar: true,
|
|
26
|
+
}),
|
|
27
|
+
createRoute({
|
|
28
|
+
name: 'products',
|
|
29
|
+
label: 'Products',
|
|
26
30
|
icon: { provider: 'material-community', name: 'package-variant-closed' },
|
|
31
|
+
navigator: {
|
|
32
|
+
type: 'stack',
|
|
33
|
+
initialRouteName: 'index',
|
|
34
|
+
routes: [
|
|
35
|
+
createRoute({
|
|
36
|
+
name: 'index',
|
|
37
|
+
screenId: screenIds.catalog,
|
|
38
|
+
label: 'Products',
|
|
39
|
+
}),
|
|
40
|
+
createRoute({
|
|
41
|
+
name: '[id]',
|
|
42
|
+
screenId: screenIds.detail,
|
|
43
|
+
label: 'Product detail',
|
|
44
|
+
hideInTabBar: true,
|
|
45
|
+
}),
|
|
46
|
+
createRoute({
|
|
47
|
+
name: 'create',
|
|
48
|
+
screenId: screenIds.create,
|
|
49
|
+
label: 'Create product',
|
|
50
|
+
hideInTabBar: true,
|
|
51
|
+
}),
|
|
52
|
+
],
|
|
53
|
+
},
|
|
27
54
|
}),
|
|
28
55
|
createRoute({
|
|
29
56
|
name: 'scan',
|
|
@@ -33,7 +60,7 @@ export function createNutritionCatalogScanNavigator(screenIds) {
|
|
|
33
60
|
}),
|
|
34
61
|
createRoute({
|
|
35
62
|
name: 'stats',
|
|
36
|
-
screenId: screenIds.
|
|
63
|
+
screenId: screenIds.stats,
|
|
37
64
|
label: 'Stats',
|
|
38
65
|
icon: { provider: 'material-community', name: 'chart-bar' },
|
|
39
66
|
}),
|
|
@@ -43,18 +70,6 @@ export function createNutritionCatalogScanNavigator(screenIds) {
|
|
|
43
70
|
label: 'Profile',
|
|
44
71
|
icon: { provider: 'material-community', name: 'account-circle-outline' },
|
|
45
72
|
}),
|
|
46
|
-
createRoute({
|
|
47
|
-
name: '/products/[id]',
|
|
48
|
-
screenId: screenIds.detail,
|
|
49
|
-
label: 'Product detail',
|
|
50
|
-
hideInTabBar: true,
|
|
51
|
-
}),
|
|
52
|
-
createRoute({
|
|
53
|
-
name: '/products/create',
|
|
54
|
-
screenId: screenIds.capture,
|
|
55
|
-
label: 'Create product',
|
|
56
|
-
hideInTabBar: true,
|
|
57
|
-
}),
|
|
58
73
|
],
|
|
59
74
|
};
|
|
60
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/routes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/routes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAcjD,MAAM,UAAU,mCAAmC,CACjD,QAAgB;IAEhB,OAAO;QACL,OAAO,EAAE,GAAG,QAAQ,UAAU;QAC9B,MAAM,EAAE,GAAG,QAAQ,SAAS;QAC5B,IAAI,EAAE,GAAG,QAAQ,OAAO;QACxB,MAAM,EAAE,GAAG,QAAQ,SAAS;QAC5B,KAAK,EAAE,GAAG,QAAQ,QAAQ;QAC1B,OAAO,EAAE,GAAG,QAAQ,UAAU;QAC9B,MAAM,EAAE,GAAG,QAAQ,UAAU;QAC7B,MAAM,EAAE,GAAG,QAAQ,UAAU;QAC7B,QAAQ,EAAE,GAAG,QAAQ,WAAW;KACjC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,SAAwC;IAExC,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,gBAAgB,EAAE,UAAU;QAC5B,MAAM,EAAE;YACN,WAAW,CAAC;gBACV,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,GAAG;gBACT,QAAQ,EAAE,SAAS,CAAC,OAAO;gBAC3B,KAAK,EAAE,UAAU;gBACjB,YAAY,EAAE,IAAI;aACnB,CAAC;YACF,WAAW,CAAC;gBACV,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,wBAAwB,EAAE;gBACxE,SAAS,EAAE;oBACT,IAAI,EAAE,OAAO;oBACb,gBAAgB,EAAE,OAAO;oBACzB,MAAM,EAAE;wBACN,WAAW,CAAC;4BACV,IAAI,EAAE,OAAO;4BACb,QAAQ,EAAE,SAAS,CAAC,OAAO;4BAC3B,KAAK,EAAE,UAAU;yBAClB,CAAC;wBACF,WAAW,CAAC;4BACV,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,SAAS,CAAC,MAAM;4BAC1B,KAAK,EAAE,gBAAgB;4BACvB,YAAY,EAAE,IAAI;yBACnB,CAAC;wBACF,WAAW,CAAC;4BACV,IAAI,EAAE,QAAQ;4BACd,QAAQ,EAAE,SAAS,CAAC,MAAM;4BAC1B,KAAK,EAAE,gBAAgB;4BACvB,YAAY,EAAE,IAAI;yBACnB,CAAC;qBACH;iBACF;aACF,CAAC;YACF,WAAW,CAAC;gBACV,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,SAAS,CAAC,IAAI;gBACxB,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,cAAc,EAAE;aAC/D,CAAC;YACF,WAAW,CAAC;gBACV,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,SAAS,CAAC,KAAK;gBACzB,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,WAAW,EAAE;aAC5D,CAAC;YACF,WAAW,CAAC;gBACV,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,SAAS,CAAC,OAAO;gBAC3B,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,wBAAwB,EAAE;aACzE,CAAC;SACH;KACF,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;AAUxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,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;AAUxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAiT9D,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,6BAA6B,GACvC,WAAW,CAAC,SAAS,CAAC,CAuGxB"}
|