@saltcorn/data 0.9.0 → 0.9.1-beta.0

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.
@@ -597,63 +597,45 @@ export const types: ({
597
597
  export const viewtemplates: ({
598
598
  name: string;
599
599
  description: string;
600
- configuration_workflow: (req: object) => import("../models/workflow");
601
- 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, }: {
602
- columns: object[];
603
- view_to_create?: string | undefined;
604
- create_view_display: string;
605
- create_view_label?: string | undefined;
606
- default_state?: object | undefined;
607
- create_view_location?: string | undefined;
608
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
609
- listQuery: any;
610
- }) => Promise<any>;
611
- view_quantity: string;
612
- get_state_fields: (table_id: string, viewname: any, { columns }: {
600
+ get_state_fields: () => object[];
601
+ configuration_workflow: () => import("../models/workflow");
602
+ run: (table_id: number, viewname: string, { columns, layout }: {
613
603
  columns: object[];
614
- }) => Function;
615
- initial_config: Function;
616
- on_delete: (table_id: any, viewname: string, { default_state }: {
617
- default_state: any;
618
- }) => Promise<void>;
604
+ layout: object;
605
+ }, state: object, extra: object, { distinctValuesQuery }: {
606
+ distinctValuesQuery: any;
607
+ }) => Promise<Layout>;
608
+ initial_config: () => Promise<object>;
609
+ display_state_form: boolean;
610
+ getStringsForI18n({ layout }: {
611
+ layout: any;
612
+ }): string[];
619
613
  routes: {
620
- run_action: (table_id: number, viewname: any, { columns, layout }: {
621
- columns: object[];
622
- layout: any;
623
- }, body: object, { req, res }: {
624
- req: object;
614
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
615
+ req: any;
625
616
  res: any;
626
- }, { getRowQuery }: {
627
- getRowQuery: any;
628
- }) => Promise<object>;
617
+ }, { actionQuery }: {
618
+ actionQuery: any;
619
+ }) => Promise<any>;
629
620
  };
630
- display_state_form: (opts: object) => boolean;
631
- default_state_form: ({ default_state }: object) => boolean;
632
- getStringsForI18n({ columns, create_view_label }: {
633
- columns: any;
634
- create_view_label: any;
635
- }): string[];
636
- queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
621
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
637
622
  table_id: any;
638
- exttable_name: any;
639
- name: any;
623
+ viewname: any;
640
624
  configuration: {
641
625
  columns: any;
642
- default_state: any;
643
626
  };
644
627
  req: any;
628
+ res: any;
629
+ exttable_name: any;
645
630
  }) => {
646
- listQuery(state: any, stateHash: any): Promise<{
647
- rows: import("@saltcorn/db-common/internal").Row[];
648
- rowCount: number;
631
+ actionQuery(state: any, rndid: any): Promise<{
632
+ json: any;
633
+ }>;
634
+ distinctValuesQuery(state: any): Promise<{
635
+ distinct_values: {};
636
+ role: any;
649
637
  }>;
650
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
651
638
  };
652
- configCheck: (view: any) => Promise<{
653
- errors: string[];
654
- warnings: string[];
655
- }>;
656
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
657
639
  } | {
658
640
  name: string;
659
641
  description: string;
@@ -803,6 +785,146 @@ export const viewtemplates: ({
803
785
  warnings: string[];
804
786
  }>;
805
787
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
788
+ } | {
789
+ name: string;
790
+ description: string;
791
+ configuration_workflow: (req: object) => import("../models/workflow");
792
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
793
+ participant_field: string;
794
+ msg_relation: string;
795
+ msgsender_field: any;
796
+ msgview: string;
797
+ msgform: string;
798
+ participant_maxread_field: string;
799
+ }, state: object, { req, res }: {
800
+ req: object;
801
+ res: object;
802
+ }, { getRowQuery, updateQuery, optionsQuery }: {
803
+ getRowQuery: any;
804
+ updateQuery: any;
805
+ optionsQuery: any;
806
+ }) => Promise<div>;
807
+ get_state_fields: () => object[];
808
+ display_state_form: boolean;
809
+ routes: {
810
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
811
+ participant_field: string;
812
+ msg_relation: string;
813
+ msgsender_field: any;
814
+ msgview: string;
815
+ msgform: string;
816
+ participant_maxread_field: string;
817
+ }, body: any, { req, res }: {
818
+ req: object;
819
+ res: object;
820
+ }, { submitAjaxQuery }: {
821
+ submitAjaxQuery: any;
822
+ }) => Promise<object>;
823
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
824
+ participant_field: string;
825
+ participant_maxread_field: string;
826
+ }, body: any, { req, res }: {
827
+ req: object;
828
+ res: object;
829
+ }, { ackReadQuery }: {
830
+ ackReadQuery: any;
831
+ }) => Promise<void>;
832
+ 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>;
833
+ };
834
+ noAutoTest: boolean;
835
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
836
+ participant_field: object;
837
+ }, room_id: string, user: object) => Promise<object>;
838
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
839
+ participant_field: any;
840
+ msg_relation: string;
841
+ msgsender_field: string;
842
+ msgview: string;
843
+ msgform: any;
844
+ participant_maxread_field: any;
845
+ }) => object[];
846
+ getStringsForI18n(): object[];
847
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
848
+ table_id: any;
849
+ viewname: any;
850
+ configuration: {
851
+ columns: any;
852
+ default_state: any;
853
+ };
854
+ req: any;
855
+ }) => {
856
+ 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>;
857
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
858
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
859
+ json: {
860
+ msgid: {
861
+ error: string;
862
+ } | {
863
+ success: any;
864
+ };
865
+ error?: undefined;
866
+ };
867
+ } | {
868
+ json: {
869
+ error: any;
870
+ msgid?: undefined;
871
+ };
872
+ }>;
873
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
874
+ json: {
875
+ error: string;
876
+ success?: undefined;
877
+ };
878
+ } | {
879
+ json: {
880
+ success: string;
881
+ error?: undefined;
882
+ };
883
+ }>;
884
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
885
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
886
+ };
887
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
888
+ } | {
889
+ name: string;
890
+ description: string;
891
+ configuration_workflow: (req: object) => import("../models/workflow");
892
+ 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, always_create_view, include_fml, empty_view, ...cols }: {
893
+ show_view: string;
894
+ order_field: name;
895
+ descending: boolean;
896
+ view_to_create?: string | undefined;
897
+ create_view_display: string;
898
+ in_card: boolean;
899
+ masonry_columns: string;
900
+ rows_per_page?: number | undefined;
901
+ hide_pagination: boolean;
902
+ create_view_label?: string | undefined;
903
+ create_view_location?: string | undefined;
904
+ always_create_view: boolean;
905
+ cols: any;
906
+ }, state: object, extraArgs: any, { countRowsQuery }: {
907
+ countRowsQuery: any;
908
+ }) => Promise<div>;
909
+ get_state_fields: (table_id: number, viewname: any, { show_view }: {
910
+ show_view: any;
911
+ }) => Promise<import("../models/field")>;
912
+ display_state_form: boolean;
913
+ getStringsForI18n({ create_view_label }: {
914
+ create_view_label: any;
915
+ }): string[] | Object[];
916
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
917
+ table_id: any;
918
+ viewname: any;
919
+ configuration: {
920
+ columns: any;
921
+ default_state: any;
922
+ };
923
+ req: any;
924
+ }) => {
925
+ countRowsQuery(state: any): Promise<number>;
926
+ };
927
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
806
928
  } | {
807
929
  name: string;
808
930
  description: string;
@@ -881,179 +1003,81 @@ export const viewtemplates: ({
881
1003
  name: string;
882
1004
  description: string;
883
1005
  configuration_workflow: (req: object) => import("../models/workflow");
884
- run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
885
- list_view: string;
886
- show_view: string;
887
- subtables: object;
888
- }, state: any, extraArgs: any, { getRowQuery }: {
889
- getRowQuery: any;
890
- }) => Promise<div>;
891
- get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
892
- list_view: string;
893
- show_view: any;
894
- }) => Promise<object[]>;
895
- display_state_form: ({ list_view, _omit_state_form }: {
896
- list_view: string;
897
- _omit_state_form: boolean;
898
- }) => boolean;
899
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
900
- table_id: any;
901
- viewname: any;
902
- configuration: {
903
- columns: any;
904
- default_state: any;
905
- };
906
- req: any;
907
- }) => {
908
- getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
909
- };
910
- connectedObjects: ({ list_view, subtables }: {
911
- list_view: any;
912
- subtables: any;
913
- }) => Promise<{
914
- embeddedViews: import("../models/view")[];
915
- }>;
916
- } | {
917
- name: string;
918
- description: string;
919
- configuration_workflow: (req: object) => import("../models/workflow");
920
- 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, always_create_view, include_fml, empty_view, ...cols }: {
921
- show_view: string;
922
- order_field: name;
923
- descending: boolean;
1006
+ 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, }: {
1007
+ columns: object[];
924
1008
  view_to_create?: string | undefined;
925
1009
  create_view_display: string;
926
- in_card: boolean;
927
- masonry_columns: string;
928
- rows_per_page?: number | undefined;
929
- hide_pagination: boolean;
930
1010
  create_view_label?: string | undefined;
1011
+ default_state?: object | undefined;
931
1012
  create_view_location?: string | undefined;
932
- always_create_view: boolean;
933
- cols: any;
934
- }, state: object, extraArgs: any, { countRowsQuery }: {
935
- countRowsQuery: any;
936
- }) => Promise<div>;
937
- get_state_fields: (table_id: number, viewname: any, { show_view }: {
938
- show_view: any;
939
- }) => Promise<import("../models/field")>;
940
- display_state_form: boolean;
941
- getStringsForI18n({ create_view_label }: {
942
- create_view_label: any;
943
- }): string[] | Object[];
944
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
945
- table_id: any;
946
- viewname: any;
947
- configuration: {
948
- columns: any;
949
- default_state: any;
950
- };
951
- req: any;
952
- }) => {
953
- countRowsQuery(state: any): Promise<number>;
954
- };
955
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
956
- } | {
957
- name: string;
958
- description: string;
959
- get_state_fields: () => object[];
960
- configuration_workflow: () => import("../models/workflow");
961
- run: (table_id: number, viewname: string, { columns, layout }: {
1013
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
1014
+ listQuery: any;
1015
+ }) => Promise<any>;
1016
+ view_quantity: string;
1017
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
962
1018
  columns: object[];
963
- layout: object;
964
- }, state: object, extra: object, { distinctValuesQuery }: {
965
- distinctValuesQuery: any;
966
- }) => Promise<Layout>;
967
- initial_config: () => Promise<object>;
968
- display_state_form: boolean;
969
- getStringsForI18n({ layout }: {
970
- layout: any;
971
- }): string[];
1019
+ }) => Function;
1020
+ initial_config: Function;
1021
+ on_delete: (table_id: any, viewname: string, { default_state }: {
1022
+ default_state: any;
1023
+ }) => Promise<void>;
972
1024
  routes: {
973
- run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
974
- req: any;
1025
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1026
+ columns: object[];
1027
+ layout: any;
1028
+ }, body: object, { req, res }: {
1029
+ req: object;
975
1030
  res: any;
976
- }, { actionQuery }: {
977
- actionQuery: any;
978
- }) => Promise<any>;
1031
+ }, { getRowQuery }: {
1032
+ getRowQuery: any;
1033
+ }) => Promise<object>;
979
1034
  };
980
- queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1035
+ display_state_form: (opts: object) => boolean;
1036
+ default_state_form: ({ default_state }: object) => boolean;
1037
+ getStringsForI18n({ columns, create_view_label }: {
1038
+ columns: any;
1039
+ create_view_label: any;
1040
+ }): string[];
1041
+ queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
981
1042
  table_id: any;
982
- viewname: any;
1043
+ exttable_name: any;
1044
+ name: any;
983
1045
  configuration: {
984
1046
  columns: any;
1047
+ default_state: any;
985
1048
  };
986
1049
  req: any;
987
- res: any;
988
- exttable_name: any;
989
1050
  }) => {
990
- actionQuery(state: any, rndid: any): Promise<{
991
- json: any;
992
- }>;
993
- distinctValuesQuery(state: any): Promise<{
994
- distinct_values: {};
995
- role: any;
1051
+ listQuery(state: any, stateHash: any): Promise<{
1052
+ rows: import("@saltcorn/db-common/internal").Row[];
1053
+ rowCount: number;
996
1054
  }>;
1055
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
997
1056
  };
1057
+ configCheck: (view: any) => Promise<{
1058
+ errors: string[];
1059
+ warnings: string[];
1060
+ }>;
1061
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
998
1062
  } | {
999
1063
  name: string;
1000
1064
  description: string;
1001
1065
  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 }: {
1066
+ run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1067
+ list_view: string;
1068
+ show_view: string;
1069
+ subtables: object;
1070
+ }, state: any, extraArgs: any, { getRowQuery }: {
1013
1071
  getRowQuery: any;
1014
- updateQuery: any;
1015
- optionsQuery: any;
1016
1072
  }) => 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[];
1073
+ get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1074
+ list_view: string;
1075
+ show_view: any;
1076
+ }) => Promise<object[]>;
1077
+ display_state_form: ({ list_view, _omit_state_form }: {
1078
+ list_view: string;
1079
+ _omit_state_form: boolean;
1080
+ }) => boolean;
1057
1081
  queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1058
1082
  table_id: any;
1059
1083
  viewname: any;
@@ -1063,38 +1087,14 @@ export const viewtemplates: ({
1063
1087
  };
1064
1088
  req: any;
1065
1089
  }) => {
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>;
1090
+ getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1096
1091
  };
1097
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1092
+ connectedObjects: ({ list_view, subtables }: {
1093
+ list_view: any;
1094
+ subtables: any;
1095
+ }) => Promise<{
1096
+ embeddedViews: import("../models/view")[];
1097
+ }>;
1098
1098
  })[];
1099
1099
  import fileviews = require("./fileviews");
1100
1100
  import actions = require("./actions");
@@ -1 +1 @@
1
- {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../base-plugin/viewtemplates/edit.js"],"names":[],"mappings":"AAoFA;;;GAGG;AAEH,4CAJW,MAAM,GACJ,QAAQ,CAiUjB;AAgCJ;;;;;;;;;;;GAWG;AACH,8BAXW,MAAM,YACN,MAAM,mBAIN,MAAM;IAEU,GAAG,EAAnB,MAAM;IACU,GAAG,EAAnB,MAAM;;;IACJ,QAAQ,IAAI,CAAC,CAYzB;AAED;;;;;;;;;GASG;AACH,kCATW,MAAM,YACN,MAAM;IAEE,OAAO;IACP,MAAM;wBAEd,MAAM;;;;IACJ,QAAQ,IAAI,EAAE,CAAC,CAuC3B;AAwWD;;;;;;;;;;;;;;;;GAgBG;AACH,kCAhBW,MAAM,YACN,MAAM;IAEY,OAAO,EAAzB,MAAM,EAAE;IACQ,MAAM;IACN,KAAK,EAArB,MAAM;IACW,cAAc,EAA/B,OAAO;IACW,oBAAoB,EAAtC,MAAM,EAAE;UACR,MAAM;IAGU,GAAG,EAAnB,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,QAAQ,EAAxB,MAAM;;;;;;;;iBACJ,QAAQ,IAAI,CAAC,CAuMzB;AAnqBD;;;;;;GAMG;AACH;IAHmB,OAAO;IACb,QAAQ,MAAM,EAAE,CAAC,CAQ7B;AAcD,uBAAuB;AACvB,sCAAuD;AAgtBvD;;;;;;GAMG;AACH;IALwB,IAAI,EAAjB,MAAM;IACO,QAAQ,EAArB,MAAM;IACO,GAAG,EAAhB,MAAM;;;IACJ,QAAQ,OAAO,CAAC,CAO5B;;;;AAED;;;;;;;;;;;GAWG;AACH,sCAXW,MAAM;IAGS,OAAO,EAAtB,MAAM,EAAE;IACA,MAAM;;IAGE,GAAG,EAAnB,MAAM;IACK,GAAG;;;IACZ,QAAQ,MAAM,CAAC,CAe3B;AAED;;;;;;;;;;;;;;;;;;;;kBAiGC;;2BAyRY,MAAM;kCAEN,MAAM;yCAQN,OAAO;AASH;;;;;qBAEd;AACD;;;;GAIG;AACH;;aAEC;AAPD;;;;GAIG;AACH;;aAEC;AACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqPP;;;;;AAGW;;;GAmDZ;AACiB,6HAEjB"}
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../base-plugin/viewtemplates/edit.js"],"names":[],"mappings":"AAyFA;;;GAGG;AAEH,4CAJW,MAAM,GACJ,QAAQ,CAiUjB;AAgCJ;;;;;;;;;;;GAWG;AACH,8BAXW,MAAM,YACN,MAAM,mBAIN,MAAM;IAEU,GAAG,EAAnB,MAAM;IACU,GAAG,EAAnB,MAAM;;;IACJ,QAAQ,IAAI,CAAC,CAYzB;AAED;;;;;;;;;GASG;AACH,kCATW,MAAM,YACN,MAAM;IAEE,OAAO;IACP,MAAM;wBAEd,MAAM;;;;IACJ,QAAQ,IAAI,EAAE,CAAC,CAyC3B;AAyWD;;;;;;;;;;;;;;;;GAgBG;AACH,kCAhBW,MAAM,YACN,MAAM;IAEY,OAAO,EAAzB,MAAM,EAAE;IACQ,MAAM;IACN,KAAK,EAArB,MAAM;IACW,cAAc,EAA/B,OAAO;IACW,oBAAoB,EAAtC,MAAM,EAAE;UACR,MAAM;IAGU,GAAG,EAAnB,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,QAAQ,EAAxB,MAAM;;;;;;;;iBACJ,QAAQ,IAAI,CAAC,CAuMzB;AAtqBD;;;;;;GAMG;AACH;IAHmB,OAAO;IACb,QAAQ,MAAM,EAAE,CAAC,CAQ7B;AAcD,uBAAuB;AACvB,sCAAuD;AAmtBvD;;;;;;GAMG;AACH;IALwB,IAAI,EAAjB,MAAM;IACO,QAAQ,EAArB,MAAM;IACO,GAAG,EAAhB,MAAM;;;IACJ,QAAQ,OAAO,CAAC,CAO5B;;;;AAED;;;;;;;;;;;GAWG;AACH,sCAXW,MAAM;IAGS,OAAO,EAAtB,MAAM,EAAE;IACA,MAAM;;IAGE,GAAG,EAAnB,MAAM;IACK,GAAG;;;IACZ,QAAQ,MAAM,CAAC,CAe3B;AAED;;;;;;;;;;;;;;;;;;;;kBAiGC;;2BAkSY,MAAM;kCAEN,MAAM;yCAQN,OAAO;AASH;;;;;qBAEd;AACD;;;;GAIG;AACH;;aAEC;AAPD;;;;GAIG;AACH;;aAEC;AACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqPP;;;;;AAGW;;;GAmDZ;AACiB,6HAEjB"}
@@ -19,7 +19,7 @@ const { text, text_attr, script, domReady, div, button, i, pre, } = require("@sa
19
19
  const { renderForm } = require("@saltcorn/markup");
20
20
  const FieldRepeat = require("../../models/fieldrepeat");
21
21
  const { get_expression_function, expressionChecker, eval_expression, freeVariables, } = require("../../models/expression");
22
- const { InvalidConfiguration, isNode, mergeIntoWhere } = require("../../utils");
22
+ const { InvalidConfiguration, isNode, isOfflineMode, mergeIntoWhere, } = require("../../utils");
23
23
  const Library = require("../../models/library");
24
24
  const { check_view_columns } = require("../../plugin-testing");
25
25
  const { initial_config_all_fields, calcfldViewOptions, calcfldViewConfig, get_parent_views, get_link_view_opts, picked_fields_to_query, stateFieldsToWhere, stateFieldsToQuery, run_action_column, add_free_variables_to_joinfields, readState, } = require("../../plugin-helper");
@@ -385,6 +385,7 @@ const runMany = async (table_id, viewname, { columns, layout, auto_save, split_p
385
385
  table = Table.findOne({ id: table.id });
386
386
  fields = table.getFields();
387
387
  }
388
+ const isRemote = !isWeb(extra.req);
388
389
  return await asyncMap(rows, async (row) => {
389
390
  const html = await render({
390
391
  table,
@@ -400,6 +401,7 @@ const runMany = async (table_id, viewname, { columns, layout, auto_save, split_p
400
401
  getRowQuery,
401
402
  optionsQuery,
402
403
  split_paste,
404
+ isRemote,
403
405
  });
404
406
  return { html, row };
405
407
  });
@@ -483,7 +485,7 @@ const transformForm = async ({ form, table, req, row, res, getRowQuery, viewname
483
485
  // Edit-in-edit
484
486
  if (view.viewtemplate === "Edit" && view_select.type === "ChildList") {
485
487
  const childTable = Table.findOne({ id: view.table_id });
486
- const childForm = await getForm(childTable, view.name, view.configuration.columns, view.configuration.layout, row?.id, req);
488
+ const childForm = await getForm(childTable, view.name, view.configuration.columns, view.configuration.layout, row?.id, req, !isWeb(req));
487
489
  traverseSync(childForm.layout, {
488
490
  field(segment) {
489
491
  segment.field_name = `${view_select.field_name}.${segment.field_name}`;
@@ -972,7 +974,8 @@ const update_matching_rows = async (table_id, viewname, { columns, layout, fixed
972
974
  * @returns null on error, { form, row, pk, id } on success
973
975
  */
974
976
  const prepare = async (viewname, table, fields, { columns, layout, fixed, auto_save }, { req, res }, body, { getRowQuery, saveFileQuery, optionsQuery, getRowByIdQuery }, remote) => {
975
- const form = await getForm(table, viewname, columns, layout, body.id, req);
977
+ const isRemote = !isWeb(req);
978
+ const form = await getForm(table, viewname, columns, layout, body.id, req, isRemote);
976
979
  if (auto_save)
977
980
  form.onChange = `saveAndContinue(this, ${!isWeb(req) ? `'${form.action}'` : undefined})`;
978
981
  Object.entries(body).forEach(([k, v]) => {