@schukai/monster 4.92.0 → 4.94.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 +16 -0
- package/package.json +1 -1
- package/source/components/datatable/columnbar.mjs +204 -0
- package/source/components/datatable/pagination.mjs +512 -11
- package/source/components/datatable/style/column-bar.pcss +17 -2
- package/source/components/datatable/style/embedded-pagination.pcss +65 -0
- package/source/components/datatable/style/pagination.pcss +57 -1
- package/source/components/datatable/stylesheet/column-bar.mjs +1 -1
- package/source/components/datatable/stylesheet/embedded-pagination.mjs +1 -1
- package/source/components/datatable/stylesheet/pagination.mjs +1 -1
- package/source/text/formatter.mjs +75 -6
- package/test/cases/text/formatter.mjs +26 -2
|
@@ -288,7 +288,11 @@ describe('Formatter', function () {
|
|
|
288
288
|
mykey: '${mykey}',
|
|
289
289
|
};
|
|
290
290
|
|
|
291
|
-
const formatter = new Formatter(inputObj
|
|
291
|
+
const formatter = new Formatter(inputObj, {
|
|
292
|
+
recursion: {
|
|
293
|
+
detectCycles: false,
|
|
294
|
+
},
|
|
295
|
+
});
|
|
292
296
|
|
|
293
297
|
const text = '${mykey}';
|
|
294
298
|
let formattedText = text;
|
|
@@ -300,8 +304,28 @@ describe('Formatter', function () {
|
|
|
300
304
|
|
|
301
305
|
expect(() => formatter.format(formattedText)).to.throw('too deep nesting');
|
|
302
306
|
});
|
|
307
|
+
|
|
308
|
+
it('should detect recursion cycles by default', () => {
|
|
309
|
+
const formatter = new Formatter({
|
|
310
|
+
a: '${b}',
|
|
311
|
+
b: '${a}',
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
expect(() => formatter.format('${a}')).to.throw('cycle detected in formatter');
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
it('should allow configuring max depth', () => {
|
|
318
|
+
const formatter = new Formatter({value: '${value}'}, {
|
|
319
|
+
recursion: {
|
|
320
|
+
maxDepth: 3,
|
|
321
|
+
detectCycles: false,
|
|
322
|
+
},
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
expect(() => formatter.format('${value}')).to.throw('too deep nesting');
|
|
326
|
+
});
|
|
303
327
|
|
|
304
328
|
});
|
|
305
329
|
|
|
306
330
|
|
|
307
|
-
});
|
|
331
|
+
});
|