coer-elements 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Source = void 0;
4
+ var Breadcrumbs_class_1 = require("./Breadcrumbs.class");
5
+ var router_1 = require("@angular/router");
6
+ var core_1 = require("@angular/core");
7
+ var Tools_1 = require("./Tools");
8
+ var Source = /** @class */ (function () {
9
+ function Source() {
10
+ }
11
+ /** */
12
+ Source.Set = function (page) {
13
+ var ROUTER = (0, core_1.inject)(router_1.Router);
14
+ var path = ROUTER.url;
15
+ if (path.includes('?'))
16
+ path = path.split('?')[0];
17
+ Breadcrumbs_class_1.Breadcrumbs.Add(page, path);
18
+ var breadcrumbs = Breadcrumbs_class_1.Breadcrumbs.Get();
19
+ if (breadcrumbs.length >= 2) {
20
+ breadcrumbs.pop();
21
+ var breadcrumb = breadcrumbs.pop();
22
+ this.Save({ page: breadcrumb.page, path: breadcrumb.path });
23
+ }
24
+ else
25
+ this.Save(null);
26
+ };
27
+ /** */
28
+ Source.Save = function (source) {
29
+ var storage = sessionStorage.getItem(this.storage);
30
+ if (storage)
31
+ storage = JSON.parse(storage);
32
+ storage = Object.assign({}, storage, { source: source });
33
+ sessionStorage.setItem(this.storage, JSON.stringify(storage));
34
+ };
35
+ /** */
36
+ Source.Get = function () {
37
+ var storage = sessionStorage.getItem(this.storage);
38
+ if (storage) {
39
+ storage = JSON.parse(storage);
40
+ if (storage.hasOwnProperty('source')) {
41
+ return storage.source;
42
+ }
43
+ }
44
+ return null;
45
+ };
46
+ /** */
47
+ Source.GetRoot = function () {
48
+ var breadcrumbs = Breadcrumbs_class_1.Breadcrumbs.Get();
49
+ return (breadcrumbs.length > 0) ? breadcrumbs.shift() : null;
50
+ };
51
+ /** */
52
+ Source.SetPageResponse = function (pageResponse) {
53
+ var storage = sessionStorage.getItem(this.storage);
54
+ storage = JSON.parse(storage);
55
+ storage = Object.assign({}, storage, { pageResponse: pageResponse });
56
+ sessionStorage.setItem(this.storage, JSON.stringify(storage));
57
+ };
58
+ /** */
59
+ Source.GetPageResponse = function () {
60
+ var storage = sessionStorage.getItem(this.storage);
61
+ if (storage) {
62
+ storage = JSON.parse(storage);
63
+ if (storage.hasOwnProperty('pageResponse')) {
64
+ return Tools_1.Tools.BreakReference(storage.pageResponse);
65
+ }
66
+ }
67
+ return null;
68
+ };
69
+ /** */
70
+ Source.ClearPageResponse = function () {
71
+ var storage = sessionStorage.getItem(this.storage);
72
+ storage = JSON.parse(storage);
73
+ if (storage.hasOwnProperty('pageResponse')) {
74
+ delete storage.pageResponse;
75
+ }
76
+ storage = Object.assign({}, storage);
77
+ sessionStorage.setItem(this.storage, JSON.stringify(storage));
78
+ };
79
+ /** Clear Source */
80
+ Source.Reset = function () {
81
+ sessionStorage.removeItem(this.storage);
82
+ };
83
+ Source.storage = 'COER-System';
84
+ return Source;
85
+ }());
86
+ exports.Source = Source;
@@ -14,7 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Tools/Tools"), exports);
17
+ __exportStar(require("./Tools/Breadcrumbs.class"), exports);
18
+ __exportStar(require("./Tools/ControlValue"), exports);
18
19
  __exportStar(require("./Tools/DateTime.class"), exports);
19
20
  __exportStar(require("./Tools/Files.class"), exports);
21
+ __exportStar(require("./Tools/Page.class"), exports);
20
22
  __exportStar(require("./Tools/Screen.class"), exports);
23
+ __exportStar(require("./Tools/Source.class"), exports);
24
+ __exportStar(require("./Tools/Tools"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coer-elements",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "author": "Christian Omar Escamilla Rodríguez",
5
5
  "keywords": [
6
6
  "coer",
@@ -22,15 +22,23 @@
22
22
  "push": "npm publish --access public"
23
23
  },
24
24
  "dependencies": {
25
+ "@angular/common": "^17.3.0",
25
26
  "@angular/core": "^17.3.0",
26
27
  "@angular/forms": "^17.3.0",
27
28
  "@angular/router": "^17.3.0",
29
+ "@fortawesome/fontawesome-free": "^6.6.0",
30
+ "animate.css": "^4.1.1",
31
+ "bootstrap": "^5.3.3",
32
+ "bootstrap-icons": "^1.11.3",
28
33
  "guid-typescript": "^1.0.9",
29
34
  "moment": "^2.30.1",
30
35
  "rxjs": "^7.8.1",
36
+ "sweetalert2": "^11.13.3",
31
37
  "xlsx": "^0.18.5"
32
38
  },
33
39
  "devDependencies": {
40
+ "@types/bootstrap": "^5.2.10",
41
+ "@types/xlsx": "^0.0.36",
34
42
  "typescript": "^5.5.4"
35
43
  }
36
44
  }
@@ -0,0 +1,22 @@
1
+ .tooltip-inner {
2
+ min-width: 125px;
3
+ max-width: 250px;
4
+ min-height: 35px;
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ word-break: break-word;
9
+ }
10
+
11
+ .invisible {
12
+ visibility: hidden !important;
13
+ width: 0px !important;
14
+ height: 0px !important;
15
+ }
16
+
17
+
18
+ /********** COER styles **********/
19
+ @import "src/app/shared/components/coer-alert/coer-alert.component.scss";
20
+ //@import "src/app/shared/components/coer-page-title/coer-page-title.component.scss";
21
+ //@import "src/app/shared/components/coer-grid/coer-grid.component.scss";
22
+ //@import "src/app/shared/components/coer-modal/coer-modal.component.scss";
@@ -0,0 +1,95 @@
1
+ * {
2
+ font-family: sans-serif;
3
+ letter-spacing: normal;
4
+ }
5
+
6
+ .fill-space {
7
+ flex: 1 1 auto;
8
+ }
9
+
10
+ h1, h2, h3, h4, h5, h6, p, pre, hr, figure, fieldset {
11
+ margin: 0px;
12
+ padding: 0px;
13
+ }
14
+
15
+ //Containers
16
+ @mixin Container() {
17
+ margin: 15px 30px 0px 30px;
18
+ padding: 10px;
19
+ box-shadow: 0px 0px 10px -10px black;
20
+ border-radius: 8px;
21
+ background-color: white;
22
+ animation-name: fadeId;
23
+ animation-duration: 1.5s;
24
+ animation-iteration-count: 1;
25
+ animation-fill-mode: both;
26
+ }
27
+
28
+ .coer-container {
29
+ @include Container();
30
+ }
31
+
32
+ .coer-container-tab {
33
+ @include Container();
34
+ padding: 0px;
35
+
36
+ .row {
37
+ margin: 12px 0px;
38
+ }
39
+ }
40
+
41
+ .coer-container-grid {
42
+ @include Container();
43
+ padding-bottom: 5px;
44
+ }
45
+
46
+ @keyframes fadeId {
47
+ from { opacity: 0; }
48
+ to { opacity: 1; }
49
+ }
50
+
51
+ //Cursor
52
+ .cursor-default {
53
+ cursor: default !important;
54
+ }
55
+
56
+ .cursor-pointer {
57
+ cursor: pointer !important;
58
+ }
59
+
60
+ .cursor-wait {
61
+ cursor: wait !important;
62
+ }
63
+
64
+ //Input
65
+ input[type="file"] {
66
+ display: none !important;
67
+ }
68
+
69
+ .readonly {
70
+ color: black !important;
71
+ background-color: #bbbbbb83 !important;
72
+ }
73
+
74
+ .no-selection::selection {
75
+ background-color: transparent !important;
76
+ }
77
+
78
+ *::-webkit-scrollbar {
79
+ background-color: lighten($gray, 48%);
80
+ width: 5px;
81
+ height: 5px;
82
+ }
83
+
84
+ *::-webkit-scrollbar-thumb{
85
+ background-color: lighten($gray, 35%);
86
+ border-radius: 4px;
87
+ }
88
+
89
+ *::-webkit-scrollbar-thumb:hover {
90
+ background-color: $gray;
91
+ }
92
+
93
+ *::-webkit-scrollbar-thumb:active {
94
+ background-color: $gray;
95
+ }
@@ -0,0 +1,167 @@
1
+ $blue: #0d6efd;
2
+ $gray: #6c757d;
3
+ $green: #198754;
4
+ $yellow: #ffc107;
5
+ $red: #dc3545;
6
+ $white: #f5f5f5;
7
+ $black: #252525;
8
+ $orange: #fd6031;
9
+
10
+ //Blue
11
+ .text-blue {
12
+ color: $blue !important;
13
+ }
14
+
15
+ .text-blue-bold {
16
+ color: $blue !important;
17
+ font-weight: bold !important;
18
+ }
19
+
20
+ .background-blue {
21
+ background-color: $blue !important;
22
+ }
23
+
24
+ .background-border-blue {
25
+ background-color: $blue !important;
26
+ border-color: $blue !important;
27
+ }
28
+
29
+
30
+ //Gray
31
+ .text-gray {
32
+ color: $gray !important;
33
+ }
34
+
35
+ .text-gray-bold {
36
+ color: $gray !important;
37
+ font-weight: bold !important;
38
+ }
39
+
40
+ .background-gray {
41
+ background-color: $gray !important;
42
+ }
43
+
44
+ .background-border-gray {
45
+ background-color: $gray !important;
46
+ border-color: $gray !important;
47
+ }
48
+
49
+
50
+ //Green
51
+ .text-green {
52
+ color: $green !important;
53
+ }
54
+
55
+ .text-green-bold {
56
+ color: $green !important;
57
+ font-weight: bold !important;
58
+ }
59
+
60
+ .background-green {
61
+ background-color: $green !important;
62
+ }
63
+
64
+ .background-border-green {
65
+ background-color: $green !important;
66
+ border-color: $green !important;
67
+ }
68
+
69
+
70
+ //Yellow
71
+ .text-yellow {
72
+ color: $yellow !important;
73
+ }
74
+
75
+ .text-yellow-bold {
76
+ color: $yellow !important;
77
+ font-weight: bold !important;
78
+ }
79
+
80
+ .background-yellow {
81
+ background-color: $yellow !important;
82
+ }
83
+
84
+ .background-border-yellow {
85
+ background-color: $yellow !important;
86
+ border-color: $yellow !important;
87
+ }
88
+
89
+
90
+ //Red
91
+ .text-red {
92
+ color: $red !important;
93
+ }
94
+
95
+ .text-red-bold {
96
+ color: $red !important;
97
+ font-weight: bold !important;
98
+ }
99
+
100
+ .background-red {
101
+ background-color: $red !important;
102
+ }
103
+
104
+ .background-border-red {
105
+ background-color: $red !important;
106
+ border-color: $red !important;
107
+ }
108
+
109
+
110
+ //White
111
+ .text-white {
112
+ color: $white !important;
113
+ }
114
+
115
+ .text-white-bold {
116
+ color: $white !important;
117
+ font-weight: bold !important;
118
+ }
119
+
120
+ .background-white {
121
+ background-color: $white !important;
122
+ }
123
+
124
+ .background-border-white {
125
+ background-color: $white !important;
126
+ border-color: $white !important;
127
+ }
128
+
129
+
130
+ //Black
131
+ .text-black {
132
+ color: $black !important;
133
+ }
134
+
135
+ .text-black-bold {
136
+ color: $black !important;
137
+ font-weight: bold !important;
138
+ }
139
+
140
+ .background-black {
141
+ background-color: $black !important;
142
+ }
143
+
144
+ .background-border-black {
145
+ background-color: $black !important;
146
+ border-color: $black !important;
147
+ }
148
+
149
+
150
+ //Orange
151
+ .text-orange {
152
+ color: $orange !important;
153
+ }
154
+
155
+ .text-orange-bold {
156
+ color: $orange !important;
157
+ font-weight: bold !important;
158
+ }
159
+
160
+ .background-orange {
161
+ background-color: $orange !important;
162
+ }
163
+
164
+ .background-border-orange {
165
+ background-color: $orange !important;
166
+ border-color: $orange !important;
167
+ }