@demos-europe/demosplan-ui 0.3.5 → 0.3.7
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/CHANGELOG.md +20 -0
- package/buildTokens.js +64 -21
- package/dist/{642.demosplan-ui.umd.js → 121.demosplan-ui.umd.js} +1 -1
- package/dist/demosplan-ui.umd.js +1 -1
- package/package.json +11 -11
- package/src/components/DpAnonymizeText/DpAnonymizeText.vue +3 -3
- package/src/components/DpColumnSelector/DpColumnSelector.vue +8 -0
- package/src/components/DpEditor/DpLinkModal.vue +1 -1
- package/src/components/DpEditor/libs/editorAnonymize.js +2 -2
- package/src/components/DpFlyout/DpFlyout.vue +7 -0
- package/src/components/DpMultiselect/DpMultiselect.vue +7 -0
- package/src/lib/DpApi.js +4 -1
- package/style/style.css +4 -0
- package/tokens/dist/js/boxShadow.js +1 -1
- package/tokens/dist/js/breakpoints.js +1 -1
- package/tokens/dist/js/color.brand.js +1 -1
- package/tokens/dist/js/color.data.js +1 -1
- package/tokens/dist/js/color.palette.js +1 -1
- package/tokens/dist/js/color.ui.js +1 -1
- package/tokens/dist/js/fontSize.js +1 -1
- package/tokens/dist/js/rounded.js +1 -1
- package/tokens/dist/js/space.js +1 -1
- package/tokens/dist/js/zIndex.js +1 -1
- package/tokens/dist/scss/_boxShadow.scss +2 -1
- package/tokens/dist/scss/_breakpoints.scss +2 -1
- package/tokens/dist/scss/_color.brand.scss +2 -1
- package/tokens/dist/scss/_color.data.scss +2 -1
- package/tokens/dist/scss/_color.palette.scss +2 -1
- package/tokens/dist/scss/_color.ui.scss +2 -1
- package/tokens/dist/scss/_fontSize.scss +2 -1
- package/tokens/dist/scss/_rounded.scss +2 -1
- package/tokens/dist/scss/_space.scss +2 -1
- package/tokens/dist/scss/_zIndex.scss +2 -1
- package/tokens/scss/_boxShadow.scss +8 -0
- package/tokens/scss/_color.brand.scss +10 -0
- package/tokens/scss/_color.data.scss +32 -0
- package/tokens/scss/_color.palette.scss +62 -0
- package/tokens/scss/_color.scss +1 -1
- package/tokens/scss/_color.ui.scss +61 -0
- package/tokens/scss/_fontSize.scss +23 -23
- package/tokens/scss/_rounded.scss +9 -0
- package/tokens/scss/_space.scss +10 -10
- package/.idea/demosplan-ui.iml +0 -8
- package/.idea/encodings.xml +0 -6
- package/.idea/git_toolbox_prj.xml +0 -15
- package/.idea/modules.xml +0 -8
- package/.idea/php.xml +0 -19
- package/.idea/sonarlint/issuestore/index.pb +0 -0
- package/.idea/sonarlint-state.xml +0 -6
- package/.idea/sonarlint.xml +0 -8
- package/.idea/vcs.xml +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ Since v0.0.10, this Changelog is formatted according to the [Common Changelog][c
|
|
|
4
4
|
|
|
5
5
|
## UNRELEASED
|
|
6
6
|
|
|
7
|
+
## v0.3.7 - 2024-02-12
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- ([#742](https://github.com/demos-europe/demosplan-ui/pull/742)) Bump @tiptap to 2.2.2 ([@spiess-demos](https://github.com/spiess-demos))
|
|
12
|
+
- ([#737](https://github.com/demos-europe/demosplan-ui/pull/737)) Bump webpack to 5.90.1 ([@spiess-demos](https://github.com/spiess-demos))
|
|
13
|
+
|
|
14
|
+
## v0.3.6 - 2024-02-07
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- ([#729](https://github.com/demos-europe/demosplan-ui/pull/729)) Fix DpAnonymizeText functionality ([@sakutademos](https://github.com/sakutademos))
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- ([#721](https://github.com/demos-europe/demosplan-ui/pull/721)) Pass the allowEmpty prop to vue-multiselect, which prevents the deselection of values ([@sakutademos](https://github.com/sakutademos))
|
|
23
|
+
- ([#718](https://github.com/demos-europe/demosplan-ui/pull/718)) Add missing data attr for E-2-E Test ([@ahmad-demos](https://github.com/ahmad-demos))
|
|
24
|
+
- ([#714](https://github.com/demos-europe/demosplan-ui/pull/714)) add csrf token to dpRpc to prevent missing csrf errors ([@muellerdemos](https://github.com/muellerdemos))
|
|
25
|
+
- ([#734](https://github.com/demos-europe/demosplan-ui/pull/734)) Allow mailto links in DpEditor link modal ([@spiess-demos](https://github.com/spiess-demos))
|
|
26
|
+
|
|
7
27
|
## v0.3.5 - 2024-01-09
|
|
8
28
|
|
|
9
29
|
### Fixed
|
package/buildTokens.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
const glob = require('glob')
|
|
2
2
|
const StyleDictionary = require('style-dictionary')
|
|
3
3
|
|
|
4
|
+
const {
|
|
5
|
+
createPropertyFormatter,
|
|
6
|
+
fileHeader,
|
|
7
|
+
sortByReference
|
|
8
|
+
} = StyleDictionary.formatHelpers
|
|
9
|
+
|
|
4
10
|
const prefix = 'dp-'
|
|
5
11
|
|
|
6
12
|
const tokensPath = 'tokens/src/**/*.json'
|
|
@@ -14,36 +20,73 @@ const files = glob
|
|
|
14
20
|
// Do not render tokens only used internally
|
|
15
21
|
.filter(filePath => !filePath.startsWith('_'))
|
|
16
22
|
|
|
23
|
+
// Adds prefix to variables
|
|
17
24
|
StyleDictionary.registerTransform({
|
|
18
25
|
name: 'name/scss',
|
|
19
26
|
type: 'name',
|
|
20
|
-
transformer: (token) =>
|
|
21
|
-
// The domain part ("palette", "ui"...) within color tokens should not be part of the variable name.
|
|
22
|
-
// The domain part ("scale", "heading", "ui"...) within font-size tokens should not be part of the variable name.
|
|
23
|
-
if (token.path[0] === 'color' || token.path[0] === 'font-size') {
|
|
24
|
-
token.path.splice(1, 1)
|
|
25
|
-
}
|
|
26
|
-
// The key "z-index" should be shortened in the variable name to match Tailwind syntax
|
|
27
|
-
if (token.path[0] === 'z-index') {
|
|
28
|
-
token.path[0] = 'z'
|
|
29
|
-
}
|
|
30
|
-
// Scss does not like variable names with dots in them, but Tailwind does, apparently.
|
|
31
|
-
if (token.path[0] === 'space') {
|
|
32
|
-
token.path[1] = token.path[1].replace('.', '_')
|
|
33
|
-
}
|
|
34
|
-
// "DEFAULT" is a Tailwind convention that should not be part of the Scss name
|
|
35
|
-
if (token.path[1] === 'DEFAULT') {
|
|
36
|
-
token.path.splice(1, 1)
|
|
37
|
-
}
|
|
38
|
-
return prefix + token.path.join('-')
|
|
39
|
-
}
|
|
27
|
+
transformer: (token) => prefix + token.path.join('-')
|
|
40
28
|
})
|
|
41
29
|
|
|
30
|
+
// Adds prefix transform to default scss transform group
|
|
42
31
|
StyleDictionary.registerTransformGroup({
|
|
43
32
|
name: 'custom/scss',
|
|
44
33
|
transforms: StyleDictionary.transformGroup.scss.concat(['name/scss'])
|
|
45
34
|
})
|
|
46
35
|
|
|
36
|
+
/**
|
|
37
|
+
* This format is a customized version of the implementation
|
|
38
|
+
* in `formattedVariables`. It applies some transformations
|
|
39
|
+
* to scss variables according to the conventions in demosplan-ui.
|
|
40
|
+
* See https://github.com/amzn/style-dictionary/blob/17f4cb2f30bd002dfd55d6ef8c5bee4138de8d64/lib/common/formatHelpers/formattedVariables.js#L46
|
|
41
|
+
*/
|
|
42
|
+
StyleDictionary.registerFormat({
|
|
43
|
+
name: 'scss/customVariables',
|
|
44
|
+
formatter: ({dictionary, options, file}) => {
|
|
45
|
+
const { outputReferences, themeable = false, formatting} = options
|
|
46
|
+
let { allTokens } = dictionary
|
|
47
|
+
|
|
48
|
+
if (outputReferences) {
|
|
49
|
+
allTokens = [...allTokens].sort(sortByReference(dictionary))
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const propertyFormatter = createPropertyFormatter({ outputReferences, dictionary, format: 'sass', formatting, themeable })
|
|
53
|
+
|
|
54
|
+
const tokens = allTokens
|
|
55
|
+
.map(token => {
|
|
56
|
+
let formattedVar = propertyFormatter(token)
|
|
57
|
+
|
|
58
|
+
// The domain part within color tokens should not be part of the variable name.
|
|
59
|
+
if (token.path[0] === 'color') {
|
|
60
|
+
formattedVar = formattedVar.replace(/-(brand|data|palette|ui)/g, '')
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// The domain part within font-size tokens should not be part of the variable name.
|
|
64
|
+
if (token.path[0] === 'font-size') {
|
|
65
|
+
formattedVar = formattedVar.replace(/-(scale|brand|heading|ui)/g, '')
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// The key "z-index" should be shortened in the variable name to match Tailwind syntax
|
|
69
|
+
if (token.path[0] === 'z-index') {
|
|
70
|
+
formattedVar = formattedVar.replace(/z-index-/g, 'z-')
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Scss does not like variable names with dots in them, but Tailwind does, apparently.
|
|
74
|
+
if (token.path[0] === 'space') {
|
|
75
|
+
formattedVar = formattedVar.replace(/\./g, '_')
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// "DEFAULT" is a Tailwind convention that should not be part of the Scss name
|
|
79
|
+
formattedVar = formattedVar.replace(/-DEFAULT/g, '')
|
|
80
|
+
|
|
81
|
+
return formattedVar
|
|
82
|
+
})
|
|
83
|
+
.filter(function(strVal) { return !!strVal })
|
|
84
|
+
.join('\n')
|
|
85
|
+
|
|
86
|
+
return fileHeader({file, commentStyle: 'short'}) + '\n' + tokens + '\n'
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
|
|
47
90
|
const StyleDictionaryExtended = StyleDictionary.extend({
|
|
48
91
|
source: [tokensPath],
|
|
49
92
|
platforms: {
|
|
@@ -53,7 +96,7 @@ const StyleDictionaryExtended = StyleDictionary.extend({
|
|
|
53
96
|
files: files.map((filePath) => {
|
|
54
97
|
return {
|
|
55
98
|
destination: `_${filePath}.scss`,
|
|
56
|
-
format: 'scss/
|
|
99
|
+
format: 'scss/customVariables',
|
|
57
100
|
filter: (token) => token.filePath.includes(filePath),
|
|
58
101
|
options: {
|
|
59
102
|
outputReferences: true
|