@policystudio/policy-studio-ui-vue 1.1.90-beta.10 → 1.1.90-beta.17
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 -1
- package/.github/workflows/deploy-storybook.yml +4 -4
- package/.nvmrc +1 -0
- package/dist/css/psui_styles_output.css +6986 -0
- package/package.json +9 -23
- package/src/assets/scss/components/PsDataTable.scss +1 -1
- package/src/components/accordion/PsAccordionItem.vue +75 -75
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -34
- package/src/components/badges-and-tags/PsCardInfos.vue +40 -41
- package/src/components/badges-and-tags/PsChartLegend.vue +47 -51
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +14 -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 +20 -26
- package/src/components/buttons/PsButton.vue +61 -62
- package/src/components/chips/PsChips.vue +98 -101
- 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 +99 -99
- package/src/components/controls/PsRadioButton.vue +59 -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 +53 -50
- package/src/components/data-graphics/PsBarChart.vue +19 -21
- package/src/components/datatable/PsDataTable.vue +56 -60
- package/src/components/datatable/PsDataTableItem.vue +14 -28
- package/src/components/forms/PsDropdown.vue +164 -162
- package/src/components/forms/PsDropdownList.vue +132 -129
- package/src/components/forms/PsInput.vue +155 -153
- package/src/components/forms/PsInputSelect.vue +91 -92
- package/src/components/forms/PsInputTextArea.vue +71 -71
- package/src/components/navigations/PsBreadcrumb.vue +26 -34
- package/src/components/notifications/PsDialog.vue +57 -56
- package/src/components/notifications/PsSimpleAlert.vue +28 -29
- package/src/components/notifications/PsToast.vue +40 -39
- package/src/components/table-results/PsTableResults.vue +452 -458
- package/src/components/table-results/PsTableResultsBody.vue +66 -67
- package/src/components/table-results/PsTableResultsHead.vue +62 -56
- package/src/components/table-results/PsTableResultsHeadComparison.vue +62 -56
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +63 -56
- 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 +42 -45
- package/src/components/tooltip/PsTooltip.vue +111 -116
- package/src/components/ui/PsDotLoader.vue +1 -5
- package/src/components/ui/PsIcon.vue +126 -129
- package/src/index.ts +56 -66
- package/src/tsconfig.json +12 -0
- package/src/{shims-vue.d.ts → types/index.d.ts} +0 -5
- package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +3 -5
- package/src/util/directives.ts +24 -0
- package/src/util/eventBus.js +10 -0
- package/src/util/{imageLoader.ts → imageLoader.js} +9 -8
- package/tailwind.config.js +1 -1
- package/tsconfig.json +16 -18
- package/.storybook/PolicyStudio.ts +0 -11
- package/.storybook/eventBus.ts +0 -26
- package/.storybook/main.ts +0 -21
- package/.storybook/manager.ts +0 -7
- package/.storybook/preview.ts +0 -17
- package/dist/css/psui_styles.css +0 -4647
- package/postcss.config.js +0 -8
- package/src/assets/images/multifamily-units.svg +0 -10
- package/src/assets/images/policy-studio.svg +0 -15
- package/src/components/playground/PsScrollBar.vue +0 -320
- package/src/contents/ComparisonData.ts +0 -378
- package/src/contents/FlexibleData.ts +0 -502
- package/src/contents/ResultsData.ts +0 -531
- package/src/stories/Accordion.stories.ts +0 -59
- package/src/stories/BadgeWithIcon.stories.ts +0 -31
- package/src/stories/BarChart.stories.ts +0 -17
- package/src/stories/Breadcrumb.stories.ts +0 -22
- package/src/stories/Button.stories.ts +0 -48
- package/src/stories/Button.vue +0 -59
- package/src/stories/CardInfos.stories.ts +0 -15
- package/src/stories/ChartLegend.stories.ts +0 -15
- package/src/stories/Checkbox.stories.ts +0 -45
- package/src/stories/CheckboxSimple.stories.ts +0 -49
- package/src/stories/Chips.stories.ts +0 -33
- package/src/stories/ClimateZoneBadge.stories.ts +0 -28
- package/src/stories/Colors.mdx +0 -70
- package/src/stories/CostEffectBar.stories.ts +0 -26
- package/src/stories/Datatable.stories.ts +0 -53
- package/src/stories/DateCardInfo.stories.ts +0 -20
- package/src/stories/Dialog.stories.ts +0 -131
- package/src/stories/Draggable.stories.ts +0 -32
- package/src/stories/Dropdown.stories.ts +0 -89
- package/src/stories/DropdownList.stories.ts +0 -213
- package/src/stories/ElevationSystem.mdx +0 -41
- package/src/stories/Header.stories.ts +0 -42
- package/src/stories/Header.vue +0 -77
- package/src/stories/HighlightRippleDot.stories.ts +0 -16
- package/src/stories/Icon.stories.ts +0 -22
- package/src/stories/InlineSelector.stories.ts +0 -18
- package/src/stories/Input.stories.ts +0 -244
- package/src/stories/InputSelect.stories.ts +0 -31
- package/src/stories/InputTextArea.stories.ts +0 -25
- package/src/stories/Introduction.mdx +0 -211
- package/src/stories/MiniTag.stories.ts +0 -59
- package/src/stories/Playground.stories.ts +0 -16
- package/src/stories/ProgressBar.stories.ts +0 -24
- package/src/stories/RadioButton.stories.ts +0 -41
- package/src/stories/RadioButtonSimple.stories.ts +0 -43
- package/src/stories/SimpleAlert.stories.ts +0 -22
- package/src/stories/Slider.stories.ts +0 -79
- package/src/stories/Switch.stories.ts +0 -39
- package/src/stories/TabHeader.stories.ts +0 -56
- package/src/stories/TableResults.stories.ts +0 -728
- package/src/stories/TagScope.stories.ts +0 -17
- package/src/stories/TestimonialCard.stories.ts +0 -27
- package/src/stories/Toast.stories.ts +0 -52
- package/src/stories/Toggle.stories.ts +0 -48
- package/src/stories/Tooltip.stories.ts +0 -114
- package/src/stories/Typography.mdx +0 -212
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/webpack.config.js +0 -36
package/src/index.ts
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
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'
|
|
50
51
|
|
|
51
52
|
|
|
52
53
|
export default {
|
|
@@ -66,9 +67,10 @@ export default {
|
|
|
66
67
|
Vue.component('PsChips', PsChips)
|
|
67
68
|
Vue.component('PsDataTable', PsDataTable)
|
|
68
69
|
Vue.component('PsDataTableItem', PsDataTableItem)
|
|
69
|
-
Vue.component('PsTableResults', PsTableResults)
|
|
70
70
|
Vue.component('PsTableResultsHead', PsTableResultsHead)
|
|
71
71
|
Vue.component('PsTableResultsHeadComparison', PsTableResultsHeadComparison)
|
|
72
|
+
Vue.component('PsTableResults', PsTableResults)
|
|
73
|
+
Vue.component('PsTableResultsRow', PsTableResultsRow)
|
|
72
74
|
Vue.component('PsTableResultsBody', PsTableResultsBody)
|
|
73
75
|
Vue.component('PsTableResultsHeadFlexible',PsTableResultsHeadFlexible)
|
|
74
76
|
Vue.component('PsIcon', PsIcon)
|
|
@@ -84,7 +86,6 @@ export default {
|
|
|
84
86
|
Vue.component('PsInputSelect', PsInputSelect)
|
|
85
87
|
Vue.component('PsDropdown',PsDropdown)
|
|
86
88
|
Vue.component('PsDropdownList', PsDropdownList)
|
|
87
|
-
Vue.component('PsScrollBar', PsScrollBar)
|
|
88
89
|
Vue.component('PsMiniTag', PsMiniTag)
|
|
89
90
|
Vue.component('PsCheckboxSimple', PsCheckboxSimple)
|
|
90
91
|
Vue.component('PsBadgeWithIcon', PsBadgeWithIcon)
|
|
@@ -97,22 +98,11 @@ export default {
|
|
|
97
98
|
Vue.component('PsSimpleAlert',PsSimpleAlert)
|
|
98
99
|
Vue.component('PsBreadcrumb', PsBreadcrumb)
|
|
99
100
|
|
|
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:any) {
|
|
113
|
-
document.body.removeEventListener('click', el.clickOutsideEvent)
|
|
114
|
-
},
|
|
115
|
-
})
|
|
101
|
+
/**
|
|
102
|
+
* Initialize directives
|
|
103
|
+
*/
|
|
104
|
+
directives(Vue)
|
|
105
|
+
|
|
116
106
|
},
|
|
117
107
|
}
|
|
118
108
|
|
|
@@ -132,7 +122,6 @@ export {
|
|
|
132
122
|
PsChips,
|
|
133
123
|
PsDataTable,
|
|
134
124
|
PsDataTableItem,
|
|
135
|
-
PsTableResults,
|
|
136
125
|
PsTableResultsHead,
|
|
137
126
|
PsTableResultsBody,
|
|
138
127
|
PsTableResultsHeadFlexible,
|
|
@@ -150,7 +139,6 @@ export {
|
|
|
150
139
|
PsInputSelect,
|
|
151
140
|
PsDropdown,
|
|
152
141
|
PsDropdownList,
|
|
153
|
-
PsScrollBar,
|
|
154
142
|
PsMiniTag,
|
|
155
143
|
PsCheckboxSimple,
|
|
156
144
|
PsBadgeWithIcon,
|
|
@@ -161,6 +149,8 @@ export {
|
|
|
161
149
|
PsTagScope,
|
|
162
150
|
PsBarChart,
|
|
163
151
|
PsSimpleAlert,
|
|
164
|
-
PsBreadcrumb
|
|
152
|
+
PsBreadcrumb,
|
|
153
|
+
PsTableResults,
|
|
154
|
+
PsTableResultsRow
|
|
165
155
|
}
|
|
166
156
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const randomString = (length
|
|
1
|
+
export const randomString = (length) => {
|
|
2
2
|
let result = ''
|
|
3
3
|
const characters =
|
|
4
4
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
|
|
@@ -8,8 +8,7 @@ export const randomString = (length:any) => {
|
|
|
8
8
|
}
|
|
9
9
|
return result
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
export const getParentScrollableEl = (node:any):any => {
|
|
11
|
+
export const getParentScrollableEl = (node) => {
|
|
13
12
|
if (node == null) {
|
|
14
13
|
return null
|
|
15
14
|
}
|
|
@@ -20,8 +19,7 @@ export const getParentScrollableEl = (node:any):any => {
|
|
|
20
19
|
return getParentScrollableEl(node.parentNode)
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
|
-
|
|
24
|
-
export const getParentVueComponentByName = (comp:any, name:any):any => {
|
|
22
|
+
export const getParentVueComponentByName = (comp, name) => {
|
|
25
23
|
if (comp.$options.name === name) {
|
|
26
24
|
return comp
|
|
27
25
|
} else {
|
|
@@ -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
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default ({ imageUrl, onProgress = null, returnsBase64 = true }:{imageUrl:any, onProgress:any, returnsBase64:any}) => {
|
|
1
|
+
export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
|
|
4
2
|
return new Promise((resolve, reject) => {
|
|
5
3
|
const xhr = new XMLHttpRequest()
|
|
6
4
|
let notifiedNotComputable = false
|
|
@@ -8,14 +6,16 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }:{imageUrl:
|
|
|
8
6
|
xhr.open('GET', imageUrl, true)
|
|
9
7
|
xhr.responseType = 'arraybuffer'
|
|
10
8
|
|
|
11
|
-
xhr.onprogress = (ev
|
|
9
|
+
xhr.onprogress = (ev) => {
|
|
12
10
|
if (ev.lengthComputable) {
|
|
13
|
-
|
|
11
|
+
|
|
14
12
|
const progress = parseInt((ev.loaded / ev.total) * 100)
|
|
13
|
+
|
|
15
14
|
if(onProgress) onProgress(progress)
|
|
16
15
|
} else {
|
|
17
16
|
if (!notifiedNotComputable) {
|
|
18
17
|
notifiedNotComputable = true
|
|
18
|
+
|
|
19
19
|
if(onProgress) onProgress(-1)
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -23,22 +23,23 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }:{imageUrl:
|
|
|
23
23
|
|
|
24
24
|
xhr.onloadend = () => {
|
|
25
25
|
const contentType = xhr.getResponseHeader('Content-Type')
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
if (!contentType.includes('image')) {
|
|
28
28
|
reject(xhr)
|
|
29
29
|
} else {
|
|
30
30
|
if (!notifiedNotComputable) {
|
|
31
|
+
|
|
31
32
|
if(onProgress) onProgress(100)
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
if(!returnsBase64) {
|
|
35
|
-
|
|
36
|
+
|
|
36
37
|
resolve()
|
|
37
38
|
} else {
|
|
38
39
|
const options = {}
|
|
39
40
|
const headers = xhr.getAllResponseHeaders()
|
|
40
41
|
const mime = headers.match(/^Content-Type\\:\s*(.*?)$/mi)
|
|
41
|
-
|
|
42
|
+
|
|
42
43
|
if (mime && mime[1]) options.type = mime[1]
|
|
43
44
|
const blob = new Blob([xhr.response], options)
|
|
44
45
|
resolve(window.URL.createObjectURL(blob))
|
package/tailwind.config.js
CHANGED
package/tsconfig.json
CHANGED
|
@@ -3,45 +3,43 @@
|
|
|
3
3
|
"target": "esnext",
|
|
4
4
|
"module": "esnext",
|
|
5
5
|
"strict": true,
|
|
6
|
+
"strictNullChecks": true,
|
|
7
|
+
"jsx": "preserve",
|
|
8
|
+
"declaration": true,
|
|
6
9
|
"moduleResolution": "node",
|
|
7
|
-
"
|
|
10
|
+
"composite": true,
|
|
8
11
|
"noEmitOnError": false,
|
|
9
|
-
"outDir": "
|
|
10
|
-
"rootDir": "
|
|
11
|
-
"skipLibCheck":
|
|
12
|
-
"skipDefaultLibCheck": true,
|
|
13
|
-
"noEmit": true, //this make ts ignore error
|
|
12
|
+
"outDir": "dist",
|
|
13
|
+
"rootDir": "src",
|
|
14
|
+
"skipLibCheck": false,
|
|
15
|
+
"skipDefaultLibCheck": true,
|
|
14
16
|
"esModuleInterop": true,
|
|
15
17
|
"allowSyntheticDefaultImports": true,
|
|
16
18
|
"forceConsistentCasingInFileNames": true,
|
|
17
19
|
"useDefineForClassFields": true,
|
|
18
20
|
"sourceMap": true,
|
|
19
|
-
"
|
|
21
|
+
"allowJs": true,
|
|
22
|
+
"baseUrl": "",
|
|
23
|
+
|
|
20
24
|
"types": [
|
|
21
|
-
"webpack-env"
|
|
25
|
+
"webpack-env",
|
|
22
26
|
],
|
|
23
|
-
"paths": {
|
|
24
|
-
"@/*": [
|
|
25
|
-
"src/*"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
27
|
"lib": [
|
|
29
28
|
"esnext",
|
|
30
|
-
"dom",
|
|
29
|
+
"dom",
|
|
31
30
|
"dom.iterable",
|
|
32
31
|
"scripthost"
|
|
33
32
|
]
|
|
34
33
|
},
|
|
35
34
|
"include": [
|
|
36
35
|
"src/**/*.ts",
|
|
37
|
-
"src/**/*.tsx",
|
|
38
36
|
"src/**/*.d.ts",
|
|
39
37
|
"src/**/*.vue",
|
|
40
|
-
"src/**/*.stories.ts",
|
|
41
38
|
"tests/**/*.ts",
|
|
42
|
-
"tests/**/*.tsx",
|
|
39
|
+
"tests/**/*.tsx", "src/util/eventBus.js", "src/util/GeneralFunctions.js", "src/util/imageLoader.js",
|
|
43
40
|
],
|
|
44
41
|
"exclude": [
|
|
45
|
-
"node_modules"
|
|
42
|
+
"node_modules",
|
|
43
|
+
"doc"
|
|
46
44
|
]
|
|
47
45
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { create } from '@storybook/theming'
|
|
2
|
-
import PolicyStudioUiLogo from '../src/assets/images/policy-studio.svg'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default create({
|
|
6
|
-
base: 'light',
|
|
7
|
-
brandTitle: 'Policy Studio UI Vue',
|
|
8
|
-
brandUrl: 'https://policystudio.co/',
|
|
9
|
-
brandImage: PolicyStudioUiLogo,
|
|
10
|
-
brandTarget: '_blank',
|
|
11
|
-
});
|
package/.storybook/eventBus.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// this was a vue2 syntax
|
|
2
|
-
// import Vue from 'vue';
|
|
3
|
-
// export const eventBus = new Vue();
|
|
4
|
-
|
|
5
|
-
// import { createApp } from 'vue';
|
|
6
|
-
|
|
7
|
-
// export const app = createApp({});
|
|
8
|
-
// const emitter = app.config.globalProperties.$emitter = {};
|
|
9
|
-
|
|
10
|
-
// export const eventBus = {
|
|
11
|
-
// on(event, callback) {
|
|
12
|
-
// if (!emitter[event]) {
|
|
13
|
-
// emitter[event] = [];
|
|
14
|
-
// }
|
|
15
|
-
// emitter[event].push(callback);
|
|
16
|
-
// },
|
|
17
|
-
// emit(event, ...args) {
|
|
18
|
-
// if (emitter[event]) {
|
|
19
|
-
// emitter[event].forEach(callback => {
|
|
20
|
-
// callback(...args);
|
|
21
|
-
// });
|
|
22
|
-
// }
|
|
23
|
-
// },
|
|
24
|
-
// };
|
|
25
|
-
|
|
26
|
-
// app.mount('#app');
|
package/.storybook/main.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** @type { import('@storybook/vue3-webpack5').StorybookConfig } */
|
|
2
|
-
const config = {
|
|
3
|
-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
4
|
-
addons: [
|
|
5
|
-
"@storybook/addon-links",
|
|
6
|
-
"@storybook/addon-essentials",
|
|
7
|
-
"@storybook/addon-interactions",
|
|
8
|
-
],
|
|
9
|
-
framework: {
|
|
10
|
-
name: "@storybook/vue3-webpack5",
|
|
11
|
-
options: {
|
|
12
|
-
builder: {
|
|
13
|
-
useSWC: true,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
docs: {
|
|
18
|
-
autodocs: "tag",
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
export default config;
|
package/.storybook/manager.ts
DELETED
package/.storybook/preview.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Import tailwind css file (bundle) based on environment
|
|
4
|
-
*/
|
|
5
|
-
const cssEnvFolder = (process.env.STORYBOOK_ENV === 'production') ? 'dist' : 'temp'
|
|
6
|
-
require( `../${cssEnvFolder}/css/psui_styles.css`)
|
|
7
|
-
console.warn(`Using tailwind css file(bundle) from: ../${cssEnvFolder}/css/psui_styles.css`)
|
|
8
|
-
|
|
9
|
-
export const parameters = {
|
|
10
|
-
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
11
|
-
controls: {
|
|
12
|
-
matchers: {
|
|
13
|
-
color: /(background|color)$/i,
|
|
14
|
-
date: /Date$/,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
}
|