glib-web 4.38.0 → 4.39.0

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.
@@ -0,0 +1,10 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Read(//home/hgani/workspace/glib-web/app/views/json_ui/garage/**)",
5
+ "Read(//home/hgani/workspace/glib-web-npm/doc/garage/**)"
6
+ ],
7
+ "deny": [],
8
+ "ask": []
9
+ }
10
+ }
@@ -4,7 +4,7 @@ export default class {
4
4
  execute(properties, component) {
5
5
  const spec = Object.assign({}, properties, {
6
6
  disableCloseButton: true,
7
- styleClass: 'dialogs-alert',
7
+ styleClasses: (properties.styleClasses || []).concat(['dialogs-alert']),
8
8
  buttons: [
9
9
  {
10
10
  text: "OK",
@@ -3,7 +3,9 @@ import { dialogs } from "../../store";
3
3
  export default class {
4
4
  execute(spec, component) {
5
5
  const dialog = dialogs.value.last();
6
- const prop = Object.assign({}, spec, { styleClass: 'dialogs-open' });
6
+ const prop = Object.assign({}, spec, {
7
+ styleClasses: (spec.styleClasses || []).concat(['dialogs-open'])
8
+ });
7
9
  if (spec.updateExisting && dialog) {
8
10
  dialog.reload(prop);
9
11
 
@@ -3,7 +3,9 @@ import { dialogs } from "../../store";
3
3
  export default class {
4
4
  execute(spec, component) {
5
5
  const dialog = dialogs.value.last();
6
- const prop = Object.assign({}, spec, { styleClass: 'dialogs-show' });
6
+ const prop = Object.assign({}, spec, {
7
+ styleClasses: (spec.styleClasses || []).concat(['dialogs-show'])
8
+ });
7
9
  if (spec.updateExisting && dialog) {
8
10
  Object.assign(dialog.spec, prop);
9
11
  dialog.updateContent(spec);
@@ -3,12 +3,14 @@ import { vueApp } from "../../store";
3
3
  export default class {
4
4
  execute(spec, component) {
5
5
 
6
- const { placement, body } = spec;
6
+ const { body, placement, scrim, elevation } = spec;
7
7
 
8
8
  vueApp.sheet = {
9
- spec: body,
9
+ body: body,
10
10
  show: true,
11
- placement
11
+ placement,
12
+ scrim,
13
+ elevation
12
14
  };
13
15
  }
14
16
  }
package/app.vue CHANGED
@@ -35,10 +35,15 @@
35
35
  <div :id="tooltipId">
36
36
  <panels-responsive :spec="vueApp.tooltipSpec"></panels-responsive>
37
37
  </div>
38
+ <Transition name="scrim-fade">
39
+ <div v-if="sheet.show && sheet.scrim" class="glib-sheet-scrim" @click="closeSheet"></div>
40
+ </Transition>
38
41
  <Transition name="slide-fade">
39
- <v-sheet v-if="vueApp.sheet.show" position="fixed" :class="`views-sheet ${vueApp.sheet.placement}`">
40
- <glib-component v-for="(rbSpec, index) in vueApp.sheet.spec.childViews" :spec="rbSpec"
41
- :key="`${vueApp.sheet.spec.key}-${index}`"></glib-component>
42
+ <v-sheet v-if="sheet.show" :class="`views-sheet ${sheet.placement}`" :elevation="sheet.elevation">
43
+ <!-- <glib-component v-for="(rbSpec, index) in sheet.spec.childViews" :spec="rbSpec"
44
+ :key="`${vueApp.sheet.spec.key}-${index}`"></glib-component> -->
45
+
46
+ <panels-responsive :spec="sheet.body"></panels-responsive>
42
47
  </v-sheet>
43
48
  </Transition>
44
49
  <div class="glib-bottomBanner">
@@ -133,6 +138,9 @@ export default {
133
138
  pageClasses() {
134
139
  return [`page-${this.$vuetify.display.name}`].concat(this.page.styleClasses || []);
135
140
  },
141
+ sheet() {
142
+ return this.vueApp.sheet;
143
+ },
136
144
  containerComponent() {
137
145
  if (this.formSpec) {
138
146
  this.name = "panels-form";
@@ -173,6 +181,9 @@ export default {
173
181
  watchGlibEvent();
174
182
  },
175
183
  methods: {
184
+ closeSheet() {
185
+ this.vueApp.sheet.show = false;
186
+ },
176
187
  handleActionCable(val) {
177
188
  if (val.actionCable) {
178
189
  const { customer } = useSocket(val.actionCable, this.actionCableConsumer);
@@ -426,34 +437,20 @@ body,
426
437
  .fields-textarea .v-input--readonly {
427
438
  pointer-events: unset;
428
439
  }
429
- </style>
430
-
431
- <style scoped>
432
- /*** Header/footer support ***/
433
- .hamburger {
434
- display: flex;
435
- flex-direction: column;
436
- justify-content: space-between;
437
- height: 100%;
438
- padding: 0;
439
- }
440
440
 
441
- .body-wrapper {
442
- height: 100%;
443
- /* overflow-y: auto; */
444
- overflow-y: overlay;
445
- }
446
-
447
- .glib-bottomBanner {
441
+ .glib-sheet-scrim {
448
442
  position: fixed;
449
- bottom: 0;
450
- right: 0;
451
- z-index: 99;
443
+ top: 0;
444
+ left: 0;
445
+ width: 100%;
446
+ height: 100%;
447
+ background-color: rgba(0, 0, 0, 0.2);
448
+ z-index: 1006;
452
449
  }
453
450
 
454
451
  .views-sheet {
452
+ position: fixed;
455
453
  z-index: 1007;
456
- box-shadow: 0px 4px 12px 0px #0000001A;
457
454
  overflow-y: auto;
458
455
 
459
456
  &.top {
@@ -484,13 +481,43 @@ body,
484
481
  max-width: 684px;
485
482
  }
486
483
  }
484
+ </style>
485
+
486
+ <style scoped>
487
+ /*** Header/footer support ***/
488
+ .hamburger {
489
+ display: flex;
490
+ flex-direction: column;
491
+ justify-content: space-between;
492
+ height: 100%;
493
+ padding: 0;
494
+ }
495
+
496
+ .body-wrapper {
497
+ height: 100%;
498
+ /* overflow-y: auto; */
499
+ overflow-y: overlay;
500
+ }
501
+
502
+ .glib-bottomBanner {
503
+ position: fixed;
504
+ bottom: 0;
505
+ right: 0;
506
+ z-index: 99;
507
+ }
508
+
509
+ :root {
510
+ --sheet-slide-in-duration: 0.3s;
511
+ --sheet-slide-out-duration: 0.18s;
512
+ --sheet-scrim-delay: 0.1s;
513
+ }
487
514
 
488
515
  .slide-fade-enter-active {
489
- transition: all 0.1s ease-out;
516
+ transition: all var(--sheet-slide-in-duration) ease-out;
490
517
  }
491
518
 
492
519
  .slide-fade-leave-active {
493
- transition: all 0.1s cubic-bezier(1, 0.5, 0.8, 1);
520
+ transition: all var(--sheet-slide-out-duration) ease-in;
494
521
  }
495
522
 
496
523
  .slide-fade-enter-from,
@@ -499,5 +526,18 @@ body,
499
526
  opacity: 0;
500
527
  }
501
528
 
529
+ .scrim-fade-enter-active {
530
+ transition: opacity 0.2s ease-out var(--sheet-scrim-delay);
531
+ }
532
+
533
+ .scrim-fade-leave-active {
534
+ transition: opacity 0.2s ease-in;
535
+ }
536
+
537
+ .scrim-fade-enter-from,
538
+ .scrim-fade-leave-to {
539
+ opacity: 0;
540
+ }
541
+
502
542
  /******/
503
543
  </style>
package/nav/appBar.vue CHANGED
@@ -4,14 +4,18 @@
4
4
  <v-app-bar-nav-icon v-if="showDrawerMenu" @click="triggerDrawer()"></v-app-bar-nav-icon>
5
5
  <!-- <v-app-bar-nav-icon v-if="page.leftDrawer && !isPermanent" style="color: inherit;"
6
6
  @click="drawerTrigger = new Date()"></v-app-bar-nav-icon> -->
7
- <v-progress-circular v-if="vueApp.indicator" indeterminate></v-progress-circular>
8
- <div v-else>
9
- <panels-responsive v-if="navBar.logo" :spec="navBar.logo" />
10
- <v-app-bar-title v-else-if="navBar.showTitle">{{
11
- page.title
12
- }}</v-app-bar-title>
7
+
8
+ <div style="width: 100%; display: flex; align-items: center;" v-else>
9
+ <div>
10
+ <v-progress-circular v-if="vueApp.indicator" indeterminate></v-progress-circular>
11
+ <panels-responsive v-else-if="navBar.logo" :spec="navBar.logo" />
12
+ <v-app-bar-title v-else-if="navBar.showTitle">{{page.title}}</v-app-bar-title>
13
+ </div>
14
+
15
+ <panels-responsive v-if="navBar.body" :spec="navBar.body" />
13
16
  </div>
14
- <span style="padding-left: 10px;" v-if="navBar.showBreakpoint">
17
+
18
+ <span style="position: absolute; top: 0; right: 0; font-size: 0.7em;" v-if="navBar.showBreakpoint">
15
19
  <common-chip :spec="chipSpec" />
16
20
  </span>
17
21
  <v-spacer></v-spacer>
@@ -85,31 +89,31 @@ export default {
85
89
  };
86
90
  },
87
91
  chipSpec() {
88
- let alpha = 'aa';
89
- switch (this.$vuetify.display.name) {
90
- case "xxl":
91
- alpha = 'b0';
92
- break;
93
- case "xl":
94
- alpha = '90';
95
- break;
96
- case "lg":
97
- alpha = '70';
98
- break;
99
- case "md":
100
- alpha = '50';
101
- break;
102
- case "sm":
103
- alpha = '30';
104
- break;
105
- case "xs":
106
- alpha = '10';
107
- break;
108
- }
92
+ // let alpha = 'aa';
93
+ // switch (this.$vuetify.display.name) {
94
+ // case "xxl":
95
+ // alpha = 'b0';
96
+ // break;
97
+ // case "xl":
98
+ // alpha = '90';
99
+ // break;
100
+ // case "lg":
101
+ // alpha = '70';
102
+ // break;
103
+ // case "md":
104
+ // alpha = '50';
105
+ // break;
106
+ // case "sm":
107
+ // alpha = '30';
108
+ // break;
109
+ // case "xs":
110
+ // alpha = '10';
111
+ // break;
112
+ // }
109
113
  return {
110
114
  view: 'chip',
111
- text: this.$vuetify.display.name,
112
- backgroundColor: `#ff0000${alpha}`
115
+ styleClasses: ['dev-mode'],
116
+ text: this.$vuetify.display.name
113
117
  };
114
118
  }
115
119
  },
package/nav/dialog.vue CHANGED
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-dialog :class="spec.styleClass" :model-value="model" :width="spec.width || 600" :dark="false"
2
+ <v-dialog :class="cssClasses" :model-value="model" :width="spec.width || 600" :dark="false"
3
3
  :fullscreen="fullscreen" :sm-and-down="false" :persistent="true" @click:outside="clickOutside">
4
4
  <v-card v-show="!loading || !spec.loaderViews" :style="hamburgerStyles" class="dialog-hamburger" :key="dialogKey">
5
5
 
@@ -99,6 +99,9 @@ export default {
99
99
  };
100
100
  },
101
101
  computed: {
102
+ cssClasses() {
103
+ return (this.spec.styleClasses || []).concat(['views-dialog']);
104
+ },
102
105
  containerComponent() {
103
106
  if (this.formSpec) {
104
107
  return "panels-form";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "4.38.0",
3
+ "version": "4.39.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {