@saltcorn/data 1.1.0-beta.20 → 1.1.0-beta.22

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.
@@ -554,113 +554,7 @@ export const types: ({
554
554
  show: {
555
555
  isEdit: boolean;
556
556
  description: string;
557
- run: (v: any, req: any) => any;
558
- };
559
- checkboxes: {
560
- isEdit: boolean;
561
- description: string;
562
- run: (v: any) => any;
563
- };
564
- TrueFalse: {
565
- isEdit: boolean;
566
- description: string;
567
- run: (v: any) => "" | "True" | "False";
568
- };
569
- edit: {
570
- isEdit: boolean;
571
- description: string;
572
- configFields: ({
573
- name: string;
574
- label: string;
575
- type: string;
576
- attributes: {
577
- options: string[];
578
- };
579
- } | {
580
- name: string;
581
- label: string;
582
- type: string;
583
- attributes?: undefined;
584
- })[];
585
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
586
- };
587
- switch: {
588
- isEdit: boolean;
589
- description: string;
590
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
591
- };
592
- show_with_html: {
593
- configFields: {
594
- input_type: string;
595
- name: string;
596
- label: string;
597
- sublabel: string;
598
- default: string;
599
- attributes: {
600
- mode: string;
601
- };
602
- }[];
603
- isEdit: boolean;
604
- description: string;
605
- run: (v: any, req: any, attrs?: {}) => any;
606
- };
607
- tristate: {
608
- isEdit: boolean;
609
- description: string;
610
- configFields: {
611
- name: string;
612
- label: string;
613
- type: string;
614
- }[];
615
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
616
- };
617
- };
618
- attributes: object[];
619
- readFromFormRecord: (rec: any, name: string) => boolean | null;
620
- read: (v: object) => boolean | null;
621
- readFromDB: (v: object) => object;
622
- listAs: (v: object) => object;
623
- validate: () => boolean;
624
- } | {
625
- name: string;
626
- description: string;
627
- sql_name: string;
628
- js_type: string;
629
- contract: () => Function;
630
- attributes: object[];
631
- fieldviews: {
632
- show: {
633
- isEdit: boolean;
634
- description: string;
635
- run: (d: any, req: any, attrs?: {}) => any;
636
- };
637
- showDay: {
638
- isEdit: boolean;
639
- description: string;
640
- run: (d: any, req: any) => any;
641
- };
642
- format: {
643
- isEdit: boolean;
644
- description: string;
645
- configFields: {
646
- name: string;
647
- label: string;
648
- type: string;
649
- help: {
650
- topic: string;
651
- };
652
- }[];
653
- run: (d: any, req: any, options: any) => any;
654
- };
655
- relative: {
656
- isEdit: boolean;
657
- description: string;
658
- run: (d: any, req: any) => string;
659
- };
660
- yearsAgo: {
661
- isEdit: boolean;
662
- description: string;
663
- run: (d: any, req: any) => string;
557
+ run: (s: any) => any;
664
558
  };
665
559
  show_with_html: {
666
560
  configFields: {
@@ -683,17 +577,9 @@ export const types: ({
683
577
  description: string;
684
578
  run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
685
579
  };
686
- editDay: {
687
- isEdit: boolean;
688
- blockDisplay: boolean;
689
- description: string;
690
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
691
- };
692
- };
693
- presets: {
694
- Now: () => Date;
695
580
  };
696
- read: (v: object, attrs: object) => object;
581
+ attributes: object[];
582
+ read: (v: object) => object;
697
583
  validate: () => boolean;
698
584
  } | {
699
585
  name: string;
@@ -948,11 +834,40 @@ export const types: ({
948
834
  sql_name: string;
949
835
  js_type: string;
950
836
  contract: () => Function;
837
+ attributes: object[];
951
838
  fieldviews: {
952
839
  show: {
953
840
  isEdit: boolean;
954
841
  description: string;
955
- run: (s: any) => any;
842
+ run: (d: any, req: any, attrs?: {}) => any;
843
+ };
844
+ showDay: {
845
+ isEdit: boolean;
846
+ description: string;
847
+ run: (d: any, req: any) => any;
848
+ };
849
+ format: {
850
+ isEdit: boolean;
851
+ description: string;
852
+ configFields: {
853
+ name: string;
854
+ label: string;
855
+ type: string;
856
+ help: {
857
+ topic: string;
858
+ };
859
+ }[];
860
+ run: (d: any, req: any, options: any) => any;
861
+ };
862
+ relative: {
863
+ isEdit: boolean;
864
+ description: string;
865
+ run: (d: any, req: any) => string;
866
+ };
867
+ yearsAgo: {
868
+ isEdit: boolean;
869
+ description: string;
870
+ run: (d: any, req: any) => string;
956
871
  };
957
872
  show_with_html: {
958
873
  configFields: {
@@ -975,12 +890,158 @@ export const types: ({
975
890
  description: string;
976
891
  run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
977
892
  };
893
+ editDay: {
894
+ isEdit: boolean;
895
+ blockDisplay: boolean;
896
+ description: string;
897
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
898
+ };
899
+ };
900
+ presets: {
901
+ Now: () => Date;
902
+ };
903
+ read: (v: object, attrs: object) => object;
904
+ validate: () => boolean;
905
+ } | {
906
+ name: string;
907
+ description: string;
908
+ sql_name: string;
909
+ js_type: string;
910
+ contract: () => Function;
911
+ fieldviews: {
912
+ show: {
913
+ isEdit: boolean;
914
+ description: string;
915
+ run: (v: any, req: any) => any;
916
+ };
917
+ checkboxes: {
918
+ isEdit: boolean;
919
+ description: string;
920
+ run: (v: any) => any;
921
+ };
922
+ TrueFalse: {
923
+ isEdit: boolean;
924
+ description: string;
925
+ run: (v: any) => "" | "True" | "False";
926
+ };
927
+ edit: {
928
+ isEdit: boolean;
929
+ description: string;
930
+ configFields: ({
931
+ name: string;
932
+ label: string;
933
+ type: string;
934
+ attributes: {
935
+ options: string[];
936
+ };
937
+ } | {
938
+ name: string;
939
+ label: string;
940
+ type: string;
941
+ attributes?: undefined;
942
+ })[];
943
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
944
+ };
945
+ switch: {
946
+ isEdit: boolean;
947
+ description: string;
948
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
949
+ };
950
+ show_with_html: {
951
+ configFields: {
952
+ input_type: string;
953
+ name: string;
954
+ label: string;
955
+ sublabel: string;
956
+ default: string;
957
+ attributes: {
958
+ mode: string;
959
+ };
960
+ }[];
961
+ isEdit: boolean;
962
+ description: string;
963
+ run: (v: any, req: any, attrs?: {}) => any;
964
+ };
965
+ tristate: {
966
+ isEdit: boolean;
967
+ description: string;
968
+ configFields: {
969
+ name: string;
970
+ label: string;
971
+ type: string;
972
+ }[];
973
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
974
+ };
978
975
  };
979
976
  attributes: object[];
980
- read: (v: object) => object;
977
+ readFromFormRecord: (rec: any, name: string) => boolean | null;
978
+ read: (v: object) => boolean | null;
979
+ readFromDB: (v: object) => object;
980
+ listAs: (v: object) => object;
981
981
  validate: () => boolean;
982
982
  })[];
983
983
  export const viewtemplates: ({
984
+ name: string;
985
+ description: string;
986
+ configuration_workflow: (req: object) => import("../models/workflow");
987
+ 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, }: {
988
+ columns: object[];
989
+ view_to_create?: string | undefined;
990
+ create_view_display: string;
991
+ create_view_label?: string | undefined;
992
+ default_state?: object | undefined;
993
+ create_view_location?: string | undefined;
994
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
995
+ listQuery: any;
996
+ }) => Promise<any>;
997
+ view_quantity: string;
998
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
999
+ columns: object[];
1000
+ }) => Function;
1001
+ initial_config: Function;
1002
+ on_delete: (table_id: any, viewname: string, { default_state }: {
1003
+ default_state: any;
1004
+ }) => Promise<void>;
1005
+ routes: {
1006
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1007
+ columns: object[];
1008
+ layout: any;
1009
+ }, body: object, { req, res }: {
1010
+ req: object;
1011
+ res: any;
1012
+ }, { getRowQuery }: {
1013
+ getRowQuery: any;
1014
+ }) => Promise<object>;
1015
+ };
1016
+ display_state_form: (opts: object) => boolean;
1017
+ default_state_form: ({ default_state }: object) => boolean;
1018
+ getStringsForI18n({ columns, create_view_label }: {
1019
+ columns: any;
1020
+ create_view_label: any;
1021
+ }): string[];
1022
+ queries: ({ table_id, exttable_name, name, configuration: { columns, layout, default_state }, req, }: {
1023
+ table_id: any;
1024
+ exttable_name: any;
1025
+ name: any;
1026
+ configuration: {
1027
+ columns: any;
1028
+ layout: any;
1029
+ default_state: any;
1030
+ };
1031
+ req: any;
1032
+ }) => {
1033
+ listQuery(state: any, stateHash: any): Promise<{
1034
+ rows: import("@saltcorn/db-common/internal").Row[];
1035
+ rowCount: number | undefined;
1036
+ }>;
1037
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1038
+ };
1039
+ configCheck: (view: any) => Promise<{
1040
+ errors: string[];
1041
+ warnings: string[];
1042
+ }>;
1043
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1044
+ } | {
984
1045
  name: string;
985
1046
  description: string;
986
1047
  configuration_workflow: (req: object) => import("../models/workflow");
@@ -1140,67 +1201,6 @@ export const viewtemplates: ({
1140
1201
  warnings: string[];
1141
1202
  }>;
1142
1203
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1143
- } | {
1144
- name: string;
1145
- description: string;
1146
- configuration_workflow: (req: object) => import("../models/workflow");
1147
- 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, }: {
1148
- columns: object[];
1149
- view_to_create?: string | undefined;
1150
- create_view_display: string;
1151
- create_view_label?: string | undefined;
1152
- default_state?: object | undefined;
1153
- create_view_location?: string | undefined;
1154
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
1155
- listQuery: any;
1156
- }) => Promise<any>;
1157
- view_quantity: string;
1158
- get_state_fields: (table_id: string, viewname: any, { columns }: {
1159
- columns: object[];
1160
- }) => Function;
1161
- initial_config: Function;
1162
- on_delete: (table_id: any, viewname: string, { default_state }: {
1163
- default_state: any;
1164
- }) => Promise<void>;
1165
- routes: {
1166
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1167
- columns: object[];
1168
- layout: any;
1169
- }, body: object, { req, res }: {
1170
- req: object;
1171
- res: any;
1172
- }, { getRowQuery }: {
1173
- getRowQuery: any;
1174
- }) => Promise<object>;
1175
- };
1176
- display_state_form: (opts: object) => boolean;
1177
- default_state_form: ({ default_state }: object) => boolean;
1178
- getStringsForI18n({ columns, create_view_label }: {
1179
- columns: any;
1180
- create_view_label: any;
1181
- }): string[];
1182
- queries: ({ table_id, exttable_name, name, configuration: { columns, layout, default_state }, req, }: {
1183
- table_id: any;
1184
- exttable_name: any;
1185
- name: any;
1186
- configuration: {
1187
- columns: any;
1188
- layout: any;
1189
- default_state: any;
1190
- };
1191
- req: any;
1192
- }) => {
1193
- listQuery(state: any, stateHash: any): Promise<{
1194
- rows: import("@saltcorn/db-common/internal").Row[];
1195
- rowCount: number | undefined;
1196
- }>;
1197
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1198
- };
1199
- configCheck: (view: any) => Promise<{
1200
- errors: string[];
1201
- warnings: string[];
1202
- }>;
1203
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1204
1204
  } | {
1205
1205
  name: string;
1206
1206
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/data",
3
- "version": "1.1.0-beta.20",
3
+ "version": "1.1.0-beta.22",
4
4
  "description": "Data models for Saltcorn, open-source no-code platform",
5
5
  "homepage": "https://saltcorn.com",
6
6
  "scripts": {
@@ -37,15 +37,15 @@
37
37
  "!dist/tsconfig.ref.tsbuildinfo"
38
38
  ],
39
39
  "optionalDependencies": {
40
- "@saltcorn/postgres": "1.1.0-beta.20",
41
- "@saltcorn/sqlite": "1.1.0-beta.20"
40
+ "@saltcorn/postgres": "1.1.0-beta.22",
41
+ "@saltcorn/sqlite": "1.1.0-beta.22"
42
42
  },
43
43
  "dependencies": {
44
- "@saltcorn/types": "1.1.0-beta.20",
45
- "@saltcorn/markup": "1.1.0-beta.20",
46
- "@saltcorn/common-code": "1.1.0-beta.20",
47
- "@saltcorn/db-common": "1.1.0-beta.20",
48
- "@saltcorn/sqlite-mobile": "1.1.0-beta.20",
44
+ "@saltcorn/types": "1.1.0-beta.22",
45
+ "@saltcorn/markup": "1.1.0-beta.22",
46
+ "@saltcorn/common-code": "1.1.0-beta.22",
47
+ "@saltcorn/db-common": "1.1.0-beta.22",
48
+ "@saltcorn/sqlite-mobile": "1.1.0-beta.22",
49
49
  "acorn": "^8.0.3",
50
50
  "assert": "^2.0.0",
51
51
  "astring": "^1.4.3",
@@ -61,6 +61,7 @@
61
61
  "env-paths": "^2.2.0",
62
62
  "estraverse": "^5.2.0",
63
63
  "fs-extended-attributes": "1.0.1",
64
+ "https-proxy-agent": "^7.0.6",
64
65
  "i18n": "^0.15.1",
65
66
  "latest-version": "^5.1.0",
66
67
  "live-plugin-manager": "^0.17.1",