@jigx/core-sdk 1.2.0-next.53 → 1.2.0-next.55
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/dist/action/ja.show-alert.d.ts +2 -2
- package/dist/action/ja.show-alert.js +3 -3
- package/dist/application/application.component.d.ts.map +1 -1
- package/dist/application/application.component.js +3 -2
- package/dist/assets/example-extraction-cache.json +4 -4
- package/dist/assets/extracted-core-sdk-examples.yaml +553 -538
- package/dist/builder/application-analyzer/application-analyzer.d.ts +1 -1
- package/dist/builder/application-analyzer/application-analyzer.d.ts.map +1 -1
- package/dist/builder/application-analyzer/application-analyzer.js +16 -13
- package/dist/builder/builder.js +3 -3
- package/dist/database/database.abstract.js +2 -2
- package/dist/datasource/datasource.sqlite.d.ts +3 -1
- package/dist/datasource/datasource.sqlite.d.ts.map +1 -1
- package/dist/datasource/datasource.sqlite.js +104 -30
- package/dist/datasource/sqlite-validator.d.ts +8 -0
- package/dist/datasource/sqlite-validator.d.ts.map +1 -1
- package/dist/datasource/sqlite-validator.js +14 -1
- package/dist/screen/common/screen.input-definition.d.ts +12 -12
- package/dist/screen/common/screen.input-definition.d.ts.map +1 -1
- package/dist/screen/common/screen.input-definition.js +4 -18
- package/dist/screen/common/screen.preview.actions.js +2 -2
- package/dist/screen/common/screen.summary.d.ts.map +1 -1
- package/dist/screen/common/screen.summary.js +2 -7
- package/dist/screen/screen.abstract.d.ts.map +1 -1
- package/dist/screen/screen.abstract.js +3 -2
- package/dist/screen/screen.gallery.d.ts +5 -4
- package/dist/screen/screen.gallery.d.ts.map +1 -1
- package/dist/screen/screen.gallery.js +6 -5
- package/dist/screen/screen.guards.d.ts +4 -0
- package/dist/screen/screen.guards.d.ts.map +1 -1
- package/dist/screen/screen.guards.js +3 -1
- package/dist/screen/screen.sdk.d.ts +4 -3
- package/dist/screen/screen.sdk.d.ts.map +1 -1
- package/dist/screen/screen.sdk.js +1 -1
- package/dist/screen/screen.wizard.d.ts +10 -1
- package/dist/screen/screen.wizard.d.ts.map +1 -1
- package/dist/screen/screen.wizard.instance.d.ts.map +1 -1
- package/dist/screen/screen.wizard.instance.js +3 -5
- package/dist/screen/screen.wizard.js +2 -2
- package/dist/widget/jw.location.d.ts +2 -2
- package/dist/widget/jw.location.d.ts.map +1 -1
- package/dist/widget/jw.location.js +7 -4
- package/docs/media-fields.md +1 -1
- package/docs/pattern-command-batches.md +3 -3
- package/docs/pattern-forms.md +6 -6
- package/docs/pattern-global-actions.md +1 -1
- package/docs/pattern-navigation.md +7 -6
- package/docs/pattern-rest-acumatica.md +1 -1
- package/docs/pattern-tabs-form.md +3 -3
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ batches and loses the dependency. Avoid one fixed ID for all unrelated sends:
|
|
|
36
36
|
a failed member would block later operations reusing that ID.
|
|
37
37
|
|
|
38
38
|
```typescript
|
|
39
|
-
const send = screen.bottomPanel().
|
|
39
|
+
const send = screen.bottomPanel().addAction.list({ title: 'Send', concurrency: 'sequential' })
|
|
40
40
|
const batchId = '=@ctx.jig.inputs.sendBatchId' // allocated once by the caller
|
|
41
41
|
|
|
42
42
|
send.actions.executeEntity({ batchId, processingType: 'sync' })
|
|
@@ -74,13 +74,13 @@ rules; it is not server-side idempotency. Runtime expressions must yield valid
|
|
|
74
74
|
## Recover a command or batch
|
|
75
75
|
|
|
76
76
|
```typescript
|
|
77
|
-
screen.bottomPanel().
|
|
77
|
+
screen.bottomPanel().addAction.retryQueueCommand({
|
|
78
78
|
title: 'Retry',
|
|
79
79
|
batchId: '=@ctx.jig.inputs.sendBatchId',
|
|
80
80
|
force: false,
|
|
81
81
|
})
|
|
82
82
|
|
|
83
|
-
screen.bottomPanel().
|
|
83
|
+
screen.bottomPanel().addAction.deleteQueueCommand({
|
|
84
84
|
title: 'Discard pending work',
|
|
85
85
|
batchId: '=@ctx.jig.inputs.sendBatchId',
|
|
86
86
|
force: false,
|
package/docs/pattern-forms.md
CHANGED
|
@@ -48,13 +48,13 @@ The `isDiscardChangesAlertEnabled` expression is the hook for suppressing the
|
|
|
48
48
|
|
|
49
49
|
```typescript
|
|
50
50
|
// WRONG — button looks enabled but silently unresponsive when invalid
|
|
51
|
-
buttons.
|
|
51
|
+
buttons.addAction.list({
|
|
52
52
|
title: 'Save',
|
|
53
53
|
when: '=@ctx.components.form.state.isValid',
|
|
54
54
|
}).actions
|
|
55
55
|
|
|
56
56
|
// RIGHT — button visibly disabled until form is valid
|
|
57
|
-
buttons.
|
|
57
|
+
buttons.addAction.list({
|
|
58
58
|
title: 'Save',
|
|
59
59
|
isDisabled: '=@ctx.components.form.state.isValid = true ? false:true',
|
|
60
60
|
}).actions
|
|
@@ -64,8 +64,8 @@ buttons.add.list({
|
|
|
64
64
|
SDK transforms it to `style.isDisabled` in the output YAML — you don't write the
|
|
65
65
|
nested `style` wrapper in TypeScript.
|
|
66
66
|
|
|
67
|
-
Applies to `buttons.
|
|
68
|
-
`buttons.
|
|
67
|
+
Applies to `buttons.addAction.list({...})`, `buttons.addAction.executeEntity({...})`,
|
|
68
|
+
`buttons.addAction.executeAction({...})`, `.swipeLeft()`, `.swipeRight()` — anywhere you
|
|
69
69
|
have an action button.
|
|
70
70
|
|
|
71
71
|
## Save action list — correct ordering
|
|
@@ -87,7 +87,7 @@ const form = screen.addControl.form({
|
|
|
87
87
|
isDiscardChangesAlertEnabled: '=@ctx.jig.state.upload = true ? false:true',
|
|
88
88
|
})
|
|
89
89
|
|
|
90
|
-
const saveActions = screen.bottomPanel().
|
|
90
|
+
const saveActions = screen.bottomPanel().addAction.list({
|
|
91
91
|
concurrency: 'sequential',
|
|
92
92
|
title: 'Save Information',
|
|
93
93
|
isDisabled: '=@ctx.components.contactInfo.state.isValid = true ? false:true',
|
|
@@ -369,7 +369,7 @@ export function actQuoteSaveCustomerInfo(app: ApplicationBuilder): void {
|
|
|
369
369
|
### Calling from the form screen
|
|
370
370
|
|
|
371
371
|
```typescript
|
|
372
|
-
const saveActions = screen.bottomPanel().
|
|
372
|
+
const saveActions = screen.bottomPanel().addAction.list({
|
|
373
373
|
concurrency: 'sequential',
|
|
374
374
|
title: 'Save',
|
|
375
375
|
isDisabled: '=@ctx.components.contactInfo.state.isValid = true ? false:true',
|
|
@@ -38,7 +38,7 @@ screen.onFocus.executeAction({
|
|
|
38
38
|
When navigating to a create form from a list, use `behaviour: 'new'` and a UUID instance:
|
|
39
39
|
|
|
40
40
|
```typescript
|
|
41
|
-
screen.bottomPanel().
|
|
41
|
+
screen.bottomPanel().addAction.goto({
|
|
42
42
|
title: 'New Customer',
|
|
43
43
|
linkTo: SCREEN.CUSTOMER_CREATE,
|
|
44
44
|
isPrimary: true,
|
|
@@ -52,7 +52,7 @@ For standalone create screens, the generated UUID can be used as `@ctx.jig.insta
|
|
|
52
52
|
For child-create screens inside a parent aggregate, do not rely on the child screen `@ctx.jig.instanceId` as the row id. Generate the child row id at the `go-to` call and pass it in explicitly:
|
|
53
53
|
|
|
54
54
|
```typescript
|
|
55
|
-
buttons.
|
|
55
|
+
buttons.addAction.goto({
|
|
56
56
|
title: 'Add Detail',
|
|
57
57
|
linkTo: SCREEN.DETAIL_CREATE,
|
|
58
58
|
behaviour: 'new',
|
|
@@ -68,11 +68,12 @@ Then save the child row with the passed `detailId`.
|
|
|
68
68
|
## Bottom panel action order
|
|
69
69
|
|
|
70
70
|
The first action in `bottomPanel()` is the visible button. Additional actions go into the overflow menu (accessed via `...`).
|
|
71
|
+
Use `addAction` for new code. Existing code can still use the deprecated `add` alias.
|
|
71
72
|
|
|
72
73
|
```typescript
|
|
73
74
|
const buttons = tabs.bottomPanel()
|
|
74
|
-
buttons.
|
|
75
|
-
buttons.
|
|
75
|
+
buttons.addAction.executeAction({ title: 'Save', isPrimary: true, ... }) // Visible
|
|
76
|
+
buttons.addAction.goBack({ title: 'Cancel' }) // Overflow
|
|
76
77
|
```
|
|
77
78
|
|
|
78
79
|
## Navigation flow: List → Detail → Child form
|
|
@@ -96,7 +97,7 @@ listItem.onPress.goto({
|
|
|
96
97
|
### Detail to child form (forwarding parent ID)
|
|
97
98
|
|
|
98
99
|
```typescript
|
|
99
|
-
buttons.
|
|
100
|
+
buttons.addAction.goto({
|
|
100
101
|
title: 'Add Contact',
|
|
101
102
|
linkTo: SCREEN.CONTACT_CREATE,
|
|
102
103
|
parameters: { customerId: '=@ctx.jig.inputs.customerId' },
|
|
@@ -130,7 +131,7 @@ contactsTab.input('customerName', '=@ctx.jigs.general-instance.components.Custom
|
|
|
130
131
|
The child list tab opens a modal form to create new records:
|
|
131
132
|
|
|
132
133
|
```typescript
|
|
133
|
-
screen.bottomPanel().
|
|
134
|
+
screen.bottomPanel().addAction.goto({
|
|
134
135
|
title: 'Add Contact',
|
|
135
136
|
linkTo: SCREEN.CONTACT_CREATE,
|
|
136
137
|
isPrimary: true,
|
|
@@ -192,7 +192,7 @@ Query results are accessed via `@ctx.queries.<queryName>`. With `jsonColumns: ['
|
|
|
192
192
|
The action only passes `id` and `remote` — no data parameter:
|
|
193
193
|
|
|
194
194
|
```typescript
|
|
195
|
-
buttons.
|
|
195
|
+
buttons.addAction.executeAction({
|
|
196
196
|
action: ACTION.CUSTOMER_SAVE_REMOTE,
|
|
197
197
|
parameters: {
|
|
198
198
|
id: '=@ctx.datasources.data-select-customer-to-save.id',
|
|
@@ -93,7 +93,7 @@ screen.addControl.jig({
|
|
|
93
93
|
when: '=@ctx.components.manufacturer.state.value = "AMARR"',
|
|
94
94
|
})
|
|
95
95
|
|
|
96
|
-
screen.bottomPanel().
|
|
96
|
+
screen.bottomPanel().addAction.list({
|
|
97
97
|
title: 'Save Door',
|
|
98
98
|
isDisabled: '=@ctx.components.manufacturer.state.value ? false:true',
|
|
99
99
|
})
|
|
@@ -160,7 +160,7 @@ This is the stable local key for the whole aggregate until remote sync happens.
|
|
|
160
160
|
Example:
|
|
161
161
|
|
|
162
162
|
```typescript
|
|
163
|
-
const createActions = list.bottomPanel().
|
|
163
|
+
const createActions = list.bottomPanel().addAction.list({
|
|
164
164
|
title: 'New Service Order',
|
|
165
165
|
isPrimary: true,
|
|
166
166
|
concurrency: 'sequential',
|
|
@@ -262,7 +262,7 @@ Use as `isDisabled` (inverted) on the save button — see
|
|
|
262
262
|
`isDisabled` not `when`.
|
|
263
263
|
|
|
264
264
|
```typescript
|
|
265
|
-
tabs.bottomPanel().
|
|
265
|
+
tabs.bottomPanel().addAction.executeAction({
|
|
266
266
|
title: 'Save',
|
|
267
267
|
action: 'act-customer-save',
|
|
268
268
|
isDisabled: `=(${IS_VALID}) = true ? false:true`,
|