quasar-ui-danx 0.1.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. package/dist/danx.es.js +17534 -0
  2. package/dist/danx.umd.js +21 -0
  3. package/dist/style.css +1 -0
  4. package/package.json +22 -40
  5. package/src/components/ActionTable/ActionTable.vue +7 -6
  6. package/src/components/ActionTable/ActionTableColumn.vue +1 -1
  7. package/src/components/ActionTable/Filters/FilterFieldList.vue +1 -2
  8. package/src/components/ActionTable/Filters/FilterListToggle.vue +1 -1
  9. package/src/components/ActionTable/Filters/FilterToolbarLayout.vue +8 -7
  10. package/src/components/ActionTable/Filters/index.ts +3 -3
  11. package/src/components/ActionTable/Form/Fields/BooleanField.vue +2 -2
  12. package/src/components/ActionTable/Form/Fields/ConfirmPasswordField.vue +3 -1
  13. package/src/components/ActionTable/Form/Fields/DateTimeField.vue +1 -1
  14. package/src/components/ActionTable/Form/Fields/InlineDateTimeField.vue +1 -1
  15. package/src/components/ActionTable/Form/Fields/IntegerField.vue +1 -1
  16. package/src/components/ActionTable/Form/Fields/MultiFileField.vue +1 -1
  17. package/src/components/ActionTable/Form/Fields/MultiKeywordField.vue +1 -2
  18. package/src/components/ActionTable/Form/Fields/NewPasswordField.vue +1 -1
  19. package/src/components/ActionTable/Form/Fields/NumberField.vue +1 -1
  20. package/src/components/ActionTable/Form/Fields/NumberRangeField.vue +1 -1
  21. package/src/components/ActionTable/Form/Fields/SelectWithChildrenField.vue +1 -1
  22. package/src/components/ActionTable/Form/Fields/SingleFileField.vue +1 -1
  23. package/src/components/ActionTable/Form/Fields/TextField.vue +8 -9
  24. package/src/components/ActionTable/Form/Fields/WysiwygField.vue +1 -1
  25. package/src/components/ActionTable/Form/Fields/index.ts +1 -0
  26. package/src/components/AuditHistory/AuditHistoryItem.vue +3 -3
  27. package/src/components/PanelsDrawer/PanelsDrawerTabs.vue +1 -1
  28. package/src/components/Utility/Dialogs/InputDialog.vue +1 -1
  29. package/src/index.esm.js +1 -3
  30. package/tsconfig.json +3 -0
  31. package/vite.config.js +29 -0
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .slide-image[data-v-ac4d9efe]{width:100%;height:100%;background:#000;display:flex;justify-content:center;align-items:center}.slide-image img[data-v-ac4d9efe]{max-height:100%;max-width:100%;object-fit:contain}.carousel[data-v-ac4d9efe] .q-carousel__navigation--bottom{position:relative;bottom:8em}.action-button[data-v-4bede0de]{position:absolute;bottom:1.5em;right:1em;z-index:1}.play-button[data-v-4bede0de]{position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;width:100%;height:100%;pointer-events:none}.collapsable-sidebar[data-v-38458242]{@apply overflow-y-auto scroll-smooth flex-shrink-0 border-r border-neutral-plus-5 transition-all;}.dialog-title[data-v-529ed64e]{@apply bg-gray-very-light text-gray-default font-medium uppercase text-xs px-6 py-3 border-b border-neutral-plus-5 rounded-t-md;font-family:Roboto,sans-serif;letter-spacing:.05em;box-shadow:0 -4px 12px #00000040}.dialog-content[data-v-529ed64e]{box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f}body .q-tooltip.interactive-tooltip{pointer-events:auto!important;background:#fff;color:inherit;box-shadow:0 0 10px 3px #0003}[class*=list-move],[class*=list-enter-active],[class*=".list-leave-active"]{transition:all .3s cubic-bezier(.55,0,.1,1)}[class*=list-leave-active]{position:absolute!important}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.fade-list-enter-from,.fade-list-leave-to{opacity:0;transform:scaleY(.01) translate(30px)}.fade-down-list-enter-from,.fade-down-list-leave-to{opacity:0;transform-origin:top;transform:translateY(30px)}.slide-enter-active,.slide-leave-active,.slide-right-enter-active,.slide-right-leave-active{transition:all .3s linear;width:100%}.slide-right-enter-active,.slide-enter-active{position:absolute!important;top:0}.slide-enter-from{right:-120%}.slide-enter-to{right:0}.slide-leave-to{left:-120%}.slide-leave-from{left:0}.slide-right-enter-from{left:-120%}.slide-right-enter-to{left:0}.slide-right-leave-to{right:-120%}.slide-right-leave-from{right:0}.list-move[data-v-6a1edcb9],.list-enter-active[data-v-6a1edcb9],.list-leave-active[data-v-6a1edcb9]{transition:all .5s ease}.list-enter-from[data-v-6a1edcb9],.list-leave-to[data-v-6a1edcb9]{opacity:0;transform:translate(2em)}.list-leave-active[data-v-6a1edcb9]{position:absolute}.category-toggle[data-v-042cd8be]{@apply text-xs font-bold rounded-lg border border-solid border-neutral-plus-5 px-2 py-1 mx-1 cursor-pointer flex items-center;}.category-toggle.has-visible-columns[data-v-042cd8be]{@apply text-white bg-blue-base;}[data-drop-zone] .resize-handle[data-v-f53f68e8]{position:absolute;top:0;right:-.45em;width:.9em;opacity:0;transition:all .3s}[data-drop-zone]:hover .resize-handle[data-v-f53f68e8]{opacity:1}.panel-tabs[data-v-5d23285c] .q-tab{justify-content:start!important;padding:0;@apply text-left py-2.5 px-2 rounded-lg hover:bg-neutral-plus-6;}.panel-tabs[data-v-5d23285c] .q-tab .q-focus-helper,.panel-tabs[data-v-5d23285c] .q-tab .q-tab__indicator{display:none}.panel-tabs[data-v-5d23285c] .q-tab .q-tab__content{@apply p-0;}.panel-tabs[data-v-5d23285c] .q-tab.q-tab--active{@apply text-white bg-blue-base;}
package/package.json CHANGED
@@ -1,55 +1,46 @@
1
1
  {
2
2
  "name": "quasar-ui-danx",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "author": "Dan <dan@flytedesk.com>",
5
5
  "description": "DanX Vue / Quasar component library",
6
6
  "license": "MIT",
7
- "module": "src/index.esm.js",
8
- "main": "src/index.common.js",
7
+ "type": "module",
9
8
  "scripts": {
10
- "dev": "cd dev && yarn dev && cd ..",
11
- "dev:umd": "yarn build && node build/script.open-umd.js",
12
- "dev:ssr": "cd dev && yarn 'dev:ssr' && cd ..",
13
- "dev:ios": "cd dev && yarn 'dev:ios' && cd ..",
14
- "dev:android": "cd dev && yarn 'dev:android' && cd ..",
15
- "dev:electron": "cd dev && yarn 'dev:electron' && cd ..",
16
- "build": "node build/index.js",
17
- "build:js": "node build/script.javascript.js",
18
- "build:css": "node build/script.css.js"
9
+ "dev": "vite",
10
+ "build": "vite build",
11
+ "preview": "vite preview"
19
12
  },
20
13
  "repository": {
21
14
  "type": "git",
22
15
  "url": "https://github.com/flytedan/quasar-app-extension-danx"
23
16
  },
24
- "bugs": "",
25
- "homepage": "",
26
17
  "devDependencies": {
27
- "@quasar/app-webpack": "^3.0.0",
28
18
  "@quasar/extras": "^1.16.4",
29
- "@rollup/plugin-buble": "^0.21.3",
30
- "@rollup/plugin-json": "^4.0.0",
31
- "@rollup/plugin-node-resolve": "^11.2.1",
32
- "@rollup/plugin-replace": "^2.4.2",
19
+ "@types/node": "^20.12.7",
20
+ "@vitejs/plugin-vue": "^5.0.4",
33
21
  "autoprefixer": "^10.4.17",
34
22
  "chalk": "^4.1.0",
35
23
  "core-js": "^3.0.0",
36
24
  "cssnano": "^4.1.10",
37
25
  "fs-extra": "^8.1.0",
38
- "open": "^7.3.0",
39
26
  "postcss": "^8.1.9",
40
27
  "quasar": "^2.0.0",
41
- "raw-loader": "^4.0.2",
42
- "rimraf": "^3.0.0",
43
- "rollup": "^2.45.0",
44
- "rtlcss": "^2.6.1",
45
28
  "sass": "^1.33.0",
46
- "svg-inline-loader": "^0.8.2",
47
- "ts-loader": "^9.5.1",
48
- "typescript": "^5.3.3",
49
- "uglify-js": "^3.13.3",
29
+ "tailwindcss": "^3.4.1",
30
+ "ts-node": "^10.9.2",
31
+ "typescript": "^5.4.4",
32
+ "vite": "^5.2.8",
33
+ "vite-svg-loader": "^5.1.0",
50
34
  "vue": "^3.0.0",
51
- "vue-router": "^4.0.0",
52
- "zlib": "^1.0.5"
35
+ "vue-router": "^4.0.0"
36
+ },
37
+ "dependencies": {
38
+ "@heroicons/vue": "v1",
39
+ "@tinymce/tinymce-vue": "^5.1.1",
40
+ "@vueuse/core": "^10.7.2",
41
+ "exifreader": "^4.21.1",
42
+ "gsap": "^3.12.5",
43
+ "luxon": "^3.4.4"
53
44
  },
54
45
  "browserslist": [
55
46
  "last 4 Chrome versions",
@@ -60,14 +51,5 @@
60
51
  "last 4 ChromeAndroid versions",
61
52
  "last 4 FirefoxAndroid versions",
62
53
  "last 4 iOS versions"
63
- ],
64
- "dependencies": {
65
- "@heroicons/vue": "v1",
66
- "@tinymce/tinymce-vue": "^5.1.1",
67
- "@vueuse/core": "^10.7.2",
68
- "exifreader": "^4.21.1",
69
- "gsap": "^3.12.5",
70
- "luxon": "^3.4.4",
71
- "tailwindcss": "^3.4.1"
72
- }
54
+ ]
73
55
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div class="overflow-hidden">
2
+ <div class="overflow-hidden w-full">
3
3
  <ActionVnode />
4
- <q-table
4
+ <QTable
5
5
  ref="actionTable"
6
6
  :selected="selectedRows"
7
7
  :pagination="quasarPagination"
@@ -10,7 +10,7 @@
10
10
  :rows="pagedItems?.data || []"
11
11
  selection="multiple"
12
12
  :rows-per-page-options="rowsPerPageOptions"
13
- class="sticky-column sticky-header w-full !border-0"
13
+ class="sticky-column sticky-header w-full h-full !border-0"
14
14
  color="blue-base"
15
15
  @update:selected="$emit('update:selected-rows', $event)"
16
16
  @update:pagination="() => {}"
@@ -33,7 +33,7 @@
33
33
  />
34
34
  </template>
35
35
  <template #header-cell="rowProps">
36
- <q-th
36
+ <QTh
37
37
  :key="rowProps.key"
38
38
  :props="rowProps"
39
39
  :data-drop-zone="`resize-column-` + rowProps.col.name"
@@ -47,7 +47,7 @@
47
47
  >
48
48
  <RowResizeIcon class="w-4 text-neutral-base" />
49
49
  </HandleDraggable>
50
- </q-th>
50
+ </QTh>
51
51
  </template>
52
52
  <template #body-cell="rowProps">
53
53
  <ActionTableColumn
@@ -58,11 +58,12 @@
58
58
  <slot :column-name="rowProps.col.name" :row="rowProps.row" :value="rowProps.value" />
59
59
  </ActionTableColumn>
60
60
  </template>
61
- </q-table>
61
+ </QTable>
62
62
  </div>
63
63
  </template>
64
64
 
65
65
  <script setup>
66
+ import { QTable, QTh } from 'quasar';
66
67
  import { ref } from 'vue';
67
68
  import { getItem, setItem } from '../../helpers';
68
69
  import { DragHandleIcon as RowResizeIcon } from '../../svg';
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <q-td :key="rowProps.key" :props="rowProps">
2
+ <q-td :key="rowProps.key" :props="rowProps" :style="columnStyle">
3
3
  <div :style="columnStyle">
4
4
  <div
5
5
  class="flex items-center flex-nowrap"
@@ -43,8 +43,7 @@
43
43
  </template>
44
44
  <script setup>
45
45
  import { computed } from 'vue';
46
- import FilterableField from './FilterableField';
47
- import FilterFieldItem from './FilterFieldItem';
46
+ import { FilterableField, FilterFieldItem } from './index';
48
47
 
49
48
  const emit = defineEmits(['update:filter']);
50
49
  const props = defineProps({
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="flex items-center" :class="{'w-72': showFilters}">
2
+ <div class="flex items-center transition-all" :class="{'w-72': showFilters, 'w-[6.5rem]': !showFilters}">
3
3
  <div class="flex-grow">
4
4
  <q-btn
5
5
  class="btn-blue-highlight"
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <div class="w-full flex justify-end items-center flex-nowrap border-b">
3
3
  <FilterListToggle
4
- :show-filters="showFilters"
5
- :filter="filter"
6
- class="border-r p-4 flex-shrink-0"
7
- @update:show-filters="$emit('update:show-filters', $event)"
8
- @update:filter="$emit('update:filter', $event)"
4
+ :show-filters="showFilters"
5
+ :filter="filter"
6
+ class="border-r p-4 flex-shrink-0"
7
+ @update:show-filters="$emit('update:show-filters', $event)"
8
+ @update:filter="$emit('update:filter', $event)"
9
9
  />
10
10
 
11
11
  <div class="flex-grow">
@@ -20,9 +20,10 @@
20
20
  </div>
21
21
  </template>
22
22
  <script setup>
23
- import { FilterListToggle } from "quasar-ui-danx";
23
+ import { QSeparator } from 'quasar';
24
+ import { FilterListToggle } from '../Filters';
24
25
 
25
- defineEmits(["update:show-filters", "update:filter"]);
26
+ defineEmits(['update:show-filters', 'update:filter']);
26
27
  defineProps({
27
28
  filter: {
28
29
  type: Object,
@@ -1,6 +1,6 @@
1
- export {
2
- default as CollapsableFiltersSidebar
3
- } from "./CollapsableFiltersSidebar.vue";
1
+ export { default as CollapsableFiltersSidebar } from "./CollapsableFiltersSidebar.vue";
2
+ export { default as FilterableField } from "./FilterableField.vue";
3
+ export { default as FilterFieldItem } from "./FilterFieldItem.vue";
4
4
  export { default as FilterFieldList } from "./FilterFieldList.vue";
5
5
  export { default as FilterListToggle } from "./FilterListToggle.vue";
6
6
  export { default as FilterToolbarLayout } from "./FilterToolbarLayout.vue";
@@ -11,11 +11,11 @@
11
11
  :show-name="showName"
12
12
  :class="labelClass"
13
13
  />
14
- </q-toggle>
14
+ </q-toggle>
15
15
  </template>
16
16
 
17
17
  <script setup>
18
- import FieldLabel from './FieldLabel';
18
+ import { FieldLabel } from './index';
19
19
 
20
20
  defineEmits(['update:model-value']);
21
21
  defineProps({
@@ -2,13 +2,15 @@
2
2
  <LabeledInput
3
3
  type="password"
4
4
  v-bind="props"
5
+ :name="name"
6
+ :model-value="modelValue"
5
7
  :rules="rules"
6
8
  @update:model-value="$emit('update:model-value', $event)"
7
9
  />
8
10
  </template>
9
11
 
10
12
  <script setup>
11
- import LabeledInput from './LabeledInput';
13
+ import { LabeledInput } from './index';
12
14
 
13
15
  defineEmits(['update:model-value']);
14
16
  const props = defineProps({
@@ -26,7 +26,7 @@
26
26
  <script setup>
27
27
  import { ref } from 'vue';
28
28
  import { fLocalizedDateTime } from '../../../../helpers';
29
- import DateTimePicker from './DateTimePicker';
29
+ import { DateTimePicker } from './index';
30
30
 
31
31
  const emit = defineEmits(['update:model-value']);
32
32
  const props = defineProps({
@@ -25,7 +25,7 @@
25
25
  <script setup>
26
26
  import { PencilIcon as EditIcon } from '@heroicons/vue/solid';
27
27
  import { fLocalizedDateTime } from '../../../../helpers';
28
- import DateTimePicker from './DateTimePicker';
28
+ import { DateTimePicker } from './index';
29
29
 
30
30
  const emit = defineEmits(['close', 'save', 'update:model-value']);
31
31
  defineProps({
@@ -9,7 +9,7 @@
9
9
  </template>
10
10
 
11
11
  <script setup>
12
- import NumberField from './NumberField';
12
+ import { NumberField } from './index';
13
13
 
14
14
  defineEmits(['update:model-value']);
15
15
  defineProps({
@@ -64,7 +64,7 @@
64
64
  import { onMounted } from 'vue';
65
65
  import { useMultiFileUpload } from '../../../../helpers';
66
66
  import { FilePreview } from '../../../Utility';
67
- import FieldLabel from './FieldLabel';
67
+ import { FieldLabel } from './index';
68
68
 
69
69
  const emit = defineEmits(['update:model-value']);
70
70
  const props = defineProps({
@@ -24,8 +24,7 @@
24
24
 
25
25
  <script setup>
26
26
  import { computed, ref, watch } from 'vue';
27
- import SelectField from './SelectField';
28
- import TextField from './TextField';
27
+ import { SelectField, TextField } from './index';
29
28
 
30
29
  const emit = defineEmits(['update:model-value']);
31
30
  const props = defineProps({
@@ -8,7 +8,7 @@
8
8
  </template>
9
9
 
10
10
  <script setup>
11
- import LabeledInput from './LabeledInput';
11
+ import { LabeledInput } from './index';
12
12
 
13
13
  defineEmits(['update:model-value']);
14
14
  const props = defineProps({
@@ -23,7 +23,7 @@
23
23
  import { useDebounceFn } from '@vueuse/core';
24
24
  import { computed, nextTick, ref, watch } from 'vue';
25
25
  import { fNumber } from '../../../../helpers';
26
- import FieldLabel from './FieldLabel';
26
+ import { FieldLabel } from './index';
27
27
 
28
28
  const emit = defineEmits(['update:model-value', 'update']);
29
29
  const props = defineProps({
@@ -42,7 +42,7 @@ import { useDebounceFn } from '@vueuse/core';
42
42
  import { computed, ref, watch } from 'vue';
43
43
  import { fCurrency, fNumber, fPercent } from '../../../../helpers';
44
44
  import { PercentIcon } from '../../../../svg';
45
- import NumberField from './NumberField';
45
+ import { NumberField } from './index';
46
46
 
47
47
  const emit = defineEmits(['update:model-value']);
48
48
  const props = defineProps({
@@ -30,7 +30,7 @@
30
30
  <script setup>
31
31
  import { ref, watch } from 'vue';
32
32
  import { remove } from '../../../../helpers';
33
- import SelectField from './SelectField';
33
+ import { SelectField } from './index';
34
34
 
35
35
  const emit = defineEmits(['update:model-value']);
36
36
  const props = defineProps({
@@ -51,7 +51,7 @@
51
51
  import { onMounted } from 'vue';
52
52
  import { useSingleFileUpload } from '../../../../helpers';
53
53
  import { FilePreview } from '../../../Utility';
54
- import FieldLabel from './FieldLabel';
54
+ import { FieldLabel } from './index';
55
55
 
56
56
  const emit = defineEmits(['update:model-value']);
57
57
  const props = defineProps({
@@ -26,19 +26,18 @@
26
26
  :class="labelClass"
27
27
  />
28
28
  </template>
29
- </q-input>
30
- <div v-if="readonly">
31
- <LabelValueBlock
32
- :label="label || field.label"
33
- :value="modelValue"
34
- />
35
- </div>
29
+ </q-input>
30
+ <div v-if="readonly">
31
+ <LabelValueBlock
32
+ :label="label || field.label"
33
+ :value="modelValue"
34
+ />
35
+ </div>
36
36
  </div>
37
37
  </template>
38
38
 
39
39
  <script setup>
40
- import FieldLabel from './FieldLabel';
41
- import LabelValueBlock from './LabelValueBlock';
40
+ import { FieldLabel, LabelValueBlock } from './index';
42
41
 
43
42
  defineEmits(['update:model-value', 'submit']);
44
43
  defineProps({
@@ -26,7 +26,7 @@
26
26
  <script setup>
27
27
  import { default as TinyMceEditor } from '@tinymce/tinymce-vue';
28
28
  import { apiKey } from '../../../../vendor/tinymce-config';
29
- import FieldLabel from './FieldLabel';
29
+ import { FieldLabel } from './index';
30
30
 
31
31
  defineEmits(['update:model-value']);
32
32
  defineProps({
@@ -10,6 +10,7 @@ export { default as FileUploadButton } from "./FileUploadButton.vue";
10
10
  export { default as InlineDateTimeField } from "./InlineDateTimeField.vue";
11
11
  export { default as IntegerField } from "./IntegerField.vue";
12
12
  export { default as LabeledInput } from "./LabeledInput.vue";
13
+ export { default as LabelValueBlock } from "./LabelValueBlock.vue";
13
14
  export { default as MultiFileField } from "./MultiFileField.vue";
14
15
  export { default as MultiKeywordField } from "./MultiKeywordField.vue";
15
16
  export { default as NewPasswordField } from "./NewPasswordField.vue";
@@ -4,13 +4,13 @@
4
4
  <h5>{{ change.label }} ({{ change.name }})</h5>
5
5
  <div class="flex flex-nowrap items-center mt-4">
6
6
  <div class="bg-red-light line-through p-2">
7
- <AdHistoryItemValue
7
+ <AuditHistoryItemValue
8
8
  :type="change.type"
9
9
  :value="change.oldValue"
10
10
  />
11
11
  </div>
12
12
  <div class="bg-green-plus-4 ml-2.5 p-2">
13
- <AdHistoryItemValue
13
+ <AuditHistoryItemValue
14
14
  :type="change.type"
15
15
  :value="change.newValue"
16
16
  />
@@ -33,7 +33,7 @@
33
33
  <script setup>
34
34
  import { computed } from 'vue';
35
35
  import { fLocalizedDateTime } from '../../helpers';
36
- import AdHistoryItemValue from './AuditHistoryItemValue';
36
+ import { AuditHistoryItemValue } from './index';
37
37
 
38
38
  const props = defineProps({
39
39
  item: {
@@ -24,7 +24,7 @@
24
24
  </template>
25
25
  <script setup>
26
26
  import { QTab } from 'quasar';
27
- import { RenderVnode } from 'quasar-ui-danx';
27
+ import { RenderVnode } from '../Utility';
28
28
 
29
29
  defineEmits(['update:model-value']);
30
30
  defineProps({
@@ -16,7 +16,7 @@
16
16
  </template>
17
17
  <script setup>
18
18
  import { ref } from 'vue';
19
- import ConfirmDialog from './ConfirmDialog';
19
+ import { ConfirmDialog } from './index';
20
20
 
21
21
  defineEmits(['confirm', 'close', 'update:input']);
22
22
  const props = defineProps({
package/src/index.esm.js CHANGED
@@ -1,4 +1,2 @@
1
- import * as VuePlugin from './vue-plugin';
2
-
3
1
  export * from './vue-plugin';
4
- export default VuePlugin;
2
+
package/tsconfig.json CHANGED
@@ -10,6 +10,7 @@
10
10
  "strict": false,
11
11
  // Enables compatibility with Babel-imported CommonJS modules
12
12
  "esModuleInterop": true,
13
+ "resolveJsonModule": true,
13
14
  // Resolve modules using Node.js style
14
15
  "moduleResolution": "node",
15
16
  // Allow default imports from modules with no default export
@@ -18,6 +19,7 @@
18
19
  "experimentalDecorators": true,
19
20
  // Skip type checking of all declaration files (*.d.ts)
20
21
  "skipLibCheck": true,
22
+ "sourceMap": true,
21
23
  // Disallow inconsistently-cased references to the same file.
22
24
  "forceConsistentCasingInFileNames": true,
23
25
  // Base directory to resolve non-relative module names,
@@ -32,6 +34,7 @@
32
34
  "src/**/*.ts",
33
35
  "src/**/*.vue",
34
36
  "src/**/*.svg",
37
+ "package.json",
35
38
  "types/**/*.d.ts"
36
39
  ],
37
40
  "exclude": [
package/vite.config.js ADDED
@@ -0,0 +1,29 @@
1
+ import vue from '@vitejs/plugin-vue';
2
+ import { resolve } from 'path';
3
+ import { defineConfig } from 'vite';
4
+ import svgLoader from 'vite-svg-loader';
5
+
6
+
7
+ export default defineConfig({
8
+ plugins: [vue(), svgLoader()],
9
+ build: {
10
+ lib: {
11
+ entry: resolve(__dirname, './src/index.esm.js'),
12
+ name: 'Danx',
13
+ // the proper extensions will be added
14
+ fileName: (format) => `danx.${format}.js`
15
+ },
16
+ // Add rollupOptions only if you need to customize the build further
17
+ rollupOptions: {
18
+ // Externalize deps that shouldn't be bundled into your library
19
+ external: ['vue', 'quasar'],
20
+ output: {
21
+ // Provide globals here
22
+ globals: {
23
+ vue: 'Vue',
24
+ quasar: 'Quasar'
25
+ }
26
+ }
27
+ }
28
+ }
29
+ });