@saltcorn/data 0.9.4-beta.13 → 0.9.4-beta.15

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.
Files changed (32) hide show
  1. package/dist/base-plugin/actions.d.ts +1 -1
  2. package/dist/base-plugin/actions.d.ts.map +1 -1
  3. package/dist/base-plugin/actions.js +4 -2
  4. package/dist/base-plugin/actions.js.map +1 -1
  5. package/dist/base-plugin/fieldviews.d.ts.map +1 -1
  6. package/dist/base-plugin/fieldviews.js +9 -1
  7. package/dist/base-plugin/fieldviews.js.map +1 -1
  8. package/dist/base-plugin/fileviews.js +6 -1
  9. package/dist/base-plugin/fileviews.js.map +1 -1
  10. package/dist/base-plugin/index.d.ts +227 -227
  11. package/dist/base-plugin/types.d.ts.map +1 -1
  12. package/dist/base-plugin/types.js +17 -5
  13. package/dist/base-plugin/types.js.map +1 -1
  14. package/dist/base-plugin/viewtemplates/list.d.ts +1 -1
  15. package/dist/base-plugin/viewtemplates/list.d.ts.map +1 -1
  16. package/dist/base-plugin/viewtemplates/list.js +222 -33
  17. package/dist/base-plugin/viewtemplates/list.js.map +1 -1
  18. package/dist/base-plugin/viewtemplates/viewable_fields.d.ts +1 -0
  19. package/dist/base-plugin/viewtemplates/viewable_fields.d.ts.map +1 -1
  20. package/dist/base-plugin/viewtemplates/viewable_fields.js +95 -0
  21. package/dist/base-plugin/viewtemplates/viewable_fields.js.map +1 -1
  22. package/dist/db/state.d.ts +1 -0
  23. package/dist/db/state.d.ts.map +1 -1
  24. package/dist/db/state.js +1 -0
  25. package/dist/db/state.js.map +1 -1
  26. package/dist/models/field.d.ts.map +1 -1
  27. package/dist/models/field.js +2 -2
  28. package/dist/models/field.js.map +1 -1
  29. package/dist/plugin-helper.d.ts.map +1 -1
  30. package/dist/plugin-helper.js +5 -1
  31. package/dist/plugin-helper.js.map +1 -1
  32. package/package.json +8 -8
@@ -805,45 +805,63 @@ export const types: ({
805
805
  export const viewtemplates: ({
806
806
  name: string;
807
807
  description: string;
808
- get_state_fields: () => object[];
809
- configuration_workflow: () => import("../models/workflow");
810
- run: (table_id: number, viewname: string, { columns, layout }: {
808
+ configuration_workflow: (req: object) => import("../models/workflow");
809
+ run: (table_id: string | number, viewname: string, { columns, layout, view_to_create, create_view_display, create_view_label, default_state, create_view_location, create_link_style, create_link_size, create_view_showif, }: {
811
810
  columns: object[];
812
- layout: object;
813
- }, state: object, extra: object, { distinctValuesQuery }: {
814
- distinctValuesQuery: any;
815
- }) => Promise<Layout>;
816
- initial_config: () => Promise<object>;
817
- display_state_form: boolean;
818
- getStringsForI18n({ layout }: {
819
- layout: any;
820
- }): string[];
811
+ view_to_create?: string | undefined;
812
+ create_view_display: string;
813
+ create_view_label?: string | undefined;
814
+ default_state?: object | undefined;
815
+ create_view_location?: string | undefined;
816
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
817
+ listQuery: any;
818
+ }) => Promise<any>;
819
+ view_quantity: string;
820
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
821
+ columns: object[];
822
+ }) => Function;
823
+ initial_config: Function;
824
+ on_delete: (table_id: any, viewname: string, { default_state }: {
825
+ default_state: any;
826
+ }) => Promise<void>;
821
827
  routes: {
822
- run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
823
- req: any;
828
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
829
+ columns: object[];
830
+ layout: any;
831
+ }, body: object, { req, res }: {
832
+ req: object;
824
833
  res: any;
825
- }, { actionQuery }: {
826
- actionQuery: any;
827
- }) => Promise<any>;
834
+ }, { getRowQuery }: {
835
+ getRowQuery: any;
836
+ }) => Promise<object>;
828
837
  };
829
- queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
838
+ display_state_form: (opts: object) => boolean;
839
+ default_state_form: ({ default_state }: object) => boolean;
840
+ getStringsForI18n({ columns, create_view_label }: {
841
+ columns: any;
842
+ create_view_label: any;
843
+ }): string[];
844
+ queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
830
845
  table_id: any;
831
- viewname: any;
846
+ exttable_name: any;
847
+ name: any;
832
848
  configuration: {
833
849
  columns: any;
850
+ default_state: any;
834
851
  };
835
852
  req: any;
836
- res: any;
837
- exttable_name: any;
838
853
  }) => {
839
- actionQuery(state: any, rndid: any): Promise<{
840
- json: any;
841
- }>;
842
- distinctValuesQuery(state: any): Promise<{
843
- distinct_values: {};
844
- role: any;
854
+ listQuery(state: any, stateHash: any): Promise<{
855
+ rows: import("@saltcorn/db-common/internal").Row[];
856
+ rowCount: number;
845
857
  }>;
858
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
846
859
  };
860
+ configCheck: (view: any) => Promise<{
861
+ errors: string[];
862
+ warnings: string[];
863
+ }>;
864
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
847
865
  } | {
848
866
  name: string;
849
867
  description: string;
@@ -995,146 +1013,6 @@ export const viewtemplates: ({
995
1013
  warnings: string[];
996
1014
  }>;
997
1015
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
998
- } | {
999
- name: string;
1000
- description: string;
1001
- configuration_workflow: (req: object) => import("../models/workflow");
1002
- run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1003
- participant_field: string;
1004
- msg_relation: string;
1005
- msgsender_field: any;
1006
- msgview: string;
1007
- msgform: string;
1008
- participant_maxread_field: string;
1009
- }, state: object, { req, res }: {
1010
- req: object;
1011
- res: object;
1012
- }, { getRowQuery, updateQuery, optionsQuery }: {
1013
- getRowQuery: any;
1014
- updateQuery: any;
1015
- optionsQuery: any;
1016
- }) => Promise<div>;
1017
- get_state_fields: () => object[];
1018
- display_state_form: boolean;
1019
- routes: {
1020
- submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1021
- participant_field: string;
1022
- msg_relation: string;
1023
- msgsender_field: any;
1024
- msgview: string;
1025
- msgform: string;
1026
- participant_maxread_field: string;
1027
- }, body: any, { req, res }: {
1028
- req: object;
1029
- res: object;
1030
- }, { submitAjaxQuery }: {
1031
- submitAjaxQuery: any;
1032
- }) => Promise<object>;
1033
- ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1034
- participant_field: string;
1035
- participant_maxread_field: string;
1036
- }, body: any, { req, res }: {
1037
- req: object;
1038
- res: object;
1039
- }, { ackReadQuery }: {
1040
- ackReadQuery: any;
1041
- }) => Promise<void>;
1042
- fetch_older_msg: (table_id: any, viewname: any, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: object, body: object, { req, res }: string, { fetchOlderMsgQuery }: any) => Promise<object>;
1043
- };
1044
- noAutoTest: boolean;
1045
- authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1046
- participant_field: object;
1047
- }, room_id: string, user: object) => Promise<object>;
1048
- virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1049
- participant_field: any;
1050
- msg_relation: string;
1051
- msgsender_field: string;
1052
- msgview: string;
1053
- msgform: any;
1054
- participant_maxread_field: any;
1055
- }) => object[];
1056
- getStringsForI18n(): object[];
1057
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1058
- table_id: any;
1059
- viewname: any;
1060
- configuration: {
1061
- columns: any;
1062
- default_state: any;
1063
- };
1064
- req: any;
1065
- }) => {
1066
- getRowQuery(state_id: any, part_table_name: any, part_user_field: any, part_key_to_room: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1067
- updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1068
- submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1069
- json: {
1070
- msgid: {
1071
- error: string;
1072
- } | {
1073
- success: any;
1074
- };
1075
- error?: undefined;
1076
- };
1077
- } | {
1078
- json: {
1079
- error: any;
1080
- msgid?: undefined;
1081
- };
1082
- }>;
1083
- ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1084
- json: {
1085
- error: string;
1086
- success?: undefined;
1087
- };
1088
- } | {
1089
- json: {
1090
- success: string;
1091
- error?: undefined;
1092
- };
1093
- }>;
1094
- fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1095
- optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1096
- };
1097
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1098
- } | {
1099
- name: string;
1100
- description: string;
1101
- configuration_workflow: (req: object) => import("../models/workflow");
1102
- run: (table_id: number, viewname: string, { show_view, order_field, descending, view_to_create, create_view_display, in_card, view_decoration, initial_open_accordions, title_formula, masonry_columns, rows_per_page, hide_pagination, create_view_label, create_view_location, create_link_style, create_link_size, create_view_showif, always_create_view, include_fml, exclusion_relation, exclusion_where, empty_view, groupby, ...cols }: {
1103
- show_view: string;
1104
- order_field: void;
1105
- descending: boolean;
1106
- view_to_create?: string | undefined;
1107
- create_view_display: string;
1108
- in_card: boolean;
1109
- masonry_columns: string;
1110
- rows_per_page?: number | undefined;
1111
- hide_pagination: boolean;
1112
- create_view_label?: string | undefined;
1113
- create_view_location?: string | undefined;
1114
- always_create_view: boolean;
1115
- cols: any;
1116
- }, state: object, extraArgs: any, { countRowsQuery }: {
1117
- countRowsQuery: any;
1118
- }) => Promise<div>;
1119
- get_state_fields: (table_id: number, viewname: any, { show_view }: {
1120
- show_view: any;
1121
- }) => Promise<import("../models/field")>;
1122
- display_state_form: boolean;
1123
- getStringsForI18n({ create_view_label }: {
1124
- create_view_label: any;
1125
- }): string[] | Object[];
1126
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1127
- table_id: any;
1128
- viewname: any;
1129
- configuration: {
1130
- columns: any;
1131
- default_state: any;
1132
- };
1133
- req: any;
1134
- }) => {
1135
- countRowsQuery(state: any): Promise<number>;
1136
- };
1137
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1138
1016
  } | {
1139
1017
  name: string;
1140
1018
  description: string;
@@ -1210,66 +1088,6 @@ export const viewtemplates: ({
1210
1088
  warnings: string[];
1211
1089
  }>;
1212
1090
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1213
- } | {
1214
- name: string;
1215
- description: string;
1216
- configuration_workflow: (req: object) => import("../models/workflow");
1217
- run: (table_id: string | number, viewname: string, { columns, view_to_create, create_view_display, create_view_label, default_state, create_view_location, create_link_style, create_link_size, create_view_showif, }: {
1218
- columns: object[];
1219
- view_to_create?: string | undefined;
1220
- create_view_display: string;
1221
- create_view_label?: string | undefined;
1222
- default_state?: object | undefined;
1223
- create_view_location?: string | undefined;
1224
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
1225
- listQuery: any;
1226
- }) => Promise<any>;
1227
- view_quantity: string;
1228
- get_state_fields: (table_id: string, viewname: any, { columns }: {
1229
- columns: object[];
1230
- }) => Function;
1231
- initial_config: Function;
1232
- on_delete: (table_id: any, viewname: string, { default_state }: {
1233
- default_state: any;
1234
- }) => Promise<void>;
1235
- routes: {
1236
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1237
- columns: object[];
1238
- layout: any;
1239
- }, body: object, { req, res }: {
1240
- req: object;
1241
- res: any;
1242
- }, { getRowQuery }: {
1243
- getRowQuery: any;
1244
- }) => Promise<object>;
1245
- };
1246
- display_state_form: (opts: object) => boolean;
1247
- default_state_form: ({ default_state }: object) => boolean;
1248
- getStringsForI18n({ columns, create_view_label }: {
1249
- columns: any;
1250
- create_view_label: any;
1251
- }): string[];
1252
- queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
1253
- table_id: any;
1254
- exttable_name: any;
1255
- name: any;
1256
- configuration: {
1257
- columns: any;
1258
- default_state: any;
1259
- };
1260
- req: any;
1261
- }) => {
1262
- listQuery(state: any, stateHash: any): Promise<{
1263
- rows: import("@saltcorn/db-common/internal").Row[];
1264
- rowCount: number;
1265
- }>;
1266
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1267
- };
1268
- configCheck: (view: any) => Promise<{
1269
- errors: string[];
1270
- warnings: string[];
1271
- }>;
1272
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1273
1091
  } | {
1274
1092
  name: string;
1275
1093
  description: string;
@@ -1306,6 +1124,188 @@ export const viewtemplates: ({
1306
1124
  }) => Promise<{
1307
1125
  embeddedViews: import("../models/view")[];
1308
1126
  }>;
1127
+ } | {
1128
+ name: string;
1129
+ description: string;
1130
+ configuration_workflow: (req: object) => import("../models/workflow");
1131
+ run: (table_id: number, viewname: string, { show_view, order_field, descending, view_to_create, create_view_display, in_card, view_decoration, initial_open_accordions, title_formula, masonry_columns, rows_per_page, hide_pagination, create_view_label, create_view_location, create_link_style, create_link_size, create_view_showif, always_create_view, include_fml, exclusion_relation, exclusion_where, empty_view, groupby, ...cols }: {
1132
+ show_view: string;
1133
+ order_field: void;
1134
+ descending: boolean;
1135
+ view_to_create?: string | undefined;
1136
+ create_view_display: string;
1137
+ in_card: boolean;
1138
+ masonry_columns: string;
1139
+ rows_per_page?: number | undefined;
1140
+ hide_pagination: boolean;
1141
+ create_view_label?: string | undefined;
1142
+ create_view_location?: string | undefined;
1143
+ always_create_view: boolean;
1144
+ cols: any;
1145
+ }, state: object, extraArgs: any, { countRowsQuery }: {
1146
+ countRowsQuery: any;
1147
+ }) => Promise<div>;
1148
+ get_state_fields: (table_id: number, viewname: any, { show_view }: {
1149
+ show_view: any;
1150
+ }) => Promise<import("../models/field")>;
1151
+ display_state_form: boolean;
1152
+ getStringsForI18n({ create_view_label }: {
1153
+ create_view_label: any;
1154
+ }): string[] | Object[];
1155
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1156
+ table_id: any;
1157
+ viewname: any;
1158
+ configuration: {
1159
+ columns: any;
1160
+ default_state: any;
1161
+ };
1162
+ req: any;
1163
+ }) => {
1164
+ countRowsQuery(state: any): Promise<number>;
1165
+ };
1166
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1167
+ } | {
1168
+ name: string;
1169
+ description: string;
1170
+ get_state_fields: () => object[];
1171
+ configuration_workflow: () => import("../models/workflow");
1172
+ run: (table_id: number, viewname: string, { columns, layout }: {
1173
+ columns: object[];
1174
+ layout: object;
1175
+ }, state: object, extra: object, { distinctValuesQuery }: {
1176
+ distinctValuesQuery: any;
1177
+ }) => Promise<Layout>;
1178
+ initial_config: () => Promise<object>;
1179
+ display_state_form: boolean;
1180
+ getStringsForI18n({ layout }: {
1181
+ layout: any;
1182
+ }): string[];
1183
+ routes: {
1184
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
1185
+ req: any;
1186
+ res: any;
1187
+ }, { actionQuery }: {
1188
+ actionQuery: any;
1189
+ }) => Promise<any>;
1190
+ };
1191
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1192
+ table_id: any;
1193
+ viewname: any;
1194
+ configuration: {
1195
+ columns: any;
1196
+ };
1197
+ req: any;
1198
+ res: any;
1199
+ exttable_name: any;
1200
+ }) => {
1201
+ actionQuery(state: any, rndid: any): Promise<{
1202
+ json: any;
1203
+ }>;
1204
+ distinctValuesQuery(state: any): Promise<{
1205
+ distinct_values: {};
1206
+ role: any;
1207
+ }>;
1208
+ };
1209
+ } | {
1210
+ name: string;
1211
+ description: string;
1212
+ configuration_workflow: (req: object) => import("../models/workflow");
1213
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1214
+ participant_field: string;
1215
+ msg_relation: string;
1216
+ msgsender_field: any;
1217
+ msgview: string;
1218
+ msgform: string;
1219
+ participant_maxread_field: string;
1220
+ }, state: object, { req, res }: {
1221
+ req: object;
1222
+ res: object;
1223
+ }, { getRowQuery, updateQuery, optionsQuery }: {
1224
+ getRowQuery: any;
1225
+ updateQuery: any;
1226
+ optionsQuery: any;
1227
+ }) => Promise<div>;
1228
+ get_state_fields: () => object[];
1229
+ display_state_form: boolean;
1230
+ routes: {
1231
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1232
+ participant_field: string;
1233
+ msg_relation: string;
1234
+ msgsender_field: any;
1235
+ msgview: string;
1236
+ msgform: string;
1237
+ participant_maxread_field: string;
1238
+ }, body: any, { req, res }: {
1239
+ req: object;
1240
+ res: object;
1241
+ }, { submitAjaxQuery }: {
1242
+ submitAjaxQuery: any;
1243
+ }) => Promise<object>;
1244
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1245
+ participant_field: string;
1246
+ participant_maxread_field: string;
1247
+ }, body: any, { req, res }: {
1248
+ req: object;
1249
+ res: object;
1250
+ }, { ackReadQuery }: {
1251
+ ackReadQuery: any;
1252
+ }) => Promise<void>;
1253
+ fetch_older_msg: (table_id: any, viewname: any, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: object, body: object, { req, res }: string, { fetchOlderMsgQuery }: any) => Promise<object>;
1254
+ };
1255
+ noAutoTest: boolean;
1256
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1257
+ participant_field: object;
1258
+ }, room_id: string, user: object) => Promise<object>;
1259
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1260
+ participant_field: any;
1261
+ msg_relation: string;
1262
+ msgsender_field: string;
1263
+ msgview: string;
1264
+ msgform: any;
1265
+ participant_maxread_field: any;
1266
+ }) => object[];
1267
+ getStringsForI18n(): object[];
1268
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1269
+ table_id: any;
1270
+ viewname: any;
1271
+ configuration: {
1272
+ columns: any;
1273
+ default_state: any;
1274
+ };
1275
+ req: any;
1276
+ }) => {
1277
+ getRowQuery(state_id: any, part_table_name: any, part_user_field: any, part_key_to_room: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1278
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1279
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1280
+ json: {
1281
+ msgid: {
1282
+ error: string;
1283
+ } | {
1284
+ success: any;
1285
+ };
1286
+ error?: undefined;
1287
+ };
1288
+ } | {
1289
+ json: {
1290
+ error: any;
1291
+ msgid?: undefined;
1292
+ };
1293
+ }>;
1294
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1295
+ json: {
1296
+ error: string;
1297
+ success?: undefined;
1298
+ };
1299
+ } | {
1300
+ json: {
1301
+ success: string;
1302
+ error?: undefined;
1303
+ };
1304
+ }>;
1305
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1306
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1307
+ };
1308
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1309
1309
  })[];
1310
1310
  import fileviews = require("./fileviews");
1311
1311
  import actions = require("./actions");
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../base-plugin/types.js"],"names":[],"mappings":";gBAqfa,MAAM;oBAEN,MAAM;;IAQL,+CA6EX;IAMS;;gBAK+D;;;;;YAehE,6BAAyB;;;;;;;YAKzB,mCACiE;;;;;;;;YAKjE,mCAA+C;;;;;;;;;;;;;;YAc/C,4DAIJ;;;;;;;;;;;;;;;YAkBI,yDAGG;;;;;;;;YAUH,yDAAmE;;;;;;;;YAWnE,mCAA6B;;;;;;;;;;YAapB;;;;;;;;;;;;;;;;;;;;;iBAwCb;;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;;;;;;YAUI,iDAKJ;;;;;;;;YAWI,iDAGJ;;;;;;;;;;;YAaI,8FAkBD;;;;;;;;;;;YAaC,8FAkBD;;;;;;QASD,qBAAgB;;;IAOjB,yDAWL;;IAKS,sCAA2C;;;;kBAzV1C,MAAM;;sBAEN,MAAM;;;;IAUP;;;iBAAmD;;;;;;;;YAepD,uCAAc;;;;;;;;;;;;;;;;;YAkBd,8FAoBD;;;;;;;;;;;;;;;;;;;YAvmCH,qHAaD;;;;;;;;;wBAomCO,MAAM,EAAE;;IAWb,+DAYL;;IAMC,mEAKC;;;;kBAlMQ,MAAM;;sBAEN,MAAM;;;;IAOP,uCAAY;;;;;;;;YAeb,oCAMG;;;;;;;;;;;;YAYH,8FAWD;;;;;;wBAGG,MAAM,EAAE;;IAMb,0CAOL;;IAIS,sCAET;;;;;;;;;;;;;;;;;;;IAlqCI,0DAOJ"}
@@ -653,12 +653,18 @@ const string = {
653
653
  onChange: attrs.onChange,
654
654
  onBlur: attrs.onChange,
655
655
  autocomplete: "off",
656
- }, required || attrs.force_required
657
- ? getStrOptions(v, attrs.options)
658
- : [
659
- option({ value: "" }, attrs.neutral_label || ""),
656
+ required: attrs.placeholder && (required || attrs.force_required),
657
+ }, attrs.placeholder && (required || attrs.force_required)
658
+ ? [
659
+ option({ value: "", disabled: true, selected: !v }, attrs.placeholder),
660
660
  ...getStrOptions(v, attrs.options),
661
- ])
661
+ ]
662
+ : required || attrs.force_required
663
+ ? getStrOptions(v, attrs.options)
664
+ : [
665
+ option({ value: "" }, attrs.neutral_label || ""),
666
+ ...getStrOptions(v, attrs.options),
667
+ ])
662
668
  : attrs.options
663
669
  ? none_available(required)
664
670
  : attrs.calcOptions
@@ -1058,6 +1064,11 @@ const int = {
1058
1064
  label: "Read-only",
1059
1065
  type: "Bool",
1060
1066
  },
1067
+ {
1068
+ name: "autofocus",
1069
+ label: "Autofocus",
1070
+ type: "Bool",
1071
+ },
1061
1072
  ],
1062
1073
  run: (nm, v, attrs, cls, required, field) => {
1063
1074
  const id = `input${text_attr(nm)}`;
@@ -1072,6 +1083,7 @@ const int = {
1072
1083
  class: ["form-control", cls],
1073
1084
  disabled: attrs.disabled,
1074
1085
  readonly: attrs.readonly,
1086
+ autofocus: attrs.autofocus,
1075
1087
  "data-fieldname": text_attr(field.name),
1076
1088
  name,
1077
1089
  onChange: attrs.onChange,