@oiz/stzh-components 2.12.0-beta1 → 2.12.0-beta2
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/cjs/{app-globals-749422d7.js → app-globals-b9d20033.js} +2 -2
- package/dist/cjs/{app-globals-749422d7.js.map → app-globals-b9d20033.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js +2 -4
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/stzh-radiogroup2.js +1 -1
- package/dist/esm/{app-globals-5f5be02f.js → app-globals-0cf2577d.js} +2 -2
- package/dist/esm/{app-globals-5f5be02f.js.map → app-globals-0cf2577d.js.map} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm-es5/{app-globals-5f5be02f.js → app-globals-0cf2577d.js} +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/stzh-components.js +1 -1
- package/dist/esm-es5/stzh-components.js.map +1 -1
- package/dist/stzh-components/{p-ebb38041.system.js → p-6233fc4f.system.js} +2 -2
- package/dist/stzh-components/{p-bf7316ab.system.js → p-ae0e530e.system.js} +2 -2
- package/dist/stzh-components/{p-bf7316ab.system.js.map → p-ae0e530e.system.js.map} +1 -1
- package/dist/stzh-components/{p-5e014c0e.js → p-b2b9d87e.js} +2 -2
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/stzh-components/stzh-components.js +1 -1
- package/dist/types/components/stzh-accordion/stzh-accordion.d.ts +15 -0
- package/dist/types/components/stzh-accordion-item/stzh-accordion-item.d.ts +73 -0
- package/dist/types/components/stzh-actions/stzh-actions.d.ts +16 -0
- package/dist/types/components/stzh-actionset/stzh-actionset.d.ts +45 -0
- package/dist/types/components/stzh-amount/stzh-amount.d.ts +73 -0
- package/dist/types/components/stzh-appnav/stzh-appnav.d.ts +23 -0
- package/dist/types/components/stzh-appointments/stzh-appointments.d.ts +74 -0
- package/dist/types/components/stzh-audio/stzh-audio.d.ts +58 -0
- package/dist/types/components/stzh-button/stzh-button.d.ts +105 -0
- package/dist/types/components/stzh-buttongroup/stzh-buttongroup.d.ts +7 -0
- package/dist/types/components/stzh-calendar/stzh-calendar.d.ts +88 -0
- package/dist/types/components/stzh-card/stzh-card.d.ts +127 -0
- package/dist/types/components/stzh-card-list/stzh-card-list.d.ts +31 -0
- package/dist/types/components/stzh-carousel/stzh-carousel.d.ts +175 -0
- package/dist/types/components/stzh-chart/stzh-chart.d.ts +15 -0
- package/dist/types/components/stzh-checkbox/stzh-checkbox.d.ts +57 -0
- package/dist/types/components/stzh-checkboxgroup/stzh-checkboxgroup.d.ts +64 -0
- package/dist/types/components/stzh-chip/stzh-chip.d.ts +74 -0
- package/dist/types/components/stzh-chip-select/stzh-chip-select.d.ts +46 -0
- package/dist/types/components/stzh-clamp/stzh-clamp.d.ts +49 -0
- package/dist/types/components/stzh-contact/stzh-contact.d.ts +54 -0
- package/dist/types/components/stzh-datalist/stzh-datalist.d.ts +51 -0
- package/dist/types/components/stzh-datalist-item/stzh-datalist-item.d.ts +62 -0
- package/dist/types/components/stzh-datamessagelist/stzh-datamessagelist.d.ts +6 -0
- package/dist/types/components/stzh-datamessagelist-item/stzh-datamessagelist-item.d.ts +57 -0
- package/dist/types/components/stzh-datatable/stzh-datatable.d.ts +103 -0
- package/dist/types/components/stzh-datepicker/stzh-datepicker.d.ts +101 -0
- package/dist/types/components/stzh-details/stzh-details.d.ts +35 -0
- package/dist/types/components/stzh-dialog/stzh-dialog.d.ts +64 -0
- package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +173 -0
- package/dist/types/components/stzh-figure/stzh-figure.d.ts +21 -0
- package/dist/types/components/stzh-flyingfocus/stzh-flyingfocus.d.ts +35 -0
- package/dist/types/components/stzh-footer/stzh-footer.d.ts +27 -0
- package/dist/types/components/stzh-gallery/stzh-gallery.d.ts +54 -0
- package/dist/types/components/stzh-ghettobox/stzh-ghettobox.d.ts +50 -0
- package/dist/types/components/stzh-header/stzh-header.d.ts +68 -0
- package/dist/types/components/stzh-hr/stzh-hr.d.ts +7 -0
- package/dist/types/components/stzh-iframe/stzh-iframe.d.ts +60 -0
- package/dist/types/components/stzh-imagecomparison/stzh-imagecomparison.d.ts +29 -0
- package/dist/types/components/stzh-input/stzh-input.d.ts +104 -0
- package/dist/types/components/stzh-invert/stzh-invert.d.ts +7 -0
- package/dist/types/components/stzh-langnav/stzh-langnav.d.ts +19 -0
- package/dist/types/components/stzh-link/stzh-link.d.ts +88 -0
- package/dist/types/components/stzh-list/stzh-list.d.ts +9 -0
- package/dist/types/components/stzh-list-item/stzh-list-item.d.ts +7 -0
- package/dist/types/components/stzh-loader/stzh-loader.d.ts +13 -0
- package/dist/types/components/stzh-loadingbar/stzh-loadingbar.d.ts +12 -0
- package/dist/types/components/stzh-logo/stzh-logo.d.ts +9 -0
- package/dist/types/components/stzh-menu-item/stzh-menu-item.d.ts +50 -0
- package/dist/types/components/stzh-message/stzh-message.d.ts +37 -0
- package/dist/types/components/stzh-metanav/stzh-metanav.d.ts +11 -0
- package/dist/types/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.d.ts +33 -0
- package/dist/types/components/stzh-monthyearpicker/stzh-monthyearpicker.d.ts +98 -0
- package/dist/types/components/stzh-olmap/stzh-olmap.d.ts +124 -0
- package/dist/types/components/stzh-overlay/stzh-overlay.d.ts +34 -0
- package/dist/types/components/stzh-page-skiplinks/stzh-page-skiplinks.d.ts +11 -0
- package/dist/types/components/stzh-pagebottom/stzh-pagebottom.d.ts +29 -0
- package/dist/types/components/stzh-pagetitle/stzh-pagetitle.d.ts +15 -0
- package/dist/types/components/stzh-pagetitle-hero/stzh-pagetitle-hero.d.ts +25 -0
- package/dist/types/components/stzh-pagination/stzh-pagination.d.ts +52 -0
- package/dist/types/components/stzh-panorama/stzh-panorama.d.ts +74 -0
- package/dist/types/components/stzh-popover/stzh-popover.d.ts +73 -0
- package/dist/types/components/stzh-print/stzh-print.d.ts +12 -0
- package/dist/types/components/stzh-progressbar/stzh-progressbar.d.ts +59 -0
- package/dist/types/components/stzh-progressbar-item/stzh-progressbar-item.d.ts +34 -0
- package/dist/types/components/stzh-radio/stzh-radio.d.ts +57 -0
- package/dist/types/components/stzh-radiogroup/stzh-radiogroup.d.ts +66 -0
- package/dist/types/components/stzh-ratio/stzh-ratio.d.ts +22 -0
- package/dist/types/components/stzh-readspeaker/stzh-readspeaker.d.ts +18 -0
- package/dist/types/components/stzh-richtext/stzh-richtext.d.ts +22 -0
- package/dist/types/components/stzh-saptcha/stzh-saptcha.d.ts +28 -0
- package/dist/types/components/stzh-scrollup/stzh-scrollup.d.ts +12 -0
- package/dist/types/components/stzh-share/stzh-share.d.ts +21 -0
- package/dist/types/components/stzh-show/stzh-show.d.ts +22 -0
- package/dist/types/components/stzh-sitemap/stzh-sitemap.d.ts +14 -0
- package/dist/types/components/stzh-skiplink/stzh-skiplink.d.ts +38 -0
- package/dist/types/components/stzh-sortable/stzh-sortable.d.ts +59 -0
- package/dist/types/components/stzh-status/stzh-status.d.ts +14 -0
- package/dist/types/components/stzh-sticky/stzh-sticky.d.ts +58 -0
- package/dist/types/components/stzh-table/stzh-table.d.ts +43 -0
- package/dist/types/components/stzh-textandimage/stzh-textandimage.d.ts +14 -0
- package/dist/types/components/stzh-timeline/stzh-timeline.d.ts +23 -0
- package/dist/types/components/stzh-timeline-item/stzh-timeline-item.d.ts +78 -0
- package/dist/types/components/stzh-timepicker/stzh-timepicker.d.ts +62 -0
- package/dist/types/components/stzh-toast/stzh-toast.d.ts +39 -0
- package/dist/types/components/stzh-toastbar/stzh-toastbar.d.ts +41 -0
- package/dist/types/components/stzh-toggle/stzh-toggle.d.ts +59 -0
- package/dist/types/components/stzh-tooltip/stzh-tooltip.d.ts +80 -0
- package/dist/types/components/stzh-upload/stzh-upload.d.ts +236 -0
- package/dist/types/components/stzh-vbz-carousel/stzh-vbz-carousel.d.ts +14 -0
- package/dist/types/components/stzh-vbz-linechip/stzh-vbz-linechip.d.ts +37 -0
- package/dist/types/components/stzh-vbz-majorticker/stzh-vbz-majorticker.d.ts +42 -0
- package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.d.ts +35 -0
- package/dist/types/components/stzh-youtube/stzh-youtube.d.ts +30 -0
- package/dist/types/index.d.ts +900 -0
- package/dist/types/libraries/tom-select/types/constants.d.ts +12 -0
- package/dist/types/libraries/tom-select/types/contrib/highlight.d.ts +13 -0
- package/dist/types/libraries/tom-select/types/contrib/microevent.d.ts +20 -0
- package/dist/types/libraries/tom-select/types/contrib/microplugin.d.ts +71 -0
- package/dist/types/libraries/tom-select/types/defaults.d.ts +51 -0
- package/dist/types/libraries/tom-select/types/getSettings.d.ts +3 -0
- package/dist/types/libraries/tom-select/types/plugins/caret_position/plugin.d.ts +16 -0
- package/dist/types/libraries/tom-select/types/plugins/change_listener/plugin.d.ts +16 -0
- package/dist/types/libraries/tom-select/types/plugins/checkbox_options/plugin.d.ts +16 -0
- package/dist/types/libraries/tom-select/types/plugins/clear_button/plugin.d.ts +17 -0
- package/dist/types/libraries/tom-select/types/plugins/clear_button/types.d.ts +5 -0
- package/dist/types/libraries/tom-select/types/plugins/drag_drop/plugin.d.ts +16 -0
- package/dist/types/libraries/tom-select/types/plugins/dropdown_header/plugin.d.ts +17 -0
- package/dist/types/libraries/tom-select/types/plugins/dropdown_header/types.d.ts +8 -0
- package/dist/types/libraries/tom-select/types/plugins/dropdown_input/plugin.d.ts +16 -0
- package/dist/types/libraries/tom-select/types/plugins/input_autogrow/plugin.d.ts +15 -0
- package/dist/types/libraries/tom-select/types/plugins/no_active_items/plugin.d.ts +15 -0
- package/dist/types/libraries/tom-select/types/plugins/no_backspace_delete/plugin.d.ts +15 -0
- package/dist/types/libraries/tom-select/types/plugins/optgroup_columns/plugin.d.ts +16 -0
- package/dist/types/libraries/tom-select/types/plugins/remove_button/plugin.d.ts +17 -0
- package/dist/types/libraries/tom-select/types/plugins/remove_button/types.d.ts +6 -0
- package/dist/types/libraries/tom-select/types/plugins/restore_on_backspace/plugin.d.ts +21 -0
- package/dist/types/libraries/tom-select/types/plugins/virtual_scroll/plugin.d.ts +16 -0
- package/dist/types/libraries/tom-select/types/tom-select.complete.d.ts +2 -0
- package/dist/types/libraries/tom-select/types/tom-select.d.ts +596 -0
- package/dist/types/libraries/tom-select/types/tom-select.popular.d.ts +2 -0
- package/dist/types/libraries/tom-select/types/types/core.d.ts +48 -0
- package/dist/types/libraries/tom-select/types/types/index.d.ts +2 -0
- package/dist/types/libraries/tom-select/types/types/settings.d.ts +78 -0
- package/dist/types/libraries/tom-select/types/utils.d.ts +76 -0
- package/dist/types/libraries/tom-select/types/vanilla.d.ts +76 -0
- package/dist/types/types/svg.d.ts +4 -0
- package/package.json +1 -1
- package/dist/vscode-data.json +0 -7523
- /package/dist/esm-es5/{app-globals-5f5be02f.js.map → app-globals-0cf2577d.js.map} +0 -0
- /package/dist/stzh-components/{p-ebb38041.system.js.map → p-6233fc4f.system.js.map} +0 -0
- /package/dist/stzh-components/{p-5e014c0e.js.map → p-b2b9d87e.js.map} +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { TomCreateFilter, TomCreate, TomLoadCallback, TomTemplates, TomOption } from './index';
|
|
2
|
+
import { TPluginItem, TPluginHash } from '../contrib/microplugin';
|
|
3
|
+
import * as SifterTypes from '@orchidjs/sifter/dist/types/types';
|
|
4
|
+
export type TomSettings = {
|
|
5
|
+
options?: any[];
|
|
6
|
+
optgroups?: any[];
|
|
7
|
+
items?: string[];
|
|
8
|
+
plugins: string[] | TPluginItem[] | TPluginHash;
|
|
9
|
+
delimiter: string;
|
|
10
|
+
splitOn: RegExp | string;
|
|
11
|
+
persist: boolean;
|
|
12
|
+
diacritics: boolean;
|
|
13
|
+
create: boolean | TomCreate;
|
|
14
|
+
createOnBlur: boolean;
|
|
15
|
+
createFilter: RegExp | string | TomCreateFilter;
|
|
16
|
+
highlight: boolean;
|
|
17
|
+
openOnFocus: boolean;
|
|
18
|
+
shouldOpen: boolean;
|
|
19
|
+
maxOptions: number;
|
|
20
|
+
maxItems: null | number;
|
|
21
|
+
hideSelected: boolean;
|
|
22
|
+
duplicates: boolean;
|
|
23
|
+
addPrecedence: boolean;
|
|
24
|
+
selectOnTab: boolean;
|
|
25
|
+
preload: boolean | string;
|
|
26
|
+
allowEmptyOption: boolean;
|
|
27
|
+
closeAfterSelect: boolean;
|
|
28
|
+
loadThrottle: number;
|
|
29
|
+
loadingClass: string;
|
|
30
|
+
dataAttr: string;
|
|
31
|
+
optgroupField: string;
|
|
32
|
+
valueField: string;
|
|
33
|
+
labelField: string;
|
|
34
|
+
disabledField: string;
|
|
35
|
+
optgroupLabelField: string;
|
|
36
|
+
optgroupValueField: string;
|
|
37
|
+
lockOptgroupOrder: boolean;
|
|
38
|
+
sortField: string | SifterTypes.Sort[] | SifterTypes.SortFn;
|
|
39
|
+
searchField: string[];
|
|
40
|
+
searchConjunction: string;
|
|
41
|
+
nesting: boolean;
|
|
42
|
+
mode: string;
|
|
43
|
+
wrapperClass: string;
|
|
44
|
+
controlClass: string;
|
|
45
|
+
dropdownClass: string;
|
|
46
|
+
dropdownContentClass: string;
|
|
47
|
+
itemClass: string;
|
|
48
|
+
optionClass: string;
|
|
49
|
+
dropdownParent: string;
|
|
50
|
+
controlInput: string | HTMLInputElement;
|
|
51
|
+
copyClassesToDropdown: boolean;
|
|
52
|
+
placeholder: string;
|
|
53
|
+
hidePlaceholder: boolean;
|
|
54
|
+
load: (value: string, callback: TomLoadCallback) => void;
|
|
55
|
+
score?: (query: string) => () => any;
|
|
56
|
+
shouldLoad: (query: string) => boolean;
|
|
57
|
+
onInitialize: () => void;
|
|
58
|
+
onChange: (value: string | number) => void;
|
|
59
|
+
onItemAdd: (value: string | number, item: HTMLDivElement) => void;
|
|
60
|
+
onItemRemove: (value: string | number, item: HTMLDivElement) => void;
|
|
61
|
+
onClear: () => void;
|
|
62
|
+
onOptionAdd: (value: string | number, data: TomOption) => void;
|
|
63
|
+
onOptionRemove: (value: string | number) => void;
|
|
64
|
+
onOptionClear: () => void;
|
|
65
|
+
onOptionGroupAdd: (value: string | number, data: TomOption) => void;
|
|
66
|
+
onOptionGroupRemove: (value: string | number) => void;
|
|
67
|
+
onOptionGroupClear: () => void;
|
|
68
|
+
onDropdownOpen: (dropdown: HTMLDivElement) => void;
|
|
69
|
+
onDropdownClose: (dropdown: HTMLDivElement) => void;
|
|
70
|
+
onType: (str: string) => void;
|
|
71
|
+
onLoad: (options: TomOption[], optgroups: TomOption[]) => void;
|
|
72
|
+
onFocus: () => void;
|
|
73
|
+
onBlur: () => void;
|
|
74
|
+
onDelete: (values: string[], evt: KeyboardEvent | MouseEvent) => boolean;
|
|
75
|
+
render: TomTemplates;
|
|
76
|
+
firstUrl: (query: string) => any;
|
|
77
|
+
shouldLoadMore: () => boolean;
|
|
78
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import TomSelect from './tom-select';
|
|
2
|
+
import { TomLoadCallback } from './types/index';
|
|
3
|
+
/**
|
|
4
|
+
* Converts a scalar to its best string representation
|
|
5
|
+
* for hash keys and HTML attribute values.
|
|
6
|
+
*
|
|
7
|
+
* Transformations:
|
|
8
|
+
* 'str' -> 'str'
|
|
9
|
+
* null -> ''
|
|
10
|
+
* undefined -> ''
|
|
11
|
+
* true -> '1'
|
|
12
|
+
* false -> '0'
|
|
13
|
+
* 0 -> '0'
|
|
14
|
+
* 1 -> '1'
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export declare const hash_key: (value: undefined | null | boolean | string | number) => string | null;
|
|
18
|
+
export declare const get_hash: (value: boolean | string | number) => string;
|
|
19
|
+
/**
|
|
20
|
+
* Escapes a string for use within HTML.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export declare const escape_html: (str: string) => string;
|
|
24
|
+
/**
|
|
25
|
+
* Debounce the user provided load function
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare const loadDebounce: (fn: (value: string, callback: TomLoadCallback) => void, delay: number) => (this: TomSelect, value: string, callback: TomLoadCallback) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Debounce all fired events types listed in `types`
|
|
31
|
+
* while executing the provided `fn`.
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare const debounce_events: (self: TomSelect, types: string[], fn: () => void) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Determines the current selection within a text input control.
|
|
37
|
+
* Returns an object containing:
|
|
38
|
+
* - start
|
|
39
|
+
* - length
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
export declare const getSelection: (input: HTMLInputElement) => {
|
|
43
|
+
start: number;
|
|
44
|
+
length: number;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Prevent default
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
export declare const preventDefault: (evt?: Event, stop?: boolean) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Add event helper
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
export declare const addEvent: (target: EventTarget, type: string, callback: EventListenerOrEventListenerObject, options?: object) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Return true if the requested key is down
|
|
58
|
+
* Will return false if more than one control character is pressed ( when [ctrl+shift+a] != [ctrl+a] )
|
|
59
|
+
* The current evt may not always set ( eg calling advanceSelection() )
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
export declare const isKeyDown: (key_name: keyof (KeyboardEvent | MouseEvent), evt?: KeyboardEvent | MouseEvent) => boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Get the id of an element
|
|
65
|
+
* If the id attribute is not set, set the attribute with the given id
|
|
66
|
+
*
|
|
67
|
+
*/
|
|
68
|
+
export declare const getId: (el: Element, id: string) => string;
|
|
69
|
+
/**
|
|
70
|
+
* Returns a string with backslashes added before characters that need to be escaped.
|
|
71
|
+
*/
|
|
72
|
+
export declare const addSlashes: (str: string) => string;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
export declare const append: (parent: Element | DocumentFragment, node: string | Node | null | undefined) => void;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return a dom element from either a dom query string, jQuery object, a dom element or html string
|
|
3
|
+
* https://stackoverflow.com/questions/494143/creating-a-new-dom-element-from-an-html-string-using-built-in-dom-methods-or-pro/35385518#35385518
|
|
4
|
+
*
|
|
5
|
+
* param query should be {}
|
|
6
|
+
*/
|
|
7
|
+
export declare const getDom: (query: any) => HTMLElement;
|
|
8
|
+
export declare const isHtmlString: (arg: any) => boolean;
|
|
9
|
+
export declare const escapeQuery: (query: string) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Dispatch an event
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare const triggerEvent: (dom_el: HTMLElement, event_name: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Apply CSS rules to a dom element
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export declare const applyCSS: (dom_el: HTMLElement, css: {
|
|
20
|
+
[key: string]: string | number;
|
|
21
|
+
}) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Add css classes
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare const addClasses: (elmts: HTMLElement | HTMLElement[], ...classes: string[] | string[][]) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Remove css classes
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
export declare const removeClasses: (elmts: HTMLElement | HTMLElement[], ...classes: string[] | string[][]) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Return arguments
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export declare const classesArray: (args: string[] | string[][]) => string[];
|
|
37
|
+
/**
|
|
38
|
+
* Create an array from arg if it's not already an array
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
export declare const castAsArray: (arg: any) => Array<any>;
|
|
42
|
+
/**
|
|
43
|
+
* Get the closest node to the evt.target matching the selector
|
|
44
|
+
* Stops at wrapper
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
export declare const parentMatch: (target: null | HTMLElement, selector: string, wrapper?: HTMLElement) => HTMLElement | void;
|
|
48
|
+
/**
|
|
49
|
+
* Get the first or last item from an array
|
|
50
|
+
*
|
|
51
|
+
* > 0 - right (last)
|
|
52
|
+
* <= 0 - left (first)
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
export declare const getTail: (list: Array<any> | NodeList, direction?: number) => any;
|
|
56
|
+
/**
|
|
57
|
+
* Return true if an object is empty
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
export declare const isEmptyObject: (obj: object) => boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Get the index of an element amongst sibling nodes of the same type
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
export declare const nodeIndex: (el: null | Element, amongst?: string) => number;
|
|
66
|
+
/**
|
|
67
|
+
* Set attributes of an element
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
export declare const setAttr: (el: Element, attrs: {
|
|
71
|
+
[key: string]: string | number | null;
|
|
72
|
+
}) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Replace a node
|
|
75
|
+
*/
|
|
76
|
+
export declare const replaceNode: (existing: Node, replacement: Node) => void;
|