@ankhorage/templates 1.8.2 → 1.8.4
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 +17 -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 +180 -100
- 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 -44
- 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 +64 -138
- 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/data.d.ts +10 -193
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/data.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/data.js +19 -142
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/data.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 +52 -15
- 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 -5
- 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 +29 -21
- 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 +141 -46
- 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
|
@@ -6,7 +6,7 @@ export const nutritionCatalogScanData = {
|
|
|
6
6
|
kind: 'generated',
|
|
7
7
|
preset: 'crud',
|
|
8
8
|
label: 'Nutrition products',
|
|
9
|
-
description: '
|
|
9
|
+
description: 'Nutrition product records available to the scanner app through the gateway.',
|
|
10
10
|
basePath: '/v1/nutrition/products',
|
|
11
11
|
auth: authRequired,
|
|
12
12
|
resource: {
|
|
@@ -18,14 +18,17 @@ export const nutritionCatalogScanData = {
|
|
|
18
18
|
fields: [
|
|
19
19
|
{ name: 'id', type: 'uuid', required: true },
|
|
20
20
|
{ name: 'barcode', type: 'text', required: true, unique: true },
|
|
21
|
+
{ name: 'normalizedBarcode', type: 'text', required: true, unique: true },
|
|
22
|
+
{ name: 'barcodeType', type: 'text' },
|
|
21
23
|
{ name: 'name', type: 'text', required: true },
|
|
22
24
|
{ name: 'brand', type: 'text' },
|
|
23
|
-
{ name: '
|
|
24
|
-
{ name: 'country', type: 'text', required: true, defaultValue: 'CH' },
|
|
25
|
+
{ name: 'packageLabel', type: 'text' },
|
|
25
26
|
{ name: 'nutritionFacts', type: 'json' },
|
|
26
|
-
{ name: '
|
|
27
|
+
{ name: 'imageRefs', type: 'json' },
|
|
28
|
+
{ name: 'createdByUserId', type: 'uuid' },
|
|
27
29
|
{ name: 'createdAt', type: 'datetime', required: true },
|
|
28
30
|
{ name: 'updatedAt', type: 'datetime', required: true },
|
|
31
|
+
{ name: 'deletedAt', type: 'datetime' },
|
|
29
32
|
],
|
|
30
33
|
},
|
|
31
34
|
},
|
|
@@ -54,154 +57,28 @@ export const nutritionCatalogScanData = {
|
|
|
54
57
|
intent: 'read',
|
|
55
58
|
auth: authRequired,
|
|
56
59
|
},
|
|
57
|
-
],
|
|
58
|
-
},
|
|
59
|
-
nutritionProductCaptures: {
|
|
60
|
-
id: 'nutritionProductCaptures',
|
|
61
|
-
kind: 'generated',
|
|
62
|
-
preset: 'crud',
|
|
63
|
-
label: 'Nutrition product captures',
|
|
64
|
-
description: 'Queued missing-product submissions created by signed-in scanners.',
|
|
65
|
-
basePath: '/v1/nutrition/products/captures',
|
|
66
|
-
auth: authRequired,
|
|
67
|
-
resource: {
|
|
68
|
-
kind: 'collection',
|
|
69
|
-
collection: {
|
|
70
|
-
name: 'nutrition_product_captures',
|
|
71
|
-
schema: 'public',
|
|
72
|
-
primaryKey: 'id',
|
|
73
|
-
fields: [
|
|
74
|
-
{ name: 'id', type: 'uuid', required: true },
|
|
75
|
-
{ name: 'userId', type: 'uuid', required: true },
|
|
76
|
-
{ name: 'barcode', type: 'text', required: true },
|
|
77
|
-
{ name: 'productName', type: 'text', required: true },
|
|
78
|
-
{ name: 'brand', type: 'text' },
|
|
79
|
-
{ name: 'quantity', type: 'text' },
|
|
80
|
-
{ name: 'storeChain', type: 'text' },
|
|
81
|
-
{ name: 'country', type: 'text', required: true, defaultValue: 'CH' },
|
|
82
|
-
{ name: 'status', type: 'text', required: true, defaultValue: 'queued' },
|
|
83
|
-
{ name: 'photoRefs', type: 'json' },
|
|
84
|
-
{ name: 'clientCapturedAt', type: 'datetime', required: true },
|
|
85
|
-
{ name: 'createdAt', type: 'datetime', required: true },
|
|
86
|
-
{ name: 'updatedAt', type: 'datetime', required: true },
|
|
87
|
-
],
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
endpoints: [
|
|
91
|
-
{
|
|
92
|
-
id: 'listNutritionProductCaptures',
|
|
93
|
-
label: 'List captures',
|
|
94
|
-
method: 'GET',
|
|
95
|
-
path: '/',
|
|
96
|
-
intent: 'list',
|
|
97
|
-
auth: authRequired,
|
|
98
|
-
},
|
|
99
60
|
{
|
|
100
|
-
id: '
|
|
101
|
-
label: 'Create
|
|
61
|
+
id: 'createNutritionProduct',
|
|
62
|
+
label: 'Create product',
|
|
102
63
|
method: 'POST',
|
|
103
64
|
path: '/',
|
|
104
65
|
intent: 'create',
|
|
105
66
|
auth: authRequired,
|
|
106
67
|
},
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
nutritionScanChallenges: {
|
|
110
|
-
id: 'nutritionScanChallenges',
|
|
111
|
-
kind: 'generated',
|
|
112
|
-
preset: 'crud',
|
|
113
|
-
label: 'Nutrition scan challenges',
|
|
114
|
-
description: 'Friends-only challenge windows, scoring rules, and leaderboard context.',
|
|
115
|
-
basePath: '/v1/nutrition/challenges',
|
|
116
|
-
auth: authRequired,
|
|
117
|
-
resource: {
|
|
118
|
-
kind: 'collection',
|
|
119
|
-
collection: {
|
|
120
|
-
name: 'nutrition_scan_challenges',
|
|
121
|
-
schema: 'public',
|
|
122
|
-
primaryKey: 'id',
|
|
123
|
-
fields: [
|
|
124
|
-
{ name: 'id', type: 'uuid', required: true },
|
|
125
|
-
{ name: 'title', type: 'text', required: true },
|
|
126
|
-
{ name: 'description', type: 'text' },
|
|
127
|
-
{ name: 'startsAt', type: 'datetime', required: true },
|
|
128
|
-
{ name: 'endsAt', type: 'datetime', required: true },
|
|
129
|
-
{ name: 'isActive', type: 'boolean', required: true, defaultValue: true },
|
|
130
|
-
{ name: 'scoringRules', type: 'json' },
|
|
131
|
-
{ name: 'createdAt', type: 'datetime', required: true },
|
|
132
|
-
],
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
endpoints: [
|
|
136
68
|
{
|
|
137
|
-
id: '
|
|
138
|
-
label: '
|
|
139
|
-
method: '
|
|
140
|
-
path: '
|
|
141
|
-
intent: '
|
|
142
|
-
auth: authRequired,
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
id: 'getCurrentNutritionScanChallenge',
|
|
146
|
-
label: 'Get current challenge',
|
|
147
|
-
method: 'GET',
|
|
148
|
-
path: '/current',
|
|
149
|
-
intent: 'read',
|
|
150
|
-
auth: authRequired,
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
id: 'getCurrentNutritionScanLeaderboard',
|
|
154
|
-
label: 'Get current leaderboard',
|
|
155
|
-
method: 'GET',
|
|
156
|
-
path: '/current/leaderboard',
|
|
157
|
-
intent: 'read',
|
|
158
|
-
auth: authRequired,
|
|
159
|
-
},
|
|
160
|
-
],
|
|
161
|
-
},
|
|
162
|
-
nutritionScanEvents: {
|
|
163
|
-
id: 'nutritionScanEvents',
|
|
164
|
-
kind: 'generated',
|
|
165
|
-
preset: 'crud',
|
|
166
|
-
label: 'Nutrition scan events',
|
|
167
|
-
description: 'Signed-in scanner actions used for points, duplicate rules, and rankings.',
|
|
168
|
-
basePath: '/v1/nutrition/scan-events',
|
|
169
|
-
auth: authRequired,
|
|
170
|
-
resource: {
|
|
171
|
-
kind: 'collection',
|
|
172
|
-
collection: {
|
|
173
|
-
name: 'nutrition_scan_events',
|
|
174
|
-
schema: 'public',
|
|
175
|
-
primaryKey: 'id',
|
|
176
|
-
fields: [
|
|
177
|
-
{ name: 'id', type: 'uuid', required: true },
|
|
178
|
-
{ name: 'challengeId', type: 'uuid', required: true },
|
|
179
|
-
{ name: 'userId', type: 'uuid', required: true },
|
|
180
|
-
{ name: 'barcode', type: 'text', required: true },
|
|
181
|
-
{ name: 'productId', type: 'uuid' },
|
|
182
|
-
{ name: 'captureId', type: 'uuid' },
|
|
183
|
-
{ name: 'eventType', type: 'text', required: true },
|
|
184
|
-
{ name: 'points', type: 'number', required: true, defaultValue: 0 },
|
|
185
|
-
{ name: 'clientCapturedAt', type: 'datetime', required: true },
|
|
186
|
-
{ name: 'createdAt', type: 'datetime', required: true },
|
|
187
|
-
],
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
endpoints: [
|
|
191
|
-
{
|
|
192
|
-
id: 'listNutritionScanEvents',
|
|
193
|
-
label: 'List scan events',
|
|
194
|
-
method: 'GET',
|
|
195
|
-
path: '/',
|
|
196
|
-
intent: 'list',
|
|
69
|
+
id: 'updateNutritionProduct',
|
|
70
|
+
label: 'Update product',
|
|
71
|
+
method: 'PATCH',
|
|
72
|
+
path: '/:id',
|
|
73
|
+
intent: 'update',
|
|
197
74
|
auth: authRequired,
|
|
198
75
|
},
|
|
199
76
|
{
|
|
200
|
-
id: '
|
|
201
|
-
label: '
|
|
202
|
-
method: '
|
|
203
|
-
path: '
|
|
204
|
-
intent: '
|
|
77
|
+
id: 'deleteNutritionProduct',
|
|
78
|
+
label: 'Delete product',
|
|
79
|
+
method: 'DELETE',
|
|
80
|
+
path: '/:id',
|
|
81
|
+
intent: 'delete',
|
|
205
82
|
auth: authRequired,
|
|
206
83
|
},
|
|
207
84
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/data.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAW,CAAC;AAEjD,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE;QACJ,iBAAiB,EAAE;YACjB,EAAE,EAAE,mBAAmB;YACvB,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/data.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAW,CAAC;AAEjD,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE;QACJ,iBAAiB,EAAE;YACj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ources.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"}
|
|
@@ -4,53 +4,90 @@ export function createNutritionCatalogScanDataSources() {
|
|
|
4
4
|
id: 'nutrition-api',
|
|
5
5
|
kind: 'rest',
|
|
6
6
|
name: 'Nutrition API',
|
|
7
|
-
description: 'Runtime data-source bindings for product browsing, lookup, and
|
|
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.',
|
|
20
37
|
protocol: 'http',
|
|
21
38
|
intent: 'read',
|
|
22
39
|
method: 'GET',
|
|
23
|
-
path: '/',
|
|
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.',
|
|
30
47
|
protocol: 'http',
|
|
31
48
|
intent: 'read',
|
|
32
49
|
method: 'GET',
|
|
33
|
-
path: '/:id',
|
|
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.',
|
|
40
57
|
protocol: 'http',
|
|
41
58
|
intent: 'read',
|
|
42
59
|
method: 'GET',
|
|
43
|
-
path: '/by-barcode/:barcode',
|
|
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
|
-
name: 'Create product
|
|
49
|
-
description: 'Creates a
|
|
65
|
+
name: 'Create nutrition product',
|
|
66
|
+
description: 'Creates a product directly from the create screen.',
|
|
50
67
|
protocol: 'http',
|
|
51
68
|
intent: 'create',
|
|
52
69
|
method: 'POST',
|
|
53
|
-
path: '/
|
|
70
|
+
path: '/products',
|
|
71
|
+
},
|
|
72
|
+
'nutrition.products.update': {
|
|
73
|
+
id: 'nutrition.products.update',
|
|
74
|
+
endpointId: 'products',
|
|
75
|
+
name: 'Update nutrition product',
|
|
76
|
+
description: 'Updates an existing product by ID.',
|
|
77
|
+
protocol: 'http',
|
|
78
|
+
intent: 'update',
|
|
79
|
+
method: 'PATCH',
|
|
80
|
+
path: '/products/:id',
|
|
81
|
+
},
|
|
82
|
+
'nutrition.products.delete': {
|
|
83
|
+
id: 'nutrition.products.delete',
|
|
84
|
+
endpointId: 'products',
|
|
85
|
+
name: 'Delete nutrition product',
|
|
86
|
+
description: 'Soft deletes a product by ID.',
|
|
87
|
+
protocol: 'http',
|
|
88
|
+
intent: 'delete',
|
|
89
|
+
method: 'DELETE',
|
|
90
|
+
path: '/products/:id',
|
|
54
91
|
},
|
|
55
92
|
},
|
|
56
93
|
},
|
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,
|
|
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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EAAE,+BAA+B;yBACtC;wBACD,2BAA2B,EAAE;4BAC3B,EAAE,EAAE,2BAA2B;4BAC/B,UAAU,EAAE,UAAU;4BACtB,IAAI,EAAE,0BAA0B;4BAChC,WAAW,EAAE,oDAAoD;4BACjE,QAAQ,EAAE,MAAM;4BAChB,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,MAAM;4BACd,IAAI,EAAE,WAAW;yBAClB;wBACD,2BAA2B,EAAE;4BAC3B,EAAE,EAAE,2BAA2B;4BAC/B,UAAU,EAAE,UAAU;4BACtB,IAAI,EAAE,0BAA0B;4BAChC,WAAW,EAAE,oCAAoC;4BACjD,QAAQ,EAAE,MAAM;4BAChB,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,OAAO;4BACf,IAAI,EAAE,eAAe;yBACtB;wBACD,2BAA2B,EAAE;4BAC3B,EAAE,EAAE,2BAA2B;4BAC/B,UAAU,EAAE,UAAU;4BACtB,IAAI,EAAE,0BAA0B;4BAChC,WAAW,EAAE,+BAA+B;4BAC5C,QAAQ,EAAE,MAAM;4BAChB,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,QAAQ;4BAChB,IAAI,EAAE,eAAe;yBACtB;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -3,11 +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 challenge: string;
|
|
10
|
-
readonly leaderboard: string;
|
|
6
|
+
readonly create: string;
|
|
7
|
+
readonly stats: string;
|
|
11
8
|
readonly profile: string;
|
|
12
9
|
readonly signIn: string;
|
|
13
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,CAsD1B"}
|
|
@@ -4,11 +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
|
-
challenge: `${idPrefix}-challenge`,
|
|
11
|
-
leaderboard: `${idPrefix}-leaderboard`,
|
|
7
|
+
create: `${idPrefix}-create`,
|
|
8
|
+
stats: `${idPrefix}-stats`,
|
|
12
9
|
profile: `${idPrefix}-profile`,
|
|
13
10
|
signIn: `${idPrefix}-sign-in`,
|
|
14
11
|
signUp: `${idPrefix}-sign-up`,
|
|
@@ -18,13 +15,36 @@ export function createNutritionCatalogScanScreenIds(idPrefix) {
|
|
|
18
15
|
export function createNutritionCatalogScanNavigator(screenIds) {
|
|
19
16
|
return {
|
|
20
17
|
type: 'tabs',
|
|
21
|
-
initialRouteName: '
|
|
18
|
+
initialRouteName: 'products',
|
|
22
19
|
routes: [
|
|
23
20
|
createRoute({
|
|
24
|
-
name: '
|
|
25
|
-
screenId: screenIds.catalog,
|
|
21
|
+
name: 'products',
|
|
26
22
|
label: 'Products',
|
|
27
23
|
icon: { provider: 'material-community', name: 'package-variant-closed' },
|
|
24
|
+
navigator: {
|
|
25
|
+
type: 'stack',
|
|
26
|
+
initialRouteName: '/products',
|
|
27
|
+
routes: [
|
|
28
|
+
createRoute({
|
|
29
|
+
name: '/products',
|
|
30
|
+
path: '/products',
|
|
31
|
+
screenId: screenIds.catalog,
|
|
32
|
+
label: 'Products',
|
|
33
|
+
}),
|
|
34
|
+
createRoute({
|
|
35
|
+
name: '/products/[id]',
|
|
36
|
+
screenId: screenIds.detail,
|
|
37
|
+
label: 'Product detail',
|
|
38
|
+
hideInTabBar: true,
|
|
39
|
+
}),
|
|
40
|
+
createRoute({
|
|
41
|
+
name: '/products/create',
|
|
42
|
+
screenId: screenIds.create,
|
|
43
|
+
label: 'Create product',
|
|
44
|
+
hideInTabBar: true,
|
|
45
|
+
}),
|
|
46
|
+
],
|
|
47
|
+
},
|
|
28
48
|
}),
|
|
29
49
|
createRoute({
|
|
30
50
|
name: 'scan',
|
|
@@ -34,7 +54,7 @@ export function createNutritionCatalogScanNavigator(screenIds) {
|
|
|
34
54
|
}),
|
|
35
55
|
createRoute({
|
|
36
56
|
name: 'stats',
|
|
37
|
-
screenId: screenIds.
|
|
57
|
+
screenId: screenIds.stats,
|
|
38
58
|
label: 'Stats',
|
|
39
59
|
icon: { provider: 'material-community', name: 'chart-bar' },
|
|
40
60
|
}),
|
|
@@ -44,18 +64,6 @@ export function createNutritionCatalogScanNavigator(screenIds) {
|
|
|
44
64
|
label: 'Profile',
|
|
45
65
|
icon: { provider: 'material-community', name: 'account-circle-outline' },
|
|
46
66
|
}),
|
|
47
|
-
createRoute({
|
|
48
|
-
name: '/products/[id]',
|
|
49
|
-
screenId: screenIds.detail,
|
|
50
|
-
label: 'Product detail',
|
|
51
|
-
hideInTabBar: true,
|
|
52
|
-
}),
|
|
53
|
-
createRoute({
|
|
54
|
-
name: '/products/create',
|
|
55
|
-
screenId: screenIds.capture,
|
|
56
|
-
label: 'Create product',
|
|
57
|
-
hideInTabBar: true,
|
|
58
|
-
}),
|
|
59
67
|
],
|
|
60
68
|
};
|
|
61
69
|
}
|
|
@@ -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;QAC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O;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"}
|