monkey-style-guide-v2 0.0.78 → 0.0.80
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/fesm2022/monkey-style-guide-v2.mjs +5 -72
- package/fesm2022/monkey-style-guide-v2.mjs.map +1 -1
- package/lib/components/download-button/download-button.component.d.ts +0 -1
- package/lib/components/tabs/tab-link.directive.d.ts +1 -1
- package/lib/services/index.d.ts +0 -1
- package/monkey-style-guide-v2-0.0.80.tgz +0 -0
- package/package.json +1 -1
- package/lib/services/file-cache.service.d.ts +0 -15
- package/monkey-style-guide-v2-0.0.78.tgz +0 -0
|
@@ -1748,70 +1748,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1748
1748
|
}]
|
|
1749
1749
|
}], ctorParameters: () => [] });
|
|
1750
1750
|
|
|
1751
|
-
/* eslint-disable no-console */
|
|
1752
|
-
/** ************************
|
|
1753
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
1754
|
-
* This style guide was developed by Monkey Exchange Team
|
|
1755
|
-
* MIT Licence
|
|
1756
|
-
************************* */
|
|
1757
|
-
class MonkeyEcxFileCacheService {
|
|
1758
|
-
constructor() {
|
|
1759
|
-
this.cache = new Map();
|
|
1760
|
-
this.EXPIRATION_MS = 15 * 60 * 1000;
|
|
1761
|
-
}
|
|
1762
|
-
isExpired(timestamp) {
|
|
1763
|
-
return Date.now() - timestamp > this.EXPIRATION_MS;
|
|
1764
|
-
}
|
|
1765
|
-
saveFile(filename, blob) {
|
|
1766
|
-
this.cache.set(filename, { filename, blob, timestamp: Date.now() });
|
|
1767
|
-
}
|
|
1768
|
-
hasFile(filename) {
|
|
1769
|
-
const file = this.cache.get(filename);
|
|
1770
|
-
if (!file)
|
|
1771
|
-
return false;
|
|
1772
|
-
if (this.isExpired(file.timestamp)) {
|
|
1773
|
-
this.cache.delete(filename);
|
|
1774
|
-
return false;
|
|
1775
|
-
}
|
|
1776
|
-
return true;
|
|
1777
|
-
}
|
|
1778
|
-
getFile(filename) {
|
|
1779
|
-
const file = this.cache.get(filename);
|
|
1780
|
-
if (!file)
|
|
1781
|
-
return null;
|
|
1782
|
-
if (this.isExpired(file.timestamp)) {
|
|
1783
|
-
this.cache.delete(filename);
|
|
1784
|
-
return null;
|
|
1785
|
-
}
|
|
1786
|
-
return file;
|
|
1787
|
-
}
|
|
1788
|
-
download(filename) {
|
|
1789
|
-
const file = this.getFile(filename);
|
|
1790
|
-
if (!file)
|
|
1791
|
-
return;
|
|
1792
|
-
const url = URL.createObjectURL(file.blob);
|
|
1793
|
-
const a = document.createElement('a');
|
|
1794
|
-
a.href = url;
|
|
1795
|
-
a.download = file.filename;
|
|
1796
|
-
a.click();
|
|
1797
|
-
URL.revokeObjectURL(url);
|
|
1798
|
-
}
|
|
1799
|
-
deleteFile(filename) {
|
|
1800
|
-
this.cache.delete(filename);
|
|
1801
|
-
}
|
|
1802
|
-
clear() {
|
|
1803
|
-
this.cache.clear();
|
|
1804
|
-
}
|
|
1805
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyEcxFileCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1806
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyEcxFileCacheService, providedIn: 'root' }); }
|
|
1807
|
-
}
|
|
1808
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyEcxFileCacheService, decorators: [{
|
|
1809
|
-
type: Injectable,
|
|
1810
|
-
args: [{
|
|
1811
|
-
providedIn: 'root'
|
|
1812
|
-
}]
|
|
1813
|
-
}] });
|
|
1814
|
-
|
|
1815
1751
|
/** ************************
|
|
1816
1752
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
1817
1753
|
* This style guide was developed by Monkey Exchange Team
|
|
@@ -4582,7 +4518,6 @@ class MonkeyDownloadButtonComponent {
|
|
|
4582
4518
|
this.type = 'primary';
|
|
4583
4519
|
this.tabIndex = -1;
|
|
4584
4520
|
this.onChange = new EventEmitter();
|
|
4585
|
-
this._fileCacheService = inject(MonkeyEcxFileCacheService);
|
|
4586
4521
|
this._uid = inject(IdGenerator).getId('monkey-download-button-');
|
|
4587
4522
|
// eslint-disable-next-line no-self-assign
|
|
4588
4523
|
this.id = this.id;
|
|
@@ -5773,12 +5708,10 @@ class MonkeyInputPhoneComponent {
|
|
|
5773
5708
|
this.stateChanges.next();
|
|
5774
5709
|
}
|
|
5775
5710
|
set value(value) {
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
this._onTouched(value);
|
|
5781
|
-
}
|
|
5711
|
+
this._value = value;
|
|
5712
|
+
this.formatValue(value);
|
|
5713
|
+
this._onChange(value);
|
|
5714
|
+
this._onTouched(value);
|
|
5782
5715
|
}
|
|
5783
5716
|
get value() {
|
|
5784
5717
|
return this._value;
|
|
@@ -9019,5 +8952,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
9019
8952
|
* Generated bundle index. Do not edit.
|
|
9020
8953
|
*/
|
|
9021
8954
|
|
|
9022
|
-
export { MECX_COUNTRY_ISO_CODE, MECX_GOOGLE_API_KEY, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAutocompleteAddressComponent, MonkeyAutocompleteComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDictionaryService, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyDownloadButtonComponent, MonkeyEcxAddressService,
|
|
8955
|
+
export { MECX_COUNTRY_ISO_CODE, MECX_GOOGLE_API_KEY, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAutocompleteAddressComponent, MonkeyAutocompleteComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDictionaryService, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyDownloadButtonComponent, MonkeyEcxAddressService, MonkeyErrorDirective, MonkeyFilterBarComponent, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDateRangeComponent, MonkeyInputDirective, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputUploadComponent, MonkeyLabelDirective, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPopoverContentComponent, MonkeyPopoverDirective, MonkeyPrefixDirective, MonkeyRadioButtonComponent, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, MonkeyUserProfileButtonComponent, getCurrencySymbol, injectTokenWithWarning };
|
|
9023
8956
|
//# sourceMappingURL=monkey-style-guide-v2.mjs.map
|