@iankibetsh/shframework 1.7.2 → 1.7.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.
@@ -110,27 +110,6 @@
110
110
  margin-right: 0.255em;
111
111
  }
112
112
 
113
- :root {
114
- --ck-z-default: 10555 !important;
115
- --ck-z-modal: calc(var(--ck-z-default) + 999) !important;
116
- }
117
- .mceToolbar td {
118
- display:table-row;
119
- float: left;
120
- }
121
- .mceToolbar td:nth-of-type(11){
122
- clear: left;
123
- }
124
-
125
- @media screen and (max-width:600px) {
126
- .sh-editor{
127
- width: 100% !important;
128
- }
129
- table.mceLayout, textarea.tinyMCE {
130
- width: 100% !important;
131
- }
132
- }
133
-
134
113
  .sh-forgot-link, .sh-register-link{
135
114
  cursor: pointer;
136
115
  }
package/dist/library.js CHANGED
@@ -7,7 +7,6 @@ var moment = require('moment');
7
7
  var Swal = require('sweetalert2');
8
8
  var NProgress = require('nprogress');
9
9
  var vue = require('vue');
10
- var Editor = require('@tinymce/tinymce-vue');
11
10
  var _ = require('lodash');
12
11
  var vueRouter = require('vue-router');
13
12
  var pinia = require('pinia');
@@ -19,7 +18,6 @@ var Axios__default = /*#__PURE__*/_interopDefaultLegacy(Axios);
19
18
  var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
20
19
  var Swal__default = /*#__PURE__*/_interopDefaultLegacy(Swal);
21
20
  var NProgress__default = /*#__PURE__*/_interopDefaultLegacy(NProgress);
22
- var Editor__default = /*#__PURE__*/_interopDefaultLegacy(Editor);
23
21
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
24
22
 
25
23
  function setItem (key, value) {
@@ -1875,7 +1873,7 @@ const countries = [
1875
1873
  }
1876
1874
  ];
1877
1875
 
1878
- var script$t = {
1876
+ var script$s = {
1879
1877
  name: 'PhoneInput',
1880
1878
  props: ['modelValue', 'country_code'],
1881
1879
  data () {
@@ -1937,7 +1935,7 @@ var script$t = {
1937
1935
  }
1938
1936
  };
1939
1937
 
1940
- const _hoisted_1$o = { class: "sh-phone mb-3" };
1938
+ const _hoisted_1$n = { class: "sh-phone mb-3" };
1941
1939
  const _hoisted_2$e = {
1942
1940
  key: 0,
1943
1941
  style: {"display":"contents"}
@@ -1945,8 +1943,8 @@ const _hoisted_2$e = {
1945
1943
  const _hoisted_3$d = ["src"];
1946
1944
  const _hoisted_4$d = ["value"];
1947
1945
 
1948
- function render$4(_ctx, _cache, $props, $setup, $data, $options) {
1949
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
1946
+ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1947
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
1950
1948
  ($data.selectedCountry)
1951
1949
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$e, [
1952
1950
  vue.createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$d),
@@ -1980,85 +1978,8 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
1980
1978
  ]))
1981
1979
  }
1982
1980
 
1983
- script$t.render = render$4;
1984
- script$t.__file = "src/lib/components/form-components/PhoneInput.vue";
1985
-
1986
- var script$s = {
1987
- name: 'ShEditor',
1988
- props: ['modelValue'],
1989
- components: {
1990
- editor: Editor__default["default"]
1991
- },
1992
- data () {
1993
- return {
1994
- editorData: this.modelValue
1995
- }
1996
- },
1997
- computed: {
1998
- value: {
1999
- get () {
2000
- return this.modelValue
2001
- },
2002
- set (value) {
2003
- this.$emit('update:modelValue', value);
2004
- }
2005
- }
2006
- },
2007
- created () {
2008
- document.addEventListener('focusin', function (e) {
2009
- const closest = e.target.closest('.tox-tinymce-aux, .tox-dialog, .moxman-window, .tam-assetmanager-root');
2010
- if (closest !== null && closest !== undefined) {
2011
- e.stopImmediatePropagation();
2012
- }
2013
- });
2014
- },
2015
- mounted () {
2016
- this.editorData = this.modelValue;
2017
- },
2018
- methods: {
2019
- updateValue: function () {
2020
- // alert('paste')
2021
- }
2022
- }
2023
- };
2024
-
2025
- const _hoisted_1$n = /*#__PURE__*/vue.createElementVNode("textarea", {
2026
- id: "tiny",
2027
- style: {"display":"none"},
2028
- "data-cy": "tinymce_editor"
2029
- }, null, -1 /* HOISTED */);
2030
-
2031
- function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2032
- const _component_editor = vue.resolveComponent("editor");
2033
-
2034
- return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
2035
- _hoisted_1$n,
2036
- vue.createElementVNode("div", {
2037
- onFocusin: _cache[1] || (_cache[1] = vue.withModifiers(() => {}, ["stop"])),
2038
- class: "sh-editor w-100"
2039
- }, [
2040
- vue.createVNode(_component_editor, {
2041
- class: "tinyEditor",
2042
- "api-key": "v5otxmculqf59xfg2bqr2ucw56cbqgbqo4x9gym2kwbv1rvi",
2043
- onInput: $options.updateValue,
2044
- onKeyup: $options.updateValue,
2045
- modelValue: $options.value,
2046
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.value) = $event)),
2047
- init: {
2048
- selector: 'textarea#tiny',
2049
- valid_children : '+body[style],+body[script]',
2050
- extended_valid_elements : '*[*]',
2051
- contextmenu: false,
2052
- plugins: 'lists link image emoticons code autolink',
2053
- toolbar: 'styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link image emoticons code'
2054
- }
2055
- }, null, 8 /* PROPS */, ["onInput", "onKeyup", "modelValue"])
2056
- ], 32 /* HYDRATE_EVENTS */)
2057
- ], 64 /* STABLE_FRAGMENT */))
2058
- }
2059
-
2060
1981
  script$s.render = render$3;
2061
- script$s.__file = "src/lib/components/form-components/ShEditor.vue";
1982
+ script$s.__file = "src/lib/components/form-components/PhoneInput.vue";
2062
1983
 
2063
1984
  const _hoisted_1$m = {
2064
1985
  key: 0,
@@ -2070,12 +1991,12 @@ const _hoisted_4$c = ["onClick"];
2070
1991
  const _hoisted_5$a = ["id"];
2071
1992
  const _hoisted_6$9 = ["id", "aria-labelledby"];
2072
1993
  const _hoisted_7$7 = { key: 0 };
2073
- const _hoisted_8$4 = ["onClick"];
2074
- const _hoisted_9$5 = {
1994
+ const _hoisted_8$5 = ["onClick"];
1995
+ const _hoisted_9$6 = {
2075
1996
  key: 1,
2076
1997
  class: "dropdown-item sh-suggest-no-results"
2077
1998
  };
2078
- const _hoisted_10$4 = {
1999
+ const _hoisted_10$5 = {
2079
2000
  key: 2,
2080
2001
  class: "dropdown-item sh-suggest-no-input"
2081
2002
  };
@@ -2206,14 +2127,14 @@ return (_ctx, _cache) => {
2206
2127
  onClick: $event => (addSuggestion(suggestion)),
2207
2128
  class: vue.normalizeClass(["dropdown-item", vue.unref(selectedSuggestions).includes(suggestion) ? 'active':'']),
2208
2129
  href: "#"
2209
- }, vue.toDisplayString(suggestion.name ?? suggestion.text), 11 /* TEXT, CLASS, PROPS */, _hoisted_8$4)
2130
+ }, vue.toDisplayString(suggestion.name ?? suggestion.text), 11 /* TEXT, CLASS, PROPS */, _hoisted_8$5)
2210
2131
  ]))
2211
2132
  : vue.createCommentVNode("v-if", true)
2212
2133
  ], 64 /* STABLE_FRAGMENT */))
2213
2134
  }), 128 /* KEYED_FRAGMENT */))
2214
2135
  : (vue.unref(searchText))
2215
- ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_9$5, " No results found "))
2216
- : (vue.openBlock(), vue.createElementBlock("li", _hoisted_10$4, " Type to search... "))
2136
+ ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_9$6, " No results found "))
2137
+ : (vue.openBlock(), vue.createElementBlock("li", _hoisted_10$5, " Type to search... "))
2217
2138
  ], 8 /* PROPS */, _hoisted_6$9)
2218
2139
  ]))
2219
2140
  : vue.createCommentVNode("v-if", true)
@@ -2228,10 +2149,9 @@ script$r.__file = "src/lib/components/form-components/ShSuggest.vue";
2228
2149
  var script$q = {
2229
2150
  name: 'ShForm',
2230
2151
  components: {
2231
- PhoneInput: script$t,
2152
+ PhoneInput: script$s,
2232
2153
  ShSuggest: script$r,
2233
- ShEditor: script$s,
2234
- ShPhone: script$t
2154
+ ShPhone: script$s
2235
2155
  },
2236
2156
  props: [
2237
2157
  'action',
@@ -2567,9 +2487,9 @@ const _hoisted_4$b = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-excla
2567
2487
  const _hoisted_5$9 = { key: 0 };
2568
2488
  const _hoisted_6$8 = { key: 1 };
2569
2489
  const _hoisted_7$6 = { class: "row" };
2570
- const _hoisted_8$3 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2571
- const _hoisted_9$4 = { class: "col-md-12" };
2572
- const _hoisted_10$3 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
2490
+ const _hoisted_8$4 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2491
+ const _hoisted_9$5 = { class: "col-md-12" };
2492
+ const _hoisted_10$4 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
2573
2493
  const _hoisted_11$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2574
2494
  const _hoisted_12$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2575
2495
  const _hoisted_13$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
@@ -2579,7 +2499,7 @@ const _hoisted_16$3 = ["name", "onFocus", "onUpdate:modelValue"];
2579
2499
  const _hoisted_17$3 = ["name", "onFocus", "onUpdate:modelValue"];
2580
2500
  const _hoisted_18$3 = ["value"];
2581
2501
  const _hoisted_19$2 = {
2582
- key: 12,
2502
+ key: 11,
2583
2503
  class: "invalid-feedback"
2584
2504
  };
2585
2505
  const _hoisted_20$2 = {
@@ -2612,7 +2532,6 @@ const _hoisted_24$1 = /*#__PURE__*/vue.createElementVNode("span", {
2612
2532
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2613
2533
  const _component_phone_input = vue.resolveComponent("phone-input");
2614
2534
  const _component_ShSuggest = vue.resolveComponent("ShSuggest");
2615
- const _component_ShEditor = vue.resolveComponent("ShEditor");
2616
2535
 
2617
2536
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
2618
2537
  _hoisted_1$l,
@@ -2640,8 +2559,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2640
2559
  class: vue.normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
2641
2560
  key: field
2642
2561
  }, [
2643
- vue.createElementVNode("label", _hoisted_8$3, vue.toDisplayString($options.getLabel(field)), 1 /* TEXT */),
2644
- vue.createElementVNode("div", _hoisted_9$4, [
2562
+ vue.createElementVNode("label", _hoisted_8$4, vue.toDisplayString($options.getLabel(field)), 1 /* TEXT */),
2563
+ vue.createElementVNode("div", _hoisted_9$5, [
2645
2564
  ($options.getFieldType(field) === 'component')
2646
2565
  ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.customComponent[field]), {
2647
2566
  key: 0,
@@ -2666,7 +2585,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2666
2585
  ref: 'file_'+field,
2667
2586
  onChange: $event => ($options.handleFileUpload(field)),
2668
2587
  type: "file"
2669
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10$3))
2588
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10$4))
2670
2589
  : vue.createCommentVNode("v-if", true),
2671
2590
  ($options.getFieldType(field) === 'numeric')
2672
2591
  ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
@@ -2747,20 +2666,9 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2747
2666
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2748
2667
  }, null, 8 /* PROPS */, ["select-data", "fill-selects", "class", "modelValue", "onUpdate:modelValue"]))
2749
2668
  : vue.createCommentVNode("v-if", true),
2750
- ($options.getFieldType(field) === 'editor')
2751
- ? (vue.openBlock(), vue.createBlock(_component_ShEditor, {
2752
- key: 8,
2753
- placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2754
- name: field,
2755
- onFocus: $event => ($options.removeErrors(field)),
2756
- class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2757
- modelValue: _ctx.form_elements[field],
2758
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2759
- }, null, 8 /* PROPS */, ["placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
2760
- : vue.createCommentVNode("v-if", true),
2761
2669
  ($options.getFieldType(field) === 'text')
2762
2670
  ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
2763
- key: 9,
2671
+ key: 8,
2764
2672
  disabled: $options.isDisabled(field),
2765
2673
  placeholder: field === 'phone_number' ? 'e.g 0712 345 678':'',
2766
2674
  name: field,
@@ -2774,7 +2682,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2774
2682
  : vue.createCommentVNode("v-if", true),
2775
2683
  ($options.getFieldType(field) === 'textarea')
2776
2684
  ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", {
2777
- key: 10,
2685
+ key: 9,
2778
2686
  name: field,
2779
2687
  onFocus: $event => ($options.removeErrors(field)),
2780
2688
  class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
@@ -2785,7 +2693,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2785
2693
  : vue.createCommentVNode("v-if", true),
2786
2694
  ($options.getFieldType(field) === 'select')
2787
2695
  ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
2788
- key: 11,
2696
+ key: 10,
2789
2697
  name: field,
2790
2698
  onFocus: $event => ($options.removeErrors(field)),
2791
2699
  class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
@@ -3146,7 +3054,7 @@ const getFieldComponent = (fieldObj)=>{
3146
3054
  const TextComponent = formComponents.text ?? script$n;
3147
3055
  const TextAreaComponent = formComponents.textArea ?? script$m;
3148
3056
  const EmailComponent = formComponents.email ?? script$p;
3149
- const PhoneComponent = formComponents.phone ?? script$t;
3057
+ const PhoneComponent = formComponents.phone ?? script$s;
3150
3058
  const NumberComponent = formComponents.number ?? script$o;
3151
3059
  const SelectComponent = formComponents.select ?? script$l;
3152
3060
  const PasswordComponent = formComponents.password ?? script$k;
@@ -3167,7 +3075,7 @@ const getFieldComponent = (fieldObj)=>{
3167
3075
  return formComponents.email ?? script$p
3168
3076
  } else
3169
3077
  if((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)){
3170
- return formComponents.phone ?? script$t
3078
+ return formComponents.phone ?? script$s
3171
3079
  } else
3172
3080
  if((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)){
3173
3081
  return formComponents.number ?? script$o
@@ -3758,10 +3666,10 @@ const _hoisted_1$c = { key: 0 };
3758
3666
  const _hoisted_2$7 = { class: "record_count_body mb-3" };
3759
3667
  const _hoisted_3$7 = /*#__PURE__*/vue.createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
3760
3668
  const _hoisted_4$7 = /*#__PURE__*/vue.createStaticVNode("<option value=\"10\">10</option><option value=\"25\">25</option><option value=\"50\">50</option><option value=\"100\">100</option><option value=\"200\">200</option>", 5);
3761
- const _hoisted_9$3 = [
3669
+ const _hoisted_9$4 = [
3762
3670
  _hoisted_4$7
3763
3671
  ];
3764
- const _hoisted_10$2 = { class: "record_counts" };
3672
+ const _hoisted_10$3 = { class: "record_counts" };
3765
3673
  const _hoisted_11$2 = {
3766
3674
  key: 0,
3767
3675
  "aria-label": "Page navigation"
@@ -3808,10 +3716,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3808
3716
  class: "select_per_page",
3809
3717
  onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
3810
3718
  "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.per_page) = $event))
3811
- }, _hoisted_9$3, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
3719
+ }, _hoisted_9$4, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
3812
3720
  [vue.vModelSelect, $data.per_page]
3813
3721
  ]),
3814
- vue.createElementVNode("span", _hoisted_10$2, " of " + vue.toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
3722
+ vue.createElementVNode("span", _hoisted_10$3, " of " + vue.toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
3815
3723
  ]),
3816
3724
  ($props.pagination_data != null)
3817
3725
  ? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_11$2, [
@@ -4345,9 +4253,9 @@ const _hoisted_7$3 = {
4345
4253
  key: 1,
4346
4254
  class: "row"
4347
4255
  };
4348
- const _hoisted_8$2 = { class: "col-12 mb-3" };
4349
- const _hoisted_9$2 = { class: "sh-search-bar" };
4350
- const _hoisted_10$1 = ["placeholder"];
4256
+ const _hoisted_8$3 = { class: "col-12 mb-3" };
4257
+ const _hoisted_9$3 = { class: "sh-search-bar" };
4258
+ const _hoisted_10$2 = ["placeholder"];
4351
4259
  const _hoisted_11$1 = {
4352
4260
  key: 0,
4353
4261
  class: "text-center"
@@ -4513,8 +4421,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4513
4421
  : vue.createCommentVNode("v-if", true),
4514
4422
  (!$props.hideSearch)
4515
4423
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$3, [
4516
- vue.createElementVNode("div", _hoisted_8$2, [
4517
- vue.createElementVNode("div", _hoisted_9$2, [
4424
+ vue.createElementVNode("div", _hoisted_8$3, [
4425
+ vue.createElementVNode("div", _hoisted_9$3, [
4518
4426
  vue.withDirectives(vue.createElementVNode("input", {
4519
4427
  onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.userTyping && $options.userTyping(...args))),
4520
4428
  onKeyup: _cache[2] || (_cache[2] = (...args) => ($options.userTyping && $options.userTyping(...args))),
@@ -4523,7 +4431,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4523
4431
  "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => (($data.filter_value) = $event)),
4524
4432
  placeholder: $props.searchPlaceholder ? $props.searchPlaceholder : 'Search',
4525
4433
  class: "form-control sh-search-input"
4526
- }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10$1), [
4434
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10$2), [
4527
4435
  [vue.vModelText, $data.filter_value]
4528
4436
  ])
4529
4437
  ])
@@ -5334,12 +5242,12 @@ const _hoisted_6$3 = {
5334
5242
  class: "d-flex flex-column w-100 px-2"
5335
5243
  };
5336
5244
  const _hoisted_7$2 = ["checked", "disabled"];
5337
- const _hoisted_8$1 = ["onClick"];
5338
- const _hoisted_9$1 = {
5245
+ const _hoisted_8$2 = ["onClick"];
5246
+ const _hoisted_9$2 = {
5339
5247
  id: "permissions-content",
5340
5248
  class: "col-md-9 py-4 px-4"
5341
5249
  };
5342
- const _hoisted_10 = { class: "p-2 rounded-2 bg-white h-100" };
5250
+ const _hoisted_10$1 = { class: "p-2 rounded-2 bg-white h-100" };
5343
5251
  const _hoisted_11 = {
5344
5252
  key: 0,
5345
5253
  class: "alert alert-info"
@@ -5478,13 +5386,13 @@ return (_ctx, _cache) => {
5478
5386
  vue.createElementVNode("label", {
5479
5387
  class: "text-capitalize",
5480
5388
  onClick: $event => (setModule(module))
5481
- }, vue.toDisplayString(module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_8$1)
5389
+ }, vue.toDisplayString(module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_8$2)
5482
5390
  ], 2 /* CLASS */))
5483
5391
  }), 128 /* KEYED_FRAGMENT */))
5484
5392
  ]))
5485
5393
  ]),
5486
- vue.createElementVNode("div", _hoisted_9$1, [
5487
- vue.createElementVNode("div", _hoisted_10, [
5394
+ vue.createElementVNode("div", _hoisted_9$2, [
5395
+ vue.createElementVNode("div", _hoisted_10$1, [
5488
5396
  (loading.value)
5489
5397
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, " loading ... "))
5490
5398
  : (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
@@ -5675,6 +5583,9 @@ const _hoisted_6$2 = {
5675
5583
  "aria-labelledby": "dropdownMenuLink"
5676
5584
  };
5677
5585
  const _hoisted_7$1 = ["onClick"];
5586
+ const _hoisted_8$1 = { class: "border-top" };
5587
+ const _hoisted_9$1 = { class: "dropdown-item d-flex flex-column" };
5588
+ const _hoisted_10 = /*#__PURE__*/vue.createElementVNode("span", null, "Custom", -1 /* HOISTED */);
5678
5589
 
5679
5590
 
5680
5591
 
@@ -5702,6 +5613,13 @@ const props = __props;
5702
5613
  const selectedDate = vue.ref(null);
5703
5614
  const rangeLabel = vue.ref(null);
5704
5615
  vue.ref(false);
5616
+ const customFrom = vue.ref(null);
5617
+ const customTo = vue.ref(null);
5618
+
5619
+ const applyCustom = ()=>{
5620
+ const date = [moment__default["default"](customFrom.value),moment__default["default"](customTo.value)];
5621
+ setDate(date,'Custom');
5622
+ };
5705
5623
 
5706
5624
  const dates = vue.ref([
5707
5625
  {
@@ -5725,8 +5643,16 @@ const dates = vue.ref([
5725
5643
  value: [moment__default["default"]().subtract(1, 'month').startOf('month'), moment__default["default"]().subtract(1, 'month').endOf('month')]
5726
5644
  },
5727
5645
  {
5728
- label: '1 Month',
5729
- value: [moment__default["default"]().subtract(29, 'days'), moment__default["default"]()]
5646
+ label: 'Last 30 days',
5647
+ value: [moment__default["default"]().subtract(30, 'days'), moment__default["default"]()]
5648
+ },
5649
+ {
5650
+ label: 'Last 60 days',
5651
+ value: [moment__default["default"]().subtract(60, 'days'), moment__default["default"]()]
5652
+ },
5653
+ {
5654
+ label: 'Last 90 days',
5655
+ value: [moment__default["default"]().subtract(90, 'days'), moment__default["default"]()]
5730
5656
  },
5731
5657
  {
5732
5658
  label: '1 Year',
@@ -5785,15 +5711,32 @@ return (_ctx, _cache) => {
5785
5711
  }, vue.toDisplayString(date.label), 3 /* TEXT, CLASS */)
5786
5712
  ], 8 /* PROPS */, _hoisted_7$1))
5787
5713
  }), 128 /* KEYED_FRAGMENT */)),
5788
- vue.createCommentVNode(" <li>"),
5789
- vue.createCommentVNode(" <div class=\"dropdown-item\">"),
5790
- vue.createCommentVNode(" <div @clik=\"showCustom = true\">Custom</div>"),
5791
- vue.createCommentVNode(" <div v-if=\"showCustom\">"),
5792
- vue.createCommentVNode(" <input type=\"date\">"),
5793
- vue.createCommentVNode(" <input type=\"date\">"),
5794
- vue.createCommentVNode(" </div>"),
5795
- vue.createCommentVNode(" </div>"),
5796
- vue.createCommentVNode(" </li>")
5714
+ vue.createElementVNode("li", _hoisted_8$1, [
5715
+ vue.createElementVNode("div", _hoisted_9$1, [
5716
+ _hoisted_10,
5717
+ vue.createElementVNode("div", null, [
5718
+ vue.withDirectives(vue.createElementVNode("input", {
5719
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((customFrom).value = $event)),
5720
+ type: "date"
5721
+ }, null, 512 /* NEED_PATCH */), [
5722
+ [vue.vModelText, customFrom.value]
5723
+ ]),
5724
+ vue.withDirectives(vue.createElementVNode("input", {
5725
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((customTo).value = $event)),
5726
+ type: "date"
5727
+ }, null, 512 /* NEED_PATCH */), [
5728
+ [vue.vModelText, customTo.value]
5729
+ ])
5730
+ ]),
5731
+ (customFrom.value && customTo.value)
5732
+ ? (vue.openBlock(), vue.createElementBlock("button", {
5733
+ key: 0,
5734
+ class: "btn btn-sm btn-info mt-1",
5735
+ onClick: applyCustom
5736
+ }, "Apply"))
5737
+ : vue.createCommentVNode("v-if", true)
5738
+ ])
5739
+ ])
5797
5740
  ])
5798
5741
  ])
5799
5742
  ]))
@@ -6292,7 +6235,7 @@ exports.ShModal = script$h;
6292
6235
  exports.ShModalBtn = script$7;
6293
6236
  exports.ShModalForm = script$g;
6294
6237
  exports.ShModalFormAuto = script$f;
6295
- exports.ShPhone = script$t;
6238
+ exports.ShPhone = script$s;
6296
6239
  exports.ShPopups = script$4;
6297
6240
  exports.ShRange = script$3;
6298
6241
  exports.ShSilentAction = script$b;
package/dist/library.mjs CHANGED
@@ -2,8 +2,7 @@ import Axios from 'axios';
2
2
  import moment from 'moment';
3
3
  import Swal from 'sweetalert2';
4
4
  import NProgress from 'nprogress';
5
- import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, ref, onMounted, unref, normalizeClass, createBlock, resolveDynamicComponent, inject, watch, mergeProps, normalizeStyle, renderSlot, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, shallowRef, vModelCheckbox, pushScopeId, popScopeId, markRaw, computed, isRef } from 'vue';
6
- import Editor from '@tinymce/tinymce-vue';
5
+ import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, unref, normalizeClass, resolveComponent, createBlock, resolveDynamicComponent, inject, watch, mergeProps, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, shallowRef, vModelCheckbox, pushScopeId, popScopeId, markRaw, computed, isRef } from 'vue';
7
6
  import _ from 'lodash';
8
7
  import { useRoute, useRouter } from 'vue-router';
9
8
  import { defineStore, storeToRefs } from 'pinia';
@@ -1862,7 +1861,7 @@ const countries = [
1862
1861
  }
1863
1862
  ];
1864
1863
 
1865
- var script$t = {
1864
+ var script$s = {
1866
1865
  name: 'PhoneInput',
1867
1866
  props: ['modelValue', 'country_code'],
1868
1867
  data () {
@@ -1924,7 +1923,7 @@ var script$t = {
1924
1923
  }
1925
1924
  };
1926
1925
 
1927
- const _hoisted_1$o = { class: "sh-phone mb-3" };
1926
+ const _hoisted_1$n = { class: "sh-phone mb-3" };
1928
1927
  const _hoisted_2$e = {
1929
1928
  key: 0,
1930
1929
  style: {"display":"contents"}
@@ -1932,8 +1931,8 @@ const _hoisted_2$e = {
1932
1931
  const _hoisted_3$d = ["src"];
1933
1932
  const _hoisted_4$d = ["value"];
1934
1933
 
1935
- function render$4(_ctx, _cache, $props, $setup, $data, $options) {
1936
- return (openBlock(), createElementBlock("div", _hoisted_1$o, [
1934
+ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1935
+ return (openBlock(), createElementBlock("div", _hoisted_1$n, [
1937
1936
  ($data.selectedCountry)
1938
1937
  ? (openBlock(), createElementBlock("div", _hoisted_2$e, [
1939
1938
  createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$d),
@@ -1967,85 +1966,8 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
1967
1966
  ]))
1968
1967
  }
1969
1968
 
1970
- script$t.render = render$4;
1971
- script$t.__file = "src/lib/components/form-components/PhoneInput.vue";
1972
-
1973
- var script$s = {
1974
- name: 'ShEditor',
1975
- props: ['modelValue'],
1976
- components: {
1977
- editor: Editor
1978
- },
1979
- data () {
1980
- return {
1981
- editorData: this.modelValue
1982
- }
1983
- },
1984
- computed: {
1985
- value: {
1986
- get () {
1987
- return this.modelValue
1988
- },
1989
- set (value) {
1990
- this.$emit('update:modelValue', value);
1991
- }
1992
- }
1993
- },
1994
- created () {
1995
- document.addEventListener('focusin', function (e) {
1996
- const closest = e.target.closest('.tox-tinymce-aux, .tox-dialog, .moxman-window, .tam-assetmanager-root');
1997
- if (closest !== null && closest !== undefined) {
1998
- e.stopImmediatePropagation();
1999
- }
2000
- });
2001
- },
2002
- mounted () {
2003
- this.editorData = this.modelValue;
2004
- },
2005
- methods: {
2006
- updateValue: function () {
2007
- // alert('paste')
2008
- }
2009
- }
2010
- };
2011
-
2012
- const _hoisted_1$n = /*#__PURE__*/createElementVNode("textarea", {
2013
- id: "tiny",
2014
- style: {"display":"none"},
2015
- "data-cy": "tinymce_editor"
2016
- }, null, -1 /* HOISTED */);
2017
-
2018
- function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2019
- const _component_editor = resolveComponent("editor");
2020
-
2021
- return (openBlock(), createElementBlock(Fragment, null, [
2022
- _hoisted_1$n,
2023
- createElementVNode("div", {
2024
- onFocusin: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
2025
- class: "sh-editor w-100"
2026
- }, [
2027
- createVNode(_component_editor, {
2028
- class: "tinyEditor",
2029
- "api-key": "v5otxmculqf59xfg2bqr2ucw56cbqgbqo4x9gym2kwbv1rvi",
2030
- onInput: $options.updateValue,
2031
- onKeyup: $options.updateValue,
2032
- modelValue: $options.value,
2033
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.value) = $event)),
2034
- init: {
2035
- selector: 'textarea#tiny',
2036
- valid_children : '+body[style],+body[script]',
2037
- extended_valid_elements : '*[*]',
2038
- contextmenu: false,
2039
- plugins: 'lists link image emoticons code autolink',
2040
- toolbar: 'styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link image emoticons code'
2041
- }
2042
- }, null, 8 /* PROPS */, ["onInput", "onKeyup", "modelValue"])
2043
- ], 32 /* HYDRATE_EVENTS */)
2044
- ], 64 /* STABLE_FRAGMENT */))
2045
- }
2046
-
2047
1969
  script$s.render = render$3;
2048
- script$s.__file = "src/lib/components/form-components/ShEditor.vue";
1970
+ script$s.__file = "src/lib/components/form-components/PhoneInput.vue";
2049
1971
 
2050
1972
  const _hoisted_1$m = {
2051
1973
  key: 0,
@@ -2057,12 +1979,12 @@ const _hoisted_4$c = ["onClick"];
2057
1979
  const _hoisted_5$a = ["id"];
2058
1980
  const _hoisted_6$9 = ["id", "aria-labelledby"];
2059
1981
  const _hoisted_7$7 = { key: 0 };
2060
- const _hoisted_8$4 = ["onClick"];
2061
- const _hoisted_9$5 = {
1982
+ const _hoisted_8$5 = ["onClick"];
1983
+ const _hoisted_9$6 = {
2062
1984
  key: 1,
2063
1985
  class: "dropdown-item sh-suggest-no-results"
2064
1986
  };
2065
- const _hoisted_10$4 = {
1987
+ const _hoisted_10$5 = {
2066
1988
  key: 2,
2067
1989
  class: "dropdown-item sh-suggest-no-input"
2068
1990
  };
@@ -2193,14 +2115,14 @@ return (_ctx, _cache) => {
2193
2115
  onClick: $event => (addSuggestion(suggestion)),
2194
2116
  class: normalizeClass(["dropdown-item", unref(selectedSuggestions).includes(suggestion) ? 'active':'']),
2195
2117
  href: "#"
2196
- }, toDisplayString(suggestion.name ?? suggestion.text), 11 /* TEXT, CLASS, PROPS */, _hoisted_8$4)
2118
+ }, toDisplayString(suggestion.name ?? suggestion.text), 11 /* TEXT, CLASS, PROPS */, _hoisted_8$5)
2197
2119
  ]))
2198
2120
  : createCommentVNode("v-if", true)
2199
2121
  ], 64 /* STABLE_FRAGMENT */))
2200
2122
  }), 128 /* KEYED_FRAGMENT */))
2201
2123
  : (unref(searchText))
2202
- ? (openBlock(), createElementBlock("li", _hoisted_9$5, " No results found "))
2203
- : (openBlock(), createElementBlock("li", _hoisted_10$4, " Type to search... "))
2124
+ ? (openBlock(), createElementBlock("li", _hoisted_9$6, " No results found "))
2125
+ : (openBlock(), createElementBlock("li", _hoisted_10$5, " Type to search... "))
2204
2126
  ], 8 /* PROPS */, _hoisted_6$9)
2205
2127
  ]))
2206
2128
  : createCommentVNode("v-if", true)
@@ -2215,10 +2137,9 @@ script$r.__file = "src/lib/components/form-components/ShSuggest.vue";
2215
2137
  var script$q = {
2216
2138
  name: 'ShForm',
2217
2139
  components: {
2218
- PhoneInput: script$t,
2140
+ PhoneInput: script$s,
2219
2141
  ShSuggest: script$r,
2220
- ShEditor: script$s,
2221
- ShPhone: script$t
2142
+ ShPhone: script$s
2222
2143
  },
2223
2144
  props: [
2224
2145
  'action',
@@ -2554,9 +2475,9 @@ const _hoisted_4$b = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamati
2554
2475
  const _hoisted_5$9 = { key: 0 };
2555
2476
  const _hoisted_6$8 = { key: 1 };
2556
2477
  const _hoisted_7$6 = { class: "row" };
2557
- const _hoisted_8$3 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2558
- const _hoisted_9$4 = { class: "col-md-12" };
2559
- const _hoisted_10$3 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
2478
+ const _hoisted_8$4 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2479
+ const _hoisted_9$5 = { class: "col-md-12" };
2480
+ const _hoisted_10$4 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
2560
2481
  const _hoisted_11$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2561
2482
  const _hoisted_12$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2562
2483
  const _hoisted_13$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
@@ -2566,7 +2487,7 @@ const _hoisted_16$3 = ["name", "onFocus", "onUpdate:modelValue"];
2566
2487
  const _hoisted_17$3 = ["name", "onFocus", "onUpdate:modelValue"];
2567
2488
  const _hoisted_18$3 = ["value"];
2568
2489
  const _hoisted_19$2 = {
2569
- key: 12,
2490
+ key: 11,
2570
2491
  class: "invalid-feedback"
2571
2492
  };
2572
2493
  const _hoisted_20$2 = {
@@ -2599,7 +2520,6 @@ const _hoisted_24$1 = /*#__PURE__*/createElementVNode("span", {
2599
2520
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2600
2521
  const _component_phone_input = resolveComponent("phone-input");
2601
2522
  const _component_ShSuggest = resolveComponent("ShSuggest");
2602
- const _component_ShEditor = resolveComponent("ShEditor");
2603
2523
 
2604
2524
  return (openBlock(), createElementBlock(Fragment, null, [
2605
2525
  _hoisted_1$l,
@@ -2627,8 +2547,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2627
2547
  class: normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
2628
2548
  key: field
2629
2549
  }, [
2630
- createElementVNode("label", _hoisted_8$3, toDisplayString($options.getLabel(field)), 1 /* TEXT */),
2631
- createElementVNode("div", _hoisted_9$4, [
2550
+ createElementVNode("label", _hoisted_8$4, toDisplayString($options.getLabel(field)), 1 /* TEXT */),
2551
+ createElementVNode("div", _hoisted_9$5, [
2632
2552
  ($options.getFieldType(field) === 'component')
2633
2553
  ? (openBlock(), createBlock(resolveDynamicComponent($props.customComponent[field]), {
2634
2554
  key: 0,
@@ -2653,7 +2573,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2653
2573
  ref: 'file_'+field,
2654
2574
  onChange: $event => ($options.handleFileUpload(field)),
2655
2575
  type: "file"
2656
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10$3))
2576
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10$4))
2657
2577
  : createCommentVNode("v-if", true),
2658
2578
  ($options.getFieldType(field) === 'numeric')
2659
2579
  ? withDirectives((openBlock(), createElementBlock("input", {
@@ -2734,20 +2654,9 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2734
2654
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2735
2655
  }, null, 8 /* PROPS */, ["select-data", "fill-selects", "class", "modelValue", "onUpdate:modelValue"]))
2736
2656
  : createCommentVNode("v-if", true),
2737
- ($options.getFieldType(field) === 'editor')
2738
- ? (openBlock(), createBlock(_component_ShEditor, {
2739
- key: 8,
2740
- placeholder: _ctx.allPlaceHolders[field] ? _ctx.allPlaceHolders[field] : '',
2741
- name: field,
2742
- onFocus: $event => ($options.removeErrors(field)),
2743
- class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2744
- modelValue: _ctx.form_elements[field],
2745
- "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2746
- }, null, 8 /* PROPS */, ["placeholder", "name", "onFocus", "class", "modelValue", "onUpdate:modelValue"]))
2747
- : createCommentVNode("v-if", true),
2748
2657
  ($options.getFieldType(field) === 'text')
2749
2658
  ? withDirectives((openBlock(), createElementBlock("input", {
2750
- key: 9,
2659
+ key: 8,
2751
2660
  disabled: $options.isDisabled(field),
2752
2661
  placeholder: field === 'phone_number' ? 'e.g 0712 345 678':'',
2753
2662
  name: field,
@@ -2761,7 +2670,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2761
2670
  : createCommentVNode("v-if", true),
2762
2671
  ($options.getFieldType(field) === 'textarea')
2763
2672
  ? withDirectives((openBlock(), createElementBlock("textarea", {
2764
- key: 10,
2673
+ key: 9,
2765
2674
  name: field,
2766
2675
  onFocus: $event => ($options.removeErrors(field)),
2767
2676
  class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
@@ -2772,7 +2681,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2772
2681
  : createCommentVNode("v-if", true),
2773
2682
  ($options.getFieldType(field) === 'select')
2774
2683
  ? withDirectives((openBlock(), createElementBlock("select", {
2775
- key: 11,
2684
+ key: 10,
2776
2685
  name: field,
2777
2686
  onFocus: $event => ($options.removeErrors(field)),
2778
2687
  class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
@@ -3133,7 +3042,7 @@ const getFieldComponent = (fieldObj)=>{
3133
3042
  const TextComponent = formComponents.text ?? script$n;
3134
3043
  const TextAreaComponent = formComponents.textArea ?? script$m;
3135
3044
  const EmailComponent = formComponents.email ?? script$p;
3136
- const PhoneComponent = formComponents.phone ?? script$t;
3045
+ const PhoneComponent = formComponents.phone ?? script$s;
3137
3046
  const NumberComponent = formComponents.number ?? script$o;
3138
3047
  const SelectComponent = formComponents.select ?? script$l;
3139
3048
  const PasswordComponent = formComponents.password ?? script$k;
@@ -3154,7 +3063,7 @@ const getFieldComponent = (fieldObj)=>{
3154
3063
  return formComponents.email ?? script$p
3155
3064
  } else
3156
3065
  if((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)){
3157
- return formComponents.phone ?? script$t
3066
+ return formComponents.phone ?? script$s
3158
3067
  } else
3159
3068
  if((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)){
3160
3069
  return formComponents.number ?? script$o
@@ -3745,10 +3654,10 @@ const _hoisted_1$c = { key: 0 };
3745
3654
  const _hoisted_2$7 = { class: "record_count_body mb-3" };
3746
3655
  const _hoisted_3$7 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
3747
3656
  const _hoisted_4$7 = /*#__PURE__*/createStaticVNode("<option value=\"10\">10</option><option value=\"25\">25</option><option value=\"50\">50</option><option value=\"100\">100</option><option value=\"200\">200</option>", 5);
3748
- const _hoisted_9$3 = [
3657
+ const _hoisted_9$4 = [
3749
3658
  _hoisted_4$7
3750
3659
  ];
3751
- const _hoisted_10$2 = { class: "record_counts" };
3660
+ const _hoisted_10$3 = { class: "record_counts" };
3752
3661
  const _hoisted_11$2 = {
3753
3662
  key: 0,
3754
3663
  "aria-label": "Page navigation"
@@ -3795,10 +3704,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3795
3704
  class: "select_per_page",
3796
3705
  onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
3797
3706
  "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.per_page) = $event))
3798
- }, _hoisted_9$3, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
3707
+ }, _hoisted_9$4, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
3799
3708
  [vModelSelect, $data.per_page]
3800
3709
  ]),
3801
- createElementVNode("span", _hoisted_10$2, " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
3710
+ createElementVNode("span", _hoisted_10$3, " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
3802
3711
  ]),
3803
3712
  ($props.pagination_data != null)
3804
3713
  ? (openBlock(), createElementBlock("nav", _hoisted_11$2, [
@@ -4332,9 +4241,9 @@ const _hoisted_7$3 = {
4332
4241
  key: 1,
4333
4242
  class: "row"
4334
4243
  };
4335
- const _hoisted_8$2 = { class: "col-12 mb-3" };
4336
- const _hoisted_9$2 = { class: "sh-search-bar" };
4337
- const _hoisted_10$1 = ["placeholder"];
4244
+ const _hoisted_8$3 = { class: "col-12 mb-3" };
4245
+ const _hoisted_9$3 = { class: "sh-search-bar" };
4246
+ const _hoisted_10$2 = ["placeholder"];
4338
4247
  const _hoisted_11$1 = {
4339
4248
  key: 0,
4340
4249
  class: "text-center"
@@ -4500,8 +4409,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4500
4409
  : createCommentVNode("v-if", true),
4501
4410
  (!$props.hideSearch)
4502
4411
  ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
4503
- createElementVNode("div", _hoisted_8$2, [
4504
- createElementVNode("div", _hoisted_9$2, [
4412
+ createElementVNode("div", _hoisted_8$3, [
4413
+ createElementVNode("div", _hoisted_9$3, [
4505
4414
  withDirectives(createElementVNode("input", {
4506
4415
  onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.userTyping && $options.userTyping(...args))),
4507
4416
  onKeyup: _cache[2] || (_cache[2] = (...args) => ($options.userTyping && $options.userTyping(...args))),
@@ -4510,7 +4419,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4510
4419
  "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => (($data.filter_value) = $event)),
4511
4420
  placeholder: $props.searchPlaceholder ? $props.searchPlaceholder : 'Search',
4512
4421
  class: "form-control sh-search-input"
4513
- }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10$1), [
4422
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10$2), [
4514
4423
  [vModelText, $data.filter_value]
4515
4424
  ])
4516
4425
  ])
@@ -5321,12 +5230,12 @@ const _hoisted_6$3 = {
5321
5230
  class: "d-flex flex-column w-100 px-2"
5322
5231
  };
5323
5232
  const _hoisted_7$2 = ["checked", "disabled"];
5324
- const _hoisted_8$1 = ["onClick"];
5325
- const _hoisted_9$1 = {
5233
+ const _hoisted_8$2 = ["onClick"];
5234
+ const _hoisted_9$2 = {
5326
5235
  id: "permissions-content",
5327
5236
  class: "col-md-9 py-4 px-4"
5328
5237
  };
5329
- const _hoisted_10 = { class: "p-2 rounded-2 bg-white h-100" };
5238
+ const _hoisted_10$1 = { class: "p-2 rounded-2 bg-white h-100" };
5330
5239
  const _hoisted_11 = {
5331
5240
  key: 0,
5332
5241
  class: "alert alert-info"
@@ -5465,13 +5374,13 @@ return (_ctx, _cache) => {
5465
5374
  createElementVNode("label", {
5466
5375
  class: "text-capitalize",
5467
5376
  onClick: $event => (setModule(module))
5468
- }, toDisplayString(module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_8$1)
5377
+ }, toDisplayString(module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_8$2)
5469
5378
  ], 2 /* CLASS */))
5470
5379
  }), 128 /* KEYED_FRAGMENT */))
5471
5380
  ]))
5472
5381
  ]),
5473
- createElementVNode("div", _hoisted_9$1, [
5474
- createElementVNode("div", _hoisted_10, [
5382
+ createElementVNode("div", _hoisted_9$2, [
5383
+ createElementVNode("div", _hoisted_10$1, [
5475
5384
  (loading.value)
5476
5385
  ? (openBlock(), createElementBlock("div", _hoisted_11, " loading ... "))
5477
5386
  : (openBlock(), createElementBlock("div", _hoisted_12, [
@@ -5662,6 +5571,9 @@ const _hoisted_6$2 = {
5662
5571
  "aria-labelledby": "dropdownMenuLink"
5663
5572
  };
5664
5573
  const _hoisted_7$1 = ["onClick"];
5574
+ const _hoisted_8$1 = { class: "border-top" };
5575
+ const _hoisted_9$1 = { class: "dropdown-item d-flex flex-column" };
5576
+ const _hoisted_10 = /*#__PURE__*/createElementVNode("span", null, "Custom", -1 /* HOISTED */);
5665
5577
 
5666
5578
 
5667
5579
 
@@ -5689,6 +5601,13 @@ const props = __props;
5689
5601
  const selectedDate = ref(null);
5690
5602
  const rangeLabel = ref(null);
5691
5603
  ref(false);
5604
+ const customFrom = ref(null);
5605
+ const customTo = ref(null);
5606
+
5607
+ const applyCustom = ()=>{
5608
+ const date = [moment(customFrom.value),moment(customTo.value)];
5609
+ setDate(date,'Custom');
5610
+ };
5692
5611
 
5693
5612
  const dates = ref([
5694
5613
  {
@@ -5712,8 +5631,16 @@ const dates = ref([
5712
5631
  value: [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
5713
5632
  },
5714
5633
  {
5715
- label: '1 Month',
5716
- value: [moment().subtract(29, 'days'), moment()]
5634
+ label: 'Last 30 days',
5635
+ value: [moment().subtract(30, 'days'), moment()]
5636
+ },
5637
+ {
5638
+ label: 'Last 60 days',
5639
+ value: [moment().subtract(60, 'days'), moment()]
5640
+ },
5641
+ {
5642
+ label: 'Last 90 days',
5643
+ value: [moment().subtract(90, 'days'), moment()]
5717
5644
  },
5718
5645
  {
5719
5646
  label: '1 Year',
@@ -5772,15 +5699,32 @@ return (_ctx, _cache) => {
5772
5699
  }, toDisplayString(date.label), 3 /* TEXT, CLASS */)
5773
5700
  ], 8 /* PROPS */, _hoisted_7$1))
5774
5701
  }), 128 /* KEYED_FRAGMENT */)),
5775
- createCommentVNode(" <li>"),
5776
- createCommentVNode(" <div class=\"dropdown-item\">"),
5777
- createCommentVNode(" <div @clik=\"showCustom = true\">Custom</div>"),
5778
- createCommentVNode(" <div v-if=\"showCustom\">"),
5779
- createCommentVNode(" <input type=\"date\">"),
5780
- createCommentVNode(" <input type=\"date\">"),
5781
- createCommentVNode(" </div>"),
5782
- createCommentVNode(" </div>"),
5783
- createCommentVNode(" </li>")
5702
+ createElementVNode("li", _hoisted_8$1, [
5703
+ createElementVNode("div", _hoisted_9$1, [
5704
+ _hoisted_10,
5705
+ createElementVNode("div", null, [
5706
+ withDirectives(createElementVNode("input", {
5707
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((customFrom).value = $event)),
5708
+ type: "date"
5709
+ }, null, 512 /* NEED_PATCH */), [
5710
+ [vModelText, customFrom.value]
5711
+ ]),
5712
+ withDirectives(createElementVNode("input", {
5713
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((customTo).value = $event)),
5714
+ type: "date"
5715
+ }, null, 512 /* NEED_PATCH */), [
5716
+ [vModelText, customTo.value]
5717
+ ])
5718
+ ]),
5719
+ (customFrom.value && customTo.value)
5720
+ ? (openBlock(), createElementBlock("button", {
5721
+ key: 0,
5722
+ class: "btn btn-sm btn-info mt-1",
5723
+ onClick: applyCustom
5724
+ }, "Apply"))
5725
+ : createCommentVNode("v-if", true)
5726
+ ])
5727
+ ])
5784
5728
  ])
5785
5729
  ])
5786
5730
  ]))
@@ -6265,4 +6209,4 @@ const ShFrontend = {
6265
6209
  }
6266
6210
  };
6267
6211
 
6268
- export { countries as Countries, script$5 as ManagePermissions, script$j as ShAutoForm, script$e as ShCanvas, script$6 as ShCanvasBtn, script$c as ShConfirmAction, script$i as ShDropDownForm, script$8 as ShDynamicTabs, script$q as ShForm, ShFrontend, script$h as ShModal, script$7 as ShModalBtn, script$g as ShModalForm, script$f as ShModalFormAuto, script$t as ShPhone, script$4 as ShPopups, script$3 as ShRange, script$b as ShSilentAction, script$a as ShTable, script$9 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
6212
+ export { countries as Countries, script$5 as ManagePermissions, script$j as ShAutoForm, script$e as ShCanvas, script$6 as ShCanvasBtn, script$c as ShConfirmAction, script$i as ShDropDownForm, script$8 as ShDynamicTabs, script$q as ShForm, ShFrontend, script$h as ShModal, script$7 as ShModalBtn, script$g as ShModalForm, script$f as ShModalFormAuto, script$s as ShPhone, script$4 as ShPopups, script$3 as ShRange, script$b as ShSilentAction, script$a as ShTable, script$9 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.7.2",
3
+ "version": "1.7.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,6 @@
22
22
  "author": "",
23
23
  "license": "ISC",
24
24
  "peerDependencies": {
25
- "@tinymce/tinymce-vue": "^4.0.7",
26
25
  "axios": "^0.27.2",
27
26
  "bootstrap": "^5.2.0",
28
27
  "bootstrap-icons": "^1.9.1",