@mixd-id/web-scaffold 0.1.230406137 → 0.1.230406138

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406137",
4
+ "version": "0.1.230406138",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -66,7 +66,9 @@ export default{
66
66
  computed:{
67
67
 
68
68
  actualSrc(){
69
- return this.mediaSrc[this.$screenPrefix]
69
+ if(typeof window !== 'undefined'){
70
+ return this.mediaSrc[this.$screenPrefix]
71
+ }
70
72
  },
71
73
 
72
74
  compClass(){
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import {defineAsyncComponent, reactive, ref} from "vue"
2
- import {accessNestedObject, observeInit} from './utils/helpers.mjs'
1
+ import {defineAsyncComponent, reactive} from "vue"
2
+ import {observeInit} from './utils/helpers.mjs'
3
3
  import throttle from "lodash/throttle"
4
4
 
5
5
  let _UNIQID = 0
@@ -252,7 +252,7 @@ const util = {
252
252
  let prefix = ''
253
253
  for(let breakpoint in mediaBreakpoints){
254
254
  if(width > breakpoint){
255
- prefix = mediaBreakpoints[breakpoint]
255
+ prefix = mediaBreakpoints[breakpoint] ?? prefix
256
256
  }
257
257
  }
258
258
 
@@ -273,11 +273,11 @@ export default{
273
273
  app.config.globalProperties.$observe = observeInit()
274
274
  }
275
275
 
276
- app.config.globalProperties.$screenPrefix = reactive(util.calculateMediaPrefix(window.innerWidth))
276
+ app.config.globalProperties.$screenPrefix = util.calculateMediaPrefix(window.innerWidth)
277
277
  const onWindowResize = throttle(() => {
278
278
  app.config.globalProperties.$screenPrefix = util.calculateMediaPrefix(window.innerWidth)
279
279
  resizeEvents.forEach((fn) => fn())
280
- }, 500, { leading:true })
280
+ }, 1000, { leading:true })
281
281
 
282
282
  window.addEventListener('resize', onWindowResize)
283
283
  }
@@ -347,7 +347,6 @@ export default{
347
347
  app.component('Countdown', defineAsyncComponent(() => import("./components/Countdown.vue")))
348
348
  app.component('Datepicker', defineAsyncComponent(() => import("./components/Datepicker.vue")))
349
349
  app.component('Dropdown', defineAsyncComponent(() => import("./components/Dropdown.vue")))
350
- app.component('DynamicTemplate', defineAsyncComponent(() => import("./components/DynamicTemplate.vue")))
351
350
  app.component('ErrorText', defineAsyncComponent(() => import("./components/ErrorText.vue")))
352
351
  app.component('Feed', defineAsyncComponent(() => import("./components/Feed.vue")))
353
352
  app.component('Gmaps', defineAsyncComponent(() => import("./components/Gmaps.vue")))
@@ -33,8 +33,12 @@
33
33
 
34
34
  <div class="flex flex-row gap-4" v-if="!page.isSystem">
35
35
  <div class="flex flex-col gap-1">
36
- <label class="text-text-400 w-[40px]">{{ $t('Active')}}</label>
37
- <Switch v-model="page.isActive" @change="save"/>
36
+ <label class="text-text-400 w-[40px]">{{ $t('Status') }}</label>
37
+ <Dropdown v-model="page.status" @change="save">
38
+ <option :value="-1">{{ $t('Disabled') }}</option>
39
+ <option :value="0">{{ $t('Draft') }}</option>
40
+ <option :value="1">{{ $t('Active') }}</option>
41
+ </Dropdown>
38
42
  </div>
39
43
 
40
44
  <div class="flex-1">
@@ -1,44 +0,0 @@
1
- <template>
2
- <div :class="$style.comp">
3
- <component :is="components"></component>
4
- </div>
5
- </template>
6
-
7
- <script>
8
-
9
- import * as Vue from "vue/dist/vue.esm-bundler";
10
-
11
- export default{
12
-
13
- props: [ 'template' ],
14
-
15
- data(){
16
- return {
17
- components: null
18
- }
19
- },
20
-
21
- watch: {
22
-
23
- template: {
24
- immediate: true,
25
- handler(to){
26
- this.components = Vue.compile(to)
27
- }
28
- }
29
-
30
- }
31
-
32
-
33
-
34
- }
35
-
36
- </script>
37
-
38
- <style module>
39
-
40
- .comp{
41
-
42
- }
43
-
44
- </style>