tuain-ng-forms-lib 17.2.22 → 17.2.23
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/lib/classes/forms/action.mjs +106 -0
- package/esm2022/lib/classes/forms/element.mjs +25 -0
- package/esm2022/lib/classes/forms/field.mjs +474 -0
- package/esm2022/lib/classes/forms/form.constants.mjs +26 -0
- package/esm2022/lib/classes/forms/form.mjs +608 -0
- package/esm2022/lib/classes/forms/piece-propagate.mjs +39 -0
- package/esm2022/lib/classes/forms/piece.mjs +134 -0
- package/esm2022/lib/classes/forms/section.mjs +151 -0
- package/esm2022/lib/classes/forms/subsection.mjs +99 -0
- package/esm2022/lib/classes/forms/table/action.mjs +38 -0
- package/esm2022/lib/classes/forms/table/column.mjs +74 -0
- package/esm2022/lib/classes/forms/table/row-data.mjs +116 -0
- package/esm2022/lib/classes/forms/table/table.mjs +535 -0
- package/esm2022/lib/components/elements/action.component.mjs +70 -0
- package/esm2022/lib/components/elements/field.component.mjs +115 -0
- package/esm2022/lib/components/elements/layout/element.component.mjs +21 -0
- package/esm2022/lib/components/elements/layout/form-error.component.mjs +23 -0
- package/esm2022/lib/components/elements/layout/form-header.component.mjs +23 -0
- package/esm2022/lib/components/elements/layout/piece.component.mjs +64 -0
- package/esm2022/lib/components/elements/layout/section.component.mjs +56 -0
- package/esm2022/lib/components/elements/layout/sub-section.component.mjs +56 -0
- package/esm2022/lib/components/elements/tables/table-record-action.component.mjs +72 -0
- package/esm2022/lib/components/elements/tables/table-record-field.component.mjs +31 -0
- package/esm2022/lib/components/elements/tables/table.component.mjs +109 -0
- package/esm2022/lib/components/forms/basic-form.mjs +1408 -0
- package/esm2022/lib/services/event-manager.service.mjs +43 -0
- package/esm2022/lib/services/file-manager.service.mjs +7 -0
- package/esm2022/lib/services/form-manager.service.mjs +81 -0
- package/esm2022/lib/tuain-ng-forms-lib.module.mjs +71 -0
- package/esm2022/public-api.mjs +19 -0
- package/esm2022/tuain-ng-forms-lib.mjs +5 -0
- package/fesm2022/tuain-ng-forms-lib.mjs +4602 -0
- package/fesm2022/tuain-ng-forms-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/classes/forms/action.d.ts +40 -0
- package/lib/classes/forms/element.d.ts +9 -0
- package/lib/classes/forms/field.d.ts +206 -0
- package/lib/classes/forms/form.constants.d.ts +25 -0
- package/lib/classes/forms/form.d.ts +232 -0
- package/lib/classes/forms/piece-propagate.d.ts +13 -0
- package/lib/classes/forms/piece.d.ts +51 -0
- package/lib/classes/forms/section.d.ts +43 -0
- package/lib/classes/forms/subsection.d.ts +42 -0
- package/lib/classes/forms/table/action.d.ts +16 -0
- package/lib/classes/forms/table/column.d.ts +33 -0
- package/lib/classes/forms/table/row-data.d.ts +14 -0
- package/lib/classes/forms/table/table.d.ts +145 -0
- package/lib/components/elements/action.component.d.ts +22 -0
- package/lib/components/elements/field.component.d.ts +47 -0
- package/lib/components/elements/layout/element.component.d.ts +8 -0
- package/lib/components/elements/layout/form-error.component.d.ts +8 -0
- package/lib/components/elements/layout/form-header.component.d.ts +9 -0
- package/lib/components/elements/layout/piece.component.d.ts +18 -0
- package/lib/components/elements/layout/section.component.d.ts +13 -0
- package/lib/components/elements/layout/sub-section.component.d.ts +13 -0
- package/lib/components/elements/tables/table-record-action.component.d.ts +18 -0
- package/lib/components/elements/tables/table-record-field.component.d.ts +12 -0
- package/lib/components/elements/tables/table.component.d.ts +44 -0
- package/lib/components/forms/basic-form.d.ts +257 -0
- package/lib/services/event-manager.service.d.ts +11 -0
- package/lib/services/file-manager.service.d.ts +6 -0
- package/lib/services/form-manager.service.d.ts +28 -0
- package/lib/tuain-ng-forms-lib.module.d.ts +20 -0
- package/package.json +16 -2
- package/{src/public-api.ts → public-api.d.ts} +0 -5
- package/.browserslistrc +0 -16
- package/.yarn/cache/nanoid-npm-4.0.0-924f5c6312-7d5946df5c.zip +0 -0
- package/.yarn/cache/tslib-npm-2.4.1-36f0ed04db-19480d6e03.zip +0 -0
- package/.yarn/cache/yn-npm-5.0.0-b001dab23c-f0ec7710d3.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -11
- package/src/lib/classes/forms/action.ts +0 -117
- package/src/lib/classes/forms/element.ts +0 -26
- package/src/lib/classes/forms/field.ts +0 -522
- package/src/lib/classes/forms/form.constants.ts +0 -28
- package/src/lib/classes/forms/form.ts +0 -692
- package/src/lib/classes/forms/piece-propagate.ts +0 -47
- package/src/lib/classes/forms/piece.ts +0 -164
- package/src/lib/classes/forms/section.ts +0 -165
- package/src/lib/classes/forms/subsection.ts +0 -109
- package/src/lib/classes/forms/table/action.ts +0 -41
- package/src/lib/classes/forms/table/column.ts +0 -94
- package/src/lib/classes/forms/table/row-data.ts +0 -121
- package/src/lib/classes/forms/table/table.ts +0 -582
- package/src/lib/components/elements/action.component.ts +0 -70
- package/src/lib/components/elements/field.component.ts +0 -115
- package/src/lib/components/elements/layout/element.component.ts +0 -14
- package/src/lib/components/elements/layout/form-error.component.ts +0 -11
- package/src/lib/components/elements/layout/form-header.component.ts +0 -14
- package/src/lib/components/elements/layout/piece.component.ts +0 -60
- package/src/lib/components/elements/layout/section.component.ts +0 -52
- package/src/lib/components/elements/layout/sub-section.component.ts +0 -52
- package/src/lib/components/elements/tables/table-record-action.component.ts +0 -66
- package/src/lib/components/elements/tables/table-record-field.component.ts +0 -20
- package/src/lib/components/elements/tables/table.component.ts +0 -112
- package/src/lib/components/forms/basic-form.ts +0 -1464
- package/src/lib/services/event-manager.service.ts +0 -45
- package/src/lib/services/file-manager.service.ts +0 -7
- package/src/lib/services/form-manager.service.ts +0 -89
- package/src/lib/services/icon-dictionary.service.ts +0 -159
- package/src/lib/tuain-ng-forms-lib.module.ts +0 -40
- package/src/test.ts +0 -27
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Subject, BehaviorSubject, ReplaySubject } from 'rxjs';
|
|
2
|
-
|
|
3
|
-
export class LibEventManagerService {
|
|
4
|
-
eventSubjects: any = {};
|
|
5
|
-
eventSubjectParams: any = {};
|
|
6
|
-
|
|
7
|
-
constructor(eventSet: any[]) {
|
|
8
|
-
eventSet.forEach((event) => { this.addEventName(event); });
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
addEventName(event: any, rebuild = false) {
|
|
12
|
-
const eventObject = (typeof event === 'string') ? { name: event } : event;
|
|
13
|
-
const { name, type, initialValue, windowTime, timestampProvider } = eventObject;
|
|
14
|
-
const currentSubject = this.eventSubjects[name];
|
|
15
|
-
if (rebuild || !currentSubject) {
|
|
16
|
-
if (type === 'behaviour') {
|
|
17
|
-
const newEventSubject: BehaviorSubject<any> = new BehaviorSubject(initialValue);
|
|
18
|
-
this.eventSubjects[name] = newEventSubject;
|
|
19
|
-
} else if (type === 'subject') {
|
|
20
|
-
const newEventSubject: Subject<any> = new Subject();
|
|
21
|
-
this.eventSubjects[name] = newEventSubject;
|
|
22
|
-
} else {
|
|
23
|
-
const newEventSubject: ReplaySubject<any> = new ReplaySubject(initialValue, windowTime, timestampProvider);
|
|
24
|
-
this.eventSubjects[name] = newEventSubject;
|
|
25
|
-
}
|
|
26
|
-
this.eventSubjectParams[name] = { name: name, windowTime, timestampProvider };
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
resetSubject(eventClassName) {
|
|
31
|
-
const { name, windowTime, timestampProvider } = this.eventSubjectParams[eventClassName];
|
|
32
|
-
return this.addEventName({ name, windowTime, timestampProvider });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
getEventNames() { return Object.keys(this.eventSubjects); }
|
|
36
|
-
getSubject(eventClassName) { return eventClassName ? this.eventSubjects[eventClassName] : null; }
|
|
37
|
-
subscribe(eventClassName, callback) { return this.getSubject(eventClassName).subscribe(callback); }
|
|
38
|
-
next(eventClassName, data) {
|
|
39
|
-
const subject = this.getSubject(eventClassName);
|
|
40
|
-
if (!subject) {
|
|
41
|
-
console.log(`No se encontró subject ${eventClassName}`);
|
|
42
|
-
}
|
|
43
|
-
subject.next(data);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { nanoid } from 'nanoid';
|
|
2
|
-
|
|
3
|
-
export class LibFormManagerService {
|
|
4
|
-
pageStack: any[];
|
|
5
|
-
|
|
6
|
-
constructor() {
|
|
7
|
-
this.cleanStack();
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// Métodos virtuales para las aplicaciones
|
|
11
|
-
getFormDefinition(formCode) { }
|
|
12
|
-
execServerAction(actionDetail) { }
|
|
13
|
-
goToForm(formCode, token, subject) { }
|
|
14
|
-
async loadStack() { }
|
|
15
|
-
saveStack() { }
|
|
16
|
-
|
|
17
|
-
cleanStack() { this.pageStack = []; }
|
|
18
|
-
resetPageStack() { this.cleanStack() }
|
|
19
|
-
|
|
20
|
-
findFormInStack(token) {
|
|
21
|
-
const index = this.pageStack.findIndex(item => item?.token === token);
|
|
22
|
-
const data = (index >= 0) ? this.pageStack[index] : null;
|
|
23
|
-
return { index, data };
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
replaceItem(token, formInfo) {
|
|
27
|
-
if (!token || !formInfo) { return; }
|
|
28
|
-
const { index, data: storedForm } = this.findFormInStack(token);
|
|
29
|
-
let updatedForm: any = null;
|
|
30
|
-
if (index >= 0) {
|
|
31
|
-
updatedForm = { ...storedForm };
|
|
32
|
-
updatedForm.subject = formInfo?.subject ?? storedForm.subject;
|
|
33
|
-
updatedForm.state = formInfo?.state ?? storedForm.state;
|
|
34
|
-
updatedForm.fields = storedForm?.fields ?? {};
|
|
35
|
-
updatedForm.extra = storedForm?.extra ?? {};
|
|
36
|
-
if (formInfo.fields) {
|
|
37
|
-
Object.assign(updatedForm.fields, formInfo.fields);
|
|
38
|
-
}
|
|
39
|
-
if (formInfo.extra) {
|
|
40
|
-
Object.assign(updatedForm.extra, formInfo.extra);
|
|
41
|
-
}
|
|
42
|
-
this.pageStack[index] = updatedForm;
|
|
43
|
-
this.saveStack();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
stack(origin, target) {
|
|
48
|
-
const token = nanoid(6);
|
|
49
|
-
this.replaceItem(target.originToken, origin);
|
|
50
|
-
this.pageStack.push({ token, ...target });
|
|
51
|
-
this.saveStack();
|
|
52
|
-
return token;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
unstack(token = null) {
|
|
56
|
-
let index = (token) ? this.findFormInStack(token).index : this.pageStack.length - 2;
|
|
57
|
-
let formInfo = null;
|
|
58
|
-
if (index >= 0) {
|
|
59
|
-
formInfo = this.pageStack[index];
|
|
60
|
-
this.pageStack.splice(index + 1);
|
|
61
|
-
this.saveStack();
|
|
62
|
-
}
|
|
63
|
-
return formInfo;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
getFormInfo(token: string) {
|
|
67
|
-
const { data } = this.findFormInStack(token);
|
|
68
|
-
return {
|
|
69
|
-
token: data?.token,
|
|
70
|
-
subject: data?.subject,
|
|
71
|
-
state: data?.state,
|
|
72
|
-
originToken: data?.originToken,
|
|
73
|
-
fields: data?.fields ?? {},
|
|
74
|
-
extra: data?.extra ?? {}
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
openForm(origin: any, target: any) {
|
|
79
|
-
(!origin) && this.cleanStack();
|
|
80
|
-
target.originToken = origin?.token ?? null;
|
|
81
|
-
const token = this.stack(origin, target);
|
|
82
|
-
this.goToForm(target.name, token, target.subject);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
backTo(targetToken = null) {
|
|
86
|
-
const formInfo: any = this.unstack(targetToken);
|
|
87
|
-
formInfo && formInfo.name && this.goToForm(formInfo.name, formInfo.token, formInfo.subject);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
export const iconDictionary = {
|
|
2
|
-
SELECT: 'icmn-pushpin',
|
|
3
|
-
selectHolder: 'icmn-user-check',
|
|
4
|
-
validateAML: 'icmn-warning',
|
|
5
|
-
NEW: 'icmn-file-empty',
|
|
6
|
-
'FORM-CREATE': 'icmn-file-empty',
|
|
7
|
-
'FORM-EDIT': 'icmn-pencil2',
|
|
8
|
-
'FORM-VIEW': 'icmn-file-text2',
|
|
9
|
-
SHIELD: 'fa fa-shield',
|
|
10
|
-
LOGIN: 'fa fa-sign-in',
|
|
11
|
-
LOGOUT: 'fa fa-sign-out',
|
|
12
|
-
VIEW: 'icmn-eye',
|
|
13
|
-
EDIT: 'icmn-pencil',
|
|
14
|
-
DETAIL: 'icmn-binoculars',
|
|
15
|
-
DELETE: 'icmn-bin',
|
|
16
|
-
SERVERPROCESS: 'icmn-cloud-check',
|
|
17
|
-
DEFAULT: 'icmn-home',
|
|
18
|
-
HOME: 'icmn-home',
|
|
19
|
-
IMAGE: 'icmn-image',
|
|
20
|
-
PICTURE: 'icmn-camera',
|
|
21
|
-
TEXT: 'icmn-file-text',
|
|
22
|
-
MOVEUP: 'icmn-arrow-up',
|
|
23
|
-
MOVEDOWN: 'icmn-arrow-down',
|
|
24
|
-
NEWAFFILIATION: 'icmn-profile',
|
|
25
|
-
AUTONEWAFFILIATION: 'icmn-profile',
|
|
26
|
-
PROFILE: 'icmn-profile',
|
|
27
|
-
ZIPFILE: 'icmn-file-zip',
|
|
28
|
-
COPY: 'icmn-copy',
|
|
29
|
-
FOLDER: 'icmn-folder-open',
|
|
30
|
-
TAGS: 'icmn-price-tags',
|
|
31
|
-
BARCODE: 'icmn-barcode',
|
|
32
|
-
BARCODE2: 'fa fa-barcode',
|
|
33
|
-
KEYBOARD: 'fa fa-keyboard-o',
|
|
34
|
-
CART: 'icmn-cart',
|
|
35
|
-
CAMARACOMERCIO: 'icmn-book',
|
|
36
|
-
SARLAFT: 'icmn-binoculars',
|
|
37
|
-
SCREENING: 'icmn-user-check',
|
|
38
|
-
ENTITY: 'icmn-library',
|
|
39
|
-
COIN: 'icmn-coin-dollar',
|
|
40
|
-
CREDITCARD: 'icmn-credit-card',
|
|
41
|
-
CONTACTS: 'icmn-address-book',
|
|
42
|
-
LOCATION: 'icmn-location',
|
|
43
|
-
CODES: 'icmn-file-text',
|
|
44
|
-
BPMCODES: 'icmn-file-text2',
|
|
45
|
-
MAIL: 'icmn-envelop',
|
|
46
|
-
MAP: 'icmn-map',
|
|
47
|
-
WARNING: 'icmn-warning',
|
|
48
|
-
NOTIFICATION: 'icmn-notification',
|
|
49
|
-
QUESTION: 'icmn-question',
|
|
50
|
-
INFO: 'icmn-info',
|
|
51
|
-
SAVE: 'icmn-floppy-disk',
|
|
52
|
-
INBOXFULL: 'icmn-drawer',
|
|
53
|
-
INBOXEMPTY: 'icmn-drawer2',
|
|
54
|
-
DATABASE: 'icmn-database',
|
|
55
|
-
UNDO: 'icmn-undo2',
|
|
56
|
-
REDO: 'icmn-redo2',
|
|
57
|
-
CHAT: 'icmn-bubbles4',
|
|
58
|
-
BRIEFCASE: 'icmn-briefcase',
|
|
59
|
-
USER: 'icmn-user',
|
|
60
|
-
ADDUSER: 'icmn-user-plus',
|
|
61
|
-
REMOVEUSER: 'icmn-user-minus',
|
|
62
|
-
SPINNER: 'icmn-spiiner3',
|
|
63
|
-
SEARCH: 'icmn-search',
|
|
64
|
-
ZOOMIN: 'icmn-zoom-in',
|
|
65
|
-
ZOOMOUT: 'icmn-zoom-out',
|
|
66
|
-
KEY: 'icmn-key',
|
|
67
|
-
LOCK: 'icmn-lock',
|
|
68
|
-
lockDoc: 'icmn-lock',
|
|
69
|
-
UNLOCK: 'icmn-unlocked',
|
|
70
|
-
CONFIG: 'icmn-wrench',
|
|
71
|
-
TUNE: 'icmn-equalizer',
|
|
72
|
-
GEAR: 'icmn-cog',
|
|
73
|
-
ADMIN: 'fa fa-cogs',
|
|
74
|
-
LIST: 'icmn-list',
|
|
75
|
-
FORMRECORD: 'icmn-insert-template',
|
|
76
|
-
PIE: 'icmn-pie-chart',
|
|
77
|
-
GRAPH: 'icmn-stats-dots',
|
|
78
|
-
TROPHY: 'icmn-trophy',
|
|
79
|
-
GIFT: 'icmn-gift',
|
|
80
|
-
GAUGE: 'icmn-meter',
|
|
81
|
-
FIRE: 'icmn-fire',
|
|
82
|
-
LAB: 'icmn-lab',
|
|
83
|
-
DELIVER: 'icmn-truck',
|
|
84
|
-
MOBILE: 'icmn-mobile',
|
|
85
|
-
MOBILE2: 'icmn-mobile',
|
|
86
|
-
RECHARGE: 'icmn-power-cord',
|
|
87
|
-
TREE: 'icmn-tree',
|
|
88
|
-
EARTH: 'icmn-earth',
|
|
89
|
-
TARGET: 'icmn-target',
|
|
90
|
-
POWER: 'icmn-switch',
|
|
91
|
-
VERIFY: 'icmn-clipboard',
|
|
92
|
-
UPLOAD: 'icmn-cloud-upload',
|
|
93
|
-
DOWNLOAD: 'icmn-cloud-download',
|
|
94
|
-
DOWNLOADSET: 'icmn-cloud-download',
|
|
95
|
-
LINK: 'icmn-link',
|
|
96
|
-
ATACH: 'icmn-atachment',
|
|
97
|
-
EYE: 'icmn-eye',
|
|
98
|
-
NOEYE: 'icmn-eye-blocked',
|
|
99
|
-
BOOKMARK: 'icmn-bookmark',
|
|
100
|
-
STAR: 'icmn-star-full',
|
|
101
|
-
HEART: 'icmn-heart',
|
|
102
|
-
HEARTBROKEN: 'icmn-heart-broken',
|
|
103
|
-
HAPPY: 'icmn-happy',
|
|
104
|
-
SAD: 'icmn-sad',
|
|
105
|
-
ACTIVATE: 'icmn-checkmark',
|
|
106
|
-
INACTIVATE: 'icmn-cross',
|
|
107
|
-
APPROVE: 'icmn-checkmark',
|
|
108
|
-
REJECT: 'icmn-cross',
|
|
109
|
-
CANCEL: 'icmn-cross',
|
|
110
|
-
CLOSE: 'icmn-ungroup',
|
|
111
|
-
CLEAN: 'fa fa-eraser',
|
|
112
|
-
CHECK: 'icmn-checkmark',
|
|
113
|
-
UNCHECK: 'icmn-cross',
|
|
114
|
-
SELECTROW: 'icmn-checkbox-unchecked',
|
|
115
|
-
UNSELECTROW: 'icmn-checkbox-checked',
|
|
116
|
-
CHECKED: 'icmn-checkbox-checked',
|
|
117
|
-
UNCHECKED: 'icmn-checkbox-unchecked',
|
|
118
|
-
ENTER: 'icmn-enter',
|
|
119
|
-
EXIT: 'icmn-exit',
|
|
120
|
-
CUT: 'icmn-scissors',
|
|
121
|
-
FILTER: 'icmn-filter',
|
|
122
|
-
PLAY: 'icmn-play2',
|
|
123
|
-
STOP: 'icmn-stop',
|
|
124
|
-
UP: 'icmn-circle-up',
|
|
125
|
-
DOWN: 'icmn-circle-down',
|
|
126
|
-
RIGHT: 'icmn-circle-right',
|
|
127
|
-
LEFT: 'icmn-circle-left',
|
|
128
|
-
SORTASC: 'icmn-sort-alpha-asc',
|
|
129
|
-
SORTDSC: 'icmn-sort-alpha-desc',
|
|
130
|
-
TABLE: 'icmn-table',
|
|
131
|
-
OFFICE: 'icmn-office',
|
|
132
|
-
SHARE: 'icmn-share',
|
|
133
|
-
FACEBOOK: 'icmn-facebook',
|
|
134
|
-
WHATSAPP: 'icmn-whatsapp',
|
|
135
|
-
TWITTER: 'icmn-twitter',
|
|
136
|
-
YOUTUBE: 'icmn-youtube',
|
|
137
|
-
PDF: 'icmn-file-pdf',
|
|
138
|
-
EXCEL: 'icmn-file-excel',
|
|
139
|
-
HOLDER: 'icmn-profile',
|
|
140
|
-
XXX: 'fa fa-first-order',
|
|
141
|
-
BANK: 'fa fa-bank',
|
|
142
|
-
CREDITCARD2: 'fa fa-credit-card-alt',
|
|
143
|
-
BUS: 'fa fa-bus',
|
|
144
|
-
TELEVISION: 'icmn-tv',
|
|
145
|
-
BACK: 'fa fa-arrow-left',
|
|
146
|
-
SEND: 'fa fa-paper-plane-o',
|
|
147
|
-
TEXTFILE: 'fa fa-file-text-o',
|
|
148
|
-
PERSON: 'fa fa-user',
|
|
149
|
-
BATCHFILE: 'fa fa-wpforms',
|
|
150
|
-
REQUESTS: 'icmn-stack',
|
|
151
|
-
THUMBUP: 'fa fa-thumbs-o-up',
|
|
152
|
-
THUMBDOWN: 'fa fa-thumbs-o-down',
|
|
153
|
-
EXCLAMATION: 'fa fa-exclamation-circle',
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
export class IconDictionaryService {
|
|
157
|
-
mapIcon = (iconName) => (iconName && iconDictionary[iconName])
|
|
158
|
-
? iconDictionary[iconName] : iconDictionary.DEFAULT
|
|
159
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { RouterModule } from '@angular/router';
|
|
4
|
-
import { FormsModule } from '@angular/forms';
|
|
5
|
-
|
|
6
|
-
import { BasicFormComponent } from './components/forms/basic-form';
|
|
7
|
-
import { ActionComponent } from './components/elements/action.component';
|
|
8
|
-
import { FieldComponent } from './components/elements/field.component';
|
|
9
|
-
import { ElementComponent } from './components/elements/layout/element.component';
|
|
10
|
-
import { FormErrorComponent } from './components/elements/layout/form-error.component';
|
|
11
|
-
import { FormHeaderComponent } from './components/elements/layout/form-header.component';
|
|
12
|
-
import { SectionComponent } from './components/elements/layout/section.component';
|
|
13
|
-
import { SubSectionComponent } from './components/elements/layout/sub-section.component';
|
|
14
|
-
import { LibTableRecordActionComponent } from './components/elements/tables/table-record-action.component';
|
|
15
|
-
import { LibTableRecordFieldComponent } from './components/elements/tables/table-record-field.component';
|
|
16
|
-
import { LibTableComponent } from './components/elements/tables/table.component';
|
|
17
|
-
|
|
18
|
-
const COMPONENTS = [
|
|
19
|
-
BasicFormComponent,
|
|
20
|
-
ActionComponent,
|
|
21
|
-
FieldComponent,
|
|
22
|
-
ElementComponent,
|
|
23
|
-
FormErrorComponent,
|
|
24
|
-
FormHeaderComponent,
|
|
25
|
-
SectionComponent,
|
|
26
|
-
SubSectionComponent,
|
|
27
|
-
LibTableRecordActionComponent,
|
|
28
|
-
LibTableRecordFieldComponent,
|
|
29
|
-
LibTableComponent];
|
|
30
|
-
|
|
31
|
-
@NgModule({
|
|
32
|
-
declarations: COMPONENTS,
|
|
33
|
-
imports: [
|
|
34
|
-
CommonModule,
|
|
35
|
-
RouterModule,
|
|
36
|
-
FormsModule,
|
|
37
|
-
],
|
|
38
|
-
exports: COMPONENTS
|
|
39
|
-
})
|
|
40
|
-
export class TuainNgFormsLibModule { }
|
package/src/test.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
-
|
|
3
|
-
import 'zone.js';
|
|
4
|
-
import 'zone.js/testing';
|
|
5
|
-
import { getTestBed } from '@angular/core/testing';
|
|
6
|
-
import {
|
|
7
|
-
BrowserDynamicTestingModule,
|
|
8
|
-
platformBrowserDynamicTesting
|
|
9
|
-
} from '@angular/platform-browser-dynamic/testing';
|
|
10
|
-
|
|
11
|
-
declare const require: {
|
|
12
|
-
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
13
|
-
<T>(id: string): T;
|
|
14
|
-
keys(): string[];
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// First, initialize the Angular testing environment.
|
|
19
|
-
getTestBed().initTestEnvironment(
|
|
20
|
-
BrowserDynamicTestingModule,
|
|
21
|
-
platformBrowserDynamicTesting(),
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
// Then we find all the tests.
|
|
25
|
-
const context = require.context('./', true, /\.spec\.ts$/);
|
|
26
|
-
// And load the modules.
|
|
27
|
-
context.keys().map(context);
|
package/tsconfig.lib.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "../../tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "../../out-tsc/lib",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"inlineSources": true,
|
|
9
|
-
"types": []
|
|
10
|
-
},
|
|
11
|
-
"exclude": [
|
|
12
|
-
"src/test.ts",
|
|
13
|
-
"**/*.spec.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
package/tsconfig.spec.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "../../tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "../../out-tsc/spec",
|
|
6
|
-
"types": [
|
|
7
|
-
"jasmine"
|
|
8
|
-
]
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"src/test.ts"
|
|
12
|
-
],
|
|
13
|
-
"include": [
|
|
14
|
-
"**/*.spec.ts",
|
|
15
|
-
"**/*.d.ts"
|
|
16
|
-
]
|
|
17
|
-
}
|