@dereekb/dbx-web 8.11.1 → 8.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/esm2020/lib/extension/calendar/calendar.component.mjs +86 -0
  2. package/esm2020/lib/extension/calendar/calendar.module.mjs +74 -0
  3. package/esm2020/lib/extension/calendar/calendar.store.mjs +107 -0
  4. package/esm2020/lib/extension/calendar/index.mjs +4 -0
  5. package/esm2020/lib/extension/index.mjs +2 -0
  6. package/esm2020/lib/index.mjs +2 -1
  7. package/esm2020/lib/layout/column/two/two.column.component.mjs +6 -7
  8. package/esm2020/lib/layout/column/two/two.column.store.mjs +10 -1
  9. package/fesm2015/dereekb-dbx-web.mjs +260 -9
  10. package/fesm2015/dereekb-dbx-web.mjs.map +1 -1
  11. package/fesm2020/dereekb-dbx-web.mjs +261 -9
  12. package/fesm2020/dereekb-dbx-web.mjs.map +1 -1
  13. package/lib/extension/_extension.scss +38 -0
  14. package/lib/extension/calendar/_calendar.scss +188 -0
  15. package/lib/extension/calendar/calendar.component.d.ts +43 -0
  16. package/lib/extension/calendar/calendar.module.d.ts +22 -0
  17. package/lib/extension/calendar/calendar.store.d.ts +67 -0
  18. package/lib/extension/calendar/index.d.ts +3 -0
  19. package/lib/extension/calendar/style/_angular-calendar.scss +23 -0
  20. package/lib/extension/calendar/style/_variables.scss +76 -0
  21. package/lib/extension/calendar/style/common/calendar-tooltip.scss +113 -0
  22. package/lib/extension/calendar/style/day/calendar-day-view.scss +34 -0
  23. package/lib/extension/calendar/style/month/calendar-month-view.scss +221 -0
  24. package/lib/extension/calendar/style/week/calendar-week-view.scss +377 -0
  25. package/lib/extension/index.d.ts +1 -0
  26. package/lib/index.d.ts +1 -0
  27. package/lib/layout/column/_column.scss +17 -5
  28. package/lib/layout/column/two/two.column.component.d.ts +1 -1
  29. package/lib/layout/column/two/two.column.store.d.ts +15 -0
  30. package/lib/style/_all-core.scss +3 -1
  31. package/lib/style/_all-theme.scss +2 -0
  32. package/lib/style/_all-typography.scss +3 -1
  33. package/lib/style/_config.scss +30 -1
  34. package/lib/style/_core.scss +2 -3
  35. package/package.json +4 -3
@@ -0,0 +1,221 @@
1
+ @use 'sass:map';
2
+ @use '../variables';
3
+
4
+ @mixin cal-month-view-core() {
5
+ .cal-month-view {
6
+ .cal-header {
7
+ text-align: center;
8
+ font-weight: bolder;
9
+ }
10
+
11
+ .cal-header .cal-cell {
12
+ padding: 5px 0;
13
+ overflow: hidden;
14
+ text-overflow: ellipsis;
15
+ display: block;
16
+ white-space: nowrap;
17
+ }
18
+
19
+ .cal-days {
20
+ border: 1px solid;
21
+ border-bottom: 0;
22
+ }
23
+
24
+ .cal-cell-top {
25
+ min-height: 78px;
26
+ flex: 1;
27
+ }
28
+
29
+ .cal-cell-row {
30
+ display: flex;
31
+ }
32
+
33
+ .cal-cell {
34
+ float: left;
35
+ flex: 1;
36
+ display: flex;
37
+ flex-direction: column;
38
+ align-items: stretch;
39
+
40
+ .cal-event {
41
+ pointer-events: all !important;
42
+ }
43
+ }
44
+
45
+ .cal-day-cell {
46
+ min-height: 100px;
47
+
48
+ // ie11 hack for https://github.com/mattlewis92/angular-calendar/issues/501
49
+ @media all and (-ms-high-contrast: none) {
50
+ display: block;
51
+ }
52
+ }
53
+
54
+ .cal-day-cell:not(:last-child) {
55
+ border-right: 1px solid;
56
+
57
+ [dir='rtl'] & {
58
+ border-right: initial;
59
+ border-left: 1px solid;
60
+ }
61
+ }
62
+
63
+ .cal-days .cal-cell-row {
64
+ border-bottom: 1px solid;
65
+ }
66
+
67
+ .cal-day-badge {
68
+ margin-top: 18px;
69
+ margin-left: 10px;
70
+ display: inline-block;
71
+ min-width: 10px;
72
+ padding: 3px 7px;
73
+ font-size: 12px;
74
+ font-weight: 700;
75
+ line-height: 1;
76
+ text-align: center;
77
+ white-space: nowrap;
78
+ vertical-align: middle;
79
+ border-radius: 10px;
80
+ }
81
+
82
+ .cal-day-number {
83
+ font-size: 1.2em;
84
+ font-weight: 400;
85
+ opacity: variables.$cal-hint-opacity;
86
+ margin-top: 15px;
87
+ margin-right: 15px;
88
+ float: right;
89
+ margin-bottom: 10px;
90
+ }
91
+
92
+ .cal-events {
93
+ flex: 1;
94
+ align-items: flex-end;
95
+ margin: 3px;
96
+ line-height: 10px;
97
+ display: flex;
98
+ flex-wrap: wrap;
99
+ }
100
+
101
+ .cal-event {
102
+ width: 10px;
103
+ height: 10px;
104
+ border-radius: 50%;
105
+ display: inline-block;
106
+ margin: 2px;
107
+ }
108
+
109
+ .cal-day-cell.cal-in-month.cal-has-events {
110
+ cursor: pointer;
111
+ }
112
+
113
+ .cal-day-cell.cal-out-month .cal-day-number {
114
+ opacity: variables.$cal-out-month-hint-opacity;
115
+ cursor: default;
116
+ }
117
+
118
+ .cal-day-cell.cal-today .cal-day-number {
119
+ font-size: 1.9em;
120
+ }
121
+
122
+ .cal-open-day-events {
123
+ padding: 15px;
124
+ }
125
+
126
+ .cal-open-day-events .cal-event {
127
+ position: relative;
128
+ top: 2px;
129
+ }
130
+
131
+ .cal-out-month {
132
+ .cal-day-badge,
133
+ .cal-event {
134
+ opacity: 0.5;
135
+ }
136
+ }
137
+
138
+ .cal-draggable {
139
+ cursor: move;
140
+ }
141
+
142
+ .cal-drag-active * {
143
+ pointer-events: none;
144
+ }
145
+
146
+ .cal-event-title {
147
+ cursor: pointer;
148
+
149
+ &:hover {
150
+ text-decoration: underline;
151
+ }
152
+ }
153
+ }
154
+ }
155
+
156
+ @mixin cal-month-view-theme($overrides) {
157
+ $theme: map-merge(variables.$cal-vars, $overrides);
158
+
159
+ .cal-month-view {
160
+ background-color: map-get($theme, bg-primary);
161
+
162
+ .cal-cell-row:hover {
163
+ background-color: map-get($theme, bg-secondary);
164
+ }
165
+
166
+ .cal-cell-row .cal-cell:hover,
167
+ .cal-cell.cal-has-events.cal-open {
168
+ background-color: map-get($theme, bg-active);
169
+ }
170
+
171
+ .cal-days {
172
+ border-color: map-get($theme, border-color);
173
+ }
174
+
175
+ .cal-day-cell.cal-in-month.cal-event-highlight {
176
+ background: map-get($theme, bg-highlight) !important;
177
+ }
178
+
179
+ .cal-day-cell:not(:last-child) {
180
+ border-right-color: map-get($theme, border-color);
181
+
182
+ [dir='rtl'] & {
183
+ border-right-color: initial;
184
+ border-left-color: map-get($theme, border-color);
185
+ }
186
+ }
187
+
188
+ .cal-days .cal-cell-row {
189
+ border-bottom-color: map-get($theme, border-color);
190
+ }
191
+
192
+ .cal-day-badge {
193
+ background-color: map-get($theme, badge-color);
194
+ color: map-get($theme, white);
195
+ }
196
+
197
+ .cal-event {
198
+ background-color: map-get($theme, event-icon-color);
199
+ border-color: map-get($theme, event-color-secondary);
200
+ color: map-get($theme, white);
201
+ }
202
+
203
+ .cal-day-cell.cal-weekend .cal-day-number {
204
+ color: map-get($theme, weekend-color);
205
+ }
206
+
207
+ .cal-day-cell.cal-today {
208
+ background-color: map-get($theme, today-bg);
209
+ }
210
+
211
+ .cal-day-cell.cal-drag-over {
212
+ background-color: map-get($theme, bg-active-dragover);
213
+ }
214
+
215
+ .cal-open-day-events {
216
+ color: map-get($theme, white);
217
+ background-color: map-get($theme, gray);
218
+ box-shadow: map-get($theme, gradient);
219
+ }
220
+ }
221
+ }
@@ -0,0 +1,377 @@
1
+ @use 'sass:map';
2
+ @use '../variables';
3
+
4
+ @mixin cal-week-view-core() {
5
+ .cal-week-view {
6
+ * {
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ .cal-day-headers {
11
+ display: flex;
12
+ padding-left: 70px;
13
+ border: 1px solid;
14
+
15
+ [dir='rtl'] & {
16
+ padding-left: initial;
17
+ padding-right: 70px;
18
+ }
19
+ }
20
+
21
+ .cal-day-headers .cal-header {
22
+ flex: 1;
23
+ text-align: center;
24
+ padding: 5px;
25
+
26
+ &:not(:last-child) {
27
+ border-right: 1px solid;
28
+
29
+ [dir='rtl'] & {
30
+ border-right: initial;
31
+ border-left: 1px solid;
32
+ }
33
+ }
34
+
35
+ &:first-child {
36
+ border-left: 1px solid;
37
+
38
+ [dir='rtl'] & {
39
+ border-left: initial;
40
+ border-right: 1px solid;
41
+ }
42
+ }
43
+ }
44
+
45
+ .cal-day-headers span {
46
+ font-weight: 400;
47
+ opacity: variables.$cal-hint-opacity;
48
+ }
49
+
50
+ .cal-day-column {
51
+ flex-grow: 1;
52
+ border-left: solid 1px;
53
+
54
+ [dir='rtl'] & {
55
+ border-left: initial;
56
+ border-right: solid 1px;
57
+ }
58
+ }
59
+
60
+ .cal-event {
61
+ font-size: 12px;
62
+ border: 1px solid;
63
+ direction: ltr;
64
+ }
65
+
66
+ .cal-time-label-column {
67
+ width: 70px;
68
+ height: 100%;
69
+ }
70
+
71
+ .cal-current-time-marker {
72
+ position: absolute;
73
+ // width: 100%; // breaks out of box sometimes
74
+ height: 2px;
75
+ z-index: 2;
76
+ }
77
+
78
+ .cal-all-day-events {
79
+ border: solid 1px;
80
+ border-top: 0;
81
+ border-bottom-width: 3px;
82
+ padding-top: 3px;
83
+ position: relative;
84
+
85
+ .cal-day-columns {
86
+ height: 100%;
87
+ width: 100%;
88
+ display: flex;
89
+ position: absolute;
90
+ top: 0;
91
+ z-index: 0;
92
+ }
93
+
94
+ .cal-events-row {
95
+ position: relative;
96
+ height: 31px;
97
+ margin-left: 70px;
98
+
99
+ [dir='rtl'] & {
100
+ margin-left: initial;
101
+ margin-right: 70px;
102
+ }
103
+ }
104
+
105
+ .cal-event-container {
106
+ display: inline-block;
107
+ position: absolute;
108
+
109
+ &.resize-active {
110
+ z-index: 1;
111
+ pointer-events: none;
112
+ }
113
+ }
114
+
115
+ .cal-event {
116
+ padding: 0 5px;
117
+ margin-left: 2px;
118
+ margin-right: 2px;
119
+ height: 28px;
120
+ line-height: 28px;
121
+ }
122
+
123
+ .cal-starts-within-week .cal-event {
124
+ border-top-left-radius: 5px;
125
+ border-bottom-left-radius: 5px;
126
+
127
+ [dir='rtl'] & {
128
+ border-top-left-radius: initial;
129
+ border-bottom-left-radius: initial;
130
+ border-top-right-radius: 5px !important;
131
+ border-bottom-right-radius: 5px !important;
132
+ }
133
+ }
134
+
135
+ .cal-ends-within-week .cal-event {
136
+ border-top-right-radius: 5px;
137
+ border-bottom-right-radius: 5px;
138
+
139
+ [dir='rtl'] & {
140
+ border-top-right-radius: initial;
141
+ border-bottom-right-radius: initial;
142
+ border-top-left-radius: 5px;
143
+ border-bottom-left-radius: 5px;
144
+ }
145
+ }
146
+
147
+ .cal-time-label-column {
148
+ display: flex;
149
+ align-items: center;
150
+ justify-content: center;
151
+ font-size: 14px;
152
+ }
153
+
154
+ .cal-resize-handle {
155
+ width: 6px;
156
+ height: 100%;
157
+ cursor: col-resize;
158
+ position: absolute;
159
+ top: 0;
160
+
161
+ &.cal-resize-handle-after-end {
162
+ right: 0;
163
+
164
+ [dir='rtl'] & {
165
+ right: initial;
166
+ left: 0;
167
+ }
168
+ }
169
+ }
170
+ }
171
+
172
+ .cal-event,
173
+ .cal-header {
174
+ overflow: hidden;
175
+ text-overflow: ellipsis;
176
+ white-space: nowrap;
177
+ }
178
+
179
+ .cal-drag-active {
180
+ pointer-events: none;
181
+ z-index: 1;
182
+
183
+ & * {
184
+ pointer-events: none;
185
+ }
186
+ }
187
+
188
+ .cal-time-events {
189
+ position: relative;
190
+ border: solid 1px;
191
+ border-top: 0;
192
+ display: flex;
193
+
194
+ .cal-day-columns {
195
+ display: flex;
196
+ flex-grow: 1;
197
+ }
198
+
199
+ .cal-day-column {
200
+ position: relative;
201
+ }
202
+
203
+ .cal-events-container {
204
+ position: relative;
205
+ }
206
+
207
+ .cal-event-container {
208
+ position: absolute;
209
+ z-index: 1;
210
+ }
211
+
212
+ .cal-event {
213
+ width: calc(100% - 2px);
214
+ height: calc(100% - 2px);
215
+ margin: 1px;
216
+ padding: 0 5px;
217
+ line-height: 25px;
218
+ }
219
+
220
+ .cal-resize-handle {
221
+ width: 100%;
222
+ height: 4px;
223
+ cursor: row-resize;
224
+ position: absolute;
225
+
226
+ &.cal-resize-handle-after-end {
227
+ bottom: 0;
228
+ }
229
+ }
230
+ }
231
+
232
+ .cal-hour-segment {
233
+ position: relative;
234
+
235
+ &::after {
236
+ content: '\00a0';
237
+ }
238
+ }
239
+
240
+ .cal-event-container:not(.cal-draggable) {
241
+ cursor: pointer;
242
+ }
243
+
244
+ .cal-draggable {
245
+ cursor: move;
246
+ }
247
+
248
+ /* stylelint-disable-next-line selector-type-no-unknown */
249
+ mwl-calendar-week-view-hour-segment, /* fix for https://github.com/mattlewis92/angular-calendar/issues/260*/
250
+ .cal-hour-segment {
251
+ display: block;
252
+ }
253
+
254
+ .cal-hour:not(:last-child) .cal-hour-segment,
255
+ .cal-hour:last-child :not(:last-child) .cal-hour-segment {
256
+ border-bottom: thin dashed;
257
+ }
258
+
259
+ .cal-time {
260
+ font-weight: bold;
261
+ padding-top: 5px;
262
+ width: 70px;
263
+ text-align: center;
264
+ }
265
+
266
+ .cal-hour-segment.cal-after-hour-start {
267
+ .cal-time {
268
+ display: none;
269
+ }
270
+ }
271
+
272
+ .cal-starts-within-day .cal-event {
273
+ border-top-left-radius: 5px;
274
+ border-top-right-radius: 5px;
275
+ }
276
+
277
+ .cal-ends-within-day .cal-event {
278
+ border-bottom-left-radius: 5px;
279
+ border-bottom-right-radius: 5px;
280
+ }
281
+ }
282
+ }
283
+
284
+ @mixin cal-week-view-theme($overrides) {
285
+ $theme: map-merge(variables.$cal-vars, $overrides);
286
+
287
+ .cal-week-view {
288
+ background-color: map-get($theme, bg-primary);
289
+ border-top: solid 1px map-get($theme, border-color);
290
+
291
+ .cal-day-headers {
292
+ border-color: map-get($theme, border-color);
293
+ // border-top: 0;
294
+ }
295
+
296
+ .cal-day-headers .cal-header {
297
+ &:not(:last-child) {
298
+ border-right-color: map-get($theme, border-color);
299
+
300
+ [dir='rtl'] & {
301
+ border-right-color: initial;
302
+ border-left: solid 1px map-get($theme, border-color) !important;
303
+ }
304
+ }
305
+
306
+ &:first-child {
307
+ border-left-color: map-get($theme, border-color);
308
+
309
+ [dir='rtl'] & {
310
+ border-left-color: initial;
311
+ border-right-color: map-get($theme, border-color);
312
+ }
313
+ }
314
+ }
315
+
316
+ .cal-day-headers .cal-header:hover,
317
+ .cal-day-headers .cal-drag-over {
318
+ background-color: map-get($theme, bg-active);
319
+ }
320
+
321
+ .cal-day-column {
322
+ border-left-color: map-get($theme, border-color);
323
+
324
+ [dir='rtl'] & {
325
+ border-left-color: initial;
326
+ border-right-color: map-get($theme, border-color);
327
+ }
328
+ }
329
+
330
+ .cal-event {
331
+ background-color: map-get($theme, event-color-secondary);
332
+ border-color: map-get($theme, event-color-primary);
333
+ color: map-get($theme, event-color-primary);
334
+ }
335
+
336
+ .cal-all-day-events {
337
+ border-color: map-get($theme, border-color);
338
+ }
339
+
340
+ .cal-header.cal-today {
341
+ background-color: map-get($theme, today-bg);
342
+ }
343
+
344
+ .cal-header.cal-weekend span {
345
+ color: map-get($theme, weekend-color);
346
+ }
347
+
348
+ .cal-time-events {
349
+ border-color: map-get($theme, border-color);
350
+
351
+ .cal-day-columns {
352
+ &:not(.cal-resize-active) {
353
+ .cal-hour-segment:hover {
354
+ background-color: map-get($theme, bg-active);
355
+ }
356
+ }
357
+ }
358
+ }
359
+
360
+ .cal-hour-odd {
361
+ background-color: map-get($theme, bg-secondary);
362
+ }
363
+
364
+ .cal-drag-over .cal-hour-segment {
365
+ background-color: map-get($theme, bg-active);
366
+ }
367
+
368
+ .cal-hour:not(:last-child) .cal-hour-segment,
369
+ .cal-hour:last-child :not(:last-child) .cal-hour-segment {
370
+ border-bottom-color: map-get($theme, border-color);
371
+ }
372
+
373
+ .cal-current-time-marker {
374
+ background-color: map-get($theme, current-time-marker-color);
375
+ }
376
+ }
377
+ }
@@ -0,0 +1 @@
1
+ export * from './calendar';
package/lib/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './action';
2
2
  export * from './button';
3
3
  export * from './error';
4
+ export * from './extension';
4
5
  export * from './interaction';
5
6
  export * from './keypress';
6
7
  export * from './loading';
@@ -27,11 +27,6 @@ $two-columns-right-padding-size: 6px;
27
27
 
28
28
  overflow: auto;
29
29
  // background: red;
30
-
31
- .two-column-reverse-sizing & {
32
- width: calc(100% - #{$two-column-left-width});
33
- overflow: hidden;
34
- }
35
30
  }
36
31
 
37
32
  .right-column {
@@ -67,6 +62,23 @@ $two-columns-right-padding-size: 6px;
67
62
  }
68
63
  }
69
64
 
65
+ .dbx-two-column.two-column-reverse-sizing {
66
+ .left-column {
67
+ width: calc(100% - #{$two-column-left-width});
68
+ overflow: hidden;
69
+ }
70
+
71
+ .right-column {
72
+ max-width: $two-column-left-width;
73
+ }
74
+
75
+ &.hide-left-column {
76
+ .right-column {
77
+ max-width: 100%;
78
+ }
79
+ }
80
+ }
81
+
70
82
  .dbx-two-column-head {
71
83
  padding: 0 6px; // only padded on the left
72
84
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
@@ -23,8 +23,8 @@ export declare class DbxTwoColumnComponent extends AbstractSubscriptionDirective
23
23
  private elementRef;
24
24
  readonly cdRef: ChangeDetectorRef;
25
25
  private _view;
26
- private _reverseSizing;
27
26
  private _inSectionPage;
27
+ readonly reverseSizing$: Observable<boolean>;
28
28
  readonly hideLeftColumn$: Observable<boolean>;
29
29
  readonly showRight$: Observable<boolean>;
30
30
  readonly showFullLeft$: Observable<boolean>;
@@ -4,6 +4,13 @@ import { SegueRef } from '@dereekb/dbx-core';
4
4
  import { Maybe } from '@dereekb/util';
5
5
  import * as i0 from "@angular/core";
6
6
  export interface TwoColumnsState {
7
+ /**
8
+ * Whether or not to reverse the sizing.
9
+ */
10
+ reverseSizing: boolean;
11
+ /**
12
+ * Whether or not the right side should be shown.
13
+ */
7
14
  showRight: boolean;
8
15
  /**
9
16
  * Whether or not to allow the left to fill up the screen when no right is shown.
@@ -27,6 +34,10 @@ export declare class TwoColumnsContextStore extends ComponentStore<TwoColumnsSta
27
34
  private readonly _back;
28
35
  constructor();
29
36
  readonly hideLeft$: import("rxjs").Observable<boolean>;
37
+ /**
38
+ * Pipes the current state of reverseSizing.
39
+ */
40
+ readonly reverseSizing$: import("rxjs").Observable<boolean>;
30
41
  /**
31
42
  * Pipes the current state of showRight.
32
43
  */
@@ -55,6 +66,10 @@ export declare class TwoColumnsContextStore extends ComponentStore<TwoColumnsSta
55
66
  * Completely resets the store.
56
67
  */
57
68
  readonly reset: () => void;
69
+ /**
70
+ * Changes the state to show right or not.
71
+ */
72
+ readonly setReverseSizing: (() => void) | ((observableOrValue: Maybe<boolean> | import("rxjs").Observable<Maybe<boolean>>) => import("rxjs").Subscription);
58
73
  /**
59
74
  * Changes the state to show right or not.
60
75
  */
@@ -4,13 +4,15 @@
4
4
  @use '../interaction/interaction';
5
5
  @use '../layout/layout';
6
6
  @use '../router/router';
7
+ @use '../extension/extension';
7
8
 
8
9
  // Includes all theming config
9
- @mixin all-component-core() {
10
+ @mixin all-component-core($theme-config) {
10
11
  @include button.core();
11
12
  @include error.core();
12
13
  @include action.all-action-core();
13
14
  @include interaction.all-interaction-core();
14
15
  @include layout.all-layout-core();
15
16
  @include router.all-router-core();
17
+ @include extension.all-extension-core($theme-config);
16
18
  }
@@ -5,6 +5,7 @@
5
5
  @use '../interaction/interaction';
6
6
  @use '../layout/layout';
7
7
  @use '../router/router';
8
+ @use '../extension/extension';
8
9
 
9
10
  // Includes all theming config
10
11
  @mixin all-component-themes($theme-config) {
@@ -14,4 +15,5 @@
14
15
  @include interaction.all-interaction-theme($theme-config);
15
16
  @include layout.all-layout-theme($theme-config);
16
17
  @include router.all-router-theme($theme-config);
18
+ @include extension.all-extension-theme($theme-config);
17
19
  }