@qtoggle/qui 1.19.6 → 1.19.8

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.
@@ -32,6 +32,7 @@ class IconLabelTableCell extends mix(TableCell).with(IconLabelViewMixin) {
32
32
  showValue(value) {
33
33
  this.setIcon(value.icon)
34
34
  this.setLabel(value.label)
35
+ this.setSubLabel(value.subLabel)
35
36
  }
36
37
 
37
38
  prepareIcon(icon) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qtoggle/qui",
3
3
  "description": "A JavaScript UI library with batteries included.",
4
- "version": "1.19.6",
4
+ "version": "1.19.8",
5
5
  "author": {
6
6
  "name": "Calin Crisan",
7
7
  "email": "ccrisan@gmail.com"
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "qui-server"
3
- version = "1.19.6"
3
+ version = "1.19.8"
4
4
  description = "A fully fledged qToggle implementation written in Python"
5
5
  authors = [
6
6
  {name = "Calin Crisan", email = "ccrisan@gmail.com"},
@@ -1,5 +1,6 @@
1
1
 
2
2
  const crypto = require('crypto')
3
+ const fs = require('fs')
3
4
  const glob = require('glob')
4
5
  const path = require('path')
5
6
  const webpack = require('webpack')
@@ -34,6 +35,14 @@ const FONT_REGEX = new RegExp(`${FONT_DIR}/.*\\.(woff)$`)
34
35
  const TMPL_REGEX = new RegExp(`${TMPL_DIR}/.*\\.(html|json|js)$`)
35
36
 
36
37
 
38
+ function readLessImports(lessPath) {
39
+ return fs.readFileSync(lessPath, 'utf8')
40
+ .split('\n')
41
+ .map(line => line.match(/^@import\s+"([^"]+)"/))
42
+ .filter(Boolean)
43
+ .map(m => m[1])
44
+ }
45
+
37
46
  function escapeForLess(s) {
38
47
  return `~"${s}"`
39
48
  }
@@ -231,10 +240,21 @@ function makeConfig({theme, isProduction, appName, appFullPath, extraAliases, cs
231
240
  let distFullPath = isProduction ? path.resolve(appFullPath, DIST_DIR) : appFullPath
232
241
 
233
242
  let excludeLessRegex = new RegExp('theme-(' + THEMES.join('|') + ')\\.less', 'i')
234
- let cssRequirements = [
235
- quiLessPath + '/all.less',
236
- appLessPath + '/all.less'
237
- ]
243
+ let cssRequirements
244
+ if (isProduction) {
245
+ cssRequirements = [
246
+ quiLessPath + '/all.less',
247
+ appLessPath + '/all.less'
248
+ ]
249
+ }
250
+ else {
251
+ /* In dev mode, enumerate individual LESS files so that file-loader emits a separate CSS file
252
+ * per module, matching what the templates expect in debug mode */
253
+ cssRequirements = [
254
+ ...readLessImports(quiLessPath + '/all.less').map(rel => path.resolve(quiLessPath, rel)),
255
+ ...readLessImports(appLessPath + '/all.less').map(rel => path.resolve(appLessPath, rel))
256
+ ]
257
+ }
238
258
 
239
259
  /* This is needed because FixStyleOnlyEntriesPlugin() needs resources for theme entries to be different */
240
260
  cssRequirements.push(path.resolve(quiLessPath, `theme-${theme}.less`))