From 3ec43eda0b73ceaa2ebd95ffce009108d815debf Mon Sep 17 00:00:00 2001 From: Mert Sincan Date: Fri, 18 Oct 2024 15:50:18 +0100 Subject: [PATCH] Add new base structures to core --- packages/core/package.json | 4 +- .../BaseEditableHolder.d.ts | 30 ++++++ .../baseeditableholder/BaseEditableHolder.vue | 94 +++++++++++++++++++ .../core/src/baseeditableholder/package.json | 11 +++ packages/core/src/baseinput/BaseInput.d.ts | 30 ++++++ packages/core/src/baseinput/BaseInput.vue | 42 +++++++++ packages/core/src/baseinput/package.json | 11 +++ pnpm-workspace.yaml | 1 + 8 files changed, 222 insertions(+), 1 deletion(-) create mode 100644 packages/core/src/baseeditableholder/BaseEditableHolder.d.ts create mode 100644 packages/core/src/baseeditableholder/BaseEditableHolder.vue create mode 100644 packages/core/src/baseeditableholder/package.json create mode 100644 packages/core/src/baseinput/BaseInput.d.ts create mode 100644 packages/core/src/baseinput/BaseInput.vue create mode 100644 packages/core/src/baseinput/package.json diff --git a/packages/core/package.json b/packages/core/package.json index 627e77105..956ec7730 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -22,6 +22,8 @@ "./basecomponent/style": "./src/basecomponent/style/BaseComponentStyle.js", "./basecomponent": "./src/basecomponent/BaseComponent.vue", "./basedirective": "./src/basedirective/BaseDirective.js", + "./baseeditableholder": "./src/baseeditableholder/BaseEditableHolder.vue", + "./baseinput": "./src/baseinput/BaseInput.vue", "./config": "./src/config/PrimeVue.js", "./service": "./src/service/PrimeVueService.js", "./usestyle": "./src/usestyle/UseStyle.js", @@ -61,4 +63,4 @@ "engines": { "node": ">=12.11.0" } -} \ No newline at end of file +} diff --git a/packages/core/src/baseeditableholder/BaseEditableHolder.d.ts b/packages/core/src/baseeditableholder/BaseEditableHolder.d.ts new file mode 100644 index 000000000..2a42d0d4b --- /dev/null +++ b/packages/core/src/baseeditableholder/BaseEditableHolder.d.ts @@ -0,0 +1,30 @@ +/** + * + * [Live Demo](https://primevue.org/) + * + * @module basecomponent + * + */ +export interface ComponentHooks { + onBeforeCreate?(): void; + onCreated?(): void; + onBeforeMount?(): void; + onMounted?(): void; + onBeforeUpdate?(): void; + onUpdated?(): void; + onBeforeUnmount?(): void; + onUnmounted?(): void; +} + +export interface BaseComponentPassThroughOptions { + hooks?: ComponentHooks; +} + +/** + * @todo Update all d.ts with it. + */ +export interface BaseComponentPassThroughMethodOptions { + instance?: I | undefined | null; + props?: P | undefined | null; + state?: S | undefined | null; +} diff --git a/packages/core/src/baseeditableholder/BaseEditableHolder.vue b/packages/core/src/baseeditableholder/BaseEditableHolder.vue new file mode 100644 index 000000000..787aedbf9 --- /dev/null +++ b/packages/core/src/baseeditableholder/BaseEditableHolder.vue @@ -0,0 +1,94 @@ + diff --git a/packages/core/src/baseeditableholder/package.json b/packages/core/src/baseeditableholder/package.json new file mode 100644 index 000000000..9cf468b25 --- /dev/null +++ b/packages/core/src/baseeditableholder/package.json @@ -0,0 +1,11 @@ +{ + "main": "./BaseEditableHolder.vue", + "module": "./BaseEditableHolder.vue", + "types": "./BaseEditableHolder.d.ts", + "browser": { + "./sfc": "./BaseEditableHolder.vue" + }, + "sideEffects": [ + "*.vue" + ] +} diff --git a/packages/core/src/baseinput/BaseInput.d.ts b/packages/core/src/baseinput/BaseInput.d.ts new file mode 100644 index 000000000..2a42d0d4b --- /dev/null +++ b/packages/core/src/baseinput/BaseInput.d.ts @@ -0,0 +1,30 @@ +/** + * + * [Live Demo](https://primevue.org/) + * + * @module basecomponent + * + */ +export interface ComponentHooks { + onBeforeCreate?(): void; + onCreated?(): void; + onBeforeMount?(): void; + onMounted?(): void; + onBeforeUpdate?(): void; + onUpdated?(): void; + onBeforeUnmount?(): void; + onUnmounted?(): void; +} + +export interface BaseComponentPassThroughOptions { + hooks?: ComponentHooks; +} + +/** + * @todo Update all d.ts with it. + */ +export interface BaseComponentPassThroughMethodOptions { + instance?: I | undefined | null; + props?: P | undefined | null; + state?: S | undefined | null; +} diff --git a/packages/core/src/baseinput/BaseInput.vue b/packages/core/src/baseinput/BaseInput.vue new file mode 100644 index 000000000..aa68859a3 --- /dev/null +++ b/packages/core/src/baseinput/BaseInput.vue @@ -0,0 +1,42 @@ + diff --git a/packages/core/src/baseinput/package.json b/packages/core/src/baseinput/package.json new file mode 100644 index 000000000..ff1cf8b62 --- /dev/null +++ b/packages/core/src/baseinput/package.json @@ -0,0 +1,11 @@ +{ + "main": "./BaseInput.vue", + "module": "./BaseInput.vue", + "types": "./BaseInput.d.ts", + "browser": { + "./sfc": "./BaseInput.vue" + }, + "sideEffects": [ + "*.vue" + ] +} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 01a3e3d3b..21c996683 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,3 +5,4 @@ packages: catalog: '@primeuix/styled': ^0.2.0 '@primeuix/utils': ^0.2.0 + '@primeuix/form': ^0.2.0