@cntwg/html-helper 0.0.24 → 0.0.26

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.
@@ -1,9 +1,8 @@
1
- // [v0.1.037-20250220]
1
+ // [v0.1.041-20250509]
2
2
 
3
3
  // === module init block ===
4
4
 
5
5
  const {
6
- readAsString,
7
6
  isArray, isObject, isPlainObject, valueToArray,
8
7
  valueToIDString,
9
8
  } = require('@ygracs/bsfoc-lib-js');
@@ -93,11 +92,6 @@ function hideHTMLElement(obj) {
93
92
  return isSUCCEED;
94
93
  };
95
94
 
96
- /** @deprecated */
97
- function hideHtmlElement(obj) {
98
- return hideHTMLElement(obj);
99
- };
100
-
101
95
  /**
102
96
  * @since v0.0.23
103
97
  * @function showHTMLElement
@@ -111,11 +105,6 @@ function showHTMLElement(obj) {
111
105
  return isSUCCEED;
112
106
  };
113
107
 
114
- /** @deprecated */
115
- function showHtmlElement(obj) {
116
- return showHTMLElement(obj);
117
- };
118
-
119
108
  /**
120
109
  * @since v0.0.23
121
110
  * @function selectHTMLElement
@@ -129,11 +118,6 @@ function selectHTMLElement(obj) {
129
118
  return isSUCCEED;
130
119
  };
131
120
 
132
- /** @deprecated */
133
- function selectHtmlElement(obj) {
134
- return selectHTMLElement(obj);
135
- };
136
-
137
121
  /**
138
122
  * @since v0.0.23
139
123
  * @function unselectHTMLElement
@@ -147,11 +131,6 @@ function unselectHTMLElement(obj) {
147
131
  return isSUCCEED;
148
132
  };
149
133
 
150
- /** @deprecated */
151
- function unselectHtmlElement(obj) {
152
- return unselectHTMLElement(obj);
153
- };
154
-
155
134
  /**
156
135
  * @since v0.0.23
157
136
  * @function markHTMLElementAsCurrent
@@ -165,11 +144,6 @@ function markHTMLElementAsCurrent(obj) {
165
144
  return isSUCCEED;
166
145
  };
167
146
 
168
- /** @deprecated */
169
- function markHtmlElementAsCurrent(obj) {
170
- return markHTMLElementAsCurrent(obj);
171
- };
172
-
173
147
  /**
174
148
  * @since v0.0.23
175
149
  * @function unmarkCurrentHTMLElement
@@ -183,11 +157,6 @@ function unmarkCurrentHTMLElement(obj) {
183
157
  return isSUCCEED;
184
158
  };
185
159
 
186
- /** @deprecated */
187
- function unmarkCurrentHtmlElement(obj) {
188
- return unmarkCurrentHTMLElement(obj);
189
- };
190
-
191
160
  /**
192
161
  * @since v0.0.23
193
162
  * @function markHTMLElementAsActive
@@ -201,11 +170,6 @@ function markHTMLElementAsActive(obj) {
201
170
  return isSUCCEED;
202
171
  };
203
172
 
204
- /** @deprecated */
205
- function markHtmlElementAsActive(obj) {
206
- return markHTMLElementAsActive(obj);
207
- };
208
-
209
173
  /**
210
174
  * @since v0.0.23
211
175
  * @function unmarkActiveHTMLElement
@@ -219,11 +183,6 @@ function unmarkActiveHTMLElement(obj) {
219
183
  return isSUCCEED;
220
184
  };
221
185
 
222
- /** @deprecated */
223
- function unmarkActiveHtmlElement(obj) {
224
- return unmarkActiveHTMLElement(obj);
225
- };
226
-
227
186
  /**
228
187
  * @since v0.0.23
229
188
  * @function lockHTMLElement
@@ -242,19 +201,12 @@ function lockHTMLElement(obj) {
242
201
  obj.disabled = true;
243
202
  break;
244
203
  }
245
- default: {
246
- break;
247
- }
204
+ default: {}
248
205
  };
249
206
  };
250
207
  return isSUCCEED;
251
208
  };
252
209
 
253
- /** @deprecated */
254
- function lockHtmlElement(obj) {
255
- return lockHTMLElement(obj);
256
- };
257
-
258
210
  /**
259
211
  * @since v0.0.23
260
212
  * @function unlockHTMLElement
@@ -279,11 +231,6 @@ function unlockHTMLElement(obj) {
279
231
  return isSUCCEED;
280
232
  };
281
233
 
282
- /** @deprecated */
283
- function unlockHtmlElement(obj) {
284
- return unlockHTMLElement(obj);
285
- };
286
-
287
234
  /**
288
235
  * @since v0.0.23
289
236
  * @function activateHTMLElements
@@ -297,11 +244,6 @@ function activateHTMLElements(...args) {
297
244
  };
298
245
  };
299
246
 
300
- /** @deprecated */
301
- function activateHtmlElements(...args) {
302
- activateHTMLElements(...args);
303
- };
304
-
305
247
  /**
306
248
  * @since v0.0.23
307
249
  * @function inactivateHTMLElements
@@ -315,11 +257,6 @@ function inactivateHTMLElements(...args) {
315
257
  };
316
258
  };
317
259
 
318
- /** @deprecated */
319
- function inactivateHtmlElements(...args) {
320
- inactivateHTMLElements(...args);
321
- };
322
-
323
260
  /**
324
261
  * @since v0.0.21
325
262
  * @function readAsTagName
@@ -449,20 +386,21 @@ function valueToElementID(value) {
449
386
  * @typedef {Object} elemDesc
450
387
  * @property {string} [id] - element ID
451
388
  * @property {string} [text] - some text
452
- * @property {object} [attr] - an attributes list
389
+ * @property {Object<string, any>} [attr] - an attributes list
453
390
  * @property {string|string[]} [classNames] - a class names list (added since v0.0.19)
454
- * @property {object} [data] - a 'dataset'-attributes list
391
+ * @property {Object<string, any>} [data] - a 'dataset'-attributes list
455
392
  * @description An element description.
456
393
  */
457
394
 
458
395
  /**
459
- * @function createNewHtmlElement
396
+ * @since 0.0.25
397
+ * @function createNewHTMLElement
460
398
  * @param {string} tagName - an element tag name
461
399
  * @param {elemDesc} [opt] - an element description object
462
400
  * @return {?HTMLElement}
463
401
  * @description Creates a new HTML-element.
464
402
  */
465
- function createNewHtmlElement(tagName, opt) {
403
+ function createNewHTMLElement(tagName, opt) {
466
404
  let item = null;
467
405
  let _tag = readAsTagName(tagName);
468
406
  if (_tag === '') return null;
@@ -534,6 +472,11 @@ function createNewHtmlElement(tagName, opt) {
534
472
  return item;
535
473
  };
536
474
 
475
+ /** @deprecated */
476
+ function createNewHtmlElement(...args) {
477
+ return createNewHTMLElement(...args);
478
+ };
479
+
537
480
  /***
538
481
  * (* class definitions *)
539
482
  */
@@ -570,7 +513,7 @@ module.exports.inactivateHTMLElements = inactivateHTMLElements;
570
513
  module.exports.valueToClassList = valueToClassList;
571
514
 
572
515
  // experimental
573
- module.exports.createNewHtmlElement = createNewHtmlElement;
516
+ module.exports.createNewHTMLElement = createNewHTMLElement;
574
517
  module.exports.readAsAttrValue = readAsAttrValue;
575
518
  module.exports.readAsTagName = readAsTagName;
576
519
  module.exports.readAsAttrName = readAsAttrName;
@@ -580,15 +523,4 @@ module.exports.valueToElementID = valueToElementID;
580
523
  module.exports.valueToIDString = valueToIDString;
581
524
 
582
525
  // @deprecated
583
- module.exports.showHtmlElement = showHtmlElement;
584
- module.exports.hideHtmlElement = hideHtmlElement;
585
- module.exports.selectHtmlElement = selectHtmlElement;
586
- module.exports.unselectHtmlElement = unselectHtmlElement;
587
- module.exports.markHtmlElementAsCurrent = markHtmlElementAsCurrent;
588
- module.exports.unmarkCurrentHtmlElement = unmarkCurrentHtmlElement;
589
- module.exports.markHtmlElementAsActive = markHtmlElementAsActive;
590
- module.exports.unmarkActiveHtmlElement = unmarkActiveHtmlElement;
591
- module.exports.lockHtmlElement = lockHtmlElement;
592
- module.exports.unlockHtmlElement = unlockHtmlElement;
593
- module.exports.activateHtmlElements = activateHtmlElements;
594
- module.exports.inactivateHtmlElements = inactivateHtmlElements;
526
+ module.exports.createNewHtmlElement = createNewHtmlElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntwg/html-helper",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "description": "A base HTML-helper library for js",
5
5
  "author": "ygracs <cs70th-om@rambler.ru>",
6
6
  "license": "MIT",
@@ -32,18 +32,8 @@
32
32
  "test-bs": "jest base/",
33
33
  "test-bs:g1": "jest base/fg-1",
34
34
  "test-bs:g2": "jest base/fg-2",
35
- "test-lc1": "jest THtmlItemsListContainer",
36
- "test-lc2": "jest THtmlItemsListController",
37
35
  "test-lc2:bs": "jest THtmlItemsListController/base",
38
36
  "test-lc2:ec": "jest THtmlItemsListController/events",
39
- "test-sis": "jest THtmlStubItemsSet",
40
- "test-btn": "jest THtmlButtonsSet",
41
- "test-lbc": "jest THtmlListButtonsController",
42
- "test-lbc:bs": "jest THtmlListButtonsController/base",
43
- "test-lbc:ec": "jest THtmlListButtonsController/events",
44
- "test-bc1": "jest THtmlButtonsControllerARCSet",
45
- "test-bc1:bs": "jest THtmlButtonsControllerARCSet/base",
46
- "test-bc1:ec": "jest THtmlButtonsControllerARCSet/events",
47
37
  "build-doc-md": "jsdoc2md",
48
38
  "build-doc-html": "jsdoc"
49
39
  },
@@ -52,7 +42,8 @@
52
42
  "#test-dir/*": "./__test__/*"
53
43
  },
54
44
  "dependencies": {
55
- "@ygracs/bsfoc-lib-js": "^0.2.2"
45
+ "@ygracs/bsfoc-lib-js": "^0.2.3",
46
+ "@ygracs/lists-lib-js": "^0.0.4"
56
47
  },
57
48
  "devDependencies": {
58
49
  "jest": "^29.7.0",