@demos-europe/demosplan-ui 0.24.0 → 0.25.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.
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +9 -0
- package/dist/demosplan-ui.mjs +5 -5
- package/package.json +1 -1
- package/src/components/DpNotification/DpNotification.vue +3 -3
- package/src/lib/DpApi.js +9 -1
- package/src/utils/prefixClass.js +13 -3
- package/tokens/dist/css/theme.css +1 -1
- 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 +1 -1
- package/tokens/dist/scss/_breakpoints.scss +1 -1
- package/tokens/dist/scss/_color.brand.scss +1 -1
- package/tokens/dist/scss/_color.data.scss +1 -1
- package/tokens/dist/scss/_color.palette.scss +1 -1
- package/tokens/dist/scss/_color.ui.scss +1 -1
- package/tokens/dist/scss/_fontSize.scss +1 -1
- package/tokens/dist/scss/_rounded.scss +1 -1
- package/tokens/dist/scss/_space.scss +1 -1
- package/tokens/dist/scss/_zIndex.scss +1 -1
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ Since v0.0.10, this Changelog is formatted according to the [Common Changelog][c
|
|
|
4
4
|
|
|
5
5
|
## UNRELEASED
|
|
6
6
|
|
|
7
|
+
## v0.25.0 - 2026-07-10
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- ([#1515](https://github.com/demos-europe/demosplan-ui/pull/1515)) DpNotification: Vertically align icon with notification text ([@hwiem](https://github.com/hwiem))
|
|
11
|
+
- ([#1516](https://github.com/demos-europe/demosplan-ui/pull/1516)) prefixClass: Ensure tailwind utility classes containing arbitrary values are prefixed ([@hwiem](https://github.com/hwiem))
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- ([#1533](https://github.com/demos-europe/demosplan-ui/pull/1533)) DpApi: `dpApi.delete` accepts an optional request body for JSON:API relationship endpoints ([@riechedemos](https://github.com/riechedemos))
|
|
15
|
+
|
|
7
16
|
## v0.24.0 - 2026-06-12
|
|
8
17
|
|
|
9
18
|
### Added
|
package/dist/demosplan-ui.mjs
CHANGED
|
@@ -19722,7 +19722,7 @@ Un.post = (t, e = {}, n = {}, r = {}) => ii({ method: "POST", url: t, data: n, p
|
|
|
19722
19722
|
Un.get = (t, e = {}, n = {}) => ii({ method: "GET", url: t, params: e, options: n });
|
|
19723
19723
|
Un.put = (t, e = {}, n = {}, r = {}) => ii({ method: "PUT", url: t, data: n, params: e, options: r });
|
|
19724
19724
|
Un.patch = (t, e = {}, n = {}, r = {}) => ii({ method: "PATCH", url: t, data: n, params: e, options: r });
|
|
19725
|
-
Un.delete = (t, e = {}, n = {}) => ii({ method: "DELETE", url: t, params: e, options: n });
|
|
19725
|
+
Un.delete = (t, e = {}, n = {}, r = {}) => ii({ method: "DELETE", url: t, data: r, params: e, options: n });
|
|
19726
19726
|
const FX = function(t, e, n = null) {
|
|
19727
19727
|
const r = {
|
|
19728
19728
|
jsonrpc: "2.0",
|
|
@@ -21313,7 +21313,7 @@ function Yt(t = "") {
|
|
|
21313
21313
|
return t;
|
|
21314
21314
|
if (typeof t != "string")
|
|
21315
21315
|
throw new Error("classList is an" + typeof t + ". should be String.", t);
|
|
21316
|
-
return /[.#[]
|
|
21316
|
+
return /(?:^|\s)[.#[]|[a-zA-Z][.#[]/.test(t) ? n = t.replace(/(\.)(\S+)/gi, (i, s, o) => `.${e}${o}`) : n = t.replace(/(\S+)/gi, (i) => `${e}${i}`), n;
|
|
21317
21317
|
}
|
|
21318
21318
|
function nQ(t) {
|
|
21319
21319
|
const e = document.createElement("canvas"), n = e.getContext("2d");
|
|
@@ -37434,16 +37434,16 @@ function qJ(t, e, n, r, i, s) {
|
|
|
37434
37434
|
}, null, 8, ["class"])
|
|
37435
37435
|
], 42, FJ),
|
|
37436
37436
|
b("div", {
|
|
37437
|
-
class: H(t.prefixClass("
|
|
37437
|
+
class: H(t.prefixClass("flex items-start gap-1"))
|
|
37438
37438
|
}, [
|
|
37439
37439
|
oe(o, {
|
|
37440
|
-
class: H(t.prefixClass("c-notify__icon
|
|
37440
|
+
class: H(t.prefixClass("c-notify__icon shrink-0 mt-[2px]")),
|
|
37441
37441
|
icon: s.messageIcon,
|
|
37442
37442
|
"aria-hidden": "true",
|
|
37443
37443
|
weight: "fill"
|
|
37444
37444
|
}, null, 8, ["class", "icon"]),
|
|
37445
37445
|
b("div", {
|
|
37446
|
-
class: H(t.prefixClass("c-notify__text
|
|
37446
|
+
class: H(t.prefixClass("c-notify__text break-words"))
|
|
37447
37447
|
}, [
|
|
37448
37448
|
st(ee(n.message.text) + " ", 1),
|
|
37449
37449
|
n.message.linkUrl ? (m(), y("a", {
|
package/package.json
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
/>
|
|
21
21
|
</button>
|
|
22
22
|
|
|
23
|
-
<div :class="prefixClass('
|
|
23
|
+
<div :class="prefixClass('flex items-start gap-1')">
|
|
24
24
|
<dp-icon
|
|
25
|
-
:class="prefixClass('c-notify__icon
|
|
25
|
+
:class="prefixClass('c-notify__icon shrink-0 mt-[2px]')"
|
|
26
26
|
:icon="messageIcon"
|
|
27
27
|
aria-hidden="true"
|
|
28
28
|
weight="fill"
|
|
29
29
|
/>
|
|
30
|
-
<div :class="prefixClass('c-notify__text
|
|
30
|
+
<div :class="prefixClass('c-notify__text break-words')">
|
|
31
31
|
{{ message.text }}
|
|
32
32
|
<a
|
|
33
33
|
v-if="message.linkUrl"
|
package/src/lib/DpApi.js
CHANGED
|
@@ -123,7 +123,15 @@ dpApi.post = (url, params = {}, data = {}, options = {}) => doRequest({ method:
|
|
|
123
123
|
dpApi.get = (url, params = {}, options = {}) => doRequest({ method: 'GET', url, params, options })
|
|
124
124
|
dpApi.put = (url, params = {}, data = {}, options = {}) => doRequest({ method: 'PUT', url, data, params, options })
|
|
125
125
|
dpApi.patch = (url, params = {}, data = {}, options = {}) => doRequest({ method: 'PATCH', url, data, params, options })
|
|
126
|
-
|
|
126
|
+
/*
|
|
127
|
+
* `data` is intentionally the 4th param here (after `options`), unlike post/put/patch where it is the 3rd. A DELETE
|
|
128
|
+
* normally has no request body, so this method originally had no `data` param. JSON:API relationship endpoints,
|
|
129
|
+
* however, remove linkage by sending a body even on DELETE, e.g. DELETE /StatementGroup/{id}/relationships/statements
|
|
130
|
+
* { "data": [ { "type": "Statement", "id": "…" } ] } so a body is needed. Keeping `data` last preserves existing
|
|
131
|
+
* callers that pass `options` as the 3rd argument (e.g. store/map/Layers.js). For consistency with the other post/put/patch
|
|
132
|
+
* `data` should eventually move to the 3rd position — a breaking change that requires updating every such caller.
|
|
133
|
+
*/
|
|
134
|
+
dpApi.delete = (url, params = {}, options = {}, data = {}) => doRequest({ method: 'DELETE', url, data, params, options })
|
|
127
135
|
|
|
128
136
|
/**
|
|
129
137
|
* Submit a request to the rpc_generic_post API, which implements JSON-RPC 2.0.
|
package/src/utils/prefixClass.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export default function prefixClass (classList = '') {
|
|
9
9
|
let prefix = ''
|
|
10
|
+
|
|
10
11
|
if (typeof dplan !== 'undefined' && dplan.settings && dplan.settings.publicCSSClassPrefix) {
|
|
11
12
|
prefix = dplan.settings.publicCSSClassPrefix
|
|
12
13
|
}
|
|
@@ -24,10 +25,19 @@ export default function prefixClass (classList = '') {
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
/*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
28
|
+
* Assume a querySelector is passed when a `.`, `#` or `[` either starts a token (string start or after whitespace,
|
|
29
|
+
* e.g. `.foo`, `#id`, `[data-x]`) or attaches directly to a type selector, i.e. follows a letter (e.g. `div.foo`,
|
|
30
|
+
* `div#main`, `a[href]`). In that case only the class selector parts are prefixed.
|
|
31
|
+
* The "follows a letter" rule is what tells selectors apart from tailwind utility classes: a tailwind utility class
|
|
32
|
+
* never has a letter immediately before `.`/`#`/`[` - it's always a `-` or a digit (`mt-[2px]`, `grid-cols-[1fr]`,
|
|
33
|
+
* `mb-0.5`), or `[` itself for hex colors (`bg-[#fff]`).
|
|
34
|
+
*
|
|
35
|
+
* Known limitation: a token that *starts* with `[` is always treated as a selector, so tailwind arbitrary variants/properties
|
|
36
|
+
* (`[&>svg]:size-4`, `[mask-type:luminance]`) are not prefixed. They are indistinguishable from a real attribute
|
|
37
|
+
* selector by position alone and are currently not supported by prefixClass
|
|
29
38
|
*/
|
|
30
|
-
const checkClassList = /[.#[]/
|
|
39
|
+
const checkClassList = /(?:^|\s)[.#[]|[a-zA-Z][.#[]/
|
|
40
|
+
|
|
31
41
|
if (checkClassList.test(classList)) {
|
|
32
42
|
prefixed = classList.replace(/(\.)(\S+)/gi, (cl, m1, m2) => `.${prefix}${m2}`)
|
|
33
43
|
} else {
|
package/tokens/dist/js/space.js
CHANGED
package/tokens/dist/js/zIndex.js
CHANGED