@cccteam/ccc-lib 0.0.20 → 0.0.21

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.
@@ -20,6 +20,48 @@ interface PermissionScope {
20
20
  declare const ReadPermission: Permission;
21
21
  declare const UpdatePermission: Permission;
22
22
 
23
+ type ValidDisplayTypes = 'boolean' | 'nullboolean' | 'number' | 'string' | 'date' | 'enumerated' | 'link' | 'uuid' | 'civildate' | 'string[]' | 'customtypes.document';
24
+ type ValidRPCTypes = ValidDisplayTypes | `${Exclude<ValidDisplayTypes, 'string[]'>}[]`;
25
+ interface RPCFieldMeta {
26
+ fieldName: string;
27
+ displayType: ValidRPCTypes;
28
+ enumeratedResource?: Resource;
29
+ }
30
+ interface MethodMeta {
31
+ route: string;
32
+ fields: RPCFieldMeta[];
33
+ }
34
+ interface FieldMeta {
35
+ fieldName: string;
36
+ /** Indicates whether the field is required and only applies during resource creation.
37
+ * Use the validators config parameter in all other contexts
38
+ */
39
+ required: boolean;
40
+ primaryKey?: {
41
+ ordinalPosition: number;
42
+ };
43
+ displayType: ValidDisplayTypes;
44
+ enumeratedResource?: Resource;
45
+ isIndex: boolean;
46
+ }
47
+ interface ResourceMeta {
48
+ route: string;
49
+ consolidatedRoute?: string;
50
+ listDisabled?: boolean;
51
+ readDisabled?: boolean;
52
+ createDisabled?: boolean;
53
+ updateDisabled?: boolean;
54
+ deleteDisabled?: boolean;
55
+ substringSearchParameter?: string;
56
+ fields: FieldMeta[];
57
+ }
58
+ type Meta = MethodMeta | ResourceMeta;
59
+ declare namespace CustomTypes {
60
+ interface Document {
61
+ placeholder: string;
62
+ }
63
+ }
64
+
23
65
  declare const defaultEmptyFieldValue = "-";
24
66
  type NullBoolean = null | true | false;
25
67
  type ConcatFn = 'space-concat' | 'hyphen-concat' | 'space-hyphen-concat' | 'hyphen-space-concat';
@@ -32,6 +74,7 @@ type ResourceValidatorFn = ValidatorFn & {
32
74
  };
33
75
  declare function createResourceValidator(validator: ValidatorFn): ResourceValidatorFn;
34
76
 
77
+ type ResourceMap = Record<Resource, ResourceMeta>;
35
78
  interface FieldPointer {
36
79
  field: FieldName;
37
80
  }
@@ -860,48 +903,6 @@ interface NotificationMessage {
860
903
  level: AlertLevel;
861
904
  }
862
905
 
863
- type ValidDisplayTypes = 'boolean' | 'nullboolean' | 'number' | 'string' | 'date' | 'enumerated' | 'link' | 'uuid' | 'civildate' | 'string[]' | 'customtypes.document';
864
- type ValidRPCTypes = ValidDisplayTypes | `${Exclude<ValidDisplayTypes, 'string[]'>}[]`;
865
- interface RPCFieldMeta {
866
- fieldName: string;
867
- displayType: ValidRPCTypes;
868
- enumeratedResource?: Resource;
869
- }
870
- interface MethodMeta {
871
- route: string;
872
- fields: RPCFieldMeta[];
873
- }
874
- interface FieldMeta {
875
- fieldName: string;
876
- /** Indicates whether the field is required and only applies during resource creation.
877
- * Use the validators config parameter in all other contexts
878
- */
879
- required: boolean;
880
- primaryKey?: {
881
- ordinalPosition: number;
882
- };
883
- displayType: ValidDisplayTypes;
884
- enumeratedResource?: Resource;
885
- isIndex: boolean;
886
- }
887
- interface ResourceMeta {
888
- route: string;
889
- consolidatedRoute?: string;
890
- listDisabled?: boolean;
891
- readDisabled?: boolean;
892
- createDisabled?: boolean;
893
- updateDisabled?: boolean;
894
- deleteDisabled?: boolean;
895
- substringSearchParameter?: string;
896
- fields: FieldMeta[];
897
- }
898
- type Meta = MethodMeta | ResourceMeta;
899
- declare namespace CustomTypes {
900
- interface Document {
901
- placeholder: string;
902
- }
903
- }
904
-
905
906
  /**
906
907
  * Session Information for a logged in user
907
908
  */
@@ -943,4 +944,4 @@ declare const IDLE_WARNING_DURATION: InjectionToken<number>;
943
944
  declare const IDLE_KEEPALIVE_DURATION: InjectionToken<number>;
944
945
 
945
946
  export { API_URL, AVAILABLE_DOMAINS, AVAILABLE_PERMISSIONS, AlertLevel, BASE_URL, CustomConfigComponent, CustomTypes, FRONTEND_LOGIN_PATH, IDLE_KEEPALIVE_DURATION, IDLE_SESSION_DURATION, IDLE_WARNING_DURATION, METHOD_META, PERMISSION_REQUIRED, RESOURCE_META, ReadPermission, SESSION_PATH, UpdatePermission, actionButtonConfig, actionButtonConfigDefaults, additionalResourceConfig, additionalResourceConfigDefaults, arrayConfig, arrayConfigDefaults, componentConfig, componentConfigDefaults, computedDisplayField, computedDisplayFieldElementDefaults, createResourceValidator, defaultEmptyFieldValue, enumeratedConfig, enumeratedConfigDefaults, field, fieldElementDefaults, fieldSort, fieldSortDefaults, foreignKeyDefault, foreignKeyDefaultDefaults, listViewConfig, listViewConfigDefaults, multiColumnConfig, multiColumnConfigDefaults, nullBooleanConfig, nullBooleanConfigDefaults, padding, paddingElementDefaults, requiredIf, rootConfig, rootConfigDefaults, rpcConfig, rpcConfigDefaults, section, sectionElementDefaults, singleColumnConfig, singleColumnConfigDefaults, staticDefault, staticDefaultDefaults, switchParams, switchParamsDefaults, validatorsPresent, viewConfig, viewConfigDefaults };
946
- export type { ActionButtonConfig, ActionButtonConfigOptions, ActionType, AdditionalResourceConfig, AdditionalResourceConfigOptions, Affix, ArrayConfig, BaseConfig, BaseConfigOptions, ChildResourceConfig, ColSize, ColumnConfig, ComponentConfig, ComponentConfigOptions, ComputedDisplayFieldElement, ComputedDisplayFieldElementOptions, ConcatFn, ConfigElement, ConfigParam, ConfigType, CreateNotificationMessage, DataType, Domain, DomainPermissions, EnumeratedConfig, EnumeratedConfigOptions, FieldDefault, FieldElement, FieldElementOptions, FieldMeta, FieldName, FieldPointer, FieldSort, FieldSortOptions, ForeignKeyDefault, ForeignKeyDefaultOptions, FormatType, ListConcatFn, ListViewConfig, ListViewConfigOptions, MenuItem, Meta, Method, MethodMeta, MultiColumnConfig, MultiColumnConfigOptions, NotificationMessage, NullBoolean, NullBooleanConfig, NullBooleanConfigOptions, PaddingElement, PaddingElementOptions, ParentResourceConfig, Permission, PermissionScope, RPCBaseFormData, RPCConfig, RPCConfigOptions, RPCDataType, RPCFieldMeta, RPCPlacement, RPCRecordData, RecordData, Resource, ResourceMeta, ResourceValidatorFn, RootConfig, RootConfigOptions, RootRouteData, RouteResourceData, RpcMethod, SectionElement, SectionElementOptions, SessionInfo, SingleColumnConfig, SingleColumnConfigOptions, StaticDefault, SwitchConfigParam, SwitchConfigParamOptions, ValidDisplayTypes, ValidRPCTypes, ViewConfig, ViewConfigOptions, ViewType, arrayConfigOptions, staticDefaultOptions, switchCase };
947
+ export type { ActionButtonConfig, ActionButtonConfigOptions, ActionType, AdditionalResourceConfig, AdditionalResourceConfigOptions, Affix, ArrayConfig, BaseConfig, BaseConfigOptions, ChildResourceConfig, ColSize, ColumnConfig, ComponentConfig, ComponentConfigOptions, ComputedDisplayFieldElement, ComputedDisplayFieldElementOptions, ConcatFn, ConfigElement, ConfigParam, ConfigType, CreateNotificationMessage, DataType, Domain, DomainPermissions, EnumeratedConfig, EnumeratedConfigOptions, FieldDefault, FieldElement, FieldElementOptions, FieldMeta, FieldName, FieldPointer, FieldSort, FieldSortOptions, ForeignKeyDefault, ForeignKeyDefaultOptions, FormatType, ListConcatFn, ListViewConfig, ListViewConfigOptions, MenuItem, Meta, Method, MethodMeta, MultiColumnConfig, MultiColumnConfigOptions, NotificationMessage, NullBoolean, NullBooleanConfig, NullBooleanConfigOptions, PaddingElement, PaddingElementOptions, ParentResourceConfig, Permission, PermissionScope, RPCBaseFormData, RPCConfig, RPCConfigOptions, RPCDataType, RPCFieldMeta, RPCPlacement, RPCRecordData, RecordData, Resource, ResourceMap, ResourceMeta, ResourceValidatorFn, RootConfig, RootConfigOptions, RootRouteData, RouteResourceData, RpcMethod, SectionElement, SectionElementOptions, SessionInfo, SingleColumnConfig, SingleColumnConfigOptions, StaticDefault, SwitchConfigParam, SwitchConfigParamOptions, ValidDisplayTypes, ValidRPCTypes, ViewConfig, ViewConfigOptions, ViewType, arrayConfigOptions, staticDefaultOptions, switchCase };