@datarailsshared/datarailsshared 1.4.48-bratans → 1.4.49
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/bundles/datarailsshared-datarailsshared.umd.js +52 -98
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.49.tgz +0 -0
- package/datarailsshared-datarailsshared.d.ts +0 -1
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/datarailsshared-datarailsshared.js +1 -2
- package/esm2015/lib/dr-inputs/button/button.component.js +2 -2
- package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.js +9 -19
- package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.js +8 -23
- package/esm2015/lib/dr-inputs/date-pickers/services/dr-date-picker.service.js +4 -32
- package/esm2015/lib/dr-inputs/dr-inputs.module.js +2 -4
- package/esm2015/lib/models/datePicker.js +1 -3
- package/esm2015/lib/utils/dr-shared-utils.js +27 -0
- package/esm2015/public-api.js +2 -1
- package/fesm2015/datarailsshared-datarailsshared.js +44 -86
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-inputs/button/button.component.d.ts +1 -1
- package/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.d.ts +1 -3
- package/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.d.ts +1 -2
- package/lib/dr-inputs/date-pickers/services/dr-date-picker.service.d.ts +0 -2
- package/lib/models/datePicker.d.ts +1 -4
- package/lib/utils/dr-shared-utils.d.ts +8 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/datarailsshared-datarailsshared-1.4.48-bratans.tgz +0 -0
- package/esm2015/lib/dr-inputs/date-pickers/dr-show-timeframe.pipe.js +0 -12
- package/lib/dr-inputs/date-pickers/dr-show-timeframe.pipe.d.ts +0 -6
package/esm2015/public-api.js
CHANGED
|
@@ -55,4 +55,5 @@ export { DrPopoverModule } from './lib/dr-popover/dr-popover.module';
|
|
|
55
55
|
export { DrDropdownModule } from './lib/dr-dropdown/dr-dropdown.module';
|
|
56
56
|
export { DrTabsModule } from './lib/dr-tabs/dr-tabs.module';
|
|
57
57
|
export { DrAccordionModule } from './lib/dr-accordion/accordion.module';
|
|
58
|
-
|
|
58
|
+
export { DrSharedUtils } from './lib/utils/dr-shared-utils';
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2RhdGFyYWlsc3NoYXJlZC9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxnQkFBZ0I7QUFDaEIsY0FBYyxvQ0FBb0MsQ0FBQztBQUNuRCxjQUFjLHFEQUFxRCxDQUFDO0FBQ3BFLGNBQWMsK0NBQStDLENBQUM7QUFDOUQsY0FBYyxtREFBbUQsQ0FBQztBQUNsRSxjQUFjLDZDQUE2QyxDQUFDO0FBQzVELGNBQWMsNkNBQTZDLENBQUM7QUFDNUQsY0FBYyxnQ0FBZ0MsQ0FBQztBQUMvQyxjQUFjLG9DQUFvQyxDQUFDO0FBQ25ELGNBQWMsMkNBQTJDLENBQUM7QUFDMUQsY0FBYyxvQ0FBb0MsQ0FBQztBQUNuRCxjQUFjLHFEQUFxRCxDQUFDO0FBQ3BFLGNBQWMsb0RBQW9ELENBQUM7QUFDbkUsY0FBYyw2Q0FBNkMsQ0FBQztBQUM1RCxjQUFjLDZDQUE2QyxDQUFDO0FBQzVELGNBQWMsK0NBQStDLENBQUM7QUFDOUQsY0FBYyxxQ0FBcUMsQ0FBQztBQUNwRCxjQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGNBQWMsdU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2xpYi9kci10YWJzL2RyLXRhYnMubW9kdWxlJztcbmV4cG9ydCB7IERyQWNjb3JkaW9uTW9kdWxlIH0gZnJvbSAnLi9saWIvZHItYWNjb3JkaW9uL2FjY29yZGlvbi5tb2R1bGUnO1xuZXhwb3J0IHsgRHJTaGFyZWRVdGlscyB9IGZyb20gJy4vbGliL3V0aWxzL2RyLXNoYXJlZC11dGlscyc7XG4iXX0=
|
|
@@ -1893,7 +1893,7 @@ DrButtonComponent.decorators = [
|
|
|
1893
1893
|
{ type: Component, args: [{
|
|
1894
1894
|
selector: 'dr-button',
|
|
1895
1895
|
template: "<button (click)=\"onClick($event)\" [disabled]=\"_disabled\" [attr.is-loading]=\"_isLoading\" [attr.bold]=\"isBold\"\n [attr.icon]=\"!!icon\" [attr.iconAfterLabel]=\"!!iconAfterLabel\" [attr.theme]=\"theme\">\n <ng-container *ngIf=\"!_isLoading\">\n <i *ngIf=\"icon\" class=\"dr\" [class]=\"icon\" [style.color]=\"iconColor || 'inherit'\"></i>\n <ng-content></ng-content>\n <i *ngIf=\"theme === 'dropdown'\" class=\"dr-icon-arrow-down\"></i>\n <i *ngIf=\"iconAfterLabel\" class=\"dr dr-last\" [class]=\"iconAfterLabel\" [style.color]=\"iconColor || 'inherit'\"></i>\n </ng-container>\n <i *ngIf=\"_isLoading\" class=\"dr dr-spinner dr-icon-load\"></i>\n</button>\n",
|
|
1896
|
-
styles: [":host{display:inline-block}:host.disabled,:host.loading{pointer-events:none}:host button[theme]{cursor:pointer;border-radius:16px;padding:5px 16px;font-family:\"Poppins\";font-style:normal;font-weight:400;font-size:14px;line-height:22px;color:#4e566c;border:1px solid #7F7FDD;display:flex;justify-content:space-between;align-items:center;height:32px}:host button[theme] .dr{padding:0;margin-left:5.35px;margin-right:8.64px}:host button[theme] .dr-spinner{animation-name:rotate;animation-iteration-count:infinite;animation-duration:1s}@keyframes rotate{0%{transform:rotate()}to{transform:rotate(360deg)}}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=secondary]{padding:5px 16px;background:#FFFFFF;border-radius:16px;min-width:90px}:host button[theme][theme~=split-secondary-first]:hover:not([disabled]),:host button[theme][theme~=split-secondary-last]:hover:not([disabled]),:host button[theme][theme~=secondary]:hover:not([disabled]){color:#4e566c;transition:.2ms ease-in all;background:#F2F2FB;box-shadow:0 4px 14px #0000001a;border:1px solid #4646CE}:host button[theme][theme~=split-secondary-first]:active,:host button[theme][theme~=split-secondary-last]:active,:host button[theme][theme~=secondary]:active{box-shadow:none;background:#F2F2FB}:host button[theme][theme~=split-secondary-first][disabled],:host button[theme][theme~=split-secondary-last][disabled],:host button[theme][theme~=secondary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-secondary-first][is-loading=true],:host button[theme][theme~=split-secondary-last][is-loading=true],:host button[theme][theme~=secondary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-last],:host button[theme][theme~=primary]{background:#4646CE;color:#fff;border:none;min-width:90px}:host button[theme][theme~=split-primary-first]:hover:not([disabled]),:host button[theme][theme~=split-primary-last]:hover:not([disabled]),:host button[theme][theme~=primary]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%);box-shadow:0 4px 14px #0000001a;border:none}:host button[theme][theme~=split-primary-first]:active,:host button[theme][theme~=split-primary-last]:active,:host button[theme][theme~=primary]:active{background:#25258C}:host button[theme][theme~=split-primary-first][disabled],:host button[theme][theme~=split-primary-last][disabled],:host button[theme][theme~=primary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-primary-first][is-loading=true],:host button[theme][theme~=split-primary-last][is-loading=true],:host button[theme][theme~=primary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first] .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=primary] .dr{margin:0}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover,:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{min-width:unset;border-bottom-right-radius:0;border-top-right-radius:0;padding-left:10px;padding-right:8px}:host button[theme][theme~=split-secondary-first][icon=true],:host button[theme][theme~=split-secondary-first]:hover[icon=true],:host button[theme][theme~=split-primary-first][icon=true],:host button[theme][theme~=split-primary-first]:hover[icon=true]{padding-left:6px;padding-right:2px}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{border-right:1px solid #fff!important}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover{border-right:none!important}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover,:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{min-width:unset;border-bottom-left-radius:0;border-top-left-radius:0;padding-left:8px;padding-right:10px}:host button[theme][theme~=split-secondary-last][icon=true],:host button[theme][theme~=split-secondary-last]:hover[icon=true],:host button[theme][theme~=split-primary-last][icon=true],:host button[theme][theme~=split-primary-last]:hover[icon=true]{padding-left:2px;padding-right:6px}:host button[theme][theme~=split-secondary-last] .dr,:host button[theme][theme~=split-secondary-last]:hover .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=split-primary-last]:hover .dr{margin:0}:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{border-left:none}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover{margin-left:-1px}:host button[theme][theme~=danger]{background:#BF1D30;color:#fff;border:none;min-width:90px}:host button[theme][theme~=danger]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#740e1a 0%,#BF1D30 100%);box-shadow:0 4px 14px #0000001a;border-radius:16px;border:none}:host button[theme][theme~=danger]:active{background:#740e1a}:host button[theme][theme~=danger][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=danger][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=ghost]{background:none;border:none;color:#151b3f;padding:4px 8px}:host button[theme][theme~=ghost] .dr{margin-left:4.5px;margin-right:12.5px}:host button[theme][theme~=ghost]:hover:not([disabled]){color:#4646ce;background:#F2F2FB;border-radius:4px}:host button[theme][theme~=ghost][disabled]{color:#727583;cursor:default;pointer-events:none}:host button[theme][theme~=text-link]{background:none;border:none;color:#0b5af9}:host button[theme][theme~=text-link][disabled]{color:#727583;pointer-events:none}:host button[theme][theme~=primary-icon]{padding:8px;width:28px;height:28px;justify-content:center;color:#fff;background:#4646CE;border:none}:host button[theme][theme~=primary-icon]:hover,:host button[theme][theme~=primary-icon]:active{background:linear-gradient(96.89deg,#131318 0%,#4646CE 100%)}:host button[theme][theme~=primary-icon][disabled]{color:#bcbcbc;background:#E5E6EA;cursor:default;pointer-events:none}:host button[theme][theme~=primary-icon] .dr{margin:0}:host button[theme][theme~=secondary-icon]{background:white;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:1px solid #7F7FDD}:host button[theme][theme~=secondary-icon]:hover,:host button[theme][theme~=secondary-icon]:active{color:#4646ce;background:#F2F2FB}:host button[theme][theme~=secondary-icon][disabled]{color:#bcbcbc;background:#E5E6EA;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=secondary-icon] .dr{margin:0}:host button[theme][theme~=simple-text]{color:#0c142b;border:none;background:none}:host button[theme][theme~=simple-text] .dr{margin:0 8px 0 0}:host button[theme][theme~=icon]{background:none;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:none}:host button[theme][theme~=icon]:hover,:host button[theme][theme~=icon]:active{background:#F0F3FC;color:#4646ce}:host button[theme][theme~=icon][disabled]{color:#bcbcbc;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=icon][disabled]:hover,:host button[theme][theme~=icon][disabled]:active{background:none}:host button[theme][theme~=icon] .dr{margin:0}:host button[theme][theme~=dropdown]{
|
|
1896
|
+
styles: [":host{display:inline-block}:host.disabled,:host.loading{pointer-events:none}:host button[theme]{cursor:pointer;border-radius:16px;padding:5px 16px;font-family:\"Poppins\";font-style:normal;font-weight:400;font-size:14px;line-height:22px;color:#4e566c;border:1px solid #7F7FDD;display:flex;justify-content:space-between;align-items:center;height:32px}:host button[theme] .dr{padding:0;margin-left:5.35px;margin-right:8.64px}:host button[theme] .dr-spinner{animation-name:rotate;animation-iteration-count:infinite;animation-duration:1s}@keyframes rotate{0%{transform:rotate()}to{transform:rotate(360deg)}}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=secondary]{padding:5px 16px;background:#FFFFFF;border-radius:16px;min-width:90px}:host button[theme][theme~=split-secondary-first]:hover:not([disabled]),:host button[theme][theme~=split-secondary-last]:hover:not([disabled]),:host button[theme][theme~=secondary]:hover:not([disabled]){color:#4e566c;transition:.2ms ease-in all;background:#F2F2FB;box-shadow:0 4px 14px #0000001a;border:1px solid #4646CE}:host button[theme][theme~=split-secondary-first]:active,:host button[theme][theme~=split-secondary-last]:active,:host button[theme][theme~=secondary]:active{box-shadow:none;background:#F2F2FB}:host button[theme][theme~=split-secondary-first][disabled],:host button[theme][theme~=split-secondary-last][disabled],:host button[theme][theme~=secondary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-secondary-first][is-loading=true],:host button[theme][theme~=split-secondary-last][is-loading=true],:host button[theme][theme~=secondary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-last],:host button[theme][theme~=primary]{background:#4646CE;color:#fff;border:none;min-width:90px}:host button[theme][theme~=split-primary-first]:hover:not([disabled]),:host button[theme][theme~=split-primary-last]:hover:not([disabled]),:host button[theme][theme~=primary]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%);box-shadow:0 4px 14px #0000001a;border:none}:host button[theme][theme~=split-primary-first]:active,:host button[theme][theme~=split-primary-last]:active,:host button[theme][theme~=primary]:active{background:#25258C}:host button[theme][theme~=split-primary-first][disabled],:host button[theme][theme~=split-primary-last][disabled],:host button[theme][theme~=primary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-primary-first][is-loading=true],:host button[theme][theme~=split-primary-last][is-loading=true],:host button[theme][theme~=primary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first] .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=primary] .dr{margin:0}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover,:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{min-width:unset;border-bottom-right-radius:0;border-top-right-radius:0;padding-left:10px;padding-right:8px}:host button[theme][theme~=split-secondary-first][icon=true],:host button[theme][theme~=split-secondary-first]:hover[icon=true],:host button[theme][theme~=split-primary-first][icon=true],:host button[theme][theme~=split-primary-first]:hover[icon=true]{padding-left:6px;padding-right:2px}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{border-right:1px solid #fff!important}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover{border-right:none!important}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover,:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{min-width:unset;border-bottom-left-radius:0;border-top-left-radius:0;padding-left:8px;padding-right:10px}:host button[theme][theme~=split-secondary-last][icon=true],:host button[theme][theme~=split-secondary-last]:hover[icon=true],:host button[theme][theme~=split-primary-last][icon=true],:host button[theme][theme~=split-primary-last]:hover[icon=true]{padding-left:2px;padding-right:6px}:host button[theme][theme~=split-secondary-last] .dr,:host button[theme][theme~=split-secondary-last]:hover .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=split-primary-last]:hover .dr{margin:0}:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{border-left:none}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover{margin-left:-1px}:host button[theme][theme~=danger]{background:#BF1D30;color:#fff;border:none;min-width:90px}:host button[theme][theme~=danger]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#740e1a 0%,#BF1D30 100%);box-shadow:0 4px 14px #0000001a;border-radius:16px;border:none}:host button[theme][theme~=danger]:active{background:#740e1a}:host button[theme][theme~=danger][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=danger][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=ghost]{background:none;border:none;color:#151b3f;padding:4px 8px}:host button[theme][theme~=ghost] .dr{margin-left:4.5px;margin-right:12.5px}:host button[theme][theme~=ghost]:hover:not([disabled]){color:#4646ce;background:#F2F2FB;border-radius:4px}:host button[theme][theme~=ghost][disabled]{color:#727583;cursor:default;pointer-events:none}:host button[theme][theme~=text-link]{background:none;border:none;color:#0b5af9}:host button[theme][theme~=text-link][disabled]{color:#727583;pointer-events:none}:host button[theme][theme~=primary-icon]{padding:8px;width:28px;height:28px;justify-content:center;color:#fff;background:#4646CE;border:none}:host button[theme][theme~=primary-icon]:hover,:host button[theme][theme~=primary-icon]:active{background:linear-gradient(96.89deg,#131318 0%,#4646CE 100%)}:host button[theme][theme~=primary-icon][disabled]{color:#bcbcbc;background:#E5E6EA;cursor:default;pointer-events:none}:host button[theme][theme~=primary-icon] .dr{margin:0}:host button[theme][theme~=secondary-icon]{background:white;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:1px solid #7F7FDD}:host button[theme][theme~=secondary-icon]:hover,:host button[theme][theme~=secondary-icon]:active{color:#4646ce;background:#F2F2FB}:host button[theme][theme~=secondary-icon][disabled]{color:#bcbcbc;background:#E5E6EA;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=secondary-icon] .dr{margin:0}:host button[theme][theme~=simple-text]{color:#0c142b;border:none;background:none}:host button[theme][theme~=simple-text] .dr{margin:0 8px 0 0}:host button[theme][theme~=icon]{background:none;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:none}:host button[theme][theme~=icon]:hover,:host button[theme][theme~=icon]:active{background:#F0F3FC;color:#4646ce}:host button[theme][theme~=icon][disabled]{color:#bcbcbc;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=icon][disabled]:hover,:host button[theme][theme~=icon][disabled]:active{background:none}:host button[theme][theme~=icon] .dr{margin:0}:host button[theme][theme~=dropdown],:host button[theme][theme~=primary-square]{background:#FFFFFF;border-radius:6px;border:1px solid #C3C4CE;box-shadow:none;min-width:unset}:host button[theme][theme~=dropdown]:hover,:host button[theme][theme~=primary-square]:hover{border-color:#85889c}:host button[theme][theme~=dropdown]:active,:host button[theme][theme~=primary-square]:active{border-color:#4646ce}:host button[theme][theme~=dropdown] i:first-child,:host button[theme][theme~=primary-square] i:first-child{margin-right:3px}:host button[theme][theme~=dropdown] i:last-child,:host button[theme][theme~=primary-square] i:last-child{margin-left:3px}:host button[theme][theme~=dropdown]{padding:0 8px}:host button[theme][theme~=primary-square]{padding:0;-webkit-user-select:none;user-select:none}:host button[theme][theme~=primary-square]:hover{background-color:#f9f7ff;border:1px solid #7E828E}:host button[theme][theme~=primary-square]:active{background-color:#f2f2fb;border:1px solid #4646CE}:host button[theme][theme~=primary-square][disabled]{opacity:.6;pointer-events:none}:host button[theme][theme~=link-btn]{padding:5px 8px;border:none;background:none;border-radius:5px;color:#0c142b}:host button[theme][theme~=link-btn] .dr{margin:0 4px 0 0}:host button[theme][theme~=link-btn] .dr-last{margin-right:0;margin-left:4px}:host button[theme][theme~=link-btn]:hover{background:#F2F2FB;color:#4646ce}:host button[theme][theme~=link-btn]:active{background:#F2F2FB;color:#25258c}:host button[theme][theme~=link-btn]:disabled{background:none;color:#727583}:host button[theme][theme~=link-btn]:disabled .dr{color:#bcbcbc}:host button[theme][bold=true]{font-weight:600}:host button[theme][icon=true]:not([theme~=\"primary-square\"]){padding-left:8px}:host button[theme][icon=false]{justify-content:center}:host.dr-button-selected button[theme][theme~=primary-square]{background-color:#f2f2fb;border:1px solid #4646CE}\n"]
|
|
1897
1897
|
},] }
|
|
1898
1898
|
];
|
|
1899
1899
|
DrButtonComponent.ctorParameters = () => [];
|
|
@@ -2904,7 +2904,6 @@ var DateFromats;
|
|
|
2904
2904
|
DateFromats["YEAR_FORMAT"] = "yyyy";
|
|
2905
2905
|
DateFromats["MONTH_YEAR_FORMAT"] = "MM/yyyy";
|
|
2906
2906
|
DateFromats["QUARTER_FORMAT"] = "Q/yyyy";
|
|
2907
|
-
DateFromats["WEEK_FORMAT"] = "W/yyyy";
|
|
2908
2907
|
})(DateFromats || (DateFromats = {}));
|
|
2909
2908
|
class CustomDateFormat {
|
|
2910
2909
|
constructor() {
|
|
@@ -2952,7 +2951,6 @@ var TimeframeOption;
|
|
|
2952
2951
|
TimeframeOption["DAY"] = "day";
|
|
2953
2952
|
TimeframeOption["MONTH"] = "month";
|
|
2954
2953
|
TimeframeOption["QUARTER"] = "quarter";
|
|
2955
|
-
TimeframeOption["WEEK"] = "week";
|
|
2956
2954
|
TimeframeOption["YEAR"] = "year";
|
|
2957
2955
|
})(TimeframeOption || (TimeframeOption = {}));
|
|
2958
2956
|
var CalendarView;
|
|
@@ -3034,34 +3032,12 @@ DrTagModule.decorators = [
|
|
|
3034
3032
|
},] }
|
|
3035
3033
|
];
|
|
3036
3034
|
|
|
3037
|
-
class
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
this.availableTimeframes = [
|
|
3044
|
-
TimeframeOption.DAY,
|
|
3045
|
-
TimeframeOption.WEEK,
|
|
3046
|
-
TimeframeOption.MONTH,
|
|
3047
|
-
TimeframeOption.QUARTER,
|
|
3048
|
-
TimeframeOption.YEAR
|
|
3049
|
-
];
|
|
3050
|
-
this.formatConfig = {
|
|
3051
|
-
day: DateFromats.MAT_DEFAULT_DATE_FORMAT,
|
|
3052
|
-
month: DateFromats.MONTH_YEAR_FORMAT,
|
|
3053
|
-
year: DateFromats.YEAR_FORMAT,
|
|
3054
|
-
quarter: DateFromats.QUARTER_FORMAT,
|
|
3055
|
-
week: DateFromats.WEEK_FORMAT
|
|
3056
|
-
};
|
|
3057
|
-
}
|
|
3058
|
-
getQuarterDisplay(value) {
|
|
3059
|
-
return 'Q' + value.format(this.formatConfig.quarter);
|
|
3060
|
-
}
|
|
3061
|
-
getWeekDisplay(value) {
|
|
3062
|
-
return 'W' + value.format(this.formatConfig.week);
|
|
3063
|
-
}
|
|
3064
|
-
getTimeframe(format) {
|
|
3035
|
+
class DrSharedUtils {
|
|
3036
|
+
/**
|
|
3037
|
+
* Get timeframe (day, year, month, quarter) based on passed format
|
|
3038
|
+
* @param format - date format string. Examples: MM/DD/YYYY, Q/YYYY
|
|
3039
|
+
*/
|
|
3040
|
+
static getTimeframeByDateFormat(format) {
|
|
3065
3041
|
const defaultFrame = TimeframeOption.DAY;
|
|
3066
3042
|
if (!format) {
|
|
3067
3043
|
return defaultFrame;
|
|
@@ -3074,14 +3050,33 @@ class DrDatePickerService {
|
|
|
3074
3050
|
return TimeframeOption.DAY;
|
|
3075
3051
|
case lowerCaseFormat.includes('m'):
|
|
3076
3052
|
return TimeframeOption.MONTH;
|
|
3077
|
-
case lowerCaseFormat.includes('w'):
|
|
3078
|
-
return TimeframeOption.WEEK;
|
|
3079
3053
|
case lowerCaseFormat.includes('y'):
|
|
3080
3054
|
return TimeframeOption.YEAR;
|
|
3081
3055
|
default:
|
|
3082
3056
|
return defaultFrame;
|
|
3083
3057
|
}
|
|
3084
3058
|
}
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
class DrDatePickerService {
|
|
3062
|
+
constructor() {
|
|
3063
|
+
this.isTimeframeSelectionEnabled = false;
|
|
3064
|
+
this.timeframe = TimeframeOption.DAY;
|
|
3065
|
+
this.format$ = new BehaviorSubject(DateFromats.MAT_DEFAULT_DATE_FORMAT);
|
|
3066
|
+
this.updatedQuarter$ = new Subject();
|
|
3067
|
+
this.formatConfig = {
|
|
3068
|
+
day: DateFromats.MAT_DEFAULT_DATE_FORMAT,
|
|
3069
|
+
month: DateFromats.MONTH_YEAR_FORMAT,
|
|
3070
|
+
year: DateFromats.YEAR_FORMAT,
|
|
3071
|
+
quarter: DateFromats.QUARTER_FORMAT,
|
|
3072
|
+
};
|
|
3073
|
+
}
|
|
3074
|
+
getQuarterDisplay(value) {
|
|
3075
|
+
return 'Q' + value.quarter() + this.format$.getValue().charAt(1) + value.year();
|
|
3076
|
+
}
|
|
3077
|
+
getTimeframe(format) {
|
|
3078
|
+
return DrSharedUtils.getTimeframeByDateFormat(format);
|
|
3079
|
+
}
|
|
3085
3080
|
getConfiguredFormat(timeframe) {
|
|
3086
3081
|
return this.formatConfig[timeframe];
|
|
3087
3082
|
}
|
|
@@ -3110,37 +3105,25 @@ class DrDatePickerCustomHeaderComponent {
|
|
|
3110
3105
|
this.quarters = [1, 2, 3, 4];
|
|
3111
3106
|
this.selectedQuarter = 1;
|
|
3112
3107
|
this.timeframeOptions = [{
|
|
3113
|
-
timeframe: TimeframeOption.DAY,
|
|
3114
|
-
value: CalendarView.FOR_DAYS,
|
|
3115
3108
|
title: 'Day',
|
|
3116
|
-
format: this.datePickerService.formatConfig.day,
|
|
3117
|
-
periodLabel: () => this._dateAdapter
|
|
3118
|
-
.format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel)
|
|
3119
|
-
.toLocaleUpperCase()
|
|
3120
|
-
}, {
|
|
3121
|
-
timeframe: TimeframeOption.WEEK,
|
|
3122
3109
|
value: CalendarView.FOR_DAYS,
|
|
3123
|
-
|
|
3124
|
-
format: this.datePickerService.formatConfig.week,
|
|
3110
|
+
format: this.datePickerService.formatConfig.day,
|
|
3125
3111
|
periodLabel: () => this._dateAdapter
|
|
3126
3112
|
.format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel)
|
|
3127
3113
|
.toLocaleUpperCase()
|
|
3128
3114
|
}, {
|
|
3129
|
-
timeframe: TimeframeOption.MONTH,
|
|
3130
|
-
value: CalendarView.FOR_MONTHS,
|
|
3131
3115
|
title: 'Month',
|
|
3116
|
+
value: CalendarView.FOR_MONTHS,
|
|
3132
3117
|
format: this.datePickerService.formatConfig.month,
|
|
3133
3118
|
periodLabel: () => String(moment$1(this._calendar.activeDate).year())
|
|
3134
3119
|
}, {
|
|
3135
|
-
timeframe: TimeframeOption.QUARTER,
|
|
3136
|
-
value: CalendarView.FOR_QUARTERS,
|
|
3137
3120
|
title: 'Quarter',
|
|
3121
|
+
value: CalendarView.FOR_QUARTERS,
|
|
3138
3122
|
format: this.datePickerService.formatConfig.quarter,
|
|
3139
3123
|
periodLabel: () => String(moment$1(this._calendar.activeDate).year())
|
|
3140
3124
|
}, {
|
|
3141
|
-
timeframe: TimeframeOption.YEAR,
|
|
3142
|
-
value: CalendarView.FOR_YEARS,
|
|
3143
3125
|
title: 'Year',
|
|
3126
|
+
value: CalendarView.FOR_YEARS,
|
|
3144
3127
|
format: this.datePickerService.formatConfig.year,
|
|
3145
3128
|
periodLabel: () => {
|
|
3146
3129
|
const currentYear = moment$1(this._calendar.activeDate).year();
|
|
@@ -3166,9 +3149,6 @@ class DrDatePickerCustomHeaderComponent {
|
|
|
3166
3149
|
this.selectedTimeframe = this.timeframeOptions.filter(option => option.format == value)[0].value;
|
|
3167
3150
|
_calendar.currentView = this.selectedTimeframe;
|
|
3168
3151
|
this.setPeriodLabels();
|
|
3169
|
-
if (this.selectedTimeframe === CalendarView.FOR_QUARTERS) {
|
|
3170
|
-
this.selectedQuarter = moment$1(this._calendar.activeDate).quarter();
|
|
3171
|
-
}
|
|
3172
3152
|
});
|
|
3173
3153
|
_calendar.viewChanged.pipe(takeUntil(this._destroyed)).subscribe(() => this.setPeriodLabels());
|
|
3174
3154
|
}
|
|
@@ -3179,7 +3159,7 @@ class DrDatePickerCustomHeaderComponent {
|
|
|
3179
3159
|
setPeriodLabels() {
|
|
3180
3160
|
const currentTimeframeOption = this.timeframeOptions.filter(option => option.value === this._calendar.currentView)[0];
|
|
3181
3161
|
const fullPeriodLabel = currentTimeframeOption.periodLabel();
|
|
3182
|
-
if (this._calendar.currentView ===
|
|
3162
|
+
if (this._calendar.currentView === 'month') {
|
|
3183
3163
|
this.periodMonthLabel = fullPeriodLabel.slice(0, 3);
|
|
3184
3164
|
this.periodYearLabel = fullPeriodLabel.slice(4);
|
|
3185
3165
|
}
|
|
@@ -3223,7 +3203,7 @@ class DrDatePickerCustomHeaderComponent {
|
|
|
3223
3203
|
DrDatePickerCustomHeaderComponent.decorators = [
|
|
3224
3204
|
{ type: Component, args: [{
|
|
3225
3205
|
selector: 'dr-date-picker_custom-header.component',
|
|
3226
|
-
template: "<div *ngIf=\"datePickerService.isTimeframeSelectionEnabled\" class=\"dr-datepicker__timeframe-select__wrapper\">\n <dr-select\n class=\"dr-datepicker__timeframe-select\"\n [(ngModel)]=\"selectedTimeframe\"\n [items]=\"timeframeOptions
|
|
3206
|
+
template: "<div *ngIf=\"datePickerService.isTimeframeSelectionEnabled\" class=\"dr-datepicker__timeframe-select__wrapper\">\n <dr-select\n class=\"dr-datepicker__timeframe-select\"\n [(ngModel)]=\"selectedTimeframe\"\n [items]=\"timeframeOptions\"\n bindLabel=\"title\"\n bindValue=\"value\"\n (ngModelChange)=\"setTimeframe()\">\n </dr-select>\n</div>\n\n<div class=\"dr-date-paging\">\n <div class=\"dr-date-paging flip-page-button\"\n (click)=\"pagingClicked(false)\">\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i>\n </div>\n <span class=\"example-header-label\">\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_MONTHS)\">{{periodMonthLabel + ' '}}</span>\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_YEARS)\">{{periodYearLabel}}</span>\n </span>\n <div class=\"dr-date-paging flip-page-button\"\n (click)=\"pagingClicked(true)\">\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\n </div>\n</div>\n<div #quarterlyDatePicker class=\"dr-quarterly-datepicker\" *ngIf=\"currentViewIsQuarter\">\n <div *ngFor=\"let quarter of quarters\"\n class=\"quarter-selector\" (click)=\"onSelectQuarter(quarter)\"\n [class]=\"quarter == selectedQuarter ? 'selected' : ''\"\n >Q{{quarter}}</div>\n</div>\n\n",
|
|
3227
3207
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3228
3208
|
styles: [":host{height:54px;align-items:center;font-family:\"Poppins\";font-style:normal;font-weight:600;font-size:14px;line-height:22px}.dr-datepicker__timeframe-select__wrapper{background-color:#f9faff;padding:16px 32px;border-radius:18px 18px 0 0}.dr-date-paging{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 8px;grid-gap:4px;gap:4px}.dr-date-paging.flip-page-button{width:20px;height:20px;padding:0;color:#4e566c}.dr-date-paging.flip-page-button:hover{border-radius:50%;background:#F2F2FB;color:#4646ce}.example-header-label{cursor:pointer}.dr-quarterly-datepicker{display:flex;justify-content:space-between;padding:10px}.dr-quarterly-datepicker .quarter-selector{display:block;width:74px;height:40px;text-align:center;border-radius:40px;font-weight:400;padding-top:9px}.dr-quarterly-datepicker .quarter-selector:hover{background:#F2F2FB;color:#4646ce;font-weight:600;cursor:pointer}.dr-quarterly-datepicker .quarter-selector.selected{background-color:#4646ce;color:#f3f7ff;font-weight:600}\n"]
|
|
3229
3209
|
},] }
|
|
@@ -3393,14 +3373,12 @@ class DrDatePickerWithTimeframeComponent extends DrDatePickerComponent {
|
|
|
3393
3373
|
[TimeframeOption.YEAR]: (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
|
|
3394
3374
|
[TimeframeOption.QUARTER]: (forward) => this.pagingDateChange('addCalendarMonths', 3, forward),
|
|
3395
3375
|
[TimeframeOption.MONTH]: (forward) => this.pagingDateChange('addCalendarMonths', 1, forward),
|
|
3396
|
-
[TimeframeOption.DAY]: (forward) => this.pagingDateChange('addCalendarDays', 1, forward)
|
|
3397
|
-
[TimeframeOption.WEEK]: (forward) => this.pagingDateChange('addCalendarDays', 7, forward)
|
|
3376
|
+
[TimeframeOption.DAY]: (forward) => this.pagingDateChange('addCalendarDays', 1, forward)
|
|
3398
3377
|
};
|
|
3399
3378
|
datePickerService.isTimeframeSelectionEnabled = true;
|
|
3400
3379
|
datePickerService.format$
|
|
3401
3380
|
.pipe(takeUntil(this.destroyed$))
|
|
3402
3381
|
.subscribe((value) => {
|
|
3403
|
-
datePickerService.format$.getValue();
|
|
3404
3382
|
this.onChangeFormat.emit(datePickerService.normalizeValue(value));
|
|
3405
3383
|
});
|
|
3406
3384
|
}
|
|
@@ -3414,26 +3392,19 @@ class DrDatePickerWithTimeframeComponent extends DrDatePickerComponent {
|
|
|
3414
3392
|
this.cdr.markForCheck();
|
|
3415
3393
|
}
|
|
3416
3394
|
}
|
|
3417
|
-
set availableTimeframes(value) {
|
|
3418
|
-
if (value && value.length) {
|
|
3419
|
-
this.datePickerService.availableTimeframes = value;
|
|
3420
|
-
}
|
|
3421
|
-
}
|
|
3422
3395
|
get displayedFormattedValue() {
|
|
3396
|
+
var _a;
|
|
3423
3397
|
if (!this.value) {
|
|
3424
3398
|
return this.placeholder;
|
|
3425
3399
|
}
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
return this.datePickerService.getQuarterDisplay(this.value);
|
|
3430
|
-
case formatCached === null || formatCached === void 0 ? void 0 : formatCached.includes('W'):
|
|
3431
|
-
return this.datePickerService.getWeekDisplay(this.value);
|
|
3432
|
-
default:
|
|
3433
|
-
return this.value.format(formatCached);
|
|
3434
|
-
}
|
|
3400
|
+
return ((_a = this.datePickerService.format$.getValue()) === null || _a === void 0 ? void 0 : _a.includes('Q'))
|
|
3401
|
+
? this.datePickerService.getQuarterDisplay(this.value)
|
|
3402
|
+
: this.value.format(this.datePickerService.format$.getValue());
|
|
3435
3403
|
}
|
|
3436
3404
|
ngOnInit() {
|
|
3405
|
+
if (this.dateFormatConfig) {
|
|
3406
|
+
this.datePickerService.formatConfig = Object.assign(Object.assign({}, this.datePickerService.formatConfig), this.dateFormatConfig);
|
|
3407
|
+
}
|
|
3437
3408
|
this.datePickerService.isTimeframeSelectionEnabled = this.canSelectTimeframe;
|
|
3438
3409
|
this.cdr.markForCheck();
|
|
3439
3410
|
}
|
|
@@ -3468,7 +3439,6 @@ DrDatePickerWithTimeframeComponent.propDecorators = {
|
|
|
3468
3439
|
isDashboardDatepicker: [{ type: Input }],
|
|
3469
3440
|
dateFormatConfig: [{ type: Input }],
|
|
3470
3441
|
canSelectTimeframe: [{ type: Input }],
|
|
3471
|
-
availableTimeframes: [{ type: Input }],
|
|
3472
3442
|
onChangeFormat: [{ type: Output }]
|
|
3473
3443
|
};
|
|
3474
3444
|
|
|
@@ -3514,17 +3484,6 @@ DrDatePickerFormatDirective.propDecorators = {
|
|
|
3514
3484
|
datePickerFormat: [{ type: Input, args: ['drDatePickerFormat',] }]
|
|
3515
3485
|
};
|
|
3516
3486
|
|
|
3517
|
-
class DrShowTimeframePipe {
|
|
3518
|
-
transform(arr, showOptions) {
|
|
3519
|
-
return arr.filter(item => showOptions.includes(item.timeframe));
|
|
3520
|
-
}
|
|
3521
|
-
}
|
|
3522
|
-
DrShowTimeframePipe.decorators = [
|
|
3523
|
-
{ type: Pipe, args: [{
|
|
3524
|
-
name: 'drShowTimeframePipe'
|
|
3525
|
-
},] }
|
|
3526
|
-
];
|
|
3527
|
-
|
|
3528
3487
|
// !!! Please do not use such approach in other places
|
|
3529
3488
|
// Hard fix for 'none' calendar view selection
|
|
3530
3489
|
MatCalendar.prototype.focusActiveCell = function () {
|
|
@@ -3544,8 +3503,7 @@ const components$1 = [
|
|
|
3544
3503
|
DrDatePickerWithTimeframeComponent,
|
|
3545
3504
|
DrDatePickerFormatDirective,
|
|
3546
3505
|
DrDatePickerCustomHeaderComponent,
|
|
3547
|
-
DrModelDebounceChangeDirective
|
|
3548
|
-
DrShowTimeframePipe
|
|
3506
|
+
DrModelDebounceChangeDirective
|
|
3549
3507
|
];
|
|
3550
3508
|
class DrInputsModule {
|
|
3551
3509
|
}
|
|
@@ -3707,5 +3665,5 @@ DrAccordionModule.decorators = [
|
|
|
3707
3665
|
* Generated bundle index. Do not edit.
|
|
3708
3666
|
*/
|
|
3709
3667
|
|
|
3710
|
-
export { AnyTagComponent, CalendarView, CheckboxComponent, CustomDateFormat, DateFromats, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DayTagComponent, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrButtonComponent, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrInputComponent, DrInputsModule, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrSelectComponent, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, ListTagComponent, ListTagModule, MonthTagComponent, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, SpinnerSize, SpinnerType, TimeframeOption, TooltipComponent, WeekTagComponent, YearTagComponent, components$2 as ɵa, POPUP_ANIMATION as ɵb, DrDatePickerComponent as ɵc, DrDatePickerService as ɵd, DrDatePickerWithTimeframeComponent as ɵe, DrDatePickerFormatDirective as ɵf, DrDatePickerCustomHeaderComponent as ɵg
|
|
3668
|
+
export { AnyTagComponent, CalendarView, CheckboxComponent, CustomDateFormat, DateFromats, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DayTagComponent, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrButtonComponent, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrInputComponent, DrInputsModule, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrSelectComponent, DrSharedUtils, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, ListTagComponent, ListTagModule, MonthTagComponent, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, SpinnerSize, SpinnerType, TimeframeOption, TooltipComponent, WeekTagComponent, YearTagComponent, components$2 as ɵa, POPUP_ANIMATION as ɵb, DrDatePickerComponent as ɵc, DrDatePickerService as ɵd, DrDatePickerWithTimeframeComponent as ɵe, DrDatePickerFormatDirective as ɵf, DrDatePickerCustomHeaderComponent as ɵg };
|
|
3711
3669
|
//# sourceMappingURL=datarailsshared-datarailsshared.js.map
|