@tekkare/auriga 0.1.0 → 0.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.
Files changed (36) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/argAdvancedSearchBar.vue +318 -321
  3. package/dist/runtime/components/argAdvancedSearchBar.vue.d.ts +89 -3
  4. package/dist/runtime/components/argBtn.vue +48 -39
  5. package/dist/runtime/components/argBtn.vue.d.ts +72 -3
  6. package/dist/runtime/components/argComplexSelect.vue +255 -256
  7. package/dist/runtime/components/argComplexSelect.vue.d.ts +175 -3
  8. package/dist/runtime/components/argDataLoader.vue +8 -3
  9. package/dist/runtime/components/argDataLoader.vue.d.ts +1 -3
  10. package/dist/runtime/components/argDropdownSelect.vue +145 -138
  11. package/dist/runtime/components/argDropdownSelect.vue.d.ts +139 -3
  12. package/dist/runtime/components/argFileBtn.vue +58 -56
  13. package/dist/runtime/components/argFileBtn.vue.d.ts +60 -3
  14. package/dist/runtime/components/argHeaderTabs.vue +94 -101
  15. package/dist/runtime/components/argHeaderTabs.vue.d.ts +30 -3
  16. package/dist/runtime/components/argIcon.vue +2136 -3117
  17. package/dist/runtime/components/argIcon.vue.d.ts +1110 -2
  18. package/dist/runtime/components/argMultipleChoice.vue +84 -78
  19. package/dist/runtime/components/argMultipleChoice.vue.d.ts +49 -3
  20. package/dist/runtime/components/argNoData.vue +28 -25
  21. package/dist/runtime/components/argNoData.vue.d.ts +26 -3
  22. package/dist/runtime/components/argSearchInput.vue +38 -37
  23. package/dist/runtime/components/argSearchInput.vue.d.ts +30 -3
  24. package/dist/runtime/components/argSimpleLabel.vue +13 -11
  25. package/dist/runtime/components/argSimpleLabel.vue.d.ts +13 -3
  26. package/dist/runtime/components/argStyle.vue +8 -3
  27. package/dist/runtime/components/argStyle.vue.d.ts +1 -3
  28. package/dist/runtime/components/argTable.vue +384 -395
  29. package/dist/runtime/components/argTable.vue.d.ts +337 -3
  30. package/dist/runtime/components/argTags.vue +20 -10
  31. package/dist/runtime/components/argTags.vue.d.ts +26 -3
  32. package/dist/runtime/components/argTekkareLoader.vue +5 -2
  33. package/dist/runtime/components/argTekkareLoader.vue.d.ts +1 -3
  34. package/dist/runtime/components/argTooltip.vue +11 -11
  35. package/dist/runtime/components/argTooltip.vue.d.ts +39 -3
  36. package/package.json +5 -2
@@ -16,67 +16,69 @@
16
16
  </button>
17
17
  </template>
18
18
  <script>
19
- export default {
20
- name: "argFileBtn"
21
- };
22
- </script>
23
- <script setup lang="ts">
19
+ import {
20
+ computed,
21
+ defineComponent
22
+ } from "vue";
24
23
  import argIcon from "./argIcon.vue";
25
- import { onMounted, ref, computed, defineProps, defineEmits } from "vue";
26
- const props = defineProps({
27
- fileType: {
28
- type: String,
29
- required: false,
30
- },
31
- fileName: {
32
- type: String,
33
- required: true,
34
- },
35
- fileSize: {
36
- type: String,
37
- required: false,
38
- },
39
- download: {
40
- type: Boolean,
41
- default: false,
42
- required: false,
43
- },
44
- preview: {
45
- type: Boolean,
46
- default: false,
47
- required: false,
24
+ export default defineComponent({
25
+ name: "argFileBtn",
26
+ components: { argIcon },
27
+ props: {
28
+ fileType: {
29
+ type: String,
30
+ required: false
31
+ },
32
+ fileName: {
33
+ type: String,
34
+ required: true
35
+ },
36
+ fileSize: {
37
+ type: String,
38
+ required: false
39
+ },
40
+ download: {
41
+ type: Boolean,
42
+ default: false,
43
+ required: false
44
+ },
45
+ preview: {
46
+ type: Boolean,
47
+ default: false,
48
+ required: false
49
+ }
48
50
  },
49
- });
50
-
51
- const emit = defineEmits(["onPreview", "onDownload"]);
52
-
53
- var fileIcon = computed(() => {
54
- var iconName = { icon: "File", color: "#3E3F5E" };
55
- if (props.fileType) {
56
- var ft = props.fileType.toUpperCase();
57
- if (ft === "PDF") {
58
- iconName = { icon: "FilePdf", color: "#D93221" };
59
- } else if (ft === "CSV") {
60
- iconName = { icon: "FileCsv", color: "#387A47" };
61
- } else if (ft === "XLS" || ft === "XLSX") {
62
- iconName = { icon: "FileXls", color: "#387A47" };
63
- } else if (ft === "PNG") {
64
- iconName = { icon: "FilePng", color: "#3E3F5E" };
65
- } else if (ft === "JPG" || ft === "JPEG") {
66
- iconName = { icon: "FileJpg", color: "#3E3F5E" };
67
- } else if (ft === "MP4" || ft === "AVI" || ft === "MOV") {
68
- iconName = { icon: "FileVideo", color: "#3E3F5E" };
51
+ emits: ["onPreview", "onDownload"],
52
+ setup(props, { emit }) {
53
+ const fileIcon = computed(() => {
54
+ let iconName = { icon: "File", color: "#3E3F5E" };
55
+ if (props.fileType) {
56
+ const ft = props.fileType.toUpperCase();
57
+ if (ft === "PDF") {
58
+ iconName = { icon: "FilePdf", color: "#D93221" };
59
+ } else if (ft === "CSV") {
60
+ iconName = { icon: "FileCsv", color: "#387A47" };
61
+ } else if (ft === "XLS" || ft === "XLSX") {
62
+ iconName = { icon: "FileXls", color: "#387A47" };
63
+ } else if (ft === "PNG") {
64
+ iconName = { icon: "FilePng", color: "#3E3F5E" };
65
+ } else if (ft === "JPG" || ft === "JPEG") {
66
+ iconName = { icon: "FileJpg", color: "#3E3F5E" };
67
+ } else if (ft === "MP4" || ft === "AVI" || ft === "MOV") {
68
+ iconName = { icon: "FileVideo", color: "#3E3F5E" };
69
+ }
70
+ }
71
+ return iconName;
72
+ });
73
+ function onPreview() {
74
+ emit("onPreview");
75
+ }
76
+ function onDownload() {
77
+ emit("onDownload");
69
78
  }
79
+ return { fileIcon, onPreview, onDownload };
70
80
  }
71
- return iconName;
72
81
  });
73
-
74
- function onPreview() {
75
- emit("onPreview");
76
- }
77
- function onDownload() {
78
- emit("onDownload");
79
- }
80
82
  </script>
81
83
  <style scoped>
82
84
  .prmt_file_button {
@@ -1,4 +1,61 @@
1
- declare const _default: {
2
- name: string;
3
- };
1
+ declare const _default: import("vue").DefineComponent<{
2
+ fileType: {
3
+ type: StringConstructor;
4
+ required: false;
5
+ };
6
+ fileName: {
7
+ type: StringConstructor;
8
+ required: true;
9
+ };
10
+ fileSize: {
11
+ type: StringConstructor;
12
+ required: false;
13
+ };
14
+ download: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ required: false;
18
+ };
19
+ preview: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ required: false;
23
+ };
24
+ }, {
25
+ fileIcon: import("vue").ComputedRef<{
26
+ icon: string;
27
+ color: string;
28
+ }>;
29
+ onPreview: () => void;
30
+ onDownload: () => void;
31
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onPreview" | "onDownload")[], "onPreview" | "onDownload", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
32
+ fileType: {
33
+ type: StringConstructor;
34
+ required: false;
35
+ };
36
+ fileName: {
37
+ type: StringConstructor;
38
+ required: true;
39
+ };
40
+ fileSize: {
41
+ type: StringConstructor;
42
+ required: false;
43
+ };
44
+ download: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ required: false;
48
+ };
49
+ preview: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ required: false;
53
+ };
54
+ }>> & {
55
+ onOnPreview?: ((...args: any[]) => any) | undefined;
56
+ onOnDownload?: ((...args: any[]) => any) | undefined;
57
+ }, {
58
+ download: boolean;
59
+ preview: boolean;
60
+ }, {}>;
4
61
  export default _default;
@@ -24,118 +24,111 @@
24
24
  </div>
25
25
  </template>
26
26
  <script>
27
- export default {
28
- name: "argHeaderTabs"
29
- };
30
- </script>
31
-
32
- <script setup lang="ts">
27
+ import _ from "lodash";
33
28
  import {
34
29
  onMounted,
35
30
  ref,
36
31
  computed,
37
- defineProps,
38
- defineEmits,
39
32
  watch,
40
- defineComponent,
33
+ defineComponent
41
34
  } from "vue";
42
- import _ from "lodash";
43
- const props = defineProps({
44
- tabs: {
45
- type: Array,
46
- required: true,
47
- },
48
- index_menu: {
49
- type: [String, Number],
50
- default: 1,
51
- },
52
- });
53
-
54
- const emit = defineEmits(["updateMenu", "update:Value"]);
55
-
56
- var true_index_menu = ref(props.index_menu);
57
- var scrollValue = ref(0);
58
- var oldWidth = ref();
59
-
60
- watch(
61
- () => props.index_menu,
62
- (new_index_menu: number | string) => {
63
- true_index_menu.value = new_index_menu;
64
- }
65
- );
66
-
67
- function removeNullProps(object) {
68
- return _.reject(object, (value) => value === null);
69
- }
70
-
71
- var tabsWidth = computed(() => {
72
- const table = [];
73
- for (let i = 0; i < props.tabs.length; i++) {
74
- let domTab = document?.getElementById(`headerTab${i + 1}`);
75
- if (domTab !== null) {
76
- table.push(domTab.offsetWidth);
35
+ export default defineComponent({
36
+ name: "argHeaderTabs",
37
+ props: {
38
+ tabs: {
39
+ type: Array,
40
+ required: true
41
+ },
42
+ index_menu: {
43
+ type: [String, Number],
44
+ default: 1
77
45
  }
78
- }
79
- return table;
80
- });
81
-
82
- var getTranslationWidth = computed(() => {
83
- let translateWidth = 0;
84
- if (true_index_menu.value === 1) {
85
- return 0;
86
- } else {
87
- let i = 0;
88
- while (i + 1 < true_index_menu.value) {
89
- translateWidth += tabsWidth.value[i];
90
- i += 1;
46
+ },
47
+ emits: ["updateMenu", "update:Value"],
48
+ setup(props, { emit }) {
49
+ const true_index_menu = ref(props.index_menu);
50
+ const scrollValue = ref(0);
51
+ const oldWidth = ref();
52
+ watch(
53
+ () => props.index_menu,
54
+ (new_index_menu) => {
55
+ true_index_menu.value = new_index_menu;
56
+ }
57
+ );
58
+ function removeNullProps(object) {
59
+ return _.reject(object, (value) => value === null);
91
60
  }
92
- return translateWidth;
93
- }
94
- });
95
-
96
- function changeMenu(value: number | string) {
97
- if (typeof true_index_menu.value === "string") {
98
- emit("updateMenu", value.toString());
99
- emit("update:Value", value.toString());
100
- } else {
101
- emit("updateMenu", value);
102
- emit("update:Value", value);
103
- }
104
- true_index_menu.value = value;
105
- setBarWidth();
106
- }
107
-
108
- function setBarWidth() {
109
- const selector = document?.getElementById("header_nav_bar");
110
- const element = document?.getElementById(`headerTab${true_index_menu.value}`);
111
- if (element !== null && selector !== null) {
112
- const width = element.offsetWidth;
113
- selector.style.width = `${width}px`;
114
- selector.style.transform = `translateX(${
115
- getTranslationWidth.value +
116
- scrollValue.value +
117
- 24 * (true_index_menu.value - 1)
118
- }px)`;
119
- }
120
- }
121
-
122
- onMounted(() => {
123
- oldWidth.value = window?.innerWidth;
124
- setTimeout(() => {
125
- changeMenu(props.index_menu);
126
- });
127
- window.onresize = () => {
128
- const content = document?.querySelector(".header_tabs_overlay");
129
- if (content !== null) {
130
- if (window.innerWidth > oldWidth.value) {
131
- if (content.scrollLeft === 0) {
132
- scrollValue.value = 0;
61
+ const tabsWidth = computed(() => {
62
+ const table = [];
63
+ for (let i = 0; i < props.tabs.length; i++) {
64
+ let domTab = document?.getElementById(`headerTab${i + 1}`);
65
+ if (domTab !== null) {
66
+ table.push(domTab.offsetWidth);
67
+ }
68
+ }
69
+ return table;
70
+ });
71
+ const getTranslationWidth = computed(() => {
72
+ let translateWidth = 0;
73
+ if (true_index_menu.value === 1) {
74
+ return 0;
75
+ } else {
76
+ let i = 0;
77
+ while (i + 1 < true_index_menu.value) {
78
+ translateWidth += tabsWidth.value[i];
79
+ i += 1;
133
80
  }
81
+ return translateWidth;
82
+ }
83
+ });
84
+ function changeMenu(value) {
85
+ if (typeof true_index_menu.value === "string") {
86
+ emit("updateMenu", value.toString());
87
+ emit("update:Value", value.toString());
88
+ } else {
89
+ emit("updateMenu", value);
90
+ emit("update:Value", value);
134
91
  }
135
- oldWidth.value = window.innerWidth;
92
+ true_index_menu.value = value;
93
+ setBarWidth();
136
94
  }
137
- setBarWidth();
138
- };
95
+ function setBarWidth() {
96
+ const selector = document?.getElementById("header_nav_bar");
97
+ const element = document?.getElementById(
98
+ `headerTab${true_index_menu.value}`
99
+ );
100
+ if (element !== null && selector !== null) {
101
+ const width = element.offsetWidth;
102
+ selector.style.width = `${width}px`;
103
+ selector.style.transform = `translateX(${getTranslationWidth.value + scrollValue.value + 24 * (true_index_menu.value - 1)}px)`;
104
+ }
105
+ }
106
+ onMounted(() => {
107
+ oldWidth.value = window?.innerWidth;
108
+ setTimeout(() => {
109
+ changeMenu(props.index_menu);
110
+ });
111
+ window.onresize = () => {
112
+ const content = document?.querySelector(".header_tabs_overlay");
113
+ if (content !== null) {
114
+ if (window.innerWidth > oldWidth.value) {
115
+ if (content.scrollLeft === 0) {
116
+ scrollValue.value = 0;
117
+ }
118
+ }
119
+ oldWidth.value = window.innerWidth;
120
+ }
121
+ setBarWidth();
122
+ };
123
+ });
124
+ return {
125
+ true_index_menu,
126
+ scrollValue,
127
+ oldWidth,
128
+ removeNullProps,
129
+ changeMenu
130
+ };
131
+ }
139
132
  });
140
133
  </script>
141
134
 
@@ -1,4 +1,31 @@
1
- declare const _default: {
2
- name: string;
3
- };
1
+ declare const _default: import("vue").DefineComponent<{
2
+ tabs: {
3
+ type: ArrayConstructor;
4
+ required: true;
5
+ };
6
+ index_menu: {
7
+ type: (StringConstructor | NumberConstructor)[];
8
+ default: number;
9
+ };
10
+ }, {
11
+ true_index_menu: import("vue").Ref<string | number>;
12
+ scrollValue: import("vue").Ref<number>;
13
+ oldWidth: import("vue").Ref<any>;
14
+ removeNullProps: (object: any) => any;
15
+ changeMenu: (value: number | string) => void;
16
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:Value" | "updateMenu")[], "update:Value" | "updateMenu", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
+ tabs: {
18
+ type: ArrayConstructor;
19
+ required: true;
20
+ };
21
+ index_menu: {
22
+ type: (StringConstructor | NumberConstructor)[];
23
+ default: number;
24
+ };
25
+ }>> & {
26
+ "onUpdate:Value"?: ((...args: any[]) => any) | undefined;
27
+ onUpdateMenu?: ((...args: any[]) => any) | undefined;
28
+ }, {
29
+ index_menu: string | number;
30
+ }, {}>;
4
31
  export default _default;