plugin-ui-for-kzt 0.0.8 → 0.0.9
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 +21 -9
- package/dist/components/DataTable/DataTable.vue.d.ts +3 -0
- package/dist/components/Modal/Modal.vue.d.ts +3 -0
- package/dist/components/Spinner/Spinner.vue.d.ts +3 -0
- package/dist/components/Toaster/Toaster.vue.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.vue.d.ts +3 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +45 -38
- package/dist/{types/plugins → plugins}/modalPlugin.d.ts +3 -2
- package/dist/types/index.d.ts +5 -11
- package/package.json +1 -1
- package/src/components/Modal/Modal.vue +20 -24
- package/src/plugins/modalPlugin.ts +22 -9
- package/tsconfig.json +3 -2
- package/webpack.config.js +1 -1
- package/dist/types/types/index.d.ts +0 -4
- /package/dist/{types/components → components}/Toaster/timer.d.ts +0 -0
- /package/dist/{types/plugins → plugins}/toasterPlugin.d.ts +0 -0
- /package/dist/{types/store → store}/modal.d.ts +0 -0
package/README.md
CHANGED
|
@@ -73,15 +73,20 @@ Follow these steps to update and publish a new version of the plugin:
|
|
|
73
73
|
|
|
74
74
|
Update the `version` field in your `package.json` file according to [Semantic Versioning](https://semver.org/).
|
|
75
75
|
|
|
76
|
-
### 2.
|
|
76
|
+
### 2. Clean Previous Builds
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
rm -rf dist
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 3. Clean Previous Builds
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm run build
|
|
82
86
|
```
|
|
87
|
+
check to correct build version
|
|
83
88
|
|
|
84
|
-
###
|
|
89
|
+
### 4. Log in to npm
|
|
85
90
|
|
|
86
91
|
```bash
|
|
87
92
|
npm login
|
|
@@ -89,25 +94,32 @@ npm login
|
|
|
89
94
|
|
|
90
95
|
> 💡 Use the **npm credentials** stored in your GitLab vault or settings.
|
|
91
96
|
|
|
92
|
-
###
|
|
97
|
+
### 5. Publish the Package
|
|
93
98
|
|
|
94
99
|
```bash
|
|
95
100
|
npm publish --access public
|
|
96
101
|
```
|
|
97
102
|
|
|
98
|
-
###
|
|
103
|
+
### 6. Commit and Push to GitLab
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
git add .
|
|
107
|
+
git commit -m "chore: bump version to x.x.x"
|
|
108
|
+
git push
|
|
109
|
+
```
|
|
110
|
+
### 7. (Optional) Clear npm Cache
|
|
99
111
|
|
|
100
112
|
```bash
|
|
101
113
|
npm cache clean --force
|
|
102
114
|
```
|
|
103
115
|
|
|
104
|
-
###
|
|
116
|
+
### 7. Update the Plugin in Your Project
|
|
105
117
|
|
|
106
118
|
```bash
|
|
107
119
|
npm install plugin-ui-for-kzt@latest --force
|
|
108
120
|
```
|
|
109
121
|
|
|
110
|
-
###
|
|
122
|
+
### 8. Restart Your Quasar Project
|
|
111
123
|
|
|
112
124
|
```bash
|
|
113
125
|
quasar clean
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Modal from "./components/Modal/Modal.vue";
|
|
2
|
+
import DataTable from "./components/DataTable/DataTable.vue";
|
|
3
|
+
import Tooltip from "./components/Tooltip/Tooltip.vue";
|
|
4
|
+
import Spinner from "./components/Spinner/Spinner.vue";
|
|
5
|
+
import { useModal } from "./plugins/modalPlugin";
|
|
6
|
+
import { useToast } from "./plugins/toasterPlugin";
|
|
7
|
+
declare const _default: {
|
|
8
|
+
install(app: any): void;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
export { Modal, DataTable, Tooltip, Spinner, useModal, useToast };
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
5
|
define(["vue"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["
|
|
7
|
+
exports["plugin-ui-for-kzt"] = factory(require("vue"));
|
|
8
8
|
else
|
|
9
|
-
root["
|
|
9
|
+
root["plugin-ui-for-kzt"] = factory(root["vue"]);
|
|
10
10
|
})(this, (__WEBPACK_EXTERNAL_MODULE__3__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ([
|
|
@@ -2390,7 +2390,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2390
2390
|
/* harmony import */ var _Modal_vue_vue_type_template_id_47db75aa_ts_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
|
|
2391
2391
|
/* harmony import */ var _Modal_vue_vue_type_script_setup_true_lang_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
|
|
2392
2392
|
/* harmony import */ var _Modal_vue_vue_type_style_index_0_id_47db75aa_lang_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30);
|
|
2393
|
-
/* harmony import */ var
|
|
2393
|
+
/* harmony import */ var _Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
|
|
2394
2394
|
|
|
2395
2395
|
|
|
2396
2396
|
|
|
@@ -2398,7 +2398,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2398
2398
|
;
|
|
2399
2399
|
|
|
2400
2400
|
|
|
2401
|
-
const __exports__ = /*#__PURE__*/(0,
|
|
2401
|
+
const __exports__ = /*#__PURE__*/(0,_Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_Modal_vue_vue_type_script_setup_true_lang_ts__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Modal_vue_vue_type_template_id_47db75aa_ts_true__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"src/components/Modal/Modal.vue"]])
|
|
2402
2402
|
/* hot reload */
|
|
2403
2403
|
if (false) {}
|
|
2404
2404
|
|
|
@@ -2442,7 +2442,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2442
2442
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
2443
2443
|
class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["modal-container-header", {
|
|
2444
2444
|
'modal-container-header-show-all': $setup.showMore,
|
|
2445
|
-
[$setup.getTypeModal.nameClass]: $setup.getTypeModal.nameClass
|
|
2445
|
+
[$setup.getTypeModal.nameClass]: $setup.getTypeModal.nameClass.length,
|
|
2446
2446
|
}])
|
|
2447
2447
|
}, [
|
|
2448
2448
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_1, [
|
|
@@ -2516,6 +2516,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2516
2516
|
const props = __props;
|
|
2517
2517
|
const showMore = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
|
|
2518
2518
|
const getTypeModal = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => {
|
|
2519
|
+
console.log(props.name, 'show props name');
|
|
2519
2520
|
switch (props.name) {
|
|
2520
2521
|
case "error":
|
|
2521
2522
|
return { img: _icons_ErrorIcon_vue__WEBPACK_IMPORTED_MODULE_2__["default"], nameClass: "error" };
|
|
@@ -2526,10 +2527,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2526
2527
|
case "info":
|
|
2527
2528
|
return { img: _icons_InfoIcon_vue__WEBPACK_IMPORTED_MODULE_5__["default"], nameClass: "info" };
|
|
2528
2529
|
default:
|
|
2529
|
-
return {
|
|
2530
|
-
img: _icons_SuccessIcon_vue__WEBPACK_IMPORTED_MODULE_3__["default"],
|
|
2531
|
-
nameClass: "",
|
|
2532
|
-
};
|
|
2530
|
+
return { img: _icons_WarningIcon_vue__WEBPACK_IMPORTED_MODULE_4__["default"], nameClass: "info" };
|
|
2533
2531
|
}
|
|
2534
2532
|
});
|
|
2535
2533
|
const __returned__ = { props, showMore, getTypeModal, CloseIcon: _icons_CloseIcon_vue__WEBPACK_IMPORTED_MODULE_1__["default"] };
|
|
@@ -2549,12 +2547,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2549
2547
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2550
2548
|
/* harmony export */ });
|
|
2551
2549
|
/* harmony import */ var _CloseIcon_vue_vue_type_template_id_1533b5dc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
|
|
2552
|
-
/* harmony import */ var
|
|
2550
|
+
/* harmony import */ var _Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
|
|
2553
2551
|
|
|
2554
2552
|
const script = {}
|
|
2555
2553
|
|
|
2556
2554
|
;
|
|
2557
|
-
const __exports__ = /*#__PURE__*/(0,
|
|
2555
|
+
const __exports__ = /*#__PURE__*/(0,_Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__["default"])(script, [['render',_CloseIcon_vue_vue_type_template_id_1533b5dc__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"src/components/icons/CloseIcon.vue"]])
|
|
2558
2556
|
/* hot reload */
|
|
2559
2557
|
if (false) {}
|
|
2560
2558
|
|
|
@@ -2633,12 +2631,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2633
2631
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2634
2632
|
/* harmony export */ });
|
|
2635
2633
|
/* harmony import */ var _ErrorIcon_vue_vue_type_template_id_d534cc28__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
|
|
2636
|
-
/* harmony import */ var
|
|
2634
|
+
/* harmony import */ var _Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
|
|
2637
2635
|
|
|
2638
2636
|
const script = {}
|
|
2639
2637
|
|
|
2640
2638
|
;
|
|
2641
|
-
const __exports__ = /*#__PURE__*/(0,
|
|
2639
|
+
const __exports__ = /*#__PURE__*/(0,_Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__["default"])(script, [['render',_ErrorIcon_vue_vue_type_template_id_d534cc28__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"src/components/icons/ErrorIcon.vue"]])
|
|
2642
2640
|
/* hot reload */
|
|
2643
2641
|
if (false) {}
|
|
2644
2642
|
|
|
@@ -2714,12 +2712,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2714
2712
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2715
2713
|
/* harmony export */ });
|
|
2716
2714
|
/* harmony import */ var _SuccessIcon_vue_vue_type_template_id_dc8347b2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22);
|
|
2717
|
-
/* harmony import */ var
|
|
2715
|
+
/* harmony import */ var _Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
|
|
2718
2716
|
|
|
2719
2717
|
const script = {}
|
|
2720
2718
|
|
|
2721
2719
|
;
|
|
2722
|
-
const __exports__ = /*#__PURE__*/(0,
|
|
2720
|
+
const __exports__ = /*#__PURE__*/(0,_Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__["default"])(script, [['render',_SuccessIcon_vue_vue_type_template_id_dc8347b2__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"src/components/icons/SuccessIcon.vue"]])
|
|
2723
2721
|
/* hot reload */
|
|
2724
2722
|
if (false) {}
|
|
2725
2723
|
|
|
@@ -2788,12 +2786,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2788
2786
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2789
2787
|
/* harmony export */ });
|
|
2790
2788
|
/* harmony import */ var _WarningIcon_vue_vue_type_template_id_3d1622c0__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
|
|
2791
|
-
/* harmony import */ var
|
|
2789
|
+
/* harmony import */ var _Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
|
|
2792
2790
|
|
|
2793
2791
|
const script = {}
|
|
2794
2792
|
|
|
2795
2793
|
;
|
|
2796
|
-
const __exports__ = /*#__PURE__*/(0,
|
|
2794
|
+
const __exports__ = /*#__PURE__*/(0,_Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__["default"])(script, [['render',_WarningIcon_vue_vue_type_template_id_3d1622c0__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"src/components/icons/WarningIcon.vue"]])
|
|
2797
2795
|
/* hot reload */
|
|
2798
2796
|
if (false) {}
|
|
2799
2797
|
|
|
@@ -2865,12 +2863,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2865
2863
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2866
2864
|
/* harmony export */ });
|
|
2867
2865
|
/* harmony import */ var _InfoIcon_vue_vue_type_template_id_1cb1f1cc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28);
|
|
2868
|
-
/* harmony import */ var
|
|
2866
|
+
/* harmony import */ var _Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
|
|
2869
2867
|
|
|
2870
2868
|
const script = {}
|
|
2871
2869
|
|
|
2872
2870
|
;
|
|
2873
|
-
const __exports__ = /*#__PURE__*/(0,
|
|
2871
|
+
const __exports__ = /*#__PURE__*/(0,_Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__["default"])(script, [['render',_InfoIcon_vue_vue_type_template_id_1cb1f1cc__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"src/components/icons/InfoIcon.vue"]])
|
|
2874
2872
|
/* hot reload */
|
|
2875
2873
|
if (false) {}
|
|
2876
2874
|
|
|
@@ -3050,7 +3048,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.modal {
|
|
|
3050
3048
|
.warning {
|
|
3051
3049
|
background: #f4a900;
|
|
3052
3050
|
}
|
|
3053
|
-
.
|
|
3051
|
+
.info {
|
|
3054
3052
|
background: #0085cf;
|
|
3055
3053
|
}`, ""]);
|
|
3056
3054
|
// Exports
|
|
@@ -3443,7 +3441,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3443
3441
|
/* harmony import */ var _DataTable_vue_vue_type_template_id_a2f6a4ce_scoped_true_ts_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
|
|
3444
3442
|
/* harmony import */ var _DataTable_vue_vue_type_script_setup_true_lang_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40);
|
|
3445
3443
|
/* harmony import */ var _DataTable_vue_vue_type_style_index_0_id_a2f6a4ce_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
|
|
3446
|
-
/* harmony import */ var
|
|
3444
|
+
/* harmony import */ var _Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
|
|
3447
3445
|
|
|
3448
3446
|
|
|
3449
3447
|
|
|
@@ -3451,7 +3449,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3451
3449
|
;
|
|
3452
3450
|
|
|
3453
3451
|
|
|
3454
|
-
const __exports__ = /*#__PURE__*/(0,
|
|
3452
|
+
const __exports__ = /*#__PURE__*/(0,_Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_DataTable_vue_vue_type_script_setup_true_lang_ts__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_DataTable_vue_vue_type_template_id_a2f6a4ce_scoped_true_ts_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-a2f6a4ce"],['__file',"src/components/DataTable/DataTable.vue"]])
|
|
3455
3453
|
/* hot reload */
|
|
3456
3454
|
if (false) {}
|
|
3457
3455
|
|
|
@@ -3740,7 +3738,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3740
3738
|
/* harmony import */ var _Tooltip_vue_vue_type_template_id_3a154857_scoped_true_ts_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
|
|
3741
3739
|
/* harmony import */ var _Tooltip_vue_vue_type_script_setup_true_lang_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
|
|
3742
3740
|
/* harmony import */ var _Tooltip_vue_vue_type_style_index_0_id_3a154857_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50);
|
|
3743
|
-
/* harmony import */ var
|
|
3741
|
+
/* harmony import */ var _Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
|
|
3744
3742
|
|
|
3745
3743
|
|
|
3746
3744
|
|
|
@@ -3748,7 +3746,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3748
3746
|
;
|
|
3749
3747
|
|
|
3750
3748
|
|
|
3751
|
-
const __exports__ = /*#__PURE__*/(0,
|
|
3749
|
+
const __exports__ = /*#__PURE__*/(0,_Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_Tooltip_vue_vue_type_script_setup_true_lang_ts__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Tooltip_vue_vue_type_template_id_3a154857_scoped_true_ts_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-3a154857"],['__file',"src/components/Tooltip/Tooltip.vue"]])
|
|
3752
3750
|
/* hot reload */
|
|
3753
3751
|
if (false) {}
|
|
3754
3752
|
|
|
@@ -3961,7 +3959,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3961
3959
|
/* harmony import */ var _Spinner_vue_vue_type_template_id_8800befa_scoped_true_ts_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(54);
|
|
3962
3960
|
/* harmony import */ var _Spinner_vue_vue_type_script_setup_true_lang_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56);
|
|
3963
3961
|
/* harmony import */ var _Spinner_vue_vue_type_style_index_0_id_8800befa_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58);
|
|
3964
|
-
/* harmony import */ var
|
|
3962
|
+
/* harmony import */ var _Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
|
|
3965
3963
|
|
|
3966
3964
|
|
|
3967
3965
|
|
|
@@ -3969,7 +3967,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3969
3967
|
;
|
|
3970
3968
|
|
|
3971
3969
|
|
|
3972
|
-
const __exports__ = /*#__PURE__*/(0,
|
|
3970
|
+
const __exports__ = /*#__PURE__*/(0,_Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_Spinner_vue_vue_type_script_setup_true_lang_ts__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Spinner_vue_vue_type_template_id_8800befa_scoped_true_ts_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-8800befa"],['__file',"src/components/Spinner/Spinner.vue"]])
|
|
3973
3971
|
/* hot reload */
|
|
3974
3972
|
if (false) {}
|
|
3975
3973
|
|
|
@@ -4184,26 +4182,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4184
4182
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(() => modalStore.modals, (newModals) => {
|
|
4185
4183
|
// Очищаем контейнер
|
|
4186
4184
|
modalContainer.innerHTML = "";
|
|
4185
|
+
// Обновляем data-атрибут и класс
|
|
4186
|
+
if (newModals.length > 1) {
|
|
4187
|
+
modalContainer.classList.add("modal");
|
|
4188
|
+
}
|
|
4189
|
+
else {
|
|
4190
|
+
modalContainer.classList.remove("modal");
|
|
4191
|
+
}
|
|
4187
4192
|
// Добавляем модалки в DOM
|
|
4188
4193
|
newModals.forEach((modal) => {
|
|
4189
4194
|
modalContainer.dataset.modalId = String(modal.id);
|
|
4190
|
-
modalContainer.addEventListener("click", (event) => {
|
|
4191
|
-
console.log(`Closing modal with id: ${modal.id}`);
|
|
4192
|
-
modalStore.closeModal(modal.id);
|
|
4193
|
-
});
|
|
4194
4195
|
modalContainer.setAttribute("name", modal.name);
|
|
4195
|
-
modalContainer.classList.add("modal");
|
|
4196
|
-
modalContainer.addEventListener("click", () => {
|
|
4197
|
-
console.log("this click on background");
|
|
4198
|
-
modalStore.closeModal(modal.id);
|
|
4199
|
-
});
|
|
4200
4196
|
const modalApp = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createApp)({
|
|
4201
4197
|
render() {
|
|
4202
4198
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(_components_Modal_Modal_vue__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
|
4203
4199
|
options: modal.options,
|
|
4204
4200
|
name: modal.name,
|
|
4205
4201
|
onClose: () => {
|
|
4206
|
-
modalContainer.classList.remove("modal");
|
|
4207
4202
|
modalStore.closeModal(modal.id);
|
|
4208
4203
|
},
|
|
4209
4204
|
});
|
|
@@ -4212,6 +4207,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4212
4207
|
modalApp.mount(modalContainer);
|
|
4213
4208
|
});
|
|
4214
4209
|
}, { deep: true });
|
|
4210
|
+
// ✅ Добавляем ОДИН обработчик клика по фону
|
|
4211
|
+
modalContainer.addEventListener("click", (event) => {
|
|
4212
|
+
console.log("click on background", modalStore.modals.length);
|
|
4213
|
+
if (modalStore.modals.length > 0) {
|
|
4214
|
+
const lastModal = modalStore.modals[modalStore.modals.length - 1];
|
|
4215
|
+
modalStore.closeModal(lastModal.id);
|
|
4216
|
+
// Удаляем класс, если это была последняя модалка
|
|
4217
|
+
if (modalStore.modals.length <= 1) {
|
|
4218
|
+
modalContainer.classList.remove("modal");
|
|
4219
|
+
}
|
|
4220
|
+
}
|
|
4221
|
+
});
|
|
4215
4222
|
},
|
|
4216
4223
|
});
|
|
4217
4224
|
function useModal() {
|
|
@@ -4388,7 +4395,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4388
4395
|
/* harmony import */ var _Toaster_vue_vue_type_template_id_060a1079_scoped_true_ts_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65);
|
|
4389
4396
|
/* harmony import */ var _Toaster_vue_vue_type_script_setup_true_lang_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67);
|
|
4390
4397
|
/* harmony import */ var _Toaster_vue_vue_type_style_index_0_id_060a1079_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70);
|
|
4391
|
-
/* harmony import */ var
|
|
4398
|
+
/* harmony import */ var _Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
|
|
4392
4399
|
|
|
4393
4400
|
|
|
4394
4401
|
|
|
@@ -4396,7 +4403,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4396
4403
|
;
|
|
4397
4404
|
|
|
4398
4405
|
|
|
4399
|
-
const __exports__ = /*#__PURE__*/(0,
|
|
4406
|
+
const __exports__ = /*#__PURE__*/(0,_Users_agusha_Desktop_work_kaztel_plugin_ui_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_Toaster_vue_vue_type_script_setup_true_lang_ts__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Toaster_vue_vue_type_template_id_060a1079_scoped_true_ts_true__WEBPACK_IMPORTED_MODULE_0__.render],['__scopeId',"data-v-060a1079"],['__file',"src/components/Toaster/Toaster.vue"]])
|
|
4400
4407
|
/* hot reload */
|
|
4401
4408
|
if (false) {}
|
|
4402
4409
|
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { IModalState, IModalType } from "types";
|
|
1
2
|
declare const _default: {
|
|
2
3
|
install(app: any): void;
|
|
3
4
|
};
|
|
4
5
|
export default _default;
|
|
5
6
|
export declare function useModal(): {
|
|
6
|
-
open: (name:
|
|
7
|
+
open: (name: IModalType, options?: IModalState) => void;
|
|
7
8
|
close: (id: number) => void;
|
|
8
9
|
} | undefined;
|
|
9
10
|
declare module "@vue/runtime-core" {
|
|
10
11
|
interface ComponentCustomProperties {
|
|
11
12
|
$modal: {
|
|
12
|
-
open: (name:
|
|
13
|
+
open: (name: IModalType, options?: IModalState) => void;
|
|
13
14
|
close: (id: number) => void;
|
|
14
15
|
};
|
|
15
16
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { useToast } from "./plugins/toasterPlugin";
|
|
7
|
-
declare const _default: {
|
|
8
|
-
install(app: any): void;
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
11
|
-
export { Modal, DataTable, Tooltip, Spinner, useModal, useToast };
|
|
1
|
+
export interface IModalState {
|
|
2
|
+
title: string;
|
|
3
|
+
message: string;
|
|
4
|
+
}
|
|
5
|
+
export type IModalType = string | 'success' | 'error' | 'info' | 'warning';
|
package/package.json
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="modal-container" @click.stop>
|
|
3
3
|
<div
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
class="modal-container-header"
|
|
5
|
+
:class="{
|
|
6
6
|
'modal-container-header-show-all': showMore,
|
|
7
|
-
[getTypeModal.nameClass]: getTypeModal.nameClass
|
|
7
|
+
[getTypeModal.nameClass]: getTypeModal.nameClass.length,
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
|
-
{{getTypeModal.nameClass}}
|
|
11
10
|
<div class="modal-container-header-title">
|
|
12
|
-
<component :is="getTypeModal.img"
|
|
11
|
+
<component :is="getTypeModal.img"/>
|
|
13
12
|
<div>{{ options.title }}</div>
|
|
14
|
-
<div>{{ getTypeModal.nameClass }}</div>
|
|
15
13
|
</div>
|
|
16
14
|
<div
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
class="modal-container-header-show-more"
|
|
16
|
+
@click="showMore = !showMore"
|
|
19
17
|
>
|
|
20
18
|
{{ showMore ? "Скрыть" : "Смотреть больше" }}
|
|
21
19
|
</div>
|
|
22
20
|
</div>
|
|
23
|
-
<CloseIcon class="modal-button-close" @click="onClose"
|
|
21
|
+
<CloseIcon class="modal-button-close" @click="onClose"/>
|
|
24
22
|
<div v-if="showMore" class="modal-container-subtitle">
|
|
25
|
-
Описание: <br
|
|
23
|
+
Описание: <br/>
|
|
26
24
|
{{ options.message }}
|
|
27
25
|
</div>
|
|
28
26
|
</div>
|
|
29
27
|
</template>
|
|
30
28
|
|
|
31
29
|
<script setup lang="ts">
|
|
32
|
-
import {ref, computed
|
|
30
|
+
import {ref, computed} from "vue";
|
|
33
31
|
import CloseIcon from "../icons/CloseIcon.vue";
|
|
34
32
|
import ErrorIcon from "../icons/ErrorIcon.vue";
|
|
35
33
|
import SuccessIcon from "../icons/SuccessIcon.vue";
|
|
@@ -38,7 +36,7 @@ import InfoIcon from "../icons/InfoIcon.vue";
|
|
|
38
36
|
import {IModalState, IModalType} from "../../types/index";
|
|
39
37
|
|
|
40
38
|
interface IProps {
|
|
41
|
-
options:IModalState
|
|
39
|
+
options: IModalState
|
|
42
40
|
name: IModalType;
|
|
43
41
|
onClose: () => void;
|
|
44
42
|
}
|
|
@@ -46,22 +44,19 @@ interface IProps {
|
|
|
46
44
|
const props = defineProps<IProps>();
|
|
47
45
|
const showMore = ref<boolean>(false);
|
|
48
46
|
|
|
49
|
-
const getTypeModal = computed<{ img:
|
|
50
|
-
console.log(props.name)
|
|
47
|
+
const getTypeModal = computed<{ img: any; nameClass: string }>(() => {
|
|
48
|
+
console.log(props.name, 'show props name')
|
|
51
49
|
switch (props.name) {
|
|
52
50
|
case "error":
|
|
53
|
-
return {
|
|
51
|
+
return {img: ErrorIcon, nameClass: "error"};
|
|
54
52
|
case "success":
|
|
55
|
-
return {
|
|
53
|
+
return {img: SuccessIcon, nameClass: "success"};
|
|
56
54
|
case "warning":
|
|
57
|
-
return {
|
|
55
|
+
return {img: WarningIcon, nameClass: "warning"};
|
|
58
56
|
case "info":
|
|
59
|
-
return {
|
|
57
|
+
return {img: InfoIcon, nameClass: "info"};
|
|
60
58
|
default:
|
|
61
|
-
return {
|
|
62
|
-
img: SuccessIcon,
|
|
63
|
-
nameClass: "info-modal",
|
|
64
|
-
};
|
|
59
|
+
return {img: WarningIcon, nameClass: "info"};
|
|
65
60
|
}
|
|
66
61
|
});
|
|
67
62
|
</script>
|
|
@@ -104,6 +99,7 @@ const getTypeModal = computed<{ img: Component; nameClass: string }>(() => {
|
|
|
104
99
|
font-size: 20px;
|
|
105
100
|
font-weight: 400;
|
|
106
101
|
line-height: 24px;
|
|
102
|
+
|
|
107
103
|
&-show-all {
|
|
108
104
|
border-radius: 12px 12px 0 0;
|
|
109
105
|
}
|
|
@@ -140,11 +136,11 @@ const getTypeModal = computed<{ img: Component; nameClass: string }>(() => {
|
|
|
140
136
|
background: #15b853;
|
|
141
137
|
}
|
|
142
138
|
|
|
143
|
-
|
|
139
|
+
.warning {
|
|
144
140
|
background: #f4a900;
|
|
145
141
|
}
|
|
146
142
|
|
|
147
|
-
.
|
|
143
|
+
.info {
|
|
148
144
|
background: #0085cf;
|
|
149
145
|
}
|
|
150
146
|
</style>
|
|
@@ -30,18 +30,17 @@ export default {
|
|
|
30
30
|
// Очищаем контейнер
|
|
31
31
|
modalContainer.innerHTML = "";
|
|
32
32
|
|
|
33
|
+
// Обновляем data-атрибут и класс
|
|
34
|
+
if (newModals.length > 1) {
|
|
35
|
+
modalContainer.classList.add("modal");
|
|
36
|
+
} else {
|
|
37
|
+
modalContainer.classList.remove("modal");
|
|
38
|
+
}
|
|
39
|
+
|
|
33
40
|
// Добавляем модалки в DOM
|
|
34
41
|
newModals.forEach((modal) => {
|
|
35
42
|
modalContainer.dataset.modalId = String(modal.id);
|
|
36
|
-
|
|
37
|
-
modalContainer.addEventListener("click", (event) => {
|
|
38
|
-
console.log(`Closing modal with id: ${modal.id}`);
|
|
39
|
-
console.log("this click on background", modalStore.modals);
|
|
40
|
-
if (modalStore.modals.length === 1) modalContainer.classList.remove("modal")
|
|
41
|
-
modalStore.closeModal(modal.id);
|
|
42
|
-
});
|
|
43
43
|
modalContainer.setAttribute("name", modal.name);
|
|
44
|
-
modalContainer.classList.add("modal");
|
|
45
44
|
|
|
46
45
|
const modalApp = createApp({
|
|
47
46
|
render() {
|
|
@@ -49,17 +48,31 @@ export default {
|
|
|
49
48
|
options: modal.options,
|
|
50
49
|
name: modal.name,
|
|
51
50
|
onClose: () => {
|
|
52
|
-
modalContainer.classList.remove("modal");
|
|
53
51
|
modalStore.closeModal(modal.id);
|
|
54
52
|
},
|
|
55
53
|
});
|
|
56
54
|
},
|
|
57
55
|
});
|
|
56
|
+
|
|
58
57
|
modalApp.mount(modalContainer);
|
|
59
58
|
});
|
|
60
59
|
},
|
|
61
60
|
{deep: true}
|
|
62
61
|
);
|
|
62
|
+
// ✅ Добавляем ОДИН обработчик клика по фону
|
|
63
|
+
modalContainer.addEventListener("click", (event) => {
|
|
64
|
+
console.log("click on background", modalStore.modals.length);
|
|
65
|
+
|
|
66
|
+
if (modalStore.modals.length > 0) {
|
|
67
|
+
const lastModal = modalStore.modals[modalStore.modals.length - 1];
|
|
68
|
+
modalStore.closeModal(lastModal.id);
|
|
69
|
+
|
|
70
|
+
// Удаляем класс, если это была последняя модалка
|
|
71
|
+
if (modalStore.modals.length <= 1) {
|
|
72
|
+
modalContainer.classList.remove("modal");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
63
76
|
},
|
|
64
77
|
};
|
|
65
78
|
|
package/tsconfig.json
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
"esModuleInterop": true,
|
|
8
8
|
"skipLibCheck": true,
|
|
9
9
|
"jsx": "preserve",
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"declarationDir": "./dist",
|
|
10
12
|
"lib": [
|
|
11
13
|
"dom",
|
|
12
14
|
"esnext"
|
|
@@ -18,7 +20,6 @@
|
|
|
18
20
|
}
|
|
19
21
|
},
|
|
20
22
|
"include": [
|
|
21
|
-
|
|
22
23
|
"src/**/*",
|
|
23
24
|
"src/**/*.ts",
|
|
24
25
|
"src/**/*.vue",
|
|
@@ -28,4 +29,4 @@
|
|
|
28
29
|
"node_modules",
|
|
29
30
|
"dist"
|
|
30
31
|
]
|
|
31
|
-
}
|
|
32
|
+
}
|
package/webpack.config.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|