Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@anglr/datetime

Package Overview
Dependencies
Maintainers
0
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anglr/datetime - npm Package Versions

1
11

6.0.0-beta.20221223105933

Diff

kukjevov
published 6.0.0-beta.20221223060503 •

kukjevov
published 6.0.0-beta.20221222085135 •

kukjevov
published 5.0.0 •

Changelog

Source

Version 5.0.0 (2022-10-21)

Features

  • new DateTimeInputValue interface, which defines date time input value API
    • properties
      • value current value of date time, could be string, unix timestamp, Date, TDate object, or ranged DateTimeValue
      • valueChange occurs when value changes
  • new DateTimeInput interface, which defines date time input and communication API for it
    • extends
      • DateTimeInputValue
    • properties
      • rawValue value of date time, raw string value which is visible to user
      • disabled indication whether is date time disabled
      • focus occurs when input gains focus
      • blur occurs when input loses focus
      • element html element that represents input itself
  • new DateTimeModule module for basic date time directives, components, pipes
    • exports
      • DateTimeDirective,
      • DateTimeControlValueAccessorDirective
      • DateTimeInputDirective
      • DateTimeMaxValidatorDirective
      • DateTimeMinValidatorDirective
      • DateTimeValidatorDirective
  • new DATE_TIME_INPUT injection token, that is used for injecting type that represents date time input
  • new DateTimeBase class, that is base class for date time directives, contains basic shared data
    • implements
      • DateTimeInputValue
      • OnDestroy
  • new DateTimeInputDirective directive, that is used for setting up date time input
    • extends DateTimeBase
    • implements
      • DateTimeInput
      • OnDestroy
    • provides
      • DATE_TIME_INPUT providing self
  • new DateTimeControlValueAccessorDirective directive, that is control value accessor that is used for getting and setting value for date time
    • implements
      • ControlValueAccessor
      • OnDestroy
    • provides
      • NG_VALUE_ACCESSOR providing self
  • new DateTimeValidatorDirective directive, that applies validator for date time
    • extends DateTimeBase
    • implements
      • Validator
      • OnInit
    • provides
      • NG_VALIDATORS providing self
  • new DateTimeMaxValidatorDirective directive, that applies validator for date time max value
    • extends DateTimeBase
    • implements
      • Validator
      • OnInit
    • provides
      • NG_VALIDATORS providing self
  • new DateTimeMinValidatorDirective directive, that applies validator for date time min value
    • extends DateTimeBase
    • implements
      • Validator
      • OnInit
    • provides
      • NG_VALIDATORS providing self
  • new DateTimeValueFormat enum, that represents available formats for date time value
    • DateInstance instance of date
    • UnixTimestamp numeric unix timestamp in miliseconds
    • FormattedString formatted date as string value
    • RangeOfDateInstances range of date instances from, to
  • new DateTimeObjectValue type that represents parsed date value or values in case of range
  • new DateTimeInputOutputValue type that represents input output types that can be processed by date time
  • new parseDateTime function, that parses date time input output value
  • new formatDateTime function, that formats value into specified format of date time
  • new isDateTimeValue function, that tests whether value is DateTimeValue
  • new getSingleDateTimeValue function, that gets single date time value, use in places where ranged date time can not be used
  • new datetimeValidator function, that is date time validator factory function, creates validator for checking validity of datetime
  • new datetimeMaxValidator function, that is date time validator factory function, creates validator for checking validity of datetime max value
  • new datetimeMinValidator function, that is date time validator factory function, creates validator for checking validity of datetime min value
  • new DateTimeValidationArgs interface, that represents validations arguments for date time validators for model based forms
    • properties
      • valueFormat format of validated value
      • stringFormat format of string value
      • maxValue max allowed value
      • minValue min allowed value
  • new dateTimeModelValidatorFactory function, that is factory function that creates validator function factory
  • new DateTime decorator, that sets date time validator to property on which is used
  • new DateTimePickerModule module, that is module for components that are used as date time picker
    • exports
      • DateTimePickerComponent
      • DateTimePickerDirective
  • new DateTimePickerDirective directive, that is directive that is used for displaying and attaching date time picker
    • extends DateTimeBase
    • implements
      • OnInit
      • OnDestroy
    • inputs
      • withPickerOptions gets or sets options for date time picker directive
    • methods
      • showPicker hides date time picker
      • hidePicker shows date time picker
  • new DateTimePickerComponent directive, which is component used for displaying date time picker
    • extends DateTimeDirective
    • implements
      • DateTimeInputValue
      • OnChanges
      • OnDestroy
      • OnInit
    • inputs
      • value docs from DateTimeInputValue
      • options options for date time picker
    • outputs
      • valueChange docs from DateTimeInputValue
  • new DateTimePicker interface, which describes date time picker API for each date time period
    • extends
      • Invalidatable
    • properties
      • value value of date time picker
      • display date that describes which date should be displayed
      • maxDate max allowed date
      • minDate min allowed date to be selected
      • canScaleUp indication whether picker can display scale date time period up
      • canScaleDown indication whether picker can display scale date time period down
      • ranged indication whether is value range of two values or single value
      • valueChange occurs when date time picker value changes
      • scaleUp occurs when period should be scaled up
      • scaleDown occurs when period should be scaled down
  • new DateTimePickerDirectiveOptions directive, which is defintion of date time picker directive options
    • properties
      • closeOnValueSelect indication whether close picker on value selection
      • closeOnBlur indication whether close picker when date time input loses focus
      • showOnFocus indication whether display picker when date time input gets focus
      • alwaysVisible indication whether is picker always visible, mostly used for debugging
      • disabled indication whether picker is disabled, if true, you cant display picker
      • absolute indication whether use absolute global positioning of picker
      • positionOptions position options that are used to position picker
      • pickerCssClass custom css class that is being added to picker component
  • new DATE_TIME_PICKER_DIRECTIVE_OPTIONS injection token for global options for date time picker directive
  • new DATE_TIME_PICKER_OPTIONS injection token for global options for date time picker component
  • new DateTimePeriodPickerBase class, which is base abstract class for each date time period picker
    • implements
      • DateTimePicker
  • new DateTimePickerOptions interface, that is defintion of date time picker component options
    • properties
      • periodsDefinition definition of types for each period type for picker
      • defaultPeriod name of default period for picker that is displayed after opening
  • new DateTimeDirective directive, that holds shared data for date time, like formats, restrictions
    • implements
      • OnDestroy
    • properties
      • maxDateTimeChanges occurs when there are changes in max date time value
      • minDateTimeChanges occurs when there are changes in min date time value
    • inputs
      • valueFormat gets or sets date time value format which is being worked with in this date time
      • format gets or sets format of string representation of date
      • customFormat custom format string representation of date
      • maxDateTime gets or sets max allowed date for date time
      • minDateTime gets or sets min allowed date for date time
  • new DayPickerSAComponent component, which is used for displaying day picker
    • extends DateTimePeriodPickerBase
    • implements
      • DateTimePicker
  • new MonthPickerSAComponent component, which is used for displaying month picker
    • extends DateTimePeriodPickerBase
    • implements
      • DateTimePicker
  • new YearPickerSAComponent component, which is used for displaying year picker
    • extends DateTimePeriodPickerBase
    • implements
      • DateTimePicker
  • new RollerTimePickerSAComponent component, which is used for rendering roller time picker
    • extends DateTimePeriodPickerBase
    • implements
      • DateTimePicker
  • new WithTimeSADirective directive, that sets up usage of date time picker to use time format and time picker
  • new WithTodaySADirective directive, that sets today as day for empty date time on focus
  • updated DateApiObject interface
    • new unixTimestamp method, that gets value of date time as unix timestamp
  • updated DateFormatPipe
    • improved typings for transform
  • subpackage @anglr/datetime/moment
    • updated MomentDateApi
      • now implements also new unixTimestamp
  • subpackage @anglr/datetime/date-fns
    • updated DateFnsDateApi
      • now implements also new unixTimestamp

BREAKING CHANGES

  • dropped support of Node.js version 12
  • minimal supported version of @angular is now 14.2.6
  • minimal supported version of rxjs is now 7.5.6
  • minimal supported version of @jscrpt/common is now 3.1.0
  • minimal supported version of @anglr/common is now 14.1.0
  • minimal supported version of tslib is now 2.4.0
  • minimal supported version of moment is now 2.29.4
  • minimal supported version of date-fns is now 2.29.3
  • dropped dependency positions
  • all previous selectors, pickers and everything is now deprecated and marked as legacy
  • updated DateTimeValue interface
    • from can now also be undefined or null
    • to can now also be undefined or null
  • updated DateTimeRelativeParser service
    • now m means minutes and M means months
  • updated DateTimePickerModule renamed to DateTimeLegacyPickerModule
  • updated DateTimePickerComponent renamed to DateTimePickerLegacyComponent
  • updated DateTimePicker renamed to DateTimeLegacyPicker
  • updated DateTimePickerOptions renamed to DateTimePickerLegacyOptions
  • updated DateFormatPipe
    • typings that allows custom format must use customFormat new parameter
kukjevov
published 5.0.0-beta.20221021074029 •

kukjevov
published 5.0.0-beta.20221021035527 •

kukjevov
published 5.0.0-beta.20221020191430 •

kukjevov
published 5.0.0-beta.20221020182702 •

kukjevov
published 5.0.0-beta.20221020181131 •

kukjevov
published 5.0.0-beta.20221020172624 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc