@iankibetsh/shframework 5.9.1 → 5.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -66,6 +66,7 @@ The flagship component for generating complex forms from simple configurations.
66
66
  - **Auto-Detection**: Infers input types from field names (email, phone, date, etc.).
67
67
  - **Multi-Step Support**: Break long forms into logical steps with progress indicators.
68
68
  - **Validation**: Seamlessly handles and displays Laravel validation errors (422).
69
+ - **Conditional Visibility**: Hide the submit button using `:hide-submit-button="true"`.
69
70
  - **Modern Reactivity**: Built using Vue 3.4's `defineModel` for clean, conflict-free two-way binding.
70
71
 
71
72
  ```html
@@ -1,36 +1,4 @@
1
1
 
2
- .sh-phone{
3
- display: flex;
4
- width: 100%;
5
- align-items: center;
6
- padding: 0 0.25rem;
7
- }
8
- .phone-country{
9
- width: 2rem;
10
- border: none;
11
- align-self: center;
12
- outline: none !important;
13
- padding: 0.4rem;
14
- border-right: 1px solid #0003;
15
- }
16
- .phone-number{
17
- width: calc(100% - 2.2rem);
18
- border: none;
19
- align-self: center;
20
- outline: none;
21
- margin-bottom: 0;
22
- padding: 0.4rem;
23
- }
24
- .sh-phone img{
25
- padding: 0.125rem;
26
- width: 2rem;
27
- height: 2rem;
28
- }
29
- .phone-number::placeholder{
30
- font-weight: 300;
31
- opacity: 0.5;
32
- }
33
-
34
2
  /* Step Container */
35
3
  .sh-form-steps-container {
36
4
  margin-bottom: 2.5rem;
@@ -292,6 +260,38 @@
292
260
  }
293
261
  }
294
262
 
263
+ .sh-phone{
264
+ display: flex;
265
+ width: 100%;
266
+ align-items: center;
267
+ padding: 0 0.25rem;
268
+ }
269
+ .phone-country{
270
+ width: 2rem;
271
+ border: none;
272
+ align-self: center;
273
+ outline: none !important;
274
+ padding: 0.4rem;
275
+ border-right: 1px solid #0003;
276
+ }
277
+ .phone-number{
278
+ width: calc(100% - 2.2rem);
279
+ border: none;
280
+ align-self: center;
281
+ outline: none;
282
+ margin-bottom: 0;
283
+ padding: 0.4rem;
284
+ }
285
+ .sh-phone img{
286
+ padding: 0.125rem;
287
+ width: 2rem;
288
+ height: 2rem;
289
+ }
290
+ .phone-number::placeholder{
291
+ font-weight: 300;
292
+ opacity: 0.5;
293
+ }
294
+
295
295
  .colored-toast.swal2-icon-success {
296
296
  background-color: #a5dc86 !important;
297
297
  }
@@ -384,11 +384,6 @@
384
384
  margin-right: 0.255em;
385
385
  }
386
386
 
387
- .sh-checkbox-group {
388
- display: flex;
389
- flex-wrap: wrap;
390
- }
391
-
392
387
  .callout{
393
388
  --bs-link-color-rgb: 110,168,254;
394
389
  --bs-code-color: #e685b5;
@@ -405,6 +400,11 @@
405
400
  --bd-callout-border: var(--bs-info-border-subtle);
406
401
  }
407
402
 
403
+ .sh-checkbox-group {
404
+ display: flex;
405
+ flex-wrap: wrap;
406
+ }
407
+
408
408
  .sh-forgot-link, .sh-register-link{
409
409
  cursor: pointer;
410
410
  }
package/dist/library.js CHANGED
@@ -3727,7 +3727,7 @@ var script$q = {
3727
3727
  type: Array,
3728
3728
  required: false
3729
3729
  },
3730
- hideButton: {
3730
+ hideSubmitButton: {
3731
3731
  type: Boolean,
3732
3732
  default: false
3733
3733
  }
@@ -4275,7 +4275,7 @@ return (_ctx, _cache) => {
4275
4275
  ], 10 /* CLASS, PROPS */, _hoisted_21$1)
4276
4276
  ], 2 /* CLASS */))
4277
4277
  : vue.createCommentVNode("v-if", true),
4278
- (isLastStep.value && !__props.hideButton)
4278
+ (isLastStep.value && !__props.hideSubmitButton)
4279
4279
  ? (vue.openBlock(), vue.createElementBlock("div", {
4280
4280
  key: 2,
4281
4281
  class: vue.normalizeClass(getElementClass('formGroup') + ' ms-auto')
@@ -4555,6 +4555,7 @@ const cleanedProp = vue.computed(()=>{
4555
4555
  const p = {...props};
4556
4556
  delete p.class;
4557
4557
  delete p.modalId;
4558
+ delete p.hideButton;
4558
4559
  return p
4559
4560
  });
4560
4561
 
@@ -7064,13 +7065,6 @@ const getTabKey = (tab)=>{
7064
7065
  return tab.name || tab.key
7065
7066
  };
7066
7067
 
7067
- const getTabPermission = tab=>{
7068
- if (typeof tab === 'string') {
7069
- return ''
7070
- }
7071
- return tab.permission
7072
- };
7073
-
7074
7068
  const getTabLabel = tab=>{
7075
7069
  let label = '';
7076
7070
  if (typeof tab === 'string') {
@@ -7084,7 +7078,6 @@ const getTabLabel = tab=>{
7084
7078
  return (_ctx, _cache) => {
7085
7079
  const _component_router_link = vue.resolveComponent("router-link");
7086
7080
  const _component_router_view = vue.resolveComponent("router-view");
7087
- const _directive_if_user_can = vue.resolveDirective("if-user-can");
7088
7081
 
7089
7082
  return (allowedTabs.value.length > 0)
7090
7083
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
@@ -7092,7 +7085,7 @@ return (_ctx, _cache) => {
7092
7085
  class: vue.normalizeClass(["nav nav-tabs sh-tabs", __props.classes ?? vue.unref(shRepo).getShConfig('tabsClass','sh-tabs nav-tabs-bordered')])
7093
7086
  }, [
7094
7087
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(allowedTabs.value, (tab) => {
7095
- return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
7088
+ return (vue.openBlock(), vue.createElementBlock("li", {
7096
7089
  class: "nav-item",
7097
7090
  key: getTabKey(tab)
7098
7091
  }, [
@@ -7111,9 +7104,7 @@ return (_ctx, _cache) => {
7111
7104
  ]),
7112
7105
  _: 2 /* DYNAMIC */
7113
7106
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "to", "class"])
7114
- ])), [
7115
- [_directive_if_user_can, getTabPermission(tab)]
7116
- ])
7107
+ ]))
7117
7108
  }), 128 /* KEYED_FRAGMENT */))
7118
7109
  ], 2 /* CLASS */),
7119
7110
  vue.createElementVNode("div", {
package/dist/library.mjs CHANGED
@@ -3,7 +3,7 @@ import { DateTime } from 'luxon';
3
3
  import Swal from 'sweetalert2';
4
4
  import { Modal, Offcanvas } from 'bootstrap';
5
5
  import NProgress from 'nprogress';
6
- import { ref, computed, watch, onMounted, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, unref, vModelSelect, vModelText, normalizeClass, createBlock, resolveDynamicComponent, resolveComponent, mergeModels, useModel, inject, useTemplateRef, mergeProps, vShow, renderSlot, normalizeStyle, Teleport, createVNode, withCtx, useSlots, onBeforeUnmount, reactive, vModelCheckbox, withModifiers, resolveDirective, shallowRef, markRaw, isRef } from 'vue';
6
+ import { ref, computed, watch, onMounted, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, unref, vModelSelect, vModelText, normalizeClass, createBlock, resolveDynamicComponent, resolveComponent, mergeModels, useModel, inject, useTemplateRef, mergeProps, vShow, renderSlot, normalizeStyle, Teleport, createVNode, withCtx, useSlots, onBeforeUnmount, reactive, vModelCheckbox, withModifiers, shallowRef, markRaw, isRef } from 'vue';
7
7
  import _ from 'lodash';
8
8
  import { useRouter, useRoute } from 'vue-router';
9
9
  import { defineStore, storeToRefs } from 'pinia';
@@ -3716,7 +3716,7 @@ var script$q = {
3716
3716
  type: Array,
3717
3717
  required: false
3718
3718
  },
3719
- hideButton: {
3719
+ hideSubmitButton: {
3720
3720
  type: Boolean,
3721
3721
  default: false
3722
3722
  }
@@ -4264,7 +4264,7 @@ return (_ctx, _cache) => {
4264
4264
  ], 10 /* CLASS, PROPS */, _hoisted_21$1)
4265
4265
  ], 2 /* CLASS */))
4266
4266
  : createCommentVNode("v-if", true),
4267
- (isLastStep.value && !__props.hideButton)
4267
+ (isLastStep.value && !__props.hideSubmitButton)
4268
4268
  ? (openBlock(), createElementBlock("div", {
4269
4269
  key: 2,
4270
4270
  class: normalizeClass(getElementClass('formGroup') + ' ms-auto')
@@ -4544,6 +4544,7 @@ const cleanedProp = computed(()=>{
4544
4544
  const p = {...props};
4545
4545
  delete p.class;
4546
4546
  delete p.modalId;
4547
+ delete p.hideButton;
4547
4548
  return p
4548
4549
  });
4549
4550
 
@@ -7053,13 +7054,6 @@ const getTabKey = (tab)=>{
7053
7054
  return tab.name || tab.key
7054
7055
  };
7055
7056
 
7056
- const getTabPermission = tab=>{
7057
- if (typeof tab === 'string') {
7058
- return ''
7059
- }
7060
- return tab.permission
7061
- };
7062
-
7063
7057
  const getTabLabel = tab=>{
7064
7058
  let label = '';
7065
7059
  if (typeof tab === 'string') {
@@ -7073,7 +7067,6 @@ const getTabLabel = tab=>{
7073
7067
  return (_ctx, _cache) => {
7074
7068
  const _component_router_link = resolveComponent("router-link");
7075
7069
  const _component_router_view = resolveComponent("router-view");
7076
- const _directive_if_user_can = resolveDirective("if-user-can");
7077
7070
 
7078
7071
  return (allowedTabs.value.length > 0)
7079
7072
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
@@ -7081,7 +7074,7 @@ return (_ctx, _cache) => {
7081
7074
  class: normalizeClass(["nav nav-tabs sh-tabs", __props.classes ?? unref(shRepo).getShConfig('tabsClass','sh-tabs nav-tabs-bordered')])
7082
7075
  }, [
7083
7076
  (openBlock(true), createElementBlock(Fragment, null, renderList(allowedTabs.value, (tab) => {
7084
- return withDirectives((openBlock(), createElementBlock("li", {
7077
+ return (openBlock(), createElementBlock("li", {
7085
7078
  class: "nav-item",
7086
7079
  key: getTabKey(tab)
7087
7080
  }, [
@@ -7100,9 +7093,7 @@ return (_ctx, _cache) => {
7100
7093
  ]),
7101
7094
  _: 2 /* DYNAMIC */
7102
7095
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "to", "class"])
7103
- ])), [
7104
- [_directive_if_user_can, getTabPermission(tab)]
7105
- ])
7096
+ ]))
7106
7097
  }), 128 /* KEYED_FRAGMENT */))
7107
7098
  ], 2 /* CLASS */),
7108
7099
  createElementVNode("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "5.9.1",
3
+ "version": "5.9.3",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,4 +59,4 @@
59
59
  "nprogress": "^0.2.0",
60
60
  "sweetalert2": "^11"
61
61
  }
62
- }
62
+ }