@inriver/inri 1.36.0 → 1.38.0

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.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@inriver/inri": minor
3
+ ---
4
+
5
+ Added support for supplying a string function to determine option label name in CSelect
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@inriver/inri": minor
3
+ ---
4
+
5
+ Add support for placing CDialog action buttons to the right
package/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # @inriver/inri
2
2
 
3
+ ## 1.38.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add notBlank validator
8
+ - Added support for supplying a string function to determine option label name in CSelect
9
+ - Update documentation
10
+ - Add correct class to the c-btn component
11
+ - Wallop font is now included in the package
12
+ - Add back button slot
13
+ - Updating README and exporting tailwing config
14
+ - Add support for placing CDialog action buttons to the right
15
+
16
+ ### Patch Changes
17
+
18
+ - Provide global app configs
19
+ - Fix CSelect placeholder color. Modularize Sass imports. Include inri typings when bundling
20
+ - Fix Sass warnings and errors by removing usage of @apply and updating Quasar + sass dependencies
21
+ - Add support for showing tooltips when hovering over CSelect and options. Add disable support and styling. Fix required validation to work with empty arrays.
22
+ - Fix broken imports due to faulty declaration file
23
+ - Add support for hiding the sidebars in CLayoutWithSidebars. Add support for entering a custom title in CLayoutWithSidebars
24
+ - Add support for showing placeholder ()in CSelect eoutside of use-input mode
25
+ - Fix faulty import path in globalAppConfig
26
+ - Add error slot in CSelect
27
+ - Fix error when CSelect is passed object options with falsy values
28
+
29
+ ## 1.37.0
30
+
31
+ ### Minor Changes
32
+
33
+ - Add support for placing CDialog action buttons to the right
34
+ - Add notBlank validator
35
+ - Update documentation
36
+ - Add correct class to the c-btn component
37
+ - Wallop font is now included in the package
38
+ - Add back button slot
39
+ - Updating README and exporting tailwing config
40
+
41
+ ### Patch Changes
42
+
43
+ - Provide global app configs
44
+ - Fix CSelect placeholder color. Modularize Sass imports. Include inri typings when bundling
45
+ - Fix Sass warnings and errors by removing usage of @apply and updating Quasar + sass dependencies
46
+ - Add support for showing tooltips when hovering over CSelect and options. Add disable support and styling. Fix required validation to work with empty arrays.
47
+ - Fix broken imports due to faulty declaration file
48
+ - Add support for hiding the sidebars in CLayoutWithSidebars. Add support for entering a custom title in CLayoutWithSidebars
49
+ - Add support for showing placeholder ()in CSelect eoutside of use-input mode
50
+ - Fix faulty import path in globalAppConfig
51
+ - Add error slot in CSelect
52
+ - Fix error when CSelect is passed object options with falsy values
53
+
3
54
  ## 1.36.0
4
55
 
5
56
  ## Minor changes
package/README.md CHANGED
@@ -6,7 +6,7 @@ In order to use the *inri* package properly, you need to have certain peer depen
6
6
 
7
7
  Before installing and using *inri*, please make sure you have the following peer dependencies installed in your project:
8
8
 
9
- * quasar version 2.12.1 or compatible
9
+ * quasar version 2.14.2 or compatible
10
10
  * vue version 3.x.x or any compatible version starting with 3
11
11
  * vue-i18n version 9.1.7 or any compatible version starting with 9.1
12
12
  * vue-router version 4.0.12 or any compatible version starting with 4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inriver/inri",
3
- "version": "1.36.0",
3
+ "version": "1.38.0",
4
4
  "main": "index.ts",
5
5
  "peerDependencies": {
6
6
  "quasar": "2.14.2",
@@ -52,25 +52,30 @@
52
52
  <slot />
53
53
  </q-card-section>
54
54
 
55
- <div class="dialog-card-action-buttons px-5 pt-2 pb-10">
56
- <c-btn
57
- v-if="!hideConfirmButton"
58
- data-id="dialog-confirm-button"
59
- :label="confirmButtonText || $t('inri.common.confirm')"
60
- :disabled="confirmIsDisabled"
61
- @click="confirm"
62
- >
63
- <q-tooltip v-if="confirmIsDisabled">
64
- {{ disabledConfirmTooltip || $t('inri.dialog.confirm_tooltip_invalid_fields') }}
65
- </q-tooltip>
66
- </c-btn>
67
- <c-btn
68
- v-if="!hideCancelButton"
69
- data-id="dialog-cancel-button"
70
- :label="cancelButtonText || $t('inri.common.cancel')"
71
- color="surface"
72
- @click="cancel"
73
- />
55
+ <div
56
+ class="dialog-card-action-buttons px-5 pt-2 pb-10"
57
+ :class="actionButtonsPosition === 'right' ? 'ml-auto' : ''"
58
+ >
59
+ <slot name="action-buttons">
60
+ <c-btn
61
+ v-if="!hideConfirmButton"
62
+ data-id="dialog-confirm-button"
63
+ :label="confirmButtonText || $t('inri.common.confirm')"
64
+ :disabled="confirmIsDisabled"
65
+ @click="confirm"
66
+ >
67
+ <q-tooltip v-if="confirmIsDisabled">
68
+ {{ disabledConfirmTooltip || $t('inri.dialog.confirm_tooltip_invalid_fields') }}
69
+ </q-tooltip>
70
+ </c-btn>
71
+ <c-btn
72
+ v-if="!hideCancelButton"
73
+ data-id="dialog-cancel-button"
74
+ :label="cancelButtonText || $t('inri.common.cancel')"
75
+ color="surface"
76
+ @click="cancel"
77
+ />
78
+ </slot>
74
79
  </div>
75
80
  </q-form>
76
81
 
@@ -140,6 +145,10 @@ const props = defineProps({
140
145
  type: String as PropType<'top' | 'standard' | 'right' | 'bottom' | 'left' | undefined>,
141
146
  default: 'top',
142
147
  },
148
+ actionButtonsPosition: {
149
+ type: String as PropType<'left' | 'right'>,
150
+ default: 'left',
151
+ },
143
152
  })
144
153
 
145
154
  const emit = defineEmits([
@@ -137,7 +137,7 @@ const props = defineProps({
137
137
  useInput: Boolean,
138
138
  emitValue: Boolean,
139
139
  optionLabel: {
140
- type: String,
140
+ type: [String, Function],
141
141
  default: 'label',
142
142
  },
143
143
  optionValue: {
@@ -175,6 +175,10 @@ const selectedPlaceholder = computed(() => {
175
175
  })
176
176
 
177
177
  function getOptionLabel (opt) {
178
+ if (props.optionLabel instanceof Function) {
179
+ return props.optionLabel(opt)
180
+ }
181
+
178
182
  return typeof opt === 'object' && opt !== null && props.optionLabel in opt
179
183
  ? opt[props.optionLabel]
180
184
  : opt