@iankibetsh/shframework 1.3.6 → 1.3.7
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/dist/library.js +6 -4
- package/dist/library.mjs +6 -5
- package/package.json +4 -1
- package/src/lib/cmds/cli.js +18 -0
package/dist/library.js
CHANGED
|
@@ -1875,7 +1875,7 @@ const countries = [
|
|
|
1875
1875
|
];
|
|
1876
1876
|
|
|
1877
1877
|
var script$n = {
|
|
1878
|
-
name: '
|
|
1878
|
+
name: 'PhoneInput',
|
|
1879
1879
|
props: ['modelValue', 'country_code'],
|
|
1880
1880
|
data () {
|
|
1881
1881
|
return {
|
|
@@ -1980,7 +1980,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1980
1980
|
}
|
|
1981
1981
|
|
|
1982
1982
|
script$n.render = render$7;
|
|
1983
|
-
script$n.__file = "src/lib/components/form-components/
|
|
1983
|
+
script$n.__file = "src/lib/components/form-components/PhoneInput.vue";
|
|
1984
1984
|
|
|
1985
1985
|
var script$m = {
|
|
1986
1986
|
name: 'ShEditor',
|
|
@@ -2227,6 +2227,7 @@ script$l.__file = "src/lib/components/form-components/ShSuggest.vue";
|
|
|
2227
2227
|
var script$k = {
|
|
2228
2228
|
name: 'ShForm',
|
|
2229
2229
|
components: {
|
|
2230
|
+
PhoneInput: script$n,
|
|
2230
2231
|
ShSuggest: script$l,
|
|
2231
2232
|
ShEditor: script$m,
|
|
2232
2233
|
ShPhone: script$n
|
|
@@ -2604,7 +2605,7 @@ const _hoisted_24$1 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
|
2604
2605
|
}, null, -1 /* HOISTED */);
|
|
2605
2606
|
|
|
2606
2607
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2607
|
-
const
|
|
2608
|
+
const _component_phone_input = vue.resolveComponent("phone-input");
|
|
2608
2609
|
const _component_ShSuggest = vue.resolveComponent("ShSuggest");
|
|
2609
2610
|
const _component_ShEditor = vue.resolveComponent("ShEditor");
|
|
2610
2611
|
|
|
@@ -2719,7 +2720,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2719
2720
|
])
|
|
2720
2721
|
: vue.createCommentVNode("v-if", true),
|
|
2721
2722
|
($options.getFieldType(field) === 'phone')
|
|
2722
|
-
? (vue.openBlock(), vue.createBlock(
|
|
2723
|
+
? (vue.openBlock(), vue.createBlock(_component_phone_input, {
|
|
2723
2724
|
key: 6,
|
|
2724
2725
|
country_code: $props.country_code,
|
|
2725
2726
|
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
@@ -5556,6 +5557,7 @@ const ShFrontend = {
|
|
|
5556
5557
|
}
|
|
5557
5558
|
};
|
|
5558
5559
|
|
|
5560
|
+
exports.Countries = countries;
|
|
5559
5561
|
exports.ShAutoForm = script$d;
|
|
5560
5562
|
exports.ShCanvas = script$9;
|
|
5561
5563
|
exports.ShConfirmAction = script$7;
|
package/dist/library.mjs
CHANGED
|
@@ -1862,7 +1862,7 @@ const countries = [
|
|
|
1862
1862
|
];
|
|
1863
1863
|
|
|
1864
1864
|
var script$n = {
|
|
1865
|
-
name: '
|
|
1865
|
+
name: 'PhoneInput',
|
|
1866
1866
|
props: ['modelValue', 'country_code'],
|
|
1867
1867
|
data () {
|
|
1868
1868
|
return {
|
|
@@ -1967,7 +1967,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
|
|
1969
1969
|
script$n.render = render$7;
|
|
1970
|
-
script$n.__file = "src/lib/components/form-components/
|
|
1970
|
+
script$n.__file = "src/lib/components/form-components/PhoneInput.vue";
|
|
1971
1971
|
|
|
1972
1972
|
var script$m = {
|
|
1973
1973
|
name: 'ShEditor',
|
|
@@ -2214,6 +2214,7 @@ script$l.__file = "src/lib/components/form-components/ShSuggest.vue";
|
|
|
2214
2214
|
var script$k = {
|
|
2215
2215
|
name: 'ShForm',
|
|
2216
2216
|
components: {
|
|
2217
|
+
PhoneInput: script$n,
|
|
2217
2218
|
ShSuggest: script$l,
|
|
2218
2219
|
ShEditor: script$m,
|
|
2219
2220
|
ShPhone: script$n
|
|
@@ -2591,7 +2592,7 @@ const _hoisted_24$1 = /*#__PURE__*/createElementVNode("span", {
|
|
|
2591
2592
|
}, null, -1 /* HOISTED */);
|
|
2592
2593
|
|
|
2593
2594
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2594
|
-
const
|
|
2595
|
+
const _component_phone_input = resolveComponent("phone-input");
|
|
2595
2596
|
const _component_ShSuggest = resolveComponent("ShSuggest");
|
|
2596
2597
|
const _component_ShEditor = resolveComponent("ShEditor");
|
|
2597
2598
|
|
|
@@ -2706,7 +2707,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2706
2707
|
])
|
|
2707
2708
|
: createCommentVNode("v-if", true),
|
|
2708
2709
|
($options.getFieldType(field) === 'phone')
|
|
2709
|
-
? (openBlock(), createBlock(
|
|
2710
|
+
? (openBlock(), createBlock(_component_phone_input, {
|
|
2710
2711
|
key: 6,
|
|
2711
2712
|
country_code: $props.country_code,
|
|
2712
2713
|
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
@@ -5543,4 +5544,4 @@ const ShFrontend = {
|
|
|
5543
5544
|
}
|
|
5544
5545
|
};
|
|
5545
5546
|
|
|
5546
|
-
export { script$d as ShAutoForm, script$9 as ShCanvas, script$7 as ShConfirmAction, script$c as ShDropDownForm, script$3 as ShDynamicTabs, script$k as ShForm, ShFrontend, script$b as ShModal, script$a as ShModalForm, script$n as ShPhone, script$6 as ShSilentAction, script$5 as ShTable, script$4 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
|
|
5547
|
+
export { countries as Countries, script$d as ShAutoForm, script$9 as ShCanvas, script$7 as ShConfirmAction, script$c as ShDropDownForm, script$3 as ShDynamicTabs, script$k as ShForm, ShFrontend, script$b as ShModal, script$a as ShModalForm, script$n as ShPhone, script$6 as ShSilentAction, script$5 as ShTable, script$4 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iankibetsh/shframework",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "Vue library for handling laravel backend",
|
|
5
5
|
"main": "dist/library.js",
|
|
6
6
|
"module": "dist/library.mjs",
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
"dev": "vite",
|
|
16
16
|
"serve": "vite"
|
|
17
17
|
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"sh-set-defaults": "./src/lib/cmds/cli.js"
|
|
20
|
+
},
|
|
18
21
|
"keywords": [],
|
|
19
22
|
"author": "",
|
|
20
23
|
"license": "ISC",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require('fs')
|
|
3
|
+
const [,, ... args] = process.argv
|
|
4
|
+
const templatesDir =`${__dirname}/../components/form-components/`
|
|
5
|
+
const destination = `${process.cwd()}/src/components/form-components/`
|
|
6
|
+
console.log(`Copying form component files to ${destination}`)
|
|
7
|
+
!fs.existsSync(destination) && fs.mkdirSync(destination,{ recursive: true })
|
|
8
|
+
|
|
9
|
+
fs.readdirSync(templatesDir).map(file=>{
|
|
10
|
+
console.log(`cp ${file}`)
|
|
11
|
+
const src = `${templatesDir}${file}`
|
|
12
|
+
const dest = `${destination}${file}`
|
|
13
|
+
let contents = fs.readFileSync(src,'utf8')
|
|
14
|
+
contents = contents.replace(`import shApis from '../../repo/helpers/ShApis.js'`,`import { shApis } from '@iankibetsh/shframework'`)
|
|
15
|
+
contents = contents.replace(`import countries from '../../repo/helpers/countries.js'`,`import { countries } from '@iankibetsh/shframework'`)
|
|
16
|
+
fs.writeFileSync(dest,contents)
|
|
17
|
+
})
|
|
18
|
+
console.log("DONE")
|