@qtoggle/qui 1.19.0 → 1.19.1
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/.github/workflows/main.yml +11 -9
- package/js/forms/form.js +3 -11
- package/js/lists/common-items/icon-label-list-item.js +2 -9
- package/js/utils/debouncer.js +2 -2
- package/less/all.less +39 -0
- package/package.json +18 -15
- package/pyproject.toml +1 -1
- package/webpack/webpack-common.js +3 -3
|
@@ -2,10 +2,14 @@ name: Main
|
|
|
2
2
|
|
|
3
3
|
on: push
|
|
4
4
|
|
|
5
|
+
permissions:
|
|
6
|
+
id-token: write
|
|
7
|
+
contents: write
|
|
8
|
+
|
|
5
9
|
jobs:
|
|
6
10
|
lint:
|
|
7
11
|
name: Lint
|
|
8
|
-
runs-on:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
9
13
|
steps:
|
|
10
14
|
- name: Lint JS Code
|
|
11
15
|
uses: qtoggle/actions-common/actions/lint-js@v1
|
|
@@ -16,7 +20,7 @@ jobs:
|
|
|
16
20
|
jsdoc:
|
|
17
21
|
name: Publish Docs
|
|
18
22
|
if: startsWith(github.ref, 'refs/tags/version-')
|
|
19
|
-
runs-on:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
20
24
|
needs:
|
|
21
25
|
- lint
|
|
22
26
|
steps:
|
|
@@ -39,14 +43,14 @@ jobs:
|
|
|
39
43
|
FOLDER: docs
|
|
40
44
|
build-python:
|
|
41
45
|
name: Build Python
|
|
42
|
-
runs-on:
|
|
46
|
+
runs-on: ubuntu-latest
|
|
43
47
|
steps:
|
|
44
48
|
- name: Build Python package
|
|
45
49
|
uses: qtoggle/actions-common/actions/build-python-package@v1
|
|
46
50
|
publish:
|
|
47
51
|
name: Publish
|
|
48
52
|
if: startsWith(github.ref, 'refs/tags/version-')
|
|
49
|
-
runs-on:
|
|
53
|
+
runs-on: ubuntu-latest
|
|
50
54
|
needs:
|
|
51
55
|
- lint
|
|
52
56
|
- jsdoc
|
|
@@ -59,19 +63,17 @@ jobs:
|
|
|
59
63
|
- name: Setup NodeJS
|
|
60
64
|
uses: actions/setup-node@v4
|
|
61
65
|
with:
|
|
62
|
-
node-version: '
|
|
66
|
+
node-version: '20'
|
|
63
67
|
- name: Publish to NPM
|
|
64
68
|
run: |
|
|
65
|
-
|
|
69
|
+
npm install -g npm@latest &&
|
|
66
70
|
npm publish
|
|
67
|
-
env:
|
|
68
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
69
71
|
- name: Fetch python dist folder
|
|
70
72
|
uses: actions/download-artifact@v4
|
|
71
73
|
with:
|
|
72
74
|
name: python-package-dist
|
|
73
75
|
path: dist/
|
|
74
|
-
- name: Publish
|
|
76
|
+
- name: Publish to PyPI
|
|
75
77
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
76
78
|
with:
|
|
77
79
|
user: __token__
|
package/js/forms/form.js
CHANGED
|
@@ -4,6 +4,7 @@ import $ from '$qui/lib/jquery.module.js'
|
|
|
4
4
|
import {AssertionError} from '$qui/base/errors.js'
|
|
5
5
|
import {mix} from '$qui/base/mixwith.js'
|
|
6
6
|
import * as Theme from '$qui/theme.js'
|
|
7
|
+
import Debouncer from '$qui/utils/debouncer.js'
|
|
7
8
|
import {asap} from '$qui/utils/misc.js'
|
|
8
9
|
import * as ObjectUtils from '$qui/utils/object.js'
|
|
9
10
|
import {ProgressViewMixin} from '$qui/views/common-views/common-views.js'
|
|
@@ -78,7 +79,7 @@ class Form extends mix().with(ViewMixin, StructuredViewMixin, ProgressViewMixin)
|
|
|
78
79
|
/* Last known validity state */
|
|
79
80
|
this._isValid = null
|
|
80
81
|
this._validationCache = {}
|
|
81
|
-
this.
|
|
82
|
+
this._updateValidationStateDebouncer = new Debouncer(() => this.updateValidationState())
|
|
82
83
|
|
|
83
84
|
this._fieldsByName = {}
|
|
84
85
|
|
|
@@ -737,16 +738,7 @@ class Form extends mix().with(ViewMixin, StructuredViewMixin, ProgressViewMixin)
|
|
|
737
738
|
* Calls {@link qui.forms.Form#updateValidationState} asap, preventing multiple unnecessary successive calls.
|
|
738
739
|
*/
|
|
739
740
|
updateValidationStateASAP() {
|
|
740
|
-
|
|
741
|
-
clearTimeout(this._updateValidationStateASAPHandle)
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
this._updateValidationStateASAPHandle = asap(function () {
|
|
745
|
-
|
|
746
|
-
this._updateValidationStateASAPHandle = null
|
|
747
|
-
this.updateValidationState()
|
|
748
|
-
|
|
749
|
-
}.bind(this))
|
|
741
|
+
this._updateValidationStateDebouncer.call()
|
|
750
742
|
}
|
|
751
743
|
|
|
752
744
|
/**
|
|
@@ -7,9 +7,6 @@ import ListItem from '../list-item.js'
|
|
|
7
7
|
import * as Lists from '../lists.js'
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
const PHRASE_SPLIT_REGEX = /[^a-zA-Z0-9]/
|
|
11
|
-
|
|
12
|
-
|
|
13
10
|
/**
|
|
14
11
|
* A list item made of an icon and a label.
|
|
15
12
|
* @alias qui.lists.commonitems.IconLabelListItem
|
|
@@ -43,13 +40,9 @@ class IconLabelListItem extends mix(ListItem).with(IconLabelViewMixin) {
|
|
|
43
40
|
|
|
44
41
|
getMatchPhrase() {
|
|
45
42
|
if (this._matchPhrase == null) {
|
|
46
|
-
this._matchPhrase =
|
|
47
|
-
this._matchPhrase = [
|
|
48
|
-
...this.getLabel().split(PHRASE_SPLIT_REGEX),
|
|
49
|
-
...this.getSubLabel().split(PHRASE_SPLIT_REGEX)
|
|
50
|
-
]
|
|
43
|
+
this._matchPhrase = []
|
|
51
44
|
|
|
52
|
-
/*
|
|
45
|
+
/* Consider the entire label as is */
|
|
53
46
|
if (this.getLabel()) {
|
|
54
47
|
this._matchPhrase.push(this.getLabel().toLowerCase())
|
|
55
48
|
}
|
package/js/utils/debouncer.js
CHANGED
|
@@ -8,9 +8,9 @@ class Debouncer {
|
|
|
8
8
|
/**
|
|
9
9
|
* @constructs
|
|
10
10
|
* @param {Function} func the function to debounce
|
|
11
|
-
* @param {Number} delay the debouncing delay, in milliseconds
|
|
11
|
+
* @param {Number} [delay] the debouncing delay, in milliseconds (defaults to `0`)
|
|
12
12
|
*/
|
|
13
|
-
constructor(func, delay) {
|
|
13
|
+
constructor(func, delay = 0) {
|
|
14
14
|
this._func = func
|
|
15
15
|
this._delay = delay
|
|
16
16
|
this._timeoutHandle = null
|
package/less/all.less
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import "base.less";
|
|
2
|
+
@import "main-ui.less";
|
|
3
|
+
@import "no-effects.less";
|
|
4
|
+
@import "visibility-manager.less";
|
|
5
|
+
@import "icons.less";
|
|
6
|
+
|
|
7
|
+
@import "widgets/check-button.less";
|
|
8
|
+
@import "widgets/choice-buttons.less";
|
|
9
|
+
@import "widgets/color-combo.less";
|
|
10
|
+
@import "widgets/combo.less";
|
|
11
|
+
@import "widgets/common.less";
|
|
12
|
+
@import "widgets/common-buttons.less";
|
|
13
|
+
@import "widgets/labels.less";
|
|
14
|
+
@import "widgets/progress-disk.less";
|
|
15
|
+
@import "widgets/slider.less";
|
|
16
|
+
@import "widgets/input.less";
|
|
17
|
+
@import "widgets/updown.less";
|
|
18
|
+
@import "widgets/various.less";
|
|
19
|
+
|
|
20
|
+
@import "messages.less";
|
|
21
|
+
@import "global-glass.less";
|
|
22
|
+
@import "structured-view.less";
|
|
23
|
+
@import "progress-view.less";
|
|
24
|
+
@import "icon-label-view.less";
|
|
25
|
+
|
|
26
|
+
@import "pages/breadcrumbs.less";
|
|
27
|
+
@import "pages/common-pages.less";
|
|
28
|
+
@import "pages/page.less";
|
|
29
|
+
|
|
30
|
+
@import "forms/common-fields.less";
|
|
31
|
+
@import "forms/common-forms.less";
|
|
32
|
+
@import "forms/form.less";
|
|
33
|
+
@import "forms/form-button.less";
|
|
34
|
+
@import "forms/form-field.less";
|
|
35
|
+
|
|
36
|
+
@import "lists.less";
|
|
37
|
+
@import "tables.less";
|
|
38
|
+
|
|
39
|
+
@import "theme.less";
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qtoggle/qui",
|
|
3
3
|
"description": "A JavaScript UI library with batteries included.",
|
|
4
|
-
"version": "1.19.
|
|
4
|
+
"version": "1.19.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Calin Crisan",
|
|
7
7
|
"email": "ccrisan@gmail.com"
|
|
8
8
|
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"url": "https://github.com/qtoggle/qui.git"
|
|
11
|
+
},
|
|
9
12
|
"keywords": [],
|
|
10
13
|
"license": "Apache-2.0",
|
|
11
14
|
"dependencies": {
|
|
@@ -16,30 +19,30 @@
|
|
|
16
19
|
"pepjs": "*"
|
|
17
20
|
},
|
|
18
21
|
"devDependencies": {
|
|
19
|
-
"@babel/core": "
|
|
20
|
-
"@babel/plugin-proposal-class-properties": "
|
|
21
|
-
"@babel/preset-env": "
|
|
22
|
+
"@babel/core": "*",
|
|
23
|
+
"@babel/plugin-proposal-class-properties": "*",
|
|
24
|
+
"@babel/preset-env": "*",
|
|
22
25
|
"@babel/eslint-parser": "*",
|
|
23
26
|
"babel-loader": "^8",
|
|
24
27
|
"css-loader": "^3",
|
|
25
28
|
"eslint": "^9",
|
|
26
|
-
"expose-loader": "^
|
|
27
|
-
"file-loader": "
|
|
28
|
-
"glob": "
|
|
29
|
+
"expose-loader": "^1",
|
|
30
|
+
"file-loader": "*",
|
|
31
|
+
"glob": "*",
|
|
29
32
|
"jsdoc": "^3",
|
|
30
|
-
"jsdoc-export-default-interop": "
|
|
31
|
-
"jsdoc-typeof-plugin": "
|
|
32
|
-
"less": "
|
|
33
|
+
"jsdoc-export-default-interop": "*",
|
|
34
|
+
"jsdoc-typeof-plugin": "*",
|
|
35
|
+
"less": "*",
|
|
33
36
|
"less-loader": "^6",
|
|
34
|
-
"mini-css-extract-plugin": "^
|
|
35
|
-
"optimize-css-assets-webpack-plugin": "
|
|
37
|
+
"mini-css-extract-plugin": "^1",
|
|
38
|
+
"optimize-css-assets-webpack-plugin": "*",
|
|
36
39
|
"string-replace-loader": "^2",
|
|
37
40
|
"terser-webpack-plugin": "^3",
|
|
38
41
|
"webpack": "^4",
|
|
39
42
|
"webpack-cli": "^3",
|
|
40
|
-
"webpack-fix-style-only-entries": "
|
|
41
|
-
"webpack-inject-plugin": "
|
|
42
|
-
"webpack-shell-plugin": "
|
|
43
|
+
"webpack-fix-style-only-entries": "*",
|
|
44
|
+
"webpack-inject-plugin": "*",
|
|
45
|
+
"webpack-shell-plugin": "*"
|
|
43
46
|
},
|
|
44
47
|
"scripts": {
|
|
45
48
|
"postinstall": "scripts/postinstall.sh"
|
package/pyproject.toml
CHANGED
|
@@ -125,7 +125,7 @@ function makeLessRule({type, theme, isProduction, appName, appFullPath, quiFullP
|
|
|
125
125
|
if (isProduction) {
|
|
126
126
|
loaders = [
|
|
127
127
|
MiniCssExtractPlugin.loader,
|
|
128
|
-
cssLoader
|
|
128
|
+
cssLoader
|
|
129
129
|
]
|
|
130
130
|
}
|
|
131
131
|
else { /* Development mode */
|
|
@@ -232,8 +232,8 @@ function makeConfig({theme, isProduction, appName, appFullPath, extraAliases, cs
|
|
|
232
232
|
|
|
233
233
|
let excludeLessRegex = new RegExp('theme-(' + THEMES.join('|') + ')\\.less', 'i')
|
|
234
234
|
let cssRequirements = [
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
quiLessPath + '/all.less',
|
|
236
|
+
appLessPath + '/all.less'
|
|
237
237
|
]
|
|
238
238
|
|
|
239
239
|
/* This is needed because FixStyleOnlyEntriesPlugin() needs resources for theme entries to be different */
|