@saltcorn/server 1.6.0-beta.1 → 1.6.0-beta.10
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 +72 -3
- package/app.js +32 -12
- package/auth/admin.js +109 -22
- package/auth/routes.js +178 -61
- package/auth/testhelp.js +9 -19
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/_saltcorn_admin-models.models_snapshot.Snapshot.html +2 -2
- package/docs/classes/_saltcorn_common-code.relations_relation.Relation.html +3 -3
- package/docs/classes/_saltcorn_common-code.relations_relations_finder.RelationsFinder.html +5 -5
- package/docs/classes/_saltcorn_data.diagram_cy_raster.CytoscapeRaster.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_dummy_node.DummyNode.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_node.Node.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_page_node.PageNode.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_table_node.TableNode.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_trigger_node.TriggerNode.html +4 -4
- package/docs/classes/_saltcorn_data.diagram_nodes_view_node.ViewNode.html +4 -4
- package/docs/classes/_saltcorn_data.mobile-mocks_node_async_hooks.AsyncLocalStorage.html +2 -2
- package/docs/classes/_saltcorn_data.models_crash.Crash.html +2 -2
- package/docs/classes/_saltcorn_data.models_eventlog.EventLog.html +2 -2
- package/docs/classes/_saltcorn_data.models_field.Field.html +9 -9
- package/docs/classes/_saltcorn_data.models_fieldrepeat.FieldRepeat.html +2 -2
- package/docs/classes/_saltcorn_data.models_file.File.html +21 -21
- package/docs/classes/_saltcorn_data.models_form.Form.html +2 -2
- package/docs/classes/_saltcorn_data.models_internal_mail_queue.MailQueue.html +4 -4
- package/docs/classes/_saltcorn_data.models_internal_push_message_helper.PushMessageHelper.html +7 -7
- package/docs/classes/_saltcorn_data.models_library.Library.html +2 -2
- package/docs/classes/_saltcorn_data.models_model.Model.html +2 -2
- package/docs/classes/_saltcorn_data.models_model_instance.ModelInstance.html +2 -2
- package/docs/classes/_saltcorn_data.models_notification.Notification.html +2 -2
- package/docs/classes/_saltcorn_data.models_page.Page.html +12 -11
- package/docs/classes/_saltcorn_data.models_page_group.PageGroup.html +16 -16
- package/docs/classes/_saltcorn_data.models_page_group_member.PageGroupMember.html +8 -8
- package/docs/classes/_saltcorn_data.models_plugin.Plugin.html +45 -10
- package/docs/classes/_saltcorn_data.models_role.Role.html +2 -2
- package/docs/classes/_saltcorn_data.models_table.Table.html +67 -65
- package/docs/classes/_saltcorn_data.models_table_constraints.TableConstraint.html +2 -2
- package/docs/classes/_saltcorn_data.models_tag.Tag.html +2 -2
- package/docs/classes/_saltcorn_data.models_tag_entry.TagEntry.html +2 -2
- package/docs/classes/_saltcorn_data.models_trigger.Trigger.html +22 -20
- package/docs/classes/_saltcorn_data.models_user.User.html +32 -32
- package/docs/classes/_saltcorn_data.models_view.View.html +16 -15
- package/docs/classes/_saltcorn_data.models_workflow.Workflow.html +2 -2
- package/docs/classes/_saltcorn_data.models_workflow_run.WorkflowRun.html +2 -2
- package/docs/classes/_saltcorn_data.models_workflow_step.WorkflowStep.html +2 -2
- package/docs/classes/_saltcorn_data.models_workflow_trace.MetaData.html +2 -2
- package/docs/classes/_saltcorn_data.models_workflow_trace.WorkflowTrace.html +2 -2
- package/docs/classes/_saltcorn_mobile-builder.mobile-builder.MobileBuilder.html +2 -3
- package/docs/classes/_saltcorn_mobile-builder.utils_capacitor-helper.CapacitorHelper.html +2 -2
- package/docs/enums/_saltcorn_common-code.relations_relation_types.RelationType.html +2 -2
- package/docs/enums/_saltcorn_common-code.relations_relation_types.ViewDisplayType.html +2 -2
- package/docs/functions/_saltcorn_admin-models.models_config-check.runConfigurationCheck.html +1 -1
- package/docs/functions/_saltcorn_common-code.relations_relation_helpers.buildRelationPath.html +1 -1
- package/docs/functions/_saltcorn_common-code.relations_relation_helpers.buildTableCaches.html +1 -1
- package/docs/functions/_saltcorn_common-code.relations_relation_helpers.parseLegacyRelation.html +1 -1
- package/docs/functions/_saltcorn_common-code.relations_relation_helpers.parseRelationPath.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.fixturesData.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withAnotherUserField.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withKeyFromLayerThree.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withKeyFromLayerTwo.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withMultipleInbounds.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withSecondTopicField.html +1 -1
- package/docs/functions/_saltcorn_common-code.tests_test_data.withSimplePostTopicrelation.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.action_link.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.action_url.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.fill_presets.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.getForm.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.get_view_link_query.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.get_viewable_fields.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.get_viewable_fields_from_layout.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.make_link.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.objToQueryString.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.parse_view_select.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.setDateLocales.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.splitUniques.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.standardBlockDispatch.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.standardLayoutRowVisitor.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.transformForm.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.updateViewSelect.html +1 -1
- package/docs/functions/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.view_linker.html +1 -1
- package/docs/functions/_saltcorn_data.db_connect_mobile.getConnectObject.html +1 -1
- package/docs/functions/_saltcorn_data.db_reset_schema.reset.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_cy_generate_utils.generateCyCode.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_cy_generate_utils.genereateCyCfg.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_node_extract_utils.buildObjectTrees.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_node_extract_utils.extractFromColumns.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_node_extract_utils.extractFromLayout.html +1 -1
- package/docs/functions/_saltcorn_data.diagram_node_extract_utils.extractViewToCreate.html +1 -1
- package/docs/functions/_saltcorn_data.migrate.create_blank_migration.html +1 -1
- package/docs/functions/_saltcorn_data.migrate.getMigrationsInDB.html +1 -1
- package/docs/functions/_saltcorn_data.migrate.migrate.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202102091312.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202210051058.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202210101540.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202304281224.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202307211459.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202502131103.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202508011455.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202510152058.js.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202603101553.sql_pg.html +1 -1
- package/docs/functions/_saltcorn_data.migrations_202604111200.js.html +1 -0
- package/docs/functions/_saltcorn_data.migrations_202604141200.js.html +1 -0
- package/docs/functions/_saltcorn_data.mobile-mocks_node_child_process.execSync.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs.createReadStream.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs.readdirSync.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs.writeFileSync.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.mkdir.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.readFile.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.readdir.html +1 -0
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.stat.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.unlink.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_fs_promises.writeFile.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_latest-version.latestVersion.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_v8.deserialize.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_node_v8.serialize.html +1 -1
- package/docs/functions/_saltcorn_data.mobile-mocks_npm_env-paths.envPaths.html +1 -1
- package/docs/functions/_saltcorn_data.model-helper.get_predictor.html +1 -1
- package/docs/functions/_saltcorn_data.model-helper.run_jupyter_model.html +1 -1
- package/docs/functions/_saltcorn_data.model-helper.shorten_trackback.html +1 -1
- package/docs/functions/_saltcorn_data.model-helper.write_csv.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_async_json_stream.async_json_stream.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_query.aggregation_query_fields.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_query.getAggAndField.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_query.joinfield_renamer.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_query.process_aggregations.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.buildKeyFromRelative.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.copyObject.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.deleteObject.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.downloadBuffer.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.getPublicFileUrl.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.getResolvedBucket.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.getS3Client.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.getServeUrl.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.getSignedFileUrl.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.headObject.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.isS3Enabled.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.listS3Folder.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.publicUrlToRelativePath.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.relativeKeyToPath.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.setObjectMetadata.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_s3_helpers.uploadBuffer.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.boolExamples.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.colorExamples.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.floatExamples.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.get_formula_examples.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.intExamples.html +1 -1
- package/docs/functions/_saltcorn_data.models_internal_table_helper.stringExamples.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.build_schema_data.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.calcfldViewConfig.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.calcfldViewOptions.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.calcrelViewOptions.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.displayType.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.field_picker_fields.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.generate_joined_query.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.getActionConfigFields.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_child_views.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_inbound_relation_opts.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_inbound_self_relation_opts.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_link_view_opts.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_many_to_many_relation_opts.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.get_parent_views.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.initial_config_all_fields.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.json_list_to_external_table.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.link_view.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.pathToState.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.picked_fields_to_query.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.readState.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.readStateStrict.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.runCollabEvents.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.run_action_column.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.stateFieldsToQuery.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.stateFieldsToWhere.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.stateToQueryString.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-helper.strictParseInt.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-testing.auto_test_plugin.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-testing.check_view_columns.html +1 -1
- package/docs/functions/_saltcorn_data.plugin-testing.generate_attributes.html +1 -1
- package/docs/functions/_saltcorn_data.standard-menu.create_standard_menu.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertIsErrorMsg.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertIsErrorsMsg.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertIsRow.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertIsSet.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertIsType.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertsIsSuccessMessage.html +1 -1
- package/docs/functions/_saltcorn_data.tests_assertions.assertsObjectIsUser.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.createAnotherUserField.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.createKeyFromLevelTwo.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.createLevelThreeInbound.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.createMultipleInbounds.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.createSecondTopicField.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.prepareEmployeeDepartment.html +1 -1
- package/docs/functions/_saltcorn_data.tests_common_helpers.prepareSimpleTopicPostRelation.html +1 -1
- package/docs/functions/_saltcorn_data.tests_remote_query_helper.deleteViewFromServer.html +1 -1
- package/docs/functions/_saltcorn_data.tests_remote_query_helper.prepareQueryEnviroment.html +1 -1
- package/docs/functions/_saltcorn_data.tests_remote_query_helper.sendViewToServer.html +1 -1
- package/docs/functions/_saltcorn_data.translate.hasLLM.html +1 -1
- package/docs/functions/_saltcorn_data.translate.translate.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.ftsFieldsSqlExpr.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.mkSelectOptions.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.mkWhere.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.orderByIsObject.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.orderByIsOperator.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.prefixFieldsInWhere.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.sqlBinOp.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.sqlFun.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.sqlsanitize.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.sqlsanitizeAllowDots.html +1 -1
- package/docs/functions/_saltcorn_db-common.internal.subSelectWhere.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.enable_multi_tenant.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.getRequestContext.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.getTenantSchema.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.init.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.is_it_multi_tenant.html +1 -1
- package/docs/functions/_saltcorn_db-common.multi-tenant.runWithTenant.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.buildInsertBulkSql.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.buildInsertSql.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.commitAndBeginNewTransaction.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.doCount.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.doDeleteWhere.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.doListScTables.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.doListTables.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.doListUserDefinedTables.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.do_add_index.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.do_drop_index.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.mkVal.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.openOrUseTransaction.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.reprAsJson.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.slugify.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.tryCatchInTransaction.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.whenTransactionisFree.html +1 -1
- package/docs/functions/_saltcorn_db-common.sqlite-commons.withTransaction.html +1 -1
- package/docs/functions/_saltcorn_markup.mktag.mkTag.html +1 -1
- package/docs/functions/_saltcorn_markup.tabs.tabs.html +1 -1
- package/docs/functions/_saltcorn_markup.workflow.renderWorkflow.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.androidFeatures.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.androidPermissions.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.buildTablesFile.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.copyPrepopulatedDb.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.copyServerFiles.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.copyShareExtFiles.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.copySiteLogo.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.copyTranslationFiles.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.createSqliteDb.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.extractDomain.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.generateAndroidVersionCode.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.hasAuthMethod.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyAndroidManifest.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyAppDelegate.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyConfigXml.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyGradleConfig.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyInfoPlist.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyShareViewController.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.modifyXcodeProjectFile.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepAppIcon.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepareAppIcon.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepareBuildDir.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepareExportOptionsPlist.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepareSplashIcon.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.prepareSplashPage.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.runAddEntitlementsScript.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writeCapacitorConfig.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writeCfgFile.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writeDataExtractionRules.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writeEntitlementsPlist.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writeNetworkSecurityConfig.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writePodfile.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_common-build-utils.writePrivacyInfo.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_package-bundle-utils.bundleMobileAppCode.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_package-bundle-utils.bundlePackagesAndPlugins.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_package-bundle-utils.copyOptionalSource.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_package-bundle-utils.copyPluginMobileAppDirs.html +1 -1
- package/docs/functions/_saltcorn_mobile-builder.utils_package-bundle-utils.copyPublicDirs.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.add_index.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.add_unique_constraint.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.count.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.deleteWhere.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.drop_index.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.drop_reset_schema.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.drop_unique_constraint.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.init.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.insert.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.insertRows.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.listScTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.listTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.listUserDefinedTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.query.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.select.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.selectMaybeOne.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.selectOne.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.setConnectionObject.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.tableExists.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.time.html +1 -1
- package/docs/functions/_saltcorn_sqlite-mobile.sqlite_capacitor.update.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.add_index.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.add_unique_constraint.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.begin.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.changeConnection.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.close.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.commit.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.count.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.deleteWhere.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.dropTable.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.dropTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.drop_index.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.drop_reset_schema.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.drop_unique_constraint.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.getVersion.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.get_db_filepath.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.get_sql_logging.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.init.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.insert.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.listScTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.listTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.listUserDefinedTables.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.query.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.rollback.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.select.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.selectMaybeOne.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.selectOne.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.set_sql_logging.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.sql_log.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.update.html +1 -1
- package/docs/functions/_saltcorn_sqlite.sqlite.updateWhere.html +1 -1
- package/docs/functions/_saltcorn_types.base_types.instanceOWithHtmlFile.html +1 -1
- package/docs/functions/_saltcorn_types.base_types.instanceOfFieldViewEdit.html +1 -1
- package/docs/functions/_saltcorn_types.base_types.instanceOfFieldViewShow.html +1 -1
- package/docs/functions/_saltcorn_types.base_types.instanceOfPack.html +1 -1
- package/docs/functions/_saltcorn_types.common_types.instanceOfErrorMsg.html +1 -1
- package/docs/functions/_saltcorn_types.common_types.instanceOfSuccessMsg.html +1 -1
- package/docs/functions/_saltcorn_types.common_types.instanceOfType.html +1 -1
- package/docs/functions/_saltcorn_types.model-abstracts_abstract_field.instanceOfField.html +1 -1
- package/docs/functions/_saltcorn_types.model-abstracts_abstract_page.instanceOfPage.html +1 -1
- package/docs/functions/_saltcorn_types.model-abstracts_abstract_plugin.instanceOfPlugin.html +1 -1
- package/docs/functions/_saltcorn_types.model-abstracts_abstract_table.instanceOfTable.html +1 -1
- package/docs/functions/_saltcorn_types.model-abstracts_abstract_view.instanceOfView.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/_saltcorn_db-common.dbtypes.UserLike.html +2 -2
- package/docs/interfaces/_saltcorn_markup.types.TagExports.html +2 -2
- package/docs/interfaces/_saltcorn_mobile-builder.utils_common-build-utils.ScCapacitorConfig.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_field.AbstractField.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_field.AbstractFieldRepeat.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_form.AbstractForm.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_page.AbstractPage.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_page_group.AbstractPageGroup.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_page_group_member.AbstractPageGroupMember.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_plugin.AbstractPlugin.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_role.AbstractRole.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_table.AbstractTable.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_tag.AbstractTag.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_tag_entry.AbstractTagEntry.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_trigger.AbstractTrigger.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_user.AbstractUser.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_user.ForUserRequest.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_view.AbstractView.html +2 -2
- package/docs/interfaces/_saltcorn_types.model-abstracts_abstract_workflow.AbstractWorkflow.html +2 -2
- package/docs/modules/_saltcorn_data.html +1 -1
- package/docs/modules/_saltcorn_data.migrations_202604091531.html +1 -0
- package/docs/modules/_saltcorn_data.migrations_202604111200.html +1 -0
- package/docs/modules/_saltcorn_data.migrations_202604141200.html +1 -0
- package/docs/modules/_saltcorn_data.mobile-mocks_node_fs.html +1 -1
- package/docs/modules/_saltcorn_data.mobile-mocks_node_fs_promises.html +1 -1
- package/docs/modules/_saltcorn_data.mobile-mocks_npm_npm-registry-fetch.html +1 -0
- package/docs/modules/_saltcorn_data.mobile-mocks_saltcorn_admin-models-tenant.html +1 -0
- package/docs/modules/_saltcorn_data.mobile-mocks_saltcorn_plugins-loader-plugin-installer.html +1 -0
- package/docs/modules/_saltcorn_data.mobile-mocks_saltcorn_plugins-loader-stable-versioning.html +1 -0
- package/docs/modules/_saltcorn_data.models_index.discovery.html +1 -1
- package/docs/types/_saltcorn_data.diagram_node_extract_utils.ExtractOpts.html +2 -2
- package/docs/types/_saltcorn_data.diagram_node_extract_utils.ExtractResult.html +2 -2
- package/docs/types/_saltcorn_data.diagram_nodes_node.NodeType.html +1 -1
- package/docs/types/_saltcorn_data.models_config.ConfigTypes.html +1 -1
- package/docs/types/_saltcorn_data.models_config.SingleConfig.html +1 -1
- package/docs/types/_saltcorn_data.models_eventlog.EventLogCfg.html +2 -2
- package/docs/types/_saltcorn_data.models_file.FileCfg.html +2 -2
- package/docs/types/_saltcorn_data.models_form.AdditionalButton.html +1 -1
- package/docs/types/_saltcorn_data.models_form.FormCfg.html +2 -2
- package/docs/types/_saltcorn_data.models_internal_push_message_helper.MobileSubscription.html +2 -2
- package/docs/types/_saltcorn_data.models_internal_push_message_helper.WebPushSubscription.html +2 -2
- package/docs/types/_saltcorn_data.models_internal_s3_helpers.S3HeadResult.html +1 -1
- package/docs/types/_saltcorn_data.models_internal_s3_helpers.S3ListResult.html +2 -2
- package/docs/types/_saltcorn_data.models_page_group.ScreenInfoParams.html +2 -2
- package/docs/types/_saltcorn_data.models_table.ChildRelations.html +2 -2
- package/docs/types/_saltcorn_data.models_table.ParentRelations.html +2 -2
- package/docs/types/_saltcorn_data.models_table.RelationData.html +2 -2
- package/docs/types/_saltcorn_data.models_tag_entry.TagEntryCfg.html +1 -1
- package/docs/types/_saltcorn_data.models_view.FindViewsPred.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.AggregationOptions.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.CoordOpts.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.DatabaseClient.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.JoinField.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.JoinFields.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.JoinOptions.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.JsonPath.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.JsonPathElem.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.Operator.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.PartialSome.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.PrimaryKeyValue.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.Row.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.SelectOptions.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.StrongRow.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.SubselectOptions.html +2 -2
- package/docs/types/_saltcorn_db-common.dbtypes.Value.html +1 -1
- package/docs/types/_saltcorn_db-common.dbtypes.Where.html +2 -2
- package/docs/types/_saltcorn_db-common.sqlite-commons.SqlAndValues.html +2 -2
- package/docs/types/_saltcorn_db-common.types.DbExportsType.html +2 -2
- package/docs/types/_saltcorn_db-common.types.GenObj.html +1 -1
- package/docs/types/_saltcorn_markup.emergency_layout.WrapParams.html +2 -2
- package/docs/types/_saltcorn_markup.helpers.CheckBoxGroupOpts.html +2 -2
- package/docs/types/_saltcorn_markup.helpers.PaginationOpts.html +2 -2
- package/docs/types/_saltcorn_markup.helpers.RadioGroupOpts.html +2 -2
- package/docs/types/_saltcorn_markup.helpers.SearchBarOpts.html +2 -2
- package/docs/types/_saltcorn_markup.layout.RenderOpts-1.html +2 -2
- package/docs/types/_saltcorn_markup.layout.RenderOpts.html +2 -2
- package/docs/types/_saltcorn_markup.mjml-layout.RenderOpts.html +2 -2
- package/docs/types/_saltcorn_markup.table.HeadersParams.html +2 -2
- package/docs/types/_saltcorn_markup.table.OptsParams.html +2 -2
- package/docs/types/_saltcorn_markup.types.AttributeVal.html +1 -1
- package/docs/types/_saltcorn_markup.types.Attributes.html +2 -2
- package/docs/types/_saltcorn_markup.types.ClassVal.html +1 -1
- package/docs/types/_saltcorn_markup.types.Element.html +1 -1
- package/docs/types/_saltcorn_markup.types.Falsy.html +1 -1
- package/docs/types/_saltcorn_markup.types.StyleVal.html +1 -1
- package/docs/types/_saltcorn_markup.types.TagFunction.html +1 -1
- package/docs/types/_saltcorn_mobile-builder.mobile-builder.IosCfg.html +2 -2
- package/docs/types/_saltcorn_mobile-builder.utils_capacitor-helper.CapacitorCfg.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Action.html +5 -4
- package/docs/types/_saltcorn_types.base_types.AuthenticationMethod.html +2 -2
- package/docs/types/_saltcorn_types.base_types.CalcJoinfield.html +2 -2
- package/docs/types/_saltcorn_types.base_types.CapacitorPlugin.html +2 -2
- package/docs/types/_saltcorn_types.base_types.CodePagePack.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Column.html +2 -2
- package/docs/types/_saltcorn_types.base_types.ConnectObjType.html +2 -2
- package/docs/types/_saltcorn_types.base_types.ConnectedObjects.html +2 -2
- package/docs/types/_saltcorn_types.base_types.CopilotSkill.html +2 -2
- package/docs/types/_saltcorn_types.base_types.ErrorObj.html +2 -2
- package/docs/types/_saltcorn_types.base_types.FieldLike.html +1 -1
- package/docs/types/_saltcorn_types.base_types.FieldView.html +1 -1
- package/docs/types/_saltcorn_types.base_types.Header.html +2 -2
- package/docs/types/_saltcorn_types.base_types.JoinFieldOption.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Layout.html +1 -1
- package/docs/types/_saltcorn_types.base_types.MenuItem.html +2 -2
- package/docs/types/_saltcorn_types.base_types.MobileConfig.html +2 -3
- package/docs/types/_saltcorn_types.base_types.ModelPattern.html +6 -6
- package/docs/types/_saltcorn_types.base_types.Pack.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Plugin.html +1 -1
- package/docs/types/_saltcorn_types.base_types.PluginFunction.html +3 -2
- package/docs/types/_saltcorn_types.base_types.PluginLayout.html +2 -2
- package/docs/types/_saltcorn_types.base_types.PluginRoute.html +2 -2
- package/docs/types/_saltcorn_types.base_types.PluginSourceType.html +1 -1
- package/docs/types/_saltcorn_types.base_types.PluginType.html +2 -2
- package/docs/types/_saltcorn_types.base_types.PluginWrap.html +1 -1
- package/docs/types/_saltcorn_types.base_types.PluginWrapArg.html +2 -2
- package/docs/types/_saltcorn_types.base_types.RelationOption.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Req.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Res.html +2 -2
- package/docs/types/_saltcorn_types.base_types.ResultType.html +2 -2
- package/docs/types/_saltcorn_types.base_types.RouteAction.html +1 -1
- package/docs/types/_saltcorn_types.base_types.RunExtra.html +1 -1
- package/docs/types/_saltcorn_types.base_types.SlugStepType.html +2 -2
- package/docs/types/_saltcorn_types.base_types.StepResType.html +1 -1
- package/docs/types/_saltcorn_types.base_types.SubField.html +2 -2
- package/docs/types/_saltcorn_types.base_types.TableProvider.html +2 -2
- package/docs/types/_saltcorn_types.base_types.TableQuery.html +2 -2
- package/docs/types/_saltcorn_types.base_types.Tablely.html +1 -1
- package/docs/types/_saltcorn_types.base_types.ViewTemplate.html +3 -2
- package/docs/types/_saltcorn_types.common_types.ErrorMessage.html +2 -2
- package/docs/types/_saltcorn_types.common_types.GenObj.html +1 -1
- package/docs/types/_saltcorn_types.common_types.ReqRes.html +2 -2
- package/docs/types/_saltcorn_types.common_types.ResultMessage.html +1 -1
- package/docs/types/_saltcorn_types.common_types.SuccessMessage.html +2 -2
- package/docs/types/_saltcorn_types.common_types.Type.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_event_log.EventLogPack.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_field.FieldCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_field.InputType.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_form.AdditionalButton.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_library.LibraryCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_library.LibraryPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_model.ModelCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_model.ModelPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_model_instance.ModelInstanceCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_model_instance.ModelInstancePack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page.PageCfg.html +3 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page.PagePack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page_group.PageGroupCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page_group.PageGroupPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page_group_member.PageGroupMemberCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_page_group_member.PageGroupMemberPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_plugin.PluginCfg.html +3 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_plugin.PluginPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_role.RoleCfg.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_role.RolePack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_table.TableCfg.html +3 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_table.TablePack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_tag.TagPack.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_tag_entry.TagEntryPack.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_trigger.TriggerCfg.html +3 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_trigger.TriggerPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_view.ViewCfg.html +3 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_view.ViewPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow.ConfigWorkflowStep.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow.RunResult.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow_run.WorkflowRunCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow_step.WorkflowStepCfg.html +2 -2
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow_step.WorkflowStepPack.html +1 -1
- package/docs/types/_saltcorn_types.model-abstracts_abstract_workflow_trace.WorkflowTraceCfg.html +2 -2
- package/docs/variables/_saltcorn_admin-models..backup.create_backup.html +1 -1
- package/docs/variables/_saltcorn_admin-models..backup.create_csv_from_rows.html +1 -1
- package/docs/variables/_saltcorn_admin-models..backup.restore.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.add_to_menu.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.can_install_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.fetch_available_packs.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.fetch_pack_by_name.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.install_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.library_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.model_instance_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.model_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.page_group_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.page_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.plugin_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.role_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.table_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.trigger_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.uninstall_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..pack.view_pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.copy_tenant_template.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.create_tenant.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.deleteTenant.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.domain_sanitize.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.eachTenant.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.getAllTenantRows.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.getAllTenants.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.insertTenant.html +1 -1
- package/docs/variables/_saltcorn_admin-models..tenant.switchToTenant.html +1 -1
- package/docs/variables/_saltcorn_admin-models.models_backup.backup.html +1 -1
- package/docs/variables/_saltcorn_admin-models.pack.pack.html +1 -1
- package/docs/variables/_saltcorn_admin-models.tenant.tenant.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedFive.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedFour.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedOne.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedSix.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedThree.html +1 -1
- package/docs/variables/_saltcorn_common-code.tests_expected_relations.expectedTwo.html +1 -1
- package/docs/variables/_saltcorn_data..migrations.html +1 -1
- package/docs/variables/_saltcorn_data..plugin_helper.run_action_column.html +1 -1
- package/docs/variables/_saltcorn_data..utils.NotAuthorized.html +1 -1
- package/docs/variables/_saltcorn_data..utils.isPushEnabled.html +1 -1
- package/docs/variables/_saltcorn_data..utils.sleep.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_actions.actions.html +13 -13
- package/docs/variables/_saltcorn_data.base-plugin_fieldviews.fieldviews.html +3 -3
- package/docs/variables/_saltcorn_data.base-plugin_fileview.fileviews.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_index.index.html +15 -15
- package/docs/variables/_saltcorn_data.base-plugin_types.types.html +7 -7
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_edit.edit.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_feed.feed.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_filter.filter.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_list.list.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_listshowlist.listshowlist.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_room.room-1.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_room.room.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_show.show.html +1 -1
- package/docs/variables/_saltcorn_data.base-plugin_viewtemplates_viewable_fields.edit_build_in_actions.html +1 -1
- package/docs/variables/_saltcorn_data.contract.contract.html +1 -1
- package/docs/variables/_saltcorn_data.db_connect.connect.html +1 -1
- package/docs/variables/_saltcorn_data.db_fa5-icons.fa5Icons.html +1 -1
- package/docs/variables/_saltcorn_data.db_fixtures.fixtures.html +1 -1
- package/docs/variables/_saltcorn_data.db_index.dbExports.html +1 -1
- package/docs/variables/_saltcorn_data.db_state.state.html +3 -3
- package/docs/variables/_saltcorn_data.migrations_202005141503.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202005241712.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202005251037.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202005282134.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202006022156.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202006051507.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202006240906.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202007091707.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202007202144.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202008031500.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202008051415.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202008121149.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202008121149.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009112140.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009112140.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009181655.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009221105.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009231331.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202009301531.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202010231444.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202010251412.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202011021749.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202011051353.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202011111127.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202012011203.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202012100841.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202012281835.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202101061051.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202101141128.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202102091312.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202102101624.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202102172148.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202102261650.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106102347.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106112120.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106120012.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106120220.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106121701.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106121703.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106121703.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202106251126.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202107281619.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202107302158.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202107302158.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202108022257.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202109201624.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202109301031.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202109301031.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202111290253.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202111290253.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202112282254.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202112282254.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202207022002.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202207252150.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202207252150.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202207261221.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202208101144.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202208101144.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202211040031.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202212112152.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202212112152.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202301130917.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202303201126.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202303201126.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202303221944.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202303221944.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202304281224.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202305031518.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202305031518.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202308211648.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202311011755.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202311011755.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202311231356.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202402071125.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202406260915.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202412051957.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202412051957.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202412111526.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202412111526.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202501081226.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202501081226.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202501201239.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202501262157.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202503071353.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202506050958.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202510110312.sql_pg.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202510110312.sql_sqlite.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202511081024.sql.html +1 -1
- package/docs/variables/_saltcorn_data.migrations_202604091531.sql.html +1 -0
- package/docs/variables/_saltcorn_data.mobile-mocks_npm_npm-registry-fetch.npmRegistryFetch.html +1 -0
- package/docs/variables/_saltcorn_data.mobile-mocks_saltcorn_html-pdf-node.htmlPdfNode.html +1 -1
- package/docs/variables/_saltcorn_data.models_config.configExports.html +1 -1
- package/docs/variables/_saltcorn_data.models_discovery.discovery.html +6 -2
- package/docs/variables/_saltcorn_data.models_email.email.html +3 -3
- package/docs/variables/_saltcorn_data.models_expression.expression.html +3 -3
- package/docs/variables/_saltcorn_data.models_index.config.available_languages.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.check_email_mask.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.configTypes.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.deleteConfig.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.getAllConfig.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.getConfig.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.get_base_url.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.get_latest_npm_version.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.remove_from_menu.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.save_menu_items.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.config.setConfig.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.discover_tables.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.discoverable_tables.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.findType.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.get_existing_views.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.implement_discovery.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.discovery.make_field.html +1 -0
- package/docs/variables/_saltcorn_data.models_index.discovery.reconcile_table.html +7 -0
- package/docs/variables/_saltcorn_data.models_index.email.getMailTransport.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.email.send_verification_email.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.email.viewToEmailHtml.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.apply_calculated_fields.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.apply_calculated_fields_stored.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.eval_expression.html +9 -1
- package/docs/variables/_saltcorn_data.models_index.expression.expressionValidator.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.get_async_expression_function.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.get_expression_function.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.jsexprToWhere.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.recalculate_for_stored.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.expression.transform_for_async.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.eachView.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.getStringsForI18n.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.getViews.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.translateLayout.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.traverse.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.layout.traverseSync.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.random.all_views.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.random.fill_table_row.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.random.initial_view.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.random.random_table.html +1 -1
- package/docs/variables/_saltcorn_data.models_index.scheduler.runScheduler.html +1 -1
- package/docs/variables/_saltcorn_data.models_layout.layout.html +1 -1
- package/docs/variables/_saltcorn_data.models_random.random.html +1 -1
- package/docs/variables/_saltcorn_data.models_scheduler.scheduler.html +1 -1
- package/docs/variables/_saltcorn_data.plugin-helper.add_free_variables_to_joinfields.html +1 -1
- package/docs/variables/_saltcorn_data.tests_mocks.mocks.html +1 -1
- package/docs/variables/_saltcorn_data.tests_remote_query_helper.renderEditInEditConfig.html +1 -1
- package/docs/variables/_saltcorn_data.utils.utils.html +11 -5
- package/docs/variables/_saltcorn_data.web-mobile-commons.webMobileCommons.html +1 -1
- package/docs/variables/_saltcorn_db-common.internal.dbCommonModulePath.html +1 -1
- package/docs/variables/_saltcorn_db-common.multi-tenant.tenantNamespace.html +1 -1
- package/docs/variables/_saltcorn_db-common.tenants.tenants.html +1 -1
- package/docs/variables/_saltcorn_markup..export_.html +1 -1
- package/docs/variables/_saltcorn_markup.builder.builder.html +1 -1
- package/docs/variables/_saltcorn_markup.emergency_layout.EmergencyLayoutExports.html +1 -1
- package/docs/variables/_saltcorn_markup.form.form.html +1 -1
- package/docs/variables/_saltcorn_markup.helpers.HelpersExports.html +1 -1
- package/docs/variables/_saltcorn_markup.layout.LayoutExports-1.html +1 -1
- package/docs/variables/_saltcorn_markup.layout.LayoutExports.html +1 -1
- package/docs/variables/_saltcorn_markup.layout_utils.layoutUtils.html +1 -1
- package/docs/variables/_saltcorn_markup.mjml-layout.LayoutExports.html +1 -1
- package/docs/variables/_saltcorn_markup.mjml-tags.tagsExports.html +1 -1
- package/docs/variables/_saltcorn_markup.table.TableExports.html +1 -1
- package/docs/variables/_saltcorn_markup.tags.tagsExports.html +1 -1
- package/docs/variables/_saltcorn_types..generators.generateBool.html +1 -1
- package/docs/variables/_saltcorn_types..generators.generateString.html +1 -1
- package/docs/variables/_saltcorn_types..generators.num_between.html +1 -1
- package/docs/variables/_saltcorn_types..generators.oneOf.html +1 -1
- package/docs/variables/_saltcorn_types.generators.generators.html +1 -1
- package/errors.js +4 -4
- package/help/Event channel and payload.tmd +5 -0
- package/help/Extra state formula.tmd +1 -1
- package/help/Group by formula.tmd +15 -0
- package/help/JavaScript action code.tmd +5 -1
- package/load_plugins.js +7 -398
- package/locales/ar.json +262 -1
- package/locales/de.json +264 -3
- package/locales/en.json +29 -9
- package/locales/es.json +265 -4
- package/locales/fr.json +263 -2
- package/locales/ur.json +273 -4
- package/markup/admin.js +14 -9
- package/markup/expression_blurb.js +1 -1
- package/package.json +14 -14
- package/public/monaco/loader.js +0 -2
- package/public/popper.min.js +0 -1
- package/public/saltcorn-builder.css +82 -0
- package/public/saltcorn-common.js +36 -2
- package/public/saltcorn.css +138 -0
- package/public/saltcorn.js +1457 -29
- package/public/socket.io.min.js +0 -1
- package/public/tabulator.min.js +2 -3
- package/public/tabulator_bootstrap4.min.css +1 -2
- package/public/tabulator_bootstrap5.min.css +1 -2
- package/routes/actions.js +224 -22
- package/routes/admin.js +71 -12
- package/routes/api.js +96 -60
- package/routes/delete.js +2 -5
- package/routes/edit.js +2 -5
- package/routes/entities.js +65 -1245
- package/routes/eventlog.js +47 -0
- package/routes/fields.js +125 -14
- package/routes/files.js +36 -4
- package/routes/homepage.js +4 -1
- package/routes/list.js +69 -11
- package/routes/packs.js +2 -3
- package/routes/page.js +18 -1
- package/routes/pageedit.js +1 -0
- package/routes/plugins.js +56 -21
- package/routes/scapi.js +1 -2
- package/routes/sync.js +183 -54
- package/routes/tables.js +492 -2
- package/routes/tenant.js +3 -3
- package/routes/utils.js +17 -6
- package/routes/viewedit.js +10 -6
- package/serve.js +35 -23
- package/tests/admin.test.js +5 -5
- package/tests/api.test.js +424 -2
- package/tests/auth.test.js +230 -1
- package/tests/fields.test.js +16 -0
- package/tests/files.test.js +43 -7
- package/tests/page.test.js +53 -0
- package/tests/plugin_install.test.js +132 -13
- package/tests/plugins.test.js +1 -2
- package/tests/sync.test.js +900 -18
- package/tests/view.test.js +32 -0
- package/wrapper.js +3 -1
package/routes/tables.js
CHANGED
|
@@ -8,6 +8,7 @@ const Router = require("express-promise-router");
|
|
|
8
8
|
|
|
9
9
|
const db = require("@saltcorn/data/db");
|
|
10
10
|
const Table = require("@saltcorn/data/models/table");
|
|
11
|
+
const Field = require("@saltcorn/data/models/field");
|
|
11
12
|
const File = require("@saltcorn/data/models/file");
|
|
12
13
|
const View = require("@saltcorn/data/models/view");
|
|
13
14
|
const User = require("@saltcorn/data/models/user");
|
|
@@ -63,6 +64,9 @@ const {
|
|
|
63
64
|
discoverable_tables,
|
|
64
65
|
discover_tables,
|
|
65
66
|
implement_discovery,
|
|
67
|
+
reconcile_table,
|
|
68
|
+
make_field,
|
|
69
|
+
findType,
|
|
66
70
|
} = require("@saltcorn/data/models/discovery");
|
|
67
71
|
const { getState } = require("@saltcorn/data/db/state");
|
|
68
72
|
const { cardHeaderTabs } = require("@saltcorn/markup/layout_utils");
|
|
@@ -792,6 +796,311 @@ const attribBadges = (f) => {
|
|
|
792
796
|
return s;
|
|
793
797
|
};
|
|
794
798
|
|
|
799
|
+
/**
|
|
800
|
+
* Rescan Table Fields (GET Handler)
|
|
801
|
+
* @name get/rescan/:idorname
|
|
802
|
+
* @function
|
|
803
|
+
* @memberof module:routes/tables~tablesRouter
|
|
804
|
+
*/
|
|
805
|
+
router.get(
|
|
806
|
+
"/rescan/:idorname",
|
|
807
|
+
isAdmin,
|
|
808
|
+
error_catcher(async (req, res) => {
|
|
809
|
+
const { idorname } = req.params;
|
|
810
|
+
let id = parseInt(idorname);
|
|
811
|
+
let table;
|
|
812
|
+
if (id) [table] = await Table.find({ id });
|
|
813
|
+
if (!table) [table] = await Table.find({ name: idorname });
|
|
814
|
+
if (!table) {
|
|
815
|
+
req.flash("error", req.__(`Table not found`));
|
|
816
|
+
res.redirect(`/table`);
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
const result = await reconcile_table(table);
|
|
821
|
+
const ghosts = result.fields.filter((f) => f.status === "ghost");
|
|
822
|
+
const orphans = result.fields.filter((f) => f.status === "orphan");
|
|
823
|
+
const matches = result.fields.filter((f) => f.status === "match");
|
|
824
|
+
|
|
825
|
+
const statusBadge = (status) => {
|
|
826
|
+
switch (status) {
|
|
827
|
+
case "match": return badge("success", req.__("Match"));
|
|
828
|
+
case "ghost": return badge("danger", req.__("Ghost"));
|
|
829
|
+
case "orphan": return badge("primary", req.__("Orphan"));
|
|
830
|
+
default: return "";
|
|
831
|
+
}
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
let ghostForm = "";
|
|
835
|
+
if (ghosts.length > 0) {
|
|
836
|
+
ghostForm = form(
|
|
837
|
+
{
|
|
838
|
+
method: "post",
|
|
839
|
+
action: `/table/rescan-delete/${table.id}`,
|
|
840
|
+
},
|
|
841
|
+
input({ type: "hidden", name: "_csrf", value: req.csrfToken() }),
|
|
842
|
+
h4({ class: "text-danger" }, req.__("Ghost fields (in Saltcorn, not in DB)")),
|
|
843
|
+
mkTable(
|
|
844
|
+
[
|
|
845
|
+
{
|
|
846
|
+
label: "",
|
|
847
|
+
key: (r) =>
|
|
848
|
+
input({
|
|
849
|
+
type: "checkbox",
|
|
850
|
+
name: "fields",
|
|
851
|
+
value: r.name,
|
|
852
|
+
checked: true,
|
|
853
|
+
}),
|
|
854
|
+
},
|
|
855
|
+
{ label: req.__("Name"), key: "name" },
|
|
856
|
+
{ label: req.__("Type"), key: (r) => r.type || "—" },
|
|
857
|
+
{ label: req.__("Status"), key: (r) => statusBadge(r.status) },
|
|
858
|
+
],
|
|
859
|
+
ghosts,
|
|
860
|
+
{ hover: true }
|
|
861
|
+
),
|
|
862
|
+
button(
|
|
863
|
+
{
|
|
864
|
+
type: "submit",
|
|
865
|
+
class: "btn btn-danger mt-2",
|
|
866
|
+
},
|
|
867
|
+
req.__("Remove selected ghosts from Saltcorn")
|
|
868
|
+
)
|
|
869
|
+
);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
let orphanForm = "";
|
|
873
|
+
if (orphans.length > 0) {
|
|
874
|
+
orphanForm = form(
|
|
875
|
+
{
|
|
876
|
+
method: "post",
|
|
877
|
+
action: `/table/rescan-import/${table.id}`,
|
|
878
|
+
},
|
|
879
|
+
input({ type: "hidden", name: "_csrf", value: req.csrfToken() }),
|
|
880
|
+
h4({ class: "text-primary" }, req.__("Orphan columns (in DB, not in Saltcorn)")),
|
|
881
|
+
mkTable(
|
|
882
|
+
[
|
|
883
|
+
{
|
|
884
|
+
label: "",
|
|
885
|
+
key: (r) =>
|
|
886
|
+
input({
|
|
887
|
+
type: "checkbox",
|
|
888
|
+
name: "columns",
|
|
889
|
+
value: r.name,
|
|
890
|
+
checked: true,
|
|
891
|
+
}),
|
|
892
|
+
},
|
|
893
|
+
{ label: req.__("Column"), key: "name" },
|
|
894
|
+
{ label: req.__("SQL Type"), key: (r) => r.type || "—" },
|
|
895
|
+
{ label: req.__("Status"), key: (r) => statusBadge(r.status) },
|
|
896
|
+
],
|
|
897
|
+
orphans,
|
|
898
|
+
{ hover: true }
|
|
899
|
+
),
|
|
900
|
+
button(
|
|
901
|
+
{
|
|
902
|
+
type: "submit",
|
|
903
|
+
class: "btn btn-primary mt-2",
|
|
904
|
+
},
|
|
905
|
+
req.__("Import selected orphans into Saltcorn")
|
|
906
|
+
)
|
|
907
|
+
);
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
let matchCard = "";
|
|
911
|
+
if (matches.length > 0) {
|
|
912
|
+
matchCard = div(
|
|
913
|
+
h4(req.__("Matching fields (%d)", matches.length)),
|
|
914
|
+
mkTable(
|
|
915
|
+
[
|
|
916
|
+
{ label: req.__("Name"), key: "name" },
|
|
917
|
+
{ label: req.__("Type"), key: (r) => r.type || "—" },
|
|
918
|
+
{ label: req.__("Status"), key: (r) => statusBadge(r.status) },
|
|
919
|
+
],
|
|
920
|
+
matches,
|
|
921
|
+
{ hover: true }
|
|
922
|
+
)
|
|
923
|
+
);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
const allMatch = ghosts.length === 0 && orphans.length === 0;
|
|
927
|
+
|
|
928
|
+
res.sendWrap(req.__("Rescan fields: %s", table.name), {
|
|
929
|
+
above: [
|
|
930
|
+
{
|
|
931
|
+
type: "breadcrumbs",
|
|
932
|
+
crumbs: [
|
|
933
|
+
{ text: req.__("Tables"), href: "/table" },
|
|
934
|
+
{
|
|
935
|
+
text: table.name,
|
|
936
|
+
href: `/table/${encodeURIComponent(table.name)}`,
|
|
937
|
+
},
|
|
938
|
+
{ text: req.__("Rescan fields") },
|
|
939
|
+
],
|
|
940
|
+
},
|
|
941
|
+
allMatch && { type: "card", title: req.__("All fields match"), contents: p(req.__("All Saltcorn fields match the database columns.")) + a({ href: `/table/${table.id}`, class: "btn btn-primary" }, req.__("Back to table")) },
|
|
942
|
+
ghosts.length > 0 && { type: "card", title: req.__("Ghosts (%d)", ghosts.length), contents: ghostForm },
|
|
943
|
+
orphans.length > 0 && { type: "card", title: req.__("Orphans (%d)", orphans.length), contents: orphanForm },
|
|
944
|
+
matches.length > 0 && { type: "card", title: req.__("Matches"), contents: matchCard },
|
|
945
|
+
].filter(Boolean),
|
|
946
|
+
});
|
|
947
|
+
})
|
|
948
|
+
);
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* Rescan Delete Ghosts (POST Handler)
|
|
952
|
+
* @name post/rescan-delete/:idorname
|
|
953
|
+
* @function
|
|
954
|
+
* @memberof module:routes/tables~tablesRouter
|
|
955
|
+
*/
|
|
956
|
+
router.post(
|
|
957
|
+
"/rescan-delete/:idorname",
|
|
958
|
+
isAdmin,
|
|
959
|
+
error_catcher(async (req, res) => {
|
|
960
|
+
const { idorname } = req.params;
|
|
961
|
+
let id = parseInt(idorname);
|
|
962
|
+
let table;
|
|
963
|
+
if (id) [table] = await Table.find({ id });
|
|
964
|
+
if (!table) [table] = await Table.find({ name: idorname });
|
|
965
|
+
if (!table) {
|
|
966
|
+
req.flash("error", req.__(`Table not found`));
|
|
967
|
+
res.redirect(`/table`);
|
|
968
|
+
return;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
const fieldNames = Array.isArray(req.body.fields)
|
|
972
|
+
? req.body.fields
|
|
973
|
+
: req.body.fields
|
|
974
|
+
? [req.body.fields]
|
|
975
|
+
: [];
|
|
976
|
+
const fields = table.getFields();
|
|
977
|
+
let removed = 0;
|
|
978
|
+
|
|
979
|
+
for (const fname of fieldNames) {
|
|
980
|
+
const field = fields.find(
|
|
981
|
+
(f) => f.name === fname
|
|
982
|
+
);
|
|
983
|
+
if (field) {
|
|
984
|
+
await db.deleteWhere("_sc_fields", { id: field.id });
|
|
985
|
+
removed++;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
await getState().refresh_tables(true);
|
|
990
|
+
req.flash(
|
|
991
|
+
"success",
|
|
992
|
+
req.__("Removed %d ghost field(s) from Saltcorn", removed)
|
|
993
|
+
);
|
|
994
|
+
res.redirect(`/table/rescan/${table.id}`);
|
|
995
|
+
})
|
|
996
|
+
);
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Rescan Import Orphans (POST Handler)
|
|
1000
|
+
* @name post/rescan-import/:idorname
|
|
1001
|
+
* @function
|
|
1002
|
+
* @memberof module:routes/tables~tablesRouter
|
|
1003
|
+
*/
|
|
1004
|
+
router.post(
|
|
1005
|
+
"/rescan-import/:idorname",
|
|
1006
|
+
isAdmin,
|
|
1007
|
+
error_catcher(async (req, res) => {
|
|
1008
|
+
const { idorname } = req.params;
|
|
1009
|
+
let id = parseInt(idorname);
|
|
1010
|
+
let table;
|
|
1011
|
+
if (id) [table] = await Table.find({ id });
|
|
1012
|
+
if (!table) [table] = await Table.find({ name: idorname });
|
|
1013
|
+
if (!table) {
|
|
1014
|
+
req.flash("error", req.__(`Table not found`));
|
|
1015
|
+
res.redirect(`/table`);
|
|
1016
|
+
return;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
const colNames = Array.isArray(req.body.columns)
|
|
1020
|
+
? req.body.columns
|
|
1021
|
+
: req.body.columns
|
|
1022
|
+
? [req.body.columns]
|
|
1023
|
+
: [];
|
|
1024
|
+
let imported = 0;
|
|
1025
|
+
const skipped = [];
|
|
1026
|
+
|
|
1027
|
+
const schema = db.getTenantSchema();
|
|
1028
|
+
|
|
1029
|
+
for (const colName of colNames) {
|
|
1030
|
+
// Get column info from DB and build a field config
|
|
1031
|
+
let fieldCfg;
|
|
1032
|
+
if (!db.isSQLite) {
|
|
1033
|
+
const { rows } = await db.query(
|
|
1034
|
+
"SELECT * FROM information_schema.columns WHERE table_schema = $1 AND table_name = $2 AND column_name = $3",
|
|
1035
|
+
[schema, table.name, colName]
|
|
1036
|
+
);
|
|
1037
|
+
if (rows.length) {
|
|
1038
|
+
fieldCfg = await make_field(rows[0]);
|
|
1039
|
+
// Fallback: if make_field couldn't determine the type, try findType directly
|
|
1040
|
+
if (!fieldCfg || !fieldCfg.type) {
|
|
1041
|
+
const sqlType =
|
|
1042
|
+
findType(rows[0].data_type) ||
|
|
1043
|
+
findType(rows[0].udt_name) ||
|
|
1044
|
+
"String";
|
|
1045
|
+
fieldCfg = {
|
|
1046
|
+
name: rows[0].column_name,
|
|
1047
|
+
label: rows[0].column_name,
|
|
1048
|
+
type: sqlType,
|
|
1049
|
+
required: rows[0].is_nullable === "NO",
|
|
1050
|
+
};
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
} else {
|
|
1054
|
+
const { rows } = await db.query(
|
|
1055
|
+
`PRAGMA table_info("${table.name}")`
|
|
1056
|
+
);
|
|
1057
|
+
const col = rows.find((r) => r.name === colName);
|
|
1058
|
+
if (col) {
|
|
1059
|
+
const type = findType(col.type) || "String";
|
|
1060
|
+
fieldCfg = {
|
|
1061
|
+
name: colName,
|
|
1062
|
+
label: colName,
|
|
1063
|
+
type,
|
|
1064
|
+
required: col.notnull === 1,
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
if (fieldCfg && fieldCfg.type) {
|
|
1070
|
+
// Insert directly into _sc_fields — the physical column already exists,
|
|
1071
|
+
// so we must NOT use Field.create (which does ALTER TABLE ADD COLUMN).
|
|
1072
|
+
const typeName =
|
|
1073
|
+
typeof fieldCfg.type === "string" ? fieldCfg.type : fieldCfg.type?.name;
|
|
1074
|
+
await db.insert("_sc_fields", {
|
|
1075
|
+
table_id: table.id,
|
|
1076
|
+
name: fieldCfg.name,
|
|
1077
|
+
label: fieldCfg.label || fieldCfg.name,
|
|
1078
|
+
type: typeName,
|
|
1079
|
+
required: !!fieldCfg.required,
|
|
1080
|
+
is_unique: !!fieldCfg.is_unique,
|
|
1081
|
+
primary_key: !!fieldCfg.primary_key,
|
|
1082
|
+
});
|
|
1083
|
+
imported++;
|
|
1084
|
+
} else {
|
|
1085
|
+
skipped.push(colName);
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
await getState().refresh_tables(true);
|
|
1090
|
+
const msgs = [req.__("Imported %d orphan column(s) into Saltcorn", imported)];
|
|
1091
|
+
if (skipped.length)
|
|
1092
|
+
msgs.push(
|
|
1093
|
+
req.__(
|
|
1094
|
+
"Skipped %d column(s) with unrecognized type: %s",
|
|
1095
|
+
skipped.length,
|
|
1096
|
+
skipped.join(", ")
|
|
1097
|
+
)
|
|
1098
|
+
);
|
|
1099
|
+
req.flash("success", msgs.join(". "));
|
|
1100
|
+
res.redirect(`/table/rescan/${table.id}`);
|
|
1101
|
+
})
|
|
1102
|
+
);
|
|
1103
|
+
|
|
795
1104
|
/**
|
|
796
1105
|
* Table Constructor (GET Handler)
|
|
797
1106
|
* @name get/:idorname
|
|
@@ -847,6 +1156,18 @@ router.get(
|
|
|
847
1156
|
let fieldCard;
|
|
848
1157
|
const primaryKeys = fields.filter((f) => f.primary_key);
|
|
849
1158
|
const nPrimaryKeys = primaryKeys.length;
|
|
1159
|
+
const standardFieldNames = [
|
|
1160
|
+
"name",
|
|
1161
|
+
"description",
|
|
1162
|
+
"created_at",
|
|
1163
|
+
"updated_at",
|
|
1164
|
+
"created_by",
|
|
1165
|
+
"updated_by",
|
|
1166
|
+
];
|
|
1167
|
+
const fieldNameSet = new Set(fields.map((f) => f.name));
|
|
1168
|
+
const hasAllStandardFields = standardFieldNames.every((n) =>
|
|
1169
|
+
fieldNameSet.has(n)
|
|
1170
|
+
);
|
|
850
1171
|
|
|
851
1172
|
if (fields.length === 0) {
|
|
852
1173
|
fieldCard = [
|
|
@@ -862,6 +1183,17 @@ router.get(
|
|
|
862
1183
|
},
|
|
863
1184
|
req.__("Add field to table")
|
|
864
1185
|
),
|
|
1186
|
+
!table.external &&
|
|
1187
|
+
!table.provider_name &&
|
|
1188
|
+
user_can_edit_tables &&
|
|
1189
|
+
!hasAllStandardFields &&
|
|
1190
|
+
a(
|
|
1191
|
+
{
|
|
1192
|
+
class: "btn btn-outline-secondary ms-2",
|
|
1193
|
+
href: `javascript:ajax_modal('/table/create-standard-fields/${table.id}')`,
|
|
1194
|
+
},
|
|
1195
|
+
req.__("Create standard fields")
|
|
1196
|
+
),
|
|
865
1197
|
];
|
|
866
1198
|
} else {
|
|
867
1199
|
const tableHtml = mkTable(
|
|
@@ -946,6 +1278,17 @@ router.get(
|
|
|
946
1278
|
},
|
|
947
1279
|
req.__("Add field")
|
|
948
1280
|
),
|
|
1281
|
+
!table.external &&
|
|
1282
|
+
!table.provider_name &&
|
|
1283
|
+
user_can_edit_tables &&
|
|
1284
|
+
!hasAllStandardFields &&
|
|
1285
|
+
a(
|
|
1286
|
+
{
|
|
1287
|
+
class: "btn btn-outline-secondary ms-2 mt-2",
|
|
1288
|
+
href: `javascript:ajax_modal('/table/create-standard-fields/${table.id}')`,
|
|
1289
|
+
},
|
|
1290
|
+
req.__("Create standard fields")
|
|
1291
|
+
),
|
|
949
1292
|
];
|
|
950
1293
|
}
|
|
951
1294
|
let viewCard;
|
|
@@ -1140,6 +1483,13 @@ router.get(
|
|
|
1140
1483
|
div(
|
|
1141
1484
|
{ class: "mx-auto" },
|
|
1142
1485
|
settingsDropdown(`dataMenuButton`, [
|
|
1486
|
+
a(
|
|
1487
|
+
{
|
|
1488
|
+
class: "dropdown-item",
|
|
1489
|
+
href: `/table/rescan/${table.id}`,
|
|
1490
|
+
},
|
|
1491
|
+
'<i class="fas fa-search"></i> ' + req.__("Rescan fields")
|
|
1492
|
+
),
|
|
1143
1493
|
// rename table doesnt supported for sqlite
|
|
1144
1494
|
!db.isSQLite &&
|
|
1145
1495
|
user_can_edit_tables &&
|
|
@@ -1789,8 +2139,13 @@ const constraintForm = (req, table, fields, type) => {
|
|
|
1789
2139
|
name: "formula",
|
|
1790
2140
|
label: req.__("Constraint formula"),
|
|
1791
2141
|
validator: expressionValidator,
|
|
1792
|
-
|
|
1793
|
-
|
|
2142
|
+
input_type: "code",
|
|
2143
|
+
attributes: {
|
|
2144
|
+
mode: "application/javascript",
|
|
2145
|
+
singleline: true,
|
|
2146
|
+
table: table.name,
|
|
2147
|
+
expression_type: "boolean",
|
|
2148
|
+
},
|
|
1794
2149
|
help: {
|
|
1795
2150
|
topic: "Table formula constraint",
|
|
1796
2151
|
context: { table: table.name },
|
|
@@ -1946,6 +2301,8 @@ router.post(
|
|
|
1946
2301
|
configuration,
|
|
1947
2302
|
});
|
|
1948
2303
|
});
|
|
2304
|
+
// set updated_at
|
|
2305
|
+
await table.update({});
|
|
1949
2306
|
await getState().refresh_tables();
|
|
1950
2307
|
|
|
1951
2308
|
Trigger.emitEvent(
|
|
@@ -2072,6 +2429,8 @@ router.post(
|
|
|
2072
2429
|
await db.withTransaction(async () => {
|
|
2073
2430
|
await cons.delete();
|
|
2074
2431
|
});
|
|
2432
|
+
//set updated_at
|
|
2433
|
+
await Table.findOne(cons.table_id).update({});
|
|
2075
2434
|
await getState().refresh_tables();
|
|
2076
2435
|
res.redirect(`/table/constraints/${cons.table_id}`);
|
|
2077
2436
|
})
|
|
@@ -2678,3 +3037,134 @@ router.post(
|
|
|
2678
3037
|
res.redirect(`/table/${table.id}`);
|
|
2679
3038
|
})
|
|
2680
3039
|
);
|
|
3040
|
+
|
|
3041
|
+
const standardFieldDefs = (req) => [
|
|
3042
|
+
{
|
|
3043
|
+
name: "name",
|
|
3044
|
+
label: req.__("Name"),
|
|
3045
|
+
type: "String",
|
|
3046
|
+
fieldType: "String",
|
|
3047
|
+
},
|
|
3048
|
+
{
|
|
3049
|
+
name: "description",
|
|
3050
|
+
label: req.__("Description"),
|
|
3051
|
+
type: "String",
|
|
3052
|
+
fieldType: "String",
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
name: "created_at",
|
|
3056
|
+
label: req.__("Created at"),
|
|
3057
|
+
type: "Date",
|
|
3058
|
+
fieldType: "Date",
|
|
3059
|
+
required: true,
|
|
3060
|
+
attributes: { default_expression: "new Date()" },
|
|
3061
|
+
},
|
|
3062
|
+
{
|
|
3063
|
+
name: "updated_at",
|
|
3064
|
+
label: req.__("Updated at"),
|
|
3065
|
+
type: "Date",
|
|
3066
|
+
fieldType: "Date",
|
|
3067
|
+
calculated: true,
|
|
3068
|
+
stored: true,
|
|
3069
|
+
expression: "new Date()",
|
|
3070
|
+
},
|
|
3071
|
+
{
|
|
3072
|
+
name: "created_by",
|
|
3073
|
+
label: req.__("Created by"),
|
|
3074
|
+
type: "Key to user",
|
|
3075
|
+
fieldType: "Key",
|
|
3076
|
+
reftable_name: "users",
|
|
3077
|
+
attributes: { default_expression: "user?.id", summary_field: "email" },
|
|
3078
|
+
},
|
|
3079
|
+
{
|
|
3080
|
+
name: "updated_by",
|
|
3081
|
+
label: req.__("Updated by"),
|
|
3082
|
+
type: "Key to user",
|
|
3083
|
+
fieldType: "Key",
|
|
3084
|
+
reftable_name: "users",
|
|
3085
|
+
calculated: true,
|
|
3086
|
+
stored: true,
|
|
3087
|
+
expression: "user?.id ?? row?.updated_by",
|
|
3088
|
+
attributes: { summary_field: "email" },
|
|
3089
|
+
},
|
|
3090
|
+
];
|
|
3091
|
+
|
|
3092
|
+
const standardFieldForm = (table, req, existingNames = new Set()) => {
|
|
3093
|
+
const defs = standardFieldDefs(req).filter(
|
|
3094
|
+
(def) => !existingNames.has(def.name)
|
|
3095
|
+
);
|
|
3096
|
+
return new Form({
|
|
3097
|
+
submitLabel: req.__("Create fields"),
|
|
3098
|
+
action: `/table/create-standard-fields/${table.id}`,
|
|
3099
|
+
formStyle: "vert",
|
|
3100
|
+
fields: defs.map((def) => ({
|
|
3101
|
+
type: "Bool",
|
|
3102
|
+
label: `${def.label} (${def.type})`,
|
|
3103
|
+
name: def.name,
|
|
3104
|
+
default: true,
|
|
3105
|
+
})),
|
|
3106
|
+
});
|
|
3107
|
+
};
|
|
3108
|
+
|
|
3109
|
+
router.get(
|
|
3110
|
+
"/create-standard-fields/:id",
|
|
3111
|
+
isAdminOrHasConfigMinRole("min_role_edit_tables"),
|
|
3112
|
+
error_catcher(async (req, res) => {
|
|
3113
|
+
const { id } = req.params;
|
|
3114
|
+
const table = Table.findOne({ id });
|
|
3115
|
+
if (!table) {
|
|
3116
|
+
req.flash("error", `Table not found`);
|
|
3117
|
+
res.redirect(`/table`);
|
|
3118
|
+
return;
|
|
3119
|
+
}
|
|
3120
|
+
const existingFields = await table.getFields();
|
|
3121
|
+
const existingNames = new Set(existingFields.map((f) => f.name));
|
|
3122
|
+
res.set("Page-Title", req.__("Create standard fields"));
|
|
3123
|
+
const form = standardFieldForm(table, req, existingNames);
|
|
3124
|
+
res.send(renderForm(form, req.csrfToken()));
|
|
3125
|
+
})
|
|
3126
|
+
);
|
|
3127
|
+
|
|
3128
|
+
router.post(
|
|
3129
|
+
"/create-standard-fields/:id",
|
|
3130
|
+
isAdminOrHasConfigMinRole("min_role_edit_tables"),
|
|
3131
|
+
error_catcher(async (req, res) => {
|
|
3132
|
+
const { id } = req.params;
|
|
3133
|
+
const table = Table.findOne({ id });
|
|
3134
|
+
if (!table) {
|
|
3135
|
+
req.flash("error", `Table not found`);
|
|
3136
|
+
res.redirect(`/table`);
|
|
3137
|
+
return;
|
|
3138
|
+
}
|
|
3139
|
+
const existingFields = await table.getFields();
|
|
3140
|
+
const existingNames = new Set(existingFields.map((f) => f.name));
|
|
3141
|
+
const form = standardFieldForm(table, req, existingNames);
|
|
3142
|
+
form.validate(req.body || {});
|
|
3143
|
+
if (form.hasErrors) {
|
|
3144
|
+
req.flash("error", req.__("An error occurred"));
|
|
3145
|
+
res.redirect(`/table/${table.id}`);
|
|
3146
|
+
return;
|
|
3147
|
+
}
|
|
3148
|
+
const defs = standardFieldDefs(req);
|
|
3149
|
+
await db.withTransaction(async () => {
|
|
3150
|
+
for (const def of defs) {
|
|
3151
|
+
if (!form.values[def.name]) continue;
|
|
3152
|
+
if (existingNames.has(def.name)) continue;
|
|
3153
|
+
await Field.create({
|
|
3154
|
+
table_id: table.id,
|
|
3155
|
+
name: def.name,
|
|
3156
|
+
label: def.label,
|
|
3157
|
+
type: def.fieldType,
|
|
3158
|
+
reftable_name: def.reftable_name,
|
|
3159
|
+
required: def.required || false,
|
|
3160
|
+
calculated: def.calculated || false,
|
|
3161
|
+
stored: def.stored || false,
|
|
3162
|
+
expression: def.expression,
|
|
3163
|
+
attributes: def.attributes || {},
|
|
3164
|
+
});
|
|
3165
|
+
}
|
|
3166
|
+
});
|
|
3167
|
+
await getState().refresh_tables();
|
|
3168
|
+
res.redirect(`/table/${table.id}`);
|
|
3169
|
+
})
|
|
3170
|
+
);
|
package/routes/tenant.js
CHANGED
|
@@ -43,7 +43,7 @@ const {
|
|
|
43
43
|
} = require("@saltcorn/markup/tags");
|
|
44
44
|
const db = require("@saltcorn/data/db");
|
|
45
45
|
|
|
46
|
-
const
|
|
46
|
+
const Plugin = require("@saltcorn/data/models/plugin");
|
|
47
47
|
const {
|
|
48
48
|
isAdmin,
|
|
49
49
|
error_catcher,
|
|
@@ -309,9 +309,9 @@ router.post(
|
|
|
309
309
|
|
|
310
310
|
await create_tenant({
|
|
311
311
|
t: subdomain,
|
|
312
|
-
plugin_loader: loadAllPlugins,
|
|
312
|
+
plugin_loader: Plugin.loadAllPlugins,
|
|
313
313
|
noSignalOrDB: false,
|
|
314
|
-
loadAndSaveNewPlugin: loadAndSaveNewPlugin,
|
|
314
|
+
loadAndSaveNewPlugin: Plugin.loadAndSaveNewPlugin,
|
|
315
315
|
tenant_template,
|
|
316
316
|
});
|
|
317
317
|
let new_url_create = newurl;
|
package/routes/utils.js
CHANGED
|
@@ -13,7 +13,11 @@ const {
|
|
|
13
13
|
features,
|
|
14
14
|
} = require("@saltcorn/data/db/state");
|
|
15
15
|
const { get_base_url } = require("@saltcorn/data/models/config");
|
|
16
|
-
const {
|
|
16
|
+
const {
|
|
17
|
+
hash,
|
|
18
|
+
is_relative_url,
|
|
19
|
+
normalize_relative_url,
|
|
20
|
+
} = require("@saltcorn/data/utils");
|
|
17
21
|
const { input, script, domReady, a, text } = require("@saltcorn/markup/tags");
|
|
18
22
|
const session = require("express-session");
|
|
19
23
|
const cookieSession = require("cookie-session");
|
|
@@ -355,7 +359,7 @@ const getSessionStore = (pruneInterval) => {
|
|
|
355
359
|
secret: db.connectObj.session_secret || is.str.generate(),
|
|
356
360
|
resave: false,
|
|
357
361
|
saveUninitialized: false,
|
|
358
|
-
cookie: { maxAge: 30 * 24 * 60 * 60 * 1000, sameSite }, // 30 days
|
|
362
|
+
cookie: { maxAge: 30 * 24 * 60 * 60 * 1000, sameSite, secure: "auto" }, // 30 days
|
|
359
363
|
});
|
|
360
364
|
} else {
|
|
361
365
|
const pgSession = require("connect-pg-simple")(session);
|
|
@@ -369,7 +373,7 @@ const getSessionStore = (pruneInterval) => {
|
|
|
369
373
|
secret: db.connectObj.session_secret || is.str.generate(),
|
|
370
374
|
resave: false,
|
|
371
375
|
saveUninitialized: false,
|
|
372
|
-
cookie: { maxAge: 30 * 24 * 60 * 60 * 1000, sameSite }, // 30 days
|
|
376
|
+
cookie: { maxAge: 30 * 24 * 60 * 60 * 1000, sameSite, secure: "auto" }, // 30 days
|
|
373
377
|
});
|
|
374
378
|
}
|
|
375
379
|
};
|
|
@@ -389,9 +393,14 @@ const addOnDoneRedirect = (oldPath, req) => {
|
|
|
389
393
|
return oldPath;
|
|
390
394
|
};
|
|
391
395
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
396
|
+
const safe_redirect = (res, url, default_url) => {
|
|
397
|
+
if (!url) {
|
|
398
|
+
res.redirect(default_url);
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
const dest = normalize_relative_url(url);
|
|
402
|
+
if (dest !== null) res.redirect(dest);
|
|
403
|
+
else res.redirect(default_url);
|
|
395
404
|
};
|
|
396
405
|
|
|
397
406
|
/**
|
|
@@ -647,6 +656,8 @@ module.exports = {
|
|
|
647
656
|
get_tenant_from_req,
|
|
648
657
|
addOnDoneRedirect,
|
|
649
658
|
is_relative_url,
|
|
659
|
+
normalize_relative_url,
|
|
660
|
+
safe_redirect,
|
|
650
661
|
is_ip_address,
|
|
651
662
|
get_sys_info,
|
|
652
663
|
admin_config_route,
|
package/routes/viewedit.js
CHANGED
|
@@ -131,8 +131,8 @@ const mapObjectValues = (o, f) =>
|
|
|
131
131
|
* @returns {Form}
|
|
132
132
|
*/
|
|
133
133
|
const viewForm = async (req, tableOptions, roles, pages, values) => {
|
|
134
|
-
const
|
|
135
|
-
|
|
134
|
+
const devmode = getState().getConfig("development_mode", false);
|
|
135
|
+
const isEdit = values && values.id && !devmode;
|
|
136
136
|
const hasTable = Object.entries(getState().viewtemplates)
|
|
137
137
|
.filter(([k, v]) => !v.tableless && !v.table_optional)
|
|
138
138
|
.map(([k, v]) => k);
|
|
@@ -141,7 +141,7 @@ const viewForm = async (req, tableOptions, roles, pages, values) => {
|
|
|
141
141
|
.map(([k, v]) => k);
|
|
142
142
|
const slugOptions = await Table.allSlugOptions();
|
|
143
143
|
const viewpatternOptions = Object.values(getState().viewtemplates)
|
|
144
|
-
.filter((vt) => !vt.singleton)
|
|
144
|
+
.filter((vt) => !vt.singleton && !(!values && vt.deprecated && !devmode))
|
|
145
145
|
.map((vt) => vt.name);
|
|
146
146
|
return new Form({
|
|
147
147
|
action: addOnDoneRedirect("/viewedit/save", req),
|
|
@@ -173,7 +173,10 @@ const viewForm = async (req, tableOptions, roles, pages, values) => {
|
|
|
173
173
|
attributes: {
|
|
174
174
|
explainers: mapObjectValues(
|
|
175
175
|
getState().viewtemplates,
|
|
176
|
-
({ description }) =>
|
|
176
|
+
({ description, deprecated }) =>
|
|
177
|
+
deprecated && description
|
|
178
|
+
? `${description}. <i>${req.__("Deprecated")}</i>`
|
|
179
|
+
: description || (deprecated ? req.__("Deprecated") : undefined)
|
|
177
180
|
),
|
|
178
181
|
},
|
|
179
182
|
disabled: isEdit,
|
|
@@ -690,6 +693,7 @@ const respondWorkflow = (view, wf, wfres, req, res, table) => {
|
|
|
690
693
|
);
|
|
691
694
|
else if (wfres.renderBuilder) {
|
|
692
695
|
const locale = req.getLocale();
|
|
696
|
+
wfres.renderBuilder.options.isRTL = req.isRTL;
|
|
693
697
|
wfres.renderBuilder.options.translations =
|
|
694
698
|
locale === "en" ? {} : req.getCatalog(locale) || {};
|
|
695
699
|
wfres.renderBuilder.options.view_id = view.id;
|
|
@@ -1018,7 +1022,7 @@ router.post(
|
|
|
1018
1022
|
"/copilot-generate-layout",
|
|
1019
1023
|
isAdminOrHasConfigMinRole(["min_role_edit_views", "min_role_edit_pages"]),
|
|
1020
1024
|
error_catcher(async (req, res) => {
|
|
1021
|
-
const { mode, table, prompt } = req.body;
|
|
1025
|
+
const { mode, table, prompt, existing } = req.body;
|
|
1022
1026
|
const f = getState().functions.copilot_generate_layout;
|
|
1023
1027
|
if (!f) {
|
|
1024
1028
|
res.json({
|
|
@@ -1026,7 +1030,7 @@ router.post(
|
|
|
1026
1030
|
});
|
|
1027
1031
|
return;
|
|
1028
1032
|
}
|
|
1029
|
-
const layout = await f.run(prompt, mode, table);
|
|
1033
|
+
const layout = await f.run(prompt, mode, table, existing);
|
|
1030
1034
|
res.json({ success: "ok", layout });
|
|
1031
1035
|
})
|
|
1032
1036
|
);
|