angular-dumb-lib 0.0.6 → 0.0.8
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/esm2022/angular-dumb-lib.mjs +5 -0
- package/esm2022/lib/angular-dumb-lib.component.mjs +20 -0
- package/esm2022/lib/angular-dumb-lib.module.mjs +32 -0
- package/esm2022/lib/angular-dumb-lib.service.mjs +15 -0
- package/esm2022/lib/components/atoms/button/button.component.mjs +34 -0
- package/esm2022/lib/components/atoms/input/input.component.mjs +57 -0
- package/esm2022/lib/components/molecules/content-design/content-design.component.mjs +32 -0
- package/esm2022/lib/shared/enums/enum.mjs +69 -0
- package/esm2022/lib/shared/interfaces/interface.mjs +2 -0
- package/esm2022/public-api.mjs +10 -0
- package/fesm2022/angular-dumb-lib.mjs +243 -0
- package/fesm2022/angular-dumb-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/angular-dumb-lib.component.d.ts +5 -0
- package/lib/angular-dumb-lib.module.d.ts +9 -0
- package/lib/angular-dumb-lib.service.d.ts +6 -0
- package/lib/components/atoms/button/button.component.d.ts +12 -0
- package/lib/components/atoms/input/input.component.d.ts +19 -0
- package/lib/components/molecules/content-design/content-design.component.d.ts +12 -0
- package/lib/shared/enums/enum.d.ts +59 -0
- package/lib/shared/interfaces/interface.d.ts +58 -0
- package/package.json +16 -3
- package/{src/public-api.ts → public-api.d.ts} +1 -5
- package/ng-package.json +0 -7
- package/src/lib/angular-dumb-lib.component.spec.ts +0 -21
- package/src/lib/angular-dumb-lib.component.ts +0 -15
- package/src/lib/angular-dumb-lib.module.ts +0 -19
- package/src/lib/angular-dumb-lib.service.spec.ts +0 -16
- package/src/lib/angular-dumb-lib.service.ts +0 -9
- package/src/lib/components/atoms/button/button.component.html +0 -15
- package/src/lib/components/atoms/button/button.component.scss +0 -76
- package/src/lib/components/atoms/button/button.component.ts +0 -33
- package/src/lib/components/atoms/datetime-picker/datetime-picker.component.html +0 -7
- package/src/lib/components/atoms/datetime-picker/datetime-picker.component.scss +0 -24
- package/src/lib/components/atoms/datetime-picker/datetime-picker.component.ts +0 -59
- package/src/lib/components/atoms/file-selection/file-selection.component.html +0 -24
- package/src/lib/components/atoms/file-selection/file-selection.component.scss +0 -35
- package/src/lib/components/atoms/file-selection/file-selection.component.ts +0 -86
- package/src/lib/components/atoms/input/input.component.html +0 -28
- package/src/lib/components/atoms/input/input.component.scss +0 -64
- package/src/lib/components/atoms/input/input.component.ts +0 -57
- package/src/lib/components/atoms/loading/loading.component.html +0 -3
- package/src/lib/components/atoms/loading/loading.component.scss +0 -36
- package/src/lib/components/atoms/loading/loading.component.ts +0 -21
- package/src/lib/components/atoms/selection/selection.component.html +0 -38
- package/src/lib/components/atoms/selection/selection.component.scss +0 -65
- package/src/lib/components/atoms/selection/selection.component.ts +0 -84
- package/src/lib/components/atoms/slider/slider.component.html +0 -14
- package/src/lib/components/atoms/slider/slider.component.scss +0 -50
- package/src/lib/components/atoms/slider/slider.component.ts +0 -37
- package/src/lib/components/atoms/tags/tags.component.html +0 -25
- package/src/lib/components/atoms/tags/tags.component.scss +0 -58
- package/src/lib/components/atoms/tags/tags.component.ts +0 -62
- package/src/lib/components/molecules/cards/cards.component.html +0 -12
- package/src/lib/components/molecules/cards/cards.component.scss +0 -14
- package/src/lib/components/molecules/cards/cards.component.ts +0 -19
- package/src/lib/components/molecules/content-design/content-design.component.html +0 -14
- package/src/lib/components/molecules/content-design/content-design.component.scss +0 -68
- package/src/lib/components/molecules/content-design/content-design.component.ts +0 -32
- package/src/lib/components/molecules/form/form.component.html +0 -22
- package/src/lib/components/molecules/form/form.component.scss +0 -17
- package/src/lib/components/molecules/form/form.component.ts +0 -64
- package/src/lib/components/molecules/modal/modal.component.html +0 -16
- package/src/lib/components/molecules/modal/modal.component.scss +0 -83
- package/src/lib/components/molecules/modal/modal.component.ts +0 -48
- package/src/lib/components/molecules/paginator/paginator.component.html +0 -25
- package/src/lib/components/molecules/paginator/paginator.component.scss +0 -27
- package/src/lib/components/molecules/paginator/paginator.component.ts +0 -126
- package/src/lib/components/molecules/table/table.component.html +0 -45
- package/src/lib/components/molecules/table/table.component.scss +0 -169
- package/src/lib/components/molecules/table/table.component.ts +0 -40
- package/src/lib/components/pages/footer/footer.component.html +0 -32
- package/src/lib/components/pages/footer/footer.component.scss +0 -69
- package/src/lib/components/pages/footer/footer.component.ts +0 -16
- package/src/lib/components/pages/login/login.component.html +0 -10
- package/src/lib/components/pages/login/login.component.scss +0 -32
- package/src/lib/components/pages/login/login.component.ts +0 -32
- package/src/lib/components/pages/menu/menu.component.html +0 -18
- package/src/lib/components/pages/menu/menu.component.scss +0 -87
- package/src/lib/components/pages/menu/menu.component.ts +0 -26
- package/src/lib/components/pages/version/version.component.html +0 -3
- package/src/lib/components/pages/version/version.component.scss +0 -0
- package/src/lib/components/pages/version/version.component.ts +0 -28
- package/src/lib/shared/constants/constant.ts +0 -7
- package/src/lib/shared/enums/enum.ts +0 -68
- package/src/lib/shared/interfaces/interface.ts +0 -64
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-dumb-lib.mjs","sources":["../../../projects/angular-dumb-lib/src/lib/angular-dumb-lib.service.ts","../../../projects/angular-dumb-lib/src/lib/angular-dumb-lib.component.ts","../../../projects/angular-dumb-lib/src/lib/angular-dumb-lib.module.ts","../../../projects/angular-dumb-lib/src/lib/shared/enums/enum.ts","../../../projects/angular-dumb-lib/src/lib/components/atoms/button/button.component.ts","../../../projects/angular-dumb-lib/src/lib/components/atoms/button/button.component.html","../../../projects/angular-dumb-lib/src/lib/components/atoms/input/input.component.ts","../../../projects/angular-dumb-lib/src/lib/components/atoms/input/input.component.html","../../../projects/angular-dumb-lib/src/lib/components/molecules/content-design/content-design.component.ts","../../../projects/angular-dumb-lib/src/lib/components/molecules/content-design/content-design.component.html","../../../projects/angular-dumb-lib/src/public-api.ts","../../../projects/angular-dumb-lib/src/angular-dumb-lib.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AngularDumbLibService {\n\n constructor() { }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-angular-dumb-lib',\n template: `\n <p>\n angular-dumb-lib works!\n </p>\n `,\n styles: [\n ]\n})\nexport class AngularDumbLibComponent {\n\n}\n","import { NgModule } from '@angular/core';\r\nimport { AngularDumbLibComponent } from './angular-dumb-lib.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n\r\n@NgModule({\r\n declarations: [\r\n AngularDumbLibComponent,\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n ],\r\n exports: [\r\n AngularDumbLibComponent,\r\n ]\r\n})\r\nexport class AngularDumbLibModule { }\r\n","\r\nexport enum DesignType {\r\n normal = 'normal',\r\n contrast = 'contrast'\r\n}\r\n\r\nexport enum ButtonType {\r\n submit = 'submit',\r\n button = 'button'\r\n}\r\n\r\nexport enum InputGroupType {\r\n textual = 'textual',\r\n datetime = 'datetime',\r\n selection = 'selection',\r\n file = 'file'\r\n}\r\n\r\nexport enum InputDirection {\r\n horizontal = 'horizontal',\r\n vertical = 'vertical'\r\n}\r\n\r\nexport enum InputType {\r\n image = 'image',\r\n text = 'text',\r\n richText = 'richText',\r\n password = 'password',\r\n email = 'email',\r\n url = 'url',\r\n tel = 'tel',\r\n search = 'search',\r\n number = 'number',\r\n range = 'range',\r\n hidden = 'hidden',\r\n textarea = 'textarea',\r\n datetime = 'datetime',\r\n checkbox = 'checkbox',\r\n radio = 'radio',\r\n select = 'select',\r\n file = 'file'\r\n}\r\n\r\nexport enum ContentDirection {\r\n left = 'left',\r\n right = 'right',\r\n up = 'up',\r\n down = 'down'\r\n}\r\n\r\nexport enum SelectionType {\r\n dropdown = 'dropdown',\r\n radio = 'radio',\r\n checkbox = 'checkbox'\r\n}\r\n\r\nexport enum LoadingSize {\r\n\tXbig = 'xbig',\r\n\tBig = 'big',\r\n\tMedium = 'medium',\r\n\tSmall = 'small',\r\n\tXsmall = 'xsmall'\r\n}\r\n\r\nexport enum MenuDirection {\r\n vertical = 'vertical',\r\n horizontal = 'horizontal'\r\n}\r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { ButtonType, DesignType } from '../../../shared/enums/enum';\r\nimport { IButtonConfig } from '../../../shared/interfaces/interface';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'app-button',\r\n standalone: true,\r\n templateUrl: './button.component.html',\r\n styleUrls: ['./button.component.scss'],\r\n imports: [CommonModule]\r\n})\r\nexport class ButtonComponent implements OnInit {\r\n @Input() config!: IButtonConfig;\r\n\r\n @Output() clickEvent = new EventEmitter<void>();\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n this.config = {\r\n isDisabled: false,\r\n isActive: false,\r\n designType: DesignType.normal,\r\n type: ButtonType.submit,\r\n ...this.config,\r\n }\r\n }\r\n\r\n onButtonClick() {\r\n this.clickEvent.emit();\r\n }\r\n}\r\n","<button\r\n type=\"{{config.type}}\"\r\n class=\"btn btn-primary\"\r\n [disabled]=\"config.isDisabled\"\r\n [ngClass]=\"{'active': config.isActive,\r\n 'normal': config.designType === 'normal',\r\n 'contrast': config.designType === 'contrast'}\"\r\n (click)=\"onButtonClick()\">\r\n <div class=\"button-content\">\r\n <ng-container *ngIf=\"config.iconValue\">\r\n <i class=\"material-icons\" data-toggle=\"tooltip\" title=\"Delete\">{{config.iconValue}}</i>\r\n </ng-container>\r\n <span>{{ config.label }}</span>\r\n </div>\r\n</button>\r\n","import { Component, Input, OnInit, forwardRef } from '@angular/core';\r\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { InputDirection, InputType } from '../../../shared/enums/enum';\r\nimport { IInputConfig } from '../../../shared/interfaces/interface';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'app-input',\r\n standalone: true,\r\n templateUrl: './input.component.html',\r\n styleUrls: ['./input.component.scss'],\r\n providers: [{\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => InputComponent),\r\n multi: true\r\n }],\r\n imports: [CommonModule, FormsModule]\r\n})\r\nexport class InputComponent implements OnInit, ControlValueAccessor {\r\n @Input() config!: IInputConfig;\r\n\r\n private _value: any = '';\r\n\r\n get value() {\r\n return this._value;\r\n }\r\n\r\n set value(value: any) {\r\n this._value = value;\r\n this.onChange(this._value);\r\n this.onTouched();\r\n }\r\n\r\n onChange: any = () => {};\r\n onTouched: any = () => {};\r\n\r\n constructor() { }\r\n\r\n writeValue(value: any): void {\r\n this._value = value;\r\n }\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn\r\n }\r\n\r\n ngOnInit() {\r\n this.config = {\r\n type: InputType.text,\r\n direction: InputDirection.vertical,\r\n isValid: true,\r\n ...this.config,\r\n };\r\n }\r\n}\r\n","<div class=\"input-item\" [ngClass]=\"config.direction\">\r\n <label *ngIf=\"config.label\">\r\n {{ config.label }}\r\n <span *ngIf=\"config.required\" class=\"required-indicator\">*</span>\r\n </label>\r\n\r\n <div class=\"input-container\">\r\n <input *ngIf=\"config.type !== 'textarea' && config.type !== 'richText' && config.type !== 'image'\"\r\n [type]=\"config.type\"\r\n [name]=\"config.name\"\r\n [required]=\"config.required\"\r\n [(ngModel)]=\"value\"\r\n [placeholder] = \"config.placeholder\"\r\n [ngClass]=\"{'input-error': !config.isValid}\">\r\n <textarea *ngIf=\"config.type === 'textarea'\"\r\n [name]=\"config.name\"\r\n [required]=\"config.required\"\r\n [(ngModel)]=\"value\"\r\n [placeholder] = \"config.placeholder\"\r\n [ngClass]=\"{'input-error': !config.isValid}\">\r\n </textarea>\r\n <i *ngIf=\"!config.isValid\" class=\"material-icons warning-icon\">error</i>\r\n </div>\r\n\r\n <div *ngIf=\"config.type === 'image'\">\r\n <img *ngIf=\"value\" [src]=\"value\" alt=\"Selected Image\" class=\"preview-image\"/>\r\n </div>\r\n</div>\r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { IContentDesign } from '../../../shared/interfaces/interface';\nimport { ContentDirection } from '../../../shared/enums/enum';\nimport { ButtonComponent } from '../../atoms/button/button.component';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'app-content-design',\n standalone: true,\n templateUrl: './content-design.component.html',\n styleUrls: ['./content-design.component.scss'],\n imports: [CommonModule, ButtonComponent]\n})\nexport class ContentDesignComponent implements OnInit {\n @Input() content!: IContentDesign;\n\n @Output() clickEvent = new EventEmitter<void>();\n\n constructor(\n ) { }\n\n ngOnInit() {\n this.content = {\n contentDirection: ContentDirection.left,\n ...this.content,\n }\n }\n\n onButtonClick() {\n this.clickEvent.emit();\n }\n}\n","<div class=\"content-designer\" [ngClass]=\"content.contentDirection\">\n <div *ngIf=\"content.coverImage\" class=\"image\">\n <img [src]=\"content.coverImage\" alt=\"Cover Image\">\n </div>\n\n <div class=\"content\">\n <h2>{{ content.title }}</h2>\n <p>{{ content.content }}</p>\n <ng-container [ngTemplateOutlet]=\"content.template\"></ng-container>\n <app-button *ngIf=\"content.button\" [config] = \"content.button\"\n (clickEvent)=\"onButtonClick()\">\n </app-button>\n </div>\n</div>\n","/*\r\n * Public API Surface of angular-dumb-lib\r\n */\r\n\r\nexport * from './lib/angular-dumb-lib.service';\r\nexport * from './lib/angular-dumb-lib.component';\r\nexport * from './lib/angular-dumb-lib.module';\r\nexport * from './lib/components/atoms/button/button.component';\r\nexport * from './lib/components/atoms/input/input.component';\r\nexport * from './lib/components/molecules/content-design/content-design.component'\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAEA,MAGa,qBAAqB,CAAA;AAEhC,IAAA,WAAA,GAAA,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bnC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,ugBAcA,EDHY,MAAA,EAAA,CAAA,u8BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,wYAAE,eAAe,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,QAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAE5B,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAPlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,cAClB,IAAI,EAAA,OAAA,EAGP,CAAC,YAAY,EAAE,eAAe,CAAC,EAAA,QAAA,EAAA,ugBAAA,EAAA,MAAA,EAAA,CAAA,u8BAAA,CAAA,EAAA,CAAA;0EAG/B,OAAO,EAAA,CAAA;sBAAf,KAAK;gBAEI,UAAU,EAAA,CAAA;sBAAnB,MAAM;;;AEhBT;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class AngularDumbLibComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularDumbLibComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularDumbLibComponent, "lib-angular-dumb-lib", never, {}, {}, never, never, false, never>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./angular-dumb-lib.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
export declare class AngularDumbLibModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularDumbLibModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AngularDumbLibModule, [typeof i1.AngularDumbLibComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule], [typeof i1.AngularDumbLibComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AngularDumbLibModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { IButtonConfig } from '../../../shared/interfaces/interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ButtonComponent implements OnInit {
|
|
5
|
+
config: IButtonConfig;
|
|
6
|
+
clickEvent: EventEmitter<void>;
|
|
7
|
+
constructor();
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
onButtonClick(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "app-button", never, { "config": { "alias": "config"; "required": false; }; }, { "clickEvent": "clickEvent"; }, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { IInputConfig } from '../../../shared/interfaces/interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class InputComponent implements OnInit, ControlValueAccessor {
|
|
6
|
+
config: IInputConfig;
|
|
7
|
+
private _value;
|
|
8
|
+
get value(): any;
|
|
9
|
+
set value(value: any);
|
|
10
|
+
onChange: any;
|
|
11
|
+
onTouched: any;
|
|
12
|
+
constructor();
|
|
13
|
+
writeValue(value: any): void;
|
|
14
|
+
registerOnChange(fn: any): void;
|
|
15
|
+
registerOnTouched(fn: any): void;
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "app-input", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { IContentDesign } from '../../../shared/interfaces/interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ContentDesignComponent implements OnInit {
|
|
5
|
+
content: IContentDesign;
|
|
6
|
+
clickEvent: EventEmitter<void>;
|
|
7
|
+
constructor();
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
onButtonClick(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContentDesignComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContentDesignComponent, "app-content-design", never, { "content": { "alias": "content"; "required": false; }; }, { "clickEvent": "clickEvent"; }, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare enum DesignType {
|
|
2
|
+
normal = "normal",
|
|
3
|
+
contrast = "contrast"
|
|
4
|
+
}
|
|
5
|
+
export declare enum ButtonType {
|
|
6
|
+
submit = "submit",
|
|
7
|
+
button = "button"
|
|
8
|
+
}
|
|
9
|
+
export declare enum InputGroupType {
|
|
10
|
+
textual = "textual",
|
|
11
|
+
datetime = "datetime",
|
|
12
|
+
selection = "selection",
|
|
13
|
+
file = "file"
|
|
14
|
+
}
|
|
15
|
+
export declare enum InputDirection {
|
|
16
|
+
horizontal = "horizontal",
|
|
17
|
+
vertical = "vertical"
|
|
18
|
+
}
|
|
19
|
+
export declare enum InputType {
|
|
20
|
+
image = "image",
|
|
21
|
+
text = "text",
|
|
22
|
+
richText = "richText",
|
|
23
|
+
password = "password",
|
|
24
|
+
email = "email",
|
|
25
|
+
url = "url",
|
|
26
|
+
tel = "tel",
|
|
27
|
+
search = "search",
|
|
28
|
+
number = "number",
|
|
29
|
+
range = "range",
|
|
30
|
+
hidden = "hidden",
|
|
31
|
+
textarea = "textarea",
|
|
32
|
+
datetime = "datetime",
|
|
33
|
+
checkbox = "checkbox",
|
|
34
|
+
radio = "radio",
|
|
35
|
+
select = "select",
|
|
36
|
+
file = "file"
|
|
37
|
+
}
|
|
38
|
+
export declare enum ContentDirection {
|
|
39
|
+
left = "left",
|
|
40
|
+
right = "right",
|
|
41
|
+
up = "up",
|
|
42
|
+
down = "down"
|
|
43
|
+
}
|
|
44
|
+
export declare enum SelectionType {
|
|
45
|
+
dropdown = "dropdown",
|
|
46
|
+
radio = "radio",
|
|
47
|
+
checkbox = "checkbox"
|
|
48
|
+
}
|
|
49
|
+
export declare enum LoadingSize {
|
|
50
|
+
Xbig = "xbig",
|
|
51
|
+
Big = "big",
|
|
52
|
+
Medium = "medium",
|
|
53
|
+
Small = "small",
|
|
54
|
+
Xsmall = "xsmall"
|
|
55
|
+
}
|
|
56
|
+
export declare enum MenuDirection {
|
|
57
|
+
vertical = "vertical",
|
|
58
|
+
horizontal = "horizontal"
|
|
59
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import { ButtonType, ContentDirection, DesignType, InputDirection, InputType } from "../enums/enum";
|
|
3
|
+
export interface IButtonConfig {
|
|
4
|
+
isDisabled?: boolean;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
designType?: DesignType;
|
|
7
|
+
label?: string;
|
|
8
|
+
iconValue?: string;
|
|
9
|
+
type?: ButtonType;
|
|
10
|
+
action?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IInputConfig {
|
|
13
|
+
required: boolean;
|
|
14
|
+
label?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
type?: InputType;
|
|
18
|
+
direction?: InputDirection;
|
|
19
|
+
isValid?: boolean;
|
|
20
|
+
options?: IDropdownOption[];
|
|
21
|
+
}
|
|
22
|
+
export interface IContentDesign {
|
|
23
|
+
name?: string;
|
|
24
|
+
coverImage?: string;
|
|
25
|
+
issuedDate?: string;
|
|
26
|
+
title?: string;
|
|
27
|
+
contentDirection?: ContentDirection;
|
|
28
|
+
content?: string;
|
|
29
|
+
template: TemplateRef<unknown> | null;
|
|
30
|
+
button?: IButtonConfig;
|
|
31
|
+
}
|
|
32
|
+
export interface IDropdownOption {
|
|
33
|
+
label: string;
|
|
34
|
+
value: any;
|
|
35
|
+
}
|
|
36
|
+
export interface IMenuItem {
|
|
37
|
+
label: string;
|
|
38
|
+
route: string;
|
|
39
|
+
}
|
|
40
|
+
export interface IModalEvent {
|
|
41
|
+
isDialog: boolean;
|
|
42
|
+
isModalVisible: boolean;
|
|
43
|
+
template: TemplateRef<unknown> | null;
|
|
44
|
+
title: string;
|
|
45
|
+
params?: {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
};
|
|
48
|
+
onOk?: () => void;
|
|
49
|
+
onCancel?: () => void;
|
|
50
|
+
}
|
|
51
|
+
export interface IPaginator {
|
|
52
|
+
itemsPerPage: number;
|
|
53
|
+
selectedPage: number;
|
|
54
|
+
}
|
|
55
|
+
export interface IDataColumnConfig {
|
|
56
|
+
field: string;
|
|
57
|
+
name: string;
|
|
58
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-dumb-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^16.0.0",
|
|
6
6
|
"@angular/core": "^16.0.0"
|
|
@@ -8,5 +8,18 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.3.0"
|
|
10
10
|
},
|
|
11
|
-
"sideEffects": false
|
|
12
|
-
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/angular-dumb-lib.mjs",
|
|
13
|
+
"typings": "index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"esm2022": "./esm2022/angular-dumb-lib.mjs",
|
|
21
|
+
"esm": "./esm2022/angular-dumb-lib.mjs",
|
|
22
|
+
"default": "./fesm2022/angular-dumb-lib.mjs"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of angular-dumb-lib
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
export * from './lib/angular-dumb-lib.service';
|
|
6
2
|
export * from './lib/angular-dumb-lib.component';
|
|
7
3
|
export * from './lib/angular-dumb-lib.module';
|
|
8
4
|
export * from './lib/components/atoms/button/button.component';
|
|
9
5
|
export * from './lib/components/atoms/input/input.component';
|
|
10
|
-
export * from './lib/components/molecules/content-design/content-design.component'
|
|
6
|
+
export * from './lib/components/molecules/content-design/content-design.component';
|
package/ng-package.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { AngularDumbLibComponent } from './angular-dumb-lib.component';
|
|
4
|
-
|
|
5
|
-
describe('AngularDumbLibComponent', () => {
|
|
6
|
-
let component: AngularDumbLibComponent;
|
|
7
|
-
let fixture: ComponentFixture<AngularDumbLibComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [AngularDumbLibComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(AngularDumbLibComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { AngularDumbLibComponent } from './angular-dumb-lib.component';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
|
|
6
|
-
@NgModule({
|
|
7
|
-
declarations: [
|
|
8
|
-
AngularDumbLibComponent,
|
|
9
|
-
],
|
|
10
|
-
imports: [
|
|
11
|
-
CommonModule,
|
|
12
|
-
FormsModule,
|
|
13
|
-
ReactiveFormsModule,
|
|
14
|
-
],
|
|
15
|
-
exports: [
|
|
16
|
-
AngularDumbLibComponent,
|
|
17
|
-
]
|
|
18
|
-
})
|
|
19
|
-
export class AngularDumbLibModule { }
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { AngularDumbLibService } from './angular-dumb-lib.service';
|
|
4
|
-
|
|
5
|
-
describe('AngularDumbLibService', () => {
|
|
6
|
-
let service: AngularDumbLibService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(AngularDumbLibService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<button
|
|
2
|
-
type="{{config.type}}"
|
|
3
|
-
class="btn btn-primary"
|
|
4
|
-
[disabled]="config.isDisabled"
|
|
5
|
-
[ngClass]="{'active': config.isActive,
|
|
6
|
-
'normal': config.designType === 'normal',
|
|
7
|
-
'contrast': config.designType === 'contrast'}"
|
|
8
|
-
(click)="onButtonClick()">
|
|
9
|
-
<div class="button-content">
|
|
10
|
-
<ng-container *ngIf="config.iconValue">
|
|
11
|
-
<i class="material-icons" data-toggle="tooltip" title="Delete">{{config.iconValue}}</i>
|
|
12
|
-
</ng-container>
|
|
13
|
-
<span>{{ config.label }}</span>
|
|
14
|
-
</div>
|
|
15
|
-
</button>
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// Normal Button Variables
|
|
2
|
-
$normal-bg-color: #007BFF; // Primary blue for normal button background
|
|
3
|
-
$normal-text-color: #FFFFFF; // White text for normal button
|
|
4
|
-
$normal-border-color: #007BFF; // Same as background for border
|
|
5
|
-
$normal-hover-bg-color: #0056D2; // Slightly darker blue for hover state
|
|
6
|
-
$normal-hover-text-color: #FFFFFF; // Keeping white text for hover state
|
|
7
|
-
|
|
8
|
-
// Contrast Button Variables
|
|
9
|
-
$contrast-bg-color: #F9F9F9; // Off-white for contrast button background
|
|
10
|
-
$contrast-text-color: #007BFF; // Dark gray for contrast button text
|
|
11
|
-
$contrast-border-color: #4A90E2; // Dark blue for contrast button border
|
|
12
|
-
$contrast-hover-bg-color: #E6F0FA; // Light blue-gray for hover background
|
|
13
|
-
$contrast-hover-text-color: #1A1A1A; // Dark gray for hover text color
|
|
14
|
-
|
|
15
|
-
$disabled-bg-color: #cccccc;
|
|
16
|
-
$disabled-text-color: #666666;
|
|
17
|
-
|
|
18
|
-
$active-bg-color: #003d99;
|
|
19
|
-
|
|
20
|
-
// Base Button Styles
|
|
21
|
-
button.btn.btn-primary {
|
|
22
|
-
padding: 0.5rem 1rem;
|
|
23
|
-
border: none;
|
|
24
|
-
border-radius: 0.25rem;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
height: 3rem;
|
|
27
|
-
|
|
28
|
-
// Button Content Alignment
|
|
29
|
-
.button-content {
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: row;
|
|
32
|
-
justify-content: center;
|
|
33
|
-
align-items: center;
|
|
34
|
-
height: 100%;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Disabled State (Shared between normal and contrast)
|
|
38
|
-
&:disabled {
|
|
39
|
-
background-color: $disabled-bg-color !important;
|
|
40
|
-
color: $disabled-text-color !important;
|
|
41
|
-
cursor: not-allowed !important;
|
|
42
|
-
border-color: $disabled-text-color !important; // You can remove this if not needed for normal design
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Normal Design
|
|
46
|
-
&.normal {
|
|
47
|
-
background-color: $normal-bg-color;
|
|
48
|
-
color: $normal-text-color;
|
|
49
|
-
|
|
50
|
-
&:hover:not(:disabled) {
|
|
51
|
-
background-color: $normal-hover-bg-color;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Contrast Design
|
|
56
|
-
&.contrast {
|
|
57
|
-
color: $contrast-text-color;
|
|
58
|
-
border: 1px solid $contrast-border-color;
|
|
59
|
-
|
|
60
|
-
&:hover:not(:disabled) {
|
|
61
|
-
background-color: $contrast-hover-bg-color;
|
|
62
|
-
color: $contrast-hover-text-color;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Active State (Applies to both designs)
|
|
67
|
-
&.active {
|
|
68
|
-
background-color: $active-bg-color;
|
|
69
|
-
color: $normal-text-color;
|
|
70
|
-
|
|
71
|
-
&:hover:not(:disabled) {
|
|
72
|
-
background-color: $normal-hover-bg-color;
|
|
73
|
-
color: $normal-text-color;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { ButtonType, DesignType } from '../../../shared/enums/enum';
|
|
3
|
-
import { IButtonConfig } from '../../../shared/interfaces/interface';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'app-button',
|
|
8
|
-
standalone: true,
|
|
9
|
-
templateUrl: './button.component.html',
|
|
10
|
-
styleUrls: ['./button.component.scss'],
|
|
11
|
-
imports: [CommonModule]
|
|
12
|
-
})
|
|
13
|
-
export class ButtonComponent implements OnInit {
|
|
14
|
-
@Input() config!: IButtonConfig;
|
|
15
|
-
|
|
16
|
-
@Output() clickEvent = new EventEmitter<void>();
|
|
17
|
-
|
|
18
|
-
constructor() { }
|
|
19
|
-
|
|
20
|
-
ngOnInit() {
|
|
21
|
-
this.config = {
|
|
22
|
-
isDisabled: false,
|
|
23
|
-
isActive: false,
|
|
24
|
-
designType: DesignType.normal,
|
|
25
|
-
type: ButtonType.submit,
|
|
26
|
-
...this.config,
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
onButtonClick() {
|
|
31
|
-
this.clickEvent.emit();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<div class="datetime-picker-container">
|
|
2
|
-
<label for="date">Datetime:</label>
|
|
3
|
-
<div class="inputs-container">
|
|
4
|
-
<input id="date" type="date" [(ngModel)]="selectedDate" (ngModelChange)="onDateChange($event)" (blur)="onTouched()">
|
|
5
|
-
<input id="time" type="time" [(ngModel)]="selectedTime" (ngModelChange)="onTimeChange($event)" (blur)="onTouched()">
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.datetime-picker-container {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
margin-bottom: 1rem;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.datetime-picker-container label {
|
|
8
|
-
margin-bottom: 0.5rem;
|
|
9
|
-
font-weight: bold;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.inputs-container {
|
|
13
|
-
display: flex;
|
|
14
|
-
gap: 1rem;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.inputs-container input[type="date"],
|
|
18
|
-
.inputs-container input[type="time"] {
|
|
19
|
-
padding: 0.5rem;
|
|
20
|
-
font-size: 1rem;
|
|
21
|
-
border: 1px solid #ccc;
|
|
22
|
-
border-radius: 4px;
|
|
23
|
-
width: 150px;
|
|
24
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Component, forwardRef } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app-datetime-picker',
|
|
6
|
-
standalone: true,
|
|
7
|
-
templateUrl: './datetime-picker.component.html',
|
|
8
|
-
styleUrls: ['./datetime-picker.component.scss'],
|
|
9
|
-
providers: [{
|
|
10
|
-
provide: NG_VALUE_ACCESSOR,
|
|
11
|
-
useExisting: forwardRef(() => DatetimePickerComponent),
|
|
12
|
-
multi: true
|
|
13
|
-
}],
|
|
14
|
-
imports: [FormsModule]
|
|
15
|
-
})
|
|
16
|
-
export class DatetimePickerComponent implements ControlValueAccessor {
|
|
17
|
-
selectedDate: string | null = null;
|
|
18
|
-
selectedTime: string | null = null;
|
|
19
|
-
|
|
20
|
-
public onChange: any = () => {};
|
|
21
|
-
public onTouched: any = () => {};
|
|
22
|
-
|
|
23
|
-
writeValue(value: any): void {
|
|
24
|
-
if (value) {
|
|
25
|
-
const date = new Date(value);
|
|
26
|
-
this.selectedDate = date.toISOString().split('T')[0]; // Extract the date part (YYYY-MM-DD)
|
|
27
|
-
this.selectedTime = date.toTimeString().split(' ')[0]; // Extract the time part (HH:mm:ss)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
registerOnChange(fn: any): void {
|
|
32
|
-
this.onChange = fn;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
registerOnTouched(fn: any): void {
|
|
36
|
-
this.onTouched = fn;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
setDisabledState?(isDisabled: boolean): void {
|
|
40
|
-
// Handle disabled state
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
onDateChange(event: any) {
|
|
44
|
-
this.selectedDate = event.target.value;
|
|
45
|
-
this.emitChange();
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
onTimeChange(event: any) {
|
|
49
|
-
this.selectedTime = event.target.value;
|
|
50
|
-
this.emitChange();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
private emitChange() {
|
|
54
|
-
if (this.selectedDate && this.selectedTime) {
|
|
55
|
-
const dateTime = `${this.selectedDate}T${this.selectedTime}`;
|
|
56
|
-
this.onChange(new Date(dateTime));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<div class="file-selector">
|
|
2
|
-
<label *ngIf="label">{{ label }}</label>
|
|
3
|
-
<input
|
|
4
|
-
id="fileInput"
|
|
5
|
-
type="file"
|
|
6
|
-
(change)="onFileSelected($event)"
|
|
7
|
-
accept="image/*"
|
|
8
|
-
class="hidden-file-input">
|
|
9
|
-
<div class="file-selection">
|
|
10
|
-
<!-- Custom button to trigger file input -->
|
|
11
|
-
<app-button [config]="config"
|
|
12
|
-
class="custom-file-button"
|
|
13
|
-
(clickEvent)="triggerFileInput()">
|
|
14
|
-
Select Image
|
|
15
|
-
</app-button>
|
|
16
|
-
<div *ngIf="fileName" class="file-name">
|
|
17
|
-
{{ fileName }}
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<div *ngIf="imageUrl">
|
|
22
|
-
<img [src]="imageUrl" alt="Selected Image" class="preview-image"/>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|