jabroni-outfit 1.4.5 → 1.4.6

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": "jabroni-outfit",
3
3
  "description": "out-of-the-box gui and persistent-state library based on vue",
4
- "version": "1.4.5",
4
+ "version": "1.4.6",
5
5
  "license": "MIT",
6
6
  "keywords": ["gui", "tweaks", "ui", "persistent-state", "state-management", "typescript", "vue"],
7
7
  "author": "smartacephale atm.mormon@protonmail.com (https://github.com/smartacephale)",
@@ -3,17 +3,17 @@ import type { Scheme } from "./types";
3
3
  export const DefaultScheme: Scheme = {
4
4
  excludeFilter: [
5
5
  { type: "checkbox", model: "state.filterExclude", label: "exclude" },
6
- { type: "text", model: "state.filterExcludeWords", placeholder: "regexp: word, word1|word2, f:full_word..." }
6
+ { type: "text", model: "state.filterExcludeWords", placeholder: "word, word1|word2, f:full_word..." }
7
7
  ],
8
8
  includeFilter: [
9
9
  { type: "checkbox", model: "state.filterInclude", label: "include" },
10
- { type: "text", model: "state.filterIncludeWords", placeholder: "regexp: word, word1|word2, f:full_word..." }
10
+ { type: "text", model: "state.filterIncludeWords", placeholder: "word, word1|word2, f:full_word..." }
11
11
  ],
12
12
  infiniteScroll: [
13
13
  { type: "checkbox", model: "state.infiniteScrollEnabled", label: "infinite scroll" },
14
14
  {
15
15
  type: "span", innerText:
16
- "return `${stateLocale.pagIndexCur}/${stateLocale.pagIndexLast}`", "v-if": "stateLocale.pagIndexLast > 1"
16
+ "return `${stateLocale.pagIndexCur}/${stateLocale.pagIndexLast}`", "v-if": "return stateLocale.pagIndexLast > 1"
17
17
  }
18
18
  ],
19
19
  durationFilter: [
@@ -40,11 +40,16 @@ const updateValue = ({ target: { checked, value } }) => {
40
40
  props[stateName][stateProp] = val;
41
41
  };
42
42
 
43
+ let vif = true;
44
+ if (rest["v-if"]) {
45
+ vif = new Function('state', 'stateLocale', rest["v-if"])(state, stateLocale);
46
+ }
47
+
43
48
  </script>
44
49
  <template>
45
50
  <label v-if="labelBefore" :for="id" class="text-zinc-300 mx-2 font-mono">{{ labelBefore }}</label>
46
- <component :id="id" :is="tag" :type="ctype" :class="componentStyles[type]" :checked="!!value" :value="value"
47
- v-on:change="updateValue" v-on:input="updateValue" @click="callback" v-bind="rest">
51
+ <component v-if="vif" :id="id" :is="tag" :type="ctype" :class="componentStyles[type]" :checked="!!value"
52
+ :value="value" v-on:change="updateValue" v-on:input="updateValue" @click="callback" v-bind="rest">
48
53
  {{ innerTextValue }}
49
54
  </component>
50
55
  <label v-if="label" :for="id" class="text-zinc-300 flex font-mono">{{ label }}</label>