@ajf/material 18.2.4 → 18.3.0
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/audio/src/audio.d.ts +11 -5
- package/esm2022/audio/src/audio.mjs +47 -32
- package/esm2022/form-builder/form-builder-service.mjs +2 -2
- package/esm2022/forms/date-input-field.mjs +14 -9
- package/esm2022/forms/field-service.mjs +2 -2
- package/esm2022/forms/form.mjs +3 -3
- package/esm2022/node-icon/node-icon.mjs +2 -2
- package/esm2022/signature/signature.mjs +9 -8
- package/fesm2022/ajf-material-audio.mjs +46 -31
- package/fesm2022/ajf-material-audio.mjs.map +1 -1
- package/fesm2022/ajf-material-form-builder.mjs +1 -1
- package/fesm2022/ajf-material-form-builder.mjs.map +1 -1
- package/fesm2022/ajf-material-forms.mjs +29 -26
- package/fesm2022/ajf-material-forms.mjs.map +1 -1
- package/fesm2022/ajf-material-node-icon.mjs +1 -1
- package/fesm2022/ajf-material-node-icon.mjs.map +1 -1
- package/fesm2022/ajf-material-signature.mjs +8 -7
- package/fesm2022/ajf-material-signature.mjs.map +1 -1
- package/forms/date-input-field.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ajf-material-node-icon.mjs","sources":["../../../projects/material/node-icon/src/node-icon.ts","../../../projects/material/node-icon/src/node-icon.html","../../../projects/material/node-icon/src/node-icon-module.ts","../../../projects/material/node-icon/src/public_api.ts","../../../projects/material/node-icon/src/ajf-material-node-icon.ts"],"sourcesContent":["/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfField, AjfFieldType, AjfNode, AjfNodeType} from '@ajf/core/forms';\nimport {AjfNodeIcon as CoreNodeIcon} from '@ajf/core/node-icon';\nimport {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n selector: 'ajf-node-icon',\n templateUrl: 'node-icon.html',\n styleUrls: ['node-icon.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AjfNodeIcon extends CoreNodeIcon {\n matIcon(node: AjfNode): string {\n if (node.nodeType === AjfNodeType.AjfSlide) {\n return 'folder';\n }\n if (node.nodeType === AjfNodeType.AjfRepeatingSlide) {\n return 'create_new_folder';\n }\n if (node.nodeType !== AjfNodeType.AjfField) {\n return 'broken_image';\n }\n switch ((node as AjfField).fieldType as AjfFieldType) {\n case AjfFieldType.String:\n case AjfFieldType.Text:\n return 'abc';\n case AjfFieldType.Number:\n case AjfFieldType.Range:\n return 'pin';\n case AjfFieldType.Boolean:\n return 'toggle_off';\n case AjfFieldType.SingleChoice:\n return 'format_list_bulleted';\n case AjfFieldType.MultipleChoice:\n return 'format_list_numbered';\n case AjfFieldType.Formula:\n return 'code';\n case AjfFieldType.Empty:\n return 'html';\n case AjfFieldType.
|
|
1
|
+
{"version":3,"file":"ajf-material-node-icon.mjs","sources":["../../../projects/material/node-icon/src/node-icon.ts","../../../projects/material/node-icon/src/node-icon.html","../../../projects/material/node-icon/src/node-icon-module.ts","../../../projects/material/node-icon/src/public_api.ts","../../../projects/material/node-icon/src/ajf-material-node-icon.ts"],"sourcesContent":["/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfField, AjfFieldType, AjfNode, AjfNodeType} from '@ajf/core/forms';\nimport {AjfNodeIcon as CoreNodeIcon} from '@ajf/core/node-icon';\nimport {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n selector: 'ajf-node-icon',\n templateUrl: 'node-icon.html',\n styleUrls: ['node-icon.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AjfNodeIcon extends CoreNodeIcon {\n matIcon(node: AjfNode): string {\n if (node.nodeType === AjfNodeType.AjfSlide) {\n return 'folder';\n }\n if (node.nodeType === AjfNodeType.AjfRepeatingSlide) {\n return 'create_new_folder';\n }\n if (node.nodeType !== AjfNodeType.AjfField) {\n return 'broken_image';\n }\n switch ((node as AjfField).fieldType as AjfFieldType) {\n case AjfFieldType.String:\n case AjfFieldType.Text:\n return 'abc';\n case AjfFieldType.Number:\n case AjfFieldType.Range:\n return 'pin';\n case AjfFieldType.Boolean:\n return 'toggle_off';\n case AjfFieldType.SingleChoice:\n return 'format_list_bulleted';\n case AjfFieldType.MultipleChoice:\n return 'format_list_numbered';\n case AjfFieldType.Formula:\n return 'code';\n case AjfFieldType.Empty:\n return 'html';\n case AjfFieldType.DateRange:\n case AjfFieldType.DateInput:\n return 'calendar_month';\n case AjfFieldType.Time:\n return 'access_time';\n case AjfFieldType.Table:\n return 'grid_on';\n case AjfFieldType.Geolocation:\n return 'location_on';\n case AjfFieldType.Barcode:\n return 'qr_code_2';\n case AjfFieldType.File:\n return 'attach_file';\n case AjfFieldType.Image:\n return 'image';\n case AjfFieldType.VideoUrl:\n return 'videocam';\n case AjfFieldType.Signature:\n return 'draw';\n default:\n return 'broken_image';\n }\n }\n}\n","<ng-template [ngIf]=\"node\">\n <mat-icon>{{matIcon(node)}}</mat-icon>\n</ng-template>\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatIconModule} from '@angular/material/icon';\n\nimport {AjfNodeIcon} from './node-icon';\n\n@NgModule({\n imports: [CommonModule, MatIconModule],\n declarations: [AjfNodeIcon],\n exports: [AjfNodeIcon],\n})\nexport class AjfNodeIconModule {}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './node-icon-module';\nexport * from './node-icon';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["CoreNodeIcon"],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;AAoBG;AAaG,MAAO,WAAY,SAAQA,aAAY,CAAA;AAC3C,IAAA,OAAO,CAAC,IAAa,EAAA;QACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,CAAC,QAAQ,EAAE;AAC1C,YAAA,OAAO,QAAQ;;QAEjB,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,CAAC,iBAAiB,EAAE;AACnD,YAAA,OAAO,mBAAmB;;QAE5B,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,CAAC,QAAQ,EAAE;AAC1C,YAAA,OAAO,cAAc;;AAEvB,QAAA,QAAS,IAAiB,CAAC,SAAyB;YAClD,KAAK,YAAY,CAAC,MAAM;YACxB,KAAK,YAAY,CAAC,IAAI;AACpB,gBAAA,OAAO,KAAK;YACd,KAAK,YAAY,CAAC,MAAM;YACxB,KAAK,YAAY,CAAC,KAAK;AACrB,gBAAA,OAAO,KAAK;YACd,KAAK,YAAY,CAAC,OAAO;AACvB,gBAAA,OAAO,YAAY;YACrB,KAAK,YAAY,CAAC,YAAY;AAC5B,gBAAA,OAAO,sBAAsB;YAC/B,KAAK,YAAY,CAAC,cAAc;AAC9B,gBAAA,OAAO,sBAAsB;YAC/B,KAAK,YAAY,CAAC,OAAO;AACvB,gBAAA,OAAO,MAAM;YACf,KAAK,YAAY,CAAC,KAAK;AACrB,gBAAA,OAAO,MAAM;YACf,KAAK,YAAY,CAAC,SAAS;YAC3B,KAAK,YAAY,CAAC,SAAS;AACzB,gBAAA,OAAO,gBAAgB;YACzB,KAAK,YAAY,CAAC,IAAI;AACpB,gBAAA,OAAO,aAAa;YACtB,KAAK,YAAY,CAAC,KAAK;AACrB,gBAAA,OAAO,SAAS;YAClB,KAAK,YAAY,CAAC,WAAW;AAC3B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EAAA,QAAA,EAAA,eAAe,iBAGV,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2FAAA,EAAA;;;AE/BjD;;;;;;;;;;;;;;;;;;;;AAoBG;MAaU,iBAAiB,CAAA;+GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,iBAHb,WAAW,CAAA,EAAA,OAAA,EAAA,CADhB,YAAY,EAAE,aAAa,aAE3B,WAAW,CAAA,EAAA,CAAA,CAAA;gHAEV,iBAAiB,EAAA,OAAA,EAAA,CAJlB,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;;4FAI1B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,YAAY,EAAE,CAAC,WAAW,CAAC;oBAC3B,OAAO,EAAE,CAAC,WAAW,CAAC;AACvB,iBAAA;;;AChCD;;;;;;;;;;;;;;;;;;;;AAoBG;;ACpBH;;AAEG;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AjfSignature } from '@ajf/core/signature';
|
|
1
|
+
import { AjfSignature, canvasToIndexedPngDataUrl } from '@ajf/core/signature';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { forwardRef, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
@@ -60,8 +60,8 @@ class AjfSignatureComponent extends AjfSignature {
|
|
|
60
60
|
}
|
|
61
61
|
this.isDrawn = false;
|
|
62
62
|
this.value = {
|
|
63
|
-
name: 'signature.
|
|
64
|
-
type: 'image/
|
|
63
|
+
name: 'signature.png',
|
|
64
|
+
type: 'image/png',
|
|
65
65
|
signature: true,
|
|
66
66
|
size: undefined,
|
|
67
67
|
content: undefined,
|
|
@@ -74,12 +74,13 @@ class AjfSignatureComponent extends AjfSignature {
|
|
|
74
74
|
*/
|
|
75
75
|
accept() {
|
|
76
76
|
if (this.sigPadElement != null) {
|
|
77
|
-
const signatureDataUrl = this.sigPadElement.toDataURL('image/
|
|
78
|
-
const
|
|
77
|
+
// const signatureDataUrl = this.sigPadElement.toDataURL('image/png');
|
|
78
|
+
const signatureDataUrl = canvasToIndexedPngDataUrl(this.sigPadElement);
|
|
79
|
+
const head = 'data:image/png;base64,';
|
|
79
80
|
const imgFileSize = Math.round(((signatureDataUrl.length - head.length) * 3) / 4);
|
|
80
81
|
this.value = {
|
|
81
|
-
name: 'signature.
|
|
82
|
-
type: 'image/
|
|
82
|
+
name: 'signature.png',
|
|
83
|
+
type: 'image/png',
|
|
83
84
|
signature: true,
|
|
84
85
|
size: imgFileSize,
|
|
85
86
|
content: signatureDataUrl,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ajf-material-signature.mjs","sources":["../../../projects/material/signature/src/signature.ts","../../../projects/material/signature/src/signature.html","../../../projects/material/signature/src/signature-module.ts","../../../projects/material/signature/src/public_api.ts","../../../projects/material/signature/src/ajf-material-signature.ts"],"sourcesContent":["/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfSignature} from '@ajf/core/signature';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n OnDestroy,\n Renderer2,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {DomSanitizer, SafeUrl} from '@angular/platform-browser';\n\nexport const SIGNATURE_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AjfSignatureComponent),\n multi: true,\n};\n\n/**\n * Ajf signature component.\n */\n@Component({\n selector: 'ajf-signature',\n templateUrl: 'signature.html',\n styleUrls: ['signature.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [SIGNATURE_CONTROL_VALUE_ACCESSOR],\n})\nexport class AjfSignatureComponent extends AjfSignature implements OnDestroy, AfterViewInit {\n constructor(cdr: ChangeDetectorRef, renderer: Renderer2, private _sanitizer: DomSanitizer) {\n super(cdr, renderer);\n }\n\n ngAfterViewInit(): void {\n this.sigPadElement = this.sigPad.nativeElement;\n this.context = this.sigPadElement?.getContext('2d') ?? null;\n }\n\n /**\n * Clears the signature value and preview (keeps the old url to delete old signature from storage)\n */\n clear() {\n if (this.context != null && this.sigPadElement != null) {\n this.context.clearRect(0, 0, this.sigPadElement.width, this.sigPadElement.height);\n this.context.beginPath();\n }\n this.isDrawn = false;\n this.value = {\n name: 'signature.webp',\n type: 'image/webp',\n signature: true,\n size: undefined,\n content: undefined,\n url: this.value?.url ?? undefined,\n deleteUrl: true,\n };\n }\n\n /**\n * Accepts the new signature from the canvas and sets it as field value (keeps the old url to delete old signature from storage)\n */\n accept() {\n if (this.sigPadElement != null) {\n const signatureDataUrl = this.sigPadElement.toDataURL('image/webp', 0.5);\n\n const head = 'data:image/webp;base64,';\n const imgFileSize = Math.round(((signatureDataUrl.length - head.length) * 3) / 4);\n\n this.value = {\n name: 'signature.webp',\n type: 'image/webp',\n signature: true,\n size: imgFileSize,\n content: signatureDataUrl,\n url: this.value?.url ?? undefined,\n deleteUrl: false,\n };\n }\n }\n\n /**\n * Sanitizes signature image url\n */\n get safeImageSrc(): SafeUrl | string | null {\n if (!this.value) return null;\n if (!this.value.content && this.value.deleteUrl) return null;\n\n const rawUrl =\n this.value.content && this.value.content.length ? this.value.content : this.value.url;\n if (!rawUrl) return null;\n\n const sanitizedUrl = this._sanitizer.bypassSecurityTrustUrl(rawUrl);\n return sanitizedUrl;\n }\n\n ngOnDestroy(): void {\n return;\n }\n}\n","<div class=\"ajf-signature-container\">\n <p class=\"ajf-signature-text\">{{'Please sign here'|transloco}}</p>\n <canvas\n class=\"ajf-signature-canvas\"\n #sigPad\n (mousedown)=\"onMouseDown($event)\"\n (mousemove)=\"onMouseMove($event)\"\n (touchstart)=\"onMouseDown($event)\"\n (touchmove)=\"onMouseMove($event)\"\n ></canvas>\n <div class=\"ajf-signature-actions\">\n <button mat-fab (click)=\"clear()\" class=\"ajf-signature-action-clear\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-fab (click)=\"accept()\" color=\"primary\" [disabled]=\"!isDrawn\" class=\"ajf-signature-action-accept\">\n <mat-icon>check</mat-icon>\n </button>\n </div>\n\n <img class=\"ajf-signature-preview\" [src]=\"safeImageSrc\" />\n</div>\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfCommonModule} from '@ajf/core/common';\nimport {AjfTranslocoModule} from '@ajf/core/transloco';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatIconModule} from '@angular/material/icon';\n\nimport {AjfSignatureComponent} from './signature';\nimport {FormsModule} from '@angular/forms';\n\n@NgModule({\n imports: [\n AjfCommonModule,\n AjfTranslocoModule,\n CommonModule,\n FormsModule,\n MatButtonModule,\n MatIconModule,\n ],\n declarations: [AjfSignatureComponent],\n exports: [AjfSignatureComponent],\n})\nexport class AjfSignatureModule {}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './signature';\nexport * from './signature-module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;AAoBG;AAgBU,MAAA,gCAAgC,GAAQ;AACnD,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,qBAAqB,CAAC;AACpD,IAAA,KAAK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GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAHd,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAPlC,eAAe;YACf,kBAAkB;YAClB,YAAY;YACZ,WAAW;YACX,eAAe;AACf,YAAA,aAAa,aAGL,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAEpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAV3B,eAAe;YACf,kBAAkB;YAClB,YAAY;YACZ,WAAW;YACX,eAAe;YACf,aAAa,CAAA,EAAA,CAAA,CAAA;;4FAKJ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAZ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,kBAAkB;wBAClB,YAAY;wBACZ,WAAW;wBACX,eAAe;wBACf,aAAa;AACd,qBAAA;oBACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACjC,iBAAA;;;AC3CD;;;;;;;;;;;;;;;;;;;;AAoBG;;ACpBH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ajf-material-signature.mjs","sources":["../../../projects/material/signature/src/signature.ts","../../../projects/material/signature/src/signature.html","../../../projects/material/signature/src/signature-module.ts","../../../projects/material/signature/src/public_api.ts","../../../projects/material/signature/src/ajf-material-signature.ts"],"sourcesContent":["/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfSignature, canvasToIndexedPngDataUrl} from '@ajf/core/signature';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n OnDestroy,\n Renderer2,\n ViewEncapsulation,\n} from '@angular/core';\nimport {NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {DomSanitizer, SafeUrl} from '@angular/platform-browser';\n\nexport const SIGNATURE_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AjfSignatureComponent),\n multi: true,\n};\n\n/**\n * Ajf signature component.\n */\n@Component({\n selector: 'ajf-signature',\n templateUrl: 'signature.html',\n styleUrls: ['signature.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [SIGNATURE_CONTROL_VALUE_ACCESSOR],\n})\nexport class AjfSignatureComponent extends AjfSignature implements OnDestroy, AfterViewInit {\n constructor(cdr: ChangeDetectorRef, renderer: Renderer2, private _sanitizer: DomSanitizer) {\n super(cdr, renderer);\n }\n\n ngAfterViewInit(): void {\n this.sigPadElement = this.sigPad.nativeElement;\n this.context = this.sigPadElement?.getContext('2d') ?? null;\n }\n\n /**\n * Clears the signature value and preview (keeps the old url to delete old signature from storage)\n */\n clear() {\n if (this.context != null && this.sigPadElement != null) {\n this.context.clearRect(0, 0, this.sigPadElement.width, this.sigPadElement.height);\n this.context.beginPath();\n }\n this.isDrawn = false;\n this.value = {\n name: 'signature.png',\n type: 'image/png',\n signature: true,\n size: undefined,\n content: undefined,\n url: this.value?.url ?? undefined,\n deleteUrl: true,\n };\n }\n\n /**\n * Accepts the new signature from the canvas and sets it as field value (keeps the old url to delete old signature from storage)\n */\n accept() {\n if (this.sigPadElement != null) {\n // const signatureDataUrl = this.sigPadElement.toDataURL('image/png');\n const signatureDataUrl = canvasToIndexedPngDataUrl(this.sigPadElement);\n\n const head = 'data:image/png;base64,';\n const imgFileSize = Math.round(((signatureDataUrl.length - head.length) * 3) / 4);\n\n this.value = {\n name: 'signature.png',\n type: 'image/png',\n signature: true,\n size: imgFileSize,\n content: signatureDataUrl,\n url: this.value?.url ?? undefined,\n deleteUrl: false,\n };\n }\n }\n\n /**\n * Sanitizes signature image url\n */\n get safeImageSrc(): SafeUrl | string | null {\n if (!this.value) return null;\n if (!this.value.content && this.value.deleteUrl) return null;\n\n const rawUrl =\n this.value.content && this.value.content.length ? this.value.content : this.value.url;\n if (!rawUrl) return null;\n\n const sanitizedUrl = this._sanitizer.bypassSecurityTrustUrl(rawUrl);\n return sanitizedUrl;\n }\n\n ngOnDestroy(): void {\n return;\n }\n}\n","<div class=\"ajf-signature-container\">\n <p class=\"ajf-signature-text\">{{'Please sign here'|transloco}}</p>\n <canvas\n class=\"ajf-signature-canvas\"\n #sigPad\n (mousedown)=\"onMouseDown($event)\"\n (mousemove)=\"onMouseMove($event)\"\n (touchstart)=\"onMouseDown($event)\"\n (touchmove)=\"onMouseMove($event)\"\n ></canvas>\n <div class=\"ajf-signature-actions\">\n <button mat-fab (click)=\"clear()\" class=\"ajf-signature-action-clear\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-fab (click)=\"accept()\" color=\"primary\" [disabled]=\"!isDrawn\" class=\"ajf-signature-action-accept\">\n <mat-icon>check</mat-icon>\n </button>\n </div>\n\n <img class=\"ajf-signature-preview\" [src]=\"safeImageSrc\" />\n</div>\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfCommonModule} from '@ajf/core/common';\nimport {AjfTranslocoModule} from '@ajf/core/transloco';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatIconModule} from '@angular/material/icon';\n\nimport {AjfSignatureComponent} from './signature';\nimport {FormsModule} from '@angular/forms';\n\n@NgModule({\n imports: [\n AjfCommonModule,\n AjfTranslocoModule,\n CommonModule,\n FormsModule,\n MatButtonModule,\n MatIconModule,\n ],\n declarations: [AjfSignatureComponent],\n exports: [AjfSignatureComponent],\n})\nexport class AjfSignatureModule {}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './signature';\nexport * from './signature-module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;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AAA,QAAA,EAAA,6wBAAA,EAAA,MAAA,EAAA,CAAA,ulCAAA,CAAA,EAAA;;;AEnD/C;;;;;;;;;;;;;;;;;;;;AAoBG;MAwBU,kBAAkB,CAAA;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAHd,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAPlC,eAAe;YACf,kBAAkB;YAClB,YAAY;YACZ,WAAW;YACX,eAAe;AACf,YAAA,aAAa,aAGL,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAEpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAV3B,eAAe;YACf,kBAAkB;YAClB,YAAY;YACZ,WAAW;YACX,eAAe;YACf,aAAa,CAAA,EAAA,CAAA,CAAA;;4FAKJ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAZ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,kBAAkB;wBAClB,YAAY;wBACZ,WAAW;wBACX,eAAe;wBACf,aAAa;AACd,qBAAA;oBACD,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACjC,iBAAA;;;AC3CD;;;;;;;;;;;;;;;;;;;;AAoBG;;ACpBH;;AAEG;;;;"}
|
|
@@ -22,11 +22,13 @@
|
|
|
22
22
|
import { AjfBaseFieldComponent, AjfDateFieldInstance, AjfFormRendererService } from '@ajf/core/forms';
|
|
23
23
|
import { ChangeDetectorRef } from '@angular/core';
|
|
24
24
|
import { MatInput } from '@angular/material/input';
|
|
25
|
+
import { UntypedFormControl } from '@angular/forms';
|
|
25
26
|
import { AjfWarningAlertService } from './warning-alert-service';
|
|
26
27
|
import * as i0 from "@angular/core";
|
|
27
28
|
export declare class AjfDateInputFieldComponent extends AjfBaseFieldComponent<AjfDateFieldInstance> {
|
|
28
29
|
input: MatInput;
|
|
29
30
|
constructor(cdr: ChangeDetectorRef, service: AjfFormRendererService, was: AjfWarningAlertService);
|
|
31
|
+
clear(ctrl: UntypedFormControl): void;
|
|
30
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<AjfDateInputFieldComponent, never>;
|
|
31
33
|
static ɵcmp: i0.ɵɵComponentDeclaration<AjfDateInputFieldComponent, "ng-component", never, {}, {}, never, never, false, never>;
|
|
32
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ajf/material",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://github.com/gnucoop/ajf#readme",
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@ajf/core": "18.
|
|
16
|
+
"@ajf/core": "18.3.0",
|
|
17
17
|
"@angular/animations": "^18.2.13",
|
|
18
18
|
"@angular/cdk": "^18.2.14",
|
|
19
19
|
"@angular/common": "^18.2.13",
|