static-columns 13.3.2 → 13.3.3

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 (136) hide show
  1. package/README.md +5 -9
  2. package/assets/shared/shared_folder_info.txt +7 -0
  3. package/browser/esm2020/lib/breakpoints.service.mjs +43 -0
  4. package/browser/esm2020/lib/column/base-hide-show.directive.mjs +47 -0
  5. package/browser/esm2020/lib/column/column-hide-desktop.directive.mjs +24 -0
  6. package/browser/esm2020/lib/column/column-hide-mobile.directive.mjs +14 -34
  7. package/browser/esm2020/lib/column/column-hide-tablet.directive.mjs +14 -34
  8. package/browser/esm2020/lib/column/column-show-desktop.directive.mjs +24 -0
  9. package/browser/esm2020/lib/column/column-show-mobile.directive.mjs +14 -34
  10. package/browser/esm2020/lib/column/column-show-tablet.directive.mjs +24 -0
  11. package/browser/esm2020/lib/column/index.mjs +4 -1
  12. package/browser/esm2020/lib/columns.module.mjs +21 -5
  13. package/browser/esm2020/lib/index.mjs +2 -1
  14. package/browser/fesm2015/static-columns.mjs +174 -76
  15. package/browser/fesm2015/static-columns.mjs.map +1 -1
  16. package/browser/fesm2020/static-columns.mjs +175 -77
  17. package/browser/fesm2020/static-columns.mjs.map +1 -1
  18. package/browser/lib/breakpoints.service.d.ts +10 -0
  19. package/browser/lib/column/base-hide-show.directive.d.ts +20 -0
  20. package/browser/lib/column/column-hide-desktop.directive.d.ts +8 -0
  21. package/browser/lib/column/column-hide-mobile.directive.d.ts +3 -12
  22. package/browser/lib/column/column-hide-tablet.directive.d.ts +3 -12
  23. package/browser/lib/column/column-show-desktop.directive.d.ts +8 -0
  24. package/browser/lib/column/column-show-mobile.directive.d.ts +3 -12
  25. package/browser/lib/column/column-show-tablet.directive.d.ts +8 -0
  26. package/browser/lib/column/index.d.ts +3 -0
  27. package/browser/lib/columns.module.d.ts +7 -4
  28. package/browser/lib/index.d.ts +1 -0
  29. package/client/esm2020/lib/breakpoints.service.mjs +43 -0
  30. package/client/esm2020/lib/column/base-hide-show.directive.mjs +47 -0
  31. package/client/esm2020/lib/column/column-hide-desktop.directive.mjs +24 -0
  32. package/client/esm2020/lib/column/column-hide-mobile.directive.mjs +14 -34
  33. package/client/esm2020/lib/column/column-hide-tablet.directive.mjs +14 -34
  34. package/client/esm2020/lib/column/column-show-desktop.directive.mjs +24 -0
  35. package/client/esm2020/lib/column/column-show-mobile.directive.mjs +14 -34
  36. package/client/esm2020/lib/column/column-show-tablet.directive.mjs +24 -0
  37. package/client/esm2020/lib/column/index.mjs +4 -1
  38. package/client/esm2020/lib/columns.module.mjs +21 -5
  39. package/client/esm2020/lib/index.mjs +2 -1
  40. package/client/fesm2015/static-columns.mjs +174 -76
  41. package/client/fesm2015/static-columns.mjs.map +1 -1
  42. package/client/fesm2020/static-columns.mjs +175 -77
  43. package/client/fesm2020/static-columns.mjs.map +1 -1
  44. package/client/lib/breakpoints.service.d.ts +10 -0
  45. package/client/lib/column/base-hide-show.directive.d.ts +20 -0
  46. package/client/lib/column/column-hide-desktop.directive.d.ts +8 -0
  47. package/client/lib/column/column-hide-mobile.directive.d.ts +3 -12
  48. package/client/lib/column/column-hide-tablet.directive.d.ts +3 -12
  49. package/client/lib/column/column-show-desktop.directive.d.ts +8 -0
  50. package/client/lib/column/column-show-mobile.directive.d.ts +3 -12
  51. package/client/lib/column/column-show-tablet.directive.d.ts +8 -0
  52. package/client/lib/column/index.d.ts +3 -0
  53. package/client/lib/columns.module.d.ts +7 -4
  54. package/client/lib/index.d.ts +1 -0
  55. package/client/package.json +263 -25
  56. package/index.js.map +1 -1
  57. package/lib/breakpoints.service.d.ts +6 -0
  58. package/lib/breakpoints.service.js +45 -0
  59. package/lib/breakpoints.service.js.map +1 -0
  60. package/lib/column/base-hide-show.directive.d.ts +16 -0
  61. package/lib/column/base-hide-show.directive.js +51 -0
  62. package/lib/column/base-hide-show.directive.js.map +1 -0
  63. package/lib/column/column-grow.directive.js.map +1 -1
  64. package/lib/column/column-hide-desktop.directive.d.ts +4 -0
  65. package/lib/column/column-hide-desktop.directive.js +28 -0
  66. package/lib/column/column-hide-desktop.directive.js.map +1 -0
  67. package/lib/column/column-hide-mobile.directive.d.ts +3 -12
  68. package/lib/column/column-hide-mobile.directive.js +14 -33
  69. package/lib/column/column-hide-mobile.directive.js.map +1 -1
  70. package/lib/column/column-hide-tablet.directive.d.ts +3 -12
  71. package/lib/column/column-hide-tablet.directive.js +14 -33
  72. package/lib/column/column-hide-tablet.directive.js.map +1 -1
  73. package/lib/column/column-show-desktop.directive.d.ts +4 -0
  74. package/lib/column/column-show-desktop.directive.js +28 -0
  75. package/lib/column/column-show-desktop.directive.js.map +1 -0
  76. package/lib/column/column-show-mobile.directive.d.ts +3 -12
  77. package/lib/column/column-show-mobile.directive.js +14 -33
  78. package/lib/column/column-show-mobile.directive.js.map +1 -1
  79. package/lib/column/column-show-tablet.directive.d.ts +4 -0
  80. package/lib/column/column-show-tablet.directive.js +28 -0
  81. package/lib/column/column-show-tablet.directive.js.map +1 -0
  82. package/lib/column/column.component.js.map +1 -1
  83. package/lib/column/index.d.ts +3 -0
  84. package/lib/column/index.js +3 -3
  85. package/lib/column/index.js.map +1 -1
  86. package/lib/columns-gap/columns-gap.component.js +3 -3
  87. package/lib/columns-gap/columns-gap.component.js.map +1 -1
  88. package/lib/columns-gap/index.js +3 -3
  89. package/lib/columns-gap/index.js.map +1 -1
  90. package/lib/columns.component.js +3 -3
  91. package/lib/columns.component.js.map +1 -1
  92. package/lib/columns.module.js +3 -3
  93. package/lib/columns.module.js.map +1 -1
  94. package/lib/index.d.ts +1 -0
  95. package/lib/index.js +1 -0
  96. package/lib/index.js.map +1 -1
  97. package/package.json +244 -4
  98. package/tmp-environment.json +37 -37
  99. package/websql/esm2020/lib/breakpoints.service.mjs +43 -0
  100. package/websql/esm2020/lib/column/base-hide-show.directive.mjs +47 -0
  101. package/websql/esm2020/lib/column/column-hide-desktop.directive.mjs +24 -0
  102. package/websql/esm2020/lib/column/column-hide-mobile.directive.mjs +14 -34
  103. package/websql/esm2020/lib/column/column-hide-tablet.directive.mjs +14 -34
  104. package/websql/esm2020/lib/column/column-show-desktop.directive.mjs +24 -0
  105. package/websql/esm2020/lib/column/column-show-mobile.directive.mjs +14 -34
  106. package/websql/esm2020/lib/column/column-show-tablet.directive.mjs +24 -0
  107. package/websql/esm2020/lib/column/index.mjs +4 -1
  108. package/websql/esm2020/lib/columns.module.mjs +21 -5
  109. package/websql/esm2020/lib/index.mjs +2 -1
  110. package/websql/fesm2015/static-columns.mjs +174 -76
  111. package/websql/fesm2015/static-columns.mjs.map +1 -1
  112. package/websql/fesm2020/static-columns.mjs +175 -77
  113. package/websql/fesm2020/static-columns.mjs.map +1 -1
  114. package/websql/lib/breakpoints.service.d.ts +10 -0
  115. package/websql/lib/column/base-hide-show.directive.d.ts +20 -0
  116. package/websql/lib/column/column-hide-desktop.directive.d.ts +8 -0
  117. package/websql/lib/column/column-hide-mobile.directive.d.ts +3 -12
  118. package/websql/lib/column/column-hide-tablet.directive.d.ts +3 -12
  119. package/websql/lib/column/column-show-desktop.directive.d.ts +8 -0
  120. package/websql/lib/column/column-show-mobile.directive.d.ts +3 -12
  121. package/websql/lib/column/column-show-tablet.directive.d.ts +8 -0
  122. package/websql/lib/column/index.d.ts +3 -0
  123. package/websql/lib/columns.module.d.ts +7 -4
  124. package/websql/lib/index.d.ts +1 -0
  125. package/app/preview/index.d.ts +0 -2
  126. package/app/preview/index.js +0 -6
  127. package/app/preview/index.js.map +0 -1
  128. package/app/preview/preview.component.d.ts +0 -8
  129. package/app/preview/preview.component.js +0 -6
  130. package/app/preview/preview.component.js.map +0 -1
  131. package/app/preview/preview.module.d.ts +0 -2
  132. package/app/preview/preview.module.js +0 -6
  133. package/app/preview/preview.module.js.map +0 -1
  134. package/app.d.ts +0 -0
  135. package/app.js +0 -6
  136. package/app.js.map +0 -1
@@ -1,31 +1,269 @@
1
1
  {
2
2
  "name": "static-columns",
3
- "version": "0.0.1",
4
- "peerDependencies": {
5
- "@angular/common": "^13.2.0",
6
- "@angular/core": "^13.2.0"
3
+ "version": "13.3.3",
4
+ "description": "Static columns with flexbox for Agnular2",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/darekf77/static-columns.git"
7
8
  },
8
- "dependencies": {
9
- "tslib": "^2.3.0"
9
+ "keywords": [
10
+ "angular2",
11
+ "static",
12
+ "width",
13
+ "column",
14
+ "static",
15
+ "columns",
16
+ "flexbox",
17
+ "columns"
18
+ ],
19
+ "author": "Dariusz Filipiak",
20
+ "license": "MIT",
21
+ "bugs": {
22
+ "url": "https://github.com/darekf77/static-columns/issues"
10
23
  },
11
- "module": "fesm2015/static-columns.mjs",
12
- "es2020": "fesm2020/static-columns.mjs",
13
- "esm2020": "esm2020/static-columns.mjs",
14
- "fesm2020": "fesm2020/static-columns.mjs",
15
- "fesm2015": "fesm2015/static-columns.mjs",
16
- "typings": "static-columns.d.ts",
17
- "exports": {
18
- "./package.json": {
19
- "default": "./package.json"
20
- },
21
- ".": {
22
- "types": "./static-columns.d.ts",
23
- "esm2020": "./esm2020/static-columns.mjs",
24
- "es2020": "./fesm2020/static-columns.mjs",
25
- "es2015": "./fesm2015/static-columns.mjs",
26
- "node": "./fesm2015/static-columns.mjs",
27
- "default": "./fesm2020/static-columns.mjs"
28
- }
24
+ "homepage": "https://github.com/darekf77/static-columns#readme",
25
+ "dependencies": {
26
+ "@angular-devkit/build-angular": "~13.3.9",
27
+ "@angular-devkit/core": "~13.3.9",
28
+ "@angular/animations": "~13.3.0",
29
+ "@angular/cdk": "~13.3.9",
30
+ "@angular/cli": "~13.3.9",
31
+ "@angular/common": "~13.3.0",
32
+ "@angular/compiler": "~13.3.0",
33
+ "@angular/compiler-cli": "~13.3.0",
34
+ "@angular/core": "~13.3.0",
35
+ "@angular/flex-layout": "~13.0.0-beta.38",
36
+ "@angular/forms": "~13.3.0",
37
+ "@angular/material": "~13.3.9",
38
+ "@angular/platform-browser": "~13.3.0",
39
+ "@angular/platform-browser-dynamic": "~13.3.0",
40
+ "@angular/pwa": "~13.3.9",
41
+ "@angular/router": "~13.3.0",
42
+ "@angular/service-worker": "~13.3.11",
43
+ "@babel/cli": "7.18.6",
44
+ "@iconify/icons-fa-solid": "1.2.2",
45
+ "@iconify/icons-mdi": "1.2.1",
46
+ "@mdi/js": "6.5.95",
47
+ "@ngrx/component-store": "~13.0.2",
48
+ "@ngrx/data": "~13.0.2",
49
+ "@ngrx/effects": "~13.0.2",
50
+ "@ngrx/entity": "~13.0.2",
51
+ "@ngrx/router-store": "~13.0.2",
52
+ "@ngrx/schematics": "~13.0.2",
53
+ "@ngrx/store": "~13.0.2",
54
+ "@ngrx/store-devtools": "~13.0.2",
55
+ "@ngx-formly/bootstrap": "6.0.0-next.8",
56
+ "@ngx-formly/core": "6.0.0-next.8",
57
+ "@ngx-formly/ionic": "4.6.3",
58
+ "@ngx-formly/material": "6.0.0-next.8",
59
+ "@ngx-loading-bar/core": "6.0.2",
60
+ "@ngx-loading-bar/http-client": "6.0.2",
61
+ "@ngx-loading-bar/router": "6.0.2",
62
+ "@ngx-translate/core": "14.0.0",
63
+ "@ngx-translate/http-loader": "7.0.0",
64
+ "@swimlane/ngx-datatable": "20.0.0",
65
+ "@types/chai": "4.1.2",
66
+ "@types/chokidar": "2.1.3",
67
+ "@types/dateformat": "1.0.1",
68
+ "@types/diff": "3.2.2",
69
+ "@types/express": "4.11.0",
70
+ "@types/express-fileupload": "1.4.1",
71
+ "@types/fs-extra": "7.0.0",
72
+ "@types/glob": "5.0.35",
73
+ "@types/http-proxy": "1.16.0",
74
+ "@types/http-proxy-middleware": "0.19.2",
75
+ "@types/inquirer": "7.3.1",
76
+ "@types/jasmine": "3.10.0",
77
+ "@types/json-stringify-safe": "5.0.0",
78
+ "@types/json5": "0.0.29",
79
+ "@types/lockfile": "1.0.0",
80
+ "@types/lodash": "4.14.92",
81
+ "@types/lowdb": "1.0.6",
82
+ "@types/mocha": "5.2.5",
83
+ "@types/node": "16.18.21",
84
+ "@types/node-notifier": "5.4.0",
85
+ "@types/oauth2orize": "1.8.0",
86
+ "@types/password-hash": "1.2.19",
87
+ "@types/progress": "2.0.3",
88
+ "@types/q": "1.5.5",
89
+ "@types/rimraf": "2.0.2",
90
+ "@types/semver": "6.0.1",
91
+ "@types/systeminformation": "3.23.0",
92
+ "@types/vinyl": "2.0.2",
93
+ "@types/watch": "1.0.0",
94
+ "accepts": "1.3.4",
95
+ "any-project-cli": "~13.1.25",
96
+ "axios": "1.3.5",
97
+ "background-worker-process": "~13.1.42",
98
+ "base32": "0.0.7",
99
+ "bcryptjs": "2.4.3",
100
+ "better-sqlite3": "7.6.2",
101
+ "body-parser": "1.18.2",
102
+ "bootstrap": "4.6.2",
103
+ "buffer-shims": "1.0.0",
104
+ "callsite-record": "4.1.3",
105
+ "chai": "4.2.0",
106
+ "chalk": "2.3.2",
107
+ "check-node-version": "3.2.0",
108
+ "cheerio": "1.0.0-rc.3",
109
+ "chokidar": "3.5.1",
110
+ "circular-json": "0.5.1",
111
+ "command-exists": "1.2.2",
112
+ "compression": "1.7.4",
113
+ "concurrently": "3.5.1",
114
+ "content-type": "1.0.4",
115
+ "cookie-parser": "1.4.3",
116
+ "copy-paste": "1.3.0",
117
+ "cors": "2.8.4",
118
+ "cpr": "3.0.1",
119
+ "cross-spawn": "7.0.3",
120
+ "dateformat": "3.0.3",
121
+ "detect-mocha": "0.1.0",
122
+ "diff": "3.2.0",
123
+ "element-resize-detector": "1.1.15",
124
+ "enquirer": "2.3.0",
125
+ "enum-values": "1.2.1",
126
+ "errorhandler": "1.5.0",
127
+ "eslint": "7.13.0",
128
+ "eslint-plugin-import": "2.22.1",
129
+ "eslint-plugin-jsdoc": "30.7.8",
130
+ "eslint-plugin-prefer-arrow": "1.2.2",
131
+ "express": "4.16.3",
132
+ "express-fileupload": "1.4.0",
133
+ "express-session": "1.17.3",
134
+ "fbgraph": "1.4.1",
135
+ "file-loader": "1.1.5",
136
+ "file-saver": "2.0.5",
137
+ "firedev": "^13",
138
+ "firedev-crud": "~13.1.47",
139
+ "firedev-crud-deamon": "~13.1.37",
140
+ "firedev-ports": "~13.1.41",
141
+ "firedev-storage": "~13.2.31",
142
+ "firedev-typeorm": "~13.1.25",
143
+ "firedev-ui": "~13.1.20",
144
+ "fkill": "6.1.0",
145
+ "font-awesome": "4.7.0",
146
+ "form-data": "4.0.0",
147
+ "fs-extra": "8.1.0",
148
+ "fuzzy": "0.1.3",
149
+ "glob": "7.1.2",
150
+ "gulp": "3.9.1",
151
+ "hostile": "1.3.3",
152
+ "http-proxy": "1.16.2",
153
+ "http-proxy-middleware": "0.19.1",
154
+ "http-server": "0.11.1",
155
+ "immutable": "4.3.0",
156
+ "incremental-compiler": "~13.1.23",
157
+ "inquirer": "7.3.3",
158
+ "inquirer-autocomplete-prompt": "1.3.0",
159
+ "is-elevated": "3.0.0",
160
+ "isomorphic-region-loader": "~13.1.35",
161
+ "istanbul-instrumenter-loader": "2.0.0",
162
+ "jasmine-core": "4.0.0",
163
+ "jscodeshift": "0.6.3",
164
+ "json-stringify-safe": "5.0.1",
165
+ "json10": "~13.1.42",
166
+ "json10-writer": "~13.1.38",
167
+ "json5": "2.1.3",
168
+ "json5-writer": "0.2.0",
169
+ "jszip": "3.10.1",
170
+ "karma": "6.3.0",
171
+ "karma-chrome-launcher": "3.1.0",
172
+ "karma-cli": "1.0.1",
173
+ "karma-coverage": "2.1.0",
174
+ "karma-jasmine": "4.0.0",
175
+ "karma-jasmine-html-reporter": "1.7.0",
176
+ "lnk": "1.0.1",
177
+ "localforage": "1.10.0",
178
+ "lockfile": "1.0.4",
179
+ "lodash": "4.17.4",
180
+ "lodash-walk-object": "~13.1.42",
181
+ "lowdb": "1.0.0",
182
+ "magic-renamer": "~13.1.39",
183
+ "material-design-icons": "3.0.1",
184
+ "method-override": "2.3.10",
185
+ "minimist": "1.2.0",
186
+ "mkdirp": "0.5.1",
187
+ "mocha": "5.2.0",
188
+ "moment": "2.22.2",
189
+ "morphi": "~13.2.5",
190
+ "ng-packagr": "13.0.0",
191
+ "ng-talkback": "~13.1.19",
192
+ "ng2-file-upload": "1.3.0",
193
+ "ng2-logger": "~13.1.22",
194
+ "ng2-rest": "~13.2.5",
195
+ "ng4-icons": "~13.1.21",
196
+ "ng4-modal": "~13.1.23",
197
+ "ngx-ace-wrapper": "12",
198
+ "ngx-bootstrap": "2.0.2",
199
+ "ngx-editor": "12.2.1",
200
+ "ngx-highlightjs": "6.1.3",
201
+ "ngx-moment": "6.0.2",
202
+ "ngx-pipes": "3.0.0",
203
+ "ngx-progressbar": "8.0.0",
204
+ "ngx-scrollbar": "9.0.2",
205
+ "ngx-store": "3.1.1",
206
+ "ngx-toastr": "14.2.2",
207
+ "ngx-wig": "1.2.7",
208
+ "node-cli-tester": "~13.1.19",
209
+ "node-localstorage": "2.1.6",
210
+ "node-notifier": "6.0.0",
211
+ "nodemon": "1.14.11",
212
+ "npm-get-dependents": "1.0.1",
213
+ "npm-run": "4.1.2",
214
+ "omelette": "0.4.5",
215
+ "open": "7.2.1",
216
+ "ora": "3.4.0",
217
+ "passport": "0.3.2",
218
+ "passport-http-bearer": "1.0.1",
219
+ "password-hash": "1.2.2",
220
+ "portfinder": "1.0.21",
221
+ "prettier": "2.5.1",
222
+ "progress": "2.0.3",
223
+ "prompts": "0.1.8",
224
+ "ps-list": "6.1.0",
225
+ "ps-node": "0.1.6",
226
+ "q": "1.5.1",
227
+ "randomcolor": "0.5.3",
228
+ "record-replay-req-res-scenario": "~13.1.20",
229
+ "reflect-metadata": "0.1.10",
230
+ "rimraf": "2.6.2",
231
+ "rxjs": "~7.5.0",
232
+ "semver": "6.3.0",
233
+ "simple-git": "1.96.0",
234
+ "sloc": "0.2.0",
235
+ "socket.io": "2.4.1",
236
+ "sort-package-json": "1.11.0",
237
+ "sql.js": "1.8.0",
238
+ "static-columns": "~13.3.2",
239
+ "string-similarity": "4.0.2",
240
+ "sudo-block": "3.0.0",
241
+ "systeminformation": "3.45.7",
242
+ "task.js": "0.1.5",
243
+ "tnp-cli": "~13.1.57",
244
+ "tnp-config": "~13.1.73",
245
+ "tnp-core": "~13.2.15",
246
+ "tnp-db": "~13.1.19",
247
+ "tnp-helpers": "~13.1.30",
248
+ "tnp-models": "~13.1.22",
249
+ "tnp-ui": "~13.1.27",
250
+ "ts-debug": "1.3.0",
251
+ "ts-loader": "2.3.1",
252
+ "ts-node": "10.7.0",
253
+ "tslib": "~2.3.0",
254
+ "typeorm": "~0.3.10",
255
+ "typescript": "~4.6.2",
256
+ "typescript-class-helpers": "~13.2.8",
257
+ "typescript-formatter": "~7.2.2",
258
+ "underscore": "1.9.1",
259
+ "uuid": "8.3.2",
260
+ "validator": "9.2.0",
261
+ "vpn-split": "~13.1.23",
262
+ "watch": "1.0.2",
263
+ "yup": "1.1.1",
264
+ "zone.js": "~0.11.4"
29
265
  },
30
- "sideEffects": false
266
+ "private": false,
267
+ "lastBuildTagHash": "1c93889b60910274623f53ddb848e3a5abd4cc36",
268
+ "devDependencies": {}
31
269
  }
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["./src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB"}
@@ -0,0 +1,6 @@
1
+ import { BreakpointObserver } from '@angular/cdk/layout';
2
+ export declare class BreakpointsService {
3
+ private sub;
4
+ listenTo: import("rxjs").Observable<"mobile" | "tablet" | "desktop">;
5
+ constructor(breakpointObserver: BreakpointObserver);
6
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BreakpointsService = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var layout_1 = require("@angular/cdk/layout");
6
+ var core_1 = require("@angular/core");
7
+ var rxjs_1 = require("rxjs");
8
+ var tnp_core_1 = require("tnp-core");
9
+ var BreakpointsService = /** @class */ (function () {
10
+ function BreakpointsService(breakpointObserver) {
11
+ var _this = this;
12
+ this.sub = new rxjs_1.Subject();
13
+ this.listenTo = this.sub.asObservable();
14
+ breakpointObserver.observe([layout_1.Breakpoints.XSmall, layout_1.Breakpoints.Tablet, layout_1.Breakpoints.Web]).subscribe(function (state) {
15
+ // console.log(state.breakpoints)
16
+ if (!tnp_core_1._.isUndefined(layout_1.Breakpoints.XSmall.split(', ').find(function (f) { return state.breakpoints[f]; }))) {
17
+ _this.sub.next('mobile');
18
+ }
19
+ else if (!tnp_core_1._.isUndefined(layout_1.Breakpoints.Tablet.split(', ').find(function (f) { return state.breakpoints[f]; }))) {
20
+ _this.sub.next('tablet');
21
+ }
22
+ else if (!tnp_core_1._.isUndefined(layout_1.Breakpoints.Web.split(', ').find(function (f) { return state.breakpoints[f]; }))) {
23
+ _this.sub.next('desktop');
24
+ }
25
+ });
26
+ setTimeout(function () {
27
+ if (breakpointObserver.isMatched([layout_1.Breakpoints.XSmall])) {
28
+ _this.sub.next('mobile');
29
+ }
30
+ if (breakpointObserver.isMatched([layout_1.Breakpoints.Tablet])) {
31
+ _this.sub.next('tablet');
32
+ }
33
+ if (breakpointObserver.isMatched([layout_1.Breakpoints.Web])) {
34
+ _this.sub.next('desktop');
35
+ }
36
+ });
37
+ }
38
+ BreakpointsService = tslib_1.__decorate([
39
+ (0, core_1.Injectable)({ providedIn: 'root' }),
40
+ tslib_1.__metadata("design:paramtypes", [layout_1.BreakpointObserver])
41
+ ], BreakpointsService);
42
+ return BreakpointsService;
43
+ }());
44
+ exports.BreakpointsService = BreakpointsService;
45
+ //# sourceMappingURL=breakpoints.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoints.service.js","sourceRoot":"","sources":["../src/lib/breakpoints.service.ts"],"names":[],"mappings":";;;;AAAA,8CAAuF;AACvF,sCAA2C;AAC3C,6BAA+B;AAC/B,qCAA6B;AAG7B;IAKE,4BACE,kBAAsC;QADxC,iBA4BC;QA/BO,QAAG,GAAG,IAAI,cAAO,EAAmC,CAAC;QACtD,aAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;QAMxC,kBAAkB,CAAC,OAAO,CAAC,CAAC,oBAAW,CAAC,MAAM,EAAE,oBAAW,CAAC,MAAM,EAAE,oBAAW,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,UAAC,KAAK;YACpG,iCAAiC;YACjC,IAAI,CAAC,YAAC,CAAC,WAAW,CAAC,oBAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAApB,CAAoB,CAAC,CAAC,EAAE;gBAClF,KAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACzB;iBAAM,IAAI,CAAC,YAAC,CAAC,WAAW,CAAC,oBAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAApB,CAAoB,CAAC,CAAC,EAAE;gBACzF,KAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACzB;iBAAM,IAAI,CAAC,YAAC,CAAC,WAAW,CAAC,oBAAW,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAApB,CAAoB,CAAC,CAAC,EAAE;gBACtF,KAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC1B;QACH,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC;YACT,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC,oBAAW,CAAC,MAAM,CAAC,CAAC,EAAE;gBACtD,KAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACzB;YAED,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC,oBAAW,CAAC,MAAM,CAAC,CAAC,EAAE;gBACtD,KAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACzB;YAED,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC,oBAAW,CAAC,GAAG,CAAC,CAAC,EAAE;gBACnD,KAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC1B;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAjCU,kBAAkB;QAD9B,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;iDAOX,2BAAkB;OAN7B,kBAAkB,CAmC9B;IAAD,yBAAC;CAAA,AAnCD,IAmCC;AAnCY,gDAAkB"}
@@ -0,0 +1,16 @@
1
+ import { ElementRef, Renderer2 } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import { BreakpointsService } from '../breakpoints.service';
4
+ export declare abstract class BaseHideShowDirective {
5
+ e: ElementRef;
6
+ renderer: Renderer2;
7
+ breakpoints: BreakpointsService;
8
+ $destroy: Subject<unknown>;
9
+ constructor(e: ElementRef, renderer: Renderer2, breakpoints: BreakpointsService);
10
+ private originalDisaplay;
11
+ abstract action(state: "mobile" | "tablet" | "desktop"): any;
12
+ protected hideElement(): void;
13
+ protected showElement(): void;
14
+ ngOnInit(): void;
15
+ ngOnDestroy(): void;
16
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseHideShowDirective = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var core_1 = require("@angular/core");
6
+ var rxjs_1 = require("rxjs");
7
+ var breakpoints_service_1 = require("../breakpoints.service");
8
+ var BaseHideShowDirective = /** @class */ (function () {
9
+ function BaseHideShowDirective(e, renderer, breakpoints) {
10
+ this.e = e;
11
+ this.renderer = renderer;
12
+ this.breakpoints = breakpoints;
13
+ this.$destroy = new rxjs_1.Subject();
14
+ }
15
+ BaseHideShowDirective.prototype.hideElement = function () {
16
+ this.renderer.setStyle(this.e.nativeElement, 'display', 'none');
17
+ };
18
+ BaseHideShowDirective.prototype.showElement = function () {
19
+ this.renderer.setStyle(this.e.nativeElement, 'display', this.originalDisaplay);
20
+ };
21
+ BaseHideShowDirective.prototype.ngOnInit = function () {
22
+ var _this = this;
23
+ //Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
24
+ //Add 'implements AfterViewInit' to the class.
25
+ this.breakpoints
26
+ .listenTo
27
+ .pipe((0, rxjs_1.takeUntil)(this.$destroy))
28
+ .subscribe(function (state) {
29
+ if (typeof _this.originalDisaplay === 'undefined') {
30
+ _this.originalDisaplay = _this.e.nativeElement.style.display;
31
+ }
32
+ // console.log(`state for actin: ${state}`)
33
+ _this.action(state);
34
+ });
35
+ };
36
+ BaseHideShowDirective.prototype.ngOnDestroy = function () {
37
+ this.$destroy.next(void 0);
38
+ this.$destroy.complete();
39
+ };
40
+ BaseHideShowDirective = tslib_1.__decorate([
41
+ (0, core_1.Directive)({
42
+ selector: '[baseHideShowDirective]'
43
+ }),
44
+ tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
45
+ core_1.Renderer2,
46
+ breakpoints_service_1.BreakpointsService])
47
+ ], BaseHideShowDirective);
48
+ return BaseHideShowDirective;
49
+ }());
50
+ exports.BaseHideShowDirective = BaseHideShowDirective;
51
+ //# sourceMappingURL=base-hide-show.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-hide-show.directive.js","sourceRoot":"","sources":["../../src/lib/column/base-hide-show.directive.ts"],"names":[],"mappings":";;;;AAGA,sCAAoF;AACpF,6BAA0C;AAC1C,8DAA4D;AAK5D;IAEE,+BACS,CAAa,EACb,QAAmB,EACnB,WAA+B;QAF/B,MAAC,GAAD,CAAC,CAAY;QACb,aAAQ,GAAR,QAAQ,CAAW;QACnB,gBAAW,GAAX,WAAW,CAAoB;QAJxC,aAAQ,GAAG,IAAI,cAAO,EAAE,CAAC;IAKrB,CAAC;IAOK,2CAAW,GAArB;QACE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;IACjE,CAAC;IAES,2CAAW,GAArB;QACE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAA;IAChF,CAAC;IAED,wCAAQ,GAAR;QAAA,iBAaC;QAZC,6GAA6G;QAC7G,8CAA8C;QAC9C,IAAI,CAAC,WAAW;aACb,QAAQ;aACR,IAAI,CAAC,IAAA,gBAAS,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC9B,SAAS,CAAC,UAAC,KAAK;YACf,IAAI,OAAO,KAAI,CAAC,gBAAgB,KAAK,WAAW,EAAE;gBAChD,KAAI,CAAC,gBAAgB,GAAI,KAAI,CAAC,CAAC,CAAC,aAA6B,CAAC,KAAK,CAAC,OAAO,CAAC;aAC7E;YACD,2CAA2C;YAC3C,KAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAA;IACN,CAAC;IAED,2CAAW,GAAX;QACE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAA;IAC1B,CAAC;IAvCmB,qBAAqB;QAH1C,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,yBAAyB;SACpC,CAAC;iDAIY,iBAAU;YACH,gBAAS;YACN,wCAAkB;OALpB,qBAAqB,CA0C1C;IAAD,4BAAC;CAAA,AA1CD,IA0CC;AA1CqB,sDAAqB"}
@@ -1 +1 @@
1
- {"version":3,"file":"column-grow.directive.js","sourceRoot":"","sources":["../../../src/lib/column/column-grow.directive.ts"],"names":[],"mappings":";;;;AAAA,sCAA4E;AAM5E;IACE,uBAAmB,CAAa,EAAS,QAAmB;QAAzC,MAAC,GAAD,CAAC,CAAY;QAAS,aAAQ,GAAR,QAAQ,CAAW;QAC1D,UAAU,CAAC;YACT,sCAAsC;YACtC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,EAAE,UAAU,EAAE,GAAG,CAAC,CAAA;QACrD,CAAC,EAAE,CAAC,CAAC,CAAC;QAEN,8DAA8D;IAChE,CAAC;IARU,aAAa;QAHzB,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,QAAQ;SACnB,CAAC;iDAEsB,iBAAU,EAAmB,gBAAS;OADjD,aAAa,CASzB;IAAD,oBAAC;CAAA,AATD,IASC;AATY,sCAAa"}
1
+ {"version":3,"file":"column-grow.directive.js","sourceRoot":"","sources":["../../src/lib/column/column-grow.directive.ts"],"names":[],"mappings":";;;;AAAA,sCAA4E;AAM5E;IACE,uBAAmB,CAAa,EAAS,QAAmB;QAAzC,MAAC,GAAD,CAAC,CAAY;QAAS,aAAQ,GAAR,QAAQ,CAAW;QAC1D,UAAU,CAAC;YACT,sCAAsC;YACtC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,EAAE,UAAU,EAAE,GAAG,CAAC,CAAA;QACrD,CAAC,EAAE,CAAC,CAAC,CAAC;QAEN,8DAA8D;IAChE,CAAC;IARU,aAAa;QAHzB,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,QAAQ;SACnB,CAAC;iDAEsB,iBAAU,EAAmB,gBAAS;OADjD,aAAa,CASzB;IAAD,oBAAC;CAAA,AATD,IASC;AATY,sCAAa"}
@@ -0,0 +1,4 @@
1
+ import { BaseHideShowDirective } from './base-hide-show.directive';
2
+ export declare class DirectiveHideDesktop extends BaseHideShowDirective {
3
+ action(state: 'mobile' | 'tablet' | 'desktop'): void;
4
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DirectiveHideDesktop = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var core_1 = require("@angular/core");
6
+ var base_hide_show_directive_1 = require("./base-hide-show.directive");
7
+ var DirectiveHideDesktop = /** @class */ (function (_super) {
8
+ tslib_1.__extends(DirectiveHideDesktop, _super);
9
+ function DirectiveHideDesktop() {
10
+ return _super !== null && _super.apply(this, arguments) || this;
11
+ }
12
+ DirectiveHideDesktop.prototype.action = function (state) {
13
+ if (state === 'desktop') {
14
+ this.hideElement();
15
+ }
16
+ else {
17
+ this.showElement();
18
+ }
19
+ };
20
+ DirectiveHideDesktop = tslib_1.__decorate([
21
+ (0, core_1.Directive)({
22
+ selector: '[hideDesktop]'
23
+ })
24
+ ], DirectiveHideDesktop);
25
+ return DirectiveHideDesktop;
26
+ }(base_hide_show_directive_1.BaseHideShowDirective));
27
+ exports.DirectiveHideDesktop = DirectiveHideDesktop;
28
+ //# sourceMappingURL=column-hide-desktop.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-hide-desktop.directive.js","sourceRoot":"","sources":["../../src/lib/column/column-hide-desktop.directive.ts"],"names":[],"mappings":";;;;AACA,sCAAoF;AAGpF,uEAAmE;AAKnE;IAA0C,gDAAqB;IAA/D;;IAQA,CAAC;IAPC,qCAAM,GAAN,UAAO,KAAsC;QAC3C,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;aAAM;YACL,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC;IAPU,oBAAoB;QAHhC,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,eAAe;SAC1B,CAAC;OACW,oBAAoB,CAQhC;IAAD,2BAAC;CAAA,AARD,CAA0C,gDAAqB,GAQ9D;AARY,oDAAoB"}
@@ -1,13 +1,4 @@
1
- import { BreakpointObserver } from '@angular/cdk/layout';
2
- import { ElementRef, OnInit, Renderer2 } from '@angular/core';
3
- import { Subject } from 'rxjs';
4
- export declare class DirectiveHideMobile implements OnInit {
5
- e: ElementRef;
6
- renderer: Renderer2;
7
- breakpointObserver: BreakpointObserver;
8
- $destroy: Subject<unknown>;
9
- constructor(e: ElementRef, renderer: Renderer2, breakpointObserver: BreakpointObserver);
10
- private originalDisaplay;
11
- ngOnInit(): void;
12
- ngOnDestroy(): void;
1
+ import { BaseHideShowDirective } from './base-hide-show.directive';
2
+ export declare class DirectiveHideMobile extends BaseHideShowDirective {
3
+ action(state: 'mobile' | 'tablet' | 'desktop'): void;
13
4
  }
@@ -2,46 +2,27 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DirectiveHideMobile = void 0;
4
4
  var tslib_1 = require("tslib");
5
- var layout_1 = require("@angular/cdk/layout");
6
5
  var core_1 = require("@angular/core");
7
- var rxjs_1 = require("rxjs");
8
- var DirectiveHideMobile = /** @class */ (function () {
9
- function DirectiveHideMobile(e, renderer, breakpointObserver) {
10
- this.e = e;
11
- this.renderer = renderer;
12
- this.breakpointObserver = breakpointObserver;
13
- this.$destroy = new rxjs_1.Subject();
6
+ var base_hide_show_directive_1 = require("./base-hide-show.directive");
7
+ var DirectiveHideMobile = /** @class */ (function (_super) {
8
+ tslib_1.__extends(DirectiveHideMobile, _super);
9
+ function DirectiveHideMobile() {
10
+ return _super !== null && _super.apply(this, arguments) || this;
14
11
  }
15
- DirectiveHideMobile.prototype.ngOnInit = function () {
16
- var _this = this;
17
- this.breakpointObserver
18
- .observe(['(min-width: 600px)'])
19
- .pipe((0, rxjs_1.takeUntil)(this.$destroy))
20
- .subscribe(function (state) {
21
- if (typeof _this.originalDisaplay === 'undefined') {
22
- _this.originalDisaplay = _this.e.nativeElement.style.display;
23
- }
24
- if (state.matches) {
25
- _this.renderer.setStyle(_this.e.nativeElement, 'display', _this.originalDisaplay);
26
- }
27
- else {
28
- _this.renderer.setStyle(_this.e.nativeElement, 'display', 'none');
29
- }
30
- });
31
- };
32
- DirectiveHideMobile.prototype.ngOnDestroy = function () {
33
- this.$destroy.next(void 0);
34
- this.$destroy.complete();
12
+ DirectiveHideMobile.prototype.action = function (state) {
13
+ if (state === 'mobile') {
14
+ this.hideElement();
15
+ }
16
+ else {
17
+ this.showElement();
18
+ }
35
19
  };
36
20
  DirectiveHideMobile = tslib_1.__decorate([
37
21
  (0, core_1.Directive)({
38
22
  selector: '[hideMobile]'
39
- }),
40
- tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
41
- core_1.Renderer2,
42
- layout_1.BreakpointObserver])
23
+ })
43
24
  ], DirectiveHideMobile);
44
25
  return DirectiveHideMobile;
45
- }());
26
+ }(base_hide_show_directive_1.BaseHideShowDirective));
46
27
  exports.DirectiveHideMobile = DirectiveHideMobile;
47
28
  //# sourceMappingURL=column-hide-mobile.directive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"column-hide-mobile.directive.js","sourceRoot":"","sources":["../../../src/lib/column/column-hide-mobile.directive.ts"],"names":[],"mappings":";;;;AAAA,8CAA0E;AAC1E,sCAAoF;AACpF,6BAA0C;AAM1C;IAGE,6BACS,CAAa,EACb,QAAmB,EACnB,kBAAsC;QAFtC,MAAC,GAAD,CAAC,CAAY;QACb,aAAQ,GAAR,QAAQ,CAAW;QACnB,uBAAkB,GAAlB,kBAAkB,CAAoB;QAJ/C,aAAQ,GAAG,IAAI,cAAO,EAAE,CAAC;IAKrB,CAAC;IAIL,sCAAQ,GAAR;QAAA,iBAcC;QAbC,IAAI,CAAC,kBAAkB;aACpB,OAAO,CAAC,CAAC,oBAAoB,CAAC,CAAC;aAC/B,IAAI,CAAC,IAAA,gBAAS,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC9B,SAAS,CAAC,UAAC,KAAsB;YAChC,IAAI,OAAO,KAAI,CAAC,gBAAgB,KAAK,WAAW,EAAE;gBAChD,KAAI,CAAC,gBAAgB,GAAI,KAAI,CAAC,CAAC,CAAC,aAA6B,CAAC,KAAK,CAAC,OAAO,CAAC;aAC7E;YACD,IAAI,KAAK,CAAC,OAAO,EAAE;gBACjB,KAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAI,CAAC,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,KAAI,CAAC,gBAAgB,CAAC,CAAA;aAC/E;iBAAM;gBACL,KAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAI,CAAC,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;aAChE;QACH,CAAC,CAAC,CAAA;IACN,CAAC;IAED,yCAAW,GAAX;QACE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAA;IAC1B,CAAC;IA9BU,mBAAmB;QAH/B,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,cAAc;SACzB,CAAC;iDAKY,iBAAU;YACH,gBAAS;YACC,2BAAkB;OANpC,mBAAmB,CAgC/B;IAAD,0BAAC;CAAA,AAhCD,IAgCC;AAhCY,kDAAmB"}
1
+ {"version":3,"file":"column-hide-mobile.directive.js","sourceRoot":"","sources":["../../src/lib/column/column-hide-mobile.directive.ts"],"names":[],"mappings":";;;;AACA,sCAAoF;AAGpF,uEAAmE;AAKnE;IAAyC,+CAAqB;IAA9D;;IAQA,CAAC;IAPC,oCAAM,GAAN,UAAO,KAAsC;QAC3C,IAAI,KAAK,KAAK,QAAQ,EAAE;YACtB,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;aAAM;YACL,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC;IAPU,mBAAmB;QAH/B,IAAA,gBAAS,EAAC;YACT,QAAQ,EAAE,cAAc;SACzB,CAAC;OACW,mBAAmB,CAQ/B;IAAD,0BAAC;CAAA,AARD,CAAyC,gDAAqB,GAQ7D;AARY,kDAAmB"}
@@ -1,13 +1,4 @@
1
- import { BreakpointObserver } from '@angular/cdk/layout';
2
- import { ElementRef, OnInit, Renderer2 } from '@angular/core';
3
- import { Subject } from 'rxjs';
4
- export declare class DirectiveHideTablet implements OnInit {
5
- e: ElementRef;
6
- renderer: Renderer2;
7
- breakpointObserver: BreakpointObserver;
8
- $destroy: Subject<unknown>;
9
- constructor(e: ElementRef, renderer: Renderer2, breakpointObserver: BreakpointObserver);
10
- private originalDisaplay;
11
- ngOnInit(): void;
12
- ngOnDestroy(): void;
1
+ import { BaseHideShowDirective } from './base-hide-show.directive';
2
+ export declare class DirectiveHideTablet extends BaseHideShowDirective {
3
+ action(state: 'mobile' | 'tablet' | 'desktop'): void;
13
4
  }
@@ -2,46 +2,27 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DirectiveHideTablet = void 0;
4
4
  var tslib_1 = require("tslib");
5
- var layout_1 = require("@angular/cdk/layout");
6
5
  var core_1 = require("@angular/core");
7
- var rxjs_1 = require("rxjs");
8
- var DirectiveHideTablet = /** @class */ (function () {
9
- function DirectiveHideTablet(e, renderer, breakpointObserver) {
10
- this.e = e;
11
- this.renderer = renderer;
12
- this.breakpointObserver = breakpointObserver;
13
- this.$destroy = new rxjs_1.Subject();
6
+ var base_hide_show_directive_1 = require("./base-hide-show.directive");
7
+ var DirectiveHideTablet = /** @class */ (function (_super) {
8
+ tslib_1.__extends(DirectiveHideTablet, _super);
9
+ function DirectiveHideTablet() {
10
+ return _super !== null && _super.apply(this, arguments) || this;
14
11
  }
15
- DirectiveHideTablet.prototype.ngOnInit = function () {
16
- var _this = this;
17
- this.breakpointObserver
18
- .observe(['(min-width: 800px)'])
19
- .pipe((0, rxjs_1.takeUntil)(this.$destroy))
20
- .subscribe(function (state) {
21
- if (typeof _this.originalDisaplay === 'undefined') {
22
- _this.originalDisaplay = _this.e.nativeElement.style.display;
23
- }
24
- if (state.matches) {
25
- _this.renderer.setStyle(_this.e.nativeElement, 'display', _this.originalDisaplay);
26
- }
27
- else {
28
- _this.renderer.setStyle(_this.e.nativeElement, 'display', 'none');
29
- }
30
- });
31
- };
32
- DirectiveHideTablet.prototype.ngOnDestroy = function () {
33
- this.$destroy.next(void 0);
34
- this.$destroy.complete();
12
+ DirectiveHideTablet.prototype.action = function (state) {
13
+ if (state === 'tablet') {
14
+ this.hideElement();
15
+ }
16
+ else {
17
+ this.showElement();
18
+ }
35
19
  };
36
20
  DirectiveHideTablet = tslib_1.__decorate([
37
21
  (0, core_1.Directive)({
38
22
  selector: '[hideTablet]'
39
- }),
40
- tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
41
- core_1.Renderer2,
42
- layout_1.BreakpointObserver])
23
+ })
43
24
  ], DirectiveHideTablet);
44
25
  return DirectiveHideTablet;
45
- }());
26
+ }(base_hide_show_directive_1.BaseHideShowDirective));
46
27
  exports.DirectiveHideTablet = DirectiveHideTablet;
47
28
  //# sourceMappingURL=column-hide-tablet.directive.js.map