@yomotech/view-toolkit 1.0.38 → 1.0.39
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/package.json
CHANGED
|
@@ -930,16 +930,10 @@ declare class ModelComponent implements OnChanges, OnDestroy {
|
|
|
930
930
|
private utilityService;
|
|
931
931
|
/** Marks for the app's test runner (#166): field key and button action. */
|
|
932
932
|
readonly vlFieldKey: typeof testFieldKey;
|
|
933
|
-
readonly vlAction: typeof testAction;
|
|
934
|
-
readonly vlWrites: typeof testWrites;
|
|
935
933
|
private readonly remoteLists;
|
|
936
|
-
/** Keep existing checkbox data objects usable; new objects use boolean. */
|
|
937
|
-
renderFieldType(type: string | undefined, field?: any): string | undefined;
|
|
938
934
|
/** Date and time picker behaviour shared by all containers. */
|
|
939
935
|
readonly picker: DateTimePickerService;
|
|
940
936
|
private readonly host;
|
|
941
|
-
/** The toolkit keyboard for a field, from option.keyboardType or the attribute type. */
|
|
942
|
-
keyboardTypeFor(formField: any): CustomKeyboardType | null;
|
|
943
937
|
matchData: any[];
|
|
944
938
|
date2: Date | undefined;
|
|
945
939
|
errorMessages: any;
|
|
@@ -957,8 +951,6 @@ declare class ModelComponent implements OnChanges, OnDestroy {
|
|
|
957
951
|
private initializeDialogContent;
|
|
958
952
|
private updateDialogHeader;
|
|
959
953
|
updateLayoutLanguage<T>(schema: T, translations: Record<string, string>): T;
|
|
960
|
-
getLabel(formField: any): any;
|
|
961
|
-
getButtonCaption(formField: any): any;
|
|
962
954
|
mapDataToPropertySchema(data: any, modalItemInfo: any): void;
|
|
963
955
|
setAutoCompleteData(): Promise<void>;
|
|
964
956
|
/** The field's backend list (RemoteListService - shared by every container). */
|
|
@@ -979,18 +971,20 @@ declare class ModelComponent implements OnChanges, OnDestroy {
|
|
|
979
971
|
autocompFocusOutEvent(event: any, formField: any): void;
|
|
980
972
|
autocompSelectEvent(obj: any, formField?: any): void;
|
|
981
973
|
setErroMessage(formField: any, errorMessages: any, errorType: any): string;
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
974
|
+
/** A style object of the layout: its classes (all of them) and its CSS. */
|
|
975
|
+
styleOf(styleObject: any): {
|
|
976
|
+
classes: string;
|
|
977
|
+
style: Record<string, any>;
|
|
985
978
|
};
|
|
979
|
+
/** The section is a 12 column grid, as in the Designer; the section's own style comes on top. */
|
|
986
980
|
getSectionBodyStyle(formSection: any): Record<string, any>;
|
|
981
|
+
/**
|
|
982
|
+
* The field's wrapper in the section grid: the field's whole style from the layout (the Designer's
|
|
983
|
+
* wrapper style), placed by gridColumn ("span N", else gridSpan) and never wider than its column.
|
|
984
|
+
*/
|
|
987
985
|
getFieldWrapperStyle(formField: any): Record<string, any>;
|
|
988
986
|
onTimePanelShow(formField: any): void;
|
|
989
|
-
getControlStyle(formField: any): Record<string, any>;
|
|
990
|
-
getFieldInnerLayoutStyle(formField: any): Record<string, any>;
|
|
991
987
|
dateChangeEvent(formField: any, value: any): void;
|
|
992
|
-
onDateTyping(event: any): void;
|
|
993
|
-
onTimeTyping(event: any): void;
|
|
994
988
|
timeChangeEvent(formField: any, value: any): void;
|
|
995
989
|
handleRules(formField: any, value: any): void;
|
|
996
990
|
resetRule(rule: any, formField: any): void;
|
|
@@ -1000,10 +994,6 @@ declare class ModelComponent implements OnChanges, OnDestroy {
|
|
|
1000
994
|
invokeFormBtnClick(option: any, propertySchema: any, form: NgForm): void;
|
|
1001
995
|
checkValidty(form: NgForm): boolean;
|
|
1002
996
|
onCancel(): void;
|
|
1003
|
-
private getMediaProperty;
|
|
1004
|
-
getMediaSource(field: any): string;
|
|
1005
|
-
getMediaLabel(field: any): string;
|
|
1006
|
-
getMediaKind(field: any): 'image' | 'video' | 'audio' | 'pdf' | 'file';
|
|
1007
997
|
/**
|
|
1008
998
|
* A field's message shows once the user typed in it and left it, or after a save attempt - not
|
|
1009
999
|
* when an empty field was only passed through (the message then pushed the row and its label out
|
|
@@ -1250,6 +1240,7 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
1250
1240
|
}
|
|
1251
1241
|
|
|
1252
1242
|
declare class Autocomplete implements OnChanges {
|
|
1243
|
+
private host;
|
|
1253
1244
|
/** the field of the layout (scope, option, label) */
|
|
1254
1245
|
field: any;
|
|
1255
1246
|
/** editing: the object whose value is the choice (the property in the property schema) */
|
|
@@ -1276,6 +1267,7 @@ declare class Autocomplete implements OnChanges {
|
|
|
1276
1267
|
private autocomplete?;
|
|
1277
1268
|
suggestions: any[];
|
|
1278
1269
|
private lastQuery;
|
|
1270
|
+
constructor(host: ElementRef<HTMLElement>);
|
|
1279
1271
|
/** the name of the field in the entries (the property's name, "workOrderNo") */
|
|
1280
1272
|
get key(): string;
|
|
1281
1273
|
get optionLabel(): string;
|
|
@@ -1285,9 +1277,18 @@ declare class Autocomplete implements OnChanges {
|
|
|
1285
1277
|
complete(event: {
|
|
1286
1278
|
query?: string;
|
|
1287
1279
|
}): void;
|
|
1280
|
+
/** The entries changed while the list is open: its height and so its place change too. */
|
|
1281
|
+
private refit;
|
|
1288
1282
|
/** the list arrived while open: show it for what was typed meanwhile */
|
|
1289
1283
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1290
1284
|
private filter;
|
|
1285
|
+
/**
|
|
1286
|
+
* (onShow): the list stays inside the page frame - the dialog, else the window - and above a
|
|
1287
|
+
* keyboard docked below. It opens to the side with more room and gets shorter (scrolls) when the
|
|
1288
|
+
* room is small. Before, the list flipped upwards over the dialog's top edge up to the status bar
|
|
1289
|
+
* (phone in landscape, keyboard beside the dialog - test F15).
|
|
1290
|
+
*/
|
|
1291
|
+
fitList(): void;
|
|
1291
1292
|
changed(value: any): void;
|
|
1292
1293
|
placeholder(): string;
|
|
1293
1294
|
showError(): boolean;
|
|
@@ -1990,5 +1991,89 @@ declare class MediaControl {
|
|
|
1990
1991
|
static ɵcmp: i0.ɵɵComponentDeclaration<MediaControl, "vl-media", never, { "field": { "alias": "field"; "required": false; }; "value": { "alias": "value"; "required": false; }; "property": { "alias": "property"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "mediaStyle": { "alias": "mediaStyle"; "required": false; }; "mediaClass": { "alias": "mediaClass"; "required": false; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
1991
1992
|
}
|
|
1992
1993
|
|
|
1993
|
-
|
|
1994
|
-
|
|
1994
|
+
/** The building blocks <vl-control> draws a field with. */
|
|
1995
|
+
type ControlKind = 'button' | 'media' | 'creditCard' | 'text' | 'password' | 'textarea' | 'autocomplete' | 'combobox' | 'dropdown' | 'radio' | 'checkbox' | 'switch' | 'number' | 'date' | 'time' | 'datetime' | 'daterange';
|
|
1996
|
+
/** The property a field is bound to (scope.reference) in the page's property schema, or undefined. */
|
|
1997
|
+
declare function controlProperty(field: any, propertySchema: any): any;
|
|
1998
|
+
/**
|
|
1999
|
+
* The building block of a field:
|
|
2000
|
+
* - no scope.reference: a button (layout field without a property)
|
|
2001
|
+
* - the property type decides media, credit card and the period (dateRange)
|
|
2002
|
+
* - otherwise the control (option.control, or the field catalog's choice for the type)
|
|
2003
|
+
*/
|
|
2004
|
+
declare function controlKind(field: any, property: any): ControlKind;
|
|
2005
|
+
/**
|
|
2006
|
+
* A style object of the layout split into its classes and its CSS: { classes: ['a', 'b'], color }
|
|
2007
|
+
* -> { classes: 'a b', style: { color } }. Every class counts, not only the first.
|
|
2008
|
+
*/
|
|
2009
|
+
declare function styleParts(styleObject: any): {
|
|
2010
|
+
classes: string;
|
|
2011
|
+
style: Record<string, any>;
|
|
2012
|
+
};
|
|
2013
|
+
|
|
2014
|
+
declare class ControlComponent implements OnChanges {
|
|
2015
|
+
/** the field of the layout (formField) */
|
|
2016
|
+
field: any;
|
|
2017
|
+
/** the page's property schema: { workOrder: { fromDate: { type, value, ... } } } */
|
|
2018
|
+
propertySchema: any;
|
|
2019
|
+
/** the project's language: selectedLanguage (translations), errorMessages */
|
|
2020
|
+
selectedLanguageInfo: any;
|
|
2021
|
+
/** the container's own error texts, when the project has none */
|
|
2022
|
+
errorMessages: any;
|
|
2023
|
+
/** set by the container after a save attempt: messages show then even for untouched fields */
|
|
2024
|
+
saveTried: boolean;
|
|
2025
|
+
/** the label rule of the container: 'dialog' (the layout's layoutStyle) or 'form' */
|
|
2026
|
+
container: 'dialog' | 'form';
|
|
2027
|
+
/** an entry of an autocomplete or combobox list was chosen */
|
|
2028
|
+
picked: EventEmitter<any>;
|
|
2029
|
+
/** a date, time or period was set */
|
|
2030
|
+
changed: EventEmitter<any>;
|
|
2031
|
+
/** a time picker opened */
|
|
2032
|
+
opened: EventEmitter<void>;
|
|
2033
|
+
/** a check box, switch or radio button changed */
|
|
2034
|
+
toggled: EventEmitter<any>;
|
|
2035
|
+
/** a button was clicked; its option (innerAction, action ...) */
|
|
2036
|
+
buttonClick: EventEmitter<any>;
|
|
2037
|
+
kind: ControlKind;
|
|
2038
|
+
property: any;
|
|
2039
|
+
/** the property's object ({ fromDate: {...}, toDate: {...} }), for amounts with a currency field */
|
|
2040
|
+
row: any;
|
|
2041
|
+
keyboard: CustomKeyboardType | null;
|
|
2042
|
+
/** vl-textbox reads the property schema from a container info */
|
|
2043
|
+
textboxInfo: any;
|
|
2044
|
+
readonly vlAction: typeof testAction;
|
|
2045
|
+
readonly vlWrites: typeof testWrites;
|
|
2046
|
+
ngOnChanges(): void;
|
|
2047
|
+
/** protected in the layout: the value is shown, not typed in */
|
|
2048
|
+
get readonly(): boolean;
|
|
2049
|
+
/** the property the control writes into ({} so a control never writes into undefined) */
|
|
2050
|
+
get target(): any;
|
|
2051
|
+
get translations(): Record<string, string> | null;
|
|
2052
|
+
get messages(): any;
|
|
2053
|
+
/** label.value, the layout's label.caption, then the data object's caption - translated */
|
|
2054
|
+
get label(): string;
|
|
2055
|
+
/** a check box carries its own caption; every other control gets the label above or beside it */
|
|
2056
|
+
get showLabel(): boolean;
|
|
2057
|
+
/** text flag (string "Y"/"N" ...) or Boolean, for check box, switch and radio buttons */
|
|
2058
|
+
get toggleType(): string;
|
|
2059
|
+
innerStyle(): Record<string, any>;
|
|
2060
|
+
labelStyle(): {
|
|
2061
|
+
classes: string;
|
|
2062
|
+
style: Record<string, any>;
|
|
2063
|
+
};
|
|
2064
|
+
/** scope.style: the input's own style in the layout (the Designer's "input" style) */
|
|
2065
|
+
inputStyle(): {
|
|
2066
|
+
classes: string;
|
|
2067
|
+
style: Record<string, any>;
|
|
2068
|
+
};
|
|
2069
|
+
/** a button has no input; the field's style is the button's */
|
|
2070
|
+
buttonStyle(): {
|
|
2071
|
+
classes: string;
|
|
2072
|
+
style: Record<string, any>;
|
|
2073
|
+
};
|
|
2074
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ControlComponent, never>;
|
|
2075
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ControlComponent, "vl-control", never, { "field": { "alias": "field"; "required": false; }; "propertySchema": { "alias": "propertySchema"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "saveTried": { "alias": "saveTried"; "required": false; }; "container": { "alias": "container"; "required": false; }; }, { "picked": "picked"; "changed": "changed"; "opened": "opened"; "toggled": "toggled"; "buttonClick": "buttonClick"; }, never, never, true, never>;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, CardComponent, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DropdownControl, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PaginationComponent, PasswordControl, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SIDE_DOCK_CLASS, SideMenuComponent, SwitchControl, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, backendUrl, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, displayDateValue, displayNumber, fieldInnerLayoutStyle, fieldModel, fieldRules, fixedTimeText, inputFormatHint, isNativeMobile, isNativePhone, languageDatePattern, layoutPlaceholder, mediaKind, normalizeCustomKeyboardType, numberShape, numberStep, numberSuffix, primeDatePattern, resolveCustomKeyboardType, resolvePlaceholder, ruleMessage, setDateLanguage, setInputHintLanguage, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storedToTyped, styleParts, testAction, testFieldKey, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline };
|
|
2079
|
+
export type { ControlKind, CustomKeyboardTarget, CustomKeyboardType, FieldKind, FieldModel, FieldRules, MediaKind, MobileAuthTokens, MobileOktaRefresh, MobileOktaTokens, NumberShape, OidcProvider, OidcRefresh, OidcTokens, RequestTimeoutMessages, StagedReadOptions };
|