@darkfrost-1107/scaff-z-react 0.1.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/LICENSE.md +5 -0
- package/README.md +75 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/action-processor.d.ts +2 -0
- package/dist/app/config/sqlite.registry.cjs +1 -0
- package/dist/app/config/sqlite.registry.esm +37 -0
- package/dist/app.config.d.ts +1 -0
- package/dist/async-combobox.input.d.ts +4 -0
- package/dist/async-multi-select.input.d.ts +4 -0
- package/dist/async-select.input.d.ts +4 -0
- package/dist/audit-view.d.ts +2 -0
- package/dist/back-button.action.d.ts +6 -0
- package/dist/badge.d.ts +2 -0
- package/dist/base.connector.d.ts +4 -0
- package/dist/base.entity.d.ts +2 -0
- package/dist/base.node.d.ts +2 -0
- package/dist/base.service.d.ts +4 -0
- package/dist/breadcrumb.d.ts +2 -0
- package/dist/build.router.d.ts +4 -0
- package/dist/builder-device.guard.d.ts +2 -0
- package/dist/builder.d.ts +2 -0
- package/dist/button.d.ts +2 -0
- package/dist/calendar.d.ts +2 -0
- package/dist/canvas-view.layout.d.ts +2 -0
- package/dist/card.d.ts +2 -0
- package/dist/checkbox-inline.input.d.ts +4 -0
- package/dist/checkbox.d.ts +2 -0
- package/dist/checkbox.input.d.ts +4 -0
- package/dist/code.input.d.ts +4 -0
- package/dist/color.input.d.ts +4 -0
- package/dist/combobox.d.ts +2 -0
- package/dist/combobox.input.d.ts +4 -0
- package/dist/command.d.ts +2 -0
- package/dist/component.factory.d.ts +4 -0
- package/dist/component.guard.d.ts +2 -0
- package/dist/components.registry.d.ts +2 -0
- package/dist/context.guard.d.ts +2 -0
- package/dist/context.verifier.d.ts +2 -0
- package/dist/crypto.service.d.ts +2 -0
- package/dist/dark.style.d.ts +2 -0
- package/dist/data-table.component.d.ts +2 -0
- package/dist/data-table.provider.d.ts +1 -0
- package/dist/date.input.d.ts +2 -0
- package/dist/deckgl-overlay.d.ts +2 -0
- package/dist/detail-tabs.layout.d.ts +6 -0
- package/dist/detail-view.layout.d.ts +6 -0
- package/dist/device-artifact.guard.d.ts +2 -0
- package/dist/device.guard.d.ts +2 -0
- package/dist/device.verifier.registry.d.ts +2 -0
- package/dist/dialog.d.ts +2 -0
- package/dist/dnd.provider.d.ts +2 -0
- package/dist/draggeable.d.ts +2 -0
- package/dist/droppable.d.ts +2 -0
- package/dist/droppeable.d.ts +2 -0
- package/dist/dynamic-device.guard.d.ts +2 -0
- package/dist/dynamic-icon.d.ts +6 -0
- package/dist/email.input.d.ts +4 -0
- package/dist/enum.verifier.d.ts +2 -0
- package/dist/env.manager.d.ts +2 -0
- package/dist/feedback.layout.d.ts +2 -0
- package/dist/field.d.ts +2 -0
- package/dist/file.input.d.ts +4 -0
- package/dist/flow-canvas.d.ts +2 -0
- package/dist/flow.renderer.d.ts +2 -0
- package/dist/flow.types.d.ts +1 -0
- package/dist/form-dialog-layout.d.ts +4 -0
- package/dist/form-tab-layout.d.ts +4 -0
- package/dist/form.component.d.ts +2 -0
- package/dist/grid.layout.d.ts +2 -0
- package/dist/guard.d.ts +2 -0
- package/dist/hover.d.ts +2 -0
- package/dist/icon-box.d.ts +2 -0
- package/dist/icon-button.d.ts +2 -0
- package/dist/image.input.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/indexeddb.service.d.ts +6 -0
- package/dist/input-group.d.ts +2 -0
- package/dist/input.d.ts +2 -0
- package/dist/interceptor.builder.d.ts +2 -0
- package/dist/label.d.ts +2 -0
- package/dist/language-toggle.d.ts +2 -0
- package/dist/list-select.input.d.ts +4 -0
- package/dist/logger.d.ts +2 -0
- package/dist/main.connector.d.ts +2 -0
- package/dist/main.service.d.ts +6 -0
- package/dist/maps.renderer.d.ts +4 -0
- package/dist/marker.factory.d.ts +2 -0
- package/dist/marker.guard.d.ts +2 -0
- package/dist/markers.meta.d.ts +1 -0
- package/dist/modules/actions/entities/action.entity.cjs +1 -0
- package/dist/modules/actions/entities/action.entity.esm +139 -0
- package/dist/modules/artifacts/entities/artifact.entity.cjs +1 -0
- package/dist/modules/artifacts/entities/artifact.entity.esm +82 -0
- package/dist/modules/integrations/entities/integration.entity.cjs +1 -0
- package/dist/modules/integrations/entities/integration.entity.esm +75 -0
- package/dist/modules/inventory/entities/category.entity.cjs +1 -0
- package/dist/modules/inventory/entities/category.entity.esm +50 -0
- package/dist/modules/inventory/entities/inventory-item.entity.cjs +1 -0
- package/dist/modules/inventory/entities/inventory-item.entity.esm +68 -0
- package/dist/modules/inventory/entities/product-item.entity.cjs +1 -0
- package/dist/modules/inventory/entities/product-item.entity.esm +69 -0
- package/dist/modules/inventory/entities/zone.entity.cjs +1 -0
- package/dist/modules/inventory/entities/zone.entity.esm +50 -0
- package/dist/modules/memberships/entities/membership.entity.cjs +1 -0
- package/dist/modules/memberships/entities/membership.entity.esm +53 -0
- package/dist/modules/organizations/entities/organization.entity.cjs +1 -0
- package/dist/modules/organizations/entities/organization.entity.esm +75 -0
- package/dist/modules/projects/entities/project.entity.cjs +1 -0
- package/dist/modules/projects/entities/project.entity.esm +100 -0
- package/dist/modules/test/entities/experiment.entity.cjs +1 -0
- package/dist/modules/test/entities/experiment.entity.esm +71 -0
- package/dist/modules/tickets/entities/ticket.entity.cjs +1 -0
- package/dist/modules/tickets/entities/ticket.entity.esm +92 -0
- package/dist/modules/tools/entities/tool.entity.cjs +1 -0
- package/dist/modules/tools/entities/tool.entity.esm +129 -0
- package/dist/modules/users/entities/user-role.enum.cjs +1 -0
- package/dist/modules/users/entities/user-role.enum.esm +6 -0
- package/dist/modules/users/entities/user.entity.cjs +1 -0
- package/dist/modules/users/entities/user.entity.esm +88 -0
- package/dist/nfc.service.d.ts +6 -0
- package/dist/nosql.repo.d.ts +2 -0
- package/dist/nosql.repo.service.d.ts +4 -0
- package/dist/packages/capacitor/app.config.cjs +1 -0
- package/dist/packages/capacitor/app.config.d.ts +1 -0
- package/dist/packages/capacitor/app.config.esm +7 -0
- package/dist/packages/crypto/crypto.service.cjs +1 -0
- package/dist/packages/crypto/crypto.service.d.ts +6 -0
- package/dist/packages/crypto/crypto.service.esm +17 -0
- package/dist/packages/crypto/index.cjs +1 -0
- package/dist/packages/crypto/index.d.ts +1 -0
- package/dist/packages/crypto/index.esm +2 -0
- package/dist/packages/dnd/dnd.provider.cjs +1 -0
- package/dist/packages/dnd/dnd.provider.d.ts +3 -0
- package/dist/packages/dnd/dnd.provider.esm +8 -0
- package/dist/packages/dnd/draggeable.cjs +1 -0
- package/dist/packages/dnd/draggeable.d.ts +4 -0
- package/dist/packages/dnd/draggeable.esm +12 -0
- package/dist/packages/dnd/droppable.cjs +1 -0
- package/dist/packages/dnd/droppable.d.ts +8 -0
- package/dist/packages/dnd/droppable.esm +14 -0
- package/dist/packages/dnd/droppeable.cjs +1 -0
- package/dist/packages/dnd/droppeable.d.ts +5 -0
- package/dist/packages/dnd/droppeable.esm +13 -0
- package/dist/packages/dnd/sortable.cjs +1 -0
- package/dist/packages/dnd/sortable.d.ts +11 -0
- package/dist/packages/dnd/sortable.esm +18 -0
- package/dist/packages/env/env.manager.cjs +1 -0
- package/dist/packages/env/env.manager.d.ts +11 -0
- package/dist/packages/env/env.manager.esm +69 -0
- package/dist/packages/env/index.cjs +1 -0
- package/dist/packages/env/index.d.ts +1 -0
- package/dist/packages/env/index.esm +2 -0
- package/dist/packages/flow/flow.renderer.cjs +1 -0
- package/dist/packages/flow/flow.renderer.d.ts +13 -0
- package/dist/packages/flow/flow.renderer.esm +50 -0
- package/dist/packages/flow/flow.types.cjs +0 -0
- package/dist/packages/flow/flow.types.d.ts +30 -0
- package/dist/packages/flow/flow.types.esm +0 -0
- package/dist/packages/formatters/qr-code/qr.encoder.service.cjs +1 -0
- package/dist/packages/formatters/qr-code/qr.encoder.service.d.ts +5 -0
- package/dist/packages/formatters/qr-code/qr.encoder.service.esm +17 -0
- package/dist/packages/formatters/qr-code/qr.renderer.cjs +1 -0
- package/dist/packages/formatters/qr-code/qr.renderer.d.ts +3 -0
- package/dist/packages/formatters/qr-code/qr.renderer.esm +16 -0
- package/dist/packages/formatters/text-code/text-coder.service.cjs +1 -0
- package/dist/packages/formatters/text-code/text-coder.service.d.ts +9 -0
- package/dist/packages/formatters/text-code/text-coder.service.esm +36 -0
- package/dist/packages/i18n/index.cjs +1 -0
- package/dist/packages/i18n/index.d.ts +10 -0
- package/dist/packages/i18n/index.esm +18 -0
- package/dist/packages/i18n/language-toggle.cjs +1 -0
- package/dist/packages/i18n/language-toggle.d.ts +9 -0
- package/dist/packages/i18n/language-toggle.esm +73 -0
- package/dist/packages/indexeddb/builder.cjs +1 -0
- package/dist/packages/indexeddb/builder.d.ts +13 -0
- package/dist/packages/indexeddb/builder.esm +35 -0
- package/dist/packages/indexeddb/index.cjs +1 -0
- package/dist/packages/indexeddb/index.d.ts +5 -0
- package/dist/packages/indexeddb/index.esm +5 -0
- package/dist/packages/indexeddb/indexeddb.service.cjs +1 -0
- package/dist/packages/indexeddb/indexeddb.service.d.ts +21 -0
- package/dist/packages/indexeddb/indexeddb.service.esm +59 -0
- package/dist/packages/indexeddb/nosql.repo.cjs +1 -0
- package/dist/packages/indexeddb/nosql.repo.d.ts +33 -0
- package/dist/packages/indexeddb/nosql.repo.esm +69 -0
- package/dist/packages/indexeddb/nosql.repo.service.cjs +1 -0
- package/dist/packages/indexeddb/nosql.repo.service.d.ts +46 -0
- package/dist/packages/indexeddb/nosql.repo.service.esm +87 -0
- package/dist/packages/indexeddb/registry.cjs +1 -0
- package/dist/packages/indexeddb/registry.d.ts +21 -0
- package/dist/packages/indexeddb/registry.esm +22 -0
- package/dist/packages/indexeddb/types.cjs +0 -0
- package/dist/packages/indexeddb/types.d.ts +33 -0
- package/dist/packages/indexeddb/types.esm +0 -0
- package/dist/packages/logger/index.cjs +1 -0
- package/dist/packages/logger/index.d.ts +2 -0
- package/dist/packages/logger/index.esm +3 -0
- package/dist/packages/logger/logger.cjs +1 -0
- package/dist/packages/logger/logger.d.ts +137 -0
- package/dist/packages/logger/logger.esm +186 -0
- package/dist/packages/logger/registry.cjs +1 -0
- package/dist/packages/logger/registry.d.ts +9 -0
- package/dist/packages/logger/registry.esm +17 -0
- package/dist/packages/maps/deckgl-overlay.cjs +1 -0
- package/dist/packages/maps/deckgl-overlay.d.ts +9 -0
- package/dist/packages/maps/deckgl-overlay.esm +12 -0
- package/dist/packages/maps/maps.renderer.cjs +1 -0
- package/dist/packages/maps/maps.renderer.d.ts +19 -0
- package/dist/packages/maps/maps.renderer.esm +25 -0
- package/dist/packages/maps/markers/marker.factory.cjs +1 -0
- package/dist/packages/maps/markers/marker.factory.d.ts +8 -0
- package/dist/packages/maps/markers/marker.factory.esm +58 -0
- package/dist/packages/maps/markers/marker.guard.cjs +1 -0
- package/dist/packages/maps/markers/marker.guard.d.ts +22 -0
- package/dist/packages/maps/markers/marker.guard.esm +37 -0
- package/dist/packages/maps/markers/markers.meta.cjs +0 -0
- package/dist/packages/maps/markers/markers.meta.d.ts +12 -0
- package/dist/packages/maps/markers/markers.meta.esm +0 -0
- package/dist/packages/maps/styles/dark.style.cjs +1 -0
- package/dist/packages/maps/styles/dark.style.d.ts +1 -0
- package/dist/packages/maps/styles/dark.style.esm +93 -0
- package/dist/packages/nfc/nfc.service.cjs +1 -0
- package/dist/packages/nfc/nfc.service.d.ts +41 -0
- package/dist/packages/nfc/nfc.service.esm +104 -0
- package/dist/packages/requests/axios/base.connector.cjs +1 -0
- package/dist/packages/requests/axios/base.connector.d.ts +37 -0
- package/dist/packages/requests/axios/base.connector.esm +25 -0
- package/dist/packages/requests/axios/base.service.cjs +1 -0
- package/dist/packages/requests/axios/base.service.d.ts +41 -0
- package/dist/packages/requests/axios/base.service.esm +11 -0
- package/dist/packages/requests/axios/interceptor.builder.cjs +1 -0
- package/dist/packages/requests/axios/interceptor.builder.d.ts +26 -0
- package/dist/packages/requests/axios/interceptor.builder.esm +20 -0
- package/dist/packages/router/build.router.cjs +1 -0
- package/dist/packages/router/build.router.d.ts +6 -0
- package/dist/packages/router/build.router.esm +9 -0
- package/dist/packages/router/route.builder.cjs +1 -0
- package/dist/packages/router/route.builder.d.ts +46 -0
- package/dist/packages/router/route.builder.esm +50 -0
- package/dist/packages/scanner/scanner.formats.cjs +1 -0
- package/dist/packages/scanner/scanner.formats.d.ts +51 -0
- package/dist/packages/scanner/scanner.formats.esm +96 -0
- package/dist/packages/scanner/scanner.service.cjs +1 -0
- package/dist/packages/scanner/scanner.service.d.ts +32 -0
- package/dist/packages/scanner/scanner.service.esm +32 -0
- package/dist/packages/sheets/index.cjs +1 -0
- package/dist/packages/sheets/index.d.ts +2 -0
- package/dist/packages/sheets/index.esm +3 -0
- package/dist/packages/sheets/sheets.connector.cjs +1 -0
- package/dist/packages/sheets/sheets.connector.d.ts +6 -0
- package/dist/packages/sheets/sheets.connector.esm +21 -0
- package/dist/packages/sheets/sheets.service.cjs +1 -0
- package/dist/packages/sheets/sheets.service.d.ts +21 -0
- package/dist/packages/sheets/sheets.service.esm +38 -0
- package/dist/packages/sqlite/base/base.entity.cjs +1 -0
- package/dist/packages/sqlite/base/base.entity.d.ts +5 -0
- package/dist/packages/sqlite/base/base.entity.esm +41 -0
- package/dist/packages/sqlite/repo.service.cjs +1 -0
- package/dist/packages/sqlite/repo.service.d.ts +22 -0
- package/dist/packages/sqlite/repo.service.esm +52 -0
- package/dist/packages/sqlite/sqlite.service.cjs +1 -0
- package/dist/packages/sqlite/sqlite.service.d.ts +40 -0
- package/dist/packages/sqlite/sqlite.service.esm +77 -0
- package/dist/packages/sqlite/templates/test.entity.cjs +1 -0
- package/dist/packages/sqlite/templates/test.entity.d.ts +6 -0
- package/dist/packages/sqlite/templates/test.entity.esm +62 -0
- package/dist/packages/sqlite/templates/test.repo.service.cjs +1 -0
- package/dist/packages/sqlite/templates/test.repo.service.d.ts +8 -0
- package/dist/packages/sqlite/templates/test.repo.service.esm +26 -0
- package/dist/packages/stores/storage.service.cjs +1 -0
- package/dist/packages/stores/storage.service.d.ts +5 -0
- package/dist/packages/stores/storage.service.esm +22 -0
- package/dist/packages/stores/store.hook.cjs +1 -0
- package/dist/packages/stores/store.hook.d.ts +23 -0
- package/dist/packages/stores/store.hook.esm +22 -0
- package/dist/packages/stores/store.service.cjs +1 -0
- package/dist/packages/stores/store.service.d.ts +12 -0
- package/dist/packages/stores/store.service.esm +48 -0
- package/dist/packages/theme/theme-builder.cjs +1 -0
- package/dist/packages/theme/theme-builder.d.ts +19 -0
- package/dist/packages/theme/theme-builder.esm +25 -0
- package/dist/packages/theme/theme-provider.cjs +1 -0
- package/dist/packages/theme/theme-provider.d.ts +7 -0
- package/dist/packages/theme/theme-provider.esm +17 -0
- package/dist/packages/theme/theme-toggle.cjs +1 -0
- package/dist/packages/theme/theme-toggle.d.ts +6 -0
- package/dist/packages/theme/theme-toggle.esm +33 -0
- package/dist/packages/w3/tron/index.cjs +1 -0
- package/dist/packages/w3/tron/index.d.ts +4 -0
- package/dist/packages/w3/tron/index.esm +4 -0
- package/dist/packages/w3/tron/tron-assets.service.cjs +1 -0
- package/dist/packages/w3/tron/tron-assets.service.d.ts +38 -0
- package/dist/packages/w3/tron/tron-assets.service.esm +116 -0
- package/dist/packages/w3/tron/tron-wallet.entity.cjs +1 -0
- package/dist/packages/w3/tron/tron-wallet.entity.d.ts +15 -0
- package/dist/packages/w3/tron/tron-wallet.entity.esm +88 -0
- package/dist/packages/w3/tron/tron-wallet.repo.cjs +1 -0
- package/dist/packages/w3/tron/tron-wallet.repo.d.ts +30 -0
- package/dist/packages/w3/tron/tron-wallet.repo.esm +52 -0
- package/dist/packages/w3/tron/tron.service.cjs +1 -0
- package/dist/packages/w3/tron/tron.service.d.ts +124 -0
- package/dist/packages/w3/tron/tron.service.esm +406 -0
- package/dist/packages/w3/tron/tron.types.cjs +0 -0
- package/dist/packages/w3/tron/tron.types.d.ts +129 -0
- package/dist/packages/w3/tron/tron.types.esm +0 -0
- package/dist/page-container.d.ts +2 -0
- package/dist/popover.d.ts +2 -0
- package/dist/qr.encoder.service.d.ts +4 -0
- package/dist/qr.renderer.d.ts +4 -0
- package/dist/registry.d.ts +2 -0
- package/dist/repo.service.d.ts +4 -0
- package/dist/repository.contract.d.ts +1 -0
- package/dist/route.builder.d.ts +4 -0
- package/dist/scanner.formats.d.ts +2 -0
- package/dist/scanner.service.d.ts +2 -0
- package/dist/scroll-area.d.ts +2 -0
- package/dist/secret.input.d.ts +4 -0
- package/dist/select.d.ts +2 -0
- package/dist/select.input.d.ts +4 -0
- package/dist/separator.d.ts +2 -0
- package/dist/shared/assets/social-icons.cjs +1 -0
- package/dist/shared/assets/social-icons.d.ts +2 -0
- package/dist/shared/assets/social-icons.esm +30 -0
- package/dist/shared/constants/connectors/main.connector.cjs +1 -0
- package/dist/shared/constants/connectors/main.connector.d.ts +8 -0
- package/dist/shared/constants/connectors/main.connector.esm +38 -0
- package/dist/shared/constants/services/main.service.cjs +1 -0
- package/dist/shared/constants/services/main.service.d.ts +7 -0
- package/dist/shared/constants/services/main.service.esm +26 -0
- package/dist/shared/contracts/repository.contract.cjs +0 -0
- package/dist/shared/contracts/repository.contract.d.ts +26 -0
- package/dist/shared/contracts/repository.contract.esm +0 -0
- package/dist/shared/custom/actions/back-button.action.cjs +1 -0
- package/dist/shared/custom/actions/back-button.action.d.ts +13 -0
- package/dist/shared/custom/actions/back-button.action.esm +20 -0
- package/dist/shared/custom/audit/audit-view.cjs +1 -0
- package/dist/shared/custom/audit/audit-view.d.ts +46 -0
- package/dist/shared/custom/audit/audit-view.esm +73 -0
- package/dist/shared/custom/confirm/use-confirm.cjs +1 -0
- package/dist/shared/custom/confirm/use-confirm.d.ts +15 -0
- package/dist/shared/custom/confirm/use-confirm.esm +57 -0
- package/dist/shared/custom/data-table/data-table.component.cjs +1 -0
- package/dist/shared/custom/data-table/data-table.component.d.ts +9 -0
- package/dist/shared/custom/data-table/data-table.component.esm +26 -0
- package/dist/shared/custom/data-table/data-table.provider.cjs +0 -0
- package/dist/shared/custom/data-table/data-table.provider.d.ts +1 -0
- package/dist/shared/custom/data-table/data-table.provider.esm +0 -0
- package/dist/shared/custom/flow/flow-canvas.cjs +1 -0
- package/dist/shared/custom/flow/flow-canvas.d.ts +10 -0
- package/dist/shared/custom/flow/flow-canvas.esm +23 -0
- package/dist/shared/custom/flow/nodes/base.node.cjs +1 -0
- package/dist/shared/custom/flow/nodes/base.node.d.ts +9 -0
- package/dist/shared/custom/flow/nodes/base.node.esm +51 -0
- package/dist/shared/custom/form/form.component.cjs +1 -0
- package/dist/shared/custom/form/form.component.d.ts +13 -0
- package/dist/shared/custom/form/form.component.esm +26 -0
- package/dist/shared/custom/form/index.cjs +1 -0
- package/dist/shared/custom/form/index.d.ts +17 -0
- package/dist/shared/custom/form/index.esm +2 -0
- package/dist/shared/custom/form/inputs/async-combobox.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/async-combobox.input.d.ts +18 -0
- package/dist/shared/custom/form/inputs/async-combobox.input.esm +91 -0
- package/dist/shared/custom/form/inputs/async-multi-select.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/async-multi-select.input.d.ts +20 -0
- package/dist/shared/custom/form/inputs/async-multi-select.input.esm +127 -0
- package/dist/shared/custom/form/inputs/async-select.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/async-select.input.d.ts +15 -0
- package/dist/shared/custom/form/inputs/async-select.input.esm +71 -0
- package/dist/shared/custom/form/inputs/checkbox-inline.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/checkbox-inline.input.d.ts +15 -0
- package/dist/shared/custom/form/inputs/checkbox-inline.input.esm +41 -0
- package/dist/shared/custom/form/inputs/checkbox.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/checkbox.input.d.ts +21 -0
- package/dist/shared/custom/form/inputs/checkbox.input.esm +50 -0
- package/dist/shared/custom/form/inputs/code.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/code.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/code.input.esm +58 -0
- package/dist/shared/custom/form/inputs/color.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/color.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/color.input.esm +47 -0
- package/dist/shared/custom/form/inputs/combobox.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/combobox.input.d.ts +18 -0
- package/dist/shared/custom/form/inputs/combobox.input.esm +73 -0
- package/dist/shared/custom/form/inputs/date.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/date.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/date.input.esm +52 -0
- package/dist/shared/custom/form/inputs/email.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/email.input.d.ts +12 -0
- package/dist/shared/custom/form/inputs/email.input.esm +47 -0
- package/dist/shared/custom/form/inputs/file.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/file.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/file.input.esm +95 -0
- package/dist/shared/custom/form/inputs/image.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/image.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/image.input.esm +90 -0
- package/dist/shared/custom/form/inputs/list-select.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/list-select.input.d.ts +17 -0
- package/dist/shared/custom/form/inputs/list-select.input.esm +53 -0
- package/dist/shared/custom/form/inputs/secret.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/secret.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/secret.input.esm +53 -0
- package/dist/shared/custom/form/inputs/select.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/select.input.d.ts +17 -0
- package/dist/shared/custom/form/inputs/select.input.esm +44 -0
- package/dist/shared/custom/form/inputs/tags.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/tags.input.d.ts +16 -0
- package/dist/shared/custom/form/inputs/tags.input.esm +80 -0
- package/dist/shared/custom/form/inputs/text.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/text.input.d.ts +13 -0
- package/dist/shared/custom/form/inputs/text.input.esm +47 -0
- package/dist/shared/custom/form/inputs/textarea.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/textarea.input.d.ts +12 -0
- package/dist/shared/custom/form/inputs/textarea.input.esm +36 -0
- package/dist/shared/custom/form/layout/form-dialog-layout.cjs +1 -0
- package/dist/shared/custom/form/layout/form-dialog-layout.d.ts +25 -0
- package/dist/shared/custom/form/layout/form-dialog-layout.esm +37 -0
- package/dist/shared/custom/form/layout/form-tab-layout.cjs +1 -0
- package/dist/shared/custom/form/layout/form-tab-layout.d.ts +30 -0
- package/dist/shared/custom/form/layout/form-tab-layout.esm +69 -0
- package/dist/shared/custom/hover/hover.cjs +1 -0
- package/dist/shared/custom/hover/hover.d.ts +6 -0
- package/dist/shared/custom/hover/hover.esm +20 -0
- package/dist/shared/custom/layouts/canvas-view.layout.cjs +1 -0
- package/dist/shared/custom/layouts/canvas-view.layout.d.ts +18 -0
- package/dist/shared/custom/layouts/canvas-view.layout.esm +15 -0
- package/dist/shared/custom/layouts/detail-tabs.layout.cjs +1 -0
- package/dist/shared/custom/layouts/detail-tabs.layout.d.ts +27 -0
- package/dist/shared/custom/layouts/detail-tabs.layout.esm +32 -0
- package/dist/shared/custom/layouts/detail-view.layout.cjs +1 -0
- package/dist/shared/custom/layouts/detail-view.layout.d.ts +33 -0
- package/dist/shared/custom/layouts/detail-view.layout.esm +64 -0
- package/dist/shared/custom/layouts/feedback.layout.cjs +1 -0
- package/dist/shared/custom/layouts/feedback.layout.d.ts +14 -0
- package/dist/shared/custom/layouts/feedback.layout.esm +20 -0
- package/dist/shared/custom/layouts/grid.layout.cjs +1 -0
- package/dist/shared/custom/layouts/grid.layout.d.ts +38 -0
- package/dist/shared/custom/layouts/grid.layout.esm +39 -0
- package/dist/shared/custom/layouts/page-container.cjs +1 -0
- package/dist/shared/custom/layouts/page-container.d.ts +6 -0
- package/dist/shared/custom/layouts/page-container.esm +12 -0
- package/dist/shared/custom/ui/icon-box.cjs +1 -0
- package/dist/shared/custom/ui/icon-box.d.ts +12 -0
- package/dist/shared/custom/ui/icon-box.esm +21 -0
- package/dist/shared/custom/ui/typography.cjs +1 -0
- package/dist/shared/custom/ui/typography.d.ts +11 -0
- package/dist/shared/custom/ui/typography.esm +30 -0
- package/dist/shared/hooks/use-device.cjs +1 -0
- package/dist/shared/hooks/use-device.d.ts +10 -0
- package/dist/shared/hooks/use-device.esm +37 -0
- package/dist/shared/hooks/use-i18n.cjs +1 -0
- package/dist/shared/hooks/use-i18n.d.ts +10 -0
- package/dist/shared/hooks/use-i18n.esm +15 -0
- package/dist/shared/hooks/use-mobile.cjs +1 -0
- package/dist/shared/hooks/use-mobile.d.ts +1 -0
- package/dist/shared/hooks/use-mobile.esm +14 -0
- package/dist/shared/lib/utils.cjs +1 -0
- package/dist/shared/lib/utils.d.ts +2 -0
- package/dist/shared/lib/utils.esm +8 -0
- package/dist/shared/logic/action/action-processor.cjs +1 -0
- package/dist/shared/logic/action/action-processor.d.ts +86 -0
- package/dist/shared/logic/action/action-processor.esm +30 -0
- package/dist/shared/logic/components/components.registry.cjs +1 -0
- package/dist/shared/logic/components/components.registry.d.ts +16 -0
- package/dist/shared/logic/components/components.registry.esm +26 -0
- package/dist/shared/logic/events/startable.cjs +1 -0
- package/dist/shared/logic/events/startable.d.ts +7 -0
- package/dist/shared/logic/events/startable.esm +32 -0
- package/dist/shared/logic/events/use-on-start.hook.cjs +1 -0
- package/dist/shared/logic/events/use-on-start.hook.d.ts +12 -0
- package/dist/shared/logic/events/use-on-start.hook.esm +15 -0
- package/dist/shared/logic/factory/component.factory.cjs +1 -0
- package/dist/shared/logic/factory/component.factory.d.ts +9 -0
- package/dist/shared/logic/factory/component.factory.esm +28 -0
- package/dist/shared/logic/guards/builder-device.guard.cjs +1 -0
- package/dist/shared/logic/guards/builder-device.guard.d.ts +5 -0
- package/dist/shared/logic/guards/builder-device.guard.esm +10 -0
- package/dist/shared/logic/guards/component.guard.cjs +1 -0
- package/dist/shared/logic/guards/component.guard.d.ts +5 -0
- package/dist/shared/logic/guards/component.guard.esm +13 -0
- package/dist/shared/logic/guards/context.guard.cjs +1 -0
- package/dist/shared/logic/guards/context.guard.d.ts +13 -0
- package/dist/shared/logic/guards/context.guard.esm +9 -0
- package/dist/shared/logic/guards/device-artifact.guard.cjs +1 -0
- package/dist/shared/logic/guards/device-artifact.guard.d.ts +16 -0
- package/dist/shared/logic/guards/device-artifact.guard.esm +44 -0
- package/dist/shared/logic/guards/device.guard.cjs +1 -0
- package/dist/shared/logic/guards/device.guard.d.ts +17 -0
- package/dist/shared/logic/guards/device.guard.esm +40 -0
- package/dist/shared/logic/guards/dynamic-device.guard.cjs +1 -0
- package/dist/shared/logic/guards/dynamic-device.guard.d.ts +5 -0
- package/dist/shared/logic/guards/dynamic-device.guard.esm +10 -0
- package/dist/shared/logic/guards/guard.cjs +1 -0
- package/dist/shared/logic/guards/guard.d.ts +24 -0
- package/dist/shared/logic/guards/guard.esm +18 -0
- package/dist/shared/logic/service/base.service.cjs +1 -0
- package/dist/shared/logic/service/base.service.d.ts +3 -0
- package/dist/shared/logic/service/base.service.esm +5 -0
- package/dist/shared/logic/verifiers/context.verifier.cjs +1 -0
- package/dist/shared/logic/verifiers/context.verifier.d.ts +7 -0
- package/dist/shared/logic/verifiers/context.verifier.esm +31 -0
- package/dist/shared/logic/verifiers/device.verifier.registry.cjs +1 -0
- package/dist/shared/logic/verifiers/device.verifier.registry.d.ts +13 -0
- package/dist/shared/logic/verifiers/device.verifier.registry.esm +36 -0
- package/dist/shared/logic/verifiers/enum.verifier.cjs +1 -0
- package/dist/shared/logic/verifiers/enum.verifier.d.ts +4 -0
- package/dist/shared/logic/verifiers/enum.verifier.esm +9 -0
- package/dist/shared/logic/verifiers/value.verifier.cjs +1 -0
- package/dist/shared/logic/verifiers/value.verifier.d.ts +5 -0
- package/dist/shared/logic/verifiers/value.verifier.esm +9 -0
- package/dist/shared/ui/badge.cjs +1 -0
- package/dist/shared/ui/badge.d.ts +9 -0
- package/dist/shared/ui/badge.esm +27 -0
- package/dist/shared/ui/breadcrumb.cjs +1 -0
- package/dist/shared/ui/breadcrumb.d.ts +11 -0
- package/dist/shared/ui/breadcrumb.esm +70 -0
- package/dist/shared/ui/button.cjs +1 -0
- package/dist/shared/ui/button.d.ts +11 -0
- package/dist/shared/ui/button.esm +47 -0
- package/dist/shared/ui/calendar.cjs +1 -0
- package/dist/shared/ui/calendar.d.ts +10 -0
- package/dist/shared/ui/calendar.esm +92 -0
- package/dist/shared/ui/card.cjs +1 -0
- package/dist/shared/ui/card.d.ts +11 -0
- package/dist/shared/ui/card.esm +56 -0
- package/dist/shared/ui/checkbox.cjs +1 -0
- package/dist/shared/ui/checkbox.d.ts +4 -0
- package/dist/shared/ui/checkbox.esm +20 -0
- package/dist/shared/ui/combobox.cjs +1 -0
- package/dist/shared/ui/combobox.d.ts +24 -0
- package/dist/shared/ui/combobox.esm +163 -0
- package/dist/shared/ui/command.cjs +1 -0
- package/dist/shared/ui/command.d.ts +18 -0
- package/dist/shared/ui/command.esm +87 -0
- package/dist/shared/ui/custom/dynamic-icon.cjs +1 -0
- package/dist/shared/ui/custom/dynamic-icon.d.ts +13 -0
- package/dist/shared/ui/custom/dynamic-icon.esm +15 -0
- package/dist/shared/ui/dialog.cjs +1 -0
- package/dist/shared/ui/dialog.d.ts +17 -0
- package/dist/shared/ui/dialog.esm +95 -0
- package/dist/shared/ui/field.cjs +1 -0
- package/dist/shared/ui/field.d.ts +24 -0
- package/dist/shared/ui/field.esm +107 -0
- package/dist/shared/ui/icon-button.cjs +1 -0
- package/dist/shared/ui/icon-button.d.ts +6 -0
- package/dist/shared/ui/icon-button.esm +14 -0
- package/dist/shared/ui/index.cjs +1 -0
- package/dist/shared/ui/index.d.ts +23 -0
- package/dist/shared/ui/index.esm +24 -0
- package/dist/shared/ui/input-group.cjs +1 -0
- package/dist/shared/ui/input-group.d.ts +16 -0
- package/dist/shared/ui/input-group.esm +77 -0
- package/dist/shared/ui/input.cjs +1 -0
- package/dist/shared/ui/input.d.ts +3 -0
- package/dist/shared/ui/input.esm +14 -0
- package/dist/shared/ui/label.cjs +1 -0
- package/dist/shared/ui/label.d.ts +4 -0
- package/dist/shared/ui/label.esm +14 -0
- package/dist/shared/ui/popover.cjs +1 -0
- package/dist/shared/ui/popover.d.ts +7 -0
- package/dist/shared/ui/popover.esm +35 -0
- package/dist/shared/ui/scroll-area.cjs +1 -0
- package/dist/shared/ui/scroll-area.d.ts +5 -0
- package/dist/shared/ui/scroll-area.esm +36 -0
- package/dist/shared/ui/select.cjs +1 -0
- package/dist/shared/ui/select.d.ts +15 -0
- package/dist/shared/ui/select.esm +99 -0
- package/dist/shared/ui/separator.cjs +1 -0
- package/dist/shared/ui/separator.d.ts +4 -0
- package/dist/shared/ui/separator.esm +16 -0
- package/dist/shared/ui/sheet.cjs +1 -0
- package/dist/shared/ui/sheet.d.ts +14 -0
- package/dist/shared/ui/sheet.esm +89 -0
- package/dist/shared/ui/sidebar.cjs +1 -0
- package/dist/shared/ui/sidebar.d.ts +69 -0
- package/dist/shared/ui/sidebar.esm +348 -0
- package/dist/shared/ui/skeleton.cjs +1 -0
- package/dist/shared/ui/skeleton.d.ts +2 -0
- package/dist/shared/ui/skeleton.esm +12 -0
- package/dist/shared/ui/sonner.cjs +1 -0
- package/dist/shared/ui/sonner.d.ts +3 -0
- package/dist/shared/ui/sonner.esm +29 -0
- package/dist/shared/ui/table.cjs +1 -0
- package/dist/shared/ui/table.d.ts +10 -0
- package/dist/shared/ui/table.esm +66 -0
- package/dist/shared/ui/tabs.cjs +1 -0
- package/dist/shared/ui/tabs.d.ts +11 -0
- package/dist/shared/ui/tabs.esm +45 -0
- package/dist/shared/ui/textarea.cjs +1 -0
- package/dist/shared/ui/textarea.d.ts +3 -0
- package/dist/shared/ui/textarea.esm +13 -0
- package/dist/shared/ui/tooltip.cjs +1 -0
- package/dist/shared/ui/tooltip.d.ts +7 -0
- package/dist/shared/ui/tooltip.esm +36 -0
- package/dist/sheet.d.ts +2 -0
- package/dist/sheets.connector.d.ts +2 -0
- package/dist/sheets.service.d.ts +2 -0
- package/dist/sidebar.d.ts +2 -0
- package/dist/skeleton.d.ts +2 -0
- package/dist/social-icons.d.ts +2 -0
- package/dist/sonner.d.ts +2 -0
- package/dist/sortable.d.ts +2 -0
- package/dist/sqlite.service.d.ts +6 -0
- package/dist/startable.d.ts +4 -0
- package/dist/storage.service.d.ts +4 -0
- package/dist/store.hook.d.ts +4 -0
- package/dist/store.service.d.ts +4 -0
- package/dist/table.d.ts +2 -0
- package/dist/tabs.d.ts +2 -0
- package/dist/tags.input.d.ts +4 -0
- package/dist/test.entity.d.ts +2 -0
- package/dist/test.repo.service.d.ts +6 -0
- package/dist/text-coder.service.d.ts +2 -0
- package/dist/text.input.d.ts +4 -0
- package/dist/textarea.d.ts +2 -0
- package/dist/textarea.input.d.ts +4 -0
- package/dist/theme-builder.d.ts +2 -0
- package/dist/theme-provider.d.ts +2 -0
- package/dist/theme-toggle.d.ts +2 -0
- package/dist/tooltip.d.ts +2 -0
- package/dist/tron-assets.service.d.ts +2 -0
- package/dist/tron-wallet.entity.d.ts +2 -0
- package/dist/tron-wallet.repo.d.ts +2 -0
- package/dist/tron.service.d.ts +2 -0
- package/dist/tron.types.d.ts +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/typography.d.ts +2 -0
- package/dist/use-confirm.d.ts +2 -0
- package/dist/use-device.d.ts +2 -0
- package/dist/use-i18n.d.ts +2 -0
- package/dist/use-mobile.d.ts +2 -0
- package/dist/use-on-start.hook.d.ts +2 -0
- package/dist/utils.d.ts +2 -0
- package/dist/value.verifier.d.ts +4 -0
- package/package.json +155 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import e from "../requests/axios/base.connector.esm";
|
|
2
|
+
//#region src/packages/sheets/sheets.connector.ts
|
|
3
|
+
var t = class extends e {
|
|
4
|
+
constructor(e) {
|
|
5
|
+
super({ config: {
|
|
6
|
+
baseURL: "https://sheets.googleapis.com/v4/spreadsheets",
|
|
7
|
+
headers: {
|
|
8
|
+
...e ? { Authorization: `Bearer ${e}` } : {},
|
|
9
|
+
"Content-Type": "application/json"
|
|
10
|
+
}
|
|
11
|
+
} });
|
|
12
|
+
}
|
|
13
|
+
setAccessToken(e) {
|
|
14
|
+
this.service.defaults.headers.common.Authorization = `Bearer ${e}`;
|
|
15
|
+
}
|
|
16
|
+
async healthCheck() {
|
|
17
|
+
return !0;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { t as SheetsAxiosConnector };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../logger/logger.cjs`),t=require(`../requests/axios/base.service.cjs`),n=require(`./sheets.connector.cjs`);var r=e.GLOBAL_LOGGER.child(`SHEETS`),i=class e extends t{constructor(){super({connector:new n.SheetsAxiosConnector})}static get instance(){return this._instance||=new e,this._instance}setAccessToken(e){this.connector.setAccessToken(e)}async getRange(e,t){try{let n=await this.connector.service.get(`/${e}/values/${t}`);return r.success(`Datos leídos correctamente: ${e}`),n.data}catch(e){throw r.error(`Error al leer de Sheets: ${e.message}`),e}}async appendRow(e,t,n){try{let i=await this.connector.service.post(`/${e}/values/${t}:append`,{values:n},{params:{valueInputOption:`USER_ENTERED`,insertDataOption:`INSERT_ROWS`}});return r.success(`Datos escritos correctamente en: ${e}`),i.data}catch(e){throw r.error(`Error al escribir en Sheets: ${e.message}`),e}}};i._instance=void 0;var a=i.instance;exports.SHEETS_SERVICE=a,exports.SheetsService=i;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as BaseAxiosService } from '../requests/axios/base.service';
|
|
2
|
+
export declare class SheetsService extends BaseAxiosService {
|
|
3
|
+
private static _instance;
|
|
4
|
+
private constructor();
|
|
5
|
+
static get instance(): SheetsService;
|
|
6
|
+
setAccessToken(token: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Obtiene los valores de un rango en una hoja específica
|
|
9
|
+
* @param spreadsheetId ID del Google Sheet
|
|
10
|
+
* @param range Rango en notación A1 (ej: "Sheet1!A1:D5")
|
|
11
|
+
*/
|
|
12
|
+
getRange(spreadsheetId: string, range: string): Promise<any>;
|
|
13
|
+
/**
|
|
14
|
+
* Añade una fila o datos al final de los datos existentes en un rango
|
|
15
|
+
* @param spreadsheetId ID del Google Sheet
|
|
16
|
+
* @param range Rango inicial donde se buscará el final de la tabla
|
|
17
|
+
* @param values Arreglo de arreglos con los datos a insertar
|
|
18
|
+
*/
|
|
19
|
+
appendRow(spreadsheetId: string, range: string, values: any[][]): Promise<any>;
|
|
20
|
+
}
|
|
21
|
+
export declare const SHEETS_SERVICE: SheetsService;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { GLOBAL_LOGGER as e } from "../logger/logger.esm";
|
|
2
|
+
import t from "../requests/axios/base.service.esm";
|
|
3
|
+
import { SheetsAxiosConnector as n } from "./sheets.connector.esm";
|
|
4
|
+
//#region src/packages/sheets/sheets.service.ts
|
|
5
|
+
var r = e.child("SHEETS"), i = class e extends t {
|
|
6
|
+
constructor() {
|
|
7
|
+
super({ connector: new n() });
|
|
8
|
+
}
|
|
9
|
+
static get instance() {
|
|
10
|
+
return this._instance ||= new e(), this._instance;
|
|
11
|
+
}
|
|
12
|
+
setAccessToken(e) {
|
|
13
|
+
this.connector.setAccessToken(e);
|
|
14
|
+
}
|
|
15
|
+
async getRange(e, t) {
|
|
16
|
+
try {
|
|
17
|
+
let n = await this.connector.service.get(`/${e}/values/${t}`);
|
|
18
|
+
return r.success(`Datos leídos correctamente: ${e}`), n.data;
|
|
19
|
+
} catch (e) {
|
|
20
|
+
throw r.error(`Error al leer de Sheets: ${e.message}`), e;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async appendRow(e, t, n) {
|
|
24
|
+
try {
|
|
25
|
+
let i = await this.connector.service.post(`/${e}/values/${t}:append`, { values: n }, { params: {
|
|
26
|
+
valueInputOption: "USER_ENTERED",
|
|
27
|
+
insertDataOption: "INSERT_ROWS"
|
|
28
|
+
} });
|
|
29
|
+
return r.success(`Datos escritos correctamente en: ${e}`), i.data;
|
|
30
|
+
} catch (e) {
|
|
31
|
+
throw r.error(`Error al escribir en Sheets: ${e.message}`), e;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
i._instance = void 0;
|
|
36
|
+
var a = i.instance;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { a as SHEETS_SERVICE, i as SheetsService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../../_virtual/_rolldown/runtime.cjs`);let e=require(`typeorm/browser`);var t,n,r,i,a,o,s;function c(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function l(e,t,n,r,i){var a={};return Object.keys(r).forEach(function(e){a[e]=r[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,(`value`in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},a),i&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(i):void 0,a.initializer=void 0),a.initializer===void 0?(Object.defineProperty(e,t,a),null):a}var u=(t=(0,e.PrimaryGeneratedColumn)(`uuid`),n=(0,e.CreateDateColumn)(),r=(0,e.UpdateDateColumn)(),i=class{constructor(){c(this,`id`,a,this),c(this,`createdAt`,o,this),c(this,`updatedAt`,s,this)}},a=l(i.prototype,`id`,[t],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),o=l(i.prototype,`createdAt`,[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),s=l(i.prototype,`updatedAt`,[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),i);exports.BaseEntity=u;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CreateDateColumn as e, PrimaryGeneratedColumn as t, UpdateDateColumn as n } from "typeorm/browser";
|
|
2
|
+
//#region src/packages/sqlite/base/base.entity.ts
|
|
3
|
+
var r, i, a, o, s, c, l;
|
|
4
|
+
function u(e, t, n, r) {
|
|
5
|
+
n && Object.defineProperty(e, t, {
|
|
6
|
+
enumerable: n.enumerable,
|
|
7
|
+
configurable: n.configurable,
|
|
8
|
+
writable: n.writable,
|
|
9
|
+
value: n.initializer ? n.initializer.call(r) : void 0
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function d(e, t, n, r, i) {
|
|
13
|
+
var a = {};
|
|
14
|
+
return Object.keys(r).forEach(function(e) {
|
|
15
|
+
a[e] = r[e];
|
|
16
|
+
}), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = n.slice().reverse().reduce(function(n, r) {
|
|
17
|
+
return r(e, t, n) || n;
|
|
18
|
+
}, a), i && a.initializer !== void 0 && (a.value = a.initializer ? a.initializer.call(i) : void 0, a.initializer = void 0), a.initializer === void 0 ? (Object.defineProperty(e, t, a), null) : a;
|
|
19
|
+
}
|
|
20
|
+
var f = (r = t("uuid"), i = e(), a = n(), o = class {
|
|
21
|
+
constructor() {
|
|
22
|
+
u(this, "id", s, this), u(this, "createdAt", c, this), u(this, "updatedAt", l, this);
|
|
23
|
+
}
|
|
24
|
+
}, s = d(o.prototype, "id", [r], {
|
|
25
|
+
configurable: !0,
|
|
26
|
+
enumerable: !0,
|
|
27
|
+
writable: !0,
|
|
28
|
+
initializer: null
|
|
29
|
+
}), c = d(o.prototype, "createdAt", [i], {
|
|
30
|
+
configurable: !0,
|
|
31
|
+
enumerable: !0,
|
|
32
|
+
writable: !0,
|
|
33
|
+
initializer: null
|
|
34
|
+
}), l = d(o.prototype, "updatedAt", [a], {
|
|
35
|
+
configurable: !0,
|
|
36
|
+
enumerable: !0,
|
|
37
|
+
writable: !0,
|
|
38
|
+
initializer: null
|
|
39
|
+
}), o);
|
|
40
|
+
//#endregion
|
|
41
|
+
export { f as BaseEntity };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../shared/logic/service/base.service.cjs`),t=require(`../logger/logger.cjs`),n=require(`./sqlite.service.cjs`);var r=class extends e{constructor(e){super(),this._repository=void 0,this.defaultLog=t.GLOBAL_LOGGER.child(`[SQLiteRepo]`),n.SQLITE_SERVICE.onReady(()=>{this._repository=n.SQLITE_SERVICE.connection.getRepository(e),this.setReady()})}get isInitialized(){return this._repository!==void 0}get repository(){if(!this.isInitialized)throw Error(`Repository not initialized`);return this._repository}async persist(e,t=this.defaultLog){let n=t.trace(`persist:${this.constructor.name}`);try{return await this.repository.save(e)}finally{n.end()}}async remove(e,t=this.defaultLog){let n=t.trace(`remove:${this.constructor.name}`);try{return await this.repository.remove(e)}finally{n.end()}}async findById(e,t=this.defaultLog){let n=t.trace(`findById:${this.constructor.name}`);try{return(await this.repository.findBy({id:e}))[0]||null}finally{n.end()}}async findAll(e,t=this.defaultLog){let n=t.trace(`findAll:${this.constructor.name}`);try{return await this.repository.find()}finally{n.end()}}};module.exports=r;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as BaseService } from '../../shared/logic/service/base.service';
|
|
2
|
+
import { EntityTarget, Repository } from 'typeorm/browser';
|
|
3
|
+
import { BaseEntity } from './base/base.entity';
|
|
4
|
+
import { Logger } from '../logger/logger';
|
|
5
|
+
import { IRepository } from '../../shared/contracts/repository.contract';
|
|
6
|
+
/**
|
|
7
|
+
* BaseSQLiteRepoService
|
|
8
|
+
*
|
|
9
|
+
* Clase base para servicios de persistencia SQLite.
|
|
10
|
+
* Implementa IRepository y sigue la convención (payload, logger?).
|
|
11
|
+
*/
|
|
12
|
+
export default class BaseSQLiteRepoService<ENTITY extends BaseEntity, TARGET extends EntityTarget<ENTITY> = EntityTarget<ENTITY>> extends BaseService implements IRepository<ENTITY> {
|
|
13
|
+
private _repository;
|
|
14
|
+
protected defaultLog: Logger;
|
|
15
|
+
protected constructor(EntityTarget: TARGET);
|
|
16
|
+
get isInitialized(): boolean;
|
|
17
|
+
protected get repository(): Repository<ENTITY>;
|
|
18
|
+
persist(entity: ENTITY, logger?: Logger): Promise<ENTITY>;
|
|
19
|
+
remove(entity: ENTITY, logger?: Logger): Promise<ENTITY>;
|
|
20
|
+
findById(id: string, logger?: Logger): Promise<ENTITY>;
|
|
21
|
+
findAll(_?: any, logger?: Logger): Promise<ENTITY[]>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import e from "../../shared/logic/service/base.service.esm";
|
|
2
|
+
import { GLOBAL_LOGGER as t } from "../logger/logger.esm";
|
|
3
|
+
import { SQLITE_SERVICE as n } from "./sqlite.service.esm";
|
|
4
|
+
//#region src/packages/sqlite/repo.service.ts
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
constructor(e) {
|
|
7
|
+
super(), this._repository = void 0, this.defaultLog = t.child("[SQLiteRepo]"), n.onReady(() => {
|
|
8
|
+
this._repository = n.connection.getRepository(e), this.setReady();
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
get isInitialized() {
|
|
12
|
+
return this._repository !== void 0;
|
|
13
|
+
}
|
|
14
|
+
get repository() {
|
|
15
|
+
if (!this.isInitialized) throw Error("Repository not initialized");
|
|
16
|
+
return this._repository;
|
|
17
|
+
}
|
|
18
|
+
async persist(e, t = this.defaultLog) {
|
|
19
|
+
let n = t.trace(`persist:${this.constructor.name}`);
|
|
20
|
+
try {
|
|
21
|
+
return await this.repository.save(e);
|
|
22
|
+
} finally {
|
|
23
|
+
n.end();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async remove(e, t = this.defaultLog) {
|
|
27
|
+
let n = t.trace(`remove:${this.constructor.name}`);
|
|
28
|
+
try {
|
|
29
|
+
return await this.repository.remove(e);
|
|
30
|
+
} finally {
|
|
31
|
+
n.end();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async findById(e, t = this.defaultLog) {
|
|
35
|
+
let n = t.trace(`findById:${this.constructor.name}`);
|
|
36
|
+
try {
|
|
37
|
+
return (await this.repository.findBy({ id: e }))[0] || null;
|
|
38
|
+
} finally {
|
|
39
|
+
n.end();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
async findAll(e, t = this.defaultLog) {
|
|
43
|
+
let n = t.trace(`findAll:${this.constructor.name}`);
|
|
44
|
+
try {
|
|
45
|
+
return await this.repository.find();
|
|
46
|
+
} finally {
|
|
47
|
+
n.end();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { r as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../../shared/logic/service/base.service.cjs`),n=require(`../logger/logger.cjs`),r=require(`../../app/config/sqlite.registry.cjs`);let i=require(`typeorm/browser`),a=require(`@capacitor/core`),o=require(`sql.js`);o=e.__toESM(o);var s=`quest`,c=n.GLOBAL_LOGGER.child(`[SqliteService]`),l,u=class e extends t{constructor(){super(),this._connection=null,c.debug(`Initializing SQLite Service...`),this.onReady(()=>{c.debug(`SQLite Service is ready`)}),c.timeAsync(`init service`,async()=>{await this.initLocalForage(),await this.initSqlite();try{a.Capacitor.getPlatform()===`web`?await this.configureWebConnection():await this.configureNativeConnection(),this._connection?.initialize().then(()=>{c.info(`Database connection initialized successfully`),this.setReady()}).catch(e=>{c.error(`Failed to initialize database connection`,e)})}catch(e){c.error(`Error configuring database connection`,e)}})}async onReady(e){c.debug(`onReady called`),await super.onReady(e)}static get instance(){return this._instance||=new e,this._instance}verify(){return this._connection?.isInitialized??!1}get connection(){if(!this._connection)throw Error(`Database connection is not initialized yet.`);return this._connection}async initLocalForage(){l=(await import(`localforage`)).default,window.localforage=l}async initSqlite(){let e=await(0,o.default)({locateFile:e=>e.includes(`.wasm`)?`/assets/sql/sql-wasm.wasm`:`/assets/sql/${e}`});window.SQL=e}async configureNativeConnection(){this._connection=new i.DataSource({type:`cordova`,database:s,migrationsTransactionMode:`none`,location:`default`,logging:[`error`,`query`,`schema`],synchronize:!0,entities:r.SQLITE_ENTITIES}),c.debug(`SQLite Service initialized from NATIVE`)}async configureWebConnection(){l.config({description:`quest`,driver:l.INDEXEDDB}),this._connection=new i.DataSource({type:`sqljs`,autoSave:!0,location:s,useLocalForage:!0,synchronize:!0,entities:r.SQLITE_ENTITIES}),c.debug(`SQLite Service initialized from WEB`)}};u._instance=void 0;var d=u.instance;exports.SQLITE_SERVICE=d,exports.default=u;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DataSource } from 'typeorm/browser';
|
|
2
|
+
import { default as BaseService } from '../../shared/logic/service/base.service';
|
|
3
|
+
export default class SqliteService extends BaseService {
|
|
4
|
+
private _connection;
|
|
5
|
+
/**
|
|
6
|
+
* The database connection instance.
|
|
7
|
+
*/
|
|
8
|
+
private constructor();
|
|
9
|
+
onReady(ft: () => void): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Singleton instance getter.
|
|
12
|
+
*/
|
|
13
|
+
private static _instance;
|
|
14
|
+
static get instance(): SqliteService;
|
|
15
|
+
/**
|
|
16
|
+
* Verify if the connection is initialized
|
|
17
|
+
*/
|
|
18
|
+
verify(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Gets the database connection safely.
|
|
21
|
+
*/
|
|
22
|
+
get connection(): DataSource;
|
|
23
|
+
/**
|
|
24
|
+
* Initializes localForage by dynamically importing it and assigning it to the window object.
|
|
25
|
+
*/
|
|
26
|
+
private initLocalForage;
|
|
27
|
+
/**
|
|
28
|
+
* Initializes sql.js by dynamically importing it and assigning it to the window object.
|
|
29
|
+
*/
|
|
30
|
+
private initSqlite;
|
|
31
|
+
/**
|
|
32
|
+
* Configures the database connection for native platforms using Cordova SQLite.
|
|
33
|
+
*/
|
|
34
|
+
private configureNativeConnection;
|
|
35
|
+
/**
|
|
36
|
+
* Configures the database connection for web platforms using sql.js and localForage.
|
|
37
|
+
*/
|
|
38
|
+
private configureWebConnection;
|
|
39
|
+
}
|
|
40
|
+
export declare const SQLITE_SERVICE: SqliteService;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import e from "../../shared/logic/service/base.service.esm";
|
|
2
|
+
import { GLOBAL_LOGGER as t } from "../logger/logger.esm";
|
|
3
|
+
import { SQLITE_ENTITIES as n } from "../../app/config/sqlite.registry.esm";
|
|
4
|
+
import { DataSource as r } from "typeorm/browser";
|
|
5
|
+
import { Capacitor as i } from "@capacitor/core";
|
|
6
|
+
import a from "sql.js";
|
|
7
|
+
//#region src/packages/sqlite/sqlite.service.ts
|
|
8
|
+
var o = "quest", s = t.child("[SqliteService]"), c, l = class t extends e {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(), this._connection = null, s.debug("Initializing SQLite Service..."), this.onReady(() => {
|
|
11
|
+
s.debug("SQLite Service is ready");
|
|
12
|
+
}), s.timeAsync("init service", async () => {
|
|
13
|
+
await this.initLocalForage(), await this.initSqlite();
|
|
14
|
+
try {
|
|
15
|
+
i.getPlatform() === "web" ? await this.configureWebConnection() : await this.configureNativeConnection(), this._connection?.initialize().then(() => {
|
|
16
|
+
s.info("Database connection initialized successfully"), this.setReady();
|
|
17
|
+
}).catch((e) => {
|
|
18
|
+
s.error("Failed to initialize database connection", e);
|
|
19
|
+
});
|
|
20
|
+
} catch (e) {
|
|
21
|
+
s.error("Error configuring database connection", e);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async onReady(e) {
|
|
26
|
+
s.debug("onReady called"), await super.onReady(e);
|
|
27
|
+
}
|
|
28
|
+
static get instance() {
|
|
29
|
+
return this._instance ||= new t(), this._instance;
|
|
30
|
+
}
|
|
31
|
+
verify() {
|
|
32
|
+
return this._connection?.isInitialized ?? !1;
|
|
33
|
+
}
|
|
34
|
+
get connection() {
|
|
35
|
+
if (!this._connection) throw Error("Database connection is not initialized yet.");
|
|
36
|
+
return this._connection;
|
|
37
|
+
}
|
|
38
|
+
async initLocalForage() {
|
|
39
|
+
c = (await import("localforage")).default, window.localforage = c;
|
|
40
|
+
}
|
|
41
|
+
async initSqlite() {
|
|
42
|
+
let e = await a({ locateFile: (e) => e.includes(".wasm") ? "/assets/sql/sql-wasm.wasm" : `/assets/sql/${e}` });
|
|
43
|
+
window.SQL = e;
|
|
44
|
+
}
|
|
45
|
+
async configureNativeConnection() {
|
|
46
|
+
this._connection = new r({
|
|
47
|
+
type: "cordova",
|
|
48
|
+
database: o,
|
|
49
|
+
migrationsTransactionMode: "none",
|
|
50
|
+
location: "default",
|
|
51
|
+
logging: [
|
|
52
|
+
"error",
|
|
53
|
+
"query",
|
|
54
|
+
"schema"
|
|
55
|
+
],
|
|
56
|
+
synchronize: !0,
|
|
57
|
+
entities: n
|
|
58
|
+
}), s.debug("SQLite Service initialized from NATIVE");
|
|
59
|
+
}
|
|
60
|
+
async configureWebConnection() {
|
|
61
|
+
c.config({
|
|
62
|
+
description: "quest",
|
|
63
|
+
driver: c.INDEXEDDB
|
|
64
|
+
}), this._connection = new r({
|
|
65
|
+
type: "sqljs",
|
|
66
|
+
autoSave: !0,
|
|
67
|
+
location: o,
|
|
68
|
+
useLocalForage: !0,
|
|
69
|
+
synchronize: !0,
|
|
70
|
+
entities: n
|
|
71
|
+
}), s.debug("SQLite Service initialized from WEB");
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
l._instance = void 0;
|
|
75
|
+
var u = l.instance;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { u as SQLITE_SERVICE, l as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../../_virtual/_rolldown/runtime.cjs`);let e=require(`typeorm/browser`);var t,n,r,i,a,o,s,c,l,u,d;function f(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function p(e,t,n,r,i){var a={};return Object.keys(r).forEach(function(e){a[e]=r[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,(`value`in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},a),i&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(i):void 0,a.initializer=void 0),a.initializer===void 0?(Object.defineProperty(e,t,a),null):a}var m=(t=(0,e.Entity)(),n=(0,e.PrimaryGeneratedColumn)(`uuid`),r=(0,e.Column)({name:`name`,type:`varchar`,length:100,nullable:!1,unique:!0}),i=(0,e.Column)({name:`description`,type:`varchar`,length:255,nullable:!1}),a=(0,e.Column)({name:`is_active`,type:`boolean`,nullable:!1,default:!0}),t(o=(s=class{constructor(){f(this,`id`,c,this),f(this,`name`,l,this),f(this,`description`,u,this),f(this,`isActive`,d,this)}},c=p(s.prototype,`id`,[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),l=p(s.prototype,`name`,[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),u=p(s.prototype,`description`,[i],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),d=p(s.prototype,`isActive`,[a],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),s))||o);exports.TestEntity=m;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Column as e, Entity as t, PrimaryGeneratedColumn as n } from "typeorm/browser";
|
|
2
|
+
//#region src/packages/sqlite/templates/test.entity.ts
|
|
3
|
+
var r, i, a, o, s, c, l, u, d, f, p;
|
|
4
|
+
function m(e, t, n, r) {
|
|
5
|
+
n && Object.defineProperty(e, t, {
|
|
6
|
+
enumerable: n.enumerable,
|
|
7
|
+
configurable: n.configurable,
|
|
8
|
+
writable: n.writable,
|
|
9
|
+
value: n.initializer ? n.initializer.call(r) : void 0
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function h(e, t, n, r, i) {
|
|
13
|
+
var a = {};
|
|
14
|
+
return Object.keys(r).forEach(function(e) {
|
|
15
|
+
a[e] = r[e];
|
|
16
|
+
}), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = n.slice().reverse().reduce(function(n, r) {
|
|
17
|
+
return r(e, t, n) || n;
|
|
18
|
+
}, a), i && a.initializer !== void 0 && (a.value = a.initializer ? a.initializer.call(i) : void 0, a.initializer = void 0), a.initializer === void 0 ? (Object.defineProperty(e, t, a), null) : a;
|
|
19
|
+
}
|
|
20
|
+
var g = (r = t(), i = n("uuid"), a = e({
|
|
21
|
+
name: "name",
|
|
22
|
+
type: "varchar",
|
|
23
|
+
length: 100,
|
|
24
|
+
nullable: !1,
|
|
25
|
+
unique: !0
|
|
26
|
+
}), o = e({
|
|
27
|
+
name: "description",
|
|
28
|
+
type: "varchar",
|
|
29
|
+
length: 255,
|
|
30
|
+
nullable: !1
|
|
31
|
+
}), s = e({
|
|
32
|
+
name: "is_active",
|
|
33
|
+
type: "boolean",
|
|
34
|
+
nullable: !1,
|
|
35
|
+
default: !0
|
|
36
|
+
}), r(c = (l = class {
|
|
37
|
+
constructor() {
|
|
38
|
+
m(this, "id", u, this), m(this, "name", d, this), m(this, "description", f, this), m(this, "isActive", p, this);
|
|
39
|
+
}
|
|
40
|
+
}, u = h(l.prototype, "id", [i], {
|
|
41
|
+
configurable: !0,
|
|
42
|
+
enumerable: !0,
|
|
43
|
+
writable: !0,
|
|
44
|
+
initializer: null
|
|
45
|
+
}), d = h(l.prototype, "name", [a], {
|
|
46
|
+
configurable: !0,
|
|
47
|
+
enumerable: !0,
|
|
48
|
+
writable: !0,
|
|
49
|
+
initializer: null
|
|
50
|
+
}), f = h(l.prototype, "description", [o], {
|
|
51
|
+
configurable: !0,
|
|
52
|
+
enumerable: !0,
|
|
53
|
+
writable: !0,
|
|
54
|
+
initializer: null
|
|
55
|
+
}), p = h(l.prototype, "isActive", [s], {
|
|
56
|
+
configurable: !0,
|
|
57
|
+
enumerable: !0,
|
|
58
|
+
writable: !0,
|
|
59
|
+
initializer: null
|
|
60
|
+
}), l)) || c);
|
|
61
|
+
//#endregion
|
|
62
|
+
export { g as TestEntity };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./test.entity.cjs`),t=require(`../repo.service.cjs`);function n(e,t){if(!{}.hasOwnProperty.call(e,t))throw TypeError(`attempted to use private field on non-instance`);return e}var r=0;function i(e){return`__private_`+ r+++`_`+e}var a=i(`instance`),o=class r extends t{static get instance(){return n(this,a)[a]||(n(this,a)[a]=new r),n(this,a)[a]}constructor(){super(e.TestEntity)}};Object.defineProperty(o,a,{writable:!0,value:void 0});var s=o.instance;exports.TEST_REPO_SERVICE=s,exports.default=o;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as BaseSQLiteRepoService } from '../repo.service';
|
|
2
|
+
import { TestEntity } from './test.entity';
|
|
3
|
+
export default class TestRepoService extends BaseSQLiteRepoService<TestEntity> {
|
|
4
|
+
#private;
|
|
5
|
+
static get instance(): TestRepoService;
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
export declare const TEST_REPO_SERVICE: TestRepoService;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TestEntity as e } from "./test.entity.esm";
|
|
2
|
+
import t from "../repo.service.esm";
|
|
3
|
+
//#region src/packages/sqlite/templates/test.repo.service.ts
|
|
4
|
+
function n(e, t) {
|
|
5
|
+
if (!{}.hasOwnProperty.call(e, t)) throw TypeError("attempted to use private field on non-instance");
|
|
6
|
+
return e;
|
|
7
|
+
}
|
|
8
|
+
var r = 0;
|
|
9
|
+
function i(e) {
|
|
10
|
+
return "__private_" + r++ + "_" + e;
|
|
11
|
+
}
|
|
12
|
+
var a = /* @__PURE__ */ i("instance"), o = class r extends t {
|
|
13
|
+
static get instance() {
|
|
14
|
+
return n(this, a)[a] || (n(this, a)[a] = new r()), n(this, a)[a];
|
|
15
|
+
}
|
|
16
|
+
constructor() {
|
|
17
|
+
super(e);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(o, a, {
|
|
21
|
+
writable: !0,
|
|
22
|
+
value: void 0
|
|
23
|
+
});
|
|
24
|
+
var s = o.instance;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { s as TEST_REPO_SERVICE, o as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../logger/logger.cjs`);let t=require(`@capacitor/preferences`);var n=e.GLOBAL_LOGGER.child(`Storage`),r=class{static async set(e,r){return await n.timeAsync(`Setting key: ${e} with value: ${r}`,async()=>await t.Preferences.set({key:e,value:r}))}static async get(e){return await n.timeAsync(`Getting key: ${e}`,async()=>{let{value:n}=await t.Preferences.get({key:e});return n})}static async remove(e){return await n.timeAsync(`Removing key: ${e}`,async()=>await t.Preferences.remove({key:e}))}};module.exports=r;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GLOBAL_LOGGER as e } from "../logger/logger.esm";
|
|
2
|
+
import { Preferences as t } from "@capacitor/preferences";
|
|
3
|
+
//#region src/packages/stores/storage.service.ts
|
|
4
|
+
var n = e.child("Storage"), r = class {
|
|
5
|
+
static async set(e, r) {
|
|
6
|
+
return await n.timeAsync(`Setting key: ${e} with value: ${r}`, async () => await t.set({
|
|
7
|
+
key: e,
|
|
8
|
+
value: r
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
static async get(e) {
|
|
12
|
+
return await n.timeAsync(`Getting key: ${e}`, async () => {
|
|
13
|
+
let { value: n } = await t.get({ key: e });
|
|
14
|
+
return n;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
static async remove(e) {
|
|
18
|
+
return await n.timeAsync(`Removing key: ${e}`, async () => await t.remove({ key: e }));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);let e=require(`zustand`),t=require(`zustand/middleware`);function n(n,r){return(0,e.create)()((0,t.persist)((e,t)=>({...n.defaultValue,...r?r(e,t):{}}),{name:n.key,storage:(0,t.createJSONStorage)(()=>({getItem:()=>n.get(),setItem:(e,t)=>n.set(t),removeItem:()=>n.delete()})),partialize:e=>{let{...t}=e;return Object.fromEntries(Object.entries(t).filter(([e,t])=>typeof t!=`function`))}}))}module.exports=n;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as StoreService } from './store.service';
|
|
2
|
+
/**
|
|
3
|
+
* storeFactory
|
|
4
|
+
*
|
|
5
|
+
* Fábrica de alto nivel para crear Stores de Zustand persistidas
|
|
6
|
+
* utilizando la infraestructura de StoreService.
|
|
7
|
+
*
|
|
8
|
+
* @param service Instancia de StoreService que maneja la persistencia cruda.
|
|
9
|
+
* @param setup Función para definir acciones adicionales y lógica de la store.
|
|
10
|
+
*/
|
|
11
|
+
export default function storeFactory<TState extends object, TActions extends object = {}>(service: StoreService<TState>, setup?: (set: any, get: any) => TActions): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<TState & TActions>, "setState" | "persist"> & {
|
|
12
|
+
setState(partial: (TState & TActions) | Partial<TState & TActions> | ((state: TState & TActions) => (TState & TActions) | Partial<TState & TActions>), replace?: false | undefined): unknown;
|
|
13
|
+
setState(state: (TState & TActions) | ((state: TState & TActions) => TState & TActions), replace: true): unknown;
|
|
14
|
+
persist: {
|
|
15
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<TState & TActions, unknown, unknown>>) => void;
|
|
16
|
+
clearStorage: () => void;
|
|
17
|
+
rehydrate: () => Promise<void> | void;
|
|
18
|
+
hasHydrated: () => boolean;
|
|
19
|
+
onHydrate: (fn: (state: TState & TActions) => void) => () => void;
|
|
20
|
+
onFinishHydration: (fn: (state: TState & TActions) => void) => () => void;
|
|
21
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<TState & TActions, unknown, unknown>>;
|
|
22
|
+
};
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { create as e } from "zustand";
|
|
2
|
+
import { createJSONStorage as t, persist as n } from "zustand/middleware";
|
|
3
|
+
//#region src/packages/stores/store.hook.ts
|
|
4
|
+
function r(r, i) {
|
|
5
|
+
return e()(n((e, t) => ({
|
|
6
|
+
...r.defaultValue,
|
|
7
|
+
...i ? i(e, t) : {}
|
|
8
|
+
}), {
|
|
9
|
+
name: r.key,
|
|
10
|
+
storage: t(() => ({
|
|
11
|
+
getItem: () => r.get(),
|
|
12
|
+
setItem: (e, t) => r.set(t),
|
|
13
|
+
removeItem: () => r.delete()
|
|
14
|
+
})),
|
|
15
|
+
partialize: (e) => {
|
|
16
|
+
let { ...t } = e;
|
|
17
|
+
return Object.fromEntries(Object.entries(t).filter(([e, t]) => typeof t != "function"));
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./storage.service.cjs`);function t(e,t){if(!{}.hasOwnProperty.call(e,t))throw TypeError(`attempted to use private field on non-instance`);return e}var n=0;function r(e){return`__private_`+ n+++`_`+e}var i=r(`_key`),a=r(`_default`),o=class{constructor(e,n){Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),t(this,i)[i]=e,t(this,a)[a]=n,this.init()}get defaultValue(){return t(this,a)[a]}async init(){await this.get()||await this.setObject(t(this,a)[a])}async get(){return await e.get(t(this,i)[i])}async getObject(){let e=await this.get();return e?JSON.parse(e):null}async set(n){return await e.set(t(this,i)[i],n)}async setObject(e){return await this.set(JSON.stringify(e))}async delete(){return await e.remove(t(this,i)[i])}get key(){return t(this,i)[i]}};module.exports=o;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class StoreService<T> {
|
|
2
|
+
#private;
|
|
3
|
+
constructor(key: string, defaultValue: T);
|
|
4
|
+
get defaultValue(): T;
|
|
5
|
+
init(): Promise<void>;
|
|
6
|
+
get(): Promise<string | null>;
|
|
7
|
+
getObject(): Promise<T | null>;
|
|
8
|
+
set(value: string): Promise<void>;
|
|
9
|
+
setObject(value: T): Promise<void>;
|
|
10
|
+
delete(): Promise<void>;
|
|
11
|
+
get key(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import e from "./storage.service.esm";
|
|
2
|
+
//#region src/packages/stores/store.service.ts
|
|
3
|
+
function t(e, t) {
|
|
4
|
+
if (!{}.hasOwnProperty.call(e, t)) throw TypeError("attempted to use private field on non-instance");
|
|
5
|
+
return e;
|
|
6
|
+
}
|
|
7
|
+
var n = 0;
|
|
8
|
+
function r(e) {
|
|
9
|
+
return "__private_" + n++ + "_" + e;
|
|
10
|
+
}
|
|
11
|
+
var i = /* @__PURE__ */ r("_key"), a = /* @__PURE__ */ r("_default"), o = class {
|
|
12
|
+
constructor(e, n) {
|
|
13
|
+
Object.defineProperty(this, i, {
|
|
14
|
+
writable: !0,
|
|
15
|
+
value: void 0
|
|
16
|
+
}), Object.defineProperty(this, a, {
|
|
17
|
+
writable: !0,
|
|
18
|
+
value: void 0
|
|
19
|
+
}), t(this, i)[i] = e, t(this, a)[a] = n, this.init();
|
|
20
|
+
}
|
|
21
|
+
get defaultValue() {
|
|
22
|
+
return t(this, a)[a];
|
|
23
|
+
}
|
|
24
|
+
async init() {
|
|
25
|
+
await this.get() || await this.setObject(t(this, a)[a]);
|
|
26
|
+
}
|
|
27
|
+
async get() {
|
|
28
|
+
return await e.get(t(this, i)[i]);
|
|
29
|
+
}
|
|
30
|
+
async getObject() {
|
|
31
|
+
let e = await this.get();
|
|
32
|
+
return e ? JSON.parse(e) : null;
|
|
33
|
+
}
|
|
34
|
+
async set(n) {
|
|
35
|
+
return await e.set(t(this, i)[i], n);
|
|
36
|
+
}
|
|
37
|
+
async setObject(e) {
|
|
38
|
+
return await this.set(JSON.stringify(e));
|
|
39
|
+
}
|
|
40
|
+
async delete() {
|
|
41
|
+
return await e.remove(t(this, i)[i]);
|
|
42
|
+
}
|
|
43
|
+
get key() {
|
|
44
|
+
return t(this, i)[i];
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { o as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../_virtual/_rolldown/runtime.cjs`);let t=require(`react`);t=e.__toESM(t);var n=class{constructor(){this.theme=``,this.icon=void 0,this.label=``}withIcon(e){return this.icon=e,this}withTheme(e){return this.theme=e,this}withLabel(e){return this.label=e,this}build(){return{theme:this.theme,icon:this.icon,label:this.label}}};exports.ThemeBuilder=n;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface BuiltTheme {
|
|
3
|
+
theme: string;
|
|
4
|
+
icon: React.ReactNode;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class ThemeBuilder {
|
|
8
|
+
private theme;
|
|
9
|
+
private icon;
|
|
10
|
+
private label;
|
|
11
|
+
withIcon(icon: React.ReactNode): this;
|
|
12
|
+
withTheme(theme: string): this;
|
|
13
|
+
withLabel(label: string): this;
|
|
14
|
+
build(): {
|
|
15
|
+
theme: string;
|
|
16
|
+
icon: React.ReactNode;
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
}
|