ballerina-core 1.0.236 → 1.0.237

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ballerina-core",
3
3
  "author": "Dr. Giuseppe Maggiore",
4
4
  "private": false,
5
- "version": "1.0.236",
5
+ "version": "1.0.237",
6
6
  "main": "main.ts",
7
7
  "scripts": {
8
8
  "prettier": "prettier --write ."
@@ -61,9 +61,9 @@ export const ListAbstractRenderer = <
61
61
  > &
62
62
  ListAbstractRendererState,
63
63
  ) => ({
64
- disabled: _.disabled,
64
+ disabled: _.disabled || _.globallyDisabled,
65
65
  globallyDisabled: _.globallyDisabled,
66
- readOnly: _.readOnly,
66
+ readOnly: _.readOnly || _.globallyReadOnly,
67
67
  globallyReadOnly: _.globallyReadOnly,
68
68
  locked: _.locked,
69
69
  value: PredicateValue.Operations.IsUnit(_.value)
@@ -80,9 +80,9 @@ export const MapAbstractRenderer = <
80
80
  value:
81
81
  (_.value.values.get(elementIndex) as ValueTuple)?.values.get(0) ||
82
82
  GetDefaultKeyFormValue(),
83
- disabled: _.disabled,
83
+ disabled: _.disabled || _.globallyDisabled,
84
84
  globallyDisabled: _.globallyDisabled,
85
- readOnly: _.readOnly,
85
+ readOnly: _.readOnly || _.globallyReadOnly,
86
86
  globallyReadOnly: _.globallyReadOnly,
87
87
  locked: _.locked,
88
88
  bindings: _.bindings,
@@ -186,9 +186,9 @@ export const MapAbstractRenderer = <
186
186
  (_.value.values?.get(elementIndex) as ValueTuple)?.values.get(
187
187
  1,
188
188
  ) || GetDefaultValueFormValue(),
189
- disabled: _.disabled,
189
+ disabled: _.disabled || _.globallyDisabled,
190
190
  globallyDisabled: _.globallyDisabled,
191
- readOnly: _.readOnly,
191
+ readOnly: _.readOnly || _.globallyReadOnly,
192
192
  globallyReadOnly: _.globallyReadOnly,
193
193
  locked: _.locked,
194
194
  bindings: _.bindings,
@@ -141,10 +141,10 @@ export const OneAbstractRenderer = <
141
141
  return {
142
142
  value: _.value.value,
143
143
  ...state,
144
- readOnly: _.readOnly,
144
+ readOnly: _.readOnly || _.globallyReadOnly,
145
145
  globallyReadOnly: _.globallyReadOnly,
146
146
  locked: _.locked,
147
- disabled: _.disabled,
147
+ disabled: _.disabled || _.globallyDisabled,
148
148
  globallyDisabled: _.globallyDisabled,
149
149
  bindings: _.bindings,
150
150
  extraContext: _.extraContext,
@@ -229,9 +229,9 @@ export const OneAbstractRenderer = <
229
229
  return {
230
230
  ...state,
231
231
  value,
232
- disabled: _.disabled,
232
+ disabled: _.disabled || _.globallyDisabled,
233
233
  globallyDisabled: _.globallyDisabled,
234
- readOnly: _.readOnly,
234
+ readOnly: _.readOnly || _.globallyReadOnly,
235
235
  globallyReadOnly: _.globallyReadOnly,
236
236
  locked: _.locked,
237
237
  bindings: _.bindings,
@@ -53,7 +53,7 @@ export const ReadOnlyAbstractRenderer = <
53
53
  > &
54
54
  ReadOnlyAbstractRendererState,
55
55
  ) => ({
56
- disabled: _.disabled,
56
+ disabled: _.disabled || _.globallyDisabled,
57
57
  globallyDisabled: _.globallyDisabled,
58
58
  locked: _.locked,
59
59
  value: _.value.ReadOnly,
@@ -102,9 +102,9 @@ export const RecordAbstractRenderer = <
102
102
  type: _.type.fields.get(fieldName)!,
103
103
  ...(_.fieldStates?.get(fieldName) ||
104
104
  FieldTemplates.get(fieldName)!.GetDefaultState()),
105
- disabled: _.disabled,
105
+ disabled: _.disabled || _.globallyDisabled,
106
106
  globallyDisabled: _.globallyDisabled,
107
- readOnly: _.readOnly,
107
+ readOnly: _.readOnly || _.globallyReadOnly,
108
108
  globallyReadOnly: _.globallyReadOnly,
109
109
  locked: _.locked,
110
110
  bindings: isInlined ? _.bindings : _.bindings.set("local", _.value),
@@ -64,14 +64,14 @@ export const SumAbstractRenderer = <
64
64
  SumAbstractRendererState,
65
65
  ) => ({
66
66
  ..._.customFormState.left,
67
- disabled: _.disabled,
67
+ disabled: _.disabled || _.globallyDisabled,
68
68
  globallyDisabled: _.globallyDisabled,
69
69
  locked: _.locked,
70
70
  value: PredicateValue.Operations.IsUnit(_.value)
71
71
  ? _.value
72
72
  : _.value.value.value,
73
73
  bindings: _.bindings,
74
- readOnly: _.readOnly,
74
+ readOnly: _.readOnly || _.globallyReadOnly,
75
75
  globallyReadOnly: _.globallyReadOnly,
76
76
  extraContext: _.extraContext,
77
77
  type: _.type.args[0],
@@ -150,14 +150,14 @@ export const SumAbstractRenderer = <
150
150
  SumAbstractRendererState,
151
151
  ) => ({
152
152
  ..._.customFormState.right,
153
- disabled: _.disabled,
153
+ disabled: _.disabled || _.globallyDisabled,
154
154
  globallyDisabled: _.globallyDisabled,
155
155
  locked: _.locked,
156
156
  value: PredicateValue.Operations.IsUnit(_.value)
157
157
  ? _.value
158
158
  : _.value.value.value,
159
159
  bindings: _.bindings,
160
- readOnly: _.readOnly,
160
+ readOnly: _.readOnly || _.globallyReadOnly,
161
161
  globallyReadOnly: _.globallyReadOnly,
162
162
  extraContext: _.extraContext,
163
163
  type: _.type.args[1],
@@ -191,9 +191,9 @@ export const TableAbstractRenderer = <
191
191
  return {
192
192
  value,
193
193
  ...cellState,
194
- disabled: disabled || _.disabled,
194
+ disabled: disabled || _.disabled || _.globallyDisabled,
195
195
  globallyDisabled: _.globallyDisabled,
196
- readOnly: _.readOnly,
196
+ readOnly: _.readOnly || _.globallyReadOnly,
197
197
  globallyReadOnly: _.globallyReadOnly,
198
198
  locked: _.locked,
199
199
  bindings: _.bindings.set("local", rowValue),
@@ -356,9 +356,9 @@ export const TableAbstractRenderer = <
356
356
  return {
357
357
  value,
358
358
  ...rowState,
359
- disabled: _.disabled,
359
+ disabled: _.disabled || _.globallyDisabled,
360
360
  globallyDisabled: _.globallyDisabled,
361
- readOnly: _.readOnly,
361
+ readOnly: _.readOnly || _.globallyReadOnly,
362
362
  globallyReadOnly: _.globallyReadOnly,
363
363
  locked: _.locked,
364
364
  bindings: _.bindings.set("local", value),
@@ -481,7 +481,7 @@ export const TableAbstractRenderer = <
481
481
  >((_) => ({
482
482
  value: _.value,
483
483
  locked: _.locked,
484
- disabled: _.disabled,
484
+ disabled: false,
485
485
  bindings: _.bindings,
486
486
  extraContext: _.extraContext,
487
487
  type: filter.type,
@@ -67,11 +67,11 @@ export const DispatchTupleAbstractRenderer = <
67
67
  ...(_.itemFormStates.get(itemIndex) ||
68
68
  ItemFormStates.get(itemIndex)!()),
69
69
  value: _.value.values.get(itemIndex)!,
70
- disabled: _.disabled,
70
+ disabled: _.disabled || _.globallyDisabled,
71
71
  globallyDisabled: _.globallyDisabled,
72
72
  locked: _.locked,
73
73
  bindings: _.bindings,
74
- readOnly: _.readOnly,
74
+ readOnly: _.readOnly || _.globallyReadOnly,
75
75
  globallyReadOnly: _.globallyReadOnly,
76
76
  extraContext: _.extraContext,
77
77
  remoteEntityVersionIdentifier: _.remoteEntityVersionIdentifier,
@@ -64,9 +64,9 @@ export const UnionAbstractRenderer = <
64
64
  defaultCaseStates.get(caseName)!()),
65
65
  value: _.value.fields,
66
66
  type: _.type.args.get(caseName)!,
67
- disabled: _.disabled,
67
+ disabled: _.disabled || _.globallyDisabled,
68
68
  globallyDisabled: _.globallyDisabled,
69
- readOnly: _.readOnly,
69
+ readOnly: _.readOnly || _.globallyReadOnly,
70
70
  globallyReadOnly: _.globallyReadOnly,
71
71
  locked: _.locked,
72
72
  bindings: _.bindings,
@@ -81,9 +81,9 @@ export const DispatchCreateFormLauncherTemplate = <
81
81
  ...props.context.formState,
82
82
  value: entity.value,
83
83
  locked: false,
84
- disabled: false,
84
+ disabled: props.context.globallyDisabled,
85
85
  globallyDisabled: props.context.globallyDisabled,
86
- readOnly: false,
86
+ readOnly: props.context.globallyReadOnly,
87
87
  globallyReadOnly: props.context.globallyReadOnly,
88
88
  type: DispatchParsedType.Default.primitive("unit"), // currently unused here
89
89
  bindings,
@@ -80,9 +80,9 @@ export const DispatchEditFormLauncherTemplate = <
80
80
  ...props.context.formState,
81
81
  value: entity.value,
82
82
  locked: false,
83
- disabled: false,
83
+ disabled: props.context.globallyDisabled,
84
84
  globallyDisabled: props.context.globallyDisabled,
85
- readOnly: false,
85
+ readOnly: props.context.globallyReadOnly,
86
86
  globallyReadOnly: props.context.globallyReadOnly,
87
87
  type: DispatchParsedType.Default.primitive("unit"), // currently unused here
88
88
  bindings,
@@ -100,7 +100,7 @@ export const DispatchPassthroughFormLauncherTemplate = <
100
100
  locked: false,
101
101
  disabled: props.context.globallyDisabled,
102
102
  globallyDisabled: props.context.globallyDisabled,
103
- readOnly: false,
103
+ readOnly: props.context.globallyReadOnly,
104
104
  globallyReadOnly: props.context.globallyReadOnly,
105
105
  type: DispatchParsedType.Default.primitive("unit"), // currently unused here
106
106
  bindings,