@saltcorn/data 0.9.6-beta.8 → 0.9.6-beta.9
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.
- package/dist/base-plugin/index.d.ts +187 -88
- package/dist/base-plugin/index.d.ts.map +1 -1
- package/dist/base-plugin/types.d.ts +156 -93
- package/dist/base-plugin/types.d.ts.map +1 -1
- package/dist/base-plugin/types.js +150 -0
- package/dist/base-plugin/types.js.map +1 -1
- package/dist/models/field.d.ts.map +1 -1
- package/dist/models/field.js +6 -2
- package/dist/models/field.js.map +1 -1
- package/package.json +8 -8
|
@@ -455,6 +455,59 @@ export const types: ({
|
|
|
455
455
|
blockDisplay: boolean;
|
|
456
456
|
run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
|
|
457
457
|
};
|
|
458
|
+
to_locale_string: {
|
|
459
|
+
description: string;
|
|
460
|
+
configFields: (field: any) => ({
|
|
461
|
+
type: string;
|
|
462
|
+
name: string;
|
|
463
|
+
label: string;
|
|
464
|
+
sublabel: string;
|
|
465
|
+
required?: undefined;
|
|
466
|
+
attributes?: undefined;
|
|
467
|
+
showIf?: undefined;
|
|
468
|
+
} | {
|
|
469
|
+
type: string;
|
|
470
|
+
name: string;
|
|
471
|
+
label: string;
|
|
472
|
+
required: boolean;
|
|
473
|
+
attributes: {
|
|
474
|
+
options: string[];
|
|
475
|
+
};
|
|
476
|
+
sublabel?: undefined;
|
|
477
|
+
showIf?: undefined;
|
|
478
|
+
} | {
|
|
479
|
+
type: string;
|
|
480
|
+
name: string;
|
|
481
|
+
label: string;
|
|
482
|
+
sublabel: string;
|
|
483
|
+
required: boolean;
|
|
484
|
+
showIf: {
|
|
485
|
+
style: string;
|
|
486
|
+
};
|
|
487
|
+
attributes?: undefined;
|
|
488
|
+
} | {
|
|
489
|
+
type: string;
|
|
490
|
+
name: string;
|
|
491
|
+
label: string;
|
|
492
|
+
required: boolean;
|
|
493
|
+
showIf: {
|
|
494
|
+
style: string;
|
|
495
|
+
};
|
|
496
|
+
attributes: {
|
|
497
|
+
options: string[];
|
|
498
|
+
};
|
|
499
|
+
sublabel?: undefined;
|
|
500
|
+
})[];
|
|
501
|
+
isEdit: boolean;
|
|
502
|
+
run: (v: any, req: any, attrs?: {}) => string;
|
|
503
|
+
};
|
|
504
|
+
role_select: {
|
|
505
|
+
isEdit: boolean;
|
|
506
|
+
blockDisplay: boolean;
|
|
507
|
+
description: string;
|
|
508
|
+
fill_options: (field: any) => Promise<void>;
|
|
509
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
510
|
+
};
|
|
458
511
|
};
|
|
459
512
|
attributes: object[];
|
|
460
513
|
validate_attributes: ({ min, max }: object) => boolean;
|
|
@@ -664,6 +717,52 @@ export const types: ({
|
|
|
664
717
|
blockDisplay: boolean;
|
|
665
718
|
run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
|
|
666
719
|
};
|
|
720
|
+
to_locale_string: {
|
|
721
|
+
description: string;
|
|
722
|
+
configFields: (field: any) => ({
|
|
723
|
+
type: string;
|
|
724
|
+
name: string;
|
|
725
|
+
label: string;
|
|
726
|
+
sublabel: string;
|
|
727
|
+
required?: undefined;
|
|
728
|
+
attributes?: undefined;
|
|
729
|
+
showIf?: undefined;
|
|
730
|
+
} | {
|
|
731
|
+
type: string;
|
|
732
|
+
name: string;
|
|
733
|
+
label: string;
|
|
734
|
+
required: boolean;
|
|
735
|
+
attributes: {
|
|
736
|
+
options: string[];
|
|
737
|
+
};
|
|
738
|
+
sublabel?: undefined;
|
|
739
|
+
showIf?: undefined;
|
|
740
|
+
} | {
|
|
741
|
+
type: string;
|
|
742
|
+
name: string;
|
|
743
|
+
label: string;
|
|
744
|
+
sublabel: string;
|
|
745
|
+
required: boolean;
|
|
746
|
+
showIf: {
|
|
747
|
+
style: string;
|
|
748
|
+
};
|
|
749
|
+
attributes?: undefined;
|
|
750
|
+
} | {
|
|
751
|
+
type: string;
|
|
752
|
+
name: string;
|
|
753
|
+
label: string;
|
|
754
|
+
required: boolean;
|
|
755
|
+
showIf: {
|
|
756
|
+
style: string;
|
|
757
|
+
};
|
|
758
|
+
attributes: {
|
|
759
|
+
options: string[];
|
|
760
|
+
};
|
|
761
|
+
sublabel?: undefined;
|
|
762
|
+
})[];
|
|
763
|
+
isEdit: boolean;
|
|
764
|
+
run: (v: any, req: any, attrs?: {}) => string;
|
|
765
|
+
};
|
|
667
766
|
show_with_html: {
|
|
668
767
|
configFields: {
|
|
669
768
|
input_type: string;
|
|
@@ -834,45 +933,64 @@ export const types: ({
|
|
|
834
933
|
export const viewtemplates: ({
|
|
835
934
|
name: string;
|
|
836
935
|
description: string;
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
936
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
937
|
+
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, }: {
|
|
840
938
|
columns: object[];
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
939
|
+
view_to_create?: string | undefined;
|
|
940
|
+
create_view_display: string;
|
|
941
|
+
create_view_label?: string | undefined;
|
|
942
|
+
default_state?: object | undefined;
|
|
943
|
+
create_view_location?: string | undefined;
|
|
944
|
+
}, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
|
|
945
|
+
listQuery: any;
|
|
946
|
+
}) => Promise<any>;
|
|
947
|
+
view_quantity: string;
|
|
948
|
+
get_state_fields: (table_id: string, viewname: any, { columns }: {
|
|
949
|
+
columns: object[];
|
|
950
|
+
}) => Function;
|
|
951
|
+
initial_config: Function;
|
|
952
|
+
on_delete: (table_id: any, viewname: string, { default_state }: {
|
|
953
|
+
default_state: any;
|
|
954
|
+
}) => Promise<void>;
|
|
850
955
|
routes: {
|
|
851
|
-
run_action: (table_id:
|
|
852
|
-
|
|
956
|
+
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
957
|
+
columns: object[];
|
|
958
|
+
layout: any;
|
|
959
|
+
}, body: object, { req, res }: {
|
|
960
|
+
req: object;
|
|
853
961
|
res: any;
|
|
854
|
-
}, {
|
|
855
|
-
|
|
856
|
-
}) => Promise<
|
|
962
|
+
}, { getRowQuery }: {
|
|
963
|
+
getRowQuery: any;
|
|
964
|
+
}) => Promise<object>;
|
|
857
965
|
};
|
|
858
|
-
|
|
966
|
+
display_state_form: (opts: object) => boolean;
|
|
967
|
+
default_state_form: ({ default_state }: object) => boolean;
|
|
968
|
+
getStringsForI18n({ columns, create_view_label }: {
|
|
969
|
+
columns: any;
|
|
970
|
+
create_view_label: any;
|
|
971
|
+
}): string[];
|
|
972
|
+
queries: ({ table_id, exttable_name, name, configuration: { columns, layout, default_state }, req, }: {
|
|
859
973
|
table_id: any;
|
|
860
|
-
|
|
974
|
+
exttable_name: any;
|
|
975
|
+
name: any;
|
|
861
976
|
configuration: {
|
|
862
977
|
columns: any;
|
|
978
|
+
layout: any;
|
|
979
|
+
default_state: any;
|
|
863
980
|
};
|
|
864
981
|
req: any;
|
|
865
|
-
res: any;
|
|
866
|
-
exttable_name: any;
|
|
867
982
|
}) => {
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
distinctValuesQuery(state: any): Promise<{
|
|
872
|
-
distinct_values: {};
|
|
873
|
-
role: any;
|
|
983
|
+
listQuery(state: any, stateHash: any): Promise<{
|
|
984
|
+
rows: import("@saltcorn/db-common/internal").Row[];
|
|
985
|
+
rowCount: number;
|
|
874
986
|
}>;
|
|
987
|
+
getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
875
988
|
};
|
|
989
|
+
configCheck: (view: any) => Promise<{
|
|
990
|
+
errors: string[];
|
|
991
|
+
warnings: string[];
|
|
992
|
+
}>;
|
|
993
|
+
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
876
994
|
} | {
|
|
877
995
|
name: string;
|
|
878
996
|
description: string;
|
|
@@ -1030,67 +1148,6 @@ export const viewtemplates: ({
|
|
|
1030
1148
|
warnings: string[];
|
|
1031
1149
|
}>;
|
|
1032
1150
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1033
|
-
} | {
|
|
1034
|
-
name: string;
|
|
1035
|
-
description: string;
|
|
1036
|
-
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1037
|
-
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, }: {
|
|
1038
|
-
columns: object[];
|
|
1039
|
-
view_to_create?: string | undefined;
|
|
1040
|
-
create_view_display: string;
|
|
1041
|
-
create_view_label?: string | undefined;
|
|
1042
|
-
default_state?: object | undefined;
|
|
1043
|
-
create_view_location?: string | undefined;
|
|
1044
|
-
}, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
|
|
1045
|
-
listQuery: any;
|
|
1046
|
-
}) => Promise<any>;
|
|
1047
|
-
view_quantity: string;
|
|
1048
|
-
get_state_fields: (table_id: string, viewname: any, { columns }: {
|
|
1049
|
-
columns: object[];
|
|
1050
|
-
}) => Function;
|
|
1051
|
-
initial_config: Function;
|
|
1052
|
-
on_delete: (table_id: any, viewname: string, { default_state }: {
|
|
1053
|
-
default_state: any;
|
|
1054
|
-
}) => Promise<void>;
|
|
1055
|
-
routes: {
|
|
1056
|
-
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1057
|
-
columns: object[];
|
|
1058
|
-
layout: any;
|
|
1059
|
-
}, body: object, { req, res }: {
|
|
1060
|
-
req: object;
|
|
1061
|
-
res: any;
|
|
1062
|
-
}, { getRowQuery }: {
|
|
1063
|
-
getRowQuery: any;
|
|
1064
|
-
}) => Promise<object>;
|
|
1065
|
-
};
|
|
1066
|
-
display_state_form: (opts: object) => boolean;
|
|
1067
|
-
default_state_form: ({ default_state }: object) => boolean;
|
|
1068
|
-
getStringsForI18n({ columns, create_view_label }: {
|
|
1069
|
-
columns: any;
|
|
1070
|
-
create_view_label: any;
|
|
1071
|
-
}): string[];
|
|
1072
|
-
queries: ({ table_id, exttable_name, name, configuration: { columns, layout, default_state }, req, }: {
|
|
1073
|
-
table_id: any;
|
|
1074
|
-
exttable_name: any;
|
|
1075
|
-
name: any;
|
|
1076
|
-
configuration: {
|
|
1077
|
-
columns: any;
|
|
1078
|
-
layout: any;
|
|
1079
|
-
default_state: any;
|
|
1080
|
-
};
|
|
1081
|
-
req: any;
|
|
1082
|
-
}) => {
|
|
1083
|
-
listQuery(state: any, stateHash: any): Promise<{
|
|
1084
|
-
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1085
|
-
rowCount: number;
|
|
1086
|
-
}>;
|
|
1087
|
-
getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1088
|
-
};
|
|
1089
|
-
configCheck: (view: any) => Promise<{
|
|
1090
|
-
errors: string[];
|
|
1091
|
-
warnings: string[];
|
|
1092
|
-
}>;
|
|
1093
|
-
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1094
1151
|
} | {
|
|
1095
1152
|
name: string;
|
|
1096
1153
|
description: string;
|
|
@@ -1242,6 +1299,48 @@ export const viewtemplates: ({
|
|
|
1242
1299
|
countRowsQuery(state: any): Promise<number>;
|
|
1243
1300
|
};
|
|
1244
1301
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1302
|
+
} | {
|
|
1303
|
+
name: string;
|
|
1304
|
+
description: string;
|
|
1305
|
+
get_state_fields: () => object[];
|
|
1306
|
+
configuration_workflow: () => import("../models/workflow");
|
|
1307
|
+
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
1308
|
+
columns: object[];
|
|
1309
|
+
layout: object;
|
|
1310
|
+
}, state: object, extra: object, { distinctValuesQuery }: {
|
|
1311
|
+
distinctValuesQuery: any;
|
|
1312
|
+
}) => Promise<Layout>;
|
|
1313
|
+
initial_config: () => Promise<object>;
|
|
1314
|
+
display_state_form: boolean;
|
|
1315
|
+
getStringsForI18n({ layout }: {
|
|
1316
|
+
layout: any;
|
|
1317
|
+
}): string[];
|
|
1318
|
+
routes: {
|
|
1319
|
+
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
1320
|
+
req: any;
|
|
1321
|
+
res: any;
|
|
1322
|
+
}, { actionQuery }: {
|
|
1323
|
+
actionQuery: any;
|
|
1324
|
+
}) => Promise<any>;
|
|
1325
|
+
};
|
|
1326
|
+
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
1327
|
+
table_id: any;
|
|
1328
|
+
viewname: any;
|
|
1329
|
+
configuration: {
|
|
1330
|
+
columns: any;
|
|
1331
|
+
};
|
|
1332
|
+
req: any;
|
|
1333
|
+
res: any;
|
|
1334
|
+
exttable_name: any;
|
|
1335
|
+
}) => {
|
|
1336
|
+
actionQuery(state: any, rndid: any): Promise<{
|
|
1337
|
+
json: any;
|
|
1338
|
+
}>;
|
|
1339
|
+
distinctValuesQuery(state: any): Promise<{
|
|
1340
|
+
distinct_values: {};
|
|
1341
|
+
role: any;
|
|
1342
|
+
}>;
|
|
1343
|
+
};
|
|
1245
1344
|
} | {
|
|
1246
1345
|
name: string;
|
|
1247
1346
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../base-plugin/index.js"],"names":[],"mappings":"AAuCA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../base-plugin/index.js"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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