@spicainternational/ngx-sds-components 2.22.10 → 2.23.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.
Files changed (35) hide show
  1. package/esm2020/public-api.mjs +3 -1
  2. package/esm2020/src/lib/duration-box/duration-box.component.mjs +144 -0
  3. package/esm2020/src/lib/duration-box/duration-box.module.mjs +43 -0
  4. package/esm2020/src/lib/duration-box/duration-input-resolver.service.mjs +49 -0
  5. package/esm2020/src/lib/duration-box/public-api.mjs +3 -0
  6. package/esm2020/src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +5 -0
  7. package/esm2020/src/lib/duration-pipe/duration-format.pipe.mjs +26 -0
  8. package/esm2020/src/lib/duration-pipe/duration-pipe.module.mjs +18 -0
  9. package/esm2020/src/lib/duration-pipe/public-api.mjs +3 -0
  10. package/esm2020/src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs +5 -0
  11. package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +237 -0
  12. package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs.map +1 -0
  13. package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs +48 -0
  14. package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs.map +1 -0
  15. package/fesm2015/spicainternational-ngx-sds-components.mjs +2 -0
  16. package/fesm2015/spicainternational-ngx-sds-components.mjs.map +1 -1
  17. package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +237 -0
  18. package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs.map +1 -0
  19. package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs +48 -0
  20. package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs.map +1 -0
  21. package/fesm2020/spicainternational-ngx-sds-components.mjs +2 -0
  22. package/fesm2020/spicainternational-ngx-sds-components.mjs.map +1 -1
  23. package/package.json +17 -1
  24. package/public-api.d.ts +2 -0
  25. package/src/lib/duration-box/duration-box.component.d.ts +39 -0
  26. package/src/lib/duration-box/duration-box.module.d.ts +10 -0
  27. package/src/lib/duration-box/duration-input-resolver.service.d.ts +7 -0
  28. package/src/lib/duration-box/package.json +10 -0
  29. package/src/lib/duration-box/public-api.d.ts +2 -0
  30. package/src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.d.ts +5 -0
  31. package/src/lib/duration-pipe/duration-format.pipe.d.ts +7 -0
  32. package/src/lib/duration-pipe/duration-pipe.module.d.ts +8 -0
  33. package/src/lib/duration-pipe/package.json +10 -0
  34. package/src/lib/duration-pipe/public-api.d.ts +2 -0
  35. package/src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.d.ts +5 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-duration-box.mjs","sources":["../../../projects/ngx-sds-components/src/lib/duration-box/duration-input-resolver.service.ts","../../../projects/ngx-sds-components/src/lib/duration-box/duration-box.component.ts","../../../projects/ngx-sds-components/src/lib/duration-box/duration-box.component.html","../../../projects/ngx-sds-components/src/lib/duration-box/duration-box.module.ts","../../../projects/ngx-sds-components/src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DurationInputResolverService {\n \n constructor() {}\n\n public resolve(input: string): number | null{\n if (!input || input.length === 0) {\n return 0;\n }\n\n const inputSegments = input.split(':');\n if (inputSegments.length > 2) {\n //invalid input\n return 0;\n } else if (inputSegments.length == 2){\n // we have hrs and minutes\n const hrs = parseInt(inputSegments[0] ? inputSegments[0] : '0');\n const mins = parseInt(inputSegments[1] ? inputSegments[1] : '0');\n const totalMins = (hrs * 60) + mins;\n\n return totalMins;\n } else if (inputSegments.length == 1) {\n // take last two digits as mins\n const nonSeparated = inputSegments[0];\n\n let totalMins = 0;\n if (nonSeparated.length <= 2) {\n totalMins = parseInt(nonSeparated)\n } else {\n const lastIndex = nonSeparated.length - 2;\n const part1 = nonSeparated.slice(0, lastIndex);\n const part2 = nonSeparated.slice(lastIndex);\n const hrs = parseInt(part1);\n const mins = parseInt(part2);\n totalMins = (hrs * 60) + mins; \n }\n return totalMins;\n }\n return 0; \n }\n}\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\nimport { DxTextBoxComponent } from 'devextreme-angular';\nimport { DurationInputResolverService } from './duration-input-resolver.service';\n\n@Component({\n selector: 'sds-duration-box',\n templateUrl: './duration-box.component.html',\n styleUrls: ['./duration-box.component.scss'],\n})\nexport class SdsDurationBoxComponent implements OnInit, OnChanges {\n\n @Input() value: number | null = null;\n @Output() valueChange = new EventEmitter<number | null>();\n\n @Input() allowEmptyValue: boolean = true;\n @Input() emptyValueText: string = 'not set';\n\n @Input() options?: number[];\n @Input() width: string = '10rem';\n\n @ViewChild('textbox', {static: true}) textbox?: DxTextBoxComponent;\n\n\n public elementUUID = 'sds-db-' + crypto.randomUUID();\n\n public inputValue: string = '';\n public showOptions: boolean = false;\n \n public optionsDropdownButton = {\n icon: 'spindown',\n stylingMode: 'text',\n onClick: () => {\n this.showOptions = !this.showOptions;\n }\n }\n\n public clearValueButton = {\n icon: 'clear',\n stylingMode: 'text',\n onClick: () => {\n this.applyOption(null);\n }\n }\n\n public isValueEmpty = false;\n\n private isValueSetInternally = false;\n\n constructor(\n private _durationInputResolver: DurationInputResolverService\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['value']) {\n if (this.value === null) {\n if (this.allowEmptyValue) {\n this.isValueEmpty = true;\n this.inputValue = this.emptyValueText;\n } else {\n this.inputValue = '0:00'; // TO-DO: resolve this scenario\n }\n\n } else {\n this.inputValue = this.minutesToDurationString(this.value)\n }\n }\n }\n\n ngOnInit(): void {}\n\n public blockNonNumberOrSemicolon(e: any) {\n this.isValueSetInternally = false;\n\n if (!(\n e.event.key === 'Enter' || \n e.event.key === 'NumpadEnter' || \n e.event.key === 'Delete' || \n e.event.key === 'Tab' ||\n e.event.key === 'Backspace' ||\n e.event.key === 'ArrowLeft' ||\n e.event.key === 'ArrowRight' ||\n e.event.key === 'ArrowTop' ||\n e.event.key === 'ArrowBottom'\n )) {\n const regexNumberOfSemicolon = /\\d|:/;\n if (!regexNumberOfSemicolon.test(e.event.key)) {\n e.event.preventDefault();\n console.log(`${e.event.key} is not valid`);\n } else {\n this.isValueEmpty = false;\n }\n }\n }\n\n public resolveInput(data: any) {\n if (!this.isValueSetInternally){\n if (this.isValueEmpty || (data.value === '' && this.allowEmptyValue)) {\n // this.inputValue = this.emptyValueTextthis\n // this.applyOption(null);\n this.setValue(null);\n } else { \n const resolvedValue = this._durationInputResolver.resolve(data.value);\n \n if (resolvedValue === null && this.allowEmptyValue) {\n this.setValue(null);\n } else if (resolvedValue === null && !this.allowEmptyValue) {\n this.setValue(resolvedValue);\n } else {\n this.setValue(resolvedValue);\n }\n }\n }\n }\n\n public applyOption(value: number | null){\n this.showOptions = false;\n this.isValueSetInternally = false;\n this.setValue(value);\n }\n\n private setValue(value: number | null){\n if ( (this.isValueEmpty && value != null) || (!this.isValueEmpty && this.value != value)) {\n this.value = value;\n this.valueChange.emit(this.value);\n if (value === null) {\n this.isValueEmpty = true;\n this.isValueSetInternally = true;\n this.inputValue = this.emptyValueText;\n } else if (typeof value === 'number') {\n this.isValueEmpty = false;\n this.isValueSetInternally = true;\n this.inputValue = this.minutesToDurationString(this.value as number);\n }\n }\n\n }\n\n private minutesToDurationString(minutes: number): string {\n const hours = Math.floor(minutes/60);\n const mins = minutes % 60;\n return `${hours.toString().padStart(1, \"0\")}:${mins.toString().padStart(2, \"0\")}`;\n }\n}\n","<dx-text-box\n #textbox\n [id]=\"elementUUID\"\n [value]=\"inputValue\"\n (onKeyDown)=\"blockNonNumberOrSemicolon($event)\"\n (onValueChanged)=\"resolveInput($event)\"\n [width]=\"width\"\n >\n <dxi-button\n *ngIf=\"allowEmptyValue\"\n name=\"clearValue\"\n location=\"after\"\n [options]=\"clearValueButton\"\n ></dxi-button>\n <dxi-button\n \n *ngIf=\"options && options.length > 0\"\n name=\"optionsDropdown\"\n location=\"after\"\n [options]=\"optionsDropdownButton\"\n ></dxi-button>\n</dx-text-box>\n\n\n<dx-popover\n target=\"#{{elementUUID}}\"\n [(visible)]=\"showOptions\"\n [width]=\"width\"\n [closeOnOutsideClick]=\"true\"\n [wrapperAttr]=\"{ class: 'sds-durationbox-options-popover' }\"\n >\n\n <div *dxTemplate=\"let data of 'content'\">\n\n <button\n class=\"dropdown-item border-0\"\n [class.selected] = \"isValueEmpty\"\n (click)=\"applyOption(null)\"\n > {{ emptyValueText}}\n </button>\n\n <div *ngFor=\"let option of options\">\n <button\n class=\"dropdown-item border-0\"\n [class.selected] = \"option === value\"\n (click)=\"applyOption(option)\"\n > {{option | sdsDurationFormat}}\n </button>\n </div>\n </div>\n\n <!-- <div *ngFor=\"let option of options\"\n class=\"d-flex align-items-center p-1 my-1 mx-1 overflow-avatar-container\" >\n <div class=\"ml-2 pl-1\">\n {{option | sdsDurationFormat}}\n </div>\n </div> -->\n</dx-popover>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SdsDurationBoxComponent } from './duration-box.component';\nimport { DxPopoverModule, DxScrollViewModule, DxTextBoxModule } from 'devextreme-angular';\nimport { SdsDurationPipeModule } from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';\n\n\n\nconst components = [\n SdsDurationBoxComponent\n]\n\n@NgModule({\n declarations: [\n SdsDurationBoxComponent\n ],\n imports: [\n CommonModule,\n\n SdsDurationPipeModule,\n \n DxTextBoxModule,\n DxPopoverModule,\n DxScrollViewModule,\n ],\n exports: [\n ...components\n ]\n})\nexport class SdsDurationBoxModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.DurationInputResolverService"],"mappings":";;;;;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EAAA,CAAA;YACP,YAAY;YAEZ,qBAAqB;YAErB,eAAe;YACf,eAAe;YACf,kBAAkB;AACnB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAKU,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAjBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,uBAAuB;AACxB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBAEZ,qBAAqB;wBAErB,eAAe;wBACf,eAAe;wBACf,kBAAkB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AACd,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
@@ -0,0 +1,48 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Pipe, NgModule } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+
5
+ class SdsDurationFormatPipe {
6
+ transform(value, emptyValueText = '') {
7
+ if (value === null) {
8
+ return emptyValueText;
9
+ }
10
+ else if (typeof value === 'number') {
11
+ const sign = Math.sign(value);
12
+ value = Math.abs(value);
13
+ const hours = Math.floor(value / 60);
14
+ const mins = value % 60;
15
+ return `${sign === -1 ? '-' : ''}${hours.toString().padStart(1, '0')}:${mins.toString().padStart(2, '0')}`;
16
+ }
17
+ return '';
18
+ }
19
+ }
20
+ SdsDurationFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDurationFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
21
+ SdsDurationFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDurationFormatPipe, name: "sdsDurationFormat" });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDurationFormatPipe, decorators: [{
23
+ type: Pipe,
24
+ args: [{
25
+ name: 'sdsDurationFormat',
26
+ }]
27
+ }] });
28
+
29
+ class SdsDurationPipeModule {
30
+ }
31
+ SdsDurationPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDurationPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
32
+ SdsDurationPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDurationPipeModule, declarations: [SdsDurationFormatPipe], imports: [CommonModule], exports: [SdsDurationFormatPipe] });
33
+ SdsDurationPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDurationPipeModule, imports: [[CommonModule]] });
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDurationPipeModule, decorators: [{
35
+ type: NgModule,
36
+ args: [{
37
+ declarations: [SdsDurationFormatPipe],
38
+ imports: [CommonModule],
39
+ exports: [SdsDurationFormatPipe],
40
+ }]
41
+ }] });
42
+
43
+ /**
44
+ * Generated bundle index. Do not edit.
45
+ */
46
+
47
+ export { SdsDurationFormatPipe, SdsDurationPipeModule };
48
+ //# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs","sources":["../../../projects/ngx-sds-components/src/lib/duration-pipe/duration-format.pipe.ts","../../../projects/ngx-sds-components/src/lib/duration-pipe/duration-pipe.module.ts","../../../projects/ngx-sds-components/src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'sdsDurationFormat',\r\n})\r\nexport class SdsDurationFormatPipe implements PipeTransform {\r\n transform(value: number | null, emptyValueText: string = ''): string {\r\n if (value === null) {\r\n return emptyValueText;\r\n } else if (typeof value === 'number') {\r\n const sign = Math.sign(value);\r\n value = Math.abs(value);\r\n const hours = Math.floor(value / 60);\r\n const mins = value % 60;\r\n return `${sign === -1 ? '-' : ''}${hours.toString().padStart(1, '0')}:${mins.toString().padStart(2, '0')}`;\r\n }\r\n return '';\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsDurationFormatPipe } from './duration-format.pipe';\r\n\r\n@NgModule({\r\n declarations: [SdsDurationFormatPipe],\r\n imports: [CommonModule],\r\n exports: [SdsDurationFormatPipe],\r\n})\r\nexport class SdsDurationPipeModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAKa,qBAAqB,CAAA;AAC9B,IAAA,SAAS,CAAC,KAAoB,EAAE,cAAA,GAAyB,EAAE,EAAA;QACvD,IAAI,KAAK,KAAK,IAAI,EAAE;AAChB,YAAA,OAAO,cAAc,CAAC;AACzB,SAAA;AAAM,aAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAClC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9B,YAAA,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACxB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;AACrC,YAAA,MAAM,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC;AACxB,YAAA,OAAO,GAAG,IAAI,KAAK,CAAC,CAAC,GAAG,GAAG,GAAG,EAAE,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AAC9G,SAAA;AACD,QAAA,OAAO,EAAE,CAAC;KACb;;kHAZQ,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;gHAArB,qBAAqB,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,CAAA;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,mBAAmB;AAC5B,iBAAA,CAAA;;;MCKY,qBAAqB,CAAA;;kHAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,EAJf,YAAA,EAAA,CAAA,qBAAqB,CAC1B,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,qBAAqB,CAAA,EAAA,CAAA,CAAA;mHAEtB,qBAAqB,EAAA,OAAA,EAAA,CAHrB,CAAC,YAAY,CAAC,CAAA,EAAA,CAAA,CAAA;2FAGd,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
@@ -4,6 +4,8 @@ export * from '@spicainternational/ngx-sds-components/src/lib/callout';
4
4
  export * from '@spicainternational/ngx-sds-components/src/lib/color-picker';
5
5
  export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
6
6
  export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
7
+ export * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';
8
+ export * from '@spicainternational/ngx-sds-components/src/lib/duration-box';
7
9
  export * from '@spicainternational/ngx-sds-components/src/lib/layout';
8
10
  export * from '@spicainternational/ngx-sds-components/src/lib/modal';
9
11
  export * from '@spicainternational/ngx-sds-components/src/lib/navigation';
@@ -1 +1 @@
1
- {"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/layout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/page-header';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
1
+ {"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/duration-box';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/layout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/page-header';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spicainternational/ngx-sds-components",
3
- "version": "2.22.10",
3
+ "version": "2.23.0",
4
4
  "description": "Spica design system angular components.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=10.0.0",
@@ -84,6 +84,22 @@
84
84
  "node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs",
85
85
  "default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs"
86
86
  },
87
+ "./src/lib/duration-box": {
88
+ "types": "./src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.d.ts",
89
+ "esm2020": "./esm2020/src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
90
+ "es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
91
+ "es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
92
+ "node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
93
+ "default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs"
94
+ },
95
+ "./src/lib/duration-pipe": {
96
+ "types": "./src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.d.ts",
97
+ "esm2020": "./esm2020/src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
98
+ "es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
99
+ "es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
100
+ "node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
101
+ "default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs"
102
+ },
87
103
  "./src/lib/expansion-panel": {
88
104
  "types": "./src/lib/expansion-panel/spicainternational-ngx-sds-components-src-lib-expansion-panel.d.ts",
89
105
  "esm2020": "./esm2020/src/lib/expansion-panel/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs",
package/public-api.d.ts CHANGED
@@ -4,6 +4,8 @@ export * from '@spicainternational/ngx-sds-components/src/lib/callout';
4
4
  export * from '@spicainternational/ngx-sds-components/src/lib/color-picker';
5
5
  export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
6
6
  export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
7
+ export * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';
8
+ export * from '@spicainternational/ngx-sds-components/src/lib/duration-box';
7
9
  export * from '@spicainternational/ngx-sds-components/src/lib/layout';
8
10
  export * from '@spicainternational/ngx-sds-components/src/lib/modal';
9
11
  export * from '@spicainternational/ngx-sds-components/src/lib/navigation';
@@ -0,0 +1,39 @@
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { DxTextBoxComponent } from 'devextreme-angular';
3
+ import { DurationInputResolverService } from './duration-input-resolver.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class SdsDurationBoxComponent implements OnInit, OnChanges {
6
+ private _durationInputResolver;
7
+ value: number | null;
8
+ valueChange: EventEmitter<number | null>;
9
+ allowEmptyValue: boolean;
10
+ emptyValueText: string;
11
+ options?: number[];
12
+ width: string;
13
+ textbox?: DxTextBoxComponent;
14
+ elementUUID: string;
15
+ inputValue: string;
16
+ showOptions: boolean;
17
+ optionsDropdownButton: {
18
+ icon: string;
19
+ stylingMode: string;
20
+ onClick: () => void;
21
+ };
22
+ clearValueButton: {
23
+ icon: string;
24
+ stylingMode: string;
25
+ onClick: () => void;
26
+ };
27
+ isValueEmpty: boolean;
28
+ private isValueSetInternally;
29
+ constructor(_durationInputResolver: DurationInputResolverService);
30
+ ngOnChanges(changes: SimpleChanges): void;
31
+ ngOnInit(): void;
32
+ blockNonNumberOrSemicolon(e: any): void;
33
+ resolveInput(data: any): void;
34
+ applyOption(value: number | null): void;
35
+ private setValue;
36
+ private minutesToDurationString;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdsDurationBoxComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<SdsDurationBoxComponent, "sds-duration-box", never, { "value": "value"; "allowEmptyValue": "allowEmptyValue"; "emptyValueText": "emptyValueText"; "options": "options"; "width": "width"; }, { "valueChange": "valueChange"; }, never, never>;
39
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./duration-box.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@spicainternational/ngx-sds-components/src/lib/duration-pipe";
5
+ import * as i4 from "devextreme-angular";
6
+ export declare class SdsDurationBoxModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdsDurationBoxModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SdsDurationBoxModule, [typeof i1.SdsDurationBoxComponent], [typeof i2.CommonModule, typeof i3.SdsDurationPipeModule, typeof i4.DxTextBoxModule, typeof i4.DxPopoverModule, typeof i4.DxScrollViewModule], [typeof i1.SdsDurationBoxComponent]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<SdsDurationBoxModule>;
10
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DurationInputResolverService {
3
+ constructor();
4
+ resolve(input: string): number | null;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<DurationInputResolverService, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<DurationInputResolverService>;
7
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "module": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
3
+ "es2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
4
+ "esm2020": "../../../esm2020/src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
5
+ "fesm2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
6
+ "fesm2015": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
7
+ "typings": "spicainternational-ngx-sds-components-src-lib-duration-box.d.ts",
8
+ "sideEffects": false,
9
+ "name": "@spicainternational/ngx-sds-components/src/lib/duration-box"
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './duration-box.module';
2
+ export * from './duration-box.component';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@spicainternational/ngx-sds-components/src/lib/duration-box" />
5
+ export * from './public-api';
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SdsDurationFormatPipe implements PipeTransform {
4
+ transform(value: number | null, emptyValueText?: string): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdsDurationFormatPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<SdsDurationFormatPipe, "sdsDurationFormat">;
7
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./duration-format.pipe";
3
+ import * as i2 from "@angular/common";
4
+ export declare class SdsDurationPipeModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdsDurationPipeModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SdsDurationPipeModule, [typeof i1.SdsDurationFormatPipe], [typeof i2.CommonModule], [typeof i1.SdsDurationFormatPipe]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<SdsDurationPipeModule>;
8
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "module": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
3
+ "es2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
4
+ "esm2020": "../../../esm2020/src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
5
+ "fesm2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
6
+ "fesm2015": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
7
+ "typings": "spicainternational-ngx-sds-components-src-lib-duration-pipe.d.ts",
8
+ "sideEffects": false,
9
+ "name": "@spicainternational/ngx-sds-components/src/lib/duration-pipe"
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './duration-pipe.module';
2
+ export * from './duration-format.pipe';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@spicainternational/ngx-sds-components/src/lib/duration-pipe" />
5
+ export * from './public-api';