@ankhorage/templates 1.8.3 → 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 +8 -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 +29 -20
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @ankhorage/templates
|
|
2
2
|
|
|
3
|
+
## 1.8.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bc1b2c4: Align the nutrition scanner starter with the cleaned product-centric nutrition API.
|
|
8
|
+
|
|
9
|
+
Generated nutrition scanner apps now target the single-table `nutrition_products` MVP contract, use direct product CRUD and barcode lookup endpoints, handle duplicate barcode conflicts, and remove stale capture/challenge/review/store-observation assumptions.
|
|
10
|
+
|
|
3
11
|
## 1.8.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -103,13 +103,14 @@ Additional variants:
|
|
|
103
103
|
- `games/chess`: Home · Settings. The Home screen renders a `ChessBoard` node with a static
|
|
104
104
|
initial FEN and requires generated apps to provide `@ankhorage/zora-chess` through their
|
|
105
105
|
extension registry.
|
|
106
|
-
- `food_drink/nutrition-catalog-scan`:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
scanner
|
|
106
|
+
- `food_drink/nutrition-catalog-scan`: Products · Scan · Stats · Profile. This restricted product
|
|
107
|
+
barcode nutrition scanner starter uses `infra.auth.scope = "global"`, Supabase auth, native
|
|
108
|
+
RBAC, and an app-facing `profiles` table. Generated apps should keep identity in Supabase Auth,
|
|
109
|
+
browse products through `GET /products`, look up barcodes through
|
|
110
|
+
`GET /products/by-barcode/:barcode`, create missing products through `POST /products`, and
|
|
111
|
+
handle duplicate barcode conflicts by opening the existing product id. Native barcode scanning
|
|
112
|
+
can use an app camera adapter such as `expo-camera`, while visible scanner and permission UI
|
|
113
|
+
should use ZORA scanner primitives.
|
|
113
114
|
- `social_community/creator`: Studio · Posts · Audience · Insights · Settings
|
|
114
115
|
|
|
115
116
|
Only categories that exist in `AppCategory` are registered. New category literals should be added
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type { IconSpec, RouteDefinition } from '@ankhorage/contracts';
|
|
1
|
+
import type { IconSpec, NavigatorSpec, RouteDefinition } from '@ankhorage/contracts';
|
|
2
2
|
type ManifestRoute = RouteDefinition;
|
|
3
3
|
export declare function createRoute(args: {
|
|
4
4
|
name: string;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
path?: string;
|
|
6
|
+
screenId?: string;
|
|
7
|
+
label?: string;
|
|
7
8
|
icon?: IconSpec;
|
|
8
9
|
hideInTabBar?: boolean;
|
|
10
|
+
navigator?: NavigatorSpec;
|
|
9
11
|
}): ManifestRoute;
|
|
10
12
|
export {};
|
|
11
13
|
//# sourceMappingURL=route.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAErF,KAAK,aAAa,GAAG,eAAe,CAAC;AAErC,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B,GAAG,aAAa,CAUhB"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export function createRoute(args) {
|
|
2
2
|
return {
|
|
3
3
|
name: args.name,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
...(args.path ? { path: args.path } : {}),
|
|
5
|
+
...(args.screenId ? { screenId: args.screenId } : {}),
|
|
6
|
+
...(args.label ? { label: args.label } : {}),
|
|
6
7
|
...(args.icon ? { icon: args.icon } : {}),
|
|
7
8
|
...(args.hideInTabBar ? { hideInTabBar: args.hideInTabBar } : {}),
|
|
9
|
+
...(args.navigator ? { navigator: args.navigator } : {}),
|
|
8
10
|
};
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=route.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/templates/shared/route.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/templates/shared/route.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,WAAW,CAAC,IAQ3B;IACC,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrD,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5C,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACzD,CAAC;AACJ,CAAC"}
|
|
@@ -10,7 +10,7 @@ export const foodDrinkStarterTemplates = [
|
|
|
10
10
|
{
|
|
11
11
|
id: 'nutrition-catalog-scan',
|
|
12
12
|
label: 'Nutrition catalog scan',
|
|
13
|
-
description: 'A
|
|
13
|
+
description: 'A product barcode nutrition scanner starter with direct product lookup, creation, and catalog browsing.',
|
|
14
14
|
create: createNutritionCatalogScanStarterTemplate,
|
|
15
15
|
},
|
|
16
16
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/food-drink/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,yCAAyC,EAAE,MAAM,0BAA0B,CAAC;AAErF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,4EAA4E;QACzF,MAAM,EAAE,8BAA8B;KACvC;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/food-drink/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,yCAAyC,EAAE,MAAM,0BAA0B,CAAC;AAErF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,4EAA4E;QACzF,MAAM,EAAE,8BAA8B;KACvC;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EACT,yGAAyG;QAC3G,MAAM,EAAE,yCAAyC;KAClD;CACqD,CAAC"}
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqC,MAAM,sBAAsB,CAAC;AA+Q3F,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,MAAM,GACf,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAiB1C"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
const productLookupOperation = {
|
|
2
2
|
dataSourceId: 'nutrition-api',
|
|
3
3
|
endpointId: 'products',
|
|
4
|
-
operationId: 'products.
|
|
4
|
+
operationId: 'nutrition.products.getByBarcode',
|
|
5
|
+
};
|
|
6
|
+
const productCreateOperation = {
|
|
7
|
+
dataSourceId: 'nutrition-api',
|
|
8
|
+
endpointId: 'products',
|
|
9
|
+
operationId: 'nutrition.products.create',
|
|
5
10
|
};
|
|
6
11
|
function createProductCardBinding(args) {
|
|
7
12
|
return {
|
|
@@ -63,132 +68,207 @@ function createProductCardBinding(args) {
|
|
|
63
68
|
},
|
|
64
69
|
};
|
|
65
70
|
}
|
|
66
|
-
|
|
67
|
-
return
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
71
|
+
function createLookupNavigationBindings(barcodeSourcePath) {
|
|
72
|
+
return [
|
|
73
|
+
{
|
|
74
|
+
target: {
|
|
75
|
+
kind: 'operation',
|
|
76
|
+
operation: productLookupOperation,
|
|
77
|
+
},
|
|
78
|
+
input: {
|
|
79
|
+
barcode: {
|
|
80
|
+
kind: 'source',
|
|
81
|
+
source: {
|
|
82
|
+
kind: 'event',
|
|
83
|
+
path: barcodeSourcePath,
|
|
84
|
+
},
|
|
85
|
+
transforms: ['trim'],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
when: {
|
|
89
|
+
source: {
|
|
90
|
+
kind: 'event',
|
|
91
|
+
path: barcodeSourcePath,
|
|
92
|
+
},
|
|
93
|
+
operator: 'exists',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
target: {
|
|
98
|
+
kind: 'action',
|
|
99
|
+
type: 'navigate',
|
|
100
|
+
},
|
|
101
|
+
when: {
|
|
102
|
+
source: {
|
|
103
|
+
kind: 'operation',
|
|
104
|
+
operation: productLookupOperation,
|
|
105
|
+
path: 'product.id',
|
|
106
|
+
},
|
|
107
|
+
operator: 'exists',
|
|
108
|
+
},
|
|
109
|
+
input: {
|
|
110
|
+
route: {
|
|
111
|
+
kind: 'literal',
|
|
112
|
+
value: '/products/[id]',
|
|
113
|
+
},
|
|
114
|
+
params: {
|
|
115
|
+
kind: 'object',
|
|
116
|
+
fields: {
|
|
117
|
+
id: {
|
|
118
|
+
kind: 'source',
|
|
119
|
+
source: {
|
|
120
|
+
kind: 'operation',
|
|
121
|
+
operation: productLookupOperation,
|
|
122
|
+
path: 'product.id',
|
|
86
123
|
},
|
|
87
124
|
},
|
|
88
|
-
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
target: {
|
|
131
|
+
kind: 'action',
|
|
132
|
+
type: 'navigate',
|
|
133
|
+
},
|
|
134
|
+
when: {
|
|
135
|
+
source: {
|
|
136
|
+
kind: 'operation',
|
|
137
|
+
operation: productLookupOperation,
|
|
138
|
+
path: 'product.id',
|
|
139
|
+
},
|
|
140
|
+
operator: 'notExists',
|
|
141
|
+
},
|
|
142
|
+
input: {
|
|
143
|
+
route: {
|
|
144
|
+
kind: 'literal',
|
|
145
|
+
value: '/products/create',
|
|
146
|
+
},
|
|
147
|
+
params: {
|
|
148
|
+
kind: 'object',
|
|
149
|
+
fields: {
|
|
150
|
+
barcode: {
|
|
151
|
+
kind: 'source',
|
|
89
152
|
source: {
|
|
90
153
|
kind: 'event',
|
|
91
|
-
path:
|
|
154
|
+
path: barcodeSourcePath,
|
|
92
155
|
},
|
|
93
|
-
|
|
156
|
+
transforms: ['trim'],
|
|
94
157
|
},
|
|
95
158
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
];
|
|
163
|
+
}
|
|
164
|
+
function createProductCreateBinding(componentId) {
|
|
165
|
+
return {
|
|
166
|
+
componentId,
|
|
167
|
+
componentType: 'Button',
|
|
168
|
+
events: {
|
|
169
|
+
press: [
|
|
170
|
+
{
|
|
171
|
+
target: {
|
|
172
|
+
kind: 'operation',
|
|
173
|
+
operation: productCreateOperation,
|
|
174
|
+
},
|
|
175
|
+
input: {
|
|
176
|
+
barcode: {
|
|
177
|
+
kind: 'source',
|
|
102
178
|
source: {
|
|
103
|
-
kind: '
|
|
104
|
-
|
|
105
|
-
path: 'product.id',
|
|
179
|
+
kind: 'state',
|
|
180
|
+
path: 'forms.products.create.barcode',
|
|
106
181
|
},
|
|
107
|
-
|
|
182
|
+
transforms: ['trim'],
|
|
108
183
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
params: {
|
|
115
|
-
kind: 'object',
|
|
116
|
-
fields: {
|
|
117
|
-
id: {
|
|
118
|
-
kind: 'source',
|
|
119
|
-
source: {
|
|
120
|
-
kind: 'operation',
|
|
121
|
-
operation: productLookupOperation,
|
|
122
|
-
path: 'product.id',
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
184
|
+
name: {
|
|
185
|
+
kind: 'source',
|
|
186
|
+
source: {
|
|
187
|
+
kind: 'state',
|
|
188
|
+
path: 'forms.products.create.name',
|
|
126
189
|
},
|
|
190
|
+
transforms: ['trim'],
|
|
127
191
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
192
|
+
brand: {
|
|
193
|
+
kind: 'source',
|
|
194
|
+
source: {
|
|
195
|
+
kind: 'state',
|
|
196
|
+
path: 'forms.products.create.brand',
|
|
197
|
+
},
|
|
198
|
+
transforms: ['trim'],
|
|
133
199
|
},
|
|
134
|
-
|
|
200
|
+
packageLabel: {
|
|
201
|
+
kind: 'source',
|
|
135
202
|
source: {
|
|
136
|
-
kind: '
|
|
137
|
-
|
|
138
|
-
path: 'product.id',
|
|
203
|
+
kind: 'state',
|
|
204
|
+
path: 'forms.products.create.packageLabel',
|
|
139
205
|
},
|
|
140
|
-
|
|
206
|
+
transforms: ['trim'],
|
|
141
207
|
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
208
|
+
nutritionFacts: {
|
|
209
|
+
kind: 'source',
|
|
210
|
+
source: {
|
|
211
|
+
kind: 'state',
|
|
212
|
+
path: 'forms.products.create.nutritionFacts',
|
|
146
213
|
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
kind: 'event',
|
|
154
|
-
path: 'payload.value',
|
|
155
|
-
},
|
|
156
|
-
transforms: ['trim'],
|
|
157
|
-
},
|
|
158
|
-
},
|
|
214
|
+
},
|
|
215
|
+
imageRefs: {
|
|
216
|
+
kind: 'source',
|
|
217
|
+
source: {
|
|
218
|
+
kind: 'state',
|
|
219
|
+
path: 'forms.products.create.imageRefs',
|
|
159
220
|
},
|
|
160
221
|
},
|
|
161
222
|
},
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
{
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
target: {
|
|
226
|
+
kind: 'action',
|
|
227
|
+
type: 'navigate',
|
|
228
|
+
},
|
|
229
|
+
when: {
|
|
230
|
+
source: {
|
|
231
|
+
kind: 'operation',
|
|
232
|
+
operation: productCreateOperation,
|
|
233
|
+
path: 'product.id',
|
|
168
234
|
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
235
|
+
operator: 'exists',
|
|
236
|
+
},
|
|
237
|
+
input: {
|
|
238
|
+
route: {
|
|
239
|
+
kind: 'literal',
|
|
240
|
+
value: '/products/[id]',
|
|
241
|
+
},
|
|
242
|
+
params: {
|
|
243
|
+
kind: 'object',
|
|
244
|
+
fields: {
|
|
245
|
+
id: {
|
|
246
|
+
kind: 'source',
|
|
247
|
+
source: {
|
|
248
|
+
kind: 'operation',
|
|
249
|
+
operation: productCreateOperation,
|
|
250
|
+
path: 'product.id',
|
|
184
251
|
},
|
|
185
252
|
},
|
|
186
253
|
},
|
|
187
254
|
},
|
|
188
255
|
},
|
|
189
|
-
|
|
256
|
+
},
|
|
257
|
+
],
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
export function createNutritionCatalogScanBindings(idPrefix) {
|
|
262
|
+
return {
|
|
263
|
+
[`${idPrefix}-scan-scanner`]: {
|
|
264
|
+
componentId: `${idPrefix}-scan-scanner`,
|
|
265
|
+
componentType: 'BarcodeScannerView',
|
|
266
|
+
events: {
|
|
267
|
+
barcodeScanned: createLookupNavigationBindings('payload.value'),
|
|
268
|
+
manualEntry: createLookupNavigationBindings('payload.value'),
|
|
190
269
|
},
|
|
191
270
|
},
|
|
271
|
+
[`${idPrefix}-create-submit-button`]: createProductCreateBinding(`${idPrefix}-create-submit-button`),
|
|
192
272
|
[`${idPrefix}-product-card-template`]: createProductCardBinding({
|
|
193
273
|
componentId: `${idPrefix}-product-card-template`,
|
|
194
274
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.ts"],"names":[],"mappings":"AAEA,MAAM,sBAAsB,GAAG;IAC7B,YAAY,EAAE,eAAe;IAC7B,UAAU,EAAE,UAAU;IACtB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.ts"],"names":[],"mappings":"AAEA,MAAM,sBAAsB,GAAG;IAC7B,YAAY,EAAE,eAAe;IAC7B,UAAU,EAAE,UAAU;IACtB,WAAW,EAAE,iCAAiC;CACR,CAAC;AAEzC,MAAM,sBAAsB,GAAG;IAC7B,YAAY,EAAE,eAAe;IAC7B,UAAU,EAAE,UAAU;IACtB,WAAW,EAAE,2BAA2B;CACF,CAAC;AAEzC,SAAS,wBAAwB,CAAC,IAEjC;IACC,OAAO;QACL,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,aAAa,EAAE,aAAa;QAC5B,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,MAAM,EAAE;oBACN,IAAI,EAAE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E,YAAY;yBACnB;wBACD,QAAQ,EAAE,QAAQ;qBACnB;oBACD,KAAK,EAAE;wBACL,KAAK,EAAE;4BACL,IAAI,EAAE,SAAS;4BACf,KAAK,EAAE,gBAAgB;yBACxB;wBACD,MAAM,EAAE;4BACN,IAAI,EAAE,QAAQ;4BACd,MAAM,EAAE;gCACN,EAAE,EAAE;oCACF,IAAI,EAAE,QAAQ;oCACd,MAAM,EAAE;wCACN,IAAI,EAAE,WAAW;wCACjB,SAAS,EAAE,sBAAsB;wCACjC,IAAI,EAAE,YAAY;qCACnB;iCACF;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kCAAkC,CAChD,QAAgB;IAEhB,OAAO;QACL,CAAC,GAAG,QAAQ,eAAe,CAAC,EAAE;YAC5B,WAAW,EAAE,GAAG,QAAQ,eAAe;YACvC,aAAa,EAAE,oBAAoB;YACnC,MAAM,EAAE;gBACN,cAAc,EAAE,8BAA8B,CAAC,eAAe,CAAC;gBAC/D,WAAW,EAAE,8BAA8B,CAAC,eAAe,CAAC;aAC7D;SACF;QACD,CAAC,GAAG,QAAQ,uBAAuB,CAAC,EAAE,0BAA0B,CAC9D,GAAG,QAAQ,uBAAuB,CACnC;QACD,CAAC,GAAG,QAAQ,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;YAC9D,WAAW,EAAE,GAAG,QAAQ,wBAAwB;SACjD,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -41,7 +41,7 @@ export declare const nutritionCatalogScanContent: {
|
|
|
41
41
|
}[];
|
|
42
42
|
}[];
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
create: {
|
|
45
45
|
eyebrow: string;
|
|
46
46
|
title: string;
|
|
47
47
|
description: string;
|
|
@@ -55,7 +55,7 @@ export declare const nutritionCatalogScanContent: {
|
|
|
55
55
|
}[];
|
|
56
56
|
}[];
|
|
57
57
|
};
|
|
58
|
-
|
|
58
|
+
stats: {
|
|
59
59
|
eyebrow: string;
|
|
60
60
|
title: string;
|
|
61
61
|
description: string;
|
|
@@ -83,34 +83,6 @@ export declare const nutritionCatalogScanContent: {
|
|
|
83
83
|
}[];
|
|
84
84
|
}[];
|
|
85
85
|
};
|
|
86
|
-
success: {
|
|
87
|
-
eyebrow: string;
|
|
88
|
-
title: string;
|
|
89
|
-
description: string;
|
|
90
|
-
sections: {
|
|
91
|
-
title: string;
|
|
92
|
-
description: string;
|
|
93
|
-
cards: {
|
|
94
|
-
eyebrow: string;
|
|
95
|
-
title: string;
|
|
96
|
-
description: string;
|
|
97
|
-
}[];
|
|
98
|
-
}[];
|
|
99
|
-
};
|
|
100
|
-
queue: {
|
|
101
|
-
eyebrow: string;
|
|
102
|
-
title: string;
|
|
103
|
-
description: string;
|
|
104
|
-
sections: {
|
|
105
|
-
title: string;
|
|
106
|
-
description: string;
|
|
107
|
-
cards: {
|
|
108
|
-
eyebrow: string;
|
|
109
|
-
title: string;
|
|
110
|
-
description: string;
|
|
111
|
-
}[];
|
|
112
|
-
}[];
|
|
113
|
-
};
|
|
114
86
|
signIn: {
|
|
115
87
|
eyebrow: string;
|
|
116
88
|
title: string;
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/content.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/content.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/content.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkQiB,CAAC"}
|