@iankibetsh/shframework 0.2.3 → 0.2.4
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 +112 -15
- package/dist/library.mjs +112 -16
- package/package.json +3 -2
|
@@ -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,95 @@ 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
|
+
vue.createCommentVNode(" <ckeditor @input=\"updateValue\" :editor=\"editor\" v-model=\"editorData\" :config=\"editorConfig\"></ckeditor>"),
|
|
1705
|
+
_hoisted_1$6,
|
|
1706
|
+
vue.createElementVNode("div", {
|
|
1707
|
+
onFocusin: _cache[1] || (_cache[1] = vue.withModifiers(() => {}, ["stop"])),
|
|
1708
|
+
class: "sh-editor w-100"
|
|
1709
|
+
}, [
|
|
1710
|
+
vue.createCommentVNode(" MCE editor placed here "),
|
|
1711
|
+
vue.createVNode(_component_editor, {
|
|
1712
|
+
class: "tinyEditor",
|
|
1713
|
+
"api-key": "v5otxmculqf59xfg2bqr2ucw56cbqgbqo4x9gym2kwbv1rvi",
|
|
1714
|
+
onInput: $options.updateValue,
|
|
1715
|
+
onKeyup: $options.updateValue,
|
|
1716
|
+
modelValue: $options.value,
|
|
1717
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.value) = $event)),
|
|
1718
|
+
init: {
|
|
1719
|
+
selector: 'textarea#tiny',
|
|
1720
|
+
valid_children : '+body[style],+body[script]',
|
|
1721
|
+
extended_valid_elements : '*[*]',
|
|
1722
|
+
contextmenu: false,
|
|
1723
|
+
plugins: 'lists link image emoticons code autolink',
|
|
1724
|
+
toolbar: 'styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link image emoticons code'
|
|
1725
|
+
}
|
|
1726
|
+
}, null, 8 /* PROPS */, ["onInput", "onKeyup", "modelValue"])
|
|
1727
|
+
], 32 /* HYDRATE_EVENTS */)
|
|
1728
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1650
1731
|
script$6.render = render$6;
|
|
1651
|
-
script$6.__file = "src/views/
|
|
1732
|
+
script$6.__file = "src/views/FormComponent/ShEditor.vue";
|
|
1652
1733
|
|
|
1653
1734
|
var script$5 = {
|
|
1654
1735
|
name: 'ShForm',
|
|
1655
1736
|
components: {
|
|
1656
|
-
|
|
1737
|
+
ShEditor: script$6,
|
|
1738
|
+
ShPhone: script$7
|
|
1657
1739
|
},
|
|
1658
|
-
props: ['action', 'classes', 'hasTerms', 'country_code', 'submitBtnClass', 'fields', 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission', 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback', 'failed_callback', 'labels'],
|
|
1740
|
+
props: ['action', 'classes', 'hasTerms', 'country_code', 'submitBtnClass', 'fields', 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission', 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback', 'failed_callback', 'labels', 'editors'],
|
|
1659
1741
|
data: function () {
|
|
1660
1742
|
return {
|
|
1661
1743
|
form_elements: {},
|
|
@@ -1697,7 +1779,10 @@ var script$5 = {
|
|
|
1697
1779
|
const selects = ['gender', 'payment_method', 'allow_view_mode', 'reasons_name', 'has_free_tier', 'payment_period', 'role', 'register_as', 'account_type'];
|
|
1698
1780
|
const numbers = ['age'];
|
|
1699
1781
|
const datePickers = ['free_tier_days', 'recurring_date', 'date', 'paid_at'];
|
|
1700
|
-
|
|
1782
|
+
let editors = ['html_content', 'listing_description', 'mail'];
|
|
1783
|
+
if(this.editors){
|
|
1784
|
+
editors = editors.concat(this.editors);
|
|
1785
|
+
}
|
|
1701
1786
|
const mapLocations = ['building_location'];
|
|
1702
1787
|
const files = ['file', 'logo'];
|
|
1703
1788
|
const phones = ['phone'];
|
|
@@ -1941,7 +2026,7 @@ const _hoisted_15$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
|
1941
2026
|
const _hoisted_16$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
1942
2027
|
const _hoisted_17$2 = ["value"];
|
|
1943
2028
|
const _hoisted_18$2 = {
|
|
1944
|
-
key:
|
|
2029
|
+
key: 10,
|
|
1945
2030
|
class: "invalid-feedback"
|
|
1946
2031
|
};
|
|
1947
2032
|
const _hoisted_19$2 = {
|
|
@@ -1974,6 +2059,7 @@ const _hoisted_23$2 = {
|
|
|
1974
2059
|
|
|
1975
2060
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1976
2061
|
const _component_ShPhone = vue.resolveComponent("ShPhone");
|
|
2062
|
+
const _component_ShEditor = vue.resolveComponent("ShEditor");
|
|
1977
2063
|
|
|
1978
2064
|
return (vue.openBlock(), vue.createElementBlock("form", _hoisted_1$5, [
|
|
1979
2065
|
vue.createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
|
|
@@ -2078,9 +2164,20 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2078
2164
|
required: ""
|
|
2079
2165
|
}, null, 8 /* PROPS */, ["country_code", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2080
2166
|
: vue.createCommentVNode("v-if", true),
|
|
2167
|
+
($options.getFieldType(field) === 'editor')
|
|
2168
|
+
? (vue.openBlock(), vue.createBlock(_component_ShEditor, {
|
|
2169
|
+
key: 6,
|
|
2170
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2171
|
+
name: field,
|
|
2172
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2173
|
+
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2174
|
+
modelValue: _ctx.form_elements[field],
|
|
2175
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2176
|
+
}, null, 8 /* PROPS */, ["placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2177
|
+
: vue.createCommentVNode("v-if", true),
|
|
2081
2178
|
($options.getFieldType(field) === 'text')
|
|
2082
2179
|
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
2083
|
-
key:
|
|
2180
|
+
key: 7,
|
|
2084
2181
|
disabled: $options.isDisabled(field),
|
|
2085
2182
|
placeholder: field === 'phone_number' ? 'e.g 0712 345 678':'',
|
|
2086
2183
|
name: field,
|
|
@@ -2094,7 +2191,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2094
2191
|
: vue.createCommentVNode("v-if", true),
|
|
2095
2192
|
($options.getFieldType(field) === 'textarea')
|
|
2096
2193
|
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", {
|
|
2097
|
-
key:
|
|
2194
|
+
key: 8,
|
|
2098
2195
|
name: field,
|
|
2099
2196
|
onFocus: $event => ($options.removeErrors(field)),
|
|
2100
2197
|
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
@@ -2105,7 +2202,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2105
2202
|
: vue.createCommentVNode("v-if", true),
|
|
2106
2203
|
($options.getFieldType(field) === 'select' && _ctx.selectData[field] != null)
|
|
2107
2204
|
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
|
|
2108
|
-
key:
|
|
2205
|
+
key: 9,
|
|
2109
2206
|
name: field,
|
|
2110
2207
|
onFocus: $event => ($options.removeErrors(field)),
|
|
2111
2208
|
class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
@@ -3434,10 +3531,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3434
3531
|
]),
|
|
3435
3532
|
vue.createElementVNode("div", _hoisted_3, [
|
|
3436
3533
|
vue.createVNode(_component_router_view, {
|
|
3437
|
-
|
|
3534
|
+
currentTab: $data.currentTab,
|
|
3438
3535
|
sharedData: $props.sharedData,
|
|
3439
3536
|
tabCounts: $props.tabCounts
|
|
3440
|
-
}, null, 8 /* PROPS */, ["
|
|
3537
|
+
}, null, 8 /* PROPS */, ["currentTab", "sharedData", "tabCounts"])
|
|
3441
3538
|
])
|
|
3442
3539
|
]))
|
|
3443
3540
|
}
|
|
@@ -3526,7 +3623,7 @@ const useUserStore = pinia.defineStore('user-store', {
|
|
|
3526
3623
|
exports.ShCanvas = script$4;
|
|
3527
3624
|
exports.ShForm = script$5;
|
|
3528
3625
|
exports.ShModal = script$3;
|
|
3529
|
-
exports.ShPhone = script$
|
|
3626
|
+
exports.ShPhone = script$7;
|
|
3530
3627
|
exports.ShTable = script$1;
|
|
3531
3628
|
exports.ShTabs = script;
|
|
3532
3629
|
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,95 @@ 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
|
+
createCommentVNode(" <ckeditor @input=\"updateValue\" :editor=\"editor\" v-model=\"editorData\" :config=\"editorConfig\"></ckeditor>"),
|
|
1693
|
+
_hoisted_1$6,
|
|
1694
|
+
createElementVNode("div", {
|
|
1695
|
+
onFocusin: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
|
|
1696
|
+
class: "sh-editor w-100"
|
|
1697
|
+
}, [
|
|
1698
|
+
createCommentVNode(" MCE editor placed here "),
|
|
1699
|
+
createVNode(_component_editor, {
|
|
1700
|
+
class: "tinyEditor",
|
|
1701
|
+
"api-key": "v5otxmculqf59xfg2bqr2ucw56cbqgbqo4x9gym2kwbv1rvi",
|
|
1702
|
+
onInput: $options.updateValue,
|
|
1703
|
+
onKeyup: $options.updateValue,
|
|
1704
|
+
modelValue: $options.value,
|
|
1705
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.value) = $event)),
|
|
1706
|
+
init: {
|
|
1707
|
+
selector: 'textarea#tiny',
|
|
1708
|
+
valid_children : '+body[style],+body[script]',
|
|
1709
|
+
extended_valid_elements : '*[*]',
|
|
1710
|
+
contextmenu: false,
|
|
1711
|
+
plugins: 'lists link image emoticons code autolink',
|
|
1712
|
+
toolbar: 'styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link image emoticons code'
|
|
1713
|
+
}
|
|
1714
|
+
}, null, 8 /* PROPS */, ["onInput", "onKeyup", "modelValue"])
|
|
1715
|
+
], 32 /* HYDRATE_EVENTS */)
|
|
1716
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1639
1719
|
script$6.render = render$6;
|
|
1640
|
-
script$6.__file = "src/views/
|
|
1720
|
+
script$6.__file = "src/views/FormComponent/ShEditor.vue";
|
|
1641
1721
|
|
|
1642
1722
|
var script$5 = {
|
|
1643
1723
|
name: 'ShForm',
|
|
1644
1724
|
components: {
|
|
1645
|
-
|
|
1725
|
+
ShEditor: script$6,
|
|
1726
|
+
ShPhone: script$7
|
|
1646
1727
|
},
|
|
1647
|
-
props: ['action', 'classes', 'hasTerms', 'country_code', 'submitBtnClass', 'fields', 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission', 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback', 'failed_callback', 'labels'],
|
|
1728
|
+
props: ['action', 'classes', 'hasTerms', 'country_code', 'submitBtnClass', 'fields', 'columns', 'placeholders', 'field_permissions', 'retainDataAfterSubmission', 'currentData', 'actionLabel', 'fillSelects', 'phones', 'successCallback', 'failed_callback', 'labels', 'editors'],
|
|
1648
1729
|
data: function () {
|
|
1649
1730
|
return {
|
|
1650
1731
|
form_elements: {},
|
|
@@ -1686,7 +1767,10 @@ var script$5 = {
|
|
|
1686
1767
|
const selects = ['gender', 'payment_method', 'allow_view_mode', 'reasons_name', 'has_free_tier', 'payment_period', 'role', 'register_as', 'account_type'];
|
|
1687
1768
|
const numbers = ['age'];
|
|
1688
1769
|
const datePickers = ['free_tier_days', 'recurring_date', 'date', 'paid_at'];
|
|
1689
|
-
|
|
1770
|
+
let editors = ['html_content', 'listing_description', 'mail'];
|
|
1771
|
+
if(this.editors){
|
|
1772
|
+
editors = editors.concat(this.editors);
|
|
1773
|
+
}
|
|
1690
1774
|
const mapLocations = ['building_location'];
|
|
1691
1775
|
const files = ['file', 'logo'];
|
|
1692
1776
|
const phones = ['phone'];
|
|
@@ -1930,7 +2014,7 @@ const _hoisted_15$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
|
1930
2014
|
const _hoisted_16$2 = ["name", "onFocus", "onUpdate:modelValue"];
|
|
1931
2015
|
const _hoisted_17$2 = ["value"];
|
|
1932
2016
|
const _hoisted_18$2 = {
|
|
1933
|
-
key:
|
|
2017
|
+
key: 10,
|
|
1934
2018
|
class: "invalid-feedback"
|
|
1935
2019
|
};
|
|
1936
2020
|
const _hoisted_19$2 = {
|
|
@@ -1963,6 +2047,7 @@ const _hoisted_23$2 = {
|
|
|
1963
2047
|
|
|
1964
2048
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1965
2049
|
const _component_ShPhone = resolveComponent("ShPhone");
|
|
2050
|
+
const _component_ShEditor = resolveComponent("ShEditor");
|
|
1966
2051
|
|
|
1967
2052
|
return (openBlock(), createElementBlock("form", _hoisted_1$5, [
|
|
1968
2053
|
createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
|
|
@@ -2067,9 +2152,20 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2067
2152
|
required: ""
|
|
2068
2153
|
}, null, 8 /* PROPS */, ["country_code", "placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2069
2154
|
: createCommentVNode("v-if", true),
|
|
2155
|
+
($options.getFieldType(field) === 'editor')
|
|
2156
|
+
? (openBlock(), createBlock(_component_ShEditor, {
|
|
2157
|
+
key: 6,
|
|
2158
|
+
placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
|
|
2159
|
+
name: field,
|
|
2160
|
+
onFocus: $event => ($options.removeErrors(field)),
|
|
2161
|
+
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
2162
|
+
modelValue: _ctx.form_elements[field],
|
|
2163
|
+
"onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
|
|
2164
|
+
}, null, 8 /* PROPS */, ["placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
|
|
2165
|
+
: createCommentVNode("v-if", true),
|
|
2070
2166
|
($options.getFieldType(field) === 'text')
|
|
2071
2167
|
? withDirectives((openBlock(), createElementBlock("input", {
|
|
2072
|
-
key:
|
|
2168
|
+
key: 7,
|
|
2073
2169
|
disabled: $options.isDisabled(field),
|
|
2074
2170
|
placeholder: field === 'phone_number' ? 'e.g 0712 345 678':'',
|
|
2075
2171
|
name: field,
|
|
@@ -2083,7 +2179,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2083
2179
|
: createCommentVNode("v-if", true),
|
|
2084
2180
|
($options.getFieldType(field) === 'textarea')
|
|
2085
2181
|
? withDirectives((openBlock(), createElementBlock("textarea", {
|
|
2086
|
-
key:
|
|
2182
|
+
key: 8,
|
|
2087
2183
|
name: field,
|
|
2088
2184
|
onFocus: $event => ($options.removeErrors(field)),
|
|
2089
2185
|
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
@@ -2094,7 +2190,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2094
2190
|
: createCommentVNode("v-if", true),
|
|
2095
2191
|
($options.getFieldType(field) === 'select' && _ctx.selectData[field] != null)
|
|
2096
2192
|
? withDirectives((openBlock(), createElementBlock("select", {
|
|
2097
|
-
key:
|
|
2193
|
+
key: 9,
|
|
2098
2194
|
name: field,
|
|
2099
2195
|
onFocus: $event => ($options.removeErrors(field)),
|
|
2100
2196
|
class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
|
|
@@ -3423,10 +3519,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3423
3519
|
]),
|
|
3424
3520
|
createElementVNode("div", _hoisted_3, [
|
|
3425
3521
|
createVNode(_component_router_view, {
|
|
3426
|
-
|
|
3522
|
+
currentTab: $data.currentTab,
|
|
3427
3523
|
sharedData: $props.sharedData,
|
|
3428
3524
|
tabCounts: $props.tabCounts
|
|
3429
|
-
}, null, 8 /* PROPS */, ["
|
|
3525
|
+
}, null, 8 /* PROPS */, ["currentTab", "sharedData", "tabCounts"])
|
|
3430
3526
|
])
|
|
3431
3527
|
]))
|
|
3432
3528
|
}
|
|
@@ -3512,4 +3608,4 @@ const useUserStore = defineStore('user-store', {
|
|
|
3512
3608
|
}
|
|
3513
3609
|
});
|
|
3514
3610
|
|
|
3515
|
-
export { script$4 as ShCanvas, script$5 as ShForm, script$3 as ShModal, script$
|
|
3611
|
+
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.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Vue library for handling laravel backend",
|
|
5
5
|
"main": "dist/library.js",
|
|
6
6
|
"module": "dist/library.mjs",
|
|
@@ -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",
|