@iankibetsh/shframework 0.2.3 → 0.3.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/dist/dist/library.mjs.css +21 -0
- package/dist/library.js +110 -15
- package/dist/library.mjs +110 -16
- package/package.json +4 -3
|
@@ -30,3 +30,24 @@
|
|
|
30
30
|
font-weight: 300;
|
|
31
31
|
opacity: 0.5;
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
:root {
|
|
35
|
+
--ck-z-default: 10555 !important;
|
|
36
|
+
--ck-z-modal: calc(var(--ck-z-default) + 999) !important;
|
|
37
|
+
}
|
|
38
|
+
.mceToolbar td {
|
|
39
|
+
display:table-row;
|
|
40
|
+
float: left;
|
|
41
|
+
}
|
|
42
|
+
.mceToolbar td:nth-of-type(11){
|
|
43
|
+
clear: left;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@media screen and (max-width:600px) {
|
|
47
|
+
.sh-editor{
|
|
48
|
+
width: 100% !important;
|
|
49
|
+
}
|
|
50
|
+
table.mceLayout, textarea.tinyMCE {
|
|
51
|
+
width: 100% !important;
|
|
52
|
+
}
|
|
53
|
+
}
|
package/dist/library.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var Axios = require('axios');
|
|
6
6
|
var NProgress = require('nprogress');
|
|
7
7
|
var vue = require('vue');
|
|
8
|
+
var Editor = require('@tinymce/tinymce-vue');
|
|
8
9
|
var moment = require('moment');
|
|
9
10
|
var Swal = require('sweetalert2');
|
|
10
11
|
var pinia = require('pinia');
|
|
@@ -13,6 +14,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
14
|
|
|
14
15
|
var Axios__default = /*#__PURE__*/_interopDefaultLegacy(Axios);
|
|
15
16
|
var NProgress__default = /*#__PURE__*/_interopDefaultLegacy(NProgress);
|
|
17
|
+
var Editor__default = /*#__PURE__*/_interopDefaultLegacy(Editor);
|
|
16
18
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
17
19
|
var Swal__default = /*#__PURE__*/_interopDefaultLegacy(Swal);
|
|
18
20
|
|
|
@@ -1542,7 +1544,7 @@ const countries = [
|
|
|
1542
1544
|
}
|
|
1543
1545
|
];
|
|
1544
1546
|
|
|
1545
|
-
var script$
|
|
1547
|
+
var script$7 = {
|
|
1546
1548
|
name: 'ShPhone',
|
|
1547
1549
|
props: ['modelValue', 'country_code'],
|
|
1548
1550
|
data () {
|
|
@@ -1604,7 +1606,7 @@ var script$6 = {
|
|
|
1604
1606
|
}
|
|
1605
1607
|
};
|
|
1606
1608
|
|
|
1607
|
-
const _hoisted_1$
|
|
1609
|
+
const _hoisted_1$7 = { class: "sh-phone mb-3" };
|
|
1608
1610
|
const _hoisted_2$6 = {
|
|
1609
1611
|
key: 0,
|
|
1610
1612
|
style: {"display":"contents"}
|
|
@@ -1612,8 +1614,8 @@ const _hoisted_2$6 = {
|
|
|
1612
1614
|
const _hoisted_3$6 = ["src"];
|
|
1613
1615
|
const _hoisted_4$5 = ["value"];
|
|
1614
1616
|
|
|
1615
|
-
function render$
|
|
1616
|
-
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1617
|
+
function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1618
|
+
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
|
|
1617
1619
|
($data.selectedCountry)
|
|
1618
1620
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$6, [
|
|
1619
1621
|
vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$6),
|
|
@@ -1647,15 +1649,93 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1647
1649
|
]))
|
|
1648
1650
|
}
|
|
1649
1651
|
|
|
1652
|
+
script$7.render = render$7;
|
|
1653
|
+
script$7.__file = "src/views/ShPhone.vue";
|
|
1654
|
+
|
|
1655
|
+
var script$6 = {
|
|
1656
|
+
name: 'ShEditor',
|
|
1657
|
+
props: ['modelValue'],
|
|
1658
|
+
components: {
|
|
1659
|
+
editor: Editor__default["default"]
|
|
1660
|
+
},
|
|
1661
|
+
data () {
|
|
1662
|
+
return {
|
|
1663
|
+
editorData: this.modelValue
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
computed: {
|
|
1667
|
+
value: {
|
|
1668
|
+
get () {
|
|
1669
|
+
return this.modelValue
|
|
1670
|
+
},
|
|
1671
|
+
set (value) {
|
|
1672
|
+
this.$emit('update:modelValue', value);
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
},
|
|
1676
|
+
created () {
|
|
1677
|
+
document.addEventListener('focusin', function (e) {
|
|
1678
|
+
const closest = e.target.closest('.tox-tinymce-aux, .tox-dialog, .moxman-window, .tam-assetmanager-root');
|
|
1679
|
+
if (closest !== null && closest !== undefined) {
|
|
1680
|
+
e.stopImmediatePropagation();
|
|
1681
|
+
}
|
|
1682
|
+
});
|
|
1683
|
+
},
|
|
1684
|
+
mounted () {
|
|
1685
|
+
this.editorData = this.modelValue;
|
|
1686
|
+
},
|
|
1687
|
+
methods: {
|
|
1688
|
+
updateValue: function () {
|
|
1689
|
+
// alert('paste')
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
};
|
|
1693
|
+
|
|
1694
|
+
const _hoisted_1$6 = /*#__PURE__*/vue.createElementVNode("textarea", {
|
|
1695
|
+
id: "tiny",
|
|
1696
|
+
style: {"display":"none"},
|
|
1697
|
+
"data-cy": "tinymce_editor"
|
|
1698
|
+
}, null, -1 /* HOISTED */);
|
|
1699
|
+
|
|
1700
|
+
function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1701
|
+
const _component_editor = vue.resolveComponent("editor");
|
|
1702
|
+
|
|
1703
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1704
|
+
_hoisted_1$6,
|
|
1705
|
+
vue.createElementVNode("div", {
|
|
1706
|
+
onFocusin: _cache[1] || (_cache[1] = vue.withModifiers(() => {}, ["stop"])),
|
|
1707
|
+
class: "sh-editor w-100"
|
|
1708
|
+
}, [
|
|
1709
|
+
vue.createVNode(_component_editor, {
|
|
1710
|
+
class: "tinyEditor",
|
|
1711
|
+
"api-key": "v5otxmculqf59xfg2bqr2ucw56cbqgbqo4x9gym2kwbv1rvi",
|
|
1712
|
+
onInput: $options.updateValue,
|
|
1713
|
+
onKeyup: $options.updateValue,
|
|
1714
|
+
modelValue: $options.value,
|
|
1715
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.value) = $event)),
|
|
1716
|
+
init: {
|
|
1717
|
+
selector: 'textarea#tiny',
|
|
1718
|
+
valid_children : '+body[style],+body[script]',
|
|
1719
|
+
extended_valid_elements : '*[*]',
|
|
1720
|
+
contextmenu: false,
|
|
1721
|
+
plugins: 'lists link image emoticons code autolink',
|
|
1722
|
+
toolbar: 'styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link image emoticons code'
|
|
1723
|
+
}
|
|
1724
|
+
}, null, 8 /* PROPS */, ["onInput", "onKeyup", "modelValue"])
|
|
1725
|
+
], 32 /* HYDRATE_EVENTS */)
|
|
1726
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1650
1729
|
script$6.render = render$6;
|
|
1651
|
-
script$6.__file = "src/views/
|
|
1730
|
+
script$6.__file = "src/views/FormComponent/ShEditor.vue";
|
|
1652
1731
|
|
|
1653
1732
|
var script$5 = {
|
|
1654
1733
|
name: 'ShForm',
|
|
1655
1734
|
components: {
|
|
1656
|
-
|
|
1735
|
+
ShEditor: script$6,
|
|
1736
|
+
ShPhone: script$7
|
|
1657
1737
|
},
|
|
1658
|
-
props: ['action', 'classes', 'hasTerms', 'country_code', 'submitBtnClass', 'fields', 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission', 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback', 'failed_callback', 'labels'],
|
|
1738
|
+
props: ['action', 'classes', 'hasTerms', 'country_code', 'submitBtnClass', 'fields', 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission', 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback', 'failed_callback', 'labels', 'editors'],
|
|
1659
1739
|
data: function () {
|
|
1660
1740
|
return {
|
|
1661
1741
|
form_elements: {},
|
|
@@ -1697,7 +1777,10 @@ var script$5 = {
|
|
|
1697
1777
|
const selects = ['gender', 'payment_method', 'allow_view_mode', 'reasons_name', 'has_free_tier', 'payment_period', 'role', 'register_as', 'account_type'];
|
|
1698
1778
|
const numbers = ['age'];
|
|
1699
1779
|
const datePickers = ['free_tier_days', 'recurring_date', 'date', 'paid_at'];
|
|
1700
|
-
|
|
1780
|
+
let editors = ['html_content', 'listing_description', 'mail'];
|
|
1781
|
+
if(this.editors){
|
|
1782
|
+
editors = editors.concat(this.editors);
|
|
1783
|
+
}
|
|
1701
1784
|
const mapLocations = ['building_location'];
|
|
1702
1785
|
const files = ['file', 'logo'];
|
|
1703
1786
|
const phones = ['phone'];
|
|
@@ -1941,7 +2024,7 @@ const _hoisted_15$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
|
1941
2024
|
const _hoisted_16$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
1942
2025
|
const _hoisted_17$2 = ["value"];
|
|
1943
2026
|
const _hoisted_18$2 = {
|
|
1944
|
-
key:
|
|
2027
|
+
key: 10,
|
|
1945
2028
|
class: "invalid-feedback"
|
|
1946
2029
|
};
|
|
1947
2030
|
const _hoisted_19$2 = {
|
|
@@ -1974,6 +2057,7 @@ const _hoisted_23$2 = {
|
|
|
1974
2057
|
|
|
1975
2058
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1976
2059
|
const _component_ShPhone = vue.resolveComponent("ShPhone");
|
|
2060
|
+
const _component_ShEditor = vue.resolveComponent("ShEditor");
|
|
1977
2061
|
|
|
1978
2062
|
return (vue.openBlock(), vue.createElementBlock("form", _hoisted_1$5, [
|
|
1979
2063
|
vue.createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
|
|
@@ -2078,9 +2162,20 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2078
2162
|
required: ""
|
|
2079
2163
|
}, null, 8 /* PROPS */, ["country_code", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2080
2164
|
: vue.createCommentVNode("v-if", true),
|
|
2165
|
+
($options.getFieldType(field) === 'editor')
|
|
2166
|
+
? (vue.openBlock(), vue.createBlock(_component_ShEditor, {
|
|
2167
|
+
key: 6,
|
|
2168
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2169
|
+
name: field,
|
|
2170
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2171
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2172
|
+
modelValue: _ctx.form_elements[field],
|
|
2173
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2174
|
+
}, null, 8 /* PROPS */, ["placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2175
|
+
: vue.createCommentVNode("v-if", true),
|
|
2081
2176
|
($options.getFieldType(field) === 'text')
|
|
2082
2177
|
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
2083
|
-
key:
|
|
2178
|
+
key: 7,
|
|
2084
2179
|
disabled: $options.isDisabled(field),
|
|
2085
2180
|
placeholder: field === 'phone_number' ? 'e.g 0712 345 678':'',
|
|
2086
2181
|
name: field,
|
|
@@ -2094,7 +2189,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2094
2189
|
: vue.createCommentVNode("v-if", true),
|
|
2095
2190
|
($options.getFieldType(field) === 'textarea')
|
|
2096
2191
|
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", {
|
|
2097
|
-
key:
|
|
2192
|
+
key: 8,
|
|
2098
2193
|
name: field,
|
|
2099
2194
|
onFocus: $event => ($options.removeErrors(field)),
|
|
2100
2195
|
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
@@ -2105,7 +2200,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2105
2200
|
: vue.createCommentVNode("v-if", true),
|
|
2106
2201
|
($options.getFieldType(field) === 'select' && _ctx.selectData[field] != null)
|
|
2107
2202
|
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
|
|
2108
|
-
key:
|
|
2203
|
+
key: 9,
|
|
2109
2204
|
name: field,
|
|
2110
2205
|
onFocus: $event => ($options.removeErrors(field)),
|
|
2111
2206
|
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
@@ -3434,10 +3529,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3434
3529
|
]),
|
|
3435
3530
|
vue.createElementVNode("div", _hoisted_3, [
|
|
3436
3531
|
vue.createVNode(_component_router_view, {
|
|
3437
|
-
|
|
3532
|
+
currentTab: $data.currentTab,
|
|
3438
3533
|
sharedData: $props.sharedData,
|
|
3439
3534
|
tabCounts: $props.tabCounts
|
|
3440
|
-
}, null, 8 /* PROPS */, ["
|
|
3535
|
+
}, null, 8 /* PROPS */, ["currentTab", "sharedData", "tabCounts"])
|
|
3441
3536
|
])
|
|
3442
3537
|
]))
|
|
3443
3538
|
}
|
|
@@ -3526,7 +3621,7 @@ const useUserStore = pinia.defineStore('user-store', {
|
|
|
3526
3621
|
exports.ShCanvas = script$4;
|
|
3527
3622
|
exports.ShForm = script$5;
|
|
3528
3623
|
exports.ShModal = script$3;
|
|
3529
|
-
exports.ShPhone = script$
|
|
3624
|
+
exports.ShPhone = script$7;
|
|
3530
3625
|
exports.ShTable = script$1;
|
|
3531
3626
|
exports.ShTabs = script;
|
|
3532
3627
|
exports.shApis = apis;
|
package/dist/library.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Axios from 'axios';
|
|
2
2
|
import NProgress from 'nprogress';
|
|
3
|
-
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, normalizeClass, createBlock, renderSlot, createStaticVNode, withCtx
|
|
3
|
+
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, normalizeClass, createBlock, renderSlot, createStaticVNode, withCtx } from 'vue';
|
|
4
|
+
import Editor from '@tinymce/tinymce-vue';
|
|
4
5
|
import moment from 'moment';
|
|
5
6
|
import Swal from 'sweetalert2';
|
|
6
7
|
import { defineStore } from 'pinia';
|
|
@@ -1531,7 +1532,7 @@ const countries = [
|
|
|
1531
1532
|
}
|
|
1532
1533
|
];
|
|
1533
1534
|
|
|
1534
|
-
var script$
|
|
1535
|
+
var script$7 = {
|
|
1535
1536
|
name: 'ShPhone',
|
|
1536
1537
|
props: ['modelValue', 'country_code'],
|
|
1537
1538
|
data () {
|
|
@@ -1593,7 +1594,7 @@ var script$6 = {
|
|
|
1593
1594
|
}
|
|
1594
1595
|
};
|
|
1595
1596
|
|
|
1596
|
-
const _hoisted_1$
|
|
1597
|
+
const _hoisted_1$7 = { class: "sh-phone mb-3" };
|
|
1597
1598
|
const _hoisted_2$6 = {
|
|
1598
1599
|
key: 0,
|
|
1599
1600
|
style: {"display":"contents"}
|
|
@@ -1601,8 +1602,8 @@ const _hoisted_2$6 = {
|
|
|
1601
1602
|
const _hoisted_3$6 = ["src"];
|
|
1602
1603
|
const _hoisted_4$5 = ["value"];
|
|
1603
1604
|
|
|
1604
|
-
function render$
|
|
1605
|
-
return (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1605
|
+
function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1606
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1606
1607
|
($data.selectedCountry)
|
|
1607
1608
|
? (openBlock(), createElementBlock("div", _hoisted_2$6, [
|
|
1608
1609
|
createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$6),
|
|
@@ -1636,15 +1637,93 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1636
1637
|
]))
|
|
1637
1638
|
}
|
|
1638
1639
|
|
|
1640
|
+
script$7.render = render$7;
|
|
1641
|
+
script$7.__file = "src/views/ShPhone.vue";
|
|
1642
|
+
|
|
1643
|
+
var script$6 = {
|
|
1644
|
+
name: 'ShEditor',
|
|
1645
|
+
props: ['modelValue'],
|
|
1646
|
+
components: {
|
|
1647
|
+
editor: Editor
|
|
1648
|
+
},
|
|
1649
|
+
data () {
|
|
1650
|
+
return {
|
|
1651
|
+
editorData: this.modelValue
|
|
1652
|
+
}
|
|
1653
|
+
},
|
|
1654
|
+
computed: {
|
|
1655
|
+
value: {
|
|
1656
|
+
get () {
|
|
1657
|
+
return this.modelValue
|
|
1658
|
+
},
|
|
1659
|
+
set (value) {
|
|
1660
|
+
this.$emit('update:modelValue', value);
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
},
|
|
1664
|
+
created () {
|
|
1665
|
+
document.addEventListener('focusin', function (e) {
|
|
1666
|
+
const closest = e.target.closest('.tox-tinymce-aux, .tox-dialog, .moxman-window, .tam-assetmanager-root');
|
|
1667
|
+
if (closest !== null && closest !== undefined) {
|
|
1668
|
+
e.stopImmediatePropagation();
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
},
|
|
1672
|
+
mounted () {
|
|
1673
|
+
this.editorData = this.modelValue;
|
|
1674
|
+
},
|
|
1675
|
+
methods: {
|
|
1676
|
+
updateValue: function () {
|
|
1677
|
+
// alert('paste')
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
};
|
|
1681
|
+
|
|
1682
|
+
const _hoisted_1$6 = /*#__PURE__*/createElementVNode("textarea", {
|
|
1683
|
+
id: "tiny",
|
|
1684
|
+
style: {"display":"none"},
|
|
1685
|
+
"data-cy": "tinymce_editor"
|
|
1686
|
+
}, null, -1 /* HOISTED */);
|
|
1687
|
+
|
|
1688
|
+
function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1689
|
+
const _component_editor = resolveComponent("editor");
|
|
1690
|
+
|
|
1691
|
+
return (openBlock(), createElementBlock(Fragment, null, [
|
|
1692
|
+
_hoisted_1$6,
|
|
1693
|
+
createElementVNode("div", {
|
|
1694
|
+
onFocusin: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
|
|
1695
|
+
class: "sh-editor w-100"
|
|
1696
|
+
}, [
|
|
1697
|
+
createVNode(_component_editor, {
|
|
1698
|
+
class: "tinyEditor",
|
|
1699
|
+
"api-key": "v5otxmculqf59xfg2bqr2ucw56cbqgbqo4x9gym2kwbv1rvi",
|
|
1700
|
+
onInput: $options.updateValue,
|
|
1701
|
+
onKeyup: $options.updateValue,
|
|
1702
|
+
modelValue: $options.value,
|
|
1703
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.value) = $event)),
|
|
1704
|
+
init: {
|
|
1705
|
+
selector: 'textarea#tiny',
|
|
1706
|
+
valid_children : '+body[style],+body[script]',
|
|
1707
|
+
extended_valid_elements : '*[*]',
|
|
1708
|
+
contextmenu: false,
|
|
1709
|
+
plugins: 'lists link image emoticons code autolink',
|
|
1710
|
+
toolbar: 'styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link image emoticons code'
|
|
1711
|
+
}
|
|
1712
|
+
}, null, 8 /* PROPS */, ["onInput", "onKeyup", "modelValue"])
|
|
1713
|
+
], 32 /* HYDRATE_EVENTS */)
|
|
1714
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1639
1717
|
script$6.render = render$6;
|
|
1640
|
-
script$6.__file = "src/views/
|
|
1718
|
+
script$6.__file = "src/views/FormComponent/ShEditor.vue";
|
|
1641
1719
|
|
|
1642
1720
|
var script$5 = {
|
|
1643
1721
|
name: 'ShForm',
|
|
1644
1722
|
components: {
|
|
1645
|
-
|
|
1723
|
+
ShEditor: script$6,
|
|
1724
|
+
ShPhone: script$7
|
|
1646
1725
|
},
|
|
1647
|
-
props: ['action', 'classes', 'hasTerms', 'country_code', 'submitBtnClass', 'fields', 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission', 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback', 'failed_callback', 'labels'],
|
|
1726
|
+
props: ['action', 'classes', 'hasTerms', 'country_code', 'submitBtnClass', 'fields', 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission', 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback', 'failed_callback', 'labels', 'editors'],
|
|
1648
1727
|
data: function () {
|
|
1649
1728
|
return {
|
|
1650
1729
|
form_elements: {},
|
|
@@ -1686,7 +1765,10 @@ var script$5 = {
|
|
|
1686
1765
|
const selects = ['gender', 'payment_method', 'allow_view_mode', 'reasons_name', 'has_free_tier', 'payment_period', 'role', 'register_as', 'account_type'];
|
|
1687
1766
|
const numbers = ['age'];
|
|
1688
1767
|
const datePickers = ['free_tier_days', 'recurring_date', 'date', 'paid_at'];
|
|
1689
|
-
|
|
1768
|
+
let editors = ['html_content', 'listing_description', 'mail'];
|
|
1769
|
+
if(this.editors){
|
|
1770
|
+
editors = editors.concat(this.editors);
|
|
1771
|
+
}
|
|
1690
1772
|
const mapLocations = ['building_location'];
|
|
1691
1773
|
const files = ['file', 'logo'];
|
|
1692
1774
|
const phones = ['phone'];
|
|
@@ -1930,7 +2012,7 @@ const _hoisted_15$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
|
1930
2012
|
const _hoisted_16$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
1931
2013
|
const _hoisted_17$2 = ["value"];
|
|
1932
2014
|
const _hoisted_18$2 = {
|
|
1933
|
-
key:
|
|
2015
|
+
key: 10,
|
|
1934
2016
|
class: "invalid-feedback"
|
|
1935
2017
|
};
|
|
1936
2018
|
const _hoisted_19$2 = {
|
|
@@ -1963,6 +2045,7 @@ const _hoisted_23$2 = {
|
|
|
1963
2045
|
|
|
1964
2046
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1965
2047
|
const _component_ShPhone = resolveComponent("ShPhone");
|
|
2048
|
+
const _component_ShEditor = resolveComponent("ShEditor");
|
|
1966
2049
|
|
|
1967
2050
|
return (openBlock(), createElementBlock("form", _hoisted_1$5, [
|
|
1968
2051
|
createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
|
|
@@ -2067,9 +2150,20 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2067
2150
|
required: ""
|
|
2068
2151
|
}, null, 8 /* PROPS */, ["country_code", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2069
2152
|
: createCommentVNode("v-if", true),
|
|
2153
|
+
($options.getFieldType(field) === 'editor')
|
|
2154
|
+
? (openBlock(), createBlock(_component_ShEditor, {
|
|
2155
|
+
key: 6,
|
|
2156
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2157
|
+
name: field,
|
|
2158
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2159
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2160
|
+
modelValue: _ctx.form_elements[field],
|
|
2161
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2162
|
+
}, null, 8 /* PROPS */, ["placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2163
|
+
: createCommentVNode("v-if", true),
|
|
2070
2164
|
($options.getFieldType(field) === 'text')
|
|
2071
2165
|
? withDirectives((openBlock(), createElementBlock("input", {
|
|
2072
|
-
key:
|
|
2166
|
+
key: 7,
|
|
2073
2167
|
disabled: $options.isDisabled(field),
|
|
2074
2168
|
placeholder: field === 'phone_number' ? 'e.g 0712 345 678':'',
|
|
2075
2169
|
name: field,
|
|
@@ -2083,7 +2177,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2083
2177
|
: createCommentVNode("v-if", true),
|
|
2084
2178
|
($options.getFieldType(field) === 'textarea')
|
|
2085
2179
|
? withDirectives((openBlock(), createElementBlock("textarea", {
|
|
2086
|
-
key:
|
|
2180
|
+
key: 8,
|
|
2087
2181
|
name: field,
|
|
2088
2182
|
onFocus: $event => ($options.removeErrors(field)),
|
|
2089
2183
|
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
@@ -2094,7 +2188,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2094
2188
|
: createCommentVNode("v-if", true),
|
|
2095
2189
|
($options.getFieldType(field) === 'select' && _ctx.selectData[field] != null)
|
|
2096
2190
|
? withDirectives((openBlock(), createElementBlock("select", {
|
|
2097
|
-
key:
|
|
2191
|
+
key: 9,
|
|
2098
2192
|
name: field,
|
|
2099
2193
|
onFocus: $event => ($options.removeErrors(field)),
|
|
2100
2194
|
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
@@ -3423,10 +3517,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3423
3517
|
]),
|
|
3424
3518
|
createElementVNode("div", _hoisted_3, [
|
|
3425
3519
|
createVNode(_component_router_view, {
|
|
3426
|
-
|
|
3520
|
+
currentTab: $data.currentTab,
|
|
3427
3521
|
sharedData: $props.sharedData,
|
|
3428
3522
|
tabCounts: $props.tabCounts
|
|
3429
|
-
}, null, 8 /* PROPS */, ["
|
|
3523
|
+
}, null, 8 /* PROPS */, ["currentTab", "sharedData", "tabCounts"])
|
|
3430
3524
|
])
|
|
3431
3525
|
]))
|
|
3432
3526
|
}
|
|
@@ -3512,4 +3606,4 @@ const useUserStore = defineStore('user-store', {
|
|
|
3512
3606
|
}
|
|
3513
3607
|
});
|
|
3514
3608
|
|
|
3515
|
-
export { script$4 as ShCanvas, script$5 as ShForm, script$3 as ShModal, script$
|
|
3609
|
+
export { script$4 as ShCanvas, script$5 as ShForm, script$3 as ShModal, script$7 as ShPhone, script$1 as ShTable, script as ShTabs, apis as shApis, helpers as shRepo, shstorage as shStorage, useUserStore };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iankibetsh/shframework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Vue library for handling laravel backend",
|
|
5
5
|
"main": "dist/library.js",
|
|
6
6
|
"module": "dist/library.mjs",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dist/*"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
|
-
"test": "echo \"Error: no test
|
|
11
|
+
"test": "echo \"Error: no test specifieds\" && exit 1",
|
|
12
12
|
"build": "rollup -c",
|
|
13
13
|
"docs:dev": "vuepress dev docs",
|
|
14
14
|
"docs:build": "vuepress build docs"
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"nprogress": "^0.2.0",
|
|
23
23
|
"pinia": "^2.0.13",
|
|
24
24
|
"sweetalert2": "^11.4.14",
|
|
25
|
-
"vue": "^3.2.37"
|
|
25
|
+
"vue": "^3.2.37",
|
|
26
|
+
"@tinymce/tinymce-vue": "^4.0.7"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"rollup": "^2.75.7",
|