@inriver/inri 1.34.0 → 1.36.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
+ Add notBlank validator
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@inriver/inri": minor
3
+ ---
4
+
5
+ Add back button slot
package/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # @inriver/inri
2
2
 
3
+ ## 1.36.0
4
+
5
+ ## Minor changes
6
+
7
+ - Add back button slot
8
+
9
+ ### Minor Changes
10
+
11
+ - Add notBlank validator
12
+ - Update documentation
13
+ - Add correct class to the c-btn component
14
+ - Wallop font is now included in the package
15
+ - Updating README and exporting tailwing config
16
+
17
+ ### Patch Changes
18
+
19
+ - Provide global app configs
20
+ - Fix CSelect placeholder color. Modularize Sass imports. Include inri typings when bundling
21
+ - Fix Sass warnings and errors by removing usage of @apply and updating Quasar + sass dependencies
22
+ - Add support for showing tooltips when hovering over CSelect and options. Add disable support and styling. Fix required validation to work with empty arrays.
23
+ - Fix broken imports due to faulty declaration file
24
+ - Add support for hiding the sidebars in CLayoutWithSidebars. Add support for entering a custom title in CLayoutWithSidebars
25
+ - Add support for showing placeholder ()in CSelect eoutside of use-input mode
26
+ - Fix faulty import path in globalAppConfig
27
+ - Add error slot in CSelect
28
+ - Fix error when CSelect is passed object options with falsy values
29
+
30
+ ## 1.35.0
31
+
32
+ ### Minor Changes
33
+
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
+ - Updating README and exporting tailwing config
39
+
40
+ ### Patch Changes
41
+
42
+ - Provide global app configs
43
+ - Fix CSelect placeholder color. Modularize Sass imports. Include inri typings when bundling
44
+ - Fix Sass warnings and errors by removing usage of @apply and updating Quasar + sass dependencies
45
+ - Add support for showing tooltips when hovering over CSelect and options. Add disable support and styling. Fix required validation to work with empty arrays.
46
+ - Fix broken imports due to faulty declaration file
47
+ - Add support for hiding the sidebars in CLayoutWithSidebars. Add support for entering a custom title in CLayoutWithSidebars
48
+ - Add support for showing placeholder ()in CSelect eoutside of use-input mode
49
+ - Fix faulty import path in globalAppConfig
50
+ - Add error slot in CSelect
51
+ - Fix error when CSelect is passed object options with falsy values
52
+
3
53
  ## 1.34.0
4
54
 
5
55
  ### Minor Changes
@@ -14,7 +14,7 @@ stages:
14
14
 
15
15
  - script: |
16
16
  corepack enable
17
- corepack prepare pnpm@latest-8 --activate
17
+ corepack prepare pnpm@8 --activate
18
18
  displayName: 'Setup pnpm'
19
19
 
20
20
  - script: pnpm config set store-dir $(Pipeline.Workspace)/.pnpm-store
@@ -26,7 +26,7 @@ stages:
26
26
  displayName: Install Node.js
27
27
 
28
28
  - script: |
29
- npm install -g pnpm
29
+ npm install -g pnpm@8
30
30
  pnpm install --frozen-lockfile
31
31
  displayName: Install dependencies
32
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inriver/inri",
3
- "version": "1.34.0",
3
+ "version": "1.36.0",
4
4
  "main": "index.ts",
5
5
  "peerDependencies": {
6
6
  "quasar": "2.14.2",
@@ -8,6 +8,7 @@ export default {
8
8
  url: 'This field must be a valid URL',
9
9
  https: 'This field must be a valid URL using https',
10
10
  extension: 'Valid file extensions: {extensions}',
11
+ notBlank: 'This field can not be left empty',
11
12
  contains: 'This field is not valid. Must contain {match}',
12
13
  notContains: 'This field is not valid. Must not contain {match}',
13
14
  notBeginsWith: 'This field is not valid. Must not begin with {match}',
@@ -16,6 +17,9 @@ export default {
16
17
  maxImageSize: 'Images can be no larger than {size}',
17
18
  fileSizeTooBig: 'file size too big',
18
19
  fileTypeInvalid: 'file type invalid',
20
+ incorrect_validator_usage: {
21
+ notBlank: 'Validator "notBlank" can not be used on non-string fields',
22
+ },
19
23
  },
20
24
  error: {
21
25
  unauthorized: 'Unauthorized',
@@ -3,6 +3,7 @@
3
3
  class="flex-1 flex h-15 items-center overflow-hidden px-6"
4
4
  :class="noBorder || 'border-b'"
5
5
  >
6
+ <slot name="back-button" />
6
7
  <h1
7
8
  data-id="page-title"
8
9
  class="truncate flex-1"
@@ -132,6 +132,20 @@ export function extension (fileExtensions: string, msg?: string) {
132
132
  }
133
133
  }
134
134
 
135
+ /**
136
+ * The value must not be blank (can not be empty nor contain only whitespaces).
137
+ * @param {string} [msg] - Override the default error message
138
+ */
139
+ export function notBlank (msg?: string) {
140
+ return (value): true | string => {
141
+ if (typeof value !== 'string') {
142
+ return $t('inri.validation.incorrect_validator_usage.notBlank')
143
+ }
144
+
145
+ return (value.length > 0 && value.replace(/\s/g, '').length > 0) || msg || $t('inri.validation.notBlank')
146
+ }
147
+ }
148
+
135
149
  /**
136
150
  * The value must contain all the strings in the array.
137
151
  * @param {string[]} arr - Array of strings.
@@ -284,6 +298,7 @@ export const rules = {
284
298
  url,
285
299
  https,
286
300
  extension,
301
+ notBlank,
287
302
  contains,
288
303
  notContains,
289
304
  notBeginsWith,