@oneclick.dev/cms-core-modules 0.0.38 → 0.0.39

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.
Files changed (49) hide show
  1. package/dist/index.cjs.js +12 -12
  2. package/dist/index.mjs +14114 -9423
  3. package/dist/src/index.d.ts +2 -0
  4. package/dist/src/product-collections/components/detail/Inventory.vue.d.ts +2 -0
  5. package/dist/src/product-collections/components/detail/Main.vue.d.ts +2 -0
  6. package/dist/src/product-collections/components/detail/Price.vue.d.ts +2 -0
  7. package/dist/src/product-collections/components/detail/SEO.vue.d.ts +2 -0
  8. package/dist/src/product-collections/components/detail/Shipping.vue.d.ts +2 -0
  9. package/dist/src/product-collections/components/detail/Status.vue.d.ts +2 -0
  10. package/dist/src/product-collections/components/detail/price/UnitPriceDialog.vue.d.ts +17 -0
  11. package/dist/src/product-collections/components/detail/variants/Option.vue.d.ts +33 -0
  12. package/dist/src/product-collections/components/detail/variants/VariantList.vue.d.ts +38 -0
  13. package/dist/src/product-collections/composables/useTable.d.ts +3 -0
  14. package/dist/src/product-collections/config.d.ts +24 -0
  15. package/dist/src/product-collections/index.d.ts +63 -0
  16. package/dist/src/product-collections/index.vue.d.ts +22 -0
  17. package/dist/src/product-collections/metadata.d.ts +2 -0
  18. package/dist/src/product-collections/pages/Detail.vue.d.ts +14 -0
  19. package/dist/src/product-collections/pages/Overview.vue.d.ts +16 -0
  20. package/dist/src/product-collections/permissions.d.ts +5 -0
  21. package/dist/src/product-collections/routes.d.ts +15 -0
  22. package/dist/src/product-collections/stores/useTableStore.d.ts +5 -0
  23. package/dist/src/product-collections/tools.d.ts +25 -0
  24. package/dist/src/product-collections/types.d.ts +20 -0
  25. package/dist/src/products/components/detail/variants/Option.vue.d.ts +3 -0
  26. package/dist/src/products/components/detail/variants/VariantList.vue.d.ts +13 -1
  27. package/dist/src/products/config.d.ts +5 -35
  28. package/dist/src/products/index.d.ts +5 -35
  29. package/dist/src/products/types.d.ts +48 -41
  30. package/dist/src/promo-codes/components/create/DateRange.vue.d.ts +2 -0
  31. package/dist/src/promo-codes/components/create/MultiCodes.vue.d.ts +2 -0
  32. package/dist/src/promo-codes/components/create/Note.vue.d.ts +2 -0
  33. package/dist/src/promo-codes/components/create/SingleCode.vue.d.ts +2 -0
  34. package/dist/src/promo-codes/components/create/TypeAndValue/TypeDetailDialog.vue.d.ts +6 -0
  35. package/dist/src/promo-codes/components/create/TypeAndValue/TypeManageDialog.vue.d.ts +18 -0
  36. package/dist/src/promo-codes/components/create/TypeAndValue/index.vue.d.ts +2 -0
  37. package/dist/src/promo-codes/config.d.ts +14 -0
  38. package/dist/src/promo-codes/index.d.ts +53 -0
  39. package/dist/src/promo-codes/index.vue.d.ts +22 -0
  40. package/dist/src/promo-codes/metadata.d.ts +2 -0
  41. package/dist/src/promo-codes/pages/Create.vue.d.ts +16 -0
  42. package/dist/src/promo-codes/pages/Detail.vue.d.ts +14 -0
  43. package/dist/src/promo-codes/pages/Find.vue.d.ts +16 -0
  44. package/dist/src/promo-codes/permissions.d.ts +5 -0
  45. package/dist/src/promo-codes/routes.d.ts +15 -0
  46. package/dist/src/promo-codes/stores/useTableStore.d.ts +5 -0
  47. package/dist/src/promo-codes/tools.d.ts +25 -0
  48. package/dist/src/promo-codes/types.d.ts +42 -0
  49. package/package.json +3 -2
@@ -0,0 +1,6 @@
1
+ import { PromoType } from '../../../types';
2
+ declare const _default: import('vue').DefineComponent<{}, {
3
+ open: (type?: PromoType) => void;
4
+ openFromTemplate: (type: string) => void;
5
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { PromoType } from '../../../types';
2
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
3
+ typeDetailDialog: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
4
+ open: (type?: PromoType) => void;
5
+ openFromTemplate: (type: string) => void;
6
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
7
+ P: {};
8
+ B: {};
9
+ D: {};
10
+ C: {};
11
+ M: {};
12
+ Defaults: {};
13
+ }, Readonly<{}> & Readonly<{}>, {
14
+ open: (type?: PromoType) => void;
15
+ openFromTemplate: (type: string) => void;
16
+ }, {}, {}, {}, {}> | null;
17
+ }, any>;
18
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { ResolvedConfig } from '../types';
2
+ export declare const config: {
3
+ readonly project: {
4
+ readonly label: "Project";
5
+ readonly type: "resource";
6
+ readonly accept: ["FIREBASE"];
7
+ };
8
+ readonly promoCodeCollection: {
9
+ readonly label: "Promo Code Collection";
10
+ readonly type: "input";
11
+ readonly default: "promo-codes";
12
+ };
13
+ };
14
+ export type ConfigValues = ResolvedConfig<typeof config>;
@@ -0,0 +1,53 @@
1
+ export declare const promoCodes: {
2
+ component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
+ config: {
4
+ type: ObjectConstructor;
5
+ required: true;
6
+ };
7
+ routes: {
8
+ type: import('vue').PropType<ModuleRoute[]>;
9
+ required: true;
10
+ };
11
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
12
+ config: {
13
+ type: ObjectConstructor;
14
+ required: true;
15
+ };
16
+ routes: {
17
+ type: import('vue').PropType<ModuleRoute[]>;
18
+ required: true;
19
+ };
20
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
21
+ metadata: ModuleMetadata;
22
+ config: {
23
+ readonly project: {
24
+ readonly label: "Project";
25
+ readonly type: "resource";
26
+ readonly accept: ["FIREBASE"];
27
+ };
28
+ readonly promoCodeCollection: {
29
+ readonly label: "Promo Code Collection";
30
+ readonly type: "input";
31
+ readonly default: "promo-codes";
32
+ };
33
+ };
34
+ routes: {
35
+ path: string;
36
+ component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
37
+ config: {
38
+ type: import('vue').PropType<import('./config').ConfigValues>;
39
+ required: true;
40
+ };
41
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
42
+ config: {
43
+ type: import('vue').PropType<import('./config').ConfigValues>;
44
+ required: true;
45
+ };
46
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
47
+ }[];
48
+ permissions: {
49
+ key: string;
50
+ name: string;
51
+ description: string;
52
+ }[];
53
+ };
@@ -0,0 +1,22 @@
1
+ import { PropType } from 'vue';
2
+ import { ModuleRoute } from '~/types';
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ config: {
5
+ type: ObjectConstructor;
6
+ required: true;
7
+ };
8
+ routes: {
9
+ type: PropType<ModuleRoute[]>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
13
+ config: {
14
+ type: ObjectConstructor;
15
+ required: true;
16
+ };
17
+ routes: {
18
+ type: PropType<ModuleRoute[]>;
19
+ required: true;
20
+ };
21
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
22
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { ModuleMetadata } from '~/types';
2
+ export declare const metadata: ModuleMetadata;
@@ -0,0 +1,16 @@
1
+ import { PropType } from 'vue';
2
+ import { ConfigValues } from '../config';
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ config: {
5
+ type: PropType<ConfigValues>;
6
+ required: true;
7
+ };
8
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
9
+ config: {
10
+ type: PropType<ConfigValues>;
11
+ required: true;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
14
+ container: HTMLDivElement;
15
+ }, HTMLDivElement>;
16
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { ConfigValues } from '../config';
2
+ import { PropType } from 'vue';
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ config: {
5
+ type: PropType<ConfigValues>;
6
+ required: true;
7
+ };
8
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
9
+ config: {
10
+ type: PropType<ConfigValues>;
11
+ required: true;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
14
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { PropType } from 'vue';
2
+ import { ConfigValues } from '../config';
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ config: {
5
+ type: PropType<ConfigValues>;
6
+ required: true;
7
+ };
8
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
9
+ config: {
10
+ type: PropType<ConfigValues>;
11
+ required: true;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
14
+ container: HTMLDivElement;
15
+ }, HTMLDivElement>;
16
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export declare const permissions: {
2
+ key: string;
3
+ name: string;
4
+ description: string;
5
+ }[];
@@ -0,0 +1,15 @@
1
+ declare const _default: {
2
+ path: string;
3
+ component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ config: {
5
+ type: import('vue').PropType<import('./config').ConfigValues>;
6
+ required: true;
7
+ };
8
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
9
+ config: {
10
+ type: import('vue').PropType<import('./config').ConfigValues>;
11
+ required: true;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
14
+ }[];
15
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export declare const useTableStore: import('pinia').StoreDefinition<"table", {
2
+ data: never[];
3
+ }, {}, {
4
+ fetchData(): Promise<void>;
5
+ }>;
@@ -0,0 +1,25 @@
1
+ export declare const tools: {
2
+ getData: {
3
+ description: string;
4
+ params: {
5
+ size: {
6
+ type: string;
7
+ default: number;
8
+ };
9
+ };
10
+ returns: {
11
+ type: string;
12
+ };
13
+ };
14
+ filterTable: {
15
+ description: string;
16
+ params: {
17
+ filter: {
18
+ type: string;
19
+ };
20
+ };
21
+ returns: {
22
+ type: string;
23
+ };
24
+ };
25
+ };
@@ -0,0 +1,42 @@
1
+ import { DateValue } from '@internationalized/date';
2
+ export interface PromoCode {
3
+ id?: string;
4
+ code: string;
5
+ type: string;
6
+ value?: number;
7
+ minOrderAmount?: number;
8
+ usageLimit: number;
9
+ usageCount: number;
10
+ lastUsedAt?: Date | null;
11
+ startsAt?: Date | null;
12
+ expiresAt?: Date | null;
13
+ disabled?: boolean;
14
+ note?: string;
15
+ createdAt: Date;
16
+ updatedAt: Date;
17
+ }
18
+ export interface NewCoupon {
19
+ creationMode: 'single' | 'multi';
20
+ generationMode: 'generate' | 'input';
21
+ quantity?: number;
22
+ prefix?: string;
23
+ codes?: string;
24
+ code?: string;
25
+ type?: string;
26
+ value?: number;
27
+ unlimitedUses?: boolean;
28
+ startsAt?: DateValue | null;
29
+ expiresAt?: DateValue | null;
30
+ minOrderAmount?: number;
31
+ note?: string;
32
+ }
33
+ export interface PromoType {
34
+ id: string;
35
+ label: string;
36
+ key: string;
37
+ allowUnlimitedUses: boolean;
38
+ hasValueField: boolean;
39
+ valueLabel: string;
40
+ valuePrefix: string;
41
+ valueSuffix: string;
42
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneclick.dev/cms-core-modules",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "peerDependencies": {
23
23
  "@formkit/drag-and-drop": "^0.5.3",
24
- "@oneclick.dev/cms-kit": "0.0.50",
24
+ "@oneclick.dev/cms-kit": "^0.0.51",
25
25
  "@internationalized/date": "^3.8.0",
26
26
  "@tanstack/vue-table": "^8.21.3",
27
27
  "@vee-validate/zod": "^4.15.0",
@@ -34,6 +34,7 @@
34
34
  "tailwind-merge": "^3.2.0",
35
35
  "vee-validate": "^4.15.0",
36
36
  "vue": "^3",
37
+ "vue-sonner": "^2.0.1",
37
38
  "zod": "^3.24.4"
38
39
  },
39
40
  "devDependencies": {