@descope/web-components-ui 1.0.303 → 1.0.305

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.
Files changed (34) hide show
  1. package/dist/cjs/index.cjs.js +15 -95
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +16 -96
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1612.js +1 -1
  6. package/dist/umd/1621.js +2 -2
  7. package/dist/umd/3951.js +1 -1
  8. package/dist/umd/4024.js +1 -1
  9. package/dist/umd/4052.js +1 -1
  10. package/dist/umd/4569.js +1 -0
  11. package/dist/umd/4746.js +1 -1
  12. package/dist/umd/5806.js +1 -1
  13. package/dist/umd/6770.js +1 -1
  14. package/dist/umd/7056.js +1 -1
  15. package/dist/umd/7531.js +1 -1
  16. package/dist/umd/7911.js +1 -1
  17. package/dist/umd/9092.js +2 -2
  18. package/dist/umd/9314.js +1 -1
  19. package/dist/umd/9423.js +2 -2
  20. package/dist/umd/9562.js +1 -1
  21. package/dist/umd/DescopeDev.js +1 -1
  22. package/dist/umd/descope-button-index-js.js +1 -1
  23. package/dist/umd/descope-email-field-index-js.js +1 -1
  24. package/dist/umd/descope-enriched-text-index-js.js +1 -1
  25. package/dist/umd/index.js +1 -1
  26. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  27. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  28. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  29. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  30. package/package.json +3 -3
  31. package/src/components/descope-enriched-text/EnrichedTextClass.js +5 -24
  32. package/src/components/descope-enriched-text/consts.js +11 -72
  33. package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +1 -1
  34. package/dist/umd/9927.js +0 -1
package/dist/index.esm.js CHANGED
@@ -5,7 +5,7 @@ import '@vaadin/text-field';
5
5
  import '@vaadin/email-field';
6
6
  import '@vaadin/number-field';
7
7
  import '@vaadin/password-field';
8
- import { Remarkable } from 'remarkable';
8
+ import MarkdownIt from 'markdown-it';
9
9
  import '@vaadin/text-area';
10
10
  import '@vaadin/combo-box';
11
11
  import '@vaadin/grid';
@@ -3331,79 +3331,18 @@ const PasswordClass = compose(
3331
3331
 
3332
3332
  customElements.define(componentName$A, PasswordClass);
3333
3333
 
3334
- const ruleSet = {
3335
- custom: ['image'],
3336
- core: [
3337
- 'block',
3338
- 'inline',
3339
- 'abbr', // Parse abbreviation definitions, i.e. `*[abbr]: description`
3340
- 'abbr2', // Enclose abbreviations in <abbr> tags
3341
- 'references',
3342
- 'footnote_tail',
3343
- 'replacements', // Simple typographical replacements
3344
- 'smartquotes', // Convert straight quotation marks to typographic ones
3345
- ],
3346
- inline: [
3347
- 'text',
3348
- 'newline', // Proceess '\n'
3349
- 'backticks', // Parse backticks
3350
- 'del', // Process ~~deleted text~~
3351
- 'emphasis', // Process *this* and _that_
3352
- 'sub', // Process ~subscript~
3353
- 'sup', // Process ^superscript^
3354
- 'links', // Process [links](<to> "stuff")
3355
- 'escape', // Proceess escaped chars and hardbreaks
3356
- 'ins', // Process ++inserted text++
3357
- 'mark', // Process ==highlighted text==
3358
- 'footnote_inline', // Process inline footnotes (^[...])
3359
- 'footnote_ref', // Process footnote references ([^...])
3360
- 'autolink', // Process autolinks '<protocol:...>'
3361
- 'htmltag', // Process html tags
3362
- 'entity', // Process html entity - &#123;, &#xAF;, &quot;, ...
3363
- ],
3364
- block: [
3365
- 'code', // Code block (4 spaces padded)
3366
- 'fences', // fences (``` lang, ~~~ lang)
3367
- 'blockquote', // Block quotes
3368
- 'list',
3369
- 'heading', // heading (#, ##, ...)
3370
- 'paragraph',
3371
- 'hr', // Horizontal rule
3372
- 'footnote', // Process footnote reference list
3373
- 'lheading', // lheading (---, ===)
3374
- 'htmlblock', // HTML block
3375
- 'table', // GFM table, non-standard
3376
- 'deflist', // Definition lists
3377
- ],
3378
- };
3379
-
3380
3334
  const textRuleSet = {
3381
- core: ['block', 'inline'],
3382
- inline: [
3383
- 'text',
3384
- 'newline', // Proceess '\n'
3385
- 'backticks', // Parse backticks
3386
- 'del', // Process ~~deleted text~~
3387
- 'emphasis', // Process *this* and _that_
3388
- 'sub', // Process ~subscript~
3389
- 'sup', // Process ^superscript^
3390
- 'links', // Process [links](<to> "stuff")
3391
- 'escape', // Proceess escaped chars and hardbreaks
3392
- 'ins', // Process ++inserted text++
3393
- 'footnote_inline', // Process inline footnotes (^[...])
3394
- 'footnote_ref', // Process footnote references ([^...])
3395
- 'autolink', // Process autolinks '<protocol:...>'
3396
- ],
3397
- block: [
3398
- 'code', // Code block (4 spaces padded)
3399
- 'fences', // fences (``` lang, ~~~ lang)
3400
- 'blockquote', // Block quotes
3401
- 'list',
3402
- 'heading', // heading (#, ##, ...)
3403
- 'paragraph',
3404
- 'footnote', // Process footnote reference list
3405
- 'htmlblock', // HTML block
3406
- ],
3335
+ components: {
3336
+ core: {
3337
+ rules: ['block', 'inline'],
3338
+ },
3339
+ block: {
3340
+ rules: ['blockquote', 'code', 'heading', 'list', 'paragraph', 'list'],
3341
+ },
3342
+ inline: {
3343
+ rules: ['backticks', 'strikethrough', 'link', 'emphasis', 'strikethrough', 'newline', 'text'],
3344
+ },
3345
+ },
3407
3346
  };
3408
3347
 
3409
3348
  const componentName$z = getComponentName('enriched-text');
@@ -3471,30 +3410,13 @@ let EnrichedText$2 = class EnrichedText extends createBaseClass({ componentName:
3471
3410
  }
3472
3411
  }
3473
3412
 
3474
- #disableAllRules() {
3475
- if (!this.processor) {
3476
- return;
3477
- }
3478
-
3479
- ruleSet?.core && this.processor.core.ruler.disable(ruleSet.core);
3480
- ruleSet?.inline && this.processor.inline.ruler.disable(ruleSet.inline);
3481
- ruleSet?.block && this.processor.block.ruler.disable(ruleSet.block);
3482
-
3483
- this.processor.renderer.rules.image = () => {
3484
- return '';
3485
- };
3486
- }
3487
-
3488
3413
  #enableCustomRules() {
3489
3414
  if (!this.processor) {
3490
3415
  return;
3491
3416
  }
3492
3417
 
3493
3418
  const customRuleSet = textRuleSet;
3494
-
3495
- customRuleSet?.core && this.processor?.core.ruler.enable(customRuleSet?.core);
3496
- customRuleSet?.inline && this.processor?.inline.ruler.enable(customRuleSet?.inline);
3497
- customRuleSet?.block && this.processor?.block.ruler.enable(customRuleSet?.block);
3419
+ this.processor.configure(customRuleSet || {});
3498
3420
 
3499
3421
  if (customRuleSet?.custom?.includes('image')) {
3500
3422
  this.processor.renderer.rules.image = this.#origImageRenderer;
@@ -3502,13 +3424,11 @@ let EnrichedText$2 = class EnrichedText extends createBaseClass({ componentName:
3502
3424
  }
3503
3425
 
3504
3426
  #updateProcessorRules() {
3505
- this.#disableAllRules();
3506
3427
  this.#enableCustomRules();
3507
3428
  }
3508
3429
 
3509
3430
  #initProcessor() {
3510
- this.processor = new Remarkable();
3511
- this.#origImageRenderer = this.processor.renderer.rules.image;
3431
+ this.processor = new MarkdownIt();
3512
3432
  this.#updateProcessorRules();
3513
3433
  }
3514
3434
 
@@ -3524,7 +3444,7 @@ let EnrichedText$2 = class EnrichedText extends createBaseClass({ componentName:
3524
3444
  let html = this.textContent;
3525
3445
 
3526
3446
  try {
3527
- const tokens = this.processor.parse(this.textContent);
3447
+ const tokens = this.processor.parse(this.textContent, { references: undefined });
3528
3448
  html = this.processor.renderer.render(tokens, { breaks: true });
3529
3449
  } catch (e) {
3530
3450
  // eslint-disable-next-line no-console
@@ -5387,7 +5307,7 @@ let PhoneFieldInternal$1 = class PhoneFieldInternal extends BaseInputClass$6 {
5387
5307
  } else {
5388
5308
  this.countryCodeInput.selectedItem = undefined;
5389
5309
  }
5390
- this.phoneNumberInput.value = phoneNumber;
5310
+ this.phoneNumberInput.value = this.phoneNumberInput.value || phoneNumber;
5391
5311
  }
5392
5312
 
5393
5313
  get phoneNumberValue() {