@policystudio/policy-studio-ui-vue 1.1.90-beta.5 → 1.1.90-beta.51
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/.eslintrc.js +2 -8
- package/.github/workflows/deploy-storybook.yml +4 -4
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6639 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/util/GeneralFunctions.d.ts +3 -0
- package/dist/util/GeneralFunctions.js +35 -0
- package/dist/util/GeneralFunctions.js.map +1 -0
- package/dist/util/directives.d.ts +1 -0
- package/dist/util/directives.js +22 -0
- package/dist/util/directives.js.map +1 -0
- package/dist/util/imageLoader.d.ts +6 -0
- package/dist/util/imageLoader.js +52 -0
- package/dist/util/imageLoader.js.map +1 -0
- package/doc/.nvmrc +1 -0
- package/{.storybook → doc/.storybook}/main.ts +8 -2
- package/{.storybook → doc/.storybook}/preview.ts +2 -3
- package/doc/package-lock.json +22653 -0
- package/doc/package.json +71 -0
- package/{src → doc}/shims-vue.d.ts +0 -5
- package/{src → doc/src}/stories/Accordion.stories.ts +2 -3
- package/{src → doc/src}/stories/BadgeWithIcon.stories.ts +1 -1
- package/{src → doc/src}/stories/BarChart.stories.ts +1 -1
- package/{src → doc/src}/stories/Breadcrumb.stories.ts +1 -1
- package/doc/src/stories/Button.stories.ts +130 -0
- package/{src → doc/src}/stories/CardInfos.stories.ts +1 -1
- package/{src → doc/src}/stories/ChartLegend.stories.ts +1 -1
- package/{src → doc/src}/stories/Checkbox.stories.ts +1 -1
- package/{src → doc/src}/stories/CheckboxSimple.stories.ts +1 -1
- package/{src → doc/src}/stories/Chips.stories.ts +1 -4
- package/{src → doc/src}/stories/ClimateZoneBadge.stories.ts +2 -1
- package/doc/src/stories/Collapse.stories.ts +46 -0
- package/{src → doc/src}/stories/CostEffectBar.stories.ts +2 -1
- package/{src → doc/src}/stories/Datatable.stories.ts +5 -2
- package/{src → doc/src}/stories/DateCardInfo.stories.ts +1 -1
- package/{src → doc/src}/stories/Dialog.stories.ts +2 -2
- package/{src → doc/src}/stories/Draggable.stories.ts +3 -2
- package/{src → doc/src}/stories/Dropdown.stories.ts +4 -3
- package/{src → doc/src}/stories/DropdownList.stories.ts +4 -2
- package/{src → doc/src}/stories/HighlightRippleDot.stories.ts +3 -2
- package/{src → doc/src}/stories/Icon.stories.ts +3 -1
- package/{src → doc/src}/stories/InlineSelector.stories.ts +1 -1
- package/{src → doc/src}/stories/Input.stories.ts +7 -4
- package/{src → doc/src}/stories/InputSelect.stories.ts +3 -2
- package/{src → doc/src}/stories/InputTextArea.stories.ts +1 -1
- package/{src → doc/src}/stories/MiniTag.stories.ts +9 -2
- package/{src → doc/src}/stories/ProgressBar.stories.ts +3 -2
- package/{src → doc/src}/stories/RadioButton.stories.ts +2 -2
- package/{src → doc/src}/stories/RadioButtonSimple.stories.ts +1 -1
- package/{src → doc/src}/stories/SimpleAlert.stories.ts +3 -2
- package/{src → doc/src}/stories/Slider.stories.ts +6 -2
- package/{src → doc/src}/stories/Switch.stories.ts +2 -2
- package/{src → doc/src}/stories/TabHeader.stories.ts +6 -1
- package/{src → doc/src}/stories/TableResults.stories.ts +11 -7
- package/{src → doc/src}/stories/TagScope.stories.ts +3 -2
- package/{src → doc/src}/stories/TestimonialCard.stories.ts +3 -3
- package/{src → doc/src}/stories/Toast.stories.ts +2 -2
- package/{src → doc/src}/stories/Toggle.stories.ts +6 -3
- package/{src → doc/src}/stories/Tooltip.stories.ts +3 -3
- package/doc/tsconfig.json +17 -0
- package/package.json +13 -28
- package/scripts/gulp.js +11 -0
- package/src/assets/scss/base.scss +3 -34
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsChips.scss +9 -3
- package/src/assets/scss/components/PsCollapse.scss +71 -0
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/assets/scss/components/PsDropdownList.scss +1 -1
- package/src/assets/scss/components/PsTableResults.scss +28 -1
- package/src/assets/scss/components/PsTooltip.scss +2 -1
- package/src/components/accordion/PsAccordionItem.vue +88 -74
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -34
- package/src/components/badges-and-tags/PsCardInfos.vue +39 -41
- package/src/components/badges-and-tags/PsChartLegend.vue +46 -51
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +13 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +24 -56
- package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -2
- package/src/components/badges-and-tags/PsMiniTag.vue +39 -41
- package/src/components/badges-and-tags/PsProgressBar.vue +72 -68
- package/src/components/badges-and-tags/PsTagScope.vue +17 -22
- package/src/components/badges-and-tags/PsTestimonialCard.vue +19 -26
- package/src/components/buttons/PsButton.vue +61 -62
- package/src/components/chips/PsChips.vue +112 -101
- package/src/components/collapse/PsCollapse.vue +124 -0
- package/src/components/controls/PsCheckbox.vue +84 -84
- package/src/components/controls/PsCheckboxSimple.vue +95 -95
- package/src/components/controls/PsDraggable.vue +53 -55
- package/src/components/controls/PsInlineSelector.vue +98 -99
- package/src/components/controls/PsRadioButton.vue +65 -58
- package/src/components/controls/PsRadioButtonSimple.vue +79 -75
- package/src/components/controls/PsSlider.vue +185 -176
- package/src/components/controls/PsSwitch.vue +51 -52
- package/src/components/controls/PsToggle.vue +52 -50
- package/src/components/data-graphics/PsBarChart.vue +18 -21
- package/src/components/datatable/PsDataTable.vue +56 -60
- package/src/components/datatable/PsDataTableItem.vue +13 -28
- package/src/components/forms/PsDropdown.vue +166 -162
- package/src/components/forms/PsDropdownList.vue +133 -130
- package/src/components/forms/PsInput.vue +154 -153
- package/src/components/forms/PsInputSelect.vue +91 -92
- package/src/components/forms/PsInputTextArea.vue +70 -71
- package/src/components/navigations/PsBreadcrumb.vue +25 -34
- package/src/components/notifications/PsDialog.vue +57 -56
- package/src/components/notifications/PsSimpleAlert.vue +27 -29
- package/src/components/notifications/PsToast.vue +40 -39
- package/src/components/table-results/PsTableResults.vue +461 -468
- package/src/components/table-results/PsTableResultsBody.vue +66 -67
- package/src/components/table-results/PsTableResultsHead.vue +70 -67
- package/src/components/table-results/PsTableResultsHeadComparison.vue +67 -64
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +94 -67
- package/src/components/table-results/PsTableResultsRow.vue +55 -56
- package/src/components/tabs/PsTabHeader.vue +106 -100
- package/src/components/tooltip/PsDialogTooltip.vue +96 -101
- package/src/components/tooltip/PsRichTooltip.vue +41 -45
- package/src/components/tooltip/PsTooltip.vue +111 -116
- package/src/components/ui/PsDotLoader.vue +1 -5
- package/src/components/ui/PsIcon.vue +143 -132
- package/src/index.ts +60 -67
- package/src/tsconfig.json +12 -0
- package/src/types/index.d.ts +6 -0
- package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +12 -3
- package/src/util/directives.ts +24 -0
- package/src/util/{imageLoader.ts → imageLoader.js} +7 -0
- package/tailwind.config.js +1 -1
- package/tsconfig.json +18 -13
- package/.storybook/eventBus.ts +0 -26
- package/babel.config.js +0 -17
- package/dist/css/psui_styles.css +0 -4647
- package/postcss.config.js +0 -8
- package/src/components/playground/PsScrollBar.vue +0 -320
- package/src/stories/Button.stories.ts +0 -48
- package/src/stories/Button.vue +0 -59
- package/src/stories/Header.stories.ts +0 -41
- package/src/stories/Header.vue +0 -77
- package/src/stories/Playground.stories.ts +0 -16
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/webpack.config.js +0 -22
- /package/{.storybook → doc/.storybook}/PolicyStudio.ts +0 -0
- /package/{.storybook → doc/.storybook}/manager.ts +0 -0
- /package/{src → doc/src}/assets/images/multifamily-units.svg +0 -0
- /package/{src → doc/src}/assets/images/policy-studio.svg +0 -0
- /package/{src → doc/src}/contents/ComparisonData.ts +0 -0
- /package/{src → doc/src}/contents/FlexibleData.ts +0 -0
- /package/{src → doc/src}/contents/ResultsData.ts +0 -0
- /package/{src → doc/src}/stories/Colors.mdx +0 -0
- /package/{src → doc/src}/stories/ElevationSystem.mdx +0 -0
- /package/{src → doc/src}/stories/Introduction.mdx +0 -0
- /package/{src → doc/src}/stories/Typography.mdx +0 -0
- /package/{src → doc/src}/stories/assets/code-brackets.svg +0 -0
- /package/{src → doc/src}/stories/assets/colors.svg +0 -0
- /package/{src → doc/src}/stories/assets/comments.svg +0 -0
- /package/{src → doc/src}/stories/assets/direction.svg +0 -0
- /package/{src → doc/src}/stories/assets/flow.svg +0 -0
- /package/{src → doc/src}/stories/assets/plugin.svg +0 -0
- /package/{src → doc/src}/stories/assets/repo.svg +0 -0
- /package/{src → doc/src}/stories/assets/stackalt.svg +0 -0
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
:style="{ display: display }"
|
|
4
|
+
@click="emit('click', $event)"
|
|
5
|
+
>
|
|
3
6
|
<span
|
|
4
7
|
v-if="getIconType === 'material-icons'"
|
|
5
8
|
class="material-icons-round"
|
|
6
9
|
:class="[getIconClasses]"
|
|
7
|
-
:style="{ fontSize: `${size}px`}"
|
|
10
|
+
:style="{ fontSize: `${size}px` }"
|
|
8
11
|
>
|
|
9
12
|
{{ getIcon }}
|
|
10
13
|
</span>
|
|
@@ -16,148 +19,156 @@
|
|
|
16
19
|
<inline-svg
|
|
17
20
|
v-else
|
|
18
21
|
:src="icon"
|
|
19
|
-
:width="size"
|
|
20
|
-
:height="size"
|
|
21
|
-
:stroke="getColor"
|
|
22
|
+
:width="width ? width : size"
|
|
23
|
+
:height="height ? height : size"
|
|
24
|
+
:stroke="stroke ? stroke : disableStroke ? null : getColor"
|
|
22
25
|
:fill="getColor"
|
|
23
26
|
/>
|
|
24
27
|
</div>
|
|
25
28
|
</template>
|
|
26
29
|
|
|
27
|
-
<script>
|
|
28
|
-
import tailwindConfig from '../../../tailwind.config'
|
|
29
|
-
import imageLoader from '../../util/imageLoader'
|
|
30
|
-
export default {
|
|
31
|
-
name: 'AppIcon',
|
|
32
|
-
props: {
|
|
33
|
-
/**
|
|
34
|
-
* It sets the text key to get the svg icon in Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
|
|
35
|
-
*/
|
|
36
|
-
icon: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: 'more_horiz'
|
|
39
|
-
},
|
|
30
|
+
<script setup>
|
|
31
|
+
import tailwindConfig from '../../../tailwind.config.js'
|
|
32
|
+
import imageLoader from '../../util/imageLoader.js'
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
* It sets the type of the icon.
|
|
43
|
-
*/
|
|
44
|
-
type: {
|
|
45
|
-
type: String,
|
|
46
|
-
},
|
|
34
|
+
import { ref, computed, watch, onMounted } from 'vue'
|
|
47
35
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* It sets the size of the icon.
|
|
58
|
-
*/
|
|
59
|
-
size: {
|
|
60
|
-
type: [Number, String],
|
|
61
|
-
default: 24
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* It sets fill property of the icon.
|
|
66
|
-
*/
|
|
67
|
-
stroke: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: null
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* It sets fill property display of the icon.
|
|
74
|
-
*/
|
|
75
|
-
display: {
|
|
76
|
-
type: String,
|
|
77
|
-
default: 'contents'
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* It sets the color of the icon.
|
|
82
|
-
*/
|
|
83
|
-
color: {
|
|
84
|
-
type: String,
|
|
85
|
-
default: null,
|
|
86
|
-
validator: value => {
|
|
87
|
-
return value?.includes('psui-text-') &&
|
|
88
|
-
typeof(tailwindConfig.theme.colors[value.replace('psui-text-', '')]) != 'undefined' ||
|
|
89
|
-
typeof(tailwindConfig.theme.colors[value]) != 'undefined'
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* It set a animation icon if needed.
|
|
95
|
-
*/
|
|
96
|
-
loaderIcon: {
|
|
97
|
-
type: String,
|
|
98
|
-
default: 'hourglass_top'
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* It sets a error when the icon is not available.
|
|
103
|
-
*/
|
|
104
|
-
loaderErrorIcon: {
|
|
105
|
-
type: String,
|
|
106
|
-
default: 'more_horiz'
|
|
107
|
-
}
|
|
36
|
+
const props = defineProps({
|
|
37
|
+
/**
|
|
38
|
+
* It sets the text key to get the svg icon in Google Fonts. Make sure to get the correct description of your icon on https://fonts.google.com/.
|
|
39
|
+
*/
|
|
40
|
+
icon: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'more_horiz',
|
|
108
43
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
44
|
+
/**
|
|
45
|
+
* It sets the type of the icon.
|
|
46
|
+
*/
|
|
47
|
+
type: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: '',
|
|
114
50
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
51
|
+
/**
|
|
52
|
+
* It sets the style of the icon.
|
|
53
|
+
*/
|
|
54
|
+
iconClasses: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: null,
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* It sets the size of the icon.
|
|
60
|
+
*/
|
|
61
|
+
size: {
|
|
62
|
+
type: [Number, String],
|
|
63
|
+
default: 24,
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* It sets fill property of the icon.
|
|
67
|
+
*/
|
|
68
|
+
stroke: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: null,
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* It sets fill property display of the icon.
|
|
74
|
+
*/
|
|
75
|
+
display: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: 'contents',
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* It sets the color of the icon.
|
|
81
|
+
*/
|
|
82
|
+
color: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: null,
|
|
85
|
+
validator: (value) => {
|
|
86
|
+
return (
|
|
87
|
+
(value?.includes('psui-text-') && typeof tailwindConfig.theme.colors[value.replace('psui-text-', '')] != 'undefined') ||
|
|
88
|
+
typeof tailwindConfig.theme.colors[value] != 'undefined'
|
|
89
|
+
)
|
|
135
90
|
},
|
|
136
|
-
getColor() {
|
|
137
|
-
if(this.getIconType === 'material-icons') return this.color
|
|
138
|
-
return tailwindConfig.theme.colors[this.color.replace('psui-text-', '')] || tailwindConfig.theme.colors[this.color]
|
|
139
|
-
}
|
|
140
91
|
},
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
92
|
+
/**
|
|
93
|
+
* It set a animation icon if needed.
|
|
94
|
+
*/
|
|
95
|
+
loaderIcon: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: 'hourglass_top',
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* It sets a error when the icon is not available.
|
|
102
|
+
*/
|
|
103
|
+
loaderErrorIcon: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: 'more_horiz',
|
|
145
106
|
},
|
|
146
|
-
|
|
147
|
-
|
|
107
|
+
disableStroke: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: false,
|
|
148
110
|
},
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
111
|
+
width: {
|
|
112
|
+
type: [Number, String],
|
|
113
|
+
default: null,
|
|
114
|
+
},
|
|
115
|
+
height: {
|
|
116
|
+
type: [Number, String],
|
|
117
|
+
default: null,
|
|
118
|
+
},
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
const finishedImageLoad = ref(false)
|
|
122
|
+
const imageLoadError = ref(false)
|
|
123
|
+
|
|
124
|
+
const emit = defineEmits(['click'])
|
|
125
|
+
|
|
126
|
+
const getIconType = computed(() => {
|
|
127
|
+
if (props.type) return props.type
|
|
128
|
+
if (!props.icon?.includes('/')) return 'material-icons'
|
|
129
|
+
if (!props.icon?.includes('.svg')) return 'url'
|
|
130
|
+
return 'svg'
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
const getIcon = computed(() => {
|
|
134
|
+
if (!props.icon?.includes('/')) return props.icon ? props.icon : props.loaderErrorIcon
|
|
135
|
+
if (!finishedImageLoad.value && !imageLoadError.value && props.loaderIcon) return props.loaderIcon
|
|
136
|
+
if (imageLoadError.value) return props.loaderErrorIcon
|
|
137
|
+
return props.icon ? props.icon : props.loaderErrorIcon
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
const getIconClasses = computed(() => {
|
|
141
|
+
if (props.iconClasses) return props.iconClasses
|
|
142
|
+
return props.color ? `${props.color}` : ''
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
const getColor = computed(() => {
|
|
146
|
+
if (getIconType.value === 'material-icons') return props.color
|
|
147
|
+
return tailwindConfig.theme.colors[props.color.replace('psui-text-', '')] || tailwindConfig.theme.colors[props.color]
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
watch(
|
|
151
|
+
() => props.icon,
|
|
152
|
+
() => {
|
|
153
|
+
loadImage()
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
onMounted(() => {
|
|
158
|
+
if (props.icon?.includes('/')) loadImage()
|
|
159
|
+
})
|
|
160
|
+
|
|
161
|
+
const loadImage = () => {
|
|
162
|
+
if(getIconType.value != 'material-icons') {
|
|
163
|
+
finishedImageLoad.value = false
|
|
164
|
+
imageLoadError.value = false
|
|
165
|
+
imageLoader({ imageUrl: props.icon, returnsBase64: false })
|
|
166
|
+
.then(() => {
|
|
167
|
+
finishedImageLoad.value = true
|
|
168
|
+
})
|
|
169
|
+
.catch(() => {
|
|
170
|
+
imageLoadError.value = true
|
|
171
|
+
})
|
|
161
172
|
}
|
|
162
173
|
}
|
|
163
|
-
</script>
|
|
174
|
+
</script>
|
package/src/index.ts
CHANGED
|
@@ -1,56 +1,58 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* General Components
|
|
3
3
|
*/
|
|
4
|
+
import { directives } from './util/directives'
|
|
4
5
|
|
|
5
|
-
import PsButton from '
|
|
6
|
-
import PsCheckbox from '
|
|
7
|
-
import PsRadioButton from '
|
|
8
|
-
import PsSlider from '
|
|
9
|
-
import PsSwitch from '
|
|
10
|
-
import PsToggle from '
|
|
11
|
-
import PsInput from '
|
|
12
|
-
import PsDropdown from '
|
|
13
|
-
import PsDropdownList from '
|
|
14
|
-
import PsInputTextArea from '
|
|
15
|
-
import PsInputSelect from '
|
|
16
|
-
import PsDialog from '
|
|
17
|
-
import PsToast from '
|
|
18
|
-
import PsTabHeader from '
|
|
19
|
-
import PsAccordion from '
|
|
20
|
-
import PsAccordionItem from '
|
|
21
|
-
import PsChips from '
|
|
22
|
-
import PsDataTable from '
|
|
23
|
-
import PsDataTableItem from '
|
|
24
|
-
import PsTableResults from '
|
|
25
|
-
import PsTableResultsBody from '
|
|
26
|
-
import PsTableResultsHead from '
|
|
27
|
-
import PsTableResultsHeadComparison from '
|
|
28
|
-
import PsTableResultsHeadFlexible from '
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import PsMiniTag from '
|
|
40
|
-
import PsCheckboxSimple from '
|
|
41
|
-
import PsBadgeWithIcon from '
|
|
42
|
-
import PsProgressBar from '
|
|
43
|
-
import PsRadioButtonSimple from '
|
|
44
|
-
import PsTestimonialCard from '
|
|
45
|
-
import PsDateCardInfo from '
|
|
46
|
-
import PsTagScope from '
|
|
47
|
-
import PsBarChart from '
|
|
48
|
-
import PsSimpleAlert from '
|
|
49
|
-
import PsBreadcrumb from '
|
|
6
|
+
import PsButton from '../src/components/buttons/PsButton.vue'
|
|
7
|
+
import PsCheckbox from '../src/components/controls/PsCheckbox.vue'
|
|
8
|
+
import PsRadioButton from '../src/components/controls/PsRadioButton.vue'
|
|
9
|
+
import PsSlider from '../src/components/controls/PsSlider.vue'
|
|
10
|
+
import PsSwitch from '../src/components/controls/PsSwitch.vue'
|
|
11
|
+
import PsToggle from '../src/components/controls/PsToggle.vue'
|
|
12
|
+
import PsInput from '../src/components/forms/PsInput.vue'
|
|
13
|
+
import PsDropdown from '../src/components/forms/PsDropdown.vue'
|
|
14
|
+
import PsDropdownList from '../src/components/forms/PsDropdownList.vue'
|
|
15
|
+
import PsInputTextArea from '../src/components/forms/PsInputTextArea.vue'
|
|
16
|
+
import PsInputSelect from '../src/components/forms/PsInputSelect.vue'
|
|
17
|
+
import PsDialog from '../src/components/notifications/PsDialog.vue'
|
|
18
|
+
import PsToast from '../src/components/notifications/PsToast.vue'
|
|
19
|
+
import PsTabHeader from '../src/components/tabs/PsTabHeader.vue'
|
|
20
|
+
import PsAccordion from '../src/components/accordion/PsAccordion.vue'
|
|
21
|
+
import PsAccordionItem from '../src/components/accordion/PsAccordionItem.vue'
|
|
22
|
+
import PsChips from '../src/components/chips/PsChips.vue'
|
|
23
|
+
import PsDataTable from '../src/components/datatable/PsDataTable.vue'
|
|
24
|
+
import PsDataTableItem from '../src/components/datatable/PsDataTableItem.vue'
|
|
25
|
+
import PsTableResults from '../src/components/table-results/PsTableResults.vue'
|
|
26
|
+
import PsTableResultsBody from '../src/components/table-results/PsTableResultsBody.vue'
|
|
27
|
+
import PsTableResultsHead from '../src/components/table-results/PsTableResultsHead.vue'
|
|
28
|
+
import PsTableResultsHeadComparison from '../src/components/table-results/PsTableResultsHeadComparison.vue'
|
|
29
|
+
import PsTableResultsHeadFlexible from '../src/components/table-results/PsTableResultsHeadFlexible.vue'
|
|
30
|
+
import PsTableResultsRow from '../src/components/table-results/PsTableResultsRow.vue'
|
|
31
|
+
import PsIcon from '../src/components/ui/PsIcon.vue'
|
|
32
|
+
import PsDotLoader from '../src/components/ui/PsDotLoader.vue'
|
|
33
|
+
import PsTooltip from '../src/components/tooltip/PsTooltip.vue'
|
|
34
|
+
import PsRichTooltip from '../src/components/tooltip/PsRichTooltip.vue'
|
|
35
|
+
import PsDialogTooltip from '../src/components/tooltip/PsDialogTooltip.vue'
|
|
36
|
+
import PsDraggable from '../src/components/controls/PsDraggable.vue'
|
|
37
|
+
import PsCardInfos from '../src/components/badges-and-tags/PsCardInfos.vue'
|
|
38
|
+
import PsChartLegend from '../src/components/badges-and-tags/PsChartLegend.vue'
|
|
39
|
+
import PsInlineSelector from '../src/components/controls/PsInlineSelector.vue'
|
|
40
|
+
import PsMiniTag from '../src/components/badges-and-tags/PsMiniTag.vue'
|
|
41
|
+
import PsCheckboxSimple from '../src/components/controls/PsCheckboxSimple.vue'
|
|
42
|
+
import PsBadgeWithIcon from '../src/components/badges-and-tags/PsBadgeWithIcon.vue'
|
|
43
|
+
import PsProgressBar from '../src/components/badges-and-tags/PsProgressBar.vue'
|
|
44
|
+
import PsRadioButtonSimple from '../src/components/controls/PsRadioButtonSimple.vue'
|
|
45
|
+
import PsTestimonialCard from '../src/components/badges-and-tags/PsTestimonialCard.vue'
|
|
46
|
+
import PsDateCardInfo from '../src/components/badges-and-tags/PsDateCardInfo.vue'
|
|
47
|
+
import PsTagScope from '../src/components/badges-and-tags/PsTagScope.vue'
|
|
48
|
+
import PsBarChart from '../src/components/data-graphics/PsBarChart.vue'
|
|
49
|
+
import PsSimpleAlert from '../src/components/notifications/PsSimpleAlert.vue'
|
|
50
|
+
import PsBreadcrumb from '../src/components/navigations/PsBreadcrumb.vue'
|
|
51
|
+
import PsCollapse from '../src/components/collapse/PsCollapse.vue'
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
export default {
|
|
53
|
-
install(Vue) {
|
|
55
|
+
install(Vue:any) {
|
|
54
56
|
Vue.component('PsButton', PsButton)
|
|
55
57
|
Vue.component('PsCheckbox', PsCheckbox)
|
|
56
58
|
Vue.component('PsDialog', PsDialog)
|
|
@@ -66,9 +68,10 @@ export default {
|
|
|
66
68
|
Vue.component('PsChips', PsChips)
|
|
67
69
|
Vue.component('PsDataTable', PsDataTable)
|
|
68
70
|
Vue.component('PsDataTableItem', PsDataTableItem)
|
|
69
|
-
Vue.component('PsTableResults', PsTableResults)
|
|
70
71
|
Vue.component('PsTableResultsHead', PsTableResultsHead)
|
|
71
72
|
Vue.component('PsTableResultsHeadComparison', PsTableResultsHeadComparison)
|
|
73
|
+
Vue.component('PsTableResults', PsTableResults)
|
|
74
|
+
Vue.component('PsTableResultsRow', PsTableResultsRow)
|
|
72
75
|
Vue.component('PsTableResultsBody', PsTableResultsBody)
|
|
73
76
|
Vue.component('PsTableResultsHeadFlexible',PsTableResultsHeadFlexible)
|
|
74
77
|
Vue.component('PsIcon', PsIcon)
|
|
@@ -84,7 +87,6 @@ export default {
|
|
|
84
87
|
Vue.component('PsInputSelect', PsInputSelect)
|
|
85
88
|
Vue.component('PsDropdown',PsDropdown)
|
|
86
89
|
Vue.component('PsDropdownList', PsDropdownList)
|
|
87
|
-
Vue.component('PsScrollBar', PsScrollBar)
|
|
88
90
|
Vue.component('PsMiniTag', PsMiniTag)
|
|
89
91
|
Vue.component('PsCheckboxSimple', PsCheckboxSimple)
|
|
90
92
|
Vue.component('PsBadgeWithIcon', PsBadgeWithIcon)
|
|
@@ -96,23 +98,13 @@ export default {
|
|
|
96
98
|
Vue.component('PsBarChart',PsBarChart)
|
|
97
99
|
Vue.component('PsSimpleAlert',PsSimpleAlert)
|
|
98
100
|
Vue.component('PsBreadcrumb', PsBreadcrumb)
|
|
101
|
+
Vue.component('PsCollapse', PsCollapse)
|
|
99
102
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (!(el == event.target || el.contains(event.target))) {
|
|
106
|
-
// and if it did, call method provided in attribute value
|
|
107
|
-
vnode.context[binding.expression](event)
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
document.body.addEventListener('click', el.clickOutsideEvent)
|
|
111
|
-
},
|
|
112
|
-
unbind: function (el) {
|
|
113
|
-
document.body.removeEventListener('click', el.clickOutsideEvent)
|
|
114
|
-
},
|
|
115
|
-
})
|
|
103
|
+
/**
|
|
104
|
+
* Initialize directives
|
|
105
|
+
*/
|
|
106
|
+
directives(Vue)
|
|
107
|
+
|
|
116
108
|
},
|
|
117
109
|
}
|
|
118
110
|
|
|
@@ -132,7 +124,6 @@ export {
|
|
|
132
124
|
PsChips,
|
|
133
125
|
PsDataTable,
|
|
134
126
|
PsDataTableItem,
|
|
135
|
-
PsTableResults,
|
|
136
127
|
PsTableResultsHead,
|
|
137
128
|
PsTableResultsBody,
|
|
138
129
|
PsTableResultsHeadFlexible,
|
|
@@ -150,7 +141,6 @@ export {
|
|
|
150
141
|
PsInputSelect,
|
|
151
142
|
PsDropdown,
|
|
152
143
|
PsDropdownList,
|
|
153
|
-
PsScrollBar,
|
|
154
144
|
PsMiniTag,
|
|
155
145
|
PsCheckboxSimple,
|
|
156
146
|
PsBadgeWithIcon,
|
|
@@ -161,6 +151,9 @@ export {
|
|
|
161
151
|
PsTagScope,
|
|
162
152
|
PsBarChart,
|
|
163
153
|
PsSimpleAlert,
|
|
164
|
-
PsBreadcrumb
|
|
154
|
+
PsBreadcrumb,
|
|
155
|
+
PsTableResults,
|
|
156
|
+
PsTableResultsRow,
|
|
157
|
+
PsCollapse
|
|
165
158
|
}
|
|
166
159
|
|
|
@@ -8,7 +8,6 @@ export const randomString = (length) => {
|
|
|
8
8
|
}
|
|
9
9
|
return result
|
|
10
10
|
}
|
|
11
|
-
|
|
12
11
|
export const getParentScrollableEl = (node) => {
|
|
13
12
|
if (node == null) {
|
|
14
13
|
return null
|
|
@@ -22,9 +21,19 @@ export const getParentScrollableEl = (node) => {
|
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
export const getParentVueComponentByName = (comp, name) => {
|
|
25
|
-
if (comp
|
|
24
|
+
if (!comp) return null
|
|
25
|
+
|
|
26
|
+
if (comp?.appContext?.components[name]) {
|
|
27
|
+
return comp.appContext.components[name]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (comp.$options && comp.$options.name === name) {
|
|
26
31
|
return comp
|
|
27
|
-
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (comp.$parent) {
|
|
28
35
|
return getParentVueComponentByName(comp.$parent, name)
|
|
29
36
|
}
|
|
37
|
+
|
|
38
|
+
return null
|
|
30
39
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
export const directives = (Vue: any) => {
|
|
3
|
+
Vue.directive('click-outside', {
|
|
4
|
+
bind(el: any, binding: any, vnode: any) {
|
|
5
|
+
// Define a function to handle click events outside the element
|
|
6
|
+
const handler = (event: any) => {
|
|
7
|
+
if (binding?.value && !(el === event.target || el.contains(event.target))) {
|
|
8
|
+
// Call the method provided in the directive value
|
|
9
|
+
binding.value(event)
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Store the handler function on the element
|
|
14
|
+
el.__clickOutsideHandler__ = handler
|
|
15
|
+
|
|
16
|
+
// Add a click event listener to the body
|
|
17
|
+
document.body.addEventListener('click', handler)
|
|
18
|
+
},
|
|
19
|
+
unbind(el: any) {
|
|
20
|
+
// Remove the click event listener when the element is unbound
|
|
21
|
+
document.body.removeEventListener('click', el.__clickOutsideHandler__)
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
}
|
|
@@ -8,11 +8,14 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
|
|
|
8
8
|
|
|
9
9
|
xhr.onprogress = (ev) => {
|
|
10
10
|
if (ev.lengthComputable) {
|
|
11
|
+
|
|
11
12
|
const progress = parseInt((ev.loaded / ev.total) * 100)
|
|
13
|
+
|
|
12
14
|
if(onProgress) onProgress(progress)
|
|
13
15
|
} else {
|
|
14
16
|
if (!notifiedNotComputable) {
|
|
15
17
|
notifiedNotComputable = true
|
|
18
|
+
|
|
16
19
|
if(onProgress) onProgress(-1)
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -20,19 +23,23 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
|
|
|
20
23
|
|
|
21
24
|
xhr.onloadend = () => {
|
|
22
25
|
const contentType = xhr.getResponseHeader('Content-Type')
|
|
26
|
+
|
|
23
27
|
if (!contentType.includes('image')) {
|
|
24
28
|
reject(xhr)
|
|
25
29
|
} else {
|
|
26
30
|
if (!notifiedNotComputable) {
|
|
31
|
+
|
|
27
32
|
if(onProgress) onProgress(100)
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
if(!returnsBase64) {
|
|
36
|
+
|
|
31
37
|
resolve()
|
|
32
38
|
} else {
|
|
33
39
|
const options = {}
|
|
34
40
|
const headers = xhr.getAllResponseHeaders()
|
|
35
41
|
const mime = headers.match(/^Content-Type\\:\s*(.*?)$/mi)
|
|
42
|
+
|
|
36
43
|
if (mime && mime[1]) options.type = mime[1]
|
|
37
44
|
const blob = new Blob([xhr.response], options)
|
|
38
45
|
resolve(window.URL.createObjectURL(blob))
|
package/tailwind.config.js
CHANGED
package/tsconfig.json
CHANGED
|
@@ -3,40 +3,45 @@
|
|
|
3
3
|
"target": "esnext",
|
|
4
4
|
"module": "esnext",
|
|
5
5
|
"strict": true,
|
|
6
|
+
"strictNullChecks": true,
|
|
6
7
|
"jsx": "preserve",
|
|
8
|
+
"declaration": true,
|
|
7
9
|
"moduleResolution": "node",
|
|
8
|
-
"
|
|
10
|
+
"composite": true,
|
|
11
|
+
"noEmitOnError": false,
|
|
12
|
+
"outDir": "dist",
|
|
13
|
+
"rootDir": "src",
|
|
9
14
|
"skipLibCheck": true,
|
|
15
|
+
"skipDefaultLibCheck": true,
|
|
10
16
|
"esModuleInterop": true,
|
|
11
17
|
"allowSyntheticDefaultImports": true,
|
|
12
18
|
"forceConsistentCasingInFileNames": true,
|
|
13
19
|
"useDefineForClassFields": true,
|
|
14
20
|
"sourceMap": true,
|
|
15
|
-
"
|
|
21
|
+
"allowJs": true,
|
|
22
|
+
"baseUrl": "",
|
|
23
|
+
|
|
16
24
|
"types": [
|
|
17
|
-
"webpack-env"
|
|
25
|
+
"webpack-env",
|
|
18
26
|
],
|
|
19
|
-
"paths": {
|
|
20
|
-
"@/*": [
|
|
21
|
-
"src/*"
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
27
|
"lib": [
|
|
25
28
|
"esnext",
|
|
26
|
-
"dom",
|
|
29
|
+
"dom",
|
|
27
30
|
"dom.iterable",
|
|
28
31
|
"scripthost"
|
|
29
32
|
]
|
|
30
33
|
},
|
|
31
34
|
"include": [
|
|
32
35
|
"src/**/*.ts",
|
|
33
|
-
"src/**/*.
|
|
36
|
+
"src/**/*.d.ts",
|
|
34
37
|
"src/**/*.vue",
|
|
35
38
|
"tests/**/*.ts",
|
|
36
|
-
"tests/**/*.tsx",
|
|
37
|
-
".
|
|
39
|
+
"tests/**/*.tsx",
|
|
40
|
+
"src/util/GeneralFunctions.js",
|
|
41
|
+
"src/util/imageLoader.js",
|
|
38
42
|
],
|
|
39
43
|
"exclude": [
|
|
40
|
-
"node_modules"
|
|
44
|
+
"node_modules",
|
|
45
|
+
"doc"
|
|
41
46
|
]
|
|
42
47
|
}
|