Skip to content

Releases: Yegorich555/web-ui-pack

v0.9.1

28 Sep 10:57
Compare
Choose a tag to compare

BREAKING CHANGES:

  • Internals (Note: Skip this if you haven't created custon Elements inherrited from WUP...)
    • Added auto-mapping between attributes <=> options based on key-values in $defaults
    • TypeScript. Removed interface Defaults. Merged with interface Options and now contains all fields as required
    • Now removing attributes/options always rollbacks to value defined in $defaults
    • Method getAttr changed to parseAttr
  • Global
  • Controls
    • Option skey renamed to storageKey
    • Option storageKey changes $value instead of $initValue and now triggers $onChange event on init (added enum-key SetValueReasons.storage)
    • Removed css maxHeight for [error] popup
    • Changing $initValue isn't fired $onChange event anymore
  • CircleElement. Renamed option minsize to minSize
  • SpinElement
    • Defaults fit & overflowTarget = auto (was null)
    • Attribute w-overflowtarget expects auto or querySelector string (previously expected global-ref window.someObj)

Fixes:

  • TypeScript
    • Updated version & types
    • Refactored & fixed some types
  • helper observer. excludeNested doesn't exclude when re-assign nested properties
  • RadioControl. autoFocus makes focused 1st but not active input when form.$options.autoFocus=true
  • SelectControl. Wrong error Not found in items when re-assign items & initValue after a time
  • SelectManyControl
    • Wrong error Not found in items when re-assign items & initValue after a time
    • Removing item from value affects on $initValue
    • $isChanged is wrong if user removed then added same value
  • DateControl
    • Validations min, max, exclude don't exclude time in comparison
    • Validations messages min & max isn't formatted according to utc
    • Error message doesn't appear for invalid input by pressing Enter
    • Validation _parse doesn't work when added extra char and another char auto-removed (shifted & removed)
    • History undo works wrong is select all + type new + Ctrl-Z
  • TimeControl
    • Validation _parse doesn't work when added extra char and another char auto-removed (shifted & removed)
    • Error message doesn't appear for invalid input by pressing Enter
  • CalendarControl. Removed useless background for button month in the header

New/Features:

  • Global. Added support HTML intellisense in VSCode: follow instructions to use this
  • Controls
    • button[clear] not hidden anymore for required controls (user must have ability to clear all at once & put new text). To rollback it use css-rule wup-text[required] button[clear] { display: none; }
    • button[clear] visible only on focus & hover. To rollback it use css wup-text button[clear] { display: block!important; }
    • updated hover & focus tyles
  • Combobox controls (Select, Date, Time)
    • Now menu is hidden by default when autoFocus enabled. To revert to previous behavior use WUPSelectControl.$defaults.showCase |= ShowCases.onFocusAuto
  • SelectControl.SelectManyControl.
    • Added validationRules minCount & maxCount
    • Updated hover style for menu items. User css-var --ctrl-select-menu-hover to change

v0.8.1

29 Aug 09:53
Compare
Choose a tag to compare

BREAKING CHANGES:

  • Internals (Note: If you haven't created custom Elements inherrited from WUP... - don't pay attention on it).
    • Refactored $options initialization. So all inherrited Elemenents must override only $defaults and use TOptions as generic instead of overriding $options like it was before.
    • Deprecated static property nameUnique
    • Controls. Dsiable maxWidthByTarget for error-popup
    • Global. Improved styles performance via refactoring selectors

Fixes:

  • Text based controls
    • $initValue + click on button[clear] + Ctrl+Z => history undo does't work
    • button[clear] isn't updated on $initValue or $options.clearActions changing
    • wrong behavior_when user removes/inserts text in the start
  • SelectControl
    • clearing input + click outside doesn't clear value
    • $options.readOnlyInput=7 must be ignored when allowNewValue enabled
    • improved input delete behavior for $options.multiple
    • menu isn't refreshed after button-clear click
    • selected menu-item isn't into view sometimes with 1st opening popup
  • Combobox controls (Select, Date, Time). Popup shows/hides when user select text with mouseUp on label (outside input)
  • CalendarControl. $value=undefined doesn't reset selected
  • NumberControl.
    • Alt+MouseWheel changes ±0.1 when decimal isn't allowed
    • Alt+MouseWheel changes ±0.1 but Alt-keyUp moves focus to browser panel
  • CircleElement.
    • wrong tooltip position when segment is half of circle
    • wrong console.error when items=[{value:2}]
    • wrong label-value when item value < opion minsize
    • edges of small segment are not rounded according to corner
  • TimeControl.
    • menu items with wrong sizes and text not aligned
    • extra pixel when scrolled if content size is decimal h=239.7

New/Features:

  • Controls. Event $change and callback $onChange has prop SetValueReason.initValue now
  • Internals. Improved memory consumption & performance via excluding nested props of $options to be observed
  • Text based controls
    • History undo/redo (Ctrl+Z, Ctrl+Y, Ctrl+Shift+Z). Refactored, fixed & optimized via storing only changes
  • PopupElement. Added showCase alwaysOff (popup hidden by default)
  • CircleElement. Added percentage for tooltips
  • TimeControl. Added option menuButtonsOff to hide buttons

v0.7.1

25 Jul 09:37
Compare
Choose a tag to compare

BREAKING CHANGES:

  • Controls. $options.clearAction => refactored enum-names & improved behavior/dynamic-icon for button[clear]

Fixes:

  • SelectControl.SelectManyControl.
    • Menu scrolled to 1st selected item if even select last one (when multiple is allowed)
    • $options.items[0] !== items[0] because wrapped to observer
    • Unable to clear value with Backspace+Enter
  • SelectManyControl. Menu hides when user selects all items - but it's maybe wrong
  • RadioControl.
    • $options.items[0] !== items[0] because wrapped to observer
    • $options.readOnly doesn't work - user able to change value
  • CalendarControl.
    • Wrong size of monthPicker if previously scroll dayPicker to min/max date
    • User can't scroll when $initValue > $options.max
  • DateControl. Menu isn't closed if click on the selected date
  • TextareaControl.
    • Exception when try to clear empty control
    • Ctrl + Z doesn't revert changes
  • NumberControl. option format isn't applied on init
  • Text based controls. Mask. Wrong behavior_when user removes/inserts text in the middle
  • Text based controls - Improved undo/redo overall
    • Ctrl+Z sometimes is wrong
    • Ctrl+Я doesn't work. Need support for different languages
    • Press Escape, Ctrl+Z => no undo-action
    • No undo-action when shake iPhone
  • Controls.Styles. button[clear] has shifted icon when mouse hover

New/Features:

  • helper observer. Added option excludeNested to exclude some nested properties from observer
  • SelectControl.SelectManyControl. $options.readOnlyInput can be number X to enable autoMode where input.readOnly = items.length < X.
  • Combobox controls (Select, Date, Time). readOnlyInput moved to $defaults
  • Controls.Global
    • Improved value comparison (static method $isEqual) to compare by .id. So now don't need to worry about complex objects with id's (mostly related to SelectControl.$options.items & RadioControl.$options.items)
    • Added readonly property $isRequired based on $options.validations.required
  • CalendarControl. DateControl. $options.startWith can be string-date

v0.6.1

26 Jun 07:29
Compare
Choose a tag to compare

Fixes:

  • Controls. $initValue overrides $value when it set before
  • Combobox controls (Select, SelectMany Date, Time). Menu border is blue when invalid + hover
  • Combobox controls (Select, SelectMany, Date, Time). Sometimes menu not scrolled to selected item by opening
  • SwitchControl. CheckControl. form.$initModel is ignored
  • RadioControl. $options.items with object-values doesn't work
  • RadioControl. set in a row $options.items=... and $value=... doesn't work
  • SelectControl.SelectManyControl. Set in a row $options.items=... and $value=... doesn't work
  • SelectControl.SelectManyControl. Arrow changes control size during rotation
  • PopupElement. Wrong position if target inside body and html is scrollable instead of body
  • NumberControl. Pattern 0.# and value 2 shows error Incomplete value
  • helper observer. Exception on promise-property
  • Global. Sometimes some css-vars not appended to styles in production (as result black Circle)
  • CalendarControl. Wrong autoscroll to top page after 1st focus
  • TimeControl. Scrollbar is visible when menu opens to top

New/Features:

  • FormElement. Added option autoSave to prevent losing not-submitted data
  • Controls
    • Internal setValue has argument reason now
    • Event $change and callback $onChange has prop detail: SetValueReason now
    • Added $defaults.storage and $options.skey to store/get value in different storages local/session/url
    • Extended custom validation to (value, control, reason) => false | string. Was (value) => false | string
    • Hide button[clear] by default for disabled/readonly/required
  • Glolbal. Added JSDoc comments for jsx/tsx files (previously hovering on <wup-text> showed nothing)

v0.6.0

19 May 15:46
Compare
Choose a tag to compare

BREAKING CHANGES:

Fixes:

  • helper animateDropdown. Wrong for left,right,top directions
  • PopupElement. Popup hides by mouseenter if was opened by target.mouseenter
  • PopupElement. Popup impossible to hide by click if opened by hover
  • NumberControl.
    • -234 showed as -,234
    • error message min/max is not formatted as input
    • useless inline style 'overflow' on focus
  • Controls. Asterisk is visible on empty label when value is required

New/Features:

  • DropdownElement demo
  • Added ability to reuse built-in styles (scroll,button['submit'] etc.). See FAQ/sharedStyles
  • SelectManyControl demo. Added ability to sort/order items via drag&drop OR Arrows + Shift
  • Added helper animateStack
  • PopupElement
    • Added option animation: Animations.stack
    • Added support for attribute [animation] ("stack","drawer","") : <wup-popup animation="stack">...</wup-popup>
    • Extended attribute placement. Now it has predefined opposite rules (so right-middle means [right-middle, left-middle])
    • Reduced memory consumption via significant refactoring listeners & callback
    • Popup always closed by keydown Escape if wasn't prevented (if was opened via default listener)
    • Popup always closed by focusLost of target & popup for accessibility purpose (if was opened via default listener)
    • Ability to call $show() and $hide() with working listeners (previously manuall $show() removed all listeners)
    • Controls. Able to setup $defaults.validations (like WUPNumberControl.$validations = {min: 0} etc.)
  • Global. Added custom callbacks for events. So event popup.addEventListner("$show",e=>...) equal to popup.$onShow = (e)=>...

v0.5.2

29 Mar 13:59
Compare
Choose a tag to compare

Fixes:

  • Controls. Need to add border by default otherwise it's invisible on the white body
  • CircleElement. Wrong tooltip position when segment is half of circle

v0.5.0

27 Mar 13:53
Compare
Choose a tag to compare

BREAKING CHANGES:

  • Internals. Methods getNumAttr, getRefAttr, getBoolAttr is refactored to single getAttr()
  • SelectControl. Simplified menu styling
  • PopupElement. Prop $isOpen deprecated in favor of $isShown

New:

  • SelectManyControl demo
  • SelectControl. Added option multiple (attribute [multiple] & $options.multiple)
  • PopupElement
    • Option target can be SVGElement
    • Option offset can be function
    • Added properties $isShown, $isHidden, $isShowing, $isHidding
    • Added rule: popup can't be more than window.innerWidth & window.innerHeight. The rule impossible to disable!
    • Calling $show() & $hide() possible several times at once without re-rendering
    • Events $willShow & $willHide have properties detail.showCase & detail.hideCase
  • CircleElement
    • Added option minsize (attribute [minsize] & $options.minsize)
    • Added option tooltip per item ($options.items[0].tooltip)

Fixes:

  • Global. Sometimes events are not disposed. Fix for helper onEvent (need to remove events with options as is)
  • helper onFocusLost. Isn't fired if stopPropagation is called
  • TimeControl. Extra margin for menu-buttons on Safari
  • SwitchControl. CheckControl. Attribute initvalue='' sets value to true (expected false)
  • TextareaControl. Ctrl + B makes text bold but it's unexpected for plain textarea
  • Controls. Hover effect on Android devices (expected: no-hover on touch-screens)
  • Controls. Focus frame isn't rouned on Safari
  • Controls. Attributes initvalue,min,max for controls Date & Calendar doesn't work on Safari (Date.parse(yyyy-MM-dd) doesn't work by default)
  • Controls. Controls are not rendered if parsing initvalue is wrong
  • Controls. Unexpected autofocus on mask-inputs on Safari
  • Controls. Annoying autoselect on touchscreens. Now $options.selectOnFocus is disabled by default
  • Combobox controls (Select, Date, Time). Now popup isn't opened if user clears control and gets focus at the same time
  • Combobox controls (Select, Date, Time). Click on disabled item throws console.error
  • Combobox controls (Select, Date, Time). Focus goes to menu-list by keydown 'Tab' in Firefox
  • SelectControl. Sometimes popup isn't not scrolled to selected item during the opening
  • SpinElement. Animation for TwinDualRing doesn't work on Safari 14-
  • SpinElement. Wrong render on option fit on Safari 14-
  • PopupElement. Animation for opacity doesn't work on Safari 14-
  • PopupElement. Animation affects on bluring text if user scroll body during the animation
  • PopupElement. Wrong position during dropdownAnimation and several show/hide at once
  • PopupElement. Allow to show/hide on double-click (because on some browsers double-click works with huge delay)
  • PopupElement. 2nd $show() has predefined maxSize & position can be different
  • PopupElement. Popup could be > 100vw. Now popup has max size 100vw & 100vh (by default)
  • PopupElement. No-updates on screensize changes. Now popup position & size changes with device-rotation
  • PopupElement. No popup if mousedown>move>up>click on target
  • CircleElement. Items color doesn't work (because attr [fill] can't override css-rule)

v0.4.1

27 Jan 14:31
Compare
Choose a tag to compare

Fixes:

  • CalendarControl. Different pickers height after scrolling
  • helper WUPScrolled. maxHeight left after scrolling finished
  • helper WUPScrolled. goto previous sometimes scrolles through the whole range

New:

v0.4.0

26 Jan 12:25
Compare
Choose a tag to compare

BREAKING CHANGES:

Fixes:

  • Helper. localeInfo. AM/PM parsed to 'a' but expected 'A'
  • Helper. dateFromString. 12:00 PM throws Error but expected 12:00
  • Icon check. Reduced thikness to fit other texts & icons
  • Popup. Changing content size doesn't recalc popup position
  • Popup. Wrong position if parent has style transform.translate
  • Popup. Content is blured if transform.translate with float values
  • DateControl. Clearing input doesn't reset $value
  • DateControl. Required asterisk is removed by opening menu

New:

v0.3.0

28 Dec 07:33
Compare
Choose a tag to compare

BREAKING CHANGES:

  • DateControl:

    • Was
      • changing $options.format & attr [format] related to all date-strings: attributes initvalue/min/max.
      • default value YYYY-MM-DD
    • Now
      • changing $options.format & attr [format] related only to displayed text. All attributes must be pointed in universal format YYYY-MM-DD
      • default value depends on user localization; see locale
      • $options.firstWeekDay - default value depends on user localization; see locale
  • CalendarControl:

    • deprecated static getters $namesDayShort, $namesMonth, $namesMonthShort in favor of localeInfo helper
    • $options.firstDayOfWeek is renamed to firstWeekDay
    • $options.firstWeekDay - default value depends on user localization; see locale

Fixes:

  • Helper. promiseWait. Callback called before time end
  • Popup with arrow. Firefox bug: css filter drop-shadow works wrong with angle 180.0
  • SpinElement. Impossible to override color via applying css-var to body --spin-2

Features: