@hostlink/nuxt-light 1.66.0 → 1.67.0
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 +1 -0
- package/dist/module.d.mts +6 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +34 -0
- package/dist/runtime/components/{l-audit-card.d.vue.ts → L/AuditCard.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-audit-card.vue → L/AuditCard.vue} +1 -1
- package/dist/runtime/components/{l-audit-card.vue.d.ts → L/AuditCard.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-bar.vue → L/Bar.vue} +1 -2
- package/dist/runtime/components/{l-btn.d.vue.ts → L/Btn.d.vue.ts} +0 -1
- package/dist/runtime/components/{l-btn.vue → L/Btn.vue} +17 -14
- package/dist/runtime/components/{l-btn.vue.d.ts → L/Btn.vue.d.ts} +0 -1
- package/dist/runtime/components/{l-card.vue → L/Card.vue} +8 -6
- package/dist/runtime/components/{l-checkbox.vue → L/Checkbox.vue} +4 -2
- package/dist/runtime/components/{l-date-picker.vue → L/DatePicker.vue} +85 -103
- package/dist/runtime/components/{l-delete-btn.d.vue.ts → L/DeleteBtn.d.vue.ts} +10 -1
- package/dist/runtime/components/{l-delete-btn.vue → L/DeleteBtn.vue} +4 -2
- package/dist/runtime/components/{l-delete-btn.vue.d.ts → L/DeleteBtn.vue.d.ts} +10 -1
- package/dist/runtime/components/L/DialogDatabaseFieldAdd.d.vue.ts +21 -0
- package/dist/runtime/components/{l-dialog-database-field-add.vue → L/DialogDatabaseFieldAdd.vue} +14 -15
- package/dist/runtime/components/L/DialogDatabaseFieldAdd.vue.d.ts +21 -0
- package/dist/runtime/components/L/DocumentViewer.d.vue.ts +1 -1
- package/dist/runtime/components/L/DocumentViewer.vue.d.ts +1 -1
- package/dist/runtime/components/L/DocumentViewerDialog.d.vue.ts +2 -2
- package/dist/runtime/components/L/DocumentViewerDialog.vue.d.ts +2 -2
- package/dist/runtime/components/{l-editor.vue → L/Editor.vue} +31 -17
- package/dist/runtime/components/L/Fieldset.d.vue.ts +15 -27
- package/dist/runtime/components/L/Fieldset.vue +4 -10
- package/dist/runtime/components/L/Fieldset.vue.d.ts +15 -27
- package/dist/runtime/components/{l-file-manager.vue → L/FileManager.vue} +2 -5
- package/dist/runtime/components/{l-icon-picker.vue → L/IconPicker.vue} +13 -13
- package/dist/runtime/components/{l-input.d.vue.ts → L/Input.d.vue.ts} +7 -3
- package/dist/runtime/components/{l-input.vue → L/Input.vue} +59 -80
- package/dist/runtime/components/{l-input.vue.d.ts → L/Input.vue.d.ts} +7 -3
- package/dist/runtime/components/{l-input-select.d.vue.ts → L/InputSelect.d.vue.ts} +3 -2
- package/dist/runtime/components/{l-input-select.vue → L/InputSelect.vue} +27 -9
- package/dist/runtime/components/{l-input-select.vue.d.ts → L/InputSelect.vue.d.ts} +3 -2
- package/dist/runtime/components/L/InputXlsx.d.vue.ts +17 -0
- package/dist/runtime/components/L/InputXlsx.vue +81 -0
- package/dist/runtime/components/L/InputXlsx.vue.d.ts +17 -0
- package/dist/runtime/components/{l-item.vue → L/Item.vue} +14 -5
- package/dist/runtime/components/{l-list.vue → L/List.vue} +18 -21
- package/dist/runtime/components/{l-page.vue → L/Page.vue} +6 -8
- package/dist/runtime/components/L/SearchNumber.d.vue.ts +16 -0
- package/dist/runtime/components/L/SearchNumber.vue +139 -0
- package/dist/runtime/components/L/SearchNumber.vue.d.ts +16 -0
- package/dist/runtime/components/L/Select.d.vue.ts +46 -0
- package/dist/runtime/components/{l-select.vue → L/Select.vue} +37 -18
- package/dist/runtime/components/L/Select.vue.d.ts +46 -0
- package/dist/runtime/components/L/System/Setting/logs.vue +75 -0
- package/dist/runtime/components/{l-tab.d.vue.ts → L/Tab.d.vue.ts} +2 -2
- package/dist/runtime/components/L/Tab.vue +38 -0
- package/dist/runtime/components/{l-tab.vue.d.ts → L/Tab.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-table.d.vue.ts → L/Table.d.vue.ts} +16 -8
- package/dist/runtime/components/{l-table.vue → L/Table.vue} +139 -84
- package/dist/runtime/components/{l-table.vue.d.ts → L/Table.vue.d.ts} +16 -8
- package/dist/runtime/components/{l-tabs.vue → L/Tabs.vue} +15 -8
- package/dist/runtime/components/{l-time-picker.d.vue.ts → L/TimePicker.d.vue.ts} +3 -2
- package/dist/runtime/components/L/TimePicker.vue +73 -0
- package/dist/runtime/components/{l-time-picker.vue.d.ts → L/TimePicker.vue.d.ts} +3 -2
- package/dist/runtime/components/{MyTest.d.vue.ts → L/User/apikey.d.vue.ts} +4 -4
- package/dist/runtime/components/L/User/apikey.vue +18 -0
- package/dist/runtime/components/{MyTest.vue.d.ts → L/User/apikey.vue.d.ts} +4 -4
- package/dist/runtime/components/L/ViewBtn.d.vue.ts +3 -0
- package/dist/runtime/components/L/ViewBtn.vue.d.ts +3 -0
- package/dist/runtime/composables/defineLightModel.d.ts +1 -1
- package/dist/runtime/composables/model.d.ts +1 -1
- package/dist/runtime/composables/showUploadFilesDialog.js +1 -1
- package/dist/runtime/composables/useLight.d.ts +22 -22
- package/dist/runtime/composables/useLight.js +10 -1
- package/dist/runtime/composables/useLightProps.d.ts +26 -0
- package/dist/runtime/composables/useLightProps.js +73 -0
- package/dist/runtime/models/APIKey.d.ts +2 -0
- package/dist/runtime/models/APIKey.js +20 -0
- package/dist/runtime/models/EventLog.js +5 -1
- package/dist/runtime/models/SystemValue.d.ts +2 -0
- package/dist/runtime/models/SystemValue.js +15 -0
- package/dist/runtime/pages/Permission/all.vue +23 -14
- package/dist/runtime/pages/System/database/table.vue +28 -1
- package/dist/runtime/pages/System/index.vue +1 -1
- package/dist/runtime/pages/System/menu/index.vue +5 -1
- package/dist/runtime/pages/System/setting.vue +2 -0
- package/dist/runtime/pages/System/view_as.vue +4 -1
- package/dist/runtime/pages/SystemValue/index.vue +4 -1
- package/dist/runtime/pages/User/createAccessToken.vue +2 -1
- package/dist/runtime/pages/User/index.vue +2 -2
- package/dist/runtime/pages/User/profile.d.vue.ts +1 -1
- package/dist/runtime/pages/User/profile.vue +48 -5
- package/dist/runtime/pages/User/profile.vue.d.ts +1 -1
- package/dist/runtime/plugin.js +13 -26
- package/package.json +2 -1
- package/dist/runtime/components/MyTest.vue +0 -11
- package/dist/runtime/components/l-dialog-database-field-add.d.vue.ts +0 -9
- package/dist/runtime/components/l-dialog-database-field-add.vue.d.ts +0 -9
- package/dist/runtime/components/l-input-xlsx.d.vue.ts +0 -11
- package/dist/runtime/components/l-input-xlsx.vue +0 -60
- package/dist/runtime/components/l-input-xlsx.vue.d.ts +0 -11
- package/dist/runtime/components/l-select.d.vue.ts +0 -20
- package/dist/runtime/components/l-select.vue.d.ts +0 -20
- package/dist/runtime/components/l-tab.vue +0 -30
- package/dist/runtime/components/l-time-picker.vue +0 -71
- package/dist/runtime/components/{l-action-btn.d.vue.ts → L/ActionBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-action-btn.vue → L/ActionBtn.vue} +0 -0
- package/dist/runtime/components/{l-action-btn.vue.d.ts → L/ActionBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-add-btn.d.vue.ts → L/AddBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-add-btn.vue → L/AddBtn.vue} +0 -0
- package/dist/runtime/components/{l-add-btn.vue.d.ts → L/AddBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-alert.d.vue.ts → L/Alert.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-alert.vue → L/Alert.vue} +0 -0
- package/dist/runtime/components/{l-alert.vue.d.ts → L/Alert.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-app.d.vue.ts → L/App.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-app.vue → L/App.vue} +0 -0
- package/dist/runtime/components/{l-app.vue.d.ts → L/App.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-app-main.d.vue.ts → L/AppMain.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-app-main.vue → L/AppMain.vue} +0 -0
- package/dist/runtime/components/{l-app-main.vue.d.ts → L/AppMain.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-back-btn.d.vue.ts → L/BackBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-back-btn.vue → L/BackBtn.vue} +0 -0
- package/dist/runtime/components/{l-back-btn.vue.d.ts → L/BackBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-banner.d.vue.ts → L/Banner.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-banner.vue → L/Banner.vue} +0 -0
- package/dist/runtime/components/{l-banner.vue.d.ts → L/Banner.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-bar.d.vue.ts → L/Bar.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-bar.vue.d.ts → L/Bar.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-card.d.vue.ts → L/Card.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-card.vue.d.ts → L/Card.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-checkbox.d.vue.ts → L/Checkbox.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-checkbox.vue.d.ts → L/Checkbox.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-col.d.vue.ts → L/Col.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-col.vue → L/Col.vue} +0 -0
- package/dist/runtime/components/{l-col.vue.d.ts → L/Col.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-customizer.vue.d.ts → L/Customizer.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-customizer.vue → L/Customizer.vue} +0 -0
- package/dist/runtime/components/{l-customizer.d.vue.ts → L/Customizer.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-date-picker.d.vue.ts → L/DatePicker.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-date-picker.vue.d.ts → L/DatePicker.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-dialog-upload-files.d.vue.ts → L/DialogUploadFiles.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-dialog-upload-files.vue → L/DialogUploadFiles.vue} +0 -0
- package/dist/runtime/components/{l-dialog-upload-files.vue.d.ts → L/DialogUploadFiles.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop.d.vue.ts → L/DragDrop.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop.vue → L/DragDrop.vue} +0 -0
- package/dist/runtime/components/{l-drag-drop.vue.d.ts → L/DragDrop.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-container.d.vue.ts → L/DragDropContainer.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-container.vue → L/DragDropContainer.vue} +0 -0
- package/dist/runtime/components/{l-drag-drop-container.vue.d.ts → L/DragDropContainer.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-group.d.vue.ts → L/DragDropGroup.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-group.vue → L/DragDropGroup.vue} +0 -0
- package/dist/runtime/components/{l-drag-drop-group.vue.d.ts → L/DragDropGroup.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-edit-btn.d.vue.ts → L/EditBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-edit-btn.vue → L/EditBtn.vue} +0 -0
- package/dist/runtime/components/{l-edit-btn.vue.d.ts → L/EditBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-editor.d.vue.ts → L/Editor.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-editor.vue.d.ts → L/Editor.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-facebook-button.d.vue.ts → L/FacebookButton.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-facebook-button.vue → L/FacebookButton.vue} +0 -0
- package/dist/runtime/components/{l-facebook-button.vue.d.ts → L/FacebookButton.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-fav-menu.d.vue.ts → L/FavMenu.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-fav-menu.vue → L/FavMenu.vue} +0 -0
- package/dist/runtime/components/{l-menu.d.vue.ts → L/FavMenu.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-field.d.vue.ts → L/Field.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-field.vue → L/Field.vue} +0 -0
- package/dist/runtime/components/{l-field.vue.d.ts → L/Field.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file.d.vue.ts → L/File.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file.vue → L/File.vue} +0 -0
- package/dist/runtime/components/{l-file.vue.d.ts → L/File.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-manager.d.vue.ts → L/FileManager.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-file-manager.vue.d.ts → L/FileManager.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-file-manager-breadcrumbs.d.vue.ts → L/FileManagerBreadcrumbs.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-breadcrumbs.vue → L/FileManagerBreadcrumbs.vue} +0 -0
- package/dist/runtime/components/{l-file-manager-breadcrumbs.vue.d.ts → L/FileManagerBreadcrumbs.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-labels.d.vue.ts → L/FileManagerLabels.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-labels.vue → L/FileManagerLabels.vue} +0 -0
- package/dist/runtime/components/{l-file-manager-labels.vue.d.ts → L/FileManagerLabels.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-move.d.vue.ts → L/FileManagerMove.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-move.vue → L/FileManagerMove.vue} +0 -0
- package/dist/runtime/components/{l-file-manager-move.vue.d.ts → L/FileManagerMove.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-preview.d.vue.ts → L/FileManagerPreview.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-preview.vue → L/FileManagerPreview.vue} +0 -0
- package/dist/runtime/components/{l-file-manager-preview.vue.d.ts → L/FileManagerPreview.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-upload.d.vue.ts → L/FileUpload.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-file-upload.vue → L/FileUpload.vue} +0 -0
- package/dist/runtime/components/{l-file-upload.vue.d.ts → L/FileUpload.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-form.d.vue.ts → L/Form.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-form.vue → L/Form.vue} +0 -0
- package/dist/runtime/components/{l-form.vue.d.ts → L/Form.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-form-dialog.d.vue.ts → L/FormDialog.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-form-dialog.vue → L/FormDialog.vue} +0 -0
- package/dist/runtime/components/{l-form-dialog.vue.d.ts → L/FormDialog.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-group-select.d.vue.ts → L/GroupSelect.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-group-select.vue → L/GroupSelect.vue} +0 -0
- package/dist/runtime/components/{l-group-select.vue.d.ts → L/GroupSelect.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-icon-picker.d.vue.ts → L/IconPicker.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-icon-picker.vue.d.ts → L/IconPicker.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-item.d.vue.ts → L/Item.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-item.vue.d.ts → L/Item.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-link.d.vue.ts → L/Link.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-link.vue → L/Link.vue} +0 -0
- package/dist/runtime/components/{l-link.vue.d.ts → L/Link.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-list.d.vue.ts → L/List.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-list.vue.d.ts → L/List.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-login.d.vue.ts → L/Login.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-login.vue → L/Login.vue} +0 -0
- package/dist/runtime/components/{l-login.vue.d.ts → L/Login.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-fav-menu.vue.d.ts → L/Menu.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-menu.vue → L/Menu.vue} +0 -0
- package/dist/runtime/components/{l-menu.vue.d.ts → L/Menu.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-microsoft-button.d.vue.ts → L/MicrosoftButton.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-microsoft-button.vue → L/MicrosoftButton.vue} +0 -0
- package/dist/runtime/components/{l-microsoft-button.vue.d.ts → L/MicrosoftButton.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-page.d.vue.ts → L/Page.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-page.vue.d.ts → L/Page.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-repeater.d.vue.ts → L/Repeater.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-repeater.vue → L/Repeater.vue} +0 -0
- package/dist/runtime/components/{l-repeater.vue.d.ts → L/Repeater.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-row.d.vue.ts → L/Row.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-row.vue → L/Row.vue} +0 -0
- package/dist/runtime/components/{l-row.vue.d.ts → L/Row.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-save-btn.d.vue.ts → L/SaveBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-save-btn.vue → L/SaveBtn.vue} +0 -0
- package/dist/runtime/components/{l-save-btn.vue.d.ts → L/SaveBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-setup-2fa-dialog.d.vue.ts → L/Setup2faDialog.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-setup-2fa-dialog.vue → L/Setup2faDialog.vue} +0 -0
- package/dist/runtime/components/{l-setup-2fa-dialog.vue.d.ts → L/Setup2faDialog.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-small-box.d.vue.ts → L/SmallBox.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-small-box.vue → L/SmallBox.vue} +0 -0
- package/dist/runtime/components/{l-small-box.vue.d.ts → L/SmallBox.vue.d.ts} +1 -1
- /package/dist/runtime/components/{l-statistic.d.vue.ts → L/Statistic.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-statistic.vue → L/Statistic.vue} +0 -0
- /package/dist/runtime/components/{l-statistic.vue.d.ts → L/Statistic.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-view-btn.d.vue.ts → L/System/Setting/logs.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-view-btn.vue.d.ts → L/System/Setting/logs.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-tabs.d.vue.ts → L/Tabs.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-tabs.vue.d.ts → L/Tabs.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-test2.d.vue.ts → L/Test2.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-test2.vue → L/Test2.vue} +0 -0
- /package/dist/runtime/components/{l-test2.vue.d.ts → L/Test2.vue.d.ts} +0 -0
- /package/dist/runtime/components/{user-list.d.vue.ts → L/UserList.d.vue.ts} +0 -0
- /package/dist/runtime/components/{user-list.vue → L/UserList.vue} +0 -0
- /package/dist/runtime/components/{user-list.vue.d.ts → L/UserList.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-view-btn.vue → L/ViewBtn.vue} +0 -0
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ Find and replace all on all files (CMD+SHIFT+F):
|
|
|
17
17
|
This is a Hostlink nuxt-light framework for Nuxt.
|
|
18
18
|
|
|
19
19
|
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
|
+
- [📖 Documentation](https://nuxt-light.netlify.app/)
|
|
20
21
|
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/nuxt-light?file=playground%2Fapp.vue) -->
|
|
21
22
|
<!-- - [📖 Documentation](https://example.com) -->
|
|
22
23
|
|
package/dist/module.d.mts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
3
|
interface ModuleOptions {
|
|
4
|
+
checkPagePermissions?: boolean;
|
|
5
|
+
tableActionIcons?: {
|
|
6
|
+
view?: string;
|
|
7
|
+
edit?: string;
|
|
8
|
+
delete?: string;
|
|
9
|
+
};
|
|
4
10
|
}
|
|
5
11
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
6
12
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -334,6 +334,16 @@ const module$1 = defineNuxtModule({
|
|
|
334
334
|
}, */
|
|
335
335
|
async setup(options, nuxt) {
|
|
336
336
|
const resolver = createResolver(import.meta.url);
|
|
337
|
+
nuxt.options.runtimeConfig = nuxt.options.runtimeConfig || {};
|
|
338
|
+
nuxt.options.runtimeConfig.public = nuxt.options.runtimeConfig.public || {};
|
|
339
|
+
nuxt.options.runtimeConfig.public.light = {
|
|
340
|
+
...nuxt.options.runtimeConfig.public.light || {},
|
|
341
|
+
tableActionIcons: {
|
|
342
|
+
view: options.tableActionIcons?.view,
|
|
343
|
+
edit: options.tableActionIcons?.edit,
|
|
344
|
+
delete: options.tableActionIcons?.delete
|
|
345
|
+
}
|
|
346
|
+
};
|
|
337
347
|
extendPages((pages) => {
|
|
338
348
|
for (const route of routes) {
|
|
339
349
|
if (route.children) {
|
|
@@ -392,6 +402,30 @@ const module$1 = defineNuxtModule({
|
|
|
392
402
|
content += `(await import('${file}')).default();
|
|
393
403
|
`;
|
|
394
404
|
}
|
|
405
|
+
addPluginTemplate({
|
|
406
|
+
filename: "light.auth.mjs",
|
|
407
|
+
mode: "client",
|
|
408
|
+
getContents: () => {
|
|
409
|
+
if (options.checkPagePermissions === false) {
|
|
410
|
+
return `import { defineNuxtPlugin } from '#app'
|
|
411
|
+
export default defineNuxtPlugin(() => {})`;
|
|
412
|
+
}
|
|
413
|
+
return `import { addRouteMiddleware, defineNuxtPlugin } from '#app'
|
|
414
|
+
import { query as q } from '@hostlink/light'
|
|
415
|
+
export default defineNuxtPlugin(() => {
|
|
416
|
+
addRouteMiddleware("auth", async (to) => {
|
|
417
|
+
if (to.path === "/") return;
|
|
418
|
+
const { my } = await q({
|
|
419
|
+
my: { allowedPath: { __args: { path: to.path } } }
|
|
420
|
+
});
|
|
421
|
+
if (!my) return;
|
|
422
|
+
if (!my.allowedPath) {
|
|
423
|
+
return "/page_not_found?path=" + encodeURIComponent(to.fullPath);
|
|
424
|
+
}
|
|
425
|
+
}, { global: true });
|
|
426
|
+
})`;
|
|
427
|
+
}
|
|
428
|
+
});
|
|
395
429
|
addPluginTemplate({
|
|
396
430
|
filename: `light.module.options.mjs`,
|
|
397
431
|
mode: "client",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useLight } from "#imports";
|
|
3
|
-
import { QBar } from "quasar";
|
|
4
3
|
import { computed } from "vue";
|
|
5
4
|
const props = defineProps({
|
|
6
5
|
color: { type: String, required: false, default: void 0 },
|
|
@@ -18,7 +17,7 @@ const barClass = computed(() => {
|
|
|
18
17
|
</script>
|
|
19
18
|
|
|
20
19
|
<template>
|
|
21
|
-
<q-bar :class="barClass">
|
|
20
|
+
<q-bar :class="barClass" :dense="props.dense">
|
|
22
21
|
<slot></slot>
|
|
23
22
|
</q-bar>
|
|
24
23
|
</template>
|
|
@@ -9,7 +9,6 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
default?: (props: typeof __VLS_10) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<LBtnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LBtnProps> & Readonly<{}>, {
|
|
12
|
-
color: import("quasar").NamedColor;
|
|
13
12
|
permission: string;
|
|
14
13
|
confirmMessage: string;
|
|
15
14
|
confirmTitle: string;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useQuasar
|
|
3
|
-
import { computed } from "vue";
|
|
2
|
+
import { useQuasar } from "quasar";
|
|
3
|
+
import { computed, useAttrs } from "vue";
|
|
4
|
+
import useLight from "../../composables/useLight";
|
|
5
|
+
import { useLightButtonDefaults } from "../../composables/useLightProps";
|
|
6
|
+
defineOptions({ inheritAttrs: false });
|
|
4
7
|
const props = defineProps({
|
|
5
8
|
size: { type: null, required: false },
|
|
6
9
|
type: { type: null, required: false },
|
|
@@ -21,7 +24,7 @@ const props = defineProps({
|
|
|
21
24
|
fab: { type: Boolean, required: false, skipCheck: true },
|
|
22
25
|
fabMini: { type: Boolean, required: false, skipCheck: true },
|
|
23
26
|
padding: { type: null, required: false },
|
|
24
|
-
color: { type: null, required: false
|
|
27
|
+
color: { type: null, required: false },
|
|
25
28
|
textColor: { type: null, required: false },
|
|
26
29
|
noCaps: { type: Boolean, required: false, skipCheck: true },
|
|
27
30
|
noWrap: { type: Boolean, required: false, skipCheck: true },
|
|
@@ -42,30 +45,30 @@ const props = defineProps({
|
|
|
42
45
|
confirmTitle: { type: String, required: false, default: "Confirm" }
|
|
43
46
|
});
|
|
44
47
|
const $q = useQuasar();
|
|
45
|
-
const
|
|
46
|
-
const
|
|
48
|
+
const light = useLight();
|
|
49
|
+
const attrs = useAttrs();
|
|
50
|
+
const L_KEYS = ["permission", "confirmMessage", "confirmTitle"];
|
|
51
|
+
const handleClick = (evt) => {
|
|
47
52
|
if (props.confirmMessage) {
|
|
48
53
|
$q.dialog({
|
|
49
54
|
title: props.confirmTitle,
|
|
50
55
|
message: props.confirmMessage,
|
|
51
56
|
ok: "Yes",
|
|
52
57
|
cancel: "No"
|
|
53
|
-
}).onOk(() =>
|
|
54
|
-
onClick?.(evt);
|
|
55
|
-
});
|
|
58
|
+
}).onOk(() => props.onClick?.(evt));
|
|
56
59
|
} else {
|
|
57
|
-
onClick?.(evt);
|
|
60
|
+
props.onClick?.(evt);
|
|
58
61
|
}
|
|
59
62
|
};
|
|
60
|
-
const
|
|
61
|
-
|
|
63
|
+
const base = useLightButtonDefaults(props, attrs, L_KEYS);
|
|
64
|
+
const btnProps = computed(() => {
|
|
65
|
+
const { onClick, ...rest } = base.value;
|
|
62
66
|
return rest;
|
|
63
67
|
});
|
|
64
68
|
</script>
|
|
65
69
|
|
|
66
70
|
<template>
|
|
67
|
-
<q-btn v-if="
|
|
68
|
-
|
|
69
|
-
<slot></slot>
|
|
71
|
+
<q-btn v-if="light.isGranted(props.permission)" v-bind="btnProps" @click="handleClick">
|
|
72
|
+
<slot />
|
|
70
73
|
</q-btn>
|
|
71
74
|
</template>
|
|
@@ -9,7 +9,6 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
default?: (props: typeof __VLS_10) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<LBtnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LBtnProps> & Readonly<{}>, {
|
|
12
|
-
color: import("quasar").NamedColor;
|
|
13
12
|
permission: string;
|
|
14
13
|
confirmMessage: string;
|
|
15
14
|
confirmTitle: string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useLight, q, m } from "#imports";
|
|
3
|
-
import { ref, computed, onMounted } from "vue";
|
|
3
|
+
import { ref, computed, onMounted, useAttrs } from "vue";
|
|
4
4
|
import { useStorage } from "@vueuse/core";
|
|
5
|
+
import { useLightCardDefaults } from "../../composables/useLightProps";
|
|
6
|
+
defineOptions({ inheritAttrs: false });
|
|
5
7
|
const emit = defineEmits(["close"]);
|
|
6
8
|
const minimized = defineModel("minimized", { type: Boolean, ...{ default: false } });
|
|
7
9
|
const maximized = defineModel("maximized", { type: Boolean, ...{ default: false } });
|
|
@@ -20,13 +22,13 @@ const props = defineProps({
|
|
|
20
22
|
bordered: { type: Boolean, required: false, skipCheck: true, default: void 0 },
|
|
21
23
|
tag: { type: null, required: false }
|
|
22
24
|
});
|
|
25
|
+
const vAttrs = useAttrs();
|
|
26
|
+
const L_KEYS = ["loading", "title", "permission", "closeable", "minimizable", "maximizable", "name", "minimized", "maximized", "onUpdate:minimized", "onUpdate:maximized"];
|
|
23
27
|
const storedMinimized = props.name ? useStorage(`l-card-minimized-${props.name}`, false) : ref(false);
|
|
24
28
|
if (props.name && storedMinimized.value) {
|
|
25
29
|
minimized.value = storedMinimized.value;
|
|
26
30
|
}
|
|
27
|
-
const
|
|
28
|
-
return { ...light.styles.card, ...Object.fromEntries(Object.entries(props).filter(([key, value]) => value !== void 0)) };
|
|
29
|
-
});
|
|
31
|
+
const cardProps = useLightCardDefaults(props, vAttrs, L_KEYS);
|
|
30
32
|
const barClass = computed(() => {
|
|
31
33
|
const c = ["text-white"];
|
|
32
34
|
const color = light.color;
|
|
@@ -39,7 +41,7 @@ const showBar = computed(() => {
|
|
|
39
41
|
if (props.minimizable) return true;
|
|
40
42
|
if (props.title !== void 0) return true;
|
|
41
43
|
if (showSecurity.value) return true;
|
|
42
|
-
if (
|
|
44
|
+
if (vAttrs.actions) return true;
|
|
43
45
|
return false;
|
|
44
46
|
});
|
|
45
47
|
const showSecurity = computed(() => {
|
|
@@ -100,7 +102,7 @@ const onMinimize = () => {
|
|
|
100
102
|
</script>
|
|
101
103
|
|
|
102
104
|
<template>
|
|
103
|
-
<q-card v-bind="
|
|
105
|
+
<q-card v-bind="cardProps" :class="{ 'fullscreen': maximized, 'no-margin': maximized }"
|
|
104
106
|
v-if="$light.isGranted(permission)" :dark="$q.dark.isActive">
|
|
105
107
|
<q-bar :class="barClass" v-if="showBar">
|
|
106
108
|
<div>{{ $t(title ?? "") }}</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import {} from "quasar";
|
|
3
|
-
|
|
3
|
+
import { useLightLabel } from "../../composables/useLightProps";
|
|
4
|
+
const props = defineProps({
|
|
4
5
|
name: { type: null, required: false },
|
|
5
6
|
size: { type: null, required: false },
|
|
6
7
|
modelValue: { type: null, required: true },
|
|
@@ -23,10 +24,11 @@ defineProps({
|
|
|
23
24
|
tabindex: { type: null, required: false },
|
|
24
25
|
"onUpdate:modelValue": { type: Function, required: false }
|
|
25
26
|
});
|
|
27
|
+
const translatedLabel = useLightLabel(props);
|
|
26
28
|
</script>
|
|
27
29
|
|
|
28
30
|
<template>
|
|
29
|
-
<q-checkbox v-bind="$props" :label="
|
|
31
|
+
<q-checkbox v-bind="$props" :label="translatedLabel">
|
|
30
32
|
<slot></slot>
|
|
31
33
|
</q-checkbox>
|
|
32
34
|
</template>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, computed, watch,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { ref, computed, watch, useAttrs } from "vue";
|
|
3
|
+
import {} from "quasar";
|
|
4
|
+
import { useLightInputDefaults } from "../../composables/useLightProps";
|
|
5
|
+
defineOptions({ inheritAttrs: false });
|
|
5
6
|
const modelValue = defineModel({ type: null, ...{
|
|
6
7
|
type: [String, Object, null],
|
|
7
8
|
default: null
|
|
@@ -86,115 +87,96 @@ const props = defineProps({
|
|
|
86
87
|
onBlur: { type: Function, required: false },
|
|
87
88
|
onClear: { type: Function, required: false }
|
|
88
89
|
});
|
|
89
|
-
const
|
|
90
|
+
const attrs = useAttrs();
|
|
91
|
+
const DATE_KEYS = [
|
|
92
|
+
"range",
|
|
93
|
+
"todayBtn",
|
|
94
|
+
"locale",
|
|
95
|
+
"calendar",
|
|
96
|
+
"defaultYearMonth",
|
|
97
|
+
"defaultView",
|
|
98
|
+
"events",
|
|
99
|
+
"eventColor",
|
|
100
|
+
"emitImmediately",
|
|
101
|
+
"yearsInMonthView",
|
|
102
|
+
"navigationMinYearMonth",
|
|
103
|
+
"navigationMaxYearMonth",
|
|
104
|
+
"noUnset",
|
|
105
|
+
"firstDayOfWeek",
|
|
106
|
+
"minimal",
|
|
107
|
+
"options",
|
|
108
|
+
"subtitle",
|
|
109
|
+
"title"
|
|
110
|
+
];
|
|
90
111
|
const popup = ref(null);
|
|
91
|
-
const inputValue =
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const inputRules = computed(() => {
|
|
116
|
-
const rules = [];
|
|
117
|
-
if (!props.range) {
|
|
118
|
-
rules.push((val) => {
|
|
119
|
-
if (val) {
|
|
120
|
-
if (!val.match(/^\d{4}-\d{2}-\d{2}$/)) {
|
|
121
|
-
return "Invalid date format";
|
|
112
|
+
const inputValue = computed({
|
|
113
|
+
get() {
|
|
114
|
+
if (!modelValue.value) return "";
|
|
115
|
+
if (typeof modelValue.value === "object" && modelValue.value.from) {
|
|
116
|
+
return modelValue.value.from + (modelValue.value.to ? " to " + modelValue.value.to : "");
|
|
117
|
+
}
|
|
118
|
+
return modelValue.value || "";
|
|
119
|
+
},
|
|
120
|
+
set(val) {
|
|
121
|
+
if (!val) {
|
|
122
|
+
modelValue.value = null;
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (props.range) {
|
|
126
|
+
const parts = val.split(" to ");
|
|
127
|
+
if (parts.length === 2) {
|
|
128
|
+
const [from, to] = parts;
|
|
129
|
+
if (from.match(/^\d{4}-\d{2}-\d{2}$/) && to.match(/^\d{4}-\d{2}-\d{2}$/)) {
|
|
130
|
+
modelValue.value = { from, to };
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (from.match(/^\d{4}-\d{2}-\d{2}$/) && !to) {
|
|
134
|
+
modelValue.value = from;
|
|
135
|
+
return;
|
|
122
136
|
}
|
|
123
137
|
}
|
|
124
|
-
|
|
125
|
-
|
|
138
|
+
modelValue.value = null;
|
|
139
|
+
} else {
|
|
140
|
+
modelValue.value = val;
|
|
141
|
+
}
|
|
126
142
|
}
|
|
127
|
-
return null;
|
|
128
143
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
144
|
+
watch(modelValue, (val) => {
|
|
145
|
+
if (!props.range || typeof val === "object" && val?.from && val?.to) {
|
|
146
|
+
popup.value?.hide();
|
|
147
|
+
}
|
|
148
|
+
}, { deep: true });
|
|
149
|
+
const inputMask = computed(
|
|
150
|
+
() => props.range ? "####-##-## to ####-##-##" : "####-##-##"
|
|
151
|
+
);
|
|
152
|
+
const inputRules = computed(() => {
|
|
153
|
+
if (props.range) return [];
|
|
154
|
+
return [(val) => {
|
|
155
|
+
if (val && !val.match(/^\d{4}-\d{2}-\d{2}$/))
|
|
156
|
+
return "Invalid date format";
|
|
157
|
+
}];
|
|
133
158
|
});
|
|
159
|
+
const base = useLightInputDefaults(props, attrs, DATE_KEYS);
|
|
160
|
+
const inputProps = computed(() => ({
|
|
161
|
+
...base.value,
|
|
162
|
+
mask: inputMask.value,
|
|
163
|
+
rules: inputRules.value
|
|
164
|
+
}));
|
|
165
|
+
const SHARED_KEYS = ["color", "dark", "disable", "readonly"];
|
|
134
166
|
const dateProps = computed(() => {
|
|
135
|
-
const {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
rounded,
|
|
140
|
-
dense,
|
|
141
|
-
square,
|
|
142
|
-
stackLabel,
|
|
143
|
-
color,
|
|
144
|
-
mask,
|
|
145
|
-
rules,
|
|
146
|
-
hint,
|
|
147
|
-
hideHint,
|
|
148
|
-
prefix,
|
|
149
|
-
suffix,
|
|
150
|
-
loading,
|
|
151
|
-
clearable,
|
|
152
|
-
clearIcon,
|
|
153
|
-
hideBottomSpace,
|
|
154
|
-
counter,
|
|
155
|
-
maxlength,
|
|
156
|
-
disable,
|
|
157
|
-
readonly,
|
|
158
|
-
autofocus,
|
|
159
|
-
inputClass,
|
|
160
|
-
inputStyle,
|
|
161
|
-
type,
|
|
162
|
-
debounce,
|
|
163
|
-
...rest
|
|
164
|
-
} = props;
|
|
165
|
-
return rest;
|
|
166
|
-
});
|
|
167
|
-
const onUpdateInput = (val) => {
|
|
168
|
-
isInternalUpdate.value = true;
|
|
169
|
-
if (props.range) {
|
|
170
|
-
if (val == null || val === "") {
|
|
171
|
-
modelValue.value = null;
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
const parts = val.split(" to ");
|
|
175
|
-
if (parts.length === 2) {
|
|
176
|
-
const from = parts[0] || "";
|
|
177
|
-
const to = parts[1] || "";
|
|
178
|
-
if (from.match(/^\d{4}-\d{2}-\d{2}$/) && to.match(/^\d{4}-\d{2}-\d{2}$/)) {
|
|
179
|
-
modelValue.value = { from, to };
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
if (from.match(/^\d{4}-\d{2}-\d{2}$/) && to === "") {
|
|
183
|
-
modelValue.value = from;
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
modelValue.value = null;
|
|
188
|
-
return;
|
|
167
|
+
const result = {};
|
|
168
|
+
for (const key of [...DATE_KEYS, ...SHARED_KEYS]) {
|
|
169
|
+
const val = props[key];
|
|
170
|
+
if (val !== void 0) result[key] = val;
|
|
189
171
|
}
|
|
190
|
-
|
|
191
|
-
};
|
|
172
|
+
return result;
|
|
173
|
+
});
|
|
192
174
|
</script>
|
|
193
175
|
|
|
194
176
|
<template>
|
|
195
|
-
<q-input :
|
|
196
|
-
v-
|
|
197
|
-
<template
|
|
177
|
+
<q-input :model-value="inputValue" @update:model-value="inputValue = $event"
|
|
178
|
+
v-bind="inputProps">
|
|
179
|
+
<template #prepend>
|
|
198
180
|
<q-icon name="sym_o_event" class="cursor-pointer">
|
|
199
181
|
<q-popup-proxy cover transition-show="scale" transition-hide="scale" ref="popup">
|
|
200
182
|
<q-date mask="YYYY-MM-DD" v-model="modelValue" v-bind="dateProps">
|
|
@@ -206,8 +188,8 @@ const onUpdateInput = (val) => {
|
|
|
206
188
|
</q-icon>
|
|
207
189
|
</template>
|
|
208
190
|
|
|
209
|
-
<template v-for="(
|
|
210
|
-
<slot :name="name" v-bind="
|
|
191
|
+
<template v-for="(_, name) in $slots" #[name]="slotProps" :key="name">
|
|
192
|
+
<slot :name="name" v-bind="slotProps ?? {}"></slot>
|
|
211
193
|
</template>
|
|
212
194
|
</q-input>
|
|
213
195
|
</template>
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
declare const _default: typeof __VLS_export;
|
|
2
2
|
export default _default;
|
|
3
|
-
declare const __VLS_export:
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<{
|
|
8
|
+
icon?: any;
|
|
4
9
|
to?: any;
|
|
5
10
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
11
|
submit: (...args: any[]) => void;
|
|
7
12
|
}, string, import("vue").PublicProps, Readonly<{
|
|
13
|
+
icon?: any;
|
|
8
14
|
to?: any;
|
|
9
15
|
}> & Readonly<{
|
|
10
16
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
11
17
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
type __VLS_Slots = {
|
|
19
|
+
default?: ((props: {}) => any) | undefined;
|
|
20
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useQuasar } from "quasar";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
4
|
const { t } = useI18n();
|
|
5
|
-
const props = defineProps(["to"]);
|
|
5
|
+
const props = defineProps(["to", "icon"]);
|
|
6
6
|
const emit = defineEmits(["submit"]);
|
|
7
7
|
const qua = useQuasar();
|
|
8
8
|
const onDelete = () => {
|
|
@@ -19,5 +19,7 @@ const onDelete = () => {
|
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<template>
|
|
22
|
-
<q-btn flat round icon="sym_o_delete" @click="onDelete"
|
|
22
|
+
<q-btn flat round :icon="icon || 'sym_o_delete'" @click="onDelete">
|
|
23
|
+
<slot></slot>
|
|
24
|
+
</q-btn>
|
|
23
25
|
</template>
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
declare const _default: typeof __VLS_export;
|
|
2
2
|
export default _default;
|
|
3
|
-
declare const __VLS_export:
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<{
|
|
8
|
+
icon?: any;
|
|
4
9
|
to?: any;
|
|
5
10
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
11
|
submit: (...args: any[]) => void;
|
|
7
12
|
}, string, import("vue").PublicProps, Readonly<{
|
|
13
|
+
icon?: any;
|
|
8
14
|
to?: any;
|
|
9
15
|
}> & Readonly<{
|
|
10
16
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
11
17
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
type __VLS_Slots = {
|
|
19
|
+
default?: ((props: {}) => any) | undefined;
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
field: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
default: null;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
hide: (...args: any[]) => void;
|
|
10
|
+
ok: (...args: any[]) => void;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
field: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
}>> & Readonly<{
|
|
17
|
+
onHide?: ((...args: any[]) => any) | undefined;
|
|
18
|
+
onOk?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
field: Record<string, any>;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/runtime/components/{l-dialog-database-field-add.vue → L/DialogDatabaseFieldAdd.vue}
RENAMED
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useDialogPluginComponent } from "quasar";
|
|
3
3
|
const props = defineProps({
|
|
4
|
-
|
|
4
|
+
field: {
|
|
5
|
+
type: Object,
|
|
6
|
+
default: null
|
|
7
|
+
}
|
|
5
8
|
});
|
|
6
|
-
defineEmits([
|
|
7
|
-
// REQUIRED; need to specify some events that your
|
|
8
|
-
// component will emit through useDialogPluginComponent()
|
|
9
|
-
...useDialogPluginComponent.emits
|
|
10
|
-
]);
|
|
9
|
+
defineEmits([...useDialogPluginComponent.emits]);
|
|
11
10
|
const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } = useDialogPluginComponent();
|
|
12
11
|
function onOKClick(value) {
|
|
13
12
|
onDialogOK(value);
|
|
14
13
|
}
|
|
15
14
|
const types = ["varchar", "int", "date", "time", "datetime", "timestamp", "text", "blob", "json", "jsonb", "uuid", "boolean", "decimal", "float", "double", "real", "numeric", "smallint", "bigint", "tinyint", "mediumint", "char", "binary", "varbinary", "enum"];
|
|
15
|
+
const isEdit = !!props.field;
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<template>
|
|
19
19
|
<q-dialog ref="dialogRef">
|
|
20
20
|
<q-card class="q-dialog-plugin">
|
|
21
21
|
<q-toolbar>
|
|
22
|
-
<q-toolbar-title>Add Field</q-toolbar-title>
|
|
22
|
+
<q-toolbar-title>{{ isEdit ? 'Edit Field' : 'Add Field' }}</q-toolbar-title>
|
|
23
23
|
<q-space />
|
|
24
24
|
<q-btn dense flat icon="sym_o_close" v-close-popup />
|
|
25
25
|
</q-toolbar>
|
|
26
26
|
<form-kit type="l-form" :bordered="false" @submit="onOKClick" :value="{
|
|
27
|
-
name: '',
|
|
28
|
-
type: '',
|
|
29
|
-
length: '',
|
|
30
|
-
default: '',
|
|
31
|
-
nullable: false,
|
|
32
|
-
autoincrement: false
|
|
27
|
+
name: field?.name ?? '',
|
|
28
|
+
type: field?.type ?? '',
|
|
29
|
+
length: field?.length ?? '',
|
|
30
|
+
default: field?.default ?? '',
|
|
31
|
+
nullable: field?.nullable ?? false,
|
|
32
|
+
autoincrement: field?.autoincrement ?? false
|
|
33
33
|
}">
|
|
34
|
-
<form-kit type="l-input" name="name" label="Name" validation="required" />
|
|
34
|
+
<form-kit type="l-input" name="name" label="Name" validation="required" :disabled="isEdit" />
|
|
35
35
|
<form-kit type="l-select" name="type" label="Type" :options="types" validation="required" />
|
|
36
36
|
<form-kit type="l-input" name="length" label="Length" />
|
|
37
37
|
<form-kit type="l-input" name="default" label="Default" />
|
|
38
38
|
<form-kit type="l-checkbox" name="nullable" label="Nullable" />
|
|
39
39
|
<form-kit type="l-checkbox" name="autoincrement" label="Auto increment" />
|
|
40
40
|
</form-kit>
|
|
41
|
-
|
|
42
41
|
</q-card>
|
|
43
42
|
</q-dialog>
|
|
44
43
|
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
field: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
default: null;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
hide: (...args: any[]) => void;
|
|
10
|
+
ok: (...args: any[]) => void;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
field: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
}>> & Readonly<{
|
|
17
|
+
onHide?: ((...args: any[]) => any) | undefined;
|
|
18
|
+
onOk?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
field: Record<string, any>;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|