@sd-angular/core 1.3.64 → 1.3.66
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/sd-angular-core-input-number.umd.js +12 -9
- package/bundles/sd-angular-core-input-number.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-number.umd.min.js +1 -1
- package/bundles/sd-angular-core-input-number.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-pdf.umd.js +63 -38
- package/bundles/sd-angular-core-pdf.umd.js.map +1 -1
- package/bundles/sd-angular-core-pdf.umd.min.js +2 -2
- package/bundles/sd-angular-core-pdf.umd.min.js.map +1 -1
- package/esm2015/input-number/src/lib/input-number.component.js +13 -9
- package/esm2015/pdf/src/lib/pdf.service.js +20 -28
- package/fesm2015/sd-angular-core-input-number.js +13 -9
- package/fesm2015/sd-angular-core-input-number.js.map +1 -1
- package/fesm2015/sd-angular-core-pdf.js +20 -26
- package/fesm2015/sd-angular-core-pdf.js.map +1 -1
- package/input-number/sd-angular-core-input-number.metadata.json +1 -1
- package/package.json +2 -1
- package/pdf/sd-angular-core-pdf.metadata.json +1 -1
- package/pdf/src/lib/pdf.service.d.ts +2 -7
- package/{sd-angular-core-1.3.64.tgz → sd-angular-core-1.3.66.tgz} +0 -0
|
@@ -1,40 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { __awaiter
|
|
3
|
-
import { Injectable,
|
|
4
|
-
import { SdApiService } from '@sd-angular/core/api';
|
|
1
|
+
import { SdCommonModule } from '@sd-angular/core/common';
|
|
2
|
+
import { __awaiter } from 'tslib';
|
|
3
|
+
import { Injectable, NgModule } from '@angular/core';
|
|
5
4
|
import { v4 } from 'uuid';
|
|
5
|
+
import { PDFDocument } from 'pdf-lib';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
|
|
8
|
-
var _API;
|
|
9
8
|
class SdPdfService {
|
|
10
|
-
constructor(
|
|
11
|
-
this.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const buffer =
|
|
21
|
-
urls
|
|
22
|
-
}, null, {
|
|
23
|
-
responseType: 'arraybuffer'
|
|
24
|
-
});
|
|
9
|
+
constructor() {
|
|
10
|
+
this.merge = (urls, download = true) => __awaiter(this, void 0, void 0, function* () {
|
|
11
|
+
const mergedPdf = yield PDFDocument.create();
|
|
12
|
+
for (const url of urls) {
|
|
13
|
+
const existingPdfBytes = yield fetch(url).then(res => res.arrayBuffer());
|
|
14
|
+
const file = yield PDFDocument.load(existingPdfBytes);
|
|
15
|
+
const copied = yield mergedPdf.copyPages(file, file.getPageIndices());
|
|
16
|
+
copied.forEach((page) => mergedPdf.addPage(page));
|
|
17
|
+
}
|
|
18
|
+
const mergedPdfFile = yield mergedPdf.save();
|
|
19
|
+
const buffer = Buffer.from(mergedPdfFile);
|
|
25
20
|
const blob = new Blob([buffer], { type: 'application/pdf' });
|
|
26
|
-
|
|
21
|
+
if (download) {
|
|
22
|
+
SdUtility.downloadBlob(blob, v4());
|
|
23
|
+
}
|
|
24
|
+
return blob;
|
|
27
25
|
});
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
|
-
_API = new WeakMap();
|
|
31
28
|
SdPdfService.decorators = [
|
|
32
29
|
{ type: Injectable }
|
|
33
30
|
];
|
|
34
|
-
SdPdfService.ctorParameters = () => [
|
|
35
|
-
{ type: SdApiService },
|
|
36
|
-
{ type: undefined, decorators: [{ type: Inject, args: [FIREBASE_CONFIG,] }, { type: Optional }] }
|
|
37
|
-
];
|
|
31
|
+
SdPdfService.ctorParameters = () => [];
|
|
38
32
|
|
|
39
33
|
class SdPdfModule {
|
|
40
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core-pdf.js","sources":["../../../../projects/sd-core/pdf/src/lib/pdf.service.ts","../../../../projects/sd-core/pdf/src/lib/pdf.module.ts","../../../../projects/sd-core/pdf/sd-angular-core-pdf.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"sd-angular-core-pdf.js","sources":["../../../../projects/sd-core/pdf/src/lib/pdf.service.ts","../../../../projects/sd-core/pdf/src/lib/pdf.module.ts","../../../../projects/sd-core/pdf/sd-angular-core-pdf.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport * as uuid from 'uuid';\r\nimport { PDFDocument } from 'pdf-lib';\r\n\r\n@Injectable()\r\nexport class SdPdfService {\r\n constructor() {\r\n }\r\n\r\n merge = async (urls: string[], download: boolean = true) => {\r\n const mergedPdf = await PDFDocument.create();\r\n for (const url of urls) {\r\n const existingPdfBytes = await fetch(url).then(res => res.arrayBuffer())\r\n const file = await PDFDocument.load(existingPdfBytes);\r\n const copied = await mergedPdf.copyPages(file, file.getPageIndices());\r\n copied.forEach((page) => mergedPdf.addPage(page));\r\n }\r\n const mergedPdfFile = await mergedPdf.save();\r\n const buffer = Buffer.from(mergedPdfFile);\r\n const blob = new Blob([buffer], { type: 'application/pdf' });\r\n if (download) {\r\n SdUtility.downloadBlob(blob, uuid.v4());\r\n }\r\n return blob;\r\n }\r\n}\r\n\r\nexport interface IExportInfo {\r\n data: any[];\r\n sheetName?: string;\r\n fileName?: string;\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdPdfService } from './pdf.service';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SdCommonModule\r\n ],\r\n declarations: [\r\n ],\r\n exports: [\r\n ],\r\n providers: [\r\n SdPdfService\r\n ]\r\n})\r\nexport class SdPdfModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;MAKa,YAAY;IACvB;QAGA,UAAK,GAAG,CAAO,IAAc,EAAE,WAAoB,IAAI;YACrD,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;YAC7C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;gBACtB,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,CAAA;gBACxE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBACtD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;gBACtE,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;aACnD;YACD,MAAM,aAAa,GAAG,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;YAC7C,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC1C,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC;YAC7D,IAAI,QAAQ,EAAE;gBACZ,SAAS,CAAC,YAAY,CAAC,IAAI,EAAEA,EAAO,EAAE,CAAC,CAAC;aACzC;YACD,OAAO,IAAI,CAAC;SACb,CAAA,CAAA;KAjBA;;;YAHF,UAAU;;;;MCcE,WAAW;;;YAbvB,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,cAAc;iBACf;gBACD,YAAY,EAAE,EACb;gBACD,OAAO,EAAE,EACR;gBACD,SAAS,EAAE;oBACT,YAAY;iBACb;aACF;;;ACjBD;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"SdInputNumberModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":13,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"SdInputNumber"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":22,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateModule","line":23,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":24,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/popover","name":"SdPopoverModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":26,"character":4}],"exports":[{"__symbolic":"reference","name":"SdInputNumber"}]}]}],"members":{}},"SdInputNumber":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":36,"character":1},"arguments":[{"selector":"sd-input-number","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":40,"character":19},"member":"OnPush"},"template":"<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"isRequired\">*</span></label>\r\n<ng-container *ngIf=\"sdLabelDef?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{ 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input [id]=\"id\" [formControl]=\"inputControl\" #control matInput\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" [errorStateMatcher]=\"matcher\"\r\n (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" (keydown)=\"onKeydown($event)\"\r\n [required]=\"isRequired\" [readonly]=\"isReadonly\" [autocomplete]=\"id\" (paste)=\"onPaste($event)\" autocorrect=\"off\"\r\n [sdPopoverTriggerFor]=\"null\" [sdPopoverDisabled]=\"!disableErrorMessage || formControl.valid\">\r\n <ng-container *ngIf=\"sdSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <mat-error *ngIf=\"formControl?.errors?.required\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ \"This field is required\" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.min\"> \r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Không nhập bé hơn '}} <strong>{{minNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.max\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Không nhập lớn hơn '}} <strong>{{maxNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{formControl.errors?.customValidator}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>\r\n<!-- <sd-popover #error=\"sdPopover\" type=\"danger\" width=\"300px\">\r\n <span *ngIf=\"formControl.errors?.required\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </span>\r\n <span *ngIf=\"formControl.errors?.customValidator\">\r\n {{formControl.errors?.customValidator}}\r\n </span>\r\n</sd-popover> -->","styles":[":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}:host{display:block;padding-top:5px}.sd-md:hover .btn-copy{visibility:visible}.btn-copy{background:#e9e9e9!important;font-size:12px;line-height:26px!important;margin-bottom:3px;visibility:hidden}"]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":52,"character":3}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":3}}]}],"_disableErrorMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":3},"arguments":["disableErrorMessage"]}]}],"_blurOnEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":68,"character":3},"arguments":["blurOnEnter"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":71,"character":3}}]}],"modelChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":88,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":92,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":96,"character":3}}]}],"precision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":97,"character":3}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":100,"character":3}}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":105,"character":3}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":111,"character":3}}]}],"validator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":117,"character":3}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":122,"character":3}}]}],"appearance":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":132,"character":3}}]}],"sdChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":134,"character":3}}]}],"sdFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":135,"character":3}}]}],"sdFocusForceBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":136,"character":3}}]}],"keyupEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":137,"character":3}}]}],"control":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":139,"character":3},"arguments":["control"]}]}],"sdView":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":145,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdViewDefDirective","line":145,"character":16}]}]}],"sdSuffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":146,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdSuffixDirective","line":146,"character":16}]}]}],"sdLabelDef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":147,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdLabelDefDirective","line":147,"character":16}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":151,"character":5},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"FORM_CONFIG","line":151,"character":12}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":151,"character":26}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":150,"character":17},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"IFormConfiguration","line":151,"character":57}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onPaste":[{"__symbolic":"method"}]}}},"origins":{"SdInputNumberModule":"./src/lib/input-number.module","SdInputNumber":"./src/lib/input-number.component"},"importAs":"@sd-angular/core/input-number"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"SdInputNumberModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":13,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"SdInputNumber"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":22,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateModule","line":23,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":24,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/popover","name":"SdPopoverModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":26,"character":4}],"exports":[{"__symbolic":"reference","name":"SdInputNumber"}]}]}],"members":{}},"SdInputNumber":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":36,"character":1},"arguments":[{"selector":"sd-input-number","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":40,"character":19},"member":"OnPush"},"template":"<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"isRequired\">*</span></label>\r\n<ng-container *ngIf=\"sdLabelDef?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{ 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input [id]=\"id\" [formControl]=\"inputControl\" #control matInput\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" [errorStateMatcher]=\"matcher\"\r\n (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" (keydown)=\"onKeydown($event)\"\r\n [required]=\"isRequired\" [readonly]=\"isReadonly\" [autocomplete]=\"id\" (paste)=\"onPaste($event)\" autocorrect=\"off\"\r\n [sdPopoverTriggerFor]=\"null\" [sdPopoverDisabled]=\"!disableErrorMessage || formControl.valid\">\r\n <ng-container *ngIf=\"sdSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <mat-error *ngIf=\"formControl?.errors?.required\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ \"This field is required\" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.min\"> \r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Không nhập bé hơn '}} <strong>{{minNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.max\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Không nhập lớn hơn '}} <strong>{{maxNumber}}</strong></ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{formControl.errors?.customValidator}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>\r\n<!-- <sd-popover #error=\"sdPopover\" type=\"danger\" width=\"300px\">\r\n <span *ngIf=\"formControl.errors?.required\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </span>\r\n <span *ngIf=\"formControl.errors?.customValidator\">\r\n {{formControl.errors?.customValidator}}\r\n </span>\r\n</sd-popover> -->","styles":[":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}:host{display:block;padding-top:5px}.sd-md:hover .btn-copy{visibility:visible}.btn-copy{background:#e9e9e9!important;font-size:12px;line-height:26px!important;margin-bottom:3px;visibility:hidden}"]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":52,"character":3}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":3}}]}],"_disableErrorMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":3},"arguments":["disableErrorMessage"]}]}],"_blurOnEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":68,"character":3},"arguments":["blurOnEnter"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":3}}]}],"modelChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":90,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":94,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":98,"character":3}}]}],"precision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":99,"character":3}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":102,"character":3}}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":107,"character":3}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":113,"character":3}}]}],"validator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":119,"character":3}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":124,"character":3}}]}],"appearance":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":134,"character":3}}]}],"sdChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":136,"character":3}}]}],"sdFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":137,"character":3}}]}],"sdFocusForceBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":138,"character":3}}]}],"keyupEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":139,"character":3}}]}],"control":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":141,"character":3},"arguments":["control"]}]}],"sdView":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":147,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdViewDefDirective","line":147,"character":16}]}]}],"sdSuffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":148,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdSuffixDirective","line":148,"character":16}]}]}],"sdLabelDef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":149,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdLabelDefDirective","line":149,"character":16}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":153,"character":5},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"FORM_CONFIG","line":153,"character":12}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":153,"character":26}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":152,"character":17},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"IFormConfiguration","line":153,"character":57}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onPaste":[{"__symbolic":"method"}]}}},"origins":{"SdInputNumberModule":"./src/lib/input-number.module","SdInputNumber":"./src/lib/input-number.component"},"importAs":"@sd-angular/core/input-number"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sd-angular/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.66",
|
|
4
4
|
"homepage": "https://www.facebook.com/DarkP3ter",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "darkpeter",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"ngx-print": "^1.2.0-beta.5",
|
|
49
49
|
"exceljs": "^4.3.0",
|
|
50
50
|
"jspdf": "^2.5.1",
|
|
51
|
+
"pdf-lib": "^1.17.1",
|
|
51
52
|
"jszip": "^3.10.1"
|
|
52
53
|
},
|
|
53
54
|
"main": "bundles/sd-angular-core.umd.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"SdPdfService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"SdPdfService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":4,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}]}},"IExportInfo":{"__symbolic":"interface"},"SdPdfModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":8,"character":4}],"declarations":[],"exports":[],"providers":[{"__symbolic":"reference","name":"SdPdfService"}]}]}],"members":{}}},"origins":{"SdPdfService":"./src/lib/pdf.service","IExportInfo":"./src/lib/pdf.service","SdPdfModule":"./src/lib/pdf.module"},"importAs":"@sd-angular/core/pdf"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { SdApiService } from '@sd-angular/core/api';
|
|
2
|
-
import { IFirebaseConfiguration } from '@sd-angular/core/common';
|
|
3
1
|
export declare class SdPdfService {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
private configuration;
|
|
7
|
-
constructor(apiService: SdApiService, configuration: IFirebaseConfiguration);
|
|
8
|
-
merge: (urls: string[]) => Promise<void>;
|
|
2
|
+
constructor();
|
|
3
|
+
merge: (urls: string[], download?: boolean) => Promise<Blob>;
|
|
9
4
|
}
|
|
10
5
|
export interface IExportInfo {
|
|
11
6
|
data: any[];
|
|
index 1a81672..245fbb6 100644
|
|
|
Binary file
|