@saltcorn/data 1.0.0-beta.9 → 1.0.0-rc.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.
Files changed (146) hide show
  1. package/dist/base-plugin/actions.d.ts +117 -15
  2. package/dist/base-plugin/actions.d.ts.map +1 -1
  3. package/dist/base-plugin/actions.js +25 -2
  4. package/dist/base-plugin/actions.js.map +1 -1
  5. package/dist/base-plugin/fieldviews.d.ts +2 -2
  6. package/dist/base-plugin/fieldviews.d.ts.map +1 -1
  7. package/dist/base-plugin/fieldviews.js +17 -2
  8. package/dist/base-plugin/fieldviews.js.map +1 -1
  9. package/dist/base-plugin/index.d.ts +147 -119
  10. package/dist/base-plugin/index.d.ts.map +1 -1
  11. package/dist/base-plugin/types.d.ts +16 -1
  12. package/dist/base-plugin/types.d.ts.map +1 -1
  13. package/dist/base-plugin/types.js +68 -22
  14. package/dist/base-plugin/types.js.map +1 -1
  15. package/dist/base-plugin/viewtemplates/edit.d.ts.map +1 -1
  16. package/dist/base-plugin/viewtemplates/edit.js +30 -21
  17. package/dist/base-plugin/viewtemplates/edit.js.map +1 -1
  18. package/dist/base-plugin/viewtemplates/feed.d.ts +1 -1
  19. package/dist/base-plugin/viewtemplates/feed.d.ts.map +1 -1
  20. package/dist/base-plugin/viewtemplates/feed.js +5 -3
  21. package/dist/base-plugin/viewtemplates/feed.js.map +1 -1
  22. package/dist/base-plugin/viewtemplates/filter.d.ts.map +1 -1
  23. package/dist/base-plugin/viewtemplates/filter.js +15 -9
  24. package/dist/base-plugin/viewtemplates/filter.js.map +1 -1
  25. package/dist/base-plugin/viewtemplates/list.d.ts +1 -1
  26. package/dist/base-plugin/viewtemplates/list.d.ts.map +1 -1
  27. package/dist/base-plugin/viewtemplates/list.js +66 -29
  28. package/dist/base-plugin/viewtemplates/list.js.map +1 -1
  29. package/dist/base-plugin/viewtemplates/listshowlist.d.ts.map +1 -1
  30. package/dist/base-plugin/viewtemplates/listshowlist.js +8 -2
  31. package/dist/base-plugin/viewtemplates/listshowlist.js.map +1 -1
  32. package/dist/base-plugin/viewtemplates/room.d.ts.map +1 -1
  33. package/dist/base-plugin/viewtemplates/room.js +0 -1
  34. package/dist/base-plugin/viewtemplates/room.js.map +1 -1
  35. package/dist/base-plugin/viewtemplates/show.d.ts.map +1 -1
  36. package/dist/base-plugin/viewtemplates/show.js +44 -26
  37. package/dist/base-plugin/viewtemplates/show.js.map +1 -1
  38. package/dist/base-plugin/viewtemplates/viewable_fields.d.ts +1 -1
  39. package/dist/base-plugin/viewtemplates/viewable_fields.d.ts.map +1 -1
  40. package/dist/base-plugin/viewtemplates/viewable_fields.js +10 -4
  41. package/dist/base-plugin/viewtemplates/viewable_fields.js.map +1 -1
  42. package/dist/db/fixtures.d.ts.map +1 -1
  43. package/dist/db/fixtures.js +35 -1
  44. package/dist/db/fixtures.js.map +1 -1
  45. package/dist/db/state.d.ts +14 -9
  46. package/dist/db/state.d.ts.map +1 -1
  47. package/dist/db/state.js +107 -63
  48. package/dist/db/state.js.map +1 -1
  49. package/dist/migrate.d.ts.map +1 -1
  50. package/dist/migrate.js +21 -21
  51. package/dist/migrate.js.map +1 -1
  52. package/dist/models/config.d.ts.map +1 -1
  53. package/dist/models/config.js +21 -1
  54. package/dist/models/config.js.map +1 -1
  55. package/dist/models/email.d.ts +1 -1
  56. package/dist/models/expression.d.ts.map +1 -1
  57. package/dist/models/expression.js +39 -9
  58. package/dist/models/expression.js.map +1 -1
  59. package/dist/models/field.d.ts +1 -0
  60. package/dist/models/field.d.ts.map +1 -1
  61. package/dist/models/field.js +6 -2
  62. package/dist/models/field.js.map +1 -1
  63. package/dist/models/fieldrepeat.d.ts.map +1 -1
  64. package/dist/models/fieldrepeat.js +6 -1
  65. package/dist/models/fieldrepeat.js.map +1 -1
  66. package/dist/models/file.d.ts +1 -0
  67. package/dist/models/file.d.ts.map +1 -1
  68. package/dist/models/file.js +16 -2
  69. package/dist/models/file.js.map +1 -1
  70. package/dist/models/index.d.ts +7 -3
  71. package/dist/models/index.d.ts.map +1 -1
  72. package/dist/models/internal/query.d.ts.map +1 -1
  73. package/dist/models/internal/query.js +10 -7
  74. package/dist/models/internal/query.js.map +1 -1
  75. package/dist/models/library.d.ts.map +1 -1
  76. package/dist/models/library.js +4 -5
  77. package/dist/models/library.js.map +1 -1
  78. package/dist/models/plugin.d.ts +2 -1
  79. package/dist/models/plugin.d.ts.map +1 -1
  80. package/dist/models/plugin.js +9 -2
  81. package/dist/models/plugin.js.map +1 -1
  82. package/dist/models/scheduler.d.ts +7 -11
  83. package/dist/models/scheduler.d.ts.map +1 -1
  84. package/dist/models/scheduler.js +26 -1
  85. package/dist/models/scheduler.js.map +1 -1
  86. package/dist/models/table.d.ts +1 -1
  87. package/dist/models/table.d.ts.map +1 -1
  88. package/dist/models/table.js +52 -24
  89. package/dist/models/table.js.map +1 -1
  90. package/dist/models/tag.d.ts.map +1 -1
  91. package/dist/models/tag.js +3 -0
  92. package/dist/models/tag.js.map +1 -1
  93. package/dist/models/trigger.d.ts +17 -0
  94. package/dist/models/trigger.d.ts.map +1 -1
  95. package/dist/models/trigger.js +63 -1
  96. package/dist/models/trigger.js.map +1 -1
  97. package/dist/models/user.d.ts +1 -1
  98. package/dist/models/user.d.ts.map +1 -1
  99. package/dist/models/user.js +17 -6
  100. package/dist/models/user.js.map +1 -1
  101. package/dist/models/view.d.ts.map +1 -1
  102. package/dist/models/view.js +2 -1
  103. package/dist/models/view.js.map +1 -1
  104. package/dist/plugin-helper.d.ts +30 -2
  105. package/dist/plugin-helper.d.ts.map +1 -1
  106. package/dist/plugin-helper.js +96 -10
  107. package/dist/plugin-helper.js.map +1 -1
  108. package/dist/plugin-testing.d.ts.map +1 -1
  109. package/dist/plugin-testing.js +2 -0
  110. package/dist/plugin-testing.js.map +1 -1
  111. package/dist/tests/actions.test.js +66 -1
  112. package/dist/tests/actions.test.js.map +1 -1
  113. package/dist/tests/auth.test.js +6 -2
  114. package/dist/tests/auth.test.js.map +1 -1
  115. package/dist/tests/auxtest.test.js +76 -2
  116. package/dist/tests/auxtest.test.js.map +1 -1
  117. package/dist/tests/calc.test.js +26 -1
  118. package/dist/tests/calc.test.js.map +1 -1
  119. package/dist/tests/exact_views.test.js +19 -19
  120. package/dist/tests/exact_views.test.js.map +1 -1
  121. package/dist/tests/field.test.js +9 -0
  122. package/dist/tests/field.test.js.map +1 -1
  123. package/dist/tests/file.test.js +25 -0
  124. package/dist/tests/file.test.js.map +1 -1
  125. package/dist/tests/filter.test.js +58 -0
  126. package/dist/tests/filter.test.js.map +1 -1
  127. package/dist/tests/list.test.js +80 -1
  128. package/dist/tests/list.test.js.map +1 -1
  129. package/dist/tests/mocks.d.ts +13 -0
  130. package/dist/tests/mocks.d.ts.map +1 -1
  131. package/dist/tests/mocks.js +8 -0
  132. package/dist/tests/mocks.js.map +1 -1
  133. package/dist/tests/show.test.js +237 -3
  134. package/dist/tests/show.test.js.map +1 -1
  135. package/dist/tests/table.test.js +82 -18
  136. package/dist/tests/table.test.js.map +1 -1
  137. package/dist/tests/table_history.test.js +28 -0
  138. package/dist/tests/table_history.test.js.map +1 -1
  139. package/dist/tests/view.test.js +19 -0
  140. package/dist/tests/view.test.js.map +1 -1
  141. package/dist/utils.d.ts +2 -0
  142. package/dist/utils.d.ts.map +1 -1
  143. package/dist/utils.js +32 -3
  144. package/dist/utils.js.map +1 -1
  145. package/package.json +8 -8
  146. package/webpack.config.js +4 -0
@@ -28,6 +28,7 @@ export namespace blocks {
28
28
  input_type: string;
29
29
  }[];
30
30
  export { run_code as run };
31
+ export const namespace: string;
31
32
  }
32
33
  export namespace emit_event {
33
34
  const description_1: string;
@@ -40,7 +41,11 @@ export namespace emit_event {
40
41
  options: string[];
41
42
  type?: undefined;
42
43
  fieldview?: undefined;
43
- sublabel?: undefined;
44
+ sublabel?: undefined; /**
45
+ * @namespace
46
+ * @category saltcorn-data
47
+ * @subcategory actions
48
+ */
44
49
  } | {
45
50
  name: string;
46
51
  label: string;
@@ -49,7 +54,11 @@ export namespace emit_event {
49
54
  required?: undefined;
50
55
  input_type?: undefined;
51
56
  options?: undefined;
52
- sublabel?: undefined;
57
+ sublabel?: undefined; /**
58
+ * @namespace
59
+ * @category saltcorn-data
60
+ * @subcategory actions
61
+ */
53
62
  } | {
54
63
  name: string;
55
64
  label: string;
@@ -66,6 +75,8 @@ export namespace emit_event {
66
75
  configuration: object;
67
76
  user: object;
68
77
  }): Promise<void>;
78
+ const namespace_1: string;
79
+ export { namespace_1 as namespace };
69
80
  }
70
81
  export namespace webhook {
71
82
  const description_2: string;
@@ -108,6 +119,8 @@ export namespace find_or_create_dm_room {
108
119
  user: object;
109
120
  }): Promise<object>;
110
121
  export { run_2 as run };
122
+ const namespace_2: string;
123
+ export { namespace_2 as namespace };
111
124
  }
112
125
  export namespace send_email {
113
126
  const description_4: string;
@@ -123,7 +136,11 @@ export namespace send_email {
123
136
  options: string[];
124
137
  };
125
138
  showIf?: undefined;
126
- sublabel?: undefined;
139
+ sublabel?: undefined; /**
140
+ * @namespace
141
+ * @category saltcorn-data
142
+ * @subcategory actions
143
+ */
127
144
  input_type?: undefined;
128
145
  options?: undefined;
129
146
  class?: undefined;
@@ -140,7 +157,11 @@ export namespace send_email {
140
157
  body_type: string[];
141
158
  to_email?: undefined;
142
159
  };
143
- sublabel?: undefined;
160
+ sublabel?: undefined; /**
161
+ * @namespace
162
+ * @category saltcorn-data
163
+ * @subcategory actions
164
+ */
144
165
  input_type?: undefined;
145
166
  options?: undefined;
146
167
  class?: undefined;
@@ -233,7 +254,11 @@ export namespace send_email {
233
254
  required: boolean;
234
255
  attributes?: undefined;
235
256
  showIf?: undefined;
236
- sublabel?: undefined;
257
+ sublabel?: undefined; /**
258
+ * @namespace
259
+ * @category saltcorn-data
260
+ * @subcategory actions
261
+ */
237
262
  input_type?: undefined;
238
263
  options?: undefined;
239
264
  class?: undefined;
@@ -257,7 +282,11 @@ export namespace send_email {
257
282
  required?: undefined;
258
283
  attributes?: undefined;
259
284
  showIf?: undefined;
260
- sublabel?: undefined;
285
+ sublabel?: undefined; /**
286
+ * @namespace
287
+ * @category saltcorn-data
288
+ * @subcategory actions
289
+ */
261
290
  input_type?: undefined;
262
291
  options?: undefined;
263
292
  class?: undefined;
@@ -286,6 +315,8 @@ export namespace send_email {
286
315
  user: object;
287
316
  }): Promise<object>;
288
317
  export { run_3 as run };
318
+ const namespace_3: string;
319
+ export { namespace_3 as namespace };
289
320
  }
290
321
  export namespace insert_joined_row {
291
322
  const description_5: string;
@@ -309,6 +340,8 @@ export namespace insert_joined_row {
309
340
  user: object;
310
341
  }): Promise<object>;
311
342
  export { run_4 as run };
343
+ const namespace_4: string;
344
+ export { namespace_4 as namespace };
312
345
  }
313
346
  export namespace duplicate_row {
314
347
  const description_6: string;
@@ -323,6 +356,8 @@ export namespace duplicate_row {
323
356
  user: any;
324
357
  }): Promise<object>;
325
358
  export { run_5 as run };
359
+ const namespace_5: string;
360
+ export { namespace_5 as namespace };
326
361
  }
327
362
  export namespace recalculate_stored_fields {
328
363
  const description_7: string;
@@ -347,7 +382,11 @@ export namespace recalculate_stored_fields {
347
382
  } | {
348
383
  table?: undefined;
349
384
  };
350
- sublabel?: undefined;
385
+ sublabel?: undefined; /**
386
+ * @namespace
387
+ * @category saltcorn-data
388
+ * @subcategory actions
389
+ */
351
390
  input_type?: undefined;
352
391
  options?: undefined;
353
392
  class?: undefined;
@@ -366,6 +405,8 @@ export namespace recalculate_stored_fields {
366
405
  configuration: object;
367
406
  }): Promise<void>;
368
407
  export { run_6 as run };
408
+ const namespace_6: string;
409
+ export { namespace_6 as namespace };
369
410
  }
370
411
  export namespace insert_any_row {
371
412
  const description_8: string;
@@ -398,6 +439,8 @@ export namespace insert_any_row {
398
439
  rest?: any;
399
440
  }): Promise<boolean | object>;
400
441
  export { run_7 as run };
442
+ const namespace_7: string;
443
+ export { namespace_7 as namespace };
401
444
  }
402
445
  export namespace modify_row {
403
446
  const description_9: string;
@@ -425,7 +468,11 @@ export namespace modify_row {
425
468
  options: string[];
426
469
  mode?: undefined;
427
470
  };
428
- sublabel?: undefined;
471
+ sublabel?: undefined; /**
472
+ * @namespace
473
+ * @category saltcorn-data
474
+ * @subcategory actions
475
+ */
429
476
  input_type?: undefined;
430
477
  })[]>;
431
478
  export { configFields_9 as configFields };
@@ -442,6 +489,8 @@ export namespace modify_row {
442
489
  user: any;
443
490
  }): Promise<any>;
444
491
  export { run_8 as run };
492
+ const namespace_8: string;
493
+ export { namespace_8 as namespace };
445
494
  }
446
495
  export namespace delete_rows {
447
496
  const description_10: string;
@@ -453,7 +502,11 @@ export namespace delete_rows {
453
502
  name: string;
454
503
  label: string;
455
504
  type: string;
456
- sublabel?: undefined;
505
+ sublabel?: undefined; /**
506
+ * @namespace
507
+ * @category saltcorn-data
508
+ * @subcategory actions
509
+ */
457
510
  input_type?: undefined;
458
511
  showIf?: undefined;
459
512
  options?: undefined;
@@ -497,6 +550,8 @@ export namespace delete_rows {
497
550
  user: any;
498
551
  }): Promise<void>;
499
552
  export { run_9 as run };
553
+ const namespace_9: string;
554
+ export { namespace_9 as namespace };
500
555
  }
501
556
  export namespace navigate {
502
557
  const description_11: string;
@@ -551,6 +606,8 @@ export namespace navigate {
551
606
  eval_js?: undefined;
552
607
  } | undefined>;
553
608
  export { run_10 as run };
609
+ const namespace_10: string;
610
+ export { namespace_10 as namespace };
554
611
  }
555
612
  export namespace step_control_flow {
556
613
  const description_12: string;
@@ -596,6 +653,8 @@ export namespace step_control_flow {
596
653
  goto_step?: undefined;
597
654
  } | undefined>;
598
655
  export { run_11 as run };
656
+ const namespace_11: string;
657
+ export { namespace_11 as namespace };
599
658
  }
600
659
  export namespace form_action {
601
660
  const description_13: string;
@@ -612,9 +671,10 @@ export namespace form_action {
612
671
  };
613
672
  }[];
614
673
  export { configFields_13 as configFields };
615
- export function run_12({ row, table, configuration: { form_action } }: {
674
+ export function run_12({ row, table, user, configuration: { form_action } }: {
616
675
  row: any;
617
676
  table: any;
677
+ user: any;
618
678
  configuration: {
619
679
  form_action: any;
620
680
  };
@@ -628,6 +688,8 @@ export namespace form_action {
628
688
  eval_js?: undefined;
629
689
  }>;
630
690
  export { run_12 as run };
691
+ const namespace_12: string;
692
+ export { namespace_12 as namespace };
631
693
  }
632
694
  export namespace toast {
633
695
  const description_14: string;
@@ -670,6 +732,8 @@ export namespace toast {
670
732
  notify_success?: undefined;
671
733
  }>;
672
734
  export { run_13 as run };
735
+ const namespace_13: string;
736
+ export { namespace_13 as namespace };
673
737
  }
674
738
  export namespace run_js_code {
675
739
  const description_15: string;
@@ -688,7 +752,11 @@ export namespace run_js_code {
688
752
  };
689
753
  class: string;
690
754
  validator(s: any): any;
691
- sublabel?: undefined;
755
+ sublabel?: undefined; /**
756
+ * @namespace
757
+ * @category saltcorn-data
758
+ * @subcategory actions
759
+ */
692
760
  help?: undefined;
693
761
  showIf?: undefined;
694
762
  options?: undefined;
@@ -713,12 +781,18 @@ export namespace run_js_code {
713
781
  options: string[];
714
782
  attributes?: undefined;
715
783
  class?: undefined;
716
- sublabel?: undefined;
784
+ sublabel?: undefined; /**
785
+ * @namespace
786
+ * @category saltcorn-data
787
+ * @subcategory actions
788
+ */
717
789
  help?: undefined;
718
790
  showIf?: undefined;
719
791
  })[]>;
720
792
  export { configFields_15 as configFields };
721
793
  export { run_code as run };
794
+ const namespace_14: string;
795
+ export { namespace_14 as namespace };
722
796
  }
723
797
  export namespace run_js_code_in_field {
724
798
  const description_16: string;
@@ -741,7 +815,11 @@ export namespace run_js_code_in_field {
741
815
  label: string;
742
816
  input_type: string;
743
817
  options: string[];
744
- sublabel?: undefined;
818
+ sublabel?: undefined; /**
819
+ * @namespace
820
+ * @category saltcorn-data
821
+ * @subcategory actions
822
+ */
745
823
  type?: undefined;
746
824
  required?: undefined;
747
825
  attributes?: undefined;
@@ -751,6 +829,8 @@ export namespace run_js_code_in_field {
751
829
  export { requireRow_5 as requireRow };
752
830
  const run_14: base;
753
831
  export { run_14 as run };
832
+ const namespace_15: string;
833
+ export { namespace_15 as namespace };
754
834
  }
755
835
  export namespace duplicate_row_prefill_edit {
756
836
  export function configFields_17({ table }: {
@@ -771,6 +851,8 @@ export namespace duplicate_row_prefill_edit {
771
851
  goto: string;
772
852
  }>;
773
853
  export { run_15 as run };
854
+ const namespace_16: string;
855
+ export { namespace_16 as namespace };
774
856
  }
775
857
  export namespace set_user_language {
776
858
  const description_17: string;
@@ -800,6 +882,8 @@ export namespace set_user_language {
800
882
  reload_page: boolean;
801
883
  }>;
802
884
  export { run_16 as run };
885
+ const namespace_17: string;
886
+ export { namespace_17 as namespace };
803
887
  }
804
888
  export namespace sync_table_from_external {
805
889
  const description_18: string;
@@ -867,6 +951,8 @@ export namespace sync_table_from_external {
867
951
  rest: any;
868
952
  }): Promise<boolean | object>;
869
953
  export { run_17 as run };
954
+ const namespace_18: string;
955
+ export { namespace_18 as namespace };
870
956
  }
871
957
  export namespace reload_embedded_view {
872
958
  const description_19: string;
@@ -880,7 +966,11 @@ export namespace reload_embedded_view {
880
966
  attributes: {
881
967
  options: any[];
882
968
  };
883
- sublabel?: undefined;
969
+ sublabel?: undefined; /**
970
+ * @namespace
971
+ * @category saltcorn-data
972
+ * @subcategory actions
973
+ */
884
974
  } | {
885
975
  name: string;
886
976
  label: string;
@@ -888,7 +978,11 @@ export namespace reload_embedded_view {
888
978
  class: string;
889
979
  required?: undefined;
890
980
  attributes?: undefined;
891
- sublabel?: undefined;
981
+ sublabel?: undefined; /**
982
+ * @namespace
983
+ * @category saltcorn-data
984
+ * @subcategory actions
985
+ */
892
986
  } | {
893
987
  name: string;
894
988
  label: string;
@@ -911,6 +1005,8 @@ export namespace reload_embedded_view {
911
1005
  eval_js: string;
912
1006
  }>;
913
1007
  export { run_18 as run };
1008
+ const namespace_19: string;
1009
+ export { namespace_19 as namespace };
914
1010
  }
915
1011
  export namespace sleep {
916
1012
  const description_20: string;
@@ -930,6 +1026,8 @@ export namespace sleep {
930
1026
  eval_js: string;
931
1027
  }>;
932
1028
  export { run_19 as run };
1029
+ const namespace_20: string;
1030
+ export { namespace_20 as namespace };
933
1031
  }
934
1032
  export namespace notify_user {
935
1033
  const description_21: string;
@@ -952,6 +1050,8 @@ export namespace notify_user {
952
1050
  user: object;
953
1051
  }): Promise<void>;
954
1052
  export { run_20 as run };
1053
+ const namespace_21: string;
1054
+ export { namespace_21 as namespace };
955
1055
  }
956
1056
  export namespace convert_session_to_user {
957
1057
  const description_22: string;
@@ -988,6 +1088,8 @@ export namespace convert_session_to_user {
988
1088
  user: any;
989
1089
  }): Promise<void>;
990
1090
  export { run_21 as run };
1091
+ const namespace_22: string;
1092
+ export { namespace_22 as namespace };
991
1093
  }
992
1094
  export namespace install_progressive_web_app {
993
1095
  const description_23: string;
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../base-plugin/actions.js"],"names":[],"mappings":"AA4EA;;;;;;;;;GASG;AACH;;;;;;;;;;iBAyFC;;;;;;;;;;;;;;IAuCiB;;;;;;;;;;;;;;;;;;;;;;;;;;;SAqBb;;IAQI;;;;sBAWJ;;;;;;;;;;;;;;;;;;;IA+BI;;;wBAQJ;;;;;;IAca;;;;;;SAeb;;IAUI;;;;;wBA0CJ;;;;;;IAea;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA+Ib;;;IAUI;;;;;wBA2IJ;;;;;;IAea;;;;;;;;SAYb;;;;IAUI;;;;;wBAsBJ;;;;;;IAaa,0CAAQ;;;;IASjB;;;;wBAKJ;;;;;;IAgBa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAwBb;;IAMI;;sBAwBJ;;;;;;IAea;;;;;;;;;;;;;;;;;;UAmBb;;IAUI;;;;;;kCAiBJ;;;;;;IAca;;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;;;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"}
@@ -159,6 +159,7 @@ module.exports = {
159
159
  * @see base-plugin/actions~run_code
160
160
  */
161
161
  run: run_code,
162
+ namespace: "Code",
162
163
  },
163
164
  /**
164
165
  * @namespace
@@ -202,6 +203,7 @@ module.exports = {
202
203
  run: async ({ row, configuration: { eventType, channel, payload }, user, }) => {
203
204
  return await Trigger.emitEvent(eventType, channel, user, payload ? JSON.parse(payload) : row);
204
205
  },
206
+ namespace: "Control",
205
207
  },
206
208
  /**
207
209
  * @namespace
@@ -301,6 +303,7 @@ module.exports = {
301
303
  return { goto: `/view/${viewname}?id=${room_id}` };
302
304
  }
303
305
  },
306
+ namespace: "Communication",
304
307
  },
305
308
  /**
306
309
  * @namespace
@@ -546,6 +549,7 @@ module.exports = {
546
549
  }
547
550
  }
548
551
  },
552
+ namespace: "Communication",
549
553
  },
550
554
  /**
551
555
  * @namespace
@@ -600,6 +604,7 @@ module.exports = {
600
604
  }
601
605
  return await joinTable.insertRow(newRow, user);
602
606
  },
607
+ namespace: "Database",
603
608
  },
604
609
  /**
605
610
  * @namespace
@@ -626,6 +631,7 @@ module.exports = {
626
631
  delete newRow[table.pk_name];
627
632
  await table.insertRow(newRow, user);
628
633
  },
634
+ namespace: "Database",
629
635
  },
630
636
  /**
631
637
  * @namespace
@@ -689,6 +695,7 @@ module.exports = {
689
695
  else
690
696
  return { error: "recalculate_stored_fields: table not found" };
691
697
  },
698
+ namespace: "Database",
692
699
  },
693
700
  /**
694
701
  * @namespace
@@ -746,6 +753,7 @@ module.exports = {
746
753
  else
747
754
  return true;
748
755
  },
756
+ namespace: "Database",
749
757
  },
750
758
  /**
751
759
  * @namespace
@@ -802,6 +810,7 @@ module.exports = {
802
810
  else
803
811
  return;
804
812
  },
813
+ namespace: "Database",
805
814
  },
806
815
  delete_rows: {
807
816
  /**
@@ -849,6 +858,7 @@ module.exports = {
849
858
  await tbl.deleteRows(where, user);
850
859
  return;
851
860
  },
861
+ namespace: "Database",
852
862
  },
853
863
  /**
854
864
  * @namespace
@@ -906,6 +916,7 @@ module.exports = {
906
916
  break;
907
917
  }
908
918
  },
919
+ namespace: "User interface",
909
920
  },
910
921
  step_control_flow: {
911
922
  /**
@@ -944,6 +955,7 @@ module.exports = {
944
955
  break;
945
956
  }
946
957
  },
958
+ namespace: "Control",
947
959
  },
948
960
  form_action: {
949
961
  /**
@@ -970,7 +982,7 @@ module.exports = {
970
982
  },
971
983
  },
972
984
  ],
973
- run: async ({ row, table, configuration: { form_action } }) => {
985
+ run: async ({ row, table, user, configuration: { form_action } }) => {
974
986
  const jqGet = `$('form[data-viewname="'+viewname+'"]')`;
975
987
  switch (form_action) {
976
988
  case "Submit":
@@ -978,7 +990,7 @@ module.exports = {
978
990
  case "Save":
979
991
  if (!row[table.pk_name]) {
980
992
  //we will save server side so we can set id
981
- const result = await table.tryInsertRow(row);
993
+ const result = await table.tryInsertRow(row, user);
982
994
  if (result.success)
983
995
  return { set_fields: { [table.pk_name]: result.success } };
984
996
  else {
@@ -997,6 +1009,7 @@ module.exports = {
997
1009
  return { eval_js: jqGet + ".submit()" };
998
1010
  }
999
1011
  },
1012
+ namespace: "User interface",
1000
1013
  },
1001
1014
  toast: {
1002
1015
  /**
@@ -1034,6 +1047,7 @@ module.exports = {
1034
1047
  return { notify: text1 };
1035
1048
  }
1036
1049
  },
1050
+ namespace: "User interface",
1037
1051
  },
1038
1052
  /**
1039
1053
  * @namespace
@@ -1124,6 +1138,7 @@ module.exports = {
1124
1138
  * @see base-plugin/actions~run_code
1125
1139
  **/
1126
1140
  run: run_code,
1141
+ namespace: "Code",
1127
1142
  },
1128
1143
  run_js_code_in_field: {
1129
1144
  /**
@@ -1195,6 +1210,7 @@ module.exports = {
1195
1210
  configuration: { run_where, code },
1196
1211
  });
1197
1212
  },
1213
+ namespace: "Code",
1198
1214
  },
1199
1215
  duplicate_row_prefill_edit: {
1200
1216
  configFields: async ({ table }) => {
@@ -1226,6 +1242,7 @@ module.exports = {
1226
1242
  .join("&");
1227
1243
  return { goto: `/view/${viewname}?${qs}` };
1228
1244
  },
1245
+ namespace: "User interface",
1229
1246
  },
1230
1247
  /**
1231
1248
  * @namespace
@@ -1266,6 +1283,7 @@ module.exports = {
1266
1283
  }
1267
1284
  return { reload_page: true };
1268
1285
  },
1286
+ namespace: "User interface",
1269
1287
  },
1270
1288
  /**
1271
1289
  * @namespace
@@ -1403,6 +1421,7 @@ module.exports = {
1403
1421
  await table_for_insert.updateRow(newRow, existingRow[table_for_insert.pk_name], user);
1404
1422
  }
1405
1423
  },
1424
+ namespace: "Database",
1406
1425
  },
1407
1426
  reload_embedded_view: {
1408
1427
  description: "Reload an embedded view without full page reload",
@@ -1442,6 +1461,7 @@ module.exports = {
1442
1461
  eval_js = `setInterval(()=>{${eval_js}}, ${interval})`;
1443
1462
  return { eval_js };
1444
1463
  },
1464
+ namespace: "User interface",
1445
1465
  },
1446
1466
  sleep: {
1447
1467
  description: "Delay for a set number of seconds",
@@ -1458,6 +1478,7 @@ module.exports = {
1458
1478
  eval_js: `return new Promise((resolve) => setTimeout(resolve, ${(seconds || 0) * 1000}));`,
1459
1479
  };
1460
1480
  },
1481
+ namespace: "Control",
1461
1482
  },
1462
1483
  notify_user: {
1463
1484
  description: "Send a notification to a specific user",
@@ -1513,6 +1534,7 @@ module.exports = {
1513
1534
  });
1514
1535
  }
1515
1536
  },
1537
+ namespace: "Communication",
1516
1538
  },
1517
1539
  convert_session_to_user: {
1518
1540
  description: "Convert session id fields to user key fields on a table on Login events",
@@ -1571,6 +1593,7 @@ module.exports = {
1571
1593
  await table.updateRow({ [user_field]: user.id }, dbrow[table.pk_name]);
1572
1594
  }
1573
1595
  },
1596
+ namespace: "Database",
1574
1597
  },
1575
1598
  install_progressive_web_app: {
1576
1599
  description: "Install a Progressive Web Application",