diff --git a/sdk/mpr/testdata/enumerations/PictureQuality.mxunit b/sdk/mpr/testdata/enumerations/PictureQuality.mxunit new file mode 100644 index 0000000..d9fa89f Binary files /dev/null and b/sdk/mpr/testdata/enumerations/PictureQuality.mxunit differ diff --git a/sdk/mpr/testdata/microflows/ChangePassword.mxunit b/sdk/mpr/testdata/microflows/ChangePassword.mxunit new file mode 100644 index 0000000..922464b Binary files /dev/null and b/sdk/mpr/testdata/microflows/ChangePassword.mxunit differ diff --git a/sdk/mpr/testdata/pages/Account_Overview.mxunit b/sdk/mpr/testdata/pages/Account_Overview.mxunit new file mode 100644 index 0000000..ab4004f Binary files /dev/null and b/sdk/mpr/testdata/pages/Account_Overview.mxunit differ diff --git a/sdk/mpr/testdata/pages/WidgetDemo_Showcase.mxunit b/sdk/mpr/testdata/pages/WidgetDemo_Showcase.mxunit new file mode 100644 index 0000000..1035e09 Binary files /dev/null and b/sdk/mpr/testdata/pages/WidgetDemo_Showcase.mxunit differ diff --git a/sdk/mpr/writer_dbconnection.go b/sdk/mpr/writer_dbconnection.go index 65e6e6f..f4000ab 100644 --- a/sdk/mpr/writer_dbconnection.go +++ b/sdk/mpr/writer_dbconnection.go @@ -88,7 +88,7 @@ func serializeDBQuery(q *model.DatabaseQuery) bson.M { "$Type": "DatabaseConnector$DatabaseQuery", "Name": q.Name, "Query": q.SQL, - "QueryType": int32(q.QueryType), + "QueryType": int64(q.QueryType), } if q.ID != "" { qDoc["$ID"] = idToBsonBinary(string(q.ID)) diff --git a/sdk/mpr/writer_microflow.go b/sdk/mpr/writer_microflow.go index 1b66455..f1bb607 100644 --- a/sdk/mpr/writer_microflow.go +++ b/sdk/mpr/writer_microflow.go @@ -178,7 +178,7 @@ func serializeSequenceFlow(flow *microflows.SequenceFlow) bson.D { {Key: "$ID", Value: idToBsonBinary(string(flow.ID))}, {Key: "$Type", Value: "Microflows$SequenceFlow"}, {Key: "CaseValues", Value: caseValues}, - {Key: "DestinationConnectionIndex", Value: int32(flow.DestinationConnectionIndex)}, + {Key: "DestinationConnectionIndex", Value: int64(flow.DestinationConnectionIndex)}, {Key: "DestinationPointer", Value: idToBsonBinary(string(flow.DestinationID))}, {Key: "IsErrorHandler", Value: flow.IsErrorHandler}, {Key: "Line", Value: bson.D{ @@ -187,7 +187,7 @@ func serializeSequenceFlow(flow *microflows.SequenceFlow) bson.D { {Key: "DestinationControlVector", Value: "0;0"}, {Key: "OriginControlVector", Value: "0;0"}, }}, - {Key: "OriginConnectionIndex", Value: int32(flow.OriginConnectionIndex)}, + {Key: "OriginConnectionIndex", Value: int64(flow.OriginConnectionIndex)}, {Key: "OriginPointer", Value: idToBsonBinary(string(flow.OriginID))}, } } @@ -197,7 +197,7 @@ func serializeAnnotationFlow(af *microflows.AnnotationFlow) bson.D { return bson.D{ {Key: "$ID", Value: idToBsonBinary(string(af.ID))}, {Key: "$Type", Value: "Microflows$AnnotationFlow"}, - {Key: "DestinationConnectionIndex", Value: int32(0)}, + {Key: "DestinationConnectionIndex", Value: int64(0)}, {Key: "DestinationPointer", Value: idToBsonBinary(string(af.DestinationID))}, {Key: "Line", Value: bson.D{ {Key: "$ID", Value: idToBsonBinary(generateUUID())}, @@ -205,7 +205,7 @@ func serializeAnnotationFlow(af *microflows.AnnotationFlow) bson.D { {Key: "DestinationControlVector", Value: "0;0"}, {Key: "OriginControlVector", Value: "0;0"}, }}, - {Key: "OriginConnectionIndex", Value: int32(0)}, + {Key: "OriginConnectionIndex", Value: int64(0)}, {Key: "OriginPointer", Value: idToBsonBinary(string(af.OriginID))}, } } @@ -527,8 +527,8 @@ func serializeMicroflowObject(obj microflows.MicroflowObject) bson.D { func serializePoint(pt model.Point) bson.D { return bson.D{ {Key: "$Type", Value: "Common$Point"}, - {Key: "X", Value: int32(pt.X)}, - {Key: "Y", Value: int32(pt.Y)}, + {Key: "X", Value: int64(pt.X)}, + {Key: "Y", Value: int64(pt.Y)}, } } @@ -536,8 +536,8 @@ func serializePoint(pt model.Point) bson.D { func serializeSize(sz model.Size) bson.D { return bson.D{ {Key: "$Type", Value: "Common$Size"}, - {Key: "Width", Value: int32(sz.Width)}, - {Key: "Height", Value: int32(sz.Height)}, + {Key: "Width", Value: int64(sz.Width)}, + {Key: "Height", Value: int64(sz.Height)}, } } diff --git a/sdk/mpr/writer_microflow_actions.go b/sdk/mpr/writer_microflow_actions.go index 56b9fb1..2068f4d 100644 --- a/sdk/mpr/writer_microflow_actions.go +++ b/sdk/mpr/writer_microflow_actions.go @@ -373,7 +373,7 @@ func serializeMicroflowAction(action microflows.MicroflowAction) bson.D { {Key: "$ID", Value: idToBsonBinary(string(a.ID))}, {Key: "$Type", Value: "Microflows$CloseFormAction"}, {Key: "ErrorHandlingType", Value: "Rollback"}, - {Key: "NumberOfPagesToClose", Value: int32(a.NumberOfPages)}, + {Key: "NumberOfPagesToClose", Value: int64(a.NumberOfPages)}, } return doc diff --git a/sdk/mpr/writer_modules.go b/sdk/mpr/writer_modules.go index cdb64e6..44dbbd0 100644 --- a/sdk/mpr/writer_modules.go +++ b/sdk/mpr/writer_modules.go @@ -250,7 +250,7 @@ func (w *Writer) serializeModule(module *model.Module) ([]byte, error) { "AppStoreVersionGuid": "", "IsThemeModule": false, "IsReusableComponent": module.IsReusableComponent, - "NewSortIndex": int32(0), + "NewSortIndex": int64(0), } return bson.Marshal(doc) } diff --git a/sdk/mpr/writer_odata.go b/sdk/mpr/writer_odata.go index e6290e0..8fc8b8a 100644 --- a/sdk/mpr/writer_odata.go +++ b/sdk/mpr/writer_odata.go @@ -284,7 +284,7 @@ func serializePublishedEntitySet(es *model.PublishedEntitySet, entityTypeID stri "$Type": "ODataPublish$EntitySet", "ExposedName": es.ExposedName, "UsePaging": es.UsePaging, - "PageSize": int32(es.PageSize), + "PageSize": int64(es.PageSize), } // EntityTypePointer is a BY_ID reference diff --git a/sdk/mpr/writer_pages.go b/sdk/mpr/writer_pages.go index 0f86eb1..409473b 100644 --- a/sdk/mpr/writer_pages.go +++ b/sdk/mpr/writer_pages.go @@ -128,8 +128,8 @@ func (w *Writer) serializePage(page *pages.Page) ([]byte, error) { {Key: "Style", Value: ""}, }}, {Key: "Autofocus", Value: "DesktopOnly"}, - {Key: "CanvasHeight", Value: int32(600)}, - {Key: "CanvasWidth", Value: int32(1200)}, + {Key: "CanvasHeight", Value: int64(600)}, + {Key: "CanvasWidth", Value: int64(1200)}, {Key: "Documentation", Value: page.Documentation}, {Key: "Excluded", Value: page.Excluded}, {Key: "ExportLevel", Value: "Hidden"}, @@ -209,9 +209,9 @@ func (w *Writer) serializePage(page *pages.Page) ([]byte, error) { doc = append(doc, bson.E{Key: "Parameters", Value: params}) doc = append(doc, bson.E{Key: "PopupCloseAction", Value: ""}) - doc = append(doc, bson.E{Key: "PopupHeight", Value: int32(600)}) + doc = append(doc, bson.E{Key: "PopupHeight", Value: int64(600)}) doc = append(doc, bson.E{Key: "PopupResizable", Value: false}) - doc = append(doc, bson.E{Key: "PopupWidth", Value: int32(600)}) + doc = append(doc, bson.E{Key: "PopupWidth", Value: int64(600)}) // Add Title // Mendix uses [3] for empty arrays, [2, item1, item2, ...] for non-empty arrays @@ -267,8 +267,8 @@ func (w *Writer) serializeSnippet(snippet *pages.Snippet) ([]byte, error) { doc := bson.D{ {Key: "$ID", Value: idToBsonBinary(string(snippet.ID))}, {Key: "$Type", Value: "Forms$Snippet"}, - {Key: "CanvasHeight", Value: int32(600)}, - {Key: "CanvasWidth", Value: int32(800)}, + {Key: "CanvasHeight", Value: int64(600)}, + {Key: "CanvasWidth", Value: int64(800)}, {Key: "Documentation", Value: snippet.Documentation}, {Key: "ExportLevel", Value: "Hidden"}, {Key: "Name", Value: snippet.Name}, diff --git a/sdk/mpr/writer_rest.go b/sdk/mpr/writer_rest.go index 7fd325b..a32dd3e 100644 --- a/sdk/mpr/writer_rest.go +++ b/sdk/mpr/writer_rest.go @@ -120,7 +120,7 @@ func serializeRestOperation(op *model.RestClientOperation) bson.M { } if op.Timeout > 0 { - doc["Timeout"] = int32(op.Timeout) + doc["Timeout"] = int64(op.Timeout) } // Method: polymorphic (WithBody or WithoutBody) diff --git a/sdk/mpr/writer_rest_test.go b/sdk/mpr/writer_rest_test.go index 2ddddc8..9421d2a 100644 --- a/sdk/mpr/writer_rest_test.go +++ b/sdk/mpr/writer_rest_test.go @@ -159,7 +159,7 @@ func TestSerializeRestOperationGetWithParams(t *testing.T) { assertField(t, result, "Name", "GetPet") // Timeout - if v, ok := result["Timeout"].(int32); !ok || v != 30 { + if v, ok := result["Timeout"].(int64); !ok || v != 30 { t.Errorf("Timeout: expected 30, got %v", result["Timeout"]) } diff --git a/sdk/mpr/writer_settings.go b/sdk/mpr/writer_settings.go index e043a88..38b46ec 100644 --- a/sdk/mpr/writer_settings.go +++ b/sdk/mpr/writer_settings.go @@ -4,22 +4,15 @@ package mpr import ( "fmt" - "math" "github.com/mendixlabs/mxcli/model" "go.mongodb.org/mongo-driver/bson" ) -// safeInt32 converts an int to int32 with clamping to prevent silent overflow. -func safeInt32(v int) int32 { - if v > math.MaxInt32 { - return math.MaxInt32 - } - if v < math.MinInt32 { - return math.MinInt32 - } - return int32(v) +// safeInt64 converts an int to int64. +func safeInt64(v int) int64 { + return int64(v) } // UpdateProjectSettings updates the project settings document. @@ -89,12 +82,12 @@ func serializeModelSettings(ms *model.ModelSettings, raw map[string]any) map[str raw["HealthCheckMicroflow"] = ms.HealthCheckMicroflow raw["AllowUserMultipleSessions"] = ms.AllowUserMultipleSessions raw["HashAlgorithm"] = ms.HashAlgorithm - raw["BcryptCost"] = safeInt32(ms.BcryptCost) + raw["BcryptCost"] = safeInt64(ms.BcryptCost) raw["JavaVersion"] = ms.JavaVersion raw["RoundingMode"] = ms.RoundingMode raw["ScheduledEventTimeZoneCode"] = ms.ScheduledEventTimeZoneCode raw["FirstDayOfWeek"] = ms.FirstDayOfWeek - raw["DecimalScale"] = safeInt32(ms.DecimalScale) + raw["DecimalScale"] = safeInt64(ms.DecimalScale) raw["EnableDataStorageOptimisticLocking"] = ms.EnableDataStorageOptimisticLocking raw["UseDatabaseForeignKeyConstraints"] = ms.UseDatabaseForeignKeyConstraints return raw @@ -120,10 +113,10 @@ func serializeServerConfiguration(cfg *model.ServerConfiguration) bson.M { "DatabaseUserName": cfg.DatabaseUserName, "DatabasePassword": cfg.DatabasePassword, "DatabaseUseIntegratedSecurity": cfg.DatabaseUseIntegratedSecurity, - "HttpPortNumber": safeInt32(cfg.HttpPortNumber), - "ServerPortNumber": safeInt32(cfg.ServerPortNumber), + "HttpPortNumber": safeInt64(cfg.HttpPortNumber), + "ServerPortNumber": safeInt64(cfg.ServerPortNumber), "ApplicationRootUrl": cfg.ApplicationRootUrl, - "MaxJavaHeapSize": safeInt32(cfg.MaxJavaHeapSize), + "MaxJavaHeapSize": safeInt64(cfg.MaxJavaHeapSize), "ExtraJvmParameters": cfg.ExtraJvmParameters, "OpenAdminPort": cfg.OpenAdminPort, "OpenHttpPort": cfg.OpenHttpPort, @@ -167,7 +160,7 @@ func serializeLanguageSettings(ls *model.LanguageSettings, raw map[string]any) m // serializeWorkflowsSettings updates the raw BSON map with modified workflow settings. func serializeWorkflowsSettings(ws *model.WorkflowsSettings, raw map[string]any) map[string]any { raw["UserEntity"] = ws.UserEntity - raw["DefaultTaskParallelism"] = safeInt32(ws.DefaultTaskParallelism) - raw["WorkflowEngineParallelism"] = safeInt32(ws.WorkflowEngineParallelism) + raw["DefaultTaskParallelism"] = safeInt64(ws.DefaultTaskParallelism) + raw["WorkflowEngineParallelism"] = safeInt64(ws.WorkflowEngineParallelism) return raw } diff --git a/sdk/mpr/writer_widgets.go b/sdk/mpr/writer_widgets.go index 4131744..94391fc 100644 --- a/sdk/mpr/writer_widgets.go +++ b/sdk/mpr/writer_widgets.go @@ -418,7 +418,7 @@ func serializeFormattingInfo() bson.D { {Key: "$Type", Value: "Forms$FormattingInfo"}, {Key: "CustomDateFormat", Value: ""}, {Key: "DateFormat", Value: "Date"}, - {Key: "DecimalPrecision", Value: int32(2)}, + {Key: "DecimalPrecision", Value: int64(2)}, {Key: "EnumFormat", Value: "Text"}, {Key: "GroupDigits", Value: false}, } @@ -557,7 +557,7 @@ func serializeClientTemplateParameter(param *pages.ClientTemplateParameter) bson {Key: "$Type", Value: "Forms$FormattingInfo"}, {Key: "CustomDateFormat", Value: ""}, {Key: "DateFormat", Value: "Date"}, - {Key: "DecimalPrecision", Value: int32(2)}, + {Key: "DecimalPrecision", Value: int64(2)}, {Key: "EnumFormat", Value: "Text"}, {Key: "GroupDigits", Value: false}, {Key: "TimeFormat", Value: "HoursMinutes"}, diff --git a/sdk/mpr/writer_widgets_custom.go b/sdk/mpr/writer_widgets_custom.go index f69863e..292a36e 100644 --- a/sdk/mpr/writer_widgets_custom.go +++ b/sdk/mpr/writer_widgets_custom.go @@ -41,7 +41,7 @@ func serializeCustomWidget(cw *pages.CustomWidget) bson.D { {Key: "LabelTemplate", Value: serializeLabelTemplate(cw.Label)}, {Key: "Name", Value: cw.Name}, {Key: "Object", Value: widgetObject}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Type", Value: widgetType}, } @@ -76,7 +76,7 @@ func serializeCustomWidgetWithRawType(cw *pages.CustomWidget) bson.D { {Key: "LabelTemplate", Value: serializeLabelTemplate(cw.Label)}, {Key: "Name", Value: cw.Name}, {Key: "Object", Value: widgetObject}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Type", Value: cw.RawType}, } diff --git a/sdk/mpr/writer_widgets_display.go b/sdk/mpr/writer_widgets_display.go index 8836b78..4a448c2 100644 --- a/sdk/mpr/writer_widgets_display.go +++ b/sdk/mpr/writer_widgets_display.go @@ -33,7 +33,7 @@ func serializeSnippetCall(s *pages.SnippetCallWidget) bson.D { {Key: "ConditionalVisibilitySettings", Value: nil}, {Key: "FormCall", Value: snippetCall}, {Key: "Name", Value: s.Name}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, } return doc @@ -96,11 +96,11 @@ func serializeGallery(g *pages.Gallery) bson.D { {Key: "DataSource", Value: dataSource}, {Key: "Editable", Value: false}, {Key: "Name", Value: g.Name}, - {Key: "NumberOfColumns", Value: int32(numberOfColumns)}, - {Key: "PageSize", Value: int32(pageSize)}, + {Key: "NumberOfColumns", Value: int64(numberOfColumns)}, + {Key: "PageSize", Value: int64(pageSize)}, {Key: "PullDownAction", Value: serializeClientAction(nil)}, {Key: "ScrollDirection", Value: "Vertical"}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Templates", Value: templates}, {Key: "Widgets", Value: contentWidgets}, } @@ -174,11 +174,11 @@ func serializeListView(lv *pages.ListView) bson.D { {Key: "DataSource", Value: dataSource}, {Key: "Editable", Value: lv.Editable}, {Key: "Name", Value: lv.Name}, - {Key: "NumberOfColumns", Value: int32(1)}, - {Key: "PageSize", Value: int32(pageSize)}, + {Key: "NumberOfColumns", Value: int64(1)}, + {Key: "PageSize", Value: int64(pageSize)}, {Key: "PullDownAction", Value: serializeClientAction(nil)}, {Key: "ScrollDirection", Value: "Vertical"}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Templates", Value: templates}, {Key: "Widgets", Value: contentWidgets}, } @@ -286,7 +286,7 @@ func serializeDynamicText(dt *pages.DynamicText) bson.D { {Key: "NativeAccessibilitySettings", Value: nil}, {Key: "NativeTextStyle", Value: "Text"}, {Key: "RenderMode", Value: renderMode}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, } return doc } @@ -314,7 +314,7 @@ func serializeActionButton(ab *pages.ActionButton) bson.D { {Key: "Name", Value: ab.Name}, {Key: "NativeAccessibilitySettings", Value: nil}, {Key: "RenderType", Value: "Button"}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Tooltip", Value: bson.D{ {Key: "$ID", Value: idToBsonBinary(generateUUID())}, {Key: "$Type", Value: "Texts$Text"}, @@ -359,7 +359,7 @@ func serializeStaticText(t *pages.Text) bson.D { {Key: "NativeAccessibilitySettings", Value: nil}, {Key: "NativeTextStyle", Value: "Text"}, {Key: "RenderMode", Value: renderMode}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, } return doc } @@ -392,7 +392,7 @@ func serializeTitle(t *pages.Title) bson.D { {Key: "ConditionalVisibilitySettings", Value: nil}, {Key: "Name", Value: t.Name}, {Key: "NativeAccessibilitySettings", Value: nil}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, } return doc } @@ -443,12 +443,12 @@ func serializeDataView(dv *pages.DataView) bson.D { {Key: "DataSource", Value: dataSource}, {Key: "Editability", Value: editability}, {Key: "FooterWidgets", Value: footerWidgets}, - {Key: "LabelWidth", Value: int32(3)}, + {Key: "LabelWidth", Value: int64(3)}, {Key: "Name", Value: dv.Name}, {Key: "NoEntityMessage", Value: noEntityMessage}, {Key: "ReadOnlyStyle", Value: "Control"}, {Key: "ShowFooter", Value: dv.ShowFooter}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Widgets", Value: widgets}, } @@ -588,13 +588,13 @@ func serializeDataGrid(dg *pages.DataGrid) bson.D { {Key: "DataSource", Value: dataSource}, {Key: "IsControlBarVisible", Value: len(dg.ControlBarWidgets) > 0}, {Key: "Name", Value: dg.Name}, - {Key: "NumberOfRows", Value: int32(20)}, - {Key: "RefreshTime", Value: int32(0)}, + {Key: "NumberOfRows", Value: int64(20)}, + {Key: "RefreshTime", Value: int64(0)}, {Key: "SelectFirst", Value: dg.SelectFirst}, {Key: "SelectionMode", Value: selectionMode}, {Key: "ShowEmptyRows", Value: dg.ShowEmptyRows}, {Key: "ShowPagingBar", Value: "YesWithTotalCount"}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "TooltipForm", Value: nil}, {Key: "WidthUnit", Value: "Percentage"}, } @@ -631,7 +631,7 @@ func serializeDataGridColumn(col *pages.DataGridColumn) bson.D { {Key: "FormatType", Value: "Attribute"}, {Key: "Name", Value: col.Name}, {Key: "ShowTooltip", Value: true}, - {Key: "Width", Value: int32(100)}, + {Key: "Width", Value: int64(100)}, } return doc @@ -717,7 +717,7 @@ func serializeNavigationList(nl *pages.NavigationList) bson.D { {Key: "ConditionalVisibilitySettings", Value: nil}, {Key: "Items", Value: items}, {Key: "Name", Value: nl.Name}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, } return doc } @@ -793,14 +793,14 @@ func serializeStaticImage(img *pages.StaticImage) bson.D { {Key: "Appearance", Value: serializeAppearance(img.Class, img.Style, img.DesignProperties)}, {Key: "ClickAction", Value: serializeClientAction(img.OnClickAction)}, {Key: "ConditionalVisibilitySettings", Value: nil}, - {Key: "Height", Value: int32(img.Height)}, + {Key: "Height", Value: int64(img.Height)}, {Key: "HeightUnit", Value: "Auto"}, {Key: "Image", Value: nil}, {Key: "Name", Value: img.Name}, {Key: "NativeAccessibilitySettings", Value: nil}, {Key: "Responsive", Value: img.Responsive}, - {Key: "TabIndex", Value: int32(0)}, - {Key: "Width", Value: int32(img.Width)}, + {Key: "TabIndex", Value: int64(0)}, + {Key: "Width", Value: int64(img.Width)}, {Key: "WidthUnit", Value: "Auto"}, } return doc @@ -830,15 +830,15 @@ func serializeDynamicImage(img *pages.DynamicImage) bson.D { {Key: "EntityRef", Value: nil}, }}, {Key: "DefaultImage", Value: nil}, - {Key: "Height", Value: int32(img.Height)}, + {Key: "Height", Value: int64(img.Height)}, {Key: "HeightUnit", Value: "Auto"}, {Key: "Name", Value: img.Name}, {Key: "NativeAccessibilitySettings", Value: nil}, {Key: "OnClickEnlarge", Value: false}, {Key: "Responsive", Value: img.Responsive}, {Key: "ShowAsThumbnail", Value: false}, - {Key: "TabIndex", Value: int32(0)}, - {Key: "Width", Value: int32(img.Width)}, + {Key: "TabIndex", Value: int64(0)}, + {Key: "Width", Value: int64(img.Width)}, {Key: "WidthUnit", Value: "Auto"}, } return doc diff --git a/sdk/mpr/writer_widgets_input.go b/sdk/mpr/writer_widgets_input.go index d725e2b..1493e1a 100644 --- a/sdk/mpr/writer_widgets_input.go +++ b/sdk/mpr/writer_widgets_input.go @@ -27,7 +27,7 @@ func serializeTextBox(tb *pages.TextBox) bson.D { {Key: "IsPasswordBox", Value: tb.IsPassword}, {Key: "KeyboardType", Value: "Default"}, {Key: "LabelTemplate", Value: serializeLabelTemplate(tb.Label)}, - {Key: "MaxLengthCode", Value: int32(-1)}, + {Key: "MaxLengthCode", Value: int64(-1)}, {Key: "Name", Value: tb.Name}, {Key: "NativeAccessibilitySettings", Value: nil}, {Key: "OnChangeAction", Value: serializeClientAction(nil)}, @@ -39,8 +39,8 @@ func serializeTextBox(tb *pages.TextBox) bson.D { {Key: "ScreenReaderLabel", Value: nil}, {Key: "SourceVariable", Value: nil}, {Key: "SubmitBehaviour", Value: "OnEndEditing"}, - {Key: "SubmitOnInputDelay", Value: int32(300)}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "SubmitOnInputDelay", Value: int64(300)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Validation", Value: serializeWidgetValidation()}, } } @@ -59,10 +59,10 @@ func serializeTextArea(ta *pages.TextArea) bson.D { {Key: "CounterMessage", Value: serializeEmptyText()}, {Key: "Editable", Value: "Always"}, {Key: "LabelTemplate", Value: serializeLabelTemplate(ta.Label)}, - {Key: "MaxLengthCode", Value: int32(-1)}, + {Key: "MaxLengthCode", Value: int64(-1)}, {Key: "Name", Value: ta.Name}, {Key: "NativeAccessibilitySettings", Value: nil}, - {Key: "NumberOfLines", Value: int32(5)}, + {Key: "NumberOfLines", Value: int64(5)}, {Key: "OnChangeAction", Value: serializeClientAction(nil)}, {Key: "OnEnterAction", Value: serializeClientAction(nil)}, {Key: "OnLeaveAction", Value: serializeClientAction(nil)}, @@ -71,8 +71,8 @@ func serializeTextArea(ta *pages.TextArea) bson.D { {Key: "ScreenReaderLabel", Value: nil}, {Key: "SourceVariable", Value: nil}, {Key: "SubmitBehaviour", Value: "OnEndEditing"}, - {Key: "SubmitOnInputDelay", Value: int32(300)}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "SubmitOnInputDelay", Value: int64(300)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Validation", Value: serializeWidgetValidation()}, } } @@ -99,7 +99,7 @@ func serializeDatePicker(dp *pages.DatePicker) bson.D { {Key: "ReadOnlyStyle", Value: "Inherit"}, {Key: "ScreenReaderLabel", Value: nil}, {Key: "SourceVariable", Value: nil}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Validation", Value: serializeWidgetValidation()}, } } @@ -122,7 +122,7 @@ func serializeCheckBox(cb *pages.CheckBox) bson.D { {Key: "ReadOnlyStyle", Value: "Inherit"}, {Key: "ScreenReaderLabel", Value: nil}, {Key: "SourceVariable", Value: nil}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Validation", Value: serializeWidgetValidation()}, } } @@ -147,7 +147,7 @@ func serializeRadioButtons(rb *pages.RadioButtons) bson.D { {Key: "ReadOnlyStyle", Value: "Inherit"}, {Key: "ScreenReaderLabel", Value: nil}, {Key: "SourceVariable", Value: nil}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Validation", Value: serializeWidgetValidation()}, } } @@ -177,7 +177,7 @@ func serializeDropDown(dd *pages.DropDown) bson.D { {Key: "ReadOnlyStyle", Value: "Inherit"}, {Key: "ScreenReaderLabel", Value: nil}, {Key: "SourceVariable", Value: nil}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Validation", Value: serializeWidgetValidation()}, } } diff --git a/sdk/mpr/writer_widgets_layout.go b/sdk/mpr/writer_widgets_layout.go index 4a10105..0160c04 100644 --- a/sdk/mpr/writer_widgets_layout.go +++ b/sdk/mpr/writer_widgets_layout.go @@ -20,7 +20,7 @@ func serializeContainer(c *pages.Container) bson.D { {Key: "OnClickAction", Value: serializeClientAction(nil)}, {Key: "RenderMode", Value: "Div"}, {Key: "ScreenReaderHidden", Value: false}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Widgets", Value: serializeWidgetArray(c.Widgets)}, } return doc @@ -54,7 +54,7 @@ func serializeGroupBox(gb *pages.GroupBox) bson.D { {Key: "ConditionalVisibilitySettings", Value: nil}, {Key: "HeaderMode", Value: headerMode}, {Key: "Name", Value: gb.Name}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Widgets", Value: serializeWidgetArray(gb.Widgets)}, } return doc @@ -81,7 +81,7 @@ func serializeLayoutGrid(lg *pages.LayoutGrid) bson.D { {Key: "ConditionalVisibilitySettings", Value: nil}, {Key: "Name", Value: lg.Name}, {Key: "Rows", Value: rows}, - {Key: "TabIndex", Value: int32(0)}, + {Key: "TabIndex", Value: int64(0)}, {Key: "Width", Value: "FullWidth"}, } return doc @@ -133,11 +133,11 @@ func serializeLayoutGridColumn(col *pages.LayoutGridColumn) bson.D { {Key: "$ID", Value: idToBsonBinary(string(col.ID))}, {Key: "$Type", Value: "Forms$LayoutGridColumn"}, {Key: "Appearance", Value: serializeAppearance("", "", nil)}, - {Key: "PhoneWeight", Value: int32(columnWeight(col.PhoneWeight))}, - {Key: "PreviewWidth", Value: int32(-1)}, // Default preview width - {Key: "TabletWeight", Value: int32(columnWeight(col.TabletWeight))}, + {Key: "PhoneWeight", Value: int64(columnWeight(col.PhoneWeight))}, + {Key: "PreviewWidth", Value: int64(-1)}, // Default preview width + {Key: "TabletWeight", Value: int64(columnWeight(col.TabletWeight))}, {Key: "VerticalAlignment", Value: "None"}, - {Key: "Weight", Value: int32(weight)}, // Desktop weight + {Key: "Weight", Value: int64(weight)}, // Desktop weight {Key: "Widgets", Value: serializeWidgetArray(col.Widgets)}, } }