Sha256: c21e18516ab65f8bcf44dbe721549e4c814c4f3b9852f0ecee698fd5aa272402

Contents?: true

Size: 1.56 KB

Versions: 176

Compression:

Stored size: 1.56 KB

Contents

/**
 * @ngdoc module
 * @name  Bastion.dates
 *
 * @description
 *   Module providing directives for formatting dates.
 */
angular.module('Bastion.dates', [
    'Bastion',
    'react'
]);

angular.module('Bastion.dates').factory('componentRegistry',
    ['$window', function($window) {
        return $window.tfm.componentRegistry;
    }]
);

angular.module('Bastion.dates').factory('dateComponent',
    ['componentRegistry', function(componentRegistry) {
        return function(componentName) {
            var dateWrapper = componentRegistry.wrapperFactory().with('i18n').wrapper;
            return dateWrapper(componentRegistry.getComponent(componentName).type);
        };
    }]
);

angular.module('Bastion.dates').directive('date',
    ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) {
        return reactDirective(dateComponent('IsoDate'), ['date']);
    }]
);

angular.module('Bastion.dates').directive('shortDateTime',
    ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) {
        return reactDirective(dateComponent('ShortDateTime'), ['date', 'seconds']);
    }]
);

angular.module('Bastion.dates').directive('longDateTime',
    ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) {
        return reactDirective(dateComponent('LongDateTime'), ['date', 'seconds']);
    }]
);

angular.module('Bastion.dates').directive('relativeDate',
    ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) {
        return reactDirective(dateComponent('RelativeDateTime'), ['date']);
    }]
);

Version data entries

176 entries across 176 versions & 1 rubygems

Version Path
katello-4.16.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.15.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.16.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.16.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.14.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.14.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.15.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.15.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.15.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.14.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.14.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.14.0.rc3 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.14.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.14.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.14.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.13.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.13.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.12.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.13.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
katello-4.12.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js