@verdnatura/vn-front-lib 0.1.3 → 0.1.5
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/README.md +0 -9
- package/dist/components-DNcJf2vk.cjs +15 -0
- package/dist/components-TYH6aw6P.js +8124 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/{composables-C8hw-mbt.js → composables-BJrEMtL8.js} +988 -996
- package/dist/{composables-yeEr4YMb.cjs → composables-CdGu2cUF.cjs} +15 -15
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +20 -14
- package/dist/vn-front-lib.cjs +1 -1
- package/dist/vn-front-lib.css +1 -1
- package/dist/vn-front-lib.js +2 -2
- package/lib/components/dialogs/VnConfirm.vue +14 -1
- package/lib/components/feedback/VnSkeletonForm.vue +3 -0
- package/lib/components/inputs/VnDate.vue +25 -24
- package/lib/components/inputs/VnInput.vue +1 -0
- package/lib/components/inputs/VnInputDate.vue +212 -212
- package/lib/components/models/VnForm.vue +1 -0
- package/lib/composables/useNotify.js +2 -2
- package/lib/utils/advancedFilters.js +21 -8
- package/package.json +1 -2
- package/dist/components-CrAKAINn.js +0 -9547
- package/dist/components-Db6HFd9F.cjs +0 -15
package/dist/composables.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./composables-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./composables-CdGu2cUF.cjs");exports.fetchLocalData=e.n,exports.focusFirstInput=e.p,exports.getObjectByKeys=e.a,exports.getObjectDifferences=e.o,exports.getRemoteAndLocalParams=e.r,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return e.d}}),exports.isComparableObject=e.s,exports.isSameValue=e.c,exports.requestData=e.i,exports.tMobile=e.h,exports.useArrayData=e.m,exports.useGlobalMessages=e.f,exports.useNotify=e.u,exports.useObjectComparison=e.l,exports.useRequired=e.g,exports.useState=e.t,exports.useValidator=e._;
|
package/dist/composables.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./composables-
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./composables-BJrEMtL8.js";
|
|
2
2
|
export { u as fetchLocalData, f as focusFirstInput, t as getObjectByKeys, d as getObjectDifferences, p as getRemoteAndLocalParams, r as i18n, m as isComparableObject, n as isSameValue, s as requestData, o as tMobile, l as useArrayData, i as useGlobalMessages, g as useNotify, c as useObjectComparison, a as useRequired, h as useState, e as useValidator };
|
package/dist/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-DF3sbh8G.cjs");let t=require("axios");t=e.r(t,1);var n=`eq`,r={eq:{icon:`=`,label:`equal`,operator:`eq`,default:!0,expr:e=>e,localEval:(e,t)=>e==t,isBasic:!0},neq:{icon:`≠`,label:`distinct`,operator:`neq`,expr:e=>({neq:e}),isNegation:!0,localEval:(e,t)=>e!=t},inq:{icon:`∈`,label:`include`,operator:`inq`,isArray:!0,expr:e=>({inq:e}),localEval:(e,t)=>t.includes(e)},nin:{icon:`∉`,label:`exclude`,operator:`nin`,isArray:!0,expr:e=>({nin:e}),isNegation:!0,localEval:(e,t)=>!t.includes(e)},like:{icon:`%`,label:`contains`,operator:`like`,isInput:!0,expr:e=>({like:a(e,`%${e}%`)}),localEval:(e,t)=>o(e,t)},nlike:{icon:`≁`,label:`notContains`,operator:`nlike`,isInput:!0,expr:e=>({nlike:a(e,`%${e}%`)}),isNegation:!0,localEval:(e,t)=>!o(e,t)},lt:{icon:`<`,label:`lessThan`,operator:`lt`,expr:e=>({lt:e}),localEval:(e,t)=>e<t,isInput:!0},gt:{icon:`>`,label:`greaterThan`,operator:`gt`,isInput:!0,expr:e=>({gt:e}),localEval:(e,t)=>e>t},lte:{icon:`≤`,label:`lessThanEqualTo`,operator:`lte`,isInput:!0,expr:e=>({lte:e}),localEval:(e,t)=>e<=t},gte:{icon:`≥`,label:`greaterThanEqualTo`,operator:`gte`,isInput:!0,expr:e=>({gte:e}),localEval:(e,t)=>e>=t},null:{icon:`∅`,label:`null`,operator:`null`,expr:()=>({eq:null}),localEval:e=>e==null,isBasic:!0,isNullable:!0},notNull:{icon:`≠`,label:`notNull`,operator:`notNull`,expr:()=>({neq:null}),localEval:e=>e!=null,isBasic:!0,isNullable:!0}},i=Object.values(r);function a(e,t){return e.includes(`%`)?e:t}function o(e,t){let n=e==null?``:String(e),r=(t==null?``:String(t)).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`).replace(/%/g,`.*`).replace(/_/g,`.`);return RegExp(`^${r}$`,`i`).test(n)}var
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-DF3sbh8G.cjs");let t=require("axios");t=e.r(t,1);var n=`eq`,r={eq:{icon:`=`,label:`equal`,operator:`eq`,default:!0,expr:e=>s(e),localEval:(e,t)=>e==t,isBasic:!0},neq:{icon:`≠`,label:`distinct`,operator:`neq`,expr:e=>({neq:s(e)}),isNegation:!0,localEval:(e,t)=>e!=t},inq:{icon:`∈`,label:`include`,operator:`inq`,isArray:!0,expr:e=>({inq:s(e)}),localEval:(e,t)=>t.includes(e)},nin:{icon:`∉`,label:`exclude`,operator:`nin`,isArray:!0,expr:e=>({nin:s(e)}),isNegation:!0,localEval:(e,t)=>!t.includes(e)},like:{icon:`%`,label:`contains`,operator:`like`,isInput:!0,expr:e=>({like:a(e,`%${e}%`)}),localEval:(e,t)=>o(e,t)},nlike:{icon:`≁`,label:`notContains`,operator:`nlike`,isInput:!0,expr:e=>({nlike:a(e,`%${e}%`)}),isNegation:!0,localEval:(e,t)=>!o(e,t)},lt:{icon:`<`,label:`lessThan`,operator:`lt`,expr:e=>({lt:s(e)}),localEval:(e,t)=>e<t,isInput:!0},gt:{icon:`>`,label:`greaterThan`,operator:`gt`,isInput:!0,expr:e=>({gt:s(e)}),localEval:(e,t)=>e>t},lte:{icon:`≤`,label:`lessThanEqualTo`,operator:`lte`,isInput:!0,expr:e=>({lte:s(e)}),localEval:(e,t)=>e<=t},gte:{icon:`≥`,label:`greaterThanEqualTo`,operator:`gte`,isInput:!0,expr:e=>({gte:s(e)}),localEval:(e,t)=>e>=t},null:{icon:`∅`,label:`null`,operator:`null`,expr:()=>({eq:null}),localEval:e=>e==null,isBasic:!0,isNullable:!0},notNull:{icon:`≠`,label:`notNull`,operator:`notNull`,expr:()=>({neq:null}),localEval:e=>e!=null,isBasic:!0,isNullable:!0}},i=Object.values(r);function a(e,t){return e.includes(`%`)?e:t}function o(e,t){let n=e==null?``:String(e),r=(t==null?``:String(t)).replace(/[.*+?^${}()|[\]\\]/g,`\\$&`).replace(/%/g,`.*`).replace(/_/g,`.`);return RegExp(`^${r}$`,`i`).test(n)}function s(e){return c(e)?new Intl.DateTimeFormat(`en-CA`).format(new Date(e)):e}function c(e){return e instanceof Date||typeof e==`string`&&/^\d{4}-\d{2}-\d{2}$/.test(e?.split(`T`)[0])}var l=new Set;async function u(){try{let{data:e}=await t.default.get(`AnalyticPaths`);e.forEach(e=>l.add(e.path))}catch(e){console.error(`Error loading allowed paths:`,e)}}async function d(e,n){l.size||await u(),l.has(n)&&t.default.post(`AnalyticEvents`,{name:e,path:n})}exports.advancedFilters=r,exports.advancedFiltersList=i,exports.defaultOperator=n,exports.trackAnalyticEvent=d;
|
package/dist/utils.js
CHANGED
|
@@ -6,7 +6,7 @@ var t = "eq", n = {
|
|
|
6
6
|
label: "equal",
|
|
7
7
|
operator: "eq",
|
|
8
8
|
default: !0,
|
|
9
|
-
expr: (e) => e,
|
|
9
|
+
expr: (e) => o(e),
|
|
10
10
|
localEval: (e, t) => e == t,
|
|
11
11
|
isBasic: !0
|
|
12
12
|
},
|
|
@@ -14,7 +14,7 @@ var t = "eq", n = {
|
|
|
14
14
|
icon: "≠",
|
|
15
15
|
label: "distinct",
|
|
16
16
|
operator: "neq",
|
|
17
|
-
expr: (e) => ({ neq: e }),
|
|
17
|
+
expr: (e) => ({ neq: o(e) }),
|
|
18
18
|
isNegation: !0,
|
|
19
19
|
localEval: (e, t) => e != t
|
|
20
20
|
},
|
|
@@ -23,7 +23,7 @@ var t = "eq", n = {
|
|
|
23
23
|
label: "include",
|
|
24
24
|
operator: "inq",
|
|
25
25
|
isArray: !0,
|
|
26
|
-
expr: (e) => ({ inq: e }),
|
|
26
|
+
expr: (e) => ({ inq: o(e) }),
|
|
27
27
|
localEval: (e, t) => t.includes(e)
|
|
28
28
|
},
|
|
29
29
|
nin: {
|
|
@@ -31,7 +31,7 @@ var t = "eq", n = {
|
|
|
31
31
|
label: "exclude",
|
|
32
32
|
operator: "nin",
|
|
33
33
|
isArray: !0,
|
|
34
|
-
expr: (e) => ({ nin: e }),
|
|
34
|
+
expr: (e) => ({ nin: o(e) }),
|
|
35
35
|
isNegation: !0,
|
|
36
36
|
localEval: (e, t) => !t.includes(e)
|
|
37
37
|
},
|
|
@@ -56,7 +56,7 @@ var t = "eq", n = {
|
|
|
56
56
|
icon: "<",
|
|
57
57
|
label: "lessThan",
|
|
58
58
|
operator: "lt",
|
|
59
|
-
expr: (e) => ({ lt: e }),
|
|
59
|
+
expr: (e) => ({ lt: o(e) }),
|
|
60
60
|
localEval: (e, t) => e < t,
|
|
61
61
|
isInput: !0
|
|
62
62
|
},
|
|
@@ -65,7 +65,7 @@ var t = "eq", n = {
|
|
|
65
65
|
label: "greaterThan",
|
|
66
66
|
operator: "gt",
|
|
67
67
|
isInput: !0,
|
|
68
|
-
expr: (e) => ({ gt: e }),
|
|
68
|
+
expr: (e) => ({ gt: o(e) }),
|
|
69
69
|
localEval: (e, t) => e > t
|
|
70
70
|
},
|
|
71
71
|
lte: {
|
|
@@ -73,7 +73,7 @@ var t = "eq", n = {
|
|
|
73
73
|
label: "lessThanEqualTo",
|
|
74
74
|
operator: "lte",
|
|
75
75
|
isInput: !0,
|
|
76
|
-
expr: (e) => ({ lte: e }),
|
|
76
|
+
expr: (e) => ({ lte: o(e) }),
|
|
77
77
|
localEval: (e, t) => e <= t
|
|
78
78
|
},
|
|
79
79
|
gte: {
|
|
@@ -81,7 +81,7 @@ var t = "eq", n = {
|
|
|
81
81
|
label: "greaterThanEqualTo",
|
|
82
82
|
operator: "gte",
|
|
83
83
|
isInput: !0,
|
|
84
|
-
expr: (e) => ({ gte: e }),
|
|
84
|
+
expr: (e) => ({ gte: o(e) }),
|
|
85
85
|
localEval: (e, t) => e >= t
|
|
86
86
|
},
|
|
87
87
|
null: {
|
|
@@ -110,22 +110,28 @@ function a(e, t) {
|
|
|
110
110
|
let n = e == null ? "" : String(e), r = (t == null ? "" : String(t)).replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/%/g, ".*").replace(/_/g, ".");
|
|
111
111
|
return RegExp(`^${r}$`, "i").test(n);
|
|
112
112
|
}
|
|
113
|
+
function o(e) {
|
|
114
|
+
return s(e) ? new Intl.DateTimeFormat("en-CA").format(new Date(e)) : e;
|
|
115
|
+
}
|
|
116
|
+
function s(e) {
|
|
117
|
+
return e instanceof Date || typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e?.split("T")[0]);
|
|
118
|
+
}
|
|
113
119
|
//#endregion
|
|
114
120
|
//#region lib/utils/trackAnalytics.js
|
|
115
|
-
var
|
|
116
|
-
async function
|
|
121
|
+
var c = /* @__PURE__ */ new Set();
|
|
122
|
+
async function l() {
|
|
117
123
|
try {
|
|
118
124
|
let { data: t } = await e.get("AnalyticPaths");
|
|
119
|
-
t.forEach((e) =>
|
|
125
|
+
t.forEach((e) => c.add(e.path));
|
|
120
126
|
} catch (e) {
|
|
121
127
|
console.error("Error loading allowed paths:", e);
|
|
122
128
|
}
|
|
123
129
|
}
|
|
124
|
-
async function
|
|
125
|
-
|
|
130
|
+
async function u(t, n) {
|
|
131
|
+
c.size || await l(), c.has(n) && e.post("AnalyticEvents", {
|
|
126
132
|
name: t,
|
|
127
133
|
path: n
|
|
128
134
|
});
|
|
129
135
|
}
|
|
130
136
|
//#endregion
|
|
131
|
-
export { n as advancedFilters, r as advancedFiltersList, t as defaultOperator,
|
|
137
|
+
export { n as advancedFilters, r as advancedFiltersList, t as defaultOperator, u as trackAnalyticEvent };
|
package/dist/vn-front-lib.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./components-DNcJf2vk.cjs"),t=require("./composables-CdGu2cUF.cjs");function n(n,r={}){for(let t in e.t)n.component(t,e.t[t]);t.f(r.i18n)}var r={install:n};exports.VnConfirm=e.l,exports.VnDate=e.o,exports.VnFetch=e.r,exports.VnForm=e.n,exports.VnInput=e.a,exports.VnInputDate=e.i,exports.VnSkeletonForm=e.c,exports.VnSpinner=e.s,exports.default=r,exports.fetchLocalData=t.n,exports.focusFirstInput=t.p,exports.getObjectByKeys=t.a,exports.getObjectDifferences=t.o,exports.getRemoteAndLocalParams=t.r,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return t.d}}),exports.isComparableObject=t.s,exports.isSameValue=t.c,exports.requestData=t.i,exports.tMobile=t.h,exports.useArrayData=t.m,exports.useGlobalMessages=t.f,exports.useNotify=t.u,exports.useObjectComparison=t.l,exports.useRequired=t.g,exports.useState=t.t,exports.useValidator=t._;
|
package/dist/vn-front-lib.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.q-card[data-v-
|
|
1
|
+
.q-card[data-v-087d2dc1]{white-space:pre-line;min-width:350px}.vn-spinner[data-v-e5edebae]{border:3px solid color-mix(in srgb, var(--vn-label-color) 15%, transparent);border-top-color:var(--q-primary);box-sizing:border-box;border-radius:50%;min-width:16px;min-height:16px;animation:.7s cubic-bezier(.4,.15,.6,.85) infinite vn-spin-e5edebae}@keyframes vn-spin-e5edebae{to{transform:rotate(360deg)}}.vn-spinner-fade-enter-active[data-v-e5edebae],.vn-spinner-fade-leave-active[data-v-e5edebae]{transition:opacity .3s,transform .3s}.vn-spinner-fade-enter-from[data-v-e5edebae],.vn-spinner-fade-leave-to[data-v-e5edebae]{opacity:0;transform:scale(.6)}.q-date[data-v-8338d4d1]{width:245px;min-width:unset}.q-date[data-v-8338d4d1] .q-date__calendar{padding-bottom:0}.q-date[data-v-8338d4d1] .q-date__view{min-height:245px;padding:8px}.q-date[data-v-8338d4d1] .q-date__calendar-days-container{min-height:160px;height:unset}.q-date[data-v-8338d4d1] .q-date__header{height:60px;padding:2px 2px 5px 12px}.uppercase-icon{cursor:pointer;transition:color .3s,transform .2s}.uppercase-icon:hover{color:var(--q-color-primary);transform:scale(1.2)}.q-notifications[data-v-addfa85d]{color:#000}.q-card[data-v-addfa85d]{padding:32px}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/vn-front-lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./composables-
|
|
2
|
-
import { a as _, c as v, i as y, l as b, n as x, o as S, r as C, s as w, t as T } from "./components-
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./composables-BJrEMtL8.js";
|
|
2
|
+
import { a as _, c as v, i as y, l as b, n as x, o as S, r as C, s as w, t as T } from "./components-TYH6aw6P.js";
|
|
3
3
|
//#region lib/main.js
|
|
4
4
|
function E(e, t = {}) {
|
|
5
5
|
for (let t in T) e.component(t, T[t]);
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref } from 'vue';
|
|
3
3
|
import * as quasarPkg from 'quasar';
|
|
4
|
+
import {
|
|
5
|
+
QDialog,
|
|
6
|
+
QCard,
|
|
7
|
+
QCardSection,
|
|
8
|
+
QCardActions,
|
|
9
|
+
QAvatar,
|
|
10
|
+
QSpace,
|
|
11
|
+
QBtn,
|
|
12
|
+
} from 'quasar';
|
|
4
13
|
import { useI18n } from 'vue-i18n';
|
|
5
14
|
|
|
6
15
|
const { t } = useI18n();
|
|
@@ -42,7 +51,11 @@ const props = defineProps({
|
|
|
42
51
|
},
|
|
43
52
|
});
|
|
44
53
|
|
|
45
|
-
const emit = defineEmits([
|
|
54
|
+
const emit = defineEmits([
|
|
55
|
+
'confirm',
|
|
56
|
+
'cancel',
|
|
57
|
+
...quasarPkg.useDialogPluginComponent.emits,
|
|
58
|
+
]);
|
|
46
59
|
defineExpose({ show: () => dialogRef.value.show(), hide: () => dialogRef.value.hide() });
|
|
47
60
|
|
|
48
61
|
const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } =
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
2
|
+
import { QDate } from 'quasar';
|
|
3
|
+
const model = defineModel({ type: [String, Number], default: '' });
|
|
3
4
|
</script>
|
|
4
5
|
<template>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
<QDate
|
|
7
|
+
v-model="model"
|
|
8
|
+
:today-btn="true"
|
|
9
|
+
:options="$attrs.options"
|
|
10
|
+
autocomplete="off"
|
|
11
|
+
/>
|
|
11
12
|
</template>
|
|
12
13
|
<style lang="scss" scoped>
|
|
13
14
|
.q-date {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
width: 245px;
|
|
16
|
+
min-width: unset;
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
:deep(.q-date__calendar) {
|
|
19
|
+
padding-bottom: 0;
|
|
20
|
+
}
|
|
21
|
+
:deep(.q-date__view) {
|
|
22
|
+
min-height: 245px;
|
|
23
|
+
padding: 8px;
|
|
24
|
+
}
|
|
25
|
+
:deep(.q-date__calendar-days-container) {
|
|
26
|
+
min-height: 160px;
|
|
27
|
+
height: unset;
|
|
28
|
+
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
:deep(.q-date__header) {
|
|
31
|
+
padding: 2px 2px 5px 12px;
|
|
32
|
+
height: 60px;
|
|
33
|
+
}
|
|
33
34
|
}
|
|
34
35
|
</style>
|