@saltcorn/data 1.1.0-beta.4 → 1.1.0-beta.6

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.
@@ -41,7 +41,11 @@ export namespace emit_event {
41
41
  options: string[];
42
42
  type?: undefined;
43
43
  fieldview?: undefined;
44
- sublabel?: undefined;
44
+ sublabel?: undefined; /**
45
+ * @namespace
46
+ * @category saltcorn-data
47
+ * @subcategory actions
48
+ */
45
49
  } | {
46
50
  name: string;
47
51
  label: string;
@@ -50,7 +54,11 @@ export namespace emit_event {
50
54
  required?: undefined;
51
55
  input_type?: undefined;
52
56
  options?: undefined;
53
- sublabel?: undefined;
57
+ sublabel?: undefined; /**
58
+ * @namespace
59
+ * @category saltcorn-data
60
+ * @subcategory actions
61
+ */
54
62
  } | {
55
63
  name: string;
56
64
  label: string;
@@ -128,7 +136,11 @@ export namespace send_email {
128
136
  options: string[];
129
137
  };
130
138
  showIf?: undefined;
131
- sublabel?: undefined;
139
+ sublabel?: undefined; /**
140
+ * @namespace
141
+ * @category saltcorn-data
142
+ * @subcategory actions
143
+ */
132
144
  input_type?: undefined;
133
145
  options?: undefined;
134
146
  class?: undefined;
@@ -145,7 +157,11 @@ export namespace send_email {
145
157
  body_type: string[];
146
158
  to_email?: undefined;
147
159
  };
148
- sublabel?: undefined;
160
+ sublabel?: undefined; /**
161
+ * @namespace
162
+ * @category saltcorn-data
163
+ * @subcategory actions
164
+ */
149
165
  input_type?: undefined;
150
166
  options?: undefined;
151
167
  class?: undefined;
@@ -238,7 +254,11 @@ export namespace send_email {
238
254
  required: boolean;
239
255
  attributes?: undefined;
240
256
  showIf?: undefined;
241
- sublabel?: undefined;
257
+ sublabel?: undefined; /**
258
+ * @namespace
259
+ * @category saltcorn-data
260
+ * @subcategory actions
261
+ */
242
262
  input_type?: undefined;
243
263
  options?: undefined;
244
264
  class?: undefined;
@@ -262,7 +282,11 @@ export namespace send_email {
262
282
  required?: undefined;
263
283
  attributes?: undefined;
264
284
  showIf?: undefined;
265
- sublabel?: undefined;
285
+ sublabel?: undefined; /**
286
+ * @namespace
287
+ * @category saltcorn-data
288
+ * @subcategory actions
289
+ */
266
290
  input_type?: undefined;
267
291
  options?: undefined;
268
292
  class?: undefined;
@@ -358,7 +382,11 @@ export namespace recalculate_stored_fields {
358
382
  } | {
359
383
  table?: undefined;
360
384
  };
361
- sublabel?: undefined;
385
+ sublabel?: undefined; /**
386
+ * @namespace
387
+ * @category saltcorn-data
388
+ * @subcategory actions
389
+ */
362
390
  input_type?: undefined;
363
391
  options?: undefined;
364
392
  class?: undefined;
@@ -440,7 +468,11 @@ export namespace modify_row {
440
468
  options: string[];
441
469
  mode?: undefined;
442
470
  };
443
- sublabel?: undefined;
471
+ sublabel?: undefined; /**
472
+ * @namespace
473
+ * @category saltcorn-data
474
+ * @subcategory actions
475
+ */
444
476
  input_type?: undefined;
445
477
  })[]>;
446
478
  export { configFields_9 as configFields };
@@ -470,7 +502,11 @@ export namespace delete_rows {
470
502
  name: string;
471
503
  label: string;
472
504
  type: string;
473
- sublabel?: undefined;
505
+ sublabel?: undefined; /**
506
+ * @namespace
507
+ * @category saltcorn-data
508
+ * @subcategory actions
509
+ */
474
510
  input_type?: undefined;
475
511
  showIf?: undefined;
476
512
  options?: undefined;
@@ -716,7 +752,11 @@ export namespace run_js_code {
716
752
  };
717
753
  class: string;
718
754
  validator(s: any): any;
719
- sublabel?: undefined;
755
+ sublabel?: undefined; /**
756
+ * @namespace
757
+ * @category saltcorn-data
758
+ * @subcategory actions
759
+ */
720
760
  help?: undefined;
721
761
  showIf?: undefined;
722
762
  options?: undefined;
@@ -741,7 +781,11 @@ export namespace run_js_code {
741
781
  options: string[];
742
782
  attributes?: undefined;
743
783
  class?: undefined;
744
- sublabel?: undefined;
784
+ sublabel?: undefined; /**
785
+ * @namespace
786
+ * @category saltcorn-data
787
+ * @subcategory actions
788
+ */
745
789
  help?: undefined;
746
790
  showIf?: undefined;
747
791
  })[]>;
@@ -771,7 +815,11 @@ export namespace run_js_code_in_field {
771
815
  label: string;
772
816
  input_type: string;
773
817
  options: string[];
774
- sublabel?: undefined;
818
+ sublabel?: undefined; /**
819
+ * @namespace
820
+ * @category saltcorn-data
821
+ * @subcategory actions
822
+ */
775
823
  type?: undefined;
776
824
  required?: undefined;
777
825
  attributes?: undefined;
@@ -918,7 +966,11 @@ export namespace reload_embedded_view {
918
966
  attributes: {
919
967
  options: any[];
920
968
  };
921
- sublabel?: undefined;
969
+ sublabel?: undefined; /**
970
+ * @namespace
971
+ * @category saltcorn-data
972
+ * @subcategory actions
973
+ */
922
974
  } | {
923
975
  name: string;
924
976
  label: string;
@@ -926,7 +978,11 @@ export namespace reload_embedded_view {
926
978
  class: string;
927
979
  required?: undefined;
928
980
  attributes?: undefined;
929
- sublabel?: undefined;
981
+ sublabel?: undefined; /**
982
+ * @namespace
983
+ * @category saltcorn-data
984
+ * @subcategory actions
985
+ */
930
986
  } | {
931
987
  name: string;
932
988
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../base-plugin/actions.js"],"names":[],"mappings":"AA4EA;;;;;;;;;GASG;AACH;;;;;;;;;;iBAyFC;;;;;;;;;;;;;;;IAwCiB;;;;;;;;;;;;;;;;;;;;;;;;;;;SAqBb;;IAQI;;;;sBAWJ;;;;;;;;;;;;;;;;;;;;;IAgCI;;;wBAQJ;;;;;;IAca;;;;;;SAeb;;IAUI;;;;;wBA0CJ;;;;;;;;IAgBa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA+Ib;;;IAUI;;;;;wBA2IJ;;;;;;;;IAgBa;;;;;;;;SAYb;;;;IAUI;;;;;wBAsBJ;;;;;;;;IAca,0CAA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;;;;;;;;;;mBAYJ;;;;;;;;;;;;;;;;;;;;IA8BI;;;;;;;;;;;;;;;OA+BJ;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;;;;;;;;;;;;;;;;;;;;OAYJ;;;;;;;;;;;IAmBa;;;;;;;;;;;8BApZhB;;;;WAIG;;;;;;;;;;;;;;;;;;;;;;;;;8BAJH;;;;WAIG;;;UA+dA;;;;;;;;;IAea;;;;;;;;;;;;;;;;;;8BAlfhB;;;;WAIG;;;;UAghBA;;;;;;;;;;IAqCa;;uBAsBb;;;;IAEI;;;;;;;;;;OAUJ;;;;;;;;IAUa;;;;;;;;;;;;SAcb;;IACI;;;;;;;;;OAgBJ;;;;;;;;IAgBa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAyDb;;IASI;;;;;kCAmFJ;;;;;;;;IAKa;;;;;;;;;8BA9yBhB;;;;WAIG;;;;;;;;8BAJH;;;;WAIG;;;;;;;;;UAm0BA;;IACI;;;;;;;;;;OAkBJ;;;;;;;;;;;;;;;IAaI;;;;;;OAMJ;;;;;;;;IAKa;;;;;;;;;;SAsBb;;IAQI;;;;sBA8BJ;;;;;;;;IAOa;;;;;;;;;;;;;;;;;;;;UA2Cb;;IACI;;;;;;;;sBAeJ;;;;;;;;IAMa,2CAAQ;;IACjB;;;;;;;;OAKJ"}
@@ -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
580
  };
693
- presets: {
694
- Now: () => Date;
695
- };
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,9 +890,94 @@ 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: ({
@@ -261,5 +261,6 @@ import { sqlBinOp } from "@saltcorn/db-common/internal";
261
261
  import { sqlFun } from "@saltcorn/db-common/internal";
262
262
  import Table = require("./models/table");
263
263
  import Field = require("./models/field");
264
+ import View = require("./models/view");
264
265
  export { add_free_variables_to_joinfields, sqlBinOp, sqlFun };
265
266
  //# sourceMappingURL=plugin-helper.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/data",
3
- "version": "1.1.0-beta.4",
3
+ "version": "1.1.0-beta.6",
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.4",
41
- "@saltcorn/sqlite": "1.1.0-beta.4"
40
+ "@saltcorn/postgres": "1.1.0-beta.6",
41
+ "@saltcorn/sqlite": "1.1.0-beta.6"
42
42
  },
43
43
  "dependencies": {
44
- "@saltcorn/types": "1.1.0-beta.4",
45
- "@saltcorn/markup": "1.1.0-beta.4",
46
- "@saltcorn/common-code": "1.1.0-beta.4",
47
- "@saltcorn/db-common": "1.1.0-beta.4",
48
- "@saltcorn/sqlite-mobile": "1.1.0-beta.4",
44
+ "@saltcorn/types": "1.1.0-beta.6",
45
+ "@saltcorn/markup": "1.1.0-beta.6",
46
+ "@saltcorn/common-code": "1.1.0-beta.6",
47
+ "@saltcorn/db-common": "1.1.0-beta.6",
48
+ "@saltcorn/sqlite-mobile": "1.1.0-beta.6",
49
49
  "acorn": "^8.0.3",
50
50
  "assert": "^2.0.0",
51
51
  "astring": "^1.4.3",