@cntwg/html-helper 0.0.26 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,244 +1,16 @@
1
- #### *v0.0.26*
1
+ #### *v0.1.0*
2
2
 
3
- Pre-release version.
4
-
5
- > - `html-ctrls-list.md` updated;
6
- > - improve a 'THtmlItemsListController' behavior on handling a `click`-event;
7
- > - change behavior for a `THtmlStubItemsSet`-class constructor (*see docs for details*);
8
- > - change behavior for a `loadItems`-method of a `THtmlStubItemsSet`-class (*see docs for details*);
9
- > - some other fixes.
10
-
11
- #### *v0.0.25*
12
-
13
- Pre-release version.
14
-
15
- > - update dependency on `@ygracs/bsfoc-lib-js` module to v0.2.3;
16
- > - add dependency on `@ygracs/lists-lib-js` module;
17
- > - remove some deprecates (*see docs for details*);
18
- > - change pattern for an element manipulation functions (*see docs for details*);
19
- > - change behavior for `loadItems` method of `THtmlStubItemsSet` class in handling `options` parameter (*see docs for details*).
20
-
21
- #### *v0.0.24*
22
-
23
- Pre-release version.
24
-
25
- > - update dependency on `@ygracs/bsfoc-lib-js` module to v0.2.2.
26
-
27
- #### *v0.0.23*
28
-
29
- Pre-release version.
30
-
31
- > - `html-helper-lib.md` updated;
32
- > - `html-ctrls-list.md` updated;
33
- > - `html-ctrls-btn.md` updated;
34
- > - `html-ctrls-fields.md` updated;
35
- > - added property `type` to `THtmlInputField` class;
36
- > - change pattern for an element manipulation functions (*see docs for details*);
37
- > - deprecate a `force` option in an `options` parameter of the `THtmlStubItemsSet` class constructor;
38
- > - some other fixes.
39
-
40
- #### *v0.0.22*
41
-
42
- Pre-release version.
43
-
44
- > - `html-helper-lib.md` updated;
45
- > - add functions `valueToElementID` into `html-helper-lib.js` module;
46
- > - improve behavior for `createNewHtmlElement` function.
47
-
48
- #### *v0.0.21*
49
-
50
- Pre-release version.
51
-
52
- > - `html-ctrls-list.md` updated;
53
- > - `html-ctrls-fields.md` updated;
54
- > - `html-ctrls-btn.md` updated;
55
- > - updated dependency on `@ygracs/bsfoc-lib-js` module to v0.2.1;
56
- > - remove some deprecates (*see docs for details*);
57
- > - change behavior for `loadItems` method of `THtmlStubItemsSet` class in handling `options` parameter (*see docs for details*);
58
- > - add functions `readAsTagName` and `readAsAttrName` into `html-helper-lib.js` module;
59
- > - added 'components' property for module exports;
60
- > - some other fixes.
61
-
62
- #### *v0.0.20*
63
-
64
- Pre-release version.
65
-
66
- > - updated dependency on `@ygracs/bsfoc-lib-js` module to v0.1.4;
67
- > - some fixes in `html-helper-lib.js` module.
68
-
69
- #### *v0.0.19*
70
-
71
- Pre-release version.
72
-
73
- > - `html-helper-lib.md` updated;
74
- > - updated dependency on `@ygracs/bsfoc-lib-js` module to v0.1.3;
75
- > - add functions `lockHtmlElement` and `unlockHtmlElement` into `html-helper-lib.js` module;
76
- > - change behavior for `createNewHtmlElement` function in handling `options` parameter (*see docs for details*);
77
- > - added `THtmlInputField` class (experimental);
78
- > - some other fixes.
79
-
80
- #### *v0.0.18*
81
-
82
- Pre-release version.
83
-
84
- > - `html-helper-lib.md` updated;
85
- > - some fixes in `html-helper-lib.js` module;
86
- > - add `mod-hfunc.js` module;
87
- > - rename module `html-ctrls-list.js` to `html-ctrls/list.js`;
88
- > - some fixes in `list.js` module;
89
- > - rename module `html-ctrls-btn.js` to `html-ctrls/buttons.js`;
90
- > - some fixes in `buttons.js` module;
91
- > - some fixes in `lists-btn.js` module;
92
- > - some fixes in `lists-stubs.js` module;
93
- > - add function `readAsAttrValue` into `html-helper-lib.js` module;
94
- > - add settings `itemBaseClassID` to `THtmlItemsListContainer` class constructor `options` parameter;
95
- > - added 'component' property for module exports;
96
- > - deprecated 'classes' property for module exports (*use `component` instead*);
97
-
98
- #### *v0.0.17*
99
-
100
- Pre-release version.
101
-
102
- > improved event logic on items deletion for `THtmlItemsListController` class.
103
-
104
- #### *v0.0.16*
105
-
106
- Pre-release version.
107
-
108
- > improved items selection logic for `THtmlItemsListController` class.
109
-
110
- #### *v0.0.15*
111
-
112
- Pre-release version.
113
-
114
- > - `html-helper-lib.md` updated;
115
- > - `html-ctrls-list.md` updated;
116
- > - some fixes in `html-ctrls-btn.js` module;
117
- > - some fixes in `html-ctrls-list.js` module;
118
- > - alter behavior for the `srchIndexByAttr` method of a `THtmlItemsListContainer` class (*see docs for details*);
119
- > - add settings `markCurrentItem` to `THtmlItemsListContainer` class constructor `options` parameter;
120
- > - add function `valueToIDString` into `html-helper-lib.js` module;
121
-
122
- #### *v0.0.14*
3
+ Release version.
123
4
 
124
- Pre-release version.
125
-
126
- > - `html-ctrls-list.md` updated;
127
- > - some fixes in `html-ctrls/list-stubs.js` module;
128
- > - alter behavior for the `loadItems` method of a `THtmlStubItemsSet` class in case when its `options` parameter is set to `boolean` (see `html-ctrls-list.md` for details);
129
- > - added method `rstDefItem` to `THtmlStubItemsSet` class;
130
- > - added `THtmlButtonsControllerARCSet` class.
131
-
132
- #### *v0.0.13*
133
-
134
- Pre-release version.
135
-
136
- > - `html-helper-lib.md` updated;
137
- > - `html-ctrls-btn.md` updated;
138
- > - `html-ctrls-list.md` updated;
139
- > - some fixes in `html-helper-lib.js` module;
140
- > - some fixes in `html-ctrls-btn.js` module;
141
- > - some fixes in `html-ctrls-list.js` module;
142
- > - move definition of `THtmlStubItemsSet` from `html-ctrls-list.js` module to `html-ctrls/lists-stubs.js` submodule;
143
- > - add function `valueToClassList` into `html-helper-lib.js` module;
144
- > - updated dependency on `@ygracs/bsfoc-lib-js` module to v0.1.2.
145
-
146
- #### *v0.0.12*
147
-
148
- Pre-release version.
149
-
150
- > - updated dependency on `@ygracs/bsfoc-lib-js` module to v0.1.1.
151
-
152
- #### *v0.0.11*
153
-
154
- Pre-release version.
155
-
156
- > - `html-ctrls-btn.md` updated;
157
- > - `html-ctrls-list.md` updated;
158
- > - some fixes in `html-ctrls-list.js` module;
159
- > - some fixes in `html-ctrls-btn.js` module.
160
-
161
- #### *v0.0.10*
162
-
163
- Pre-release version.
164
-
165
- > - `html-ctrls-btn.md` updated;
166
- > - added `THtmlListButtonsController` class;
167
-
168
- #### *v0.0.9*
169
-
170
- Pre-release version.
171
-
172
- > - switch dependency from `@cntwg/bsfoc-lib-js` module to `@ygracs/bsfoc-lib-js` module.
173
-
174
- #### *v0.0.8*
175
-
176
- Pre-release version.
177
-
178
- > - updated dependency on `@cntwg/bsfoc-lib-js` module to v0.0.11.
179
-
180
- #### *v0.0.7*
181
-
182
- Pre-release version.
183
-
184
- > - updated dependency on `@cntwg/bsfoc-lib-js` module to v0.0.10;
185
- > - some fixes in `html-helper-lib.js` module;
186
- > - some fixes in `html-ctrls-list.js` module.
187
-
188
- #### *v0.0.6*
189
-
190
- Pre-release version.
191
-
192
- > - `html-ctrls-btn.md` updated;
193
- > - `html-ctrls-list.md` updated;
194
- > - `html-helper-lib.md` updated;
195
- > - some fixes in `html-ctrls-btn.js` module;
196
- > - some fixes in `html-ctrls-list.js` module.
197
-
198
- #### *v0.0.5*
199
-
200
- Pre-release version.
201
-
202
- > - `$module/test/README.md` added;
203
- > - updated dependency on `@cntwg/bsfoc-lib-js` module to v0.0.8;
204
- > - `html-ctrls-list.md` updated;
205
- > - added `minIndex` property to `THtmlItemsListContainer` class;
206
- > - some fixes in `html-ctrls-list.js` module;
207
- > - added 'classes' property for module exports;
208
- > - MIT-license applied.
209
-
210
- #### *v0.0.4*
211
-
212
- Pre-release version.
213
-
214
- > - updated dependency on `@cntwg/bsfoc-lib-js` module to v0.0.5.
215
-
216
- #### *v0.0.3*
217
-
218
- Pre-release version.
219
-
220
- > - added `activateHTMLElements` function;
221
- > - added `inactivateHTMLElements` function;
222
- > - added `createNewHtmlElement` function (experimental);
223
5
  > - `html-helper-lib.md` updated;
224
- > - `html-ctrls-btn.md` updated;
225
- > - `html-ctrls-list.md` updated.
226
-
227
- #### *v0.0.2*
228
-
229
- Pre-release version.
230
-
231
- > - `README.md` added;
232
- > - `html-helper-lib.md` added to `doc`;
233
- > - `html-ctrls-btn.md` added to `doc`;
234
- > - `html-ctrls-list.md` added to `doc`;
235
- > - added `CSS_CLASS_ACTIVE` constant to `CSS_CLASS_STRING`;
236
- > - added `isActiveHTMLElement` function;
237
- > - added `markHtmlElementAsActive` function;
238
- > - added `unmarkActiveHtmlElement` function;
239
- > - `html-btn-ctrl.js` was renamed `html-ctrls-btn.js`;
240
- > - `html-list-ctrl.js` was renamed `html-ctrls-list.js`.
6
+ > - remove `$lib/html-ctrls/fields.js` module;
7
+ > - remove `$lib/html-ctrls/buttons.js` module;
8
+ > - remove `$lib/html-ctrls/list.js` module;
9
+ > - remove `$lib/html-ctrls/list-stubs.js` module;
10
+ > - remove `$lib/html-ctrls/list-btn.js` module;
11
+ > - remove some deprecates;
12
+ > - `README.md` updated.
241
13
 
242
- #### *v0.0.1*
14
+ #### *v0.0.1-v0.0.27*
243
15
 
244
16
  Pre-release version.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- >|***rev.*:**|0.1.7|
1
+ >|***rev.*:**|0.2.8|
2
2
  >|:---|---:|
3
- >|date:|2024-11-20|
3
+ >|date:|2025-10-23|
4
4
 
5
5
  ## Introduction
6
6
 
7
- This module provide a base set of helpers for javascript. So your work can run a bit easy by using it when you deal with HTML-forms.
7
+ This module provide a base set of helpers for JavaScript. So your work can run a bit easy by using it when you deal with an HTML-forms.
8
8
 
9
9
  ## Description
10
10
 
@@ -14,24 +14,20 @@ This module contains the following components:
14
14
 
15
15
  > *For more details see `html-helper.md` in module `doc` directory*.
16
16
 
17
- - classes for working with instances maintaining a buttons set support such as:
18
- - `THtmlButtonsSet`,
19
- - `THtmlButtonsControllerARCSet`.
20
-
21
- > *For more details see `html-ctrls-btn.md` in module `doc` directory*.
22
-
23
- - classes for working with instances maintaining a lists support such as:
24
- - `THtmlItemsListContainer`,
25
- - `THtmlItemsListController`,
26
- - `THtmlListButtonsController`,
27
- - `THtmlStubItemsSet`.
28
-
29
- > *For more details see `html-ctrls-list.md` in module `doc` directory*.
30
-
31
- - classes for working with instances maintaining an input fields support such as:
32
- - `THtmlInputField` (experimental, beta stage).
33
-
34
- > *For more details see `html-ctrls-fields.md` in module `doc` directory*.
17
+ > Notes on upgrade to `v0.1.0`
18
+ >
19
+ > > Since `v0.1.0` a support for the following components moved to a separate packages:
20
+ > > - classes for working with instances maintaining a buttons set support such as: `THtmlButtonsSet`, `THtmlButtonsControllerARCSet`.
21
+ > >
22
+ > > To use those you need to install a package [`@cntwg/html-ctrls-buttons`](https://www.npmjs.com/package/@cntwg/html-ctrls-buttons).
23
+ > >
24
+ > > - classes for working with instances maintaining a lists support such as: `THtmlItemsListContainer`, `THtmlItemsListController`, `THtmlListButtonsController`, `THtmlStubItemsSet`.
25
+ > >
26
+ > > To use those you need to install a package [`@cntwg/html-ctrls-lists`](https://www.npmjs.com/package/@cntwg/html-ctrls-lists).
27
+ > >
28
+ > > - classes for working with instances maintaining an input fields support such as: `THtmlInputField`.
29
+ > >
30
+ > > To use those you need to install a package [`@cntwg/html-ctrls-fields`](https://www.npmjs.com/package/@cntwg/html-ctrls-fields).
35
31
 
36
32
  ## Use cases
37
33
 
@@ -1,6 +1,6 @@
1
- >|***rev.*:**|0.1.15|
1
+ >|***rev.*:**|0.1.17|
2
2
  >|:---|---:|
3
- >|date:|2025-03-29|
3
+ >|date:|2025-10-23|
4
4
 
5
5
  ## Introduction
6
6
 
@@ -33,6 +33,15 @@ This function checks whether or not a given object represents an HTML-element an
33
33
  |:---|---|---:|:---|
34
34
  | `obj` | `any` | --- | some element to be checked |
35
35
 
36
+ <a name="isHTMLButton"></a>
37
+ #### **isHTMLButton(obj)** => `boolean`
38
+
39
+ This function checks whether or not a given object represents an HTML-button element and if so returns `true` or `false` if else.
40
+
41
+ | parameter name | value type | default value | description |
42
+ |:---|---|---:|:---|
43
+ | `obj` | `any` | --- | some element to be checked |
44
+
36
45
  <a name="isSelectedHTMLElement"></a>
37
46
  #### **isSelectedHTMLElement(obj)** => `boolean`
38
47
 
@@ -239,7 +248,7 @@ This function tries to convert a given `value` to `ID_STRING`. If failed a `null
239
248
  | parameter name | value type | default value | description |
240
249
  |:---|---|---:|:---|
241
250
  | `value` | `any` | --- | some value |
242
- | `options` | `boolean`, `object` | --- | options to set constraints |
251
+ | `options` | `object` | --- | options to set constraints |
243
252
 
244
253
  > NOTE: This is a re-exported function. For more details see docs for [`@ygracs/bsfoc-lib-js`](https://gitlab.com/ygracs/bsfoc-lib-js)-module.
245
254
 
package/index.js CHANGED
@@ -1,30 +1,15 @@
1
- // [v0.1.028-20250503]
1
+ // [v0.2.033-20251023]
2
2
 
3
3
  // === module init block ===
4
4
 
5
5
  const html_helper = require('./lib/html-helper-lib.js');
6
- const html_list = require('./lib/html-ctrls/list.js');
7
- const html_list_btn = require('./lib/html-ctrls/lists-btn.js');
8
- const html_bts = require('./lib/html-ctrls/buttons.js');
9
- const html_flds = require('./lib/html-ctrls/fields.js');
10
6
  const ev_helper = require('./lib/event-hfunc.js');
11
7
 
12
8
 
13
- // === module extra block (helper functions) ===
9
+ // === module inner block ===
14
10
 
15
11
  // === module main block ===
16
12
 
17
- const components = {
18
- THtmlStubItemsSet: html_list.THtmlStubItemsSet,
19
- THtmlItemsListContainer: html_list.THtmlItemsListContainer,
20
- THtmlItemsListController: html_list.THtmlItemsListController,
21
- THtmlButtonsSet: html_bts.THtmlButtonsSet,
22
- THtmlButtonsControllerARCSet: html_bts.THtmlButtonsControllerARCSet,
23
- THtmlListButtonsController: html_list_btn.THtmlListButtonsController,
24
- // experimental
25
- THtmlInputField: html_flds.THtmlInputField,
26
- };
27
-
28
13
  const eventHelper = {
29
14
  pushEventHandler: ev_helper.pushEventHandler,
30
15
  removeEventHandler: ev_helper.removeEventHandler,
@@ -53,37 +38,15 @@ module.exports.activateHTMLElements = html_helper.activateHTMLElements;
53
38
  module.exports.inactivateHTMLElements = html_helper.inactivateHTMLElements;
54
39
  module.exports.valueToClassList = html_helper.valueToClassList;
55
40
 
56
- module.exports.THtmlStubItemsSet = html_list.THtmlStubItemsSet;
57
- module.exports.THtmlItemsListContainer = html_list.THtmlItemsListContainer;
58
- module.exports.THtmlItemsListController = html_list.THtmlItemsListController;
59
-
60
- module.exports.BTS_DEF_GROUP_NAME = html_bts.BTS_DEF_GROUP_NAME;
61
- module.exports.THtmlButtonsSet = html_bts.THtmlButtonsSet;
62
- module.exports.THtmlButtonsControllerARCSet = html_bts.THtmlButtonsControllerARCSet;
63
-
64
- module.exports.THtmlListButtonsController = html_list_btn.THtmlListButtonsController;
65
-
66
- module.exports.components = components;
67
-
68
- // experimental
41
+ // * experimental *
69
42
  module.exports.readAsTagName = html_helper.readAsTagName;
70
43
  module.exports.readAsAttrName = html_helper.readAsAttrName;
71
44
  module.exports.readAsAttrValue = html_helper.readAsAttrValue;
72
45
  module.exports.valueToElementID = html_helper.valueToElementID;
73
46
  module.exports.createNewHTMLElement = html_helper.createNewHTMLElement;
74
-
75
- module.exports.isHTMLButton = html_bts.isHTMLButton;
76
-
77
- module.exports.THtmlInputField = html_flds.THtmlInputField;
47
+ module.exports.isHTMLButton = html_helper.isHTMLButton;
78
48
 
79
49
  module.exports.eventHelper = eventHelper;
80
50
 
81
- // re-exported
51
+ // * re-exported *
82
52
  module.exports.valueToIDString = html_helper.valueToIDString;
83
-
84
- // will deprecate
85
- module.exports.classes = components;
86
-
87
- // deprecated
88
- module.exports.component = components;
89
- module.exports.createNewHtmlElement = html_helper.createNewHtmlElement;