@iankibetsh/shframework 5.8.6 → 5.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/dist/library.mjs.css +43 -43
- package/dist/library.js +10 -4
- package/dist/library.mjs +10 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,8 +23,8 @@ A robust table component that handles server-side pagination, searching, and cus
|
|
|
23
23
|
- **Named Slots for Custom Formatting**: Use named slots for columns to provide custom formatting (e.g., `<template #age="{ row }">`).
|
|
24
24
|
- **Multi-Action Support**: Enable row selection and collective operations with a floating action bar.
|
|
25
25
|
- **Caching & Background Loading**: Uses IndexedDB to cache data. Shows cached data immediately while fetching fresh data in the background (enabled via `enableTableCache` config or `:cache="true"` prop).
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
26
|
+
- **User-Specific Caching**: Automatically prefixes cache keys with user identifiers (e.g., `id`, `email`) to ensure data isolation between users. Configure via `cacheUserFields`.
|
|
27
|
+
- **Metadata Tracking**: Tracks cache source URLs and timestamps in a dedicated `cache_metadata` store for better auditability.
|
|
28
28
|
- **Links & Actions**: Easily define column links and action buttons.
|
|
29
29
|
|
|
30
30
|
```html
|
|
@@ -67,6 +67,8 @@ The flagship component for generating complex forms from simple configurations.
|
|
|
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
69
|
- **GraphQL Support**: Integrate with GraphQL mutations via the `gqlMutation` prop.
|
|
70
|
+
- **Checkbox Support**: Easily handle boolean or multiple-choice fields with `type: 'checkbox'`.
|
|
71
|
+
- **Modern Reactivity**: Built using Vue 3.4's `defineModel` for clean, conflict-free two-way binding.
|
|
70
72
|
|
|
71
73
|
```html
|
|
72
74
|
<sh-auto-form
|
|
@@ -114,6 +116,7 @@ A collection of common UI and data utilities.
|
|
|
114
116
|
- `shRepo.runPlainRequest(url, message)`: Post request with a confirmation prompt.
|
|
115
117
|
- `shRepo.runSilentRequest(url)`: Direct post request without prompt.
|
|
116
118
|
- `shRepo.showToast(message, type)`: Displays a sweetalert2 toast.
|
|
119
|
+
- `shRepo.flushCache()`: Clears all IndexedDB cache data.
|
|
117
120
|
- `shRepo.swalSuccess(message)` / `shRepo.swalError(message)`: Standard success/error popups.
|
|
118
121
|
|
|
119
122
|
### shUser (State Management)
|
|
@@ -260,38 +260,6 @@
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
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
263
|
.colored-toast.swal2-icon-success {
|
|
296
264
|
background-color: #a5dc86 !important;
|
|
297
265
|
}
|
|
@@ -336,20 +304,36 @@
|
|
|
336
304
|
cursor: pointer;
|
|
337
305
|
}
|
|
338
306
|
|
|
339
|
-
.sh-
|
|
340
|
-
|
|
307
|
+
.sh-phone{
|
|
308
|
+
display: flex;
|
|
309
|
+
width: 100%;
|
|
310
|
+
align-items: center;
|
|
311
|
+
padding: 0 0.25rem;
|
|
341
312
|
}
|
|
342
|
-
.
|
|
343
|
-
|
|
313
|
+
.phone-country{
|
|
314
|
+
width: 2rem;
|
|
315
|
+
border: none;
|
|
316
|
+
align-self: center;
|
|
317
|
+
outline: none !important;
|
|
318
|
+
padding: 0.4rem;
|
|
319
|
+
border-right: 1px solid #0003;
|
|
344
320
|
}
|
|
345
|
-
.
|
|
346
|
-
|
|
347
|
-
|
|
321
|
+
.phone-number{
|
|
322
|
+
width: calc(100% - 2.2rem);
|
|
323
|
+
border: none;
|
|
324
|
+
align-self: center;
|
|
325
|
+
outline: none;
|
|
326
|
+
margin-bottom: 0;
|
|
327
|
+
padding: 0.4rem;
|
|
348
328
|
}
|
|
349
|
-
.sh-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
329
|
+
.sh-phone img{
|
|
330
|
+
padding: 0.125rem;
|
|
331
|
+
width: 2rem;
|
|
332
|
+
height: 2rem;
|
|
333
|
+
}
|
|
334
|
+
.phone-number::placeholder{
|
|
335
|
+
font-weight: 300;
|
|
336
|
+
opacity: 0.5;
|
|
353
337
|
}
|
|
354
338
|
|
|
355
339
|
.permissions-main {
|
|
@@ -384,6 +368,22 @@
|
|
|
384
368
|
flex-grow: 1;
|
|
385
369
|
}
|
|
386
370
|
|
|
371
|
+
.sh-selected-item{
|
|
372
|
+
line-height: unset!important;
|
|
373
|
+
}
|
|
374
|
+
.sh-suggestion-input{
|
|
375
|
+
padding: 0.375rem 0.75rem;
|
|
376
|
+
}
|
|
377
|
+
.sh-suggest{
|
|
378
|
+
margin-bottom: 1rem;
|
|
379
|
+
padding: 0rem 0rem;
|
|
380
|
+
}
|
|
381
|
+
.sh-suggest-control::after{
|
|
382
|
+
margin-top: auto;
|
|
383
|
+
margin-bottom: auto;
|
|
384
|
+
margin-right: 0.255em;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
387
|
.callout{
|
|
388
388
|
--bs-link-color-rgb: 110,168,254;
|
|
389
389
|
--bs-code-color: #e685b5;
|
package/dist/library.js
CHANGED
|
@@ -3404,8 +3404,13 @@ var script$u = {
|
|
|
3404
3404
|
emits: /*@__PURE__*/vue.mergeModels(['clearValidationErrors'], ["update:modelValue"]),
|
|
3405
3405
|
setup(__props, { emit: __emit }) {
|
|
3406
3406
|
|
|
3407
|
-
vue.useModel(__props, "modelValue");
|
|
3407
|
+
const model = vue.useModel(__props, "modelValue");
|
|
3408
3408
|
const props = __props;
|
|
3409
|
+
const emit = __emit;
|
|
3410
|
+
|
|
3411
|
+
const onInput = () => {
|
|
3412
|
+
emit('clearValidationErrors');
|
|
3413
|
+
};
|
|
3409
3414
|
|
|
3410
3415
|
const selectOptions = vue.ref(null);
|
|
3411
3416
|
|
|
@@ -3434,7 +3439,8 @@ vue.onMounted(()=>{
|
|
|
3434
3439
|
|
|
3435
3440
|
return (_ctx, _cache) => {
|
|
3436
3441
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
|
|
3437
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((
|
|
3442
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((model).value = $event)),
|
|
3443
|
+
onChange: onInput
|
|
3438
3444
|
}, [
|
|
3439
3445
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(selectOptions.value, (option) => {
|
|
3440
3446
|
return (vue.openBlock(), vue.createElementBlock("option", {
|
|
@@ -3442,8 +3448,8 @@ return (_ctx, _cache) => {
|
|
|
3442
3448
|
value: option.id
|
|
3443
3449
|
}, vue.toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$n))
|
|
3444
3450
|
}), 128 /* KEYED_FRAGMENT */))
|
|
3445
|
-
],
|
|
3446
|
-
[vue.vModelSelect,
|
|
3451
|
+
], 544 /* NEED_HYDRATION, NEED_PATCH */)), [
|
|
3452
|
+
[vue.vModelSelect, model.value]
|
|
3447
3453
|
])
|
|
3448
3454
|
}
|
|
3449
3455
|
}
|
package/dist/library.mjs
CHANGED
|
@@ -3393,8 +3393,13 @@ var script$u = {
|
|
|
3393
3393
|
emits: /*@__PURE__*/mergeModels(['clearValidationErrors'], ["update:modelValue"]),
|
|
3394
3394
|
setup(__props, { emit: __emit }) {
|
|
3395
3395
|
|
|
3396
|
-
useModel(__props, "modelValue");
|
|
3396
|
+
const model = useModel(__props, "modelValue");
|
|
3397
3397
|
const props = __props;
|
|
3398
|
+
const emit = __emit;
|
|
3399
|
+
|
|
3400
|
+
const onInput = () => {
|
|
3401
|
+
emit('clearValidationErrors');
|
|
3402
|
+
};
|
|
3398
3403
|
|
|
3399
3404
|
const selectOptions = ref(null);
|
|
3400
3405
|
|
|
@@ -3423,7 +3428,8 @@ onMounted(()=>{
|
|
|
3423
3428
|
|
|
3424
3429
|
return (_ctx, _cache) => {
|
|
3425
3430
|
return withDirectives((openBlock(), createElementBlock("select", {
|
|
3426
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((
|
|
3431
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((model).value = $event)),
|
|
3432
|
+
onChange: onInput
|
|
3427
3433
|
}, [
|
|
3428
3434
|
(openBlock(true), createElementBlock(Fragment, null, renderList(selectOptions.value, (option) => {
|
|
3429
3435
|
return (openBlock(), createElementBlock("option", {
|
|
@@ -3431,8 +3437,8 @@ return (_ctx, _cache) => {
|
|
|
3431
3437
|
value: option.id
|
|
3432
3438
|
}, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$n))
|
|
3433
3439
|
}), 128 /* KEYED_FRAGMENT */))
|
|
3434
|
-
],
|
|
3435
|
-
[vModelSelect,
|
|
3440
|
+
], 544 /* NEED_HYDRATION, NEED_PATCH */)), [
|
|
3441
|
+
[vModelSelect, model.value]
|
|
3436
3442
|
])
|
|
3437
3443
|
}
|
|
3438
3444
|
}
|