dolphin-components 3.1.1 → 3.1.3

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/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ title: ContentTitle[];
16
16
  bodyClass: string;
17
17
  titleClass: string;
18
18
  disableMinHeight: boolean;
19
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
19
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
20
20
 
21
21
  declare const __VLS_component_2: DefineComponent<ModalProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
22
22
  [x: string]: never;
@@ -43,6 +43,12 @@ bodyWidth: number;
43
43
  body2Width: number;
44
44
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
45
45
 
46
+ declare type __VLS_Props = {
47
+ show?: boolean;
48
+ files?: FileInput | FileInput[];
49
+ initialIndex?: number;
50
+ };
51
+
46
52
  declare function __VLS_template(): {
47
53
  attrs: Partial<{}>;
48
54
  slots: {
@@ -51,7 +57,7 @@ declare function __VLS_template(): {
51
57
  body?(_: {}): any;
52
58
  };
53
59
  refs: {};
54
- rootEl: HTMLDivElement;
60
+ rootEl: any;
55
61
  };
56
62
 
57
63
  declare function __VLS_template_2(): {
@@ -207,6 +213,33 @@ declare type DebounceHandler<T> = {
207
213
 
208
214
  export declare type FileInput = PreviewImageDetail | File | string;
209
215
 
216
+ export declare const FilePreview: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
217
+ close: () => any;
218
+ "update:show": (value: boolean) => any;
219
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
220
+ onClose?: (() => any) | undefined;
221
+ "onUpdate:show"?: ((value: boolean) => any) | undefined;
222
+ }>, {
223
+ show: boolean;
224
+ files: FileInput | FileInput[];
225
+ initialIndex: number;
226
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
227
+
228
+ export declare const FileUpload: DefineComponent<UploadFileProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
229
+ "update:modelValue": (value: File | File[] | null) => any;
230
+ }, string, PublicProps, Readonly<UploadFileProps> & Readonly<{
231
+ "onUpdate:modelValue"?: ((value: File | File[] | null) => any) | undefined;
232
+ }>, {
233
+ modelValue: File | File[] | null;
234
+ columns: number;
235
+ multiple: boolean;
236
+ accept: string;
237
+ maxFiles: number;
238
+ dragAndDrop: boolean;
239
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
240
+ fileInput: HTMLInputElement;
241
+ }, HTMLDivElement>;
242
+
210
243
  export declare const FocusNextPlugin: {
211
244
  install(app: App): void;
212
245
  };
@@ -238,7 +271,6 @@ classValue: string;
238
271
  export declare const InputCurrency: {
239
272
  mounted(el: CurrencyInputElement, binding: DirectiveBinding): void;
240
273
  updated(el: HTMLInputElement, binding: DirectiveBinding): void;
241
- unmounted(el: HTMLInputElement): void;
242
274
  };
243
275
 
244
276
  export declare const InputError: {
@@ -358,7 +390,7 @@ enableHeaderPrint: boolean;
358
390
  enableFooterPrint: boolean;
359
391
  enableHeaderBlock: boolean;
360
392
  enableFooterBlock: boolean;
361
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
393
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
362
394
 
363
395
  export declare interface TabulatorAction {
364
396
  name: string;
@@ -0,0 +1,25 @@
1
+ const noDuplicatePiniaStoreIds = require("./pinia/eslint-pinia.cjs");
2
+
3
+ const plugin = {
4
+ meta: {
5
+ name: "dolphin-eslint-plugin",
6
+ version: "1.0.0",
7
+ },
8
+ rules: {
9
+ "no-duplicate-pinia-store-ids": noDuplicatePiniaStoreIds,
10
+ },
11
+ };
12
+
13
+ module.exports = {
14
+ plugin,
15
+ configs: {
16
+ recommended: {
17
+ plugins: {
18
+ dolphin: plugin,
19
+ },
20
+ rules: {
21
+ "dolphin/no-duplicate-pinia-store-ids": "error",
22
+ },
23
+ },
24
+ },
25
+ };
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ const storeIds = new Map();
4
+
5
+ module.exports = {
6
+ meta: {
7
+ type: "problem",
8
+ docs: {
9
+ description: "Disallow duplicate Pinia defineStore ids",
10
+ },
11
+ schema: [],
12
+ messages: {
13
+ duplicate: "Pinia store id '{{id}}' is already defined in {{file}}.",
14
+ },
15
+ },
16
+
17
+ create(context) {
18
+ const filename = context.getFilename();
19
+
20
+ function reportIfDuplicate(id, node) {
21
+ const existingFile = storeIds.get(id);
22
+
23
+ if (existingFile === filename) {
24
+ return;
25
+ }
26
+
27
+ if (existingFile) {
28
+ context.report({
29
+ node,
30
+ messageId: "duplicate",
31
+ data: {
32
+ id,
33
+ file: existingFile,
34
+ },
35
+ });
36
+ return;
37
+ }
38
+
39
+ storeIds.set(id, filename);
40
+ }
41
+
42
+ return {
43
+ CallExpression(node) {
44
+ if (
45
+ node.callee.type === "Identifier" &&
46
+ node.callee.name === "defineStore" &&
47
+ node.arguments.length > 0
48
+ ) {
49
+ const firstArg = node.arguments[0];
50
+
51
+ if (firstArg.type === "Literal" && typeof firstArg.value === "string") {
52
+ reportIfDuplicate(firstArg.value, firstArg);
53
+ }
54
+
55
+ if (firstArg.type === "ObjectExpression") {
56
+ const idProp = firstArg.properties.find(
57
+ (p) =>
58
+ p.type === "Property" &&
59
+ p.key.type === "Identifier" &&
60
+ p.key.name === "id" &&
61
+ p.value.type === "Literal" &&
62
+ typeof p.value.value === "string"
63
+ );
64
+
65
+ if (idProp) {
66
+ reportIfDuplicate(idProp.value.value, idProp.value);
67
+ }
68
+ }
69
+ }
70
+ },
71
+ };
72
+ },
73
+ };
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ const { RuleTester } = require("eslint");
4
+ const rule = require("./eslint-pinia.cjs");
5
+
6
+ const ruleTester = new RuleTester({
7
+ languageOptions: {
8
+ ecmaVersion: 2020,
9
+ sourceType: "module",
10
+ },
11
+ });
12
+
13
+ ruleTester.run("no-duplicate-pinia-store-ids", rule, {
14
+ valid: [
15
+ {
16
+ code: `
17
+ import { defineStore } from 'pinia'
18
+ defineStore('user')
19
+ `,
20
+ filename: "stores/user.js",
21
+ },
22
+ {
23
+ code: `
24
+ import { defineStore } from 'pinia'
25
+ defineStore('profile')
26
+ `,
27
+ filename: "stores/profile.js",
28
+ },
29
+ {
30
+ code: `
31
+ import { defineStore } from 'pinia'
32
+ defineStore({
33
+ id: 'settings',
34
+ state: () => ({})
35
+ })
36
+ `,
37
+ filename: "stores/settings.js",
38
+ },
39
+ ],
40
+
41
+ invalid: [
42
+ {
43
+ code: `
44
+ import { defineStore } from 'pinia'
45
+ defineStore('user')
46
+ `,
47
+ filename: "stores/user-duplicate.js",
48
+ errors: [
49
+ {
50
+ message: "Pinia store id 'user' is already defined in stores/user.js.",
51
+ },
52
+ ],
53
+ },
54
+ {
55
+ code: `
56
+ import { defineStore } from 'pinia'
57
+ defineStore({
58
+ id: 'settings'
59
+ })
60
+ `,
61
+ filename: "stores/settings-duplicate.js",
62
+ errors: [
63
+ {
64
+ message: "Pinia store id 'settings' is already defined in stores/settings.js.",
65
+ },
66
+ ],
67
+ },
68
+ ],
69
+ });
package/package.json CHANGED
@@ -1,69 +1,87 @@
1
1
  {
2
- "name": "dolphin-components",
3
- "private": false,
4
- "version": "3.1.1",
5
- "type": "module",
6
- "files": [
7
- "dist"
8
- ],
9
- "engines": {
10
- "node": ">=24"
2
+ "name": "dolphin-components",
3
+ "private": false,
4
+ "version": "3.1.3",
5
+ "type": "module",
6
+ "files": [
7
+ "dist",
8
+ "eslint"
9
+ ],
10
+ "engines": {
11
+ "node": ">=24"
12
+ },
13
+ "author": "<Mavorion Systems> (https://mavorion.com/)",
14
+ "homepage": "https://mavorion.com/",
15
+ "license": "Apache-2.0",
16
+ "main": "./dist/dolphin-components.umd.cjs",
17
+ "module": "./dist/dolphin-components.es.js",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/dolphin-components.es.js",
22
+ "require": "./dist/dolphin-components.umd.cjs"
11
23
  },
12
- "author": "<Mavorion Systems> (https://mavorion.com/)",
13
- "homepage": "https://mavorion.com/",
14
- "license": "Apache-2.0",
15
- "main": "./dist/dolphin-components.umd.cjs",
16
- "module": "./dist/dolphin-components.es.js",
17
- "exports": {
18
- ".": {
19
- "types": "./dist/index.d.ts",
20
- "import": "./dist/dolphin-components.es.js",
21
- "require": "./dist/dolphin-components.umd.cjs"
22
- },
23
- "./dolphin-components.css": "./dist/dolphin-components.css"
24
- },
25
- "types": "./dist/index.d.ts",
26
- "scripts": {
27
- "dev": "vite --host",
28
- "build": "vite build && vue-tsc --declaration --emitDeclarationOnly",
29
- "format": "prettier --write src/",
30
- "format:check": "prettier --check src/",
31
- "preview": "vite preview"
32
- },
33
- "dependencies": {
34
- "@tailwindcss/vite": "^4.1.18",
35
- "@types/tabulator-tables": "^6.3.1",
36
- "axios": "^1.13.2",
37
- "lucide-vue-next": "^0.561.0",
38
- "moment": "^2.30.1",
39
- "nepali-date-library": "^1.1.11",
40
- "nepali-datepicker-vue": "^1.0.12",
41
- "sweetalert2": "^11.26.17",
42
- "tabulator-tables": "^6.3.1",
43
- "tailwindcss": "^4.1.18",
44
- "utility-types": "^3.11.0",
45
- "vue": "^3.5.26",
46
- "vue-datepicker-next": "^1.0.3",
47
- "vue-multiselect": "^3.4.0",
48
- "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
49
- },
50
- "peerDependencies": {
51
- "vue-router": "^4.5.0"
52
- },
53
- "devDependencies": {
54
- "@types/node": "^25.0.6",
55
- "@vitejs/plugin-vue": "^6.0.3",
56
- "@vue/tsconfig": "^0.8.1",
57
- "path": "^0.12.7",
58
- "prettier": "3.7.4",
59
- "rollup-plugin-typescript2": "^0.36.0",
60
- "typescript": "~5.9.3",
61
- "vite": "^7.3.1",
62
- "vite-plugin-dts": "^4.5.4",
63
- "vue-tsc": "^3.2.2"
64
- },
65
- "keywords": [
66
- "mavorion",
67
- "dolphin"
68
- ]
69
- }
24
+ "./dolphin-components.css": "./dist/dolphin-components.css",
25
+ "./eslint": "./eslint/eslint-rules.cjs"
26
+ },
27
+ "types": "./dist/index.d.ts",
28
+ "dependencies": {
29
+ "@tailwindcss/vite": "^4.1.18",
30
+ "@types/tabulator-tables": "^6.3.1",
31
+ "axios": "^1.13.2",
32
+ "lucide-vue-next": "^0.561.0",
33
+ "moment": "^2.30.1",
34
+ "nepali-date-library": "^1.1.12",
35
+ "nepali-datepicker-vue": "^1.0.12",
36
+ "sweetalert2": "^11.26.17",
37
+ "tabulator-tables": "^6.3.1",
38
+ "tailwindcss": "^4.1.18",
39
+ "utility-types": "^3.11.0",
40
+ "vue": "^3.5.27",
41
+ "vue-datepicker-next": "^1.0.3",
42
+ "vue-multiselect": "^3.4.0",
43
+ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
44
+ },
45
+ "peerDependencies": {
46
+ "vue-router": "^4.5.0",
47
+ "eslint": "^9.39.2"
48
+ },
49
+ "devDependencies": {
50
+ "@eslint/js": "^9.39.2",
51
+ "@tsconfig/node24": "^24.0.4",
52
+ "@types/node": "^25.0.9",
53
+ "@vitejs/plugin-vue": "^6.0.3",
54
+ "@vue/eslint-config-prettier": "^10.2.0",
55
+ "@vue/eslint-config-typescript": "^14.6.0",
56
+ "@vue/tsconfig": "^0.8.1",
57
+ "eslint-plugin-prettier": "^5.5.5",
58
+ "eslint-plugin-vue": "^10.7.0",
59
+ "globals": "^17.0.0",
60
+ "jiti": "^2.6.1",
61
+ "npm-run-all2": "^8.0.4",
62
+ "path": "^0.12.7",
63
+ "prettier": "3.8.0",
64
+ "typescript": "~5.9.3",
65
+ "typescript-eslint": "^8.53.1",
66
+ "vite": "^7.3.1",
67
+ "vite-plugin-dts": "^4.5.4",
68
+ "vite-plugin-vue-devtools": "^8.0.5",
69
+ "vue-tsc": "^3.2.2"
70
+ },
71
+ "keywords": [
72
+ "mavorion",
73
+ "dolphin"
74
+ ],
75
+ "scripts": {
76
+ "dev": "vite --host",
77
+ "prebuild": "npm run lint",
78
+ "build": "run-p type-check \"build-only {@}\" --",
79
+ "preview": "vite preview",
80
+ "build-only": "vite build",
81
+ "type-check": "vue-tsc --declaration --emitDeclarationOnly",
82
+ "format": "prettier --write src/",
83
+ "format:check": "prettier --check src/",
84
+ "lint": "eslint src --max-warnings 0",
85
+ "lint:fix": "eslint src --fix"
86
+ }
87
+ }