@policystudio/policy-studio-ui-vue 1.1.90-beta.5 → 1.1.90-beta.50
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,45 +1,45 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
3
|
v-if="withPrevent"
|
|
4
|
-
class="psui-el-checkbox"
|
|
5
|
-
:class="[getComponentClass, {
|
|
4
|
+
class="psui-el-checkbox"
|
|
5
|
+
:class="[getComponentClass, { disabled: disabled }]"
|
|
6
6
|
v-bind="getComponentAttrs"
|
|
7
|
-
@click.prevent="
|
|
7
|
+
@click.prevent="emit('click', $event)"
|
|
8
8
|
>
|
|
9
|
-
<input
|
|
10
|
-
type="checkbox"
|
|
11
|
-
:checked="checked"
|
|
9
|
+
<input
|
|
10
|
+
type="checkbox"
|
|
11
|
+
:checked="checked"
|
|
12
12
|
:disabled="disabled"
|
|
13
13
|
:name="label"
|
|
14
14
|
:id="getInputId"
|
|
15
15
|
v-bind="inputAttrs"
|
|
16
|
-
@change="
|
|
16
|
+
@change="emit('change', $event)"
|
|
17
17
|
>
|
|
18
|
-
<label
|
|
18
|
+
<label
|
|
19
19
|
:for="getInputId"
|
|
20
20
|
class="psui-el-checkmark"
|
|
21
21
|
>
|
|
22
22
|
<slot name="content">
|
|
23
23
|
<span>{{ label }}</span>
|
|
24
24
|
</slot>
|
|
25
|
-
</label>
|
|
25
|
+
</label>
|
|
26
26
|
</div>
|
|
27
|
-
<div
|
|
27
|
+
<div
|
|
28
28
|
v-else
|
|
29
|
-
class="psui-el-checkbox"
|
|
30
|
-
:class="[getComponentClass, {
|
|
29
|
+
class="psui-el-checkbox"
|
|
30
|
+
:class="[getComponentClass, { disabled: disabled }]"
|
|
31
31
|
v-bind="getComponentAttrs"
|
|
32
32
|
>
|
|
33
|
-
<input
|
|
34
|
-
type="checkbox"
|
|
35
|
-
:checked="checked"
|
|
33
|
+
<input
|
|
34
|
+
type="checkbox"
|
|
35
|
+
:checked="checked"
|
|
36
36
|
:disabled="disabled"
|
|
37
37
|
:name="label"
|
|
38
38
|
:id="getInputId"
|
|
39
39
|
v-bind="inputAttrs"
|
|
40
|
-
@change="
|
|
40
|
+
@change="emit('change', $event)"
|
|
41
41
|
>
|
|
42
|
-
<label
|
|
42
|
+
<label
|
|
43
43
|
:for="getInputId"
|
|
44
44
|
class="psui-el-checkmark"
|
|
45
45
|
:title="showLabelTitle ? label : ''"
|
|
@@ -47,89 +47,89 @@
|
|
|
47
47
|
<slot name="content">
|
|
48
48
|
<span>{{ label }}</span>
|
|
49
49
|
</slot>
|
|
50
|
-
</label>
|
|
50
|
+
</label>
|
|
51
51
|
</div>
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
|
-
<script>
|
|
54
|
+
<script setup>
|
|
55
55
|
//FIGMA CONTROLS & SELECTORS https://www.figma.com/file/Tto8hrNlSfuPcwd1pfqogF/%E2%9A%A1%EF%B8%8F-Design-System?node-id=1768%3A64852
|
|
56
|
-
import { randomString } from '../../util/GeneralFunctions'
|
|
56
|
+
import { randomString } from '../../util/GeneralFunctions.js'
|
|
57
|
+
import { computed, useAttrs } from 'vue'
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
name: 'PsCheckboxSimple',
|
|
60
|
-
props: {
|
|
61
|
-
/**
|
|
62
|
-
* It sets the label of the checkbox input.
|
|
63
|
-
*/
|
|
64
|
-
label: {
|
|
65
|
-
type: String,
|
|
66
|
-
},
|
|
67
|
-
/**
|
|
68
|
-
* It disables the checkbox input.
|
|
69
|
-
*/
|
|
70
|
-
withPrevent: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
default: false,
|
|
73
|
-
},
|
|
59
|
+
const emit = defineEmits(['change', 'click'])
|
|
74
60
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Sets the input as checked
|
|
81
|
-
*/
|
|
82
|
-
checked: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: false
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
* Add html attributes to the element input
|
|
88
|
-
*/
|
|
89
|
-
inputAttrs: {
|
|
90
|
-
type: Object,
|
|
91
|
-
default: () => ({})
|
|
92
|
-
},
|
|
93
|
-
/**
|
|
94
|
-
* It set the of the checkbox input. eg: big and small.
|
|
95
|
-
*/
|
|
96
|
-
size: {
|
|
97
|
-
type: String,
|
|
98
|
-
default: 'big',
|
|
99
|
-
validator: (value)=> ['big', 'small'].includes(value)
|
|
100
|
-
},
|
|
101
|
-
/**
|
|
102
|
-
* It set the layout of the checkbox input. eg: default and mixed.
|
|
103
|
-
*/
|
|
104
|
-
layout:{
|
|
105
|
-
type: String,
|
|
106
|
-
default: 'default',
|
|
107
|
-
validator: (value)=> ['default','mixed'].includes(value)
|
|
108
|
-
},
|
|
109
|
-
showLabelTitle: {
|
|
110
|
-
type: Boolean,
|
|
111
|
-
default: true
|
|
112
|
-
}
|
|
61
|
+
const props = defineProps({
|
|
62
|
+
label: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: '',
|
|
113
65
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (this?.inputAttrs?.id) {
|
|
121
|
-
return this.inputAttrs.id
|
|
122
|
-
} else if (this?.$attrs?.id) {
|
|
123
|
-
return this.$attrs.id
|
|
124
|
-
} else {
|
|
125
|
-
return randomString(16)
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
getComponentAttrs() {
|
|
129
|
-
let componentAttrs = { ... this.$attrs }
|
|
130
|
-
delete componentAttrs.id
|
|
131
|
-
return componentAttrs
|
|
132
|
-
}
|
|
66
|
+
/**
|
|
67
|
+
* It disables the checkbox input.
|
|
68
|
+
*/
|
|
69
|
+
withPrevent: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false,
|
|
133
72
|
},
|
|
134
|
-
|
|
73
|
+
|
|
74
|
+
disabled: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false,
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* Sets the input as checked
|
|
80
|
+
*/
|
|
81
|
+
checked: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: false,
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Add html attributes to the element input
|
|
87
|
+
*/
|
|
88
|
+
inputAttrs: {
|
|
89
|
+
type: Object,
|
|
90
|
+
default: () => ({}),
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* It set the of the checkbox input. eg: big and small.
|
|
94
|
+
*/
|
|
95
|
+
size: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: 'big',
|
|
98
|
+
validator: (value) => ['big', 'small'].includes(value),
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* It set the layout of the checkbox input. eg: default and mixed.
|
|
102
|
+
*/
|
|
103
|
+
layout: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: 'default',
|
|
106
|
+
validator: (value) => ['default', 'mixed'].includes(value),
|
|
107
|
+
},
|
|
108
|
+
showLabelTitle: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: true,
|
|
111
|
+
},
|
|
112
|
+
})
|
|
113
|
+
const attrs = useAttrs()
|
|
114
|
+
|
|
115
|
+
const getComponentClass = computed(() => {
|
|
116
|
+
return `size-${props.size} layout-${props.layout}`
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
const getInputId = computed(() => {
|
|
121
|
+
if (props?.inputAttrs?.id) {
|
|
122
|
+
return props.inputAttrs.id
|
|
123
|
+
} else if (attrs?.id) {
|
|
124
|
+
return attrs.id
|
|
125
|
+
} else {
|
|
126
|
+
return randomString(16)
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
const getComponentAttrs = computed(() => {
|
|
131
|
+
let componentAttrs = { ...attrs }
|
|
132
|
+
delete componentAttrs.id
|
|
133
|
+
return componentAttrs
|
|
134
|
+
})
|
|
135
135
|
</script>
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
class="w-full"
|
|
14
14
|
>
|
|
15
15
|
<template #trigger>
|
|
16
|
-
<div
|
|
16
|
+
<div
|
|
17
17
|
class="psui-el-draggable-wrapper-title"
|
|
18
|
-
:class="{'psui-opacity-50 psui-pointer-events-none':columnGroup.disabled}"
|
|
18
|
+
:class="{ 'psui-opacity-50 psui-pointer-events-none': columnGroup.disabled }"
|
|
19
19
|
draggable="true"
|
|
20
|
-
@dragstart="
|
|
21
|
-
@dragend="
|
|
22
|
-
@dragover="
|
|
20
|
+
@dragstart="emit('drag-start-group', indexColumnGroup)"
|
|
21
|
+
@dragend="emit('drag-end-group', indexColumnGroup)"
|
|
22
|
+
@dragover="emit('drag-over-group', indexColumnGroup)"
|
|
23
23
|
>
|
|
24
24
|
<span class="flex psui-items-center">
|
|
25
25
|
<p>{{ columnGroup.title }}</p>
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
v-if="columnGroup.hasHelper && columnGroup.hasHelper.showOnEditHideColumns"
|
|
29
29
|
icon="info"
|
|
30
30
|
size="16"
|
|
31
|
-
:icon-classes="columnGroup.disabled ? 'psui-ml-2 psui-text-gray-50':'psui-ml-2 psui-text-blue-50 psui-cursor-pointer'"
|
|
32
|
-
@click="
|
|
31
|
+
:icon-classes="columnGroup.disabled ? 'psui-ml-2 psui-text-gray-50' : 'psui-ml-2 psui-text-blue-50 psui-cursor-pointer'"
|
|
32
|
+
@click="emit('column-group-helper', columnGroup.hasHelper)"
|
|
33
33
|
/>
|
|
34
34
|
</span>
|
|
35
35
|
<i class="material-icons-round">drag_indicator</i>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
|
-
<div
|
|
39
|
-
class="psui-el-draggable-wrapper-list"
|
|
40
|
-
:class="{'psui-opacity-50 psui-pointer-events-none':columnGroup.disabled}"
|
|
38
|
+
<div
|
|
39
|
+
class="psui-el-draggable-wrapper-list"
|
|
40
|
+
:class="{ 'psui-opacity-50 psui-pointer-events-none': columnGroup.disabled }"
|
|
41
41
|
>
|
|
42
42
|
<div
|
|
43
43
|
v-for="(column, indexColumn) in columnGroup.columns"
|
|
@@ -45,31 +45,29 @@
|
|
|
45
45
|
:id="`edit-columns-column-${indexColumnGroup}-${indexColumn}`"
|
|
46
46
|
class="psui-el-draggable-item"
|
|
47
47
|
draggable="true"
|
|
48
|
-
@dragstart="
|
|
49
|
-
@dragover="
|
|
50
|
-
@dragend="
|
|
48
|
+
@dragstart="emit('drag-start-item', { indexColumnGroup, indexColumn }, $event)"
|
|
49
|
+
@dragover="emit('drag-over-item', { indexColumnGroup, indexColumn }, $event)"
|
|
50
|
+
@dragend="emit('drag-end-item', $event)"
|
|
51
51
|
v-tooltip="column.tooltip || undefined"
|
|
52
52
|
>
|
|
53
|
-
<div
|
|
54
|
-
class="psui-w-full psui-flex psui-items-center"
|
|
55
|
-
>
|
|
53
|
+
<div class="psui-w-full psui-flex psui-items-center">
|
|
56
54
|
<span class="psui-el-draggable-item-title psui-flex psui-flex-row psui-items-center">
|
|
57
55
|
<PsCheckboxSimple
|
|
58
56
|
size="small"
|
|
59
57
|
:label="column.title"
|
|
60
|
-
:class="{
|
|
58
|
+
:class="{ active: column.isActive }"
|
|
61
59
|
:checked="column.isActive"
|
|
62
60
|
:disabled="column.isDisabled"
|
|
63
61
|
class="psui-el-draggable-item-checkbox"
|
|
64
|
-
@change="
|
|
62
|
+
@change="emit('on-select-item', { studyKey: getColumns.key, indexColumnGroup, indexColumn, columnGroupKey: columnGroup.key })"
|
|
65
63
|
/>
|
|
66
64
|
<PsIcon
|
|
67
65
|
class="psui-el-draggable-item-title-icon"
|
|
68
66
|
v-if="column.hasHelper && column.hasHelper.showOnEditHideColumns"
|
|
69
67
|
icon="info"
|
|
70
68
|
size="16"
|
|
71
|
-
:icon-classes="columnGroup.disabled ? 'psui-ml-2 psui-text-gray-50':'psui-ml-2 psui-text-blue-50 psui-cursor-pointer'"
|
|
72
|
-
@click="
|
|
69
|
+
:icon-classes="columnGroup.disabled ? 'psui-ml-2 psui-text-gray-50' : 'psui-ml-2 psui-text-blue-50 psui-cursor-pointer'"
|
|
70
|
+
@click="emit('column-helper', column.hasHelper)"
|
|
73
71
|
/>
|
|
74
72
|
</span>
|
|
75
73
|
<span class="psui-el-draggable-item-append">
|
|
@@ -79,9 +77,7 @@
|
|
|
79
77
|
</div>
|
|
80
78
|
</div>
|
|
81
79
|
</template>
|
|
82
|
-
<template
|
|
83
|
-
#content
|
|
84
|
-
>
|
|
80
|
+
<template #content>
|
|
85
81
|
{{ columnGroup.disabledTitle }}
|
|
86
82
|
</template>
|
|
87
83
|
</PsTooltip>
|
|
@@ -89,40 +85,42 @@
|
|
|
89
85
|
</div>
|
|
90
86
|
</template>
|
|
91
87
|
|
|
92
|
-
<script>
|
|
88
|
+
<script setup>
|
|
93
89
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
*/
|
|
106
|
-
module:{
|
|
107
|
-
type: String
|
|
108
|
-
},
|
|
90
|
+
const emit = defineEmits([
|
|
91
|
+
'drag-start-group',
|
|
92
|
+
'drag-end-group',
|
|
93
|
+
'drag-over-group',
|
|
94
|
+
'drag-start-item',
|
|
95
|
+
'drag-over-item',
|
|
96
|
+
'drag-end-item',
|
|
97
|
+
'column-helper',
|
|
98
|
+
'on-select-item',
|
|
99
|
+
'column-group-helper',
|
|
100
|
+
])
|
|
109
101
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
102
|
+
defineProps({
|
|
103
|
+
/**
|
|
104
|
+
* It sets the data that will be used.
|
|
105
|
+
*/
|
|
106
|
+
getColumns: {
|
|
107
|
+
type: Object,
|
|
108
|
+
default: () => ({})
|
|
117
109
|
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
},
|
|
110
|
+
/**
|
|
111
|
+
* It sets the module which will be used to set getters and actions.
|
|
112
|
+
*/
|
|
113
|
+
module: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: '',
|
|
126
116
|
},
|
|
127
|
-
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* It disables the input. All mouse events are disabled.
|
|
120
|
+
*/
|
|
121
|
+
disabled: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false,
|
|
124
|
+
},
|
|
125
|
+
})
|
|
128
126
|
</script>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
3
|
class="psui-el-inline-selector"
|
|
4
|
-
@keydown.up="
|
|
5
|
-
@keydown.down="
|
|
6
|
-
@keydown.enter="
|
|
7
|
-
@keydown.tab="
|
|
8
|
-
@keydown.esc="
|
|
9
|
-
@mouseleave="
|
|
4
|
+
@keydown.up="emit('keydown-up', $event)"
|
|
5
|
+
@keydown.down="emit('keydown-down', $event)"
|
|
6
|
+
@keydown.enter="emit('keydown-enter', $event)"
|
|
7
|
+
@keydown.tab="emit('keydown-tab', $event)"
|
|
8
|
+
@keydown.esc="emit('keydown-esc', $event)"
|
|
9
|
+
@mouseleave="emit('mouse-leave', $event)"
|
|
10
10
|
>
|
|
11
11
|
<div class="psui-el-inline-selector-input-wrapper">
|
|
12
12
|
<span> {{ search ? search : placeholder }} </span>
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
ref="input"
|
|
15
15
|
:label="label"
|
|
16
16
|
:placeholder="placeholder"
|
|
17
|
-
@input="
|
|
18
|
-
@focus="
|
|
19
|
-
@blur="
|
|
17
|
+
@input="emit('input', $event)"
|
|
18
|
+
@focus="emit('focus', $event)"
|
|
19
|
+
@blur="emit('blur', $event)"
|
|
20
20
|
autocomplete="chrome-off"
|
|
21
21
|
autocorrect="off"
|
|
22
22
|
autocapitalize="off"
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
leave-class="opacity-100 scale-100"
|
|
32
32
|
leave-to-class="opacity-0 scale-95"
|
|
33
33
|
>
|
|
34
|
-
<div
|
|
34
|
+
<div
|
|
35
35
|
v-if="search"
|
|
36
|
-
role="menu"
|
|
36
|
+
role="menu"
|
|
37
37
|
aria-orientation="vertical"
|
|
38
38
|
class="psui-el-inline-selector-dropdown-wrapper"
|
|
39
39
|
>
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
v-for="(jurisdiction, index) in jurisdictions"
|
|
50
50
|
:key="`dropdown-jurisdiction-${jurisdiction.id}`"
|
|
51
51
|
:id="`jurisdiction-list-item-${index}`"
|
|
52
|
-
@click="
|
|
53
|
-
@mouseover="
|
|
52
|
+
@click="emit('click', $event)"
|
|
53
|
+
@mouseover="'mouse-over', $event"
|
|
54
54
|
>
|
|
55
55
|
<span>
|
|
56
56
|
<h3>{{ jurisdiction.title }}</h3>
|
|
@@ -64,89 +64,88 @@
|
|
|
64
64
|
</div>
|
|
65
65
|
</template>
|
|
66
66
|
|
|
67
|
-
<script>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
props: {
|
|
71
|
-
/**
|
|
72
|
-
* It sets the default width of the inline selector.
|
|
73
|
-
*/
|
|
74
|
-
width: {
|
|
75
|
-
default: 244
|
|
76
|
-
},
|
|
77
|
-
/**
|
|
78
|
-
* It sets if it should receive focus or not when componented is mounted.
|
|
79
|
-
*/
|
|
80
|
-
focusOnMount: {
|
|
81
|
-
default: false
|
|
82
|
-
},
|
|
83
|
-
/**
|
|
84
|
-
* It sets if the component should be scrollable.
|
|
85
|
-
*/
|
|
86
|
-
shouldScroll: {
|
|
87
|
-
default: false
|
|
88
|
-
},
|
|
89
|
-
/**
|
|
90
|
-
* It sets the label of the component.
|
|
91
|
-
*/
|
|
92
|
-
label: {
|
|
93
|
-
type: String,
|
|
94
|
-
default: 'Type a City or County'
|
|
95
|
-
},
|
|
96
|
-
selectOnlyFirstClimateZone: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
default: false
|
|
99
|
-
},
|
|
100
|
-
/**
|
|
101
|
-
* It sets the jurisdiction selected.
|
|
102
|
-
*/
|
|
103
|
-
jurisdictionSelected: {
|
|
104
|
-
type: [ Object, Boolean ]
|
|
105
|
-
},
|
|
106
|
-
/**
|
|
107
|
-
* It gets and set the data that was written.
|
|
108
|
-
*/
|
|
109
|
-
search: {
|
|
110
|
-
type: String,
|
|
111
|
-
default: '',
|
|
112
|
-
required: true
|
|
113
|
-
},
|
|
114
|
-
/**
|
|
115
|
-
* It provides all the jurisdictions.
|
|
116
|
-
*/
|
|
117
|
-
jurisdictions: {
|
|
118
|
-
type: Array,
|
|
119
|
-
default: () => [],
|
|
120
|
-
required: true
|
|
121
|
-
},
|
|
122
|
-
/**
|
|
123
|
-
* It is a helper for checking if fetching data was successful.
|
|
124
|
-
*/
|
|
125
|
-
requestFetched: {
|
|
126
|
-
type: Boolean,
|
|
127
|
-
},
|
|
128
|
-
showDropDown:{
|
|
129
|
-
type: Boolean,
|
|
130
|
-
default: true,
|
|
131
|
-
},
|
|
132
|
-
currentSelected:{
|
|
133
|
-
type: Number,
|
|
134
|
-
default: 0,
|
|
135
|
-
},
|
|
136
|
-
/**
|
|
137
|
-
* It sets if the component is focused or not.
|
|
138
|
-
*/
|
|
139
|
-
isFocused:{
|
|
140
|
-
type: Boolean,
|
|
141
|
-
default: false,
|
|
142
|
-
},
|
|
143
|
-
/**
|
|
144
|
-
* It sets the placeholder of the component.
|
|
145
|
-
*/
|
|
146
|
-
placeholder:{
|
|
147
|
-
type: String,
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
</script>
|
|
67
|
+
<script setup>
|
|
68
|
+
|
|
69
|
+
const emit = defineEmits(['keydown-up', 'keydown-down', 'keydown-enter', 'keydown-tab', 'keydown-esc', 'mouse-leave', 'input', 'focus', 'blur', 'click'])
|
|
152
70
|
|
|
71
|
+
defineProps({
|
|
72
|
+
/**
|
|
73
|
+
* It sets the default width of the inline selector.
|
|
74
|
+
*/
|
|
75
|
+
width: {
|
|
76
|
+
default: 244,
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* It sets if it should receive focus or not when componented is mounted.
|
|
80
|
+
*/
|
|
81
|
+
focusOnMount: {
|
|
82
|
+
default: false,
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* It sets if the component should be scrollable.
|
|
86
|
+
*/
|
|
87
|
+
shouldScroll: {
|
|
88
|
+
default: false,
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* It sets the label of the component.
|
|
92
|
+
*/
|
|
93
|
+
label: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: 'Type a City or County',
|
|
96
|
+
},
|
|
97
|
+
selectOnlyFirstClimateZone: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: false,
|
|
100
|
+
},
|
|
101
|
+
/**
|
|
102
|
+
* It sets the jurisdiction selected.
|
|
103
|
+
*/
|
|
104
|
+
jurisdictionSelected: {
|
|
105
|
+
type: [Object, Boolean],
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* It gets and set the data that was written.
|
|
109
|
+
*/
|
|
110
|
+
search: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: '',
|
|
113
|
+
required: true,
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* It provides all the jurisdictions.
|
|
117
|
+
*/
|
|
118
|
+
jurisdictions: {
|
|
119
|
+
type: Array,
|
|
120
|
+
default: () => [],
|
|
121
|
+
required: true,
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* It is a helper for checking if fetching data was successful.
|
|
125
|
+
*/
|
|
126
|
+
requestFetched: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
},
|
|
129
|
+
showDropDown: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: true,
|
|
132
|
+
},
|
|
133
|
+
currentSelected: {
|
|
134
|
+
type: Number,
|
|
135
|
+
default: 0,
|
|
136
|
+
},
|
|
137
|
+
/**
|
|
138
|
+
* It sets if the component is focused or not.
|
|
139
|
+
*/
|
|
140
|
+
isFocused: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
default: false,
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* It sets the placeholder of the component.
|
|
146
|
+
*/
|
|
147
|
+
placeholder: {
|
|
148
|
+
type: String,
|
|
149
|
+
},
|
|
150
|
+
})
|
|
151
|
+
</script>
|